/* Полная перезапись стилей для устранения проблем */
* {
    box-sizing: border-box !important;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow-x: hidden !important;
    background: linear-gradient(135deg, #181A20 0%, #23262F 50%, #1e2026 100%) !important;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(240, 185, 11, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(56, 217, 150, 0.1) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23393c45" stroke-width="0.5" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') !important;
    background-attachment: fixed !important;
    color: #EAECEF !important;
    font-family: Arial, sans-serif !important;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #181A20 !important;      /* Главный чёрный фон Binance */
    color: #EAECEF !important;           /* Бело-серый текст */
}

a, a:visited, a:active {
    color: #F0B90B;
    text-decoration: none;
    transition: color 0.16s;
}
a:hover {
    color: #fff;
}

.container {
    display: flex;
    min-height: 100vh;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Сайдбар и навигация */
.sidebar {
    background: #23262F !important;
    color: #EAECEF !important;
    border-radius: 0;
    min-height: 100vh;
    width: 250px;
    flex-shrink: 0;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}
.sidebar h2 {
    color: #F0B90B !important;
}
.sidebar a {
    color: #EAECEF !important;
    background: transparent !important;
    font-weight: 600;
    padding: 8px 0;
    display: block;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: background 0.18s, color 0.18s, border-left 0.18s;
}
.sidebar a:hover, .sidebar a.active {
    background: #1e2026 !important;
    color: #F0B90B !important;
    border-left: 3px solid #F0B90B !important;
}

/* Основной контент */
.main, .user-detail, .deal-detail, .strategy-detail, .template-detail,
.strategy-form, .user-form, .template-form, .deal-form {
    background: transparent !important;
    color: #EAECEF !important;
    box-shadow: none;
    border-radius: 0;
    flex: 1;
    width: calc(100% - 250px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* User bar */
.user-bar {
    background: linear-gradient(135deg, #1e2026 0%, #23262F 100%) !important;
    color: #EAECEF !important;
    padding: 12px 20px !important;
    border-bottom: 1px solid #393c45 !important;
    text-align: right !important;
    font-size: 0.95rem !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    backdrop-filter: blur(10px) !important;
}

.user-bar a {
    color: #F0B90B !important;
    text-decoration: none !important;
    margin-left: 15px !important;
    transition: color 0.2s ease !important;
}

.user-bar a:hover {
    color: #fff !important;
}

.user-bar b {
    color: #EAECEF !important;
    font-weight: 600 !important;
}

/* Контент внутри main */
.main > *:not(.user-bar) {
    flex: 1 !important;
    padding: 20px !important;
    background: transparent !important;
}

/* Кнопки */
.button, .button-small, .button-th-green {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(90deg, #F8D90F 0%, #F0B90B 100%);
    color: #181A20 !important;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    margin: 0 6px 0 0;
    box-shadow: 0 2px 8px #181a201c;
    transition: background 0.18s, color 0.18s, box-shadow 0.16s;
}
.button:hover, .button-small:hover, .button-th-green:hover {
    background: linear-gradient(90deg, #F0B90B 0%, #F8D90F 100%);
    color: #23262F !important;
    box-shadow: 0 4px 12px #0003;
}
.button-small {
    padding: 6px 12px;
    font-size: 0.96em;
}
.button-secondary {
    background: #23262F !important;
    color: #EAECEF !important;
    border: 1px solid #F0B90B !important;
}
.button-secondary:hover {
    background: #393c45 !important;
    color: #fff !important;
}
.button-th-green {
    background: linear-gradient(90deg, #38d996 0%, #36b37f 100%) !important;
    color: #181A20 !important;
}
.button-th-green:hover {
    background: linear-gradient(90deg, #2dcc83 0%, #41e07b 100%) !important;
    color: #181A20 !important;
}

/* Таблицы */
.data-table {
    width: 100%;
    background: #181A20 !important;
    border-radius: 12px;
    box-shadow: 0 2px 12px #000b;
    border-collapse: collapse;
    margin-bottom: 24px;
    color: #EAECEF;
}
.data-table th, .data-table td {
    padding: 10px 12px;
    border-bottom: 1.5px solid #23262F;
    text-align: left;
}
.data-table th {
    background: #23262F !important;
    color: #F0B90B !important;
    font-weight: 600;
}
.data-table tr {
    transition: background 0.14s;
}
.data-table tr:hover {
    background: #292B34;
}
.data-table tr:last-child td {
    border-bottom: none;
}

/* Формы и инпуты */
input[type="text"], input[type="number"], input[type="email"], select, textarea {
    width: 100%;
    padding: 8px 10px;
    margin-top: 5px;
    margin-bottom: 4px;
    border-radius: 6px;
    border: 1px solid #323546;
    background: #181A20;
    color: #EAECEF;
    font-size: 1em;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border: 1.5px solid #F0B90B;
    background: #23262F;
}
label {
    color: #EAECEF;
    font-weight: 500;
}

/* Декоративные элементы и разделители */
hr {
    border-bottom: 1.5px solid #393c45 !important;
}
.main-footer, .user-detail-meta, .th-balance-note, .deal-ul, .template-ul {
    color: #A7A7A7 !important;
}

/* Логика сделок, логов и блоков */
.deal-ul, .strategy-ul, .template-ul {
    color: #EAECEF;
    font-size: 1.08em;
    margin-bottom: 20px;
    list-style: none;
    padding-left: 0;
}
.deal-ul li, .strategy-ul li, .template-ul li {
    margin-bottom: 12px;
}
.strategy-json, .template-json {
    background: #181A20 !important;
    color: #EAECEF !important;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 1em;
    white-space: pre;
    margin-top: 6px;
}

/* Trade Hub и прочие блоки */
.trade-hub {
    max-width: 1200px;
    margin: 0 auto;
}
.th-balance-value, .th-profit-positive {
    color: #38d996 !important;
}
.th-profit-negative {
    color: #e35c5c !important;
}
.th-profit-zero {
    color: #A7A7A7 !important;
}
.th-active-label {
    color: #F0B90B !important;
}
.th-template-active {
    border: 1.5px solid #F0B90B;
    background: #23262F !important;
}
.th-balance-initial {
    color: #A7A7A7;
    font-size: 0.97em;
    margin-left: 10px;
}
.trade-hub-logs {
    max-height: 220px;
    overflow: auto;
    background: #23262F !important;
    color: #EAECEF !important;
    padding: 14px;
    border-radius: 10px;
    font-size: 1em;
    font-family: monospace;
    box-shadow: 0 1px 6px #0007;
}

/* Карточки стратегий */
.strategy-list-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 28px;
}
.strategy-card {
    background: #23262F !important;
    border-radius: 16px;
    box-shadow: 0 2px 12px #0003;
    min-width: 280px;
    max-width: 350px;
    padding: 24px 20px 18px 22px;
    margin-bottom: 6px;
    flex: 1 1 310px;
    border: 1px solid #2e2e38;
    position: relative;
}
.strategy-title {
    font-size: 1.16em;
    font-weight: 600;
    margin-bottom: 8px;
    color: #F0B90B;
}
.not-active {
    color: #e35c5c;
    font-size: 0.96em;
    font-weight: 500;
}
.strategy-desc {
    color: #A7A7A7;
    font-size: 0.97em;
    margin-bottom: 8px;
}
.strategy-id {
    margin-bottom: 10px;
    color: #EAECEF;
}
.strategy-params ul {
    font-size: 1em;
    margin: 0;
    padding-left: 18px;
}
.strategy-params li {
    margin-bottom: 3px;
}
.strategy-actions {
    margin-top: 12px;
    gap: 10px;
}

/* Мелкие доработки */
.form-main h4, .template-form h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.08em;
    color: #F0B90B;
    font-weight: 600;
}
::-webkit-scrollbar {
    width: 9px;
    background: #181A20;
}
::-webkit-scrollbar-thumb {
    background: #23262F;
    border-radius: 8px;
}
.link-gold {
    color: #F0B90B !important;
    font-weight: bold;
    transition: color 0.15s;
}
.link-gold:hover {
    color: #fff !important;
}

/* Убрать ограничение ширины для основных секций */
.main,
.trade-hub,
.deals-list,
.templates-list,
.strategy-list-grid,
.logs-list {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 20px !important;
    background: transparent !important;
    min-height: 100vh;
}

/* Таблицы всегда тянутся */
.data-table {
    width: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Оставляем компактными только формы и карточки */
.deal-form,
.template-form,
.strategy-form,
.user-form,
.deal-detail,
.strategy-detail,
.template-detail,
.user-detail {
    max-width: 560px !important;
    margin: 40px auto 24px auto !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 20px #0006 !important;
    background: #23262F !important;
    padding: 36px 32px 28px 32px !important;
}

/* ===== СТИЛИ БЭКТЕСТА ===== */

/* Контейнер бэктеста */
.backtest-container {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    background: transparent;
    color: #EAECEF;
    min-height: 100vh;
    margin: 0;
    position: relative;
}

/* Общие стили */
.backtest-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, #F0B90B 0%, #F8D90F 100%);
    color: #181A20;
    border-radius: 10px;
    margin-top: 0;
}

.backtest-header h2 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.backtest-header p {
    margin: 0;
    opacity: 0.8;
}

/* Форма */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #EAECEF;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #393c45;
    border-radius: 8px;
    background: #1e2026;
    color: #EAECEF;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #F0B90B;
    box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.2);
}

.form-control-file {
    background: transparent;
    border: 2px dashed #393c45;
    padding: 2rem;
    text-align: center;
    color: #EAECEF;
}

.form-control-file:hover {
    border-color: #F0B90B;
}

.form-text {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Карточки результатов - ИСПРАВЛЕНО */
.card {
    background: #23262F !important;
    color: #EAECEF !important;
    border: 1px solid #393c45 !important;
    border-radius: 15px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.card-header {
    background: linear-gradient(135deg, #1e2026 0%, #23262F 100%) !important;
    border-bottom: 1px solid #393c45;
    padding: 1rem 1.5rem;
    color: #EAECEF !important;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    color: #F0B90B;
}

.card-body {
    padding: 1.5rem;
    background: #23262F !important;
    color: #EAECEF !important;
}

/* Метрики */
.metric-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 0;
}

.metric-item {
    text-align: center;
    padding: 1rem;
    background: #1e2026 !important;
    color: #EAECEF !important;
    border-radius: 10px;
    border: 1px solid #393c45;
    transition: all 0.2s ease;
}

.metric-item:hover {
    background: #2a2d36 !important;
    border-color: #F0B90B;
}

.metric-label {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #EAECEF !important;
}

.metric-value.text-success {
    color: #38d996 !important;
}

.metric-value.text-danger {
    color: #ff6b6b !important;
}

/* Заголовок результатов */
.results-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #393c45;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-header h3 {
    margin-bottom: 1rem;
    color: #F0B90B;
}

.results-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.results-meta .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #393c45;
    color: #EAECEF;
}

/* Таблица сделок */
.trades-table {
    font-size: 0.9rem;
    background: #1e2026 !important;
    color: #EAECEF !important;
    border-radius: 10px;
    overflow: hidden;
}

.trades-table th {
    background: #23262F !important;
    border-bottom: 1px solid #393c45;
    font-weight: 600;
    color: #F0B90B !important;
    padding: 1rem 0.75rem;
}

.trades-table td {
    vertical-align: middle;
    padding: 0.75rem;
    border-bottom: 1px solid #393c45;
    color: #EAECEF !important;
}

.trades-table tbody tr:hover {
    background: #2a2d36 !important;
}

/* Кнопка запуска */
#runBacktestBtn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    background: linear-gradient(90deg, #F8D90F 0%, #F0B90B 100%);
    color: #181A20;
    border: none;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(240, 185, 11, 0.3);
    transition: all 0.3s ease;
}

#runBacktestBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 185, 11, 0.4);
    background: linear-gradient(90deg, #F0B90B 0%, #F8D90F 100%);
}

/* Модальное окно загрузки */
.modal-content {
    background: #23262F !important;
    color: #EAECEF !important;
    border: 1px solid #393c45;
}

.modal-header {
    border-bottom: 1px solid #393c45;
    background: #1e2026 !important;
    color: #EAECEF !important;
}

.modal-footer {
    border-top: 1px solid #393c45;
    background: #1e2026 !important;
    color: #EAECEF !important;
}

.loading-spinner {
    margin: 2rem 0;
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    color: #F0B90B;
}

/* Адаптивность */
@media (max-width: 768px) {
    .backtest-container {
        padding: 10px;
    }
    
    .metric-row {
        grid-template-columns: 1fr;
    }
    
    .results-meta {
        flex-direction: column;
        align-items: center;
    }
    
    .backtest-header {
        padding: 1rem;
    }
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Улучшенные бейджи */
.badge-success {
    background: linear-gradient(135deg, #38d996 0%, #36b37f 100%);
    color: #181A20;
}

.badge-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: #fff;
}

.badge-info {
    background: linear-gradient(135deg, #F0B90B 0%, #F8D90F 100%);
    color: #181A20;
}

.badge-secondary {
    background: linear-gradient(135deg, #393c45 0%, #2a2d36 100%);
    color: #EAECEF;
}

/* Заголовки секций */
h4 {
    color: #F0B90B;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Алерты */
.alert {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #EAECEF !important;
}

.alert-danger {
    background: rgba(255, 107, 107, 0.1) !important;
    border: 1px solid #ff6b6b;
    color: #ff6b6b !important;
}

/* Прогресс бар */
.progress {
    background: #1e2026 !important;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #F8D90F 0%, #F0B90B 100%);
}

/* Переопределение Bootstrap стилей */
.btn-primary {
    background: linear-gradient(90deg, #F8D90F 0%, #F0B90B 100%) !important;
    color: #181A20 !important;
    border: none !important;
    border-radius: 50px !important;
    font-weight: bold !important;
    box-shadow: 0 4px 15px rgba(240, 185, 11, 0.3) !important;
    transition: all 0.3s ease !important;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #F0B90B 0%, #F8D90F 100%) !important;
    color: #181A20 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(240, 185, 11, 0.4) !important;
}

.btn-lg {
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
}

/* Переопределение Bootstrap форм */
.form-control {
    background: #1e2026 !important;
    color: #EAECEF !important;
    border: 1px solid #393c45 !important;
    border-radius: 8px !important;
}

.form-control:focus {
    background: #23262F !important;
    color: #EAECEF !important;
    border-color: #F0B90B !important;
    box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.2) !important;
}

.form-control-file {
    background: transparent !important;
    border: 2px dashed #393c45 !important;
    color: #EAECEF !important;
}

/* Переопределение Bootstrap строк и колонок */
.row {
    margin: 0 !important;
}

.col-md-6, .col-12 {
    padding: 0 15px !important;
}

/* Переопределение Bootstrap модальных окон */
.modal-dialog {
    max-width: 500px !important;
}

.modal-content {
    background: #23262F !important;
    color: #EAECEF !important;
    border: 1px solid #393c45 !important;
    border-radius: 15px !important;
}

.modal-header {
    background: #1e2026 !important;
    color: #EAECEF !important;
    border-bottom: 1px solid #393c45 !important;
    border-radius: 15px 15px 0 0 !important;
}

.modal-body {
    background: #23262F !important;
    color: #EAECEF !important;
    padding: 2rem !important;
}

.modal-footer {
    background: #1e2026 !important;
    color: #EAECEF !important;
    border-top: 1px solid #393c45 !important;
    border-radius: 0 0 15px 15px !important;
}

/* Переопределение Bootstrap бейджей */
.badge {
    border-radius: 20px !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
}

.badge-info {
    background: linear-gradient(135deg, #F0B90B 0%, #F8D90F 100%) !important;
    color: #181A20 !important;
}

.badge-secondary {
    background: linear-gradient(135deg, #393c45 0%, #2a2d36 100%) !important;
    color: #EAECEF !important;
}

/* Переопределение Bootstrap алертов */
.alert {
    border-radius: 8px !important;
    border: 1px solid !important;
}

.alert-danger {
    background: rgba(255, 107, 107, 0.1) !important;
    border-color: #ff6b6b !important;
    color: #ff6b6b !important;
}

/* Переопределение Bootstrap прогресс баров */
.progress {
    background: #1e2026 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

.progress-bar {
    background: linear-gradient(90deg, #F8D90F 0%, #F0B90B 100%) !important;
}

/* Дополнительные стили для улучшения отображения */
.text-center {
    text-align: center !important;
}

.text-muted {
    color: #9ca3af !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Стили для иконок */
.fas {
    margin-right: 0.5rem;
}

/* Улучшенные стили для метрик */
.metric-item {
    background: #1e2026 !important;
    color: #EAECEF !important;
    border: 1px solid #393c45 !important;
    border-radius: 10px !important;
    padding: 1rem !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
}

.metric-item:hover {
    background: #2a2d36 !important;
    border-color: #F0B90B !important;
    transform: translateY(-2px) !important;
}

.metric-label {
    color: #9ca3af !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
}

.metric-value {
    color: #EAECEF !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
}

.metric-value.text-success {
    color: #38d996 !important;
}

.metric-value.text-danger {
    color: #ff6b6b !important;
}

/* Стили для заголовков секций */
h4 {
    color: #F0B90B !important;
    margin-bottom: 1.5rem !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
}

/* Стили для результатов */
.results-section {
    margin-top: 3rem !important;
    padding-top: 2rem !important;
    border-top: 2px solid #393c45 !important;
}

.results-header {
    text-align: center !important;
    margin-bottom: 2rem !important;
}

.results-header h3 {
    color: #F0B90B !important;
    margin-bottom: 1rem !important;
    font-weight: 600 !important;
}

.results-meta {
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
    margin-top: 1rem !important;
}

/* ПРИНУДИТЕЛЬНОЕ ПЕРЕОПРЕДЕЛЕНИЕ ВСЕХ BOOTSTRAP СТИЛЕЙ */
.card, .card *, .card-header, .card-body, .card-title, .card-header h5 {
    background: #23262F !important;
    color: #EAECEF !important;
    border-color: #393c45 !important;
}

.card {
    background: #23262F !important;
    color: #EAECEF !important;
    border: 1px solid #393c45 !important;
    border-radius: 15px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    margin-bottom: 1.5rem !important;
    overflow: hidden !important;
}

.card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
}

.card-header {
    background: linear-gradient(135deg, #1e2026 0%, #23262F 100%) !important;
    color: #EAECEF !important;
    border-bottom: 1px solid #393c45 !important;
    padding: 1rem 1.5rem !important;
}

.card-header h5, .card-title {
    color: #F0B90B !important;
    margin: 0 !important;
    font-weight: 600 !important;
}

.card-body {
    background: #23262F !important;
    color: #EAECEF !important;
    padding: 1.5rem !important;
}

/* Принудительное переопределение всех возможных белых фонов */
* {
    background-color: inherit !important;
}

.card, .card-header, .card-body, .modal-content, .modal-header, .modal-body, .modal-footer {
    background: #23262F !important;
    color: #EAECEF !important;
}

/* Дополнительные стили для устранения белых окон */
.result-card {
    background: #23262F !important;
    color: #EAECEF !important;
    border: 1px solid #393c45 !important;
    border-radius: 15px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

.result-card .card-header {
    background: linear-gradient(135deg, #1e2026 0%, #23262F 100%) !important;
    color: #EAECEF !important;
    border-bottom: 1px solid #393c45 !important;
}

.result-card .card-body {
    background: #23262F !important;
    color: #EAECEF !important;
}

/* Принудительное переопределение для всех элементов с классом card */
[class*="card"] {
    background: #23262F !important;
    color: #EAECEF !important;
}

/* Стили для метрик внутри карточек */
.metric-item {
    background: #1e2026 !important;
    color: #EAECEF !important;
    border: 1px solid #393c45 !important;
    border-radius: 10px !important;
    padding: 1rem !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
}

.metric-item:hover {
    background: #2a2d36 !important;
    border-color: #F0B90B !important;
    transform: translateY(-2px) !important;
}

.metric-label {
    color: #9ca3af !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
}

.metric-value {
    color: #EAECEF !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
}

.metric-value.text-success {
    color: #38d996 !important;
}

.metric-value.text-danger {
    color: #ff6b6b !important;
}

/* Принудительное переопределение для всех возможных белых элементов */
.white, .bg-white, .bg-light, [class*="bg-"] {
    background: #23262F !important;
    color: #EAECEF !important;
}

/* Стили для всех возможных карточек */
.card, .card-header, .card-body, .card-title, .card-text, .card-footer {
    background: #23262F !important;
    color: #EAECEF !important;
    border-color: #393c45 !important;
}

/* ===== СОВРЕМЕННЫЕ СТИЛИ И АНИМАЦИИ ===== */

/* Анимации появления элементов */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(240, 185, 11, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(240, 185, 11, 0.6);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Применение анимаций к элементам */
.main > * {
    animation: fadeInUp 0.6s ease-out;
}

.sidebar {
    animation: fadeInLeft 0.8s ease-out;
}

.card, .strategy-card, .deal-form, .template-form, .strategy-form, .user-form {
    animation: fadeInUp 0.6s ease-out;
}

.data-table {
    animation: fadeInUp 0.8s ease-out;
}

/* Современные стили для кнопок */
.button, .button-small, .button-th-green, .btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.button::before, .button-small::before, .button-th-green::before, .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.button:hover::before, .button-small:hover::before, .button-th-green:hover::before, .btn-primary:hover::before {
    left: 100%;
}

.button:hover, .button-small:hover, .button-th-green:hover, .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(240, 185, 11, 0.4);
}

/* Современные стили для карточек */
.card, .strategy-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(57, 60, 69, 0.3);
}

.card::before, .strategy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #F0B90B, #F8D90F, #F0B90B);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before, .strategy-card:hover::before {
    transform: scaleX(1);
}

.card:hover, .strategy-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(240, 185, 11, 0.5);
}

/* Современные стили для форм */
.form-control, input[type="text"], input[type="number"], input[type="email"], select, textarea {
    border-radius: 12px;
    border: 2px solid transparent;
    background: linear-gradient(145deg, #1e2026, #23262F);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-control:focus, input:focus, select:focus, textarea:focus {
    border-color: #F0B90B;
    box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Современные стили для таблиц */
.data-table {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(57, 60, 69, 0.3);
}

.data-table th {
    background: linear-gradient(135deg, #1e2026, #23262F) !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.data-table tr {
    transition: all 0.3s ease;
}

.data-table tr:hover {
    background: linear-gradient(135deg, #2a2d36, #323546) !important;
    transform: scale(1.01);
}

/* Современные стили для сайдбара */
.sidebar {
    background: linear-gradient(180deg, #23262F 0%, #1e2026 100%) !important;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(57, 60, 69, 0.3);
}

.sidebar a {
    position: relative;
    border-radius: 12px;
    margin: 8px 0;
    padding: 12px 16px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.sidebar a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(240, 185, 11, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sidebar a:hover::before {
    transform: translateX(100%);
}

.sidebar a:hover, .sidebar a.active {
    background: linear-gradient(135deg, #1e2026, #2a2d36) !important;
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(240, 185, 11, 0.2);
}

/* Современные стили для метрик */
.metric-item {
    position: relative;
    border-radius: 16px;
    background: linear-gradient(145deg, #1e2026, #23262F) !important;
    border: 1px solid rgba(57, 60, 69, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.metric-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #F0B90B, #F8D90F);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.metric-item:hover::before {
    transform: scaleX(1);
}

.metric-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(240, 185, 11, 0.5);
}

/* Современные стили для бейджей */
.badge {
    border-radius: 25px;
    padding: 8px 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Современные стили для алертов */
.alert {
    border-radius: 16px;
    border: none;
    padding: 16px 20px;
    position: relative;
    overflow: hidden;
    animation: slideInDown 0.5s ease-out;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #F0B90B, #F8D90F);
}

/* Современные стили для прогресс баров */
.progress {
    border-radius: 15px;
    height: 12px;
    background: linear-gradient(145deg, #1e2026, #23262F);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.progress-bar {
    border-radius: 15px;
    background: linear-gradient(90deg, #F8D90F, #F0B90B, #F8D90F);
    background-size: 200% 100%;
    animation: gradientShift 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(240, 185, 11, 0.3);
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Современные стили для модальных окон */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.4s ease-out;
}

.modal-header {
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #1e2026, #23262F) !important;
    border-bottom: 1px solid rgba(57, 60, 69, 0.3);
}

.modal-footer {
    border-radius: 0 0 20px 20px;
    background: linear-gradient(135deg, #1e2026, #23262F) !important;
    border-top: 1px solid rgba(57, 60, 69, 0.3);
}

/* Современные стили для пагинации */
.pagination {
    gap: 8px;
}

.page-link {
    border-radius: 12px;
    border: 1px solid rgba(57, 60, 69, 0.3);
    background: linear-gradient(145deg, #1e2026, #23262F);
    color: #EAECEF;
    transition: all 0.3s ease;
    font-weight: 600;
}

.page-link:hover {
    background: linear-gradient(145deg, #2a2d36, #323546);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 185, 11, 0.2);
    border-color: rgba(240, 185, 11, 0.5);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #F0B90B, #F8D90F);
    color: #181A20;
    border-color: #F0B90B;
    box-shadow: 0 5px 15px rgba(240, 185, 11, 0.3);
}

/* Современные стили для навигации */
.nav-tabs {
    border-bottom: 2px solid rgba(57, 60, 69, 0.3);
    gap: 8px;
}

.nav-tabs .nav-link {
    border-radius: 12px 12px 0 0;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.nav-tabs .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #F0B90B, #F8D90F);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-tabs .nav-link:hover::before,
.nav-tabs .nav-link.active::before {
    transform: scaleX(1);
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link.active {
    color: #F0B90B;
    background: linear-gradient(135deg, #1e2026, #23262F);
}

/* Современные стили для списков */
.list-group-item {
    border-radius: 12px;
    border: 1px solid rgba(57, 60, 69, 0.3);
    background: linear-gradient(145deg, #1e2026, #23262F);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(240, 185, 11, 0.3);
}

/* Современные стили для заголовков */
h1, h2, h3, h4, h5, h6 {
    position: relative;
    margin-bottom: 1.5rem;
}

h1::after, h2::after, h3::after, h4::after, h5::after, h6::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #F0B90B, #F8D90F);
    border-radius: 2px;
}

/* Современные стили для иконок */
.fas, .fa, .icon {
    transition: all 0.3s ease;
}

.card:hover .fas,
.strategy-card:hover .fas,
.button:hover .fas {
    transform: scale(1.2);
    color: #F0B90B;
}

/* Современные стили для ссылок */
a {
    position: relative;
    transition: all 0.3s ease;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #F0B90B, #F8D90F);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* Современные стили для скроллбара */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1e2026;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #F0B90B, #F8D90F);
    border-radius: 6px;
    border: 2px solid #1e2026;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #F8D90F, #F0B90B);
}

/* Современные стили для загрузки */
.loading-spinner {
    animation: pulse 2s ease-in-out infinite;
}

/* Современные стили для уведомлений */
.toast {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideInDown 0.5s ease-out;
}

/* Современные стили для выпадающих меню */
.dropdown-menu {
    border-radius: 16px;
    border: 1px solid rgba(57, 60, 69, 0.3);
    background: linear-gradient(145deg, #23262F, #1e2026);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.3s ease-out;
}

.dropdown-item {
    border-radius: 8px;
    margin: 4px 8px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #2a2d36, #323546);
    transform: translateX(5px);
}

/* Современные стили для тултипов */
.tooltip {
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.tooltip-inner {
    background: linear-gradient(135deg, #23262F, #1e2026);
    border: 1px solid rgba(57, 60, 69, 0.3);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .card, .strategy-card {
        margin-bottom: 20px;
    }
    
    .sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -100%;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main {
        width: 100%;
        margin-left: 0;
    }
    
    .metric-row {
        grid-template-columns: 1fr;
    }
}

/* Темная тема для всех элементов */
* {
    scrollbar-color: #F0B90B #1e2026;
}

/* Дополнительные эффекты для интерактивных элементов */
.interactive {
    cursor: pointer;
    transition: all 0.3s ease;
}

.interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(240, 185, 11, 0.2);
}

/* Стили для анимации загрузки */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.loading {
    background: linear-gradient(90deg, #1e2026 25%, #2a2d36 50%, #1e2026 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* ===== СТИЛИ ГЛАВНОЙ СТРАНИЦЫ ===== */

/* Hero секция */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4rem;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    animation: fadeInLeft 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #F0B90B 0%, #F8D90F 50%, #38d996 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

.hero-description {
    font-size: 1.2rem;
    color: #9ca3af;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(145deg, #1e2026, #23262F);
    border-radius: 16px;
    border: 1px solid rgba(57, 60, 69, 0.3);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(240, 185, 11, 0.5);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #F0B90B;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero визуальная часть */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 400px;
    animation: fadeInRight 1s ease-out;
}

.floating-card {
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #23262F, #1e2026);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #F0B90B;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(57, 60, 69, 0.3);
    animation: float 3s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    top: 50%;
    right: 20%;
    animation-delay: 1s;
}

.floating-card:nth-child(3) {
    bottom: 20%;
    left: 50%;
    animation-delay: 2s;
}

/* Сетка функций */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-card {
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(57, 60, 69, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #F0B90B, #F8D90F, #F0B90B);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(240, 185, 11, 0.5);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #F0B90B, #F8D90F);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #181A20;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #EAECEF;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.feature-list li:hover {
    color: #EAECEF;
    transform: translateX(5px);
}

.feature-list li i {
    margin-right: 0.8rem;
    color: #F0B90B;
    font-size: 0.9rem;
}

.feature-list li a {
    color: #F0B90B;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.feature-list li a:hover {
    color: #F8D90F;
    text-decoration: underline;
}

/* Быстрые действия */
.quick-actions {
    margin-bottom: 4rem;
    text-align: center;
}

.quick-actions h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #EAECEF;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 20px;
    border: 1px solid rgba(57, 60, 69, 0.3);
    color: #EAECEF;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(240, 185, 11, 0.1), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(240, 185, 11, 0.5);
    color: #F0B90B;
}

.action-btn i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #F0B90B;
    transition: all 0.3s ease;
}

.action-btn:hover i {
    transform: scale(1.2);
}

.action-btn span {
    font-weight: 600;
    font-size: 1rem;
}

/* Футер */
.footer-section {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(57, 60, 69, 0.3);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-text {
    color: #9ca3af;
    font-size: 1rem;
    margin: 0;
}

.footer-text i {
    color: #F0B90B;
    margin-right: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 12px;
    border: 1px solid rgba(57, 60, 69, 0.3);
    color: #EAECEF;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(240, 185, 11, 0.5);
    color: #F0B90B;
}

.social-link i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Адаптивность для главной страницы */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .hero-visual {
        height: 300px;
    }
    
    .floating-card {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Дополнительные анимации для главной страницы */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Стили для старых элементов главной страницы (для совместимости) */
.main-welcome {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.main-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.main-feature-card {
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(57, 60, 69, 0.3);
    transition: all 0.3s ease;
}

.main-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(240, 185, 11, 0.5);
}

.main-feature-card h3 {
    color: #F0B90B;
    margin-bottom: 1rem;
    font-weight: 700;
}

.main-feature-card ul {
    list-style: none;
    padding: 0;
}

.main-feature-card li {
    margin-bottom: 0.5rem;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.main-feature-card li:hover {
    color: #EAECEF;
    transform: translateX(5px);
}

.main-footer {
    text-align: center;
    color: #9ca3af;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(57, 60, 69, 0.3);
}

/* ===== СТИЛИ ТОРГОВОГО ХАБА ===== */

/* Заголовок торгового хаба */
.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 20px;
    border: 1px solid rgba(57, 60, 69, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

.trade-header h2 {
    margin: 0;
    color: #EAECEF;
    font-weight: 700;
}

.trade-header h2 i {
    color: #F0B90B;
    margin-right: 0.5rem;
}

.trade-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-weight: 600;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.active {
    background: #38d996;
    box-shadow: 0 0 10px rgba(56, 217, 150, 0.5);
}

.status-dot.inactive {
    background: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

/* Секция баланса */
.balance-section {
    margin-bottom: 2rem;
}

.balance-card {
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(57, 60, 69, 0.3);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out;
}

.balance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(240, 185, 11, 0.5);
}

.balance-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.balance-header i {
    color: #F0B90B;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.balance-header h3 {
    margin: 0;
    color: #EAECEF;
    font-weight: 700;
}

.balance-value {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #F0B90B;
}

.balance-currency {
    font-size: 1.2rem;
    color: #9ca3af;
    font-weight: 600;
}

.refresh-btn {
    background: linear-gradient(135deg, #F0B90B, #F8D90F);
    border: none;
    border-radius: 12px;
    padding: 0.8rem;
    color: #181A20;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.refresh-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(240, 185, 11, 0.3);
}

.balance-placeholder {
    text-align: center;
}

.request-btn {
    background: linear-gradient(135deg, #38d996, #36b37f);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    color: #181A20;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-bottom: 1rem;
}

.request-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 217, 150, 0.3);
}

.balance-note {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Секция API ключа */
.apikey-section {
    margin-bottom: 2rem;
}

.apikey-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 16px;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out;
}

.apikey-card.active {
    background: linear-gradient(145deg, rgba(56, 217, 150, 0.1), rgba(54, 179, 127, 0.1));
    border: 1px solid rgba(56, 217, 150, 0.3);
}

.apikey-card.inactive {
    background: linear-gradient(145deg, rgba(255, 107, 107, 0.1), rgba(238, 90, 82, 0.1));
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.apikey-card i {
    font-size: 1.5rem;
}

.apikey-card.active i {
    color: #38d996;
}

.apikey-card.inactive i {
    color: #ff6b6b;
}

.apikey-card span {
    flex: 1;
    color: #EAECEF;
    font-weight: 600;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-badge.active {
    background: linear-gradient(135deg, #38d996, #36b37f);
    color: #181A20;
}

.status-badge.inactive {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: #fff;
}

/* Секция шаблона */
.template-section {
    margin-bottom: 2rem;
}

.template-section h3 {
    color: #EAECEF;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.template-section h3 i {
    color: #F0B90B;
    margin-right: 0.5rem;
}

.template-card {
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(57, 60, 69, 0.3);
    transition: all 0.3s ease;
    animation: fadeInUp 1.2s ease-out;
}

.template-card.active {
    border-color: rgba(56, 217, 150, 0.3);
}

.template-card.inactive {
    text-align: center;
    color: #9ca3af;
}

.template-card.inactive i {
    font-size: 3rem;
    color: #ff6b6b;
    margin-bottom: 1rem;
    display: block;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.template-header h4 {
    margin: 0;
    color: #EAECEF;
    font-weight: 700;
    font-size: 1.5rem;
}

.template-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.template-badge.active {
    background: linear-gradient(135deg, #38d996, #36b37f);
    color: #181A20;
}

/* Детали шаблона */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-label {
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-value {
    color: #EAECEF;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Параметры стратегии */
.template-parameters {
    margin-bottom: 2rem;
}

.template-parameters h5 {
    color: #F0B90B;
    margin-bottom: 1rem;
    font-weight: 700;
}

.parameters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.parameter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: rgba(30, 32, 38, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(57, 60, 69, 0.3);
}

.parameter-key {
    color: #9ca3af;
    font-weight: 600;
}

.parameter-value {
    color: #EAECEF;
    font-weight: 700;
}

/* Баланс Binance */
.binance-balance {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(57, 60, 69, 0.3);
}

.balance-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.balance-label {
    color: #9ca3af;
    font-weight: 600;
}

.profit-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.profit-label {
    color: #9ca3af;
    font-weight: 600;
}

.profit-positive {
    color: #38d996;
    font-weight: 700;
}

.profit-negative {
    color: #ff6b6b;
    font-weight: 700;
}

.profit-zero {
    color: #9ca3af;
    font-weight: 700;
}

.initial-balance {
    color: #9ca3af;
    font-size: 0.9rem;
}

.fix-balance-btn {
    background: linear-gradient(135deg, #38d996, #36b37f);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    color: #181A20;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.fix-balance-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 217, 150, 0.3);
}

/* Управление ботом */
.bot-control-section {
    margin-bottom: 2rem;
}

.bot-control-section h3 {
    color: #EAECEF;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.bot-control-section h3 i {
    color: #F0B90B;
    margin-right: 0.5rem;
}

.bot-control-card {
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(57, 60, 69, 0.3);
    transition: all 0.3s ease;
    animation: fadeInUp 1.4s ease-out;
}

.bot-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.status-label {
    color: #9ca3af;
    font-weight: 600;
}

.status-value {
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-value.active {
    background: linear-gradient(135deg, #38d996, #36b37f);
    color: #181A20;
}

.status-value.inactive {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: #fff;
}

.start-btn {
    background: linear-gradient(135deg, #38d996, #36b37f);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    color: #181A20;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 217, 150, 0.3);
}

.stop-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.stop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
}

/* Все шаблоны */
.templates-section {
    margin-bottom: 2rem;
}

.templates-section h3 {
    color: #EAECEF;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.templates-section h3 i {
    color: #F0B90B;
    margin-right: 0.5rem;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.template-item {
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(57, 60, 69, 0.3);
    transition: all 0.3s ease;
    animation: fadeInUp 1.6s ease-out;
}

.template-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(240, 185, 11, 0.5);
}

.template-item.active {
    border-color: rgba(56, 217, 150, 0.5);
}

.template-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.template-item-header h4 {
    margin: 0;
    color: #EAECEF;
    font-weight: 700;
}

.template-symbol {
    color: #9ca3af;
    font-size: 0.9rem;
}

.active-badge {
    background: linear-gradient(135deg, #38d996, #36b37f);
    color: #181A20;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.activate-btn {
    background: linear-gradient(135deg, #F0B90B, #F8D90F);
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    color: #181A20;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.8rem;
}

.activate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(240, 185, 11, 0.3);
}

.template-item-details {
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #9ca3af;
    font-size: 0.9rem;
}

.template-profit {
    padding-top: 1rem;
    border-top: 1px solid rgba(57, 60, 69, 0.3);
}

.profit-label {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-right: 1rem;
}

.profit-value {
    font-weight: 700;
}

.no-templates {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
}

.no-templates i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Последняя сделка */
.last-deal-section {
    margin-bottom: 2rem;
}

.last-deal-section h3 {
    color: #EAECEF;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.last-deal-section h3 i {
    color: #F0B90B;
    margin-right: 0.5rem;
}

.deal-card {
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(57, 60, 69, 0.3);
    transition: all 0.3s ease;
    animation: fadeInUp 1.8s ease-out;
}

.deal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(240, 185, 11, 0.5);
}

.deal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.deal-symbol {
    color: #EAECEF;
    font-weight: 700;
    font-size: 1.2rem;
}

.deal-side {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.deal-side.buy {
    background: linear-gradient(135deg, #38d996, #36b37f);
    color: #181A20;
}

.deal-side.sell {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: #fff;
}

.deal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.deal-price, .deal-pnl {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.price-label, .pnl-label {
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 600;
}

.price-value, .pnl-value {
    color: #EAECEF;
    font-weight: 700;
    font-size: 1.1rem;
}

.no-deals {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
}

.no-deals i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Быстрые ссылки */
.quick-links-section {
    margin-bottom: 2rem;
}

.quick-links-section h3 {
    color: #EAECEF;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.quick-links-section h3 i {
    color: #F0B90B;
    margin-right: 0.5rem;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 16px;
    border: 1px solid rgba(57, 60, 69, 0.3);
    color: #EAECEF;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: fadeInUp 2s ease-out;
}

.quick-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(240, 185, 11, 0.5);
    color: #F0B90B;
}

.quick-link i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #F0B90B;
    transition: all 0.3s ease;
}

.quick-link:hover i {
    transform: scale(1.2);
}

.quick-link span {
    font-weight: 600;
    text-align: center;
}

/* Логи */
.logs-section {
    margin-bottom: 2rem;
}

.logs-section h3 {
    color: #EAECEF;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.logs-section h3 i {
    color: #F0B90B;
    margin-right: 0.5rem;
}

.logs-container {
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 16px;
    border: 1px solid rgba(57, 60, 69, 0.3);
    overflow: hidden;
    animation: fadeInUp 2.2s ease-out;
}

.trade-hub-logs {
    max-height: 300px;
    overflow: auto;
    background: transparent;
    color: #EAECEF;
    padding: 1.5rem;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    margin: 0;
    border: none;
}

/* Адаптивность для торгового хаба */
@media (max-width: 768px) {
    .trade-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .parameters-grid {
        grid-template-columns: 1fr;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
    
    .deal-details {
        grid-template-columns: 1fr;
    }
    
    .bot-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Стили для модального окна загрузки */
#loadingModal {
    z-index: 9999;
}

#loadingModal .modal-content {
    background: linear-gradient(145deg, #23262F, #1e2026);
    border: 1px solid rgba(57, 60, 69, 0.3);
    border-radius: 16px;
    color: #EAECEF;
}

#loadingModal .modal-header {
    border-bottom: 1px solid rgba(57, 60, 69, 0.3);
    background: linear-gradient(135deg, #2a2d36, #1e2026);
}

#loadingModal .modal-title {
    color: #F0B90B;
    font-weight: 700;
}

#loadingModal .modal-body {
    padding: 2rem;
}

.loading-spinner {
    margin-bottom: 1rem;
}

.loading-spinner .spinner-border {
    color: #F0B90B;
    width: 4rem;
    height: 4rem;
}

#loadingModal h5 {
    color: #EAECEF;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#loadingModal p {
    color: #9CA3AF;
    margin-bottom: 1.5rem;
}

#loadingModal .progress {
    background: rgba(57, 60, 69, 0.3);
    border-radius: 10px;
    height: 12px;
}

#loadingModal .progress-bar {
    background: linear-gradient(90deg, #F0B90B, #F7931A);
    border-radius: 10px;
}

/* Стили для этапов загрузки */
.loading-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 0 1rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: rgba(57, 60, 69, 0.5);
    z-index: 1;
}

.step.active {
    opacity: 1;
    transform: scale(1.1);
}

.step.active i {
    color: #F0B90B !important;
    animation: pulse 1.5s infinite;
}

.step.completed {
    opacity: 1;
}

.step.completed i {
    color: #38d996 !important;
}

.step.completed:not(:last-child)::after {
    background: #38d996;
}

.step i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step span {
    font-size: 0.8rem;
    color: #9CA3AF;
    font-weight: 500;
}

/* Анимация пульсации для активного этапа */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Адаптивность для этапов */
@media (max-width: 768px) {
    .loading-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
}

/* Backdrop для модального окна */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9998;
}

/* Класс для блокировки прокрутки */
body.modal-open {
    overflow: hidden;
}

/* ===== УНИВЕРСАЛЬНЫЕ СТИЛИ ДЛЯ ПАРАМЕТРОВ СТРАТЕГИЙ ===== */

/* Стили для параметров стратегий в процентах */
.strategy-params ul {
    font-size: 1em;
    margin: 0;
    padding-left: 18px;
}

.strategy-params li {
    margin-bottom: 3px;
}

/* Компактное отображение параметров для всех стратегий */
.novichok-params-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.novichok-params-compact div {
    background: rgba(30, 32, 38, 0.5);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(57, 60, 69, 0.3);
    color: #EAECEF;
    font-weight: 500;
}

/* Красивое отображение параметров в карточках */
.novichok-params {
    background: rgba(30, 32, 38, 0.5);
    border: 1px solid rgba(57, 60, 69, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem 0;
}

.param-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(57, 60, 69, 0.2);
}

.param-row:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.param-row span {
    flex: 1;
    text-align: left;
    color: #EAECEF;
}

.param-row span:first-child {
    margin-right: 1rem;
    font-weight: 600;
    color: #F0B90B;
}

.param-row span b {
    color: #F0B90B;
    font-weight: 600;
}

/* Стили для форм с параметрами стратегий */
.parameter-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid rgba(57, 60, 69, 0.3);
    border-radius: 12px;
    background: rgba(30, 32, 38, 0.3);
}

.parameter-group label {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    color: #EAECEF;
}

.parameter-group input[type="number"],
.parameter-group input[type="text"] {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(57, 60, 69, 0.5);
    background: rgba(30, 32, 38, 0.8);
    color: #EAECEF;
    font-size: 0.9rem;
}

.parameter-group input[type="number"]:focus,
.parameter-group input[type="text"]:focus {
    border-color: #F0B90B;
    box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.2);
    background: rgba(42, 45, 54, 0.8);
}

.parameter-group small {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Стили для подсказок о формате процентов */
.percentage-hint {
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.1), rgba(248, 210, 15, 0.05));
    border: 1px solid rgba(240, 185, 11, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #F0B90B;
    font-style: italic;
}

.percentage-hint strong {
    color: #F8D90F;
}

/* Адаптивность для параметров стратегий */
@media (max-width: 768px) {
    .novichok-params-compact {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .parameter-group {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .param-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .param-row span:first-child {
        margin-right: 0;
    }
}

/* Стили для всех типов стратегий */
.strategy-params-any {
    background: rgba(30, 32, 38, 0.5);
    border: 1px solid rgba(57, 60, 69, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem 0;
}

.strategy-params-any h4 {
    color: #F0B90B;
    margin-bottom: 1rem;
    font-weight: 600;
}

.strategy-params-any .params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.strategy-params-any .param-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(42, 45, 54, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(57, 60, 69, 0.2);
}

.strategy-params-any .param-label {
    color: #9ca3af;
    font-weight: 600;
    font-size: 0.9rem;
}

.strategy-params-any .param-value {
    color: #EAECEF;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Специальные стили для процентных значений */
.percentage-value {
    color: #38d996;
    font-weight: 700;
}

.percentage-value::after {
    content: '%';
    margin-left: 0.25rem;
    color: #9ca3af;
    font-weight: 400;
}

/* Анимации для параметров */
@keyframes highlightPercentage {
    0% { background-color: rgba(56, 217, 150, 0.1); }
    50% { background-color: rgba(56, 217, 150, 0.2); }
    100% { background-color: transparent; }
}

.percentage-value {
    animation: highlightPercentage 2s ease-in-out;
}

/* Стили для всех форм стратегий */
.strategy-form {
    max-width: 100%;
    margin: 40px auto;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: linear-gradient(145deg, #23262F, #1e2026);
    border: 1px solid rgba(57, 60, 69, 0.3);
    padding: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.strategy-form h2 {
    color: #EAECEF;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.strategy-form h3 {
    color: #F0B90B;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Универсальные стили для всех форм создания стратегий */
.strategy-create-form {
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(57, 60, 69, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

.strategy-create-form h2 {
    color: #EAECEF;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

/* Стили для всех типов форм стратегий */
.template-form,
.user-form,
.deal-form {
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(57, 60, 69, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

.template-form h2,
.user-form h2,
.deal-form h2 {
    color: #EAECEF;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

/* Стили для всех карточек стратегий */
.strategy-detail,
.template-detail,
.user-detail,
.deal-detail {
    background: linear-gradient(145deg, #23262F, #1e2026);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(57, 60, 69, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

.strategy-detail h2,
.template-detail h2,
.user-detail h2,
.deal-detail h2 {
    color: #EAECEF;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

/* Универсальные стили для всех списков */
.strategy-list,
.template-list,
.user-list,
.deal-list {
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

.strategy-list h2,
.template-list h2,
.user-list h2,
.deal-list h2 {
    color: #EAECEF;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

/* Стили для всех кнопок действий */
.strategy-actions,
.template-actions,
.user-actions,
.deal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Адаптивность для всех форм и карточек */
@media (max-width: 768px) {
    .strategy-form,
    .strategy-create-form,
    .template-form,
    .user-form,
    .deal-form,
    .strategy-detail,
    .template-detail,
    .user-detail,
    .deal-detail {
        margin: 20px;
        padding: 1.5rem;
    }

    .parameter-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .novichok-params-compact {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .strategy-params-any .params-grid {
        grid-template-columns: 1fr;
    }

    .strategy-actions,
    .template-actions,
    .user-actions,
    .deal-actions {
        flex-direction: column;
        align-items: center;
    }
}
