/* =============================================================
   base.css — Shared styles for fyers_v11.8 Market Dashboard
   Used by: all templates via <link rel="stylesheet" href="/static/css/base.css">
   ============================================================= */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --primary:     #2c3e50;
    --secondary:   #34495e;
    --accent:      #3498db;
    --light:       #ecf0f1;
    --success:     #2ecc71;
    --warning:     #f39c12;
    --danger:      #e74c3c;
    --buy:         #27ae60;
    --sell:        #e74c3c;
    --text:        #2c3e50;
    --text-light:  #7f8c8d;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition:  all 0.3s ease;
    --bg:          #f0f2f5;
}

/* ── Reset ─────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* ── Layout ────────────────────────────────────────────────── */
.dashboard { display: flex; min-height: 100vh; }

.main-content {
    flex: 1;
    padding: 25px 30px;
    overflow-x: hidden;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
    width: 250px;
    background: var(--primary);
    color: white;
    padding: 20px 0;
    transition: var(--transition);
    flex-shrink: 0;
    min-height: 100vh;
}

.logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.logo h1 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.logo i { color: var(--accent); }

/* ── Navigation ────────────────────────────────────────────── */
.nav-menu { list-style: none; }

.nav-item { margin-bottom: 3px; }

.nav-link {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    color: var(--light);
    text-decoration: none;
    transition: var(--transition);
    gap: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    border-left-color: var(--accent);
}

.nav-link i { width: 18px; text-align: center; }

/* ── Submenus ──────────────────────────────────────────────── */
.has-submenu { position: relative; }

.submenu-toggle { cursor: pointer; user-select: none; }

.submenu-toggle::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: auto;
    transition: var(--transition);
}

.submenu-toggle.expanded::after { transform: rotate(180deg); }

.submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu.expanded { max-height: 600px; }

.submenu .nav-link {
    padding-left: 45px;
    font-size: 0.85rem;
}

/* ── Page Header ───────────────────────────────────────────── */
.page-header,
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 1.7rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    border: none;
    padding: 9px 18px;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: var(--transition);
}

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #2980b9; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #27ae60; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #c0392b; }

/* alias — old .refresh-btn class compatibility */
.refresh-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: var(--transition);
}
.refresh-btn:hover { background: #2980b9; }

/* ── Cards (stat / summary) ────────────────────────────────── */
.stats-grid,
.summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card,
.sum-card {
    background: white;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--accent);
}

.stat-card.positive, .sum-card.pos { border-left-color: var(--buy); }
.stat-card.negative, .sum-card.neg { border-left-color: var(--sell); }

.stat-card h3,
.sum-label {
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 5px;
}

.stat-card .value,
.sum-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

/* ── Color Classes ─────────────────────────────────────────── */
.up,  .stat-value.up  { color: var(--buy) !important;  font-weight: 700; }
.down,.stat-value.down{ color: var(--sell) !important; font-weight: 700; }
.neutral              { color: var(--text-light); }

/* ── Tables ────────────────────────────────────────────────── */
.table-container,
.table-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    position: relative;
}

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

th {
    background: var(--primary);
    color: white;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

td {
    padding: 11px 14px;
    border-bottom: 1px solid #eef0f3;
    white-space: nowrap;
}

tr:hover td { background: #f5f8ff; }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 0.73rem;
    font-weight: 700;
}

.badge-buy        { background: #e8f8f0; color: var(--buy); }
.badge-sell       { background: #fdf0f0; color: var(--sell); }
.badge-filled     { background: #d4edda; color: #155724; }
.badge-rejected   { background: #f8d7da; color: #721c24; }
.badge-pending    { background: #fff3cd; color: #856404; }
.badge-cancelled  { background: #e2e3e5; color: #383d41; }
.badge-transit    { background: #cce5ff; color: #004085; }
.badge-intraday   { background: #e3f0ff; color: var(--accent); }
.badge-cnc        { background: #f3e8ff; color: #7c3aed; }
.badge-long-term  { background: #d4edda; color: #155724; }
.badge-short-term { background: #fff3cd; color: #856404; }

/* ── Loading Overlay / Spinner ─────────────────────────────── */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    z-index: 10;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
    color: #ddd;
}

/* ── Tab Bar ───────────────────────────────────────────────── */
.tab-bar {
    display: flex;
    background: white;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.07);
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 13px 20px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover  { background: #f8f9fa; color: var(--primary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); background: #f0f7ff; }

.tab-badge {
    background: var(--accent);
    color: white;
    border-radius: 12px;
    padding: 1px 8px;
    font-size: 0.72rem;
    font-weight: 700;
}

/* ── Table Toolbar ─────────────────────────────────────────── */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid #eee;
    background: #fafbfc;
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar-info { font-size: 0.82rem; color: var(--text-light); }

/* ── Toast Notification ────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: #2c3e50;
    color: white;
    padding: 14px 22px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    z-index: 2000;
    display: none;
    animation: fadeIn .3s ease;
}

.toast.success { background: var(--buy); }
.toast.error   { background: var(--sell); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Progress Bar ──────────────────────────────────────────── */
.progress-bar {
    width: 60px;
    background: #e9ecef;
    border-radius: 4px;
    height: 10px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    overflow: hidden;
}

.progress-fill {
    background: var(--accent);
    height: 100%;
    border-radius: 4px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .dashboard { flex-direction: column; }
    .sidebar   { width: 100%; min-height: auto; }
    .summary-strip, .stats-grid { grid-template-columns: 1fr 1fr; }
    .main-content { padding: 16px; }
}

/* ================= RECOVERED COMPONENT STYLES ================= */

/* ================= WATCHLIST & SYMBOLS PAGE SPECIFIC STYLES ================= */

/* ================= WATCHLIST & SYMBOLS PAGE SPECIFIC STYLES ================= */

/* Watchlist Manager Modal Styles */
.watchlist-manager-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
    gap: 10px;
}

.watchlist-manager-item:hover {
    background-color: #f8f9fa;
}

.watchlist-manager-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.watchlist-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.watchlist-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.watchlist-display strong {
    white-space: nowrap;
}

.watchlist-display span {
    white-space: nowrap;
    color: var(--text-light);
}

.watchlist-manager-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.watchlist-manager-actions .btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
    height: 32px;
}

/* Edit mode styles */
.watchlist-edit {
    display: none;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.edit-mode .watchlist-display {
    display: none;
}

.edit-mode .watchlist-edit {
    display: flex;
}

.watchlist-name-input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.9rem;
    width: 150px;
}

/* Color Pickers */
.color-picker {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--primary);
}

.color-picker-small {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.color-option-small {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.color-option-small:hover {
    transform: scale(1.1);
}

.color-option-small.selected {
    border-color: var(--primary);
}

/* Watchlist Table Styles */
.watchlist-table-container {
    margin-bottom: 20px;
}

.watchlist-header {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    padding-right: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 8px;
    padding: 15px 20px;
}

.watchlist-header h3 {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 100px);
}

.watchlist-header h3 .badge {
    margin-left: 10px;
    font-size: 0.8rem;
    font-weight: normal;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.watchlist-header .collapse-icon {
    transition: transform 0.3s ease;
    font-size: 1rem;
}

.watchlist-header.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.watchlist-table-container.collapsed .table-container {
    display: none;
}

#watchlist-all {
    margin-top: 30px;
    opacity: 0.8;
    border-top: 2px dashed #ccc;
    padding-top: 20px;
}

/* LTP Styling */
.ltp-value {
    font-weight: 600;
}

.ltp-positive {
    color: var(--success);
}

.ltp-negative {
    color: var(--danger);
}

/* Table Loading Overlay */
.table-loading {
    position: relative;
    min-height: 200px;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.table-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 6;
}

.retry-button {
    margin: 20px auto;
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: block;
}

.retry-button:hover {
    background: #2980b9;
}

/* Symbols Page Specific Styles */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px;
    align-items: start;
    width: 100%;
}

.left-column, .right-column {
    width: 100%;
    min-width: 0;
}

.symbols-list-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

.watchlist-symbol-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
    min-height: 45px;
}

.watchlist-symbol-item:hover {
    background-color: #f8f9fa;
}

.watchlist-symbol-item:last-child {
    border-bottom: none;
}

.watchlist-symbol-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 2;
    overflow: hidden;
}

.symbol-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.watchlist-symbol-name {
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.watchlist-badges {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
}

.watchlist-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    background: var(--accent);
    white-space: nowrap;
}

.watchlist-symbol-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.action-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    height: 28px;
}

.action-btn.remove-symbol {
    background-color: #fee2e2;
    color: #dc2626;
}

.action-btn.remove-symbol:hover {
    background-color: #dc2626;
    color: white;
}

.action-btn.add {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.action-btn.add:hover {
    background-color: #2e7d32;
    color: white;
}

.watchlist-select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 0.75rem;
    background: white;
    width: 90px;
    height: 28px;
}

/* Symbol Form Styles */
.symbol-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding: 25px;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.form-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--light);
}

.symbol-input-container {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.symbol-input-container input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    padding-left: 40px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    z-index: 2;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
}

.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:hover {
    background-color: #f5f7fa;
}

.symbol-info {
    display: flex;
    flex-direction: column;
}

.symbol-name {
    font-weight: bold;
    font-size: 1rem;
}

.symbol-details {
    font-size: 0.85rem;
    color: var(--text-light);
}

.parsed-preview {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 5px;
    min-height: 18px;
}

.parsed-preview.ready {
    color: var(--success);
}

.field-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
    display: block;
}

.field-select {
    padding: 10px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 7px;
    font-size: 0.95rem;
    background: white;
    transition: var(--transition);
    color: var(--text);
}

.field-select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

/* Filter Container */
.filter-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

.filter-container label {
    font-weight: 600;
    color: var(--primary);
}

.filter-container select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
}

/* Empty State */
.empty-watchlist {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
}

.empty-watchlist i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ddd;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .watchlist-symbol-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 992px) {
    .two-column-layout {
        grid-template-columns: 1fr !important;
    }
    
    .watchlist-manager-item {
        flex-wrap: wrap;
    }
    
    .watchlist-manager-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .watchlist-header h3 {
        white-space: normal;
        flex-wrap: wrap;
        max-width: 100%;
    }
    
    .watchlist-header h3 .badge {
        margin-left: 0;
        margin-top: 5px;
    }
    
    .watchlist-manager-item {
        flex-wrap: wrap;
    }
    
    .watchlist-manager-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Index user-info and dashboard items */
.user-info { display: flex; align-items: center; gap: 15px; color: var(--text); font-weight: 500; }
.user-info i { color: var(--accent); }
.logout-btn { display: flex; align-items: center; gap: 8px; padding: 8px 15px; background: var(--danger); color: white; text-decoration: none; border-radius: 5px; transition: var(--transition); font-size: 0.9rem; }
.logout-btn:hover { background: #c0392b; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 30px; }
.dashboard-item { background: white; border-radius: 10px; overflow: hidden; box-shadow: var(--card-shadow); transition: var(--transition); text-decoration: none; color: var(--text); display: flex; flex-direction: column; height: 100%; }
.dashboard-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }
.icon-wrapper { width: 70px; height: 70px; border-radius: 50%; background: var(--light); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; transition: var(--transition); }
.dashboard-item:hover .icon-wrapper { background: var(--accent); transform: scale(1.1); }
.dashboard-item:hover .icon-wrapper i { color: white; }
.icon-wrapper i { font-size: 28px; color: var(--accent); transition: var(--transition); }
.dashboard-body { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.dashboard-title { font-size: 1.3rem; margin-bottom: 10px; color: var(--primary); }
.dashboard-description { color: var(--text-light); font-size: 0.95rem; line-height: 1.5; }
.dashboard-footer { padding: 15px 20px; background: #f9f9f9; display: flex; justify-content: flex-end; }
.btn-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: white; }
.summary-card { display: flex; align-items: center; gap: 15px; font-weight: 500; }

/* Order Form CSS Missing */
.order-panel-wrapper { display: grid; grid-template-columns: 420px 1fr; gap: 20px; align-items: start; }
.order-form-card { background: white; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); overflow: hidden; }
.order-tabs { display: flex; }
.tab-btn { flex: 1; padding: 14px; border: none; font-size: 1rem; font-weight: 700; cursor: pointer; transition: var(--transition); letter-spacing: 0.5px; }
.tab-btn.buy { background: #e8f8f0; color: var(--buy); }
.tab-btn.sell { background: #fdf0f0; color: var(--sell); }
.tab-btn.buy.active { background: var(--buy); color: white; }
.tab-btn.sell.active { background: var(--sell); color: white; }
.order-body { padding: 20px; }
.symbol-search-wrapper { position: relative; margin-bottom: 16px; }
.symbol-search-input { width: 100%; padding: 12px 40px 12px 14px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 1rem; transition: var(--transition); }
.symbol-search-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(52,152,219,0.15); }
.symbol-search-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-light); }
.symbol-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: white; border: 1px solid #e0e0e0; border-radius: 8px; max-height: 220px; overflow-y: auto; z-index: 100; box-shadow: 0 4px 20px rgba(0,0,0,0.12); display: none; }
.symbol-option { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f5f5f5; display: flex; justify-content: space-between; align-items: center; transition: background 0.15s; }
.symbol-option:hover { background: #f0f7ff; }
.symbol-option-name { font-weight: 600; font-size: 0.9rem; }
.symbol-option-full { font-size: 0.78rem; color: var(--text-light); }
.symbol-option-exch { font-size: 0.75rem; background: #eaf4fd; color: var(--accent); padding: 2px 6px; border-radius: 4px; }
.selected-symbol-banner { display: none; background: linear-gradient(135deg, #f0f7ff, #e8f4fd); border: 1px solid #bee3f8; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; align-items: center; justify-content: space-between; }
.selected-symbol-banner.visible { display: flex; }
.sym-name { font-weight: 700; font-size: 1rem; }
.sym-ltp-block { text-align: right; }
.sym-ltp { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.sym-change { font-size: 0.8rem; }
.sym-clear { cursor: pointer; color: var(--text-light); padding: 4px; border: none; background: none; font-size: 1rem; margin-left: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.form-row.single { grid-template-columns: 1fr; }
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 0.82rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.4px; }
.field-select, .field-input { padding: 10px 12px; border: 1.5px solid #e0e0e0; border-radius: 7px; font-size: 0.95rem; background: white; transition: var(--transition); color: var(--text); }
.field-select:focus, .field-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(52,152,219,0.1); }
.field-input:disabled { background: #f8f9fa; color: var(--text-light); }
.funds-strip { background: #f8f9fa; border-radius: 8px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 0.85rem; }
.funds-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.funds-label { color: var(--text-light); font-size: 0.75rem; }
.funds-value { font-weight: 700; color: var(--primary); }
.funds-required-value { color: var(--warning); font-weight: 700; }
.place-order-btn { width: 100%; padding: 14px; border: none; border-radius: 8px; font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: var(--transition); letter-spacing: 0.5px; }
.place-order-btn.buy { background: var(--buy); color: white; }
.place-order-btn.sell { background: var(--sell); color: white; }
.place-order-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.place-order-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.right-panel { display: flex; flex-direction: column; gap: 20px; }
.info-card { background: white; border-radius: 12px; box-shadow: var(--card-shadow); padding: 20px; }
.info-card h3 { font-size: 1rem; color: var(--primary); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.funds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fund-cell { background: #f8f9fa; border-radius: 8px; padding: 12px; text-align: center; }
.fund-cell-label { font-size: 0.75rem; color: var(--text-light); margin-bottom: 4px; }
.fund-cell-value { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.fund-cell-value.available { color: var(--buy); }
.orders-table-wrapper { overflow-x: auto; }
.empty-orders { text-align: center; padding: 30px; color: var(--text-light); }
.empty-orders i { font-size: 2rem; display: block; margin-bottom: 10px; color: #ddd; }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: white; border-radius: 14px; padding: 28px; width: 400px; max-width: 95vw; box-shadow: 0 20px 60px rgba(0,0,0,0.25); animation: slideUp 0.25s ease; }
.modal-header { font-size: 1.2rem; font-weight: 700; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.modal-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.9rem; }
.modal-row:last-of-type { border-bottom: none; }
.modal-row span:first-child { color: var(--text-light); }
.modal-row span:last-child { font-weight: 600; }
.modal-actions { display: flex; gap: 12px; margin-top: 20px; }
.modal-actions button { flex: 1; padding: 12px; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.modal-cancel-btn { background: #f0f0f0; color: var(--text); }
.modal-cancel-btn:hover { background: #e0e0e0; }
.modal-confirm-btn.buy { background: var(--buy); color: white; }
.modal-confirm-btn.sell { background: var(--sell); color: white; }

/* Portfolio Specific */
.exit-btn { background:#fff0f0; color:var(--sell); border:1px solid #fca5a5; padding:5px 14px; border-radius:6px; cursor:pointer; font-size:0.8rem; font-weight:600; transition:var(--transition); }
.exit-btn:hover { background:var(--sell); color:white; }
.modal-sym { font-size:1.1rem; font-weight:800; color:var(--primary); margin-bottom:4px; }
.modal-meta { font-size:0.82rem; color:var(--text-light); margin-bottom:18px; }
.exit-options { display:grid; gap:10px; }
.exit-option { border:2px solid #e5e7eb; border-radius:10px; padding:14px; cursor:pointer; transition:var(--transition); background:#fafafa; }
.exit-option:hover { border-color:var(--accent); background:#f0f7ff; }
.exit-option.selected { border-color:var(--accent); background:#e8f4fd; }
.exit-option-title { font-weight:700; font-size:0.9rem; margin-bottom:4px; display:flex; align-items:center; gap:8px; }
.exit-option-desc { font-size:0.78rem; color:var(--text-light); }
.price-input-row { margin-top:8px; display:none; }
.price-input-row input { width:100%; padding:9px 12px; border:1.5px solid #e0e0e0; border-radius:7px; font-size:0.92rem; transition:var(--transition); }
.price-input-row input:focus { border-color:var(--accent); outline:none; }

/* Backtesting Specific */
.card { background: white; border-radius: 10px; padding: 25px; margin-bottom: 30px; box-shadow: var(--card-shadow); transition: var(--transition); }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); }
.card.info { border-left: 4px solid var(--accent); }
.card h3 { margin-top: 0; margin-bottom: 15px; color: var(--primary); display: flex; align-items: center; gap: 10px; cursor: pointer; }
.card h3 .toggle-icon { transition: var(--transition); }
.card h3.collapsed .toggle-icon { transform: rotate(-90deg); }
.strategy-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 15px; }
.rule-item { padding: 10px; background: #f8f9fa; border-radius: 6px; border-left: 3px solid var(--accent); }
.rule-item strong { color: var(--primary); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin-bottom: 20px; }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-label { font-weight: 600; color: var(--text); font-size: 0.9rem; }
.filter-select, .filter-input { padding: 12px 15px; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; background-color: white; transition: var(--transition); }
.date-inputs { display: flex; flex-direction: column; gap: 10px; }
.small-input { width: 100px !important; text-align: center; }
.medium-input { width: 120px !important; }
.btn-warning { background-color: var(--warning); color: white; }
.btn-warning:hover { background-color: #e67e22; transform: translateY(-2px); }
.chart-section { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.chart-container { background: white; border-radius: 10px; padding: 25px; box-shadow: var(--card-shadow); height: 400px; position: relative; overflow: hidden; }
.chart-container.full-width { grid-column: 1 / -1; height: 500px; }
.chart-tabs { display: flex; gap: 10px; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.chart-tab { padding: 8px 16px; background: #f8f9fa; border: none; border-radius: 4px; cursor: pointer; transition: var(--transition); font-size: 0.9rem; }
.chart-tab.active { background: var(--accent); color: white; }
.chart-tab:hover { background: var(--secondary); color: white; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-value { font-size: 1.8rem; font-weight: bold; margin: 10px 0; }
.stat-profit { color: var(--success); }
.stat-loss { color: var(--danger); }
.stat-neutral { color: var(--text); }
.stat-label { color: var(--text-light); font-size: 0.9rem; font-weight: 600; }
.stat-subtext { font-size: 0.8rem; color: var(--text-light); margin-top: 5px; }
.data-table { background: white; border-radius: 10px; padding: 25px; box-shadow: var(--card-shadow); overflow-x: auto; }
.trade-profit { color: var(--success); font-weight: bold; }
.trade-loss { color: var(--danger); font-weight: bold; }
.loading { text-align: center; padding: 40px; }
.summary-section { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.exit-reasons { background: white; border-radius: 10px; padding: 20px; box-shadow: var(--card-shadow); }
.reason-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; }
.reason-item:last-child { border-bottom: none; }
.pagination-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding: 15px 0; border-top: 1px solid #eee; }
.pagination-info { color: var(--text-light); font-size: 0.9rem; }
.pagination-buttons { display: flex; gap: 10px; align-items: center; }
.pagination-page { font-weight: bold; color: var(--primary); }
.advanced-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
.advanced-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 15px; }
.advanced-toggle.collapsed i { transform: rotate(-90deg); }
.advanced-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; }
.margin-input-group { display: flex; gap: 10px; align-items: center; }

@media (max-width: 1200px) {
    .order-panel-wrapper { grid-template-columns: 1fr; }
    .filters { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (max-width: 992px) {
    .strategy-rules { grid-template-columns: 1fr; }
    .summary-section { grid-template-columns: 1fr; }
    .chart-section { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .funds-grid { grid-template-columns: 1fr 1fr; }
    .filters { grid-template-columns: 1fr; }
    .results-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .results-grid { grid-template-columns: 1fr; }
}

/* --- RECOVERED STYLES FROM TEMPLATES --- */

.nav-link:hover,
        .nav-link.active {
            background: rgba(255, 255, 255, 0.1);
            border-left: 4px solid var(--accent);
        }
.header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
        }
.controls-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 30px;
            box-shadow: var(--card-shadow);
            display: flex;
            gap: 20px;
            align-items: end;
        }
.form-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
            flex: 1;
            max-width: 300px;
        }
.form-group label {
            font-weight: 600;
            color: var(--secondary);
            font-size: 0.9rem;
        }
.form-control {
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 1rem;
            outline: none;
            transition: border-color 0.3s;
        }
.form-control:focus {
            border-color: var(--accent);
        }
.info-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 30px;
            box-shadow: var(--card-shadow);
            border-left: 4px solid var(--accent);
        }
.info-card p {
            margin: 0;
            color: var(--text-light);
            margin-bottom: 10px;
        }
.info-card ul {
            color: var(--text-light);
            margin-left: 20px;
            font-size: 0.95rem;
        }
.table-container {
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            overflow-x: auto;
            position: relative;
        }
th,
        td {
            padding: 15px 12px;
            text-align: center;
            border-bottom: 1px solid #eee;
        }
tr:hover {
            background-color: #f8f9fa;
        }
.bullish {
            color: var(--success);
            font-weight: 600;
        }
.bearish {
            color: var(--danger);
            font-weight: 600;
        }
.pagination {
            display: flex;
            justify-content: center;
            margin-top: 20px;
            gap: 10px;
            flex-wrap: wrap;
        }
.page-btn {
            padding: 8px 12px;
            border: 1px solid #ddd;
            background: white;
            cursor: pointer;
            border-radius: 4px;
        }
.page-btn.active {
            background-color: var(--accent);
            color: white;
            border-color: var(--accent);
        }
.page-btn:hover:not(.active) {
            background-color: #f8f9fa;
        }
.table-info {
            margin-bottom: 15px;
            padding: 10px 15px;
            background-color: #f8f9fa;
            border-radius: 6px;
            border-left: 4px solid var(--accent);
            font-size: 0.9rem;
            color: var(--text-light);
        }
#loadingSpinner {
            display: none;
            justify-content: center;
            align-items: center;
            padding: 40px;
            color: var(--accent);
            font-size: 2rem;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.8);
            z-index: 10;
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .page-title {
                font-size: 1.5rem;
            }

            .controls-card {
                flex-direction: column;
                align-items: stretch;
            }

            .form-group {
                max-width: 100%;
            }
        }
.nav-link:hover, .nav-link.active {
            background: rgba(255, 255, 255, 0.1);
            border-left: 4px solid var(--accent);
        }
th, td { 
            padding: 15px 12px; 
            text-align: center;
            border-bottom: 1px solid #eee;
        }
.symbol-cell {
            font-weight: 600;
            color: var(--primary);
            background-color: #f8f9fa;
        }
.high-level {
            color: var(--danger);  
            font-weight: 500;
        }
.low-level {
            color: var(--success);  
            font-weight: 500;
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }
            
            .sidebar {
                width: 100%;
                padding: 10px;
            }
            
            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }
            
            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }
            
            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }
            
            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }
            
            .nav-link:hover, .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }
            
            .submenu .nav-link {
                padding-left: 30px;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }
            
            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
            
            .page-title {
                font-size: 1.5rem;
            }
            
            th, td {
                padding: 12px 8px;
                font-size: 0.85rem;
            }
        }
@media (max-width: 480px) {
            th, td {
                padding: 10px 6px;
                font-size: 0.8rem;
            }
            
            .info-card {
                padding: 15px;
            }
        }
.gap-up {
            color: var(--success);
            font-weight: 600;
        }
.gap-down {
            color: var(--danger);
            font-weight: 600;
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .controls-card {
                flex-direction: column;
                align-items: stretch;
            }

            .form-group {
                max-width: 100%;
            }
        }
.card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
.card {
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            transition: var(--transition);
        }
.card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }
.card-header {
            background: var(--secondary);
            color: white;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
.card-title {
            font-size: 1.1rem;
            font-weight: 600;
        }
.status {
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
        }
.status-active {
            background: var(--success);
        }
.status-paused {
            background: var(--warning);
        }
.status-error {
            background: var(--danger);
        }
.metric {
            display: flex;
            justify-content: space-between;
            margin-bottom: 15px;
        }
.metric:last-child {
            margin-bottom: 0;
        }
.metric-label {
            color: var(--text-light);
        }
.metric-value {
            font-weight: 600;
        }
.card-footer {
            padding: 15px 20px;
            background: #f9f9f9;
            display: flex;
            justify-content: space-between;
        }
.btn-outline {
            background: transparent;
            border: 1px solid var(--accent);
            color: var(--accent);
        }
.btn-outline:hover {
            background: var(--accent);
            color: white;
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 15px;
            }

            .card-grid {
                grid-template-columns: 1fr;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
        }
.summary-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            box-shadow: var(--card-shadow);
        }
.summary-value {
            font-size: 2rem;
            font-weight: bold;
            color: var(--accent);
            margin: 10px 0;
        }
.summary-label {
            color: var(--text-light);
            font-size: 0.9rem;
        }
.card.info {
            border-left: 4px solid var(--accent);
        }
.card h3 {
            margin-top: 0;
            margin-bottom: 15px;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }
.filters {
            display: flex;
            gap: 15px;
            align-items: center;
            flex-wrap: wrap;
            margin-bottom: 20px;
        }
.filters select, .filters input {
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            min-width: 150px;
            background-color: white;
            transition: var(--transition);
        }
.filters input {
            width: 80px;
            text-align: center;
        }
.filters select:focus, .filters input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }
.date-inputs {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }
.date-inputs input {
            width: 100%;
            min-width: auto;
        }
.btn-warning {
            background-color: var(--warning);
            color: white;
        }
.btn-warning:hover {
            background-color: #e67e22;
            transform: translateY(-2px);
        }
.btn-secondary {
            background-color: var(--secondary);
            color: white;
        }
.btn-secondary:hover {
            background-color: #2c3e50;
            transform: translateY(-2px);
        }
.ema-values {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin: 20px 0;
        }
.ema-value {
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--accent);
            text-align: center;
            padding: 20px;
            background-color: #e7f3ff;
            border-radius: 8px;
            border-left: 4px solid var(--accent);
        }
.ema-value.secondary {
            background-color: #fff9e6;
            border-left-color: var(--warning);
            color: var(--warning);
        }
.ema-value.tertiary {
            background-color: #e6f3ff;
            border-left-color: var(--accent);
            color: var(--accent);
        }
.chart-container {
            background: white;
            border-radius: 10px;
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: var(--card-shadow);
            height: 400px;
        }
.data-table {
            background: white;
            border-radius: 10px;
            padding: 25px;
            box-shadow: var(--card-shadow);
            overflow-x: auto;
        }
.auto-refresh {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 15px;
        }
.switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 24px;
        }
.switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
.slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 24px;
        }
.slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
input:checked + .slider {
            background-color: var(--success);
        }
input:checked + .slider:before {
            transform: translateX(26px);
        }
.checkbox-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }
.checkbox-group input[type="checkbox"] {
            width: 18px;
            height: 18px;
        }
.period-checkboxes {
            display: flex;
            gap: 20px;
            align-items: center;
        }
.period-inputs {
            display: flex;
            gap: 10px;
        }
.period-inputs input {
            width: 80px;
        }
.page-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
.period2-container, .period3-container {
            display: none;
        }
.period2-container.visible, .period3-container.visible {
            display: block;
        }
.advanced-options {
            margin-top: 5px;
            padding-top: 10px;
            border-top: 1px solid #eee;
        }
.advanced-section {
            margin-bottom: 25px;
        }
.advanced-section h4 {
            margin-bottom: 15px;
            color: var(--secondary);
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.1rem;
        }
.margin-adjustment {
            display: flex;
            gap: 20px;
            align-items: center;
            flex-wrap: wrap;
        }
.margin-type, .margin-value {
            display: flex;
            align-items: center;
            gap: 10px;
        }
.margin-type label, .margin-value label {
            font-weight: 600;
            min-width: 120px;
        }
.margin-value input {
            width: 80px;
            text-align: center;
        }
.margin-value span {
            font-weight: 600;
            color: var(--accent);
        }
.margin-info {
            margin-top: 10px;
            padding: 10px;
            background-color: #e7f3ff;
            border-radius: 6px;
            border-left: 4px solid var(--accent);
        }
.margin-info small {
            color: var(--text-light);
        }
.btn-sm {
            padding: 8px 15px;
            font-size: 0.9rem;
        }
@media (max-width: 768px) {
            .margin-adjustment {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
            
            .margin-type, .margin-value {
                width: 100%;
            }
            
            .margin-type select, .margin-value input {
                flex: 1;
            }
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }
            
            .sidebar {
                width: 100%;
                padding: 10px;
            }
            
            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }
            
            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }
            
            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }
            
            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }
            
            .nav-link:hover, .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }
            
            .submenu .nav-link {
                padding-left: 30px;
            }
            
            .period-checkboxes {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }
            
            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
            
            .page-title {
                font-size: 1.5rem;
            }
            
            .filters {
                flex-direction: column;
                align-items: stretch;
            }
            
            .filters select, .filters input, .filters button {
                width: 100%;
            }
            
            .date-inputs {
                grid-template-columns: 1fr;
            }
            
            .ema-values {
                grid-template-columns: 1fr;
            }
            
            .ema-value {
                font-size: 1.3rem;
            }
            
            .period-inputs {
                flex-direction: column;
            }
            
            .period-inputs input {
                width: 100%;
            }
            
            th, td {
                padding: 12px 8px;
                font-size: 0.85rem;
            }
        }
@media (max-width: 480px) {
            th, td {
                padding: 10px 6px;
                font-size: 0.8rem;
            }
            
            .card {
                padding: 20px;
            }
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 15px;
            }

            .card-grid {
                grid-template-columns: 1fr;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
        }
.card h3 .toggle-icon {
            transition: var(--transition);
        }
.card h3.collapsed .toggle-icon {
            transform: rotate(-90deg);
        }
.strategy-rules {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-top: 15px;
        }
.rule-item {
            padding: 10px;
            background: #f8f9fa;
            border-radius: 6px;
            border-left: 3px solid var(--accent);
        }
.rule-item strong {
            color: var(--primary);
        }
.filter-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
.filter-label {
            font-weight: 600;
            color: var(--text);
            font-size: 0.9rem;
        }
.filter-select,
        .filter-input {
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            background-color: white;
            transition: var(--transition);
        }
.filter-input {
            width: 100%;
        }
.filter-select:focus,
        .filter-input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }
.small-input {
            width: 100px !important;
            text-align: center;
        }
.medium-input {
            width: 120px !important;
        }
.chart-section {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 30px;
        }
.chart-container.full-width {
            grid-column: 1 / -1;
            height: 500px;
        }
.chart-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
            border-bottom: 1px solid #eee;
            padding-bottom: 10px;
        }
.chart-tab {
            padding: 8px 16px;
            background: #f8f9fa;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: var(--transition);
            font-size: 0.9rem;
        }
.chart-tab.active {
            background: var(--accent);
            color: white;
        }
.chart-tab:hover {
            background: var(--secondary);
            color: white;
        }
.results-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }
.stat-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: var(--card-shadow);
            text-align: center;
            border-top: 4px solid var(--accent);
        }
.stat-value {
            font-size: 1.8rem;
            font-weight: bold;
            margin: 10px 0;
        }
.stat-profit {
            color: var(--success);
        }
.stat-loss {
            color: var(--danger);
        }
.stat-neutral {
            color: var(--text);
        }
.stat-label {
            color: var(--text-light);
            font-size: 0.9rem;
            font-weight: 600;
        }
.stat-subtext {
            font-size: 0.8rem;
            color: var(--text-light);
            margin-top: 5px;
        }
.trade-profit {
            color: var(--success);
            font-weight: bold;
        }
.trade-loss {
            color: var(--danger);
            font-weight: bold;
        }
.loading {
            text-align: center;
            padding: 40px;
        }
.summary-section {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }
.exit-reasons {
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: var(--card-shadow);
        }
.reason-item {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid #eee;
        }
.reason-item:last-child {
            border-bottom: none;
        }
.pagination-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 15px;
            padding: 15px 0;
            border-top: 1px solid #eee;
        }
.pagination-info {
            color: var(--text-light);
            font-size: 0.9rem;
        }
.pagination-buttons {
            display: flex;
            gap: 10px;
            align-items: center;
        }
.pagination-page {
            font-weight: bold;
            color: var(--primary);
        }
.advanced-toggle {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            color: var(--accent);
            font-weight: 600;
            margin-bottom: 15px;
        }
.advanced-toggle i {
            transition: var(--transition);
        }
.advanced-toggle.collapsed i {
            transform: rotate(-90deg);
        }
.advanced-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 15px;
        }
.margin-input-group {
            display: flex;
            gap: 10px;
            align-items: center;
        }
@keyframes rotate {
            100% {
                transform: rotate(360deg);
            }
        }
@media (max-width: 1200px) {
            .filters {
                grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            }
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }

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

            .summary-section {
                grid-template-columns: 1fr;
            }

            .chart-section {
                grid-template-columns: 1fr;
            }

            .filters {
                grid-template-columns: 1fr 1fr;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .page-title {
                font-size: 1.5rem;
            }

            .filters {
                grid-template-columns: 1fr;
            }

            .results-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            th,
            td {
                padding: 10px 6px;
                font-size: 0.8rem;
            }

            .chart-tabs {
                flex-wrap: wrap;
            }

            .chart-tab {
                font-size: 0.8rem;
                padding: 6px 12px;
            }

            .small-input,
            .medium-input {
                width: 100% !important;
            }
        }
@media (max-width: 480px) {
            .results-grid {
                grid-template-columns: 1fr;
            }

            .card {
                padding: 20px;
            }

            .pagination-controls {
                flex-direction: column;
                gap: 10px;
                text-align: center;
            }
        }
@keyframes rotate {
            100% {
                transform: rotate(360deg);
            }
        }
@media (max-width: 1200px) {
            .filters {
                grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            }
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }

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

            .summary-section {
                grid-template-columns: 1fr;
            }

            .chart-section {
                grid-template-columns: 1fr;
            }

            .filters {
                grid-template-columns: 1fr 1fr;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .page-title {
                font-size: 1.5rem;
            }

            .filters {
                grid-template-columns: 1fr;
            }

            .results-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            th,
            td {
                padding: 10px 6px;
                font-size: 0.8rem;
            }

            .chart-tabs {
                flex-wrap: wrap;
            }

            .chart-tab {
                font-size: 0.8rem;
                padding: 6px 12px;
            }

            .small-input,
            .medium-input {
                width: 100% !important;
            }
        }
@media (max-width: 480px) {
            .results-grid {
                grid-template-columns: 1fr;
            }

            .card {
                padding: 20px;
            }

            .pagination-controls {
                flex-direction: column;
                gap: 10px;
                text-align: center;
            }
        }
@keyframes rotate {
            100% {
                transform: rotate(360deg);
            }
        }
@media (max-width: 1200px) {
            .filters {
                grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            }
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--success);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }

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

            .summary-section {
                grid-template-columns: 1fr;
            }

            .chart-section {
                grid-template-columns: 1fr;
            }

            .filters {
                grid-template-columns: 1fr 1fr;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .page-title {
                font-size: 1.5rem;
            }

            .filters {
                grid-template-columns: 1fr;
            }

            .results-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            th,
            td {
                padding: 10px 6px;
                font-size: 0.8rem;
            }

            .chart-tabs {
                flex-wrap: wrap;
            }

            .chart-tab {
                font-size: 0.8rem;
                padding: 6px 12px;
            }

            .small-input,
            .medium-input {
                width: 100% !important;
            }
        }
@media (max-width: 480px) {
            .results-grid {
                grid-template-columns: 1fr;
            }

            .card {
                padding: 20px;
            }

            .pagination-controls {
                flex-direction: column;
                gap: 10px;
                text-align: center;
            }
        }
@keyframes rotate {
            100% {
                transform: rotate(360deg);
            }
        }
@media (max-width: 1200px) {
            .filters {
                grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            }
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }

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

            .summary-section {
                grid-template-columns: 1fr;
            }

            .chart-section {
                grid-template-columns: 1fr;
            }

            .filters {
                grid-template-columns: 1fr 1fr;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .page-title {
                font-size: 1.5rem;
            }

            .filters {
                grid-template-columns: 1fr;
            }

            .results-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            th,
            td {
                padding: 10px 6px;
                font-size: 0.8rem;
            }

            .chart-tabs {
                flex-wrap: wrap;
            }

            .chart-tab {
                font-size: 0.8rem;
                padding: 6px 12px;
            }

            .small-input,
            .medium-input {
                width: 100% !important;
            }
        }
@media (max-width: 480px) {
            .results-grid {
                grid-template-columns: 1fr;
            }

            .card {
                padding: 20px;
            }

            .pagination-controls {
                flex-direction: column;
                gap: 10px;
                text-align: center;
            }
        }
.filters-card {
            background: white;
            border-radius: 10px;
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: var(--card-shadow);
        }
.filters select {
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            min-width: 200px;
            background-color: white;
            transition: var(--transition);
        }
.filters select:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }
.filters button {
            padding: 12px 20px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: bold;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 8px;
            background-color: var(--accent);
            color: white;
        }
.filters button:hover {
            background-color: #2980b9;
            transform: translateY(-2px);
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }
            
            .sidebar {
                width: 100%;
                padding: 10px;
            }
            
            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }
            
            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }
            
            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }
            
            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }
            
            .nav-link:hover, .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }
            
            .submenu .nav-link {
                padding-left: 30px;
            }
            
            .filters {
                flex-direction: column;
                align-items: stretch;
            }
            
            .filters select, .filters button {
                width: 100%;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }
            
            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
            
            th, td {
                padding: 12px 8px;
                font-size: 0.9rem;
            }
        }
@media (max-width: 480px) {
            .page-title {
                font-size: 1.5rem;
            }
            
            th, td {
                padding: 10px 6px;
                font-size: 0.85rem;
            }
            
            .filters-card {
                padding: 20px;
            }
        }
.controls-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 20px;
        }
.control-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
.control-label {
            font-weight: 600;
            color: var(--text);
        }
.control-select,
        .control-input {
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            background-color: white;
            transition: var(--transition);
        }
.control-select:focus,
        .control-input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }
.data-table-container {
            background: white;
            border-radius: 10px;
            padding: 25px;
            box-shadow: var(--card-shadow);
            overflow-x: auto;
        }
.data-table th {
            background-color: var(--primary);
            color: white;
            padding: 12px 15px;
            text-align: left;
            font-weight: 600;
            position: sticky;
            top: 0;
        }
.data-table td {
            padding: 12px 15px;
            border-bottom: 1px solid #eee;
        }
.data-table tr:hover {
            background-color: #f8f9fa;
        }
.stats-summary {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }

            .controls-grid {
                grid-template-columns: 1fr;
            }

            .date-inputs {
                grid-template-columns: 1fr;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .data-table {
                font-size: 0.85rem;
            }

            .data-table th,
            .data-table td {
                padding: 8px 10px;
            }
        }
.warning-card {
            background-color: #fff3cd;
            padding: 15px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            border-left: 4px solid var(--warning);
            display: flex;
            align-items: center;
            gap: 10px;
        }
.info-card li {
            margin-bottom: 5px;
        }
.control-select, .control-input {
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            background-color: white;
            transition: var(--transition);
        }
.control-select:focus, .control-input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }
.control-select[multiple] {
            height: 150px;
        }
.resolution-info {
            font-size: 0.85rem;
            color: var(--text-light);
            margin-top: 5px;
        }
.resolution-warning {
            color: var(--warning);
            font-weight: 500;
        }
.buttons-row {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            margin-top: 20px;
        }
.btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none !important;
        }
.results-container {
            background: white;
            border-radius: 10px;
            padding: 25px;
            box-shadow: var(--card-shadow);
        }
.results-header {
            display: flex;
            justify-content: between;
            align-items: center;
            margin-bottom: 20px;
        }
.results-title {
            font-size: 1.3rem;
            color: var(--primary);
        }
.status-badge {
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: bold;
        }
.status-success {
            background-color: #d4edda;
            color: #155724;
        }
.status-warning {
            background-color: #fff3cd;
            color: #856404;
        }
.success-list, .error-list {
            max-height: 300px;
            overflow-y: auto;
        }
.list-title {
            font-weight: 600;
            margin-bottom: 10px;
            padding-bottom: 5px;
            border-bottom: 2px solid #eee;
        }
.success-item, .error-item {
            padding: 10px 15px;
            margin-bottom: 8px;
            border-radius: 6px;
            border-left: 4px solid;
        }
.success-item {
            background-color: #d4edda;
            border-left-color: var(--success);
        }
.error-item {
            background-color: #f8d7da;
            border-left-color: var(--danger);
        }
.item-symbol {
            font-weight: 600;
        }
.item-details {
            font-size: 0.9rem;
            color: var(--text-light);
        }
.progress-container {
            margin: 20px 0;
        }
.progress-text {
            text-align: center;
            margin-top: 5px;
            font-size: 0.9rem;
            color: var(--text-light);
        }
@keyframes rotate {
            100% {
                transform: rotate(360deg);
            }
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }
            
            .sidebar {
                width: 100%;
                padding: 10px;
            }
            
            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }
            
            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }
            
            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }
            
            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }
            
            .nav-link:hover, .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }
            
            .submenu .nav-link {
                padding-left: 30px;
            }
            
            .controls-grid {
                grid-template-columns: 1fr;
            }
            
            .date-inputs {
                grid-template-columns: 1fr;
            }
            
            .results-grid {
                grid-template-columns: 1fr;
            }
            
            .buttons-row {
                flex-direction: column;
            }
            
            .btn {
                width: 100%;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }
            
            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
        }
.page-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.summary-strip {
            display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
            gap:14px; margin-bottom:20px;
        }
.sum-card {
            background:white; border-radius:10px; padding:16px 18px;
            box-shadow:var(--card-shadow); border-left:4px solid var(--accent);
        }
.sum-card.pos { border-left-color:var(--buy); }
.sum-card.neg { border-left-color:var(--sell); }
.sum-label { font-size:0.78rem; color:var(--text-light); font-weight:600; text-transform:uppercase; letter-spacing:.4px; }
.sum-value { font-size:1.4rem; font-weight:800; color:var(--primary); margin-top:4px; }
.sum-value.up { color:var(--buy); }
.sum-value.down { color:var(--sell); }
.tab-btn .tab-badge {
            background:var(--accent); color:white; border-radius:12px;
            padding:1px 8px; font-size:0.72rem; font-weight:700;
        }
.tab-btn.active .tab-badge { background:var(--accent); }
.table-card {
            background:white; border-radius:0 0 10px 10px;
            box-shadow:var(--card-shadow); overflow:hidden;
        }
.up   { color:var(--buy);  font-weight:700; }
.down { color:var(--sell); font-weight:700; }
.exit-btn {
            background:#fff0f0; color:var(--sell); border:1px solid #fca5a5;
            padding:5px 14px; border-radius:6px; cursor:pointer; font-size:0.8rem;
            font-weight:600; transition:var(--transition);
        }
.exit-btn:hover { background:var(--sell); color:white; }
.modal-overlay {
            display:none; position:fixed; inset:0;
            background:rgba(0,0,0,0.45); z-index:1000;
            align-items:center; justify-content:center;
        }
.modal-overlay.active { display:flex; }
.modal {
            background:white; border-radius:14px; width:420px; max-width:95vw;
            box-shadow:0 20px 60px rgba(0,0,0,0.25); animation:slideUp .25s ease;
            overflow:hidden;
        }
@keyframes slideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal-header {
            background:var(--sell); color:white; padding:16px 20px;
            display:flex; align-items:center; justify-content:space-between;
            font-size:1.05rem; font-weight:700;
        }
.modal-close { background:none; border:none; color:white; cursor:pointer; font-size:1.2rem; }
.modal-sym { font-size:1.1rem; font-weight:800; color:var(--primary); margin-bottom:4px; }
.modal-meta { font-size:0.82rem; color:var(--text-light); margin-bottom:18px; }
.exit-options { display:grid; gap:10px; }
.exit-option {
            border:2px solid #e5e7eb; border-radius:10px; padding:14px;
            cursor:pointer; transition:var(--transition); background:#fafafa;
        }
.exit-option:hover { border-color:var(--accent); background:#f0f7ff; }
.exit-option.selected { border-color:var(--accent); background:#e8f4fd; }
.exit-option-title { font-weight:700; font-size:0.9rem; margin-bottom:4px; display:flex; align-items:center; gap:8px; }
.exit-option-desc { font-size:0.78rem; color:var(--text-light); }
.price-input-row { margin-top:8px; display:none; }
.price-input-row input {
            width:100%; padding:9px 12px; border:1.5px solid #e0e0e0; border-radius:7px;
            font-size:0.92rem; transition:var(--transition);
        }
.price-input-row input:focus { border-color:var(--accent); outline:none; }
.modal-confirm-btn {
            width:100%; margin-top:18px; padding:13px; border:none; border-radius:8px;
            background:var(--sell); color:white; font-size:1rem; font-weight:700;
            cursor:pointer; transition:var(--transition);
        }
.modal-confirm-btn:hover { opacity:.9; }
.modal-confirm-btn:disabled { opacity:.5; cursor:not-allowed; }
@keyframes fadeIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
.refresh-indicator { font-size:0.75rem; color:var(--text-light); }
@media(max-width:768px) {
            .dashboard { flex-direction:column; }
            .sidebar { width:100%; }
            .summary-strip { grid-template-columns:1fr 1fr; }
        }
.order-panel-wrapper { display: grid; grid-template-columns: 420px 1fr; gap: 20px; align-items: start; }
.order-form-card {
            background: white;
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.12);
            overflow: hidden;
        }
.order-tabs { display: flex; }
.tab-btn.buy { background: #e8f8f0; color: var(--buy-color); }
.tab-btn.sell { background: #fdf0f0; color: var(--sell-color); }
.tab-btn.buy.active { background: var(--buy-color); color: white; }
.tab-btn.sell.active { background: var(--sell-color); color: white; }
.symbol-search-wrapper { position: relative; margin-bottom: 16px; }
.symbol-search-input {
            width: 100%; padding: 12px 40px 12px 14px;
            border: 2px solid #e0e0e0; border-radius: 8px;
            font-size: 1rem; transition: var(--transition);
        }
.symbol-search-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(52,152,219,0.15); }
.symbol-search-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-light); }
.symbol-dropdown {
            position: absolute; top: calc(100% + 4px); left: 0; right: 0;
            background: white; border: 1px solid #e0e0e0; border-radius: 8px;
            max-height: 220px; overflow-y: auto; z-index: 100;
            box-shadow: 0 4px 20px rgba(0,0,0,0.12); display: none;
        }
.symbol-option {
            padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f5f5f5;
            display: flex; justify-content: space-between; align-items: center;
            transition: background 0.15s;
        }
.symbol-option:hover { background: #f0f7ff; }
.symbol-option-name { font-weight: 600; font-size: 0.9rem; }
.symbol-option-full { font-size: 0.78rem; color: var(--text-light); }
.symbol-option-exch { font-size: 0.75rem; background: #eaf4fd; color: var(--accent); padding: 2px 6px; border-radius: 4px; }
.selected-symbol-banner {
            display: none; background: linear-gradient(135deg, #f0f7ff, #e8f4fd);
            border: 1px solid #bee3f8; border-radius: 8px; padding: 12px 14px;
            margin-bottom: 16px; align-items: center; justify-content: space-between;
        }
.selected-symbol-banner.visible { display: flex; }
.sym-name { font-weight: 700; font-size: 1rem; }
.sym-ltp-block { text-align: right; }
.sym-ltp { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.sym-change { font-size: 0.8rem; }
.sym-change.up { color: var(--buy-color); }
.sym-change.down { color: var(--sell-color); }
.sym-clear { cursor: pointer; color: var(--text-light); padding: 4px; border: none; background: none; font-size: 1rem; margin-left: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.form-row.single { grid-template-columns: 1fr; }
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 0.82rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.4px; }
.field-select, .field-input {
            padding: 10px 12px; border: 1.5px solid #e0e0e0; border-radius: 7px;
            font-size: 0.95rem; background: white; transition: var(--transition);
            color: var(--text);
        }
.field-select:focus, .field-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(52,152,219,0.1); }
.field-input:disabled { background: #f8f9fa; color: var(--text-light); }
.funds-strip {
            background: #f8f9fa; border-radius: 8px; padding: 10px 14px;
            display: flex; justify-content: space-between; align-items: center;
            margin-bottom: 16px; font-size: 0.85rem;
        }
.funds-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.funds-label { color: var(--text-light); font-size: 0.75rem; }
.funds-value { font-weight: 700; color: var(--primary); }
.funds-required-value { color: var(--warning); font-weight: 700; }
.place-order-btn {
            width: 100%; padding: 14px; border: none; border-radius: 8px;
            font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: var(--transition);
            letter-spacing: 0.5px;
        }
.place-order-btn.buy { background: var(--buy-color); color: white; }
.place-order-btn.sell { background: var(--sell-color); color: white; }
.place-order-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.place-order-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.right-panel { display: flex; flex-direction: column; gap: 20px; }
.info-card h3 { font-size: 1rem; color: var(--primary); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.funds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fund-cell { background: #f8f9fa; border-radius: 8px; padding: 12px; text-align: center; }
.fund-cell-label { font-size: 0.75rem; color: var(--text-light); margin-bottom: 4px; }
.fund-cell-value { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.fund-cell-value.available { color: var(--buy-color); }
.orders-table-wrapper { overflow-x: auto; }
.empty-orders { text-align: center; padding: 30px; color: var(--text-light); }
.empty-orders i { font-size: 2rem; display: block; margin-bottom: 10px; color: #ddd; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header.buy { color: var(--buy-color); }
.modal-header.sell { color: var(--sell-color); }
.modal-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.9rem; }
.modal-row:last-of-type { border-bottom: none; }
.modal-row span:first-child { color: var(--text-light); }
.modal-row span:last-child { font-weight: 600; }
.modal-actions { display: flex; gap: 12px; margin-top: 20px; }
.modal-actions button { flex: 1; padding: 12px; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.modal-cancel-btn { background: #f0f0f0; color: var(--text); }
.modal-cancel-btn:hover { background: #e0e0e0; }
.modal-confirm-btn.buy { background: var(--buy-color); color: white; }
.modal-confirm-btn.sell { background: var(--sell-color); color: white; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1100px) {
            .order-panel-wrapper { grid-template-columns: 1fr; }
        }
@media (max-width: 768px) {
            .sidebar { width: 100%; }
            .dashboard { flex-direction: column; }
            .main-content { padding: 15px; }
            .funds-grid { grid-template-columns: 1fr 1fr; }
        }
@keyframes spin { to { transform: rotate(360deg); } }
.card.alert {
            border-left: 4px solid var(--warning);
        }
.card-header h3 {
            margin: 0;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }
.card-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
        }
.card-content.expanded {
            max-height: 500px;
        }
.card ul {
            margin: 0;
            padding-left: 20px;
        }
.card li {
            margin-bottom: 8px;
            padding: 5px 0;
        }
.range-legend {
            font-weight: 500;
        }
.AWR10_H-AWR5_H {
            color: var(--danger);
        }
.ADR10_H-ADR5_H {
            color: var(--warning);
        }
.ADR5_L-ADR10_L {
            color: var(--accent);
        }
.AWR5_L-AWR10_L {
            color: var(--success);
        }
#alertStatus {
            font-weight: 600;
            margin: 15px 0;
        }
.filter-container {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
            padding: 20px;
            background: white;
            border-radius: 10px;
            box-shadow: var(--card-shadow);
        }
.filter-container label {
            font-weight: 600;
            color: var(--primary);
        }
.filter-container select {
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            background-color: white;
        }
.btn-filter {
            background-color: var(--success);
            color: white;
            padding: 10px 15px;
        }
.btn-filter:hover {
            background-color: #27ae60;
        }
.ltp-cell {
            font-weight: bold;
            font-size: 15px;
        }
.range-cell {
            font-weight: 600;
            padding: 8px 12px;
            border-radius: 4px;
        }
.ema-sell {
            color: var(--danger);
            font-weight: bold;
        }
.ema-buy {
            color: var(--success);
            font-weight: bold;
        }
.alert-badge {
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
            font-weight: bold;
        }
.alert-badge.sell {
            background-color: var(--danger);
            color: white;
        }
.alert-badge.buy {
            background-color: var(--success);
            color: white;
        }
tr:nth-child(even) {
            background-color: #f9f9f9;
        }
tr:nth-child(even):hover {
            background-color: #f1f1f1;
        }
.symbol-group {
            background-color: #e7f3ff;
            font-weight: bold;
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }

            .dashboard-cards {
                grid-template-columns: 1fr;
            }

            .symbol-cell {
                position: static;
                box-shadow: none;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .page-title {
                font-size: 1.5rem;
            }

            .filter-container {
                flex-direction: column;
                align-items: stretch;
            }

            th,
            td {
                padding: 12px 8px;
                font-size: 0.85rem;
            }
        }
@media (max-width: 480px) {

            th,
            td {
                padding: 10px 6px;
                font-size: 0.8rem;
            }

            .card {
                padding: 20px;
            }
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }

            .dashboard-cards {
                grid-template-columns: 1fr;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .page-title {
                font-size: 1.5rem;
            }

            .filter-container {
                flex-direction: column;
                align-items: stretch;
            }

            th,
            td {
                padding: 12px 8px;
                font-size: 0.85rem;
            }
        }
@media (max-width: 480px) {

            th,
            td {
                padding: 10px 6px;
                font-size: 0.8rem;
            }

            .card {
                padding: 0;
            }
        }
.filter-container input,
        .filter-container select {
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            width: 90px;
        }
.signal-cell {
            font-weight: bold;
            padding: 8px 12px;
            border-radius: 4px;
        }
.signal-buy {
            color: var(--success);
        }
.signal-sell {
            color: var(--danger);
        }
.signal-none {
            color: var(--text-light);
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
            }

            .dashboard-cards {
                grid-template-columns: 1fr;
            }
        }
.summary-value.updating {
            color: var(--warning);
            animation: pulse 1.5s infinite;
        }
@keyframes pulse {
            0% {
                opacity: 1;
            }

            50% {
                opacity: 0.5;
            }

            100% {
                opacity: 1;
            }
        }
.summary-value:not([data-loaded="true"]) {
            color: var(--text-light);
            font-style: italic;
        }
.btn-primary:active {
            transform: scale(0.98);
        }
.fa-spin {
            animation: fa-spin 1s infinite linear;
        }
@keyframes fa-spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 15px;
            }

            .card-grid {
                grid-template-columns: 1fr;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
        }
.card.important {
            border-left: 4px solid var(--danger);
            background: linear-gradient(135deg, #fff 0%, #ffeaea 100%);
        }
.signal-no {
            background-color: #f8f9fa;
            color: var(--text-light);
        }
.importance-high {
            background-color: var(--danger);
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
            font-weight: bold;
        }
.importance-medium {
            background-color: var(--warning);
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
            font-weight: bold;
        }
.alert-row {
            background-color: #ffeaea !important;
        }
.alert-row:hover {
            background-color: #ffdada !important;
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }

            .dashboard-cards {
                grid-template-columns: 1fr;
            }

            .symbol-cell {
                position: static;
                box-shadow: none;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 20px;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .page-title {
                font-size: 1.5rem;
            }

            .filter-container {
                flex-direction: column;
                align-items: stretch;
            }

            th,
            td {
                padding: 12px 8px;
                font-size: 0.85rem;
            }
        }
@media (max-width: 480px) {

            th,
            td {
                padding: 10px 6px;
                font-size: 0.8rem;
            }

            .card {
                padding: 20px;
            }
        }
.user-info {
            display: flex;
            align-items: center;
            gap: 15px;
            color: var(--text);
            font-weight: 500;
        }
.user-info i {
            color: var(--accent);
        }
.logout-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 15px;
            background: var(--danger);
            color: white;
            text-decoration: none;
            border-radius: 5px;
            transition: var(--transition);
            font-size: 0.9rem;
        }
.logout-btn:hover {
            background: #c0392b;
        }
.icon-wrapper {
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background: var(--light);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
            transition: var(--transition);
        }
.icon-wrapper i {
            font-size: 28px;
            color: var(--accent);
            transition: var(--transition);
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 15px;
            }

            .dashboard-grid {
                grid-template-columns: 1fr;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .user-info {
                width: 100%;
                justify-content: space-between;
            }
        }
.config-section {
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            margin-bottom: 30px;
            transition: var(--transition);
        }
.config-section:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }
.config-header {
            background: var(--secondary);
            color: white;
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 15px;
        }
.config-header i {
            font-size: 1.5rem;
        }
.config-title {
            font-size: 1.3rem;
            font-weight: 600;
        }
.status-card {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
.status-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }
.status-icon {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
        }
.status-email {
            background: rgba(52, 152, 219, 0.1);
            color: var(--accent);
        }
.status-telegram {
            background: rgba(46, 204, 113, 0.1);
            color: var(--success);
        }
.status-browser {
            background: rgba(243, 156, 18, 0.1);
            color: var(--warning);
        }
.status-text {
            font-weight: 500;
        }
.status-value {
            font-size: 0.9rem;
            color: var(--text-light);
            margin-top: 5px;
        }
.status-enabled {
            background: var(--success);
            color: white;
        }
.status-disabled {
            background: var(--danger);
            color: white;
        }
.status-not-configured {
            background: var(--warning);
            color: white;
        }
.form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--text);
        }
.form-input {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            transition: var(--transition);
        }
.form-input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }
.form-help {
            font-size: 0.85rem;
            color: var(--text-light);
            margin-top: 5px;
        }
.setup-steps {
            background: #e7f3ff;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            border-left: 4px solid var(--accent);
        }
.setup-title {
            font-weight: 600;
            margin-bottom: 15px;
            color: var(--primary);
        }
.step-list {
            padding-left: 20px;
        }
.step-list li {
            margin-bottom: 10px;
            color: var(--text);
        }
.step-list code {
            background: rgba(0, 0, 0, 0.05);
            padding: 2px 6px;
            border-radius: 4px;
            font-family: monospace;
        }
.message {
            padding: 15px;
            border-radius: 6px;
            margin-bottom: 20px;
            display: none;
        }
.message-success {
            background: #d4edda;
            color: #155724;
            border-left: 4px solid var(--success);
        }
.message-error {
            background: #f8d7da;
            color: #721c24;
            border-left: 4px solid var(--danger);
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                padding: 10px;
            }

            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }

            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }

            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }

            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }

            .nav-link:hover,
            .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }

            .submenu .nav-link {
                padding-left: 30px;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 15px;
            }

            .status-card {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .status-info {
                width: 100%;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
        }
.symbol-form {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
            padding: 25px;
            background-color: white;
            border-radius: 8px;
            box-shadow: var(--card-shadow);
            flex-wrap: wrap;
            position: relative;
        }
.form-panels {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 30px;
        }
.form-panel-title {
            font-size: 1rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--light);
        }
.name-input-container {
            flex: 1;
            min-width: 200px;
        }
.name-input-container input {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
        }
.parsed-preview {
            font-size: 0.8rem;
            color: var(--text-light);
            margin-top: 5px;
            min-height: 18px;
        }
.parsed-preview.ready { color: var(--success); }
@media (max-width: 900px) { .form-panels { grid-template-columns: 1fr; } }
.symbol-input-container {
            flex: 1;
            min-width: 250px;
            position: relative;
        }
.symbol-form input {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            padding-left: 40px;
        }
.search-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-light);
            z-index: 2;
        }
.search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #ddd;
            border-radius: 0 0 6px 6px;
            max-height: 300px;
            overflow-y: auto;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            display: none;
        }
.search-result-item {
            padding: 12px 15px;
            cursor: pointer;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
.search-result-item:hover {
            background-color: #f5f7fa;
        }
.symbol-info {
            display: flex;
            flex-direction: column;
        }
.symbol-name {
            font-weight: bold;
            font-size: 1rem;
        }
.symbol-details {
            font-size: 0.85rem;
            color: var(--text-light);
        }
.symbol-form button {
            padding: 12px 20px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: bold;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 8px;
        }
.success {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
.error {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
.section-title {
            font-size: 1.5rem;
            color: var(--primary);
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--light);
            display: flex;
            align-items: center;
            gap: 10px;
        }
.symbols-list {
            list-style: none;
            padding: 0;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 15px;
        }
.symbols-list li {
            padding: 15px;
            background-color: white;
            border-radius: 8px;
            border-left: 4px solid var(--accent);
            box-shadow: var(--card-shadow);
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }
.symbol-item {
            display: flex;
            align-items: center;
            gap: 10px;
        }
.symbol-item:before {
            content: "•";
            color: var(--accent);
            font-weight: bold;
            font-size: 1.2rem;
        }
.symbols-list li:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }
            
            .sidebar {
                width: 100%;
                padding: 10px;
            }
            
            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }
            
            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }
            
            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }
            
            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }
            
            .nav-link:hover, .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }
            
            .submenu .nav-link {
                padding-left: 30px;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 15px;
            }
            
            .symbol-form {
                flex-direction: column;
            }
            
            .symbol-input-container {
                min-width: 100%;
            }
            
            .symbol-form .buttons {
                display: flex;
                gap: 10px;
                width: 100%;
            }
            
            .symbol-form button {
                flex: 1;
            }
            
            .symbols-list {
                grid-template-columns: 1fr;
            }
            
            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
        }
@media (max-width: 480px) {
            .content {
                padding: 20px;
            }
            
            .symbol-form {
                padding: 20px;
            }
        }
.register-container {
            background: white;
            border-radius: 15px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 400px;
            overflow: hidden;
        }
.register-header {
            background: var(--primary);
            color: white;
            padding: 30px;
            text-align: center;
        }
.register-header h1 {
            font-size: 2rem;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
        }
.register-form {
            padding: 30px;
        }
.flash-messages {
            margin-bottom: 20px;
        }
.flash-message {
            padding: 12px;
            border-radius: 6px;
            margin-bottom: 10px;
            font-weight: 500;
        }
.flash-success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
.flash-error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
.register-footer {
            text-align: center;
            padding: 20px;
            border-top: 1px solid #eee;
            color: #7f8c8d;
        }
.register-footer a {
            color: var(--accent);
            text-decoration: none;
        }
.register-footer a:hover {
            text-decoration: underline;
        }
.btn-success:hover:not(:disabled) {
            background: #27ae60;
        }
.btn-success:disabled {
            background: #95a5a6;
            cursor: not-allowed;
        }
.btn-danger:hover:not(:disabled) {
            background: #c0392b;
        }
.btn-danger:disabled {
            background: #95a5a6;
            cursor: not-allowed;
        }
.controls {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-bottom: 25px;
            flex-wrap: wrap;
        }
#status {
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 8px;
            text-align: center;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
.status-running {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
.status-stopped {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
.status-connecting {
            background-color: #cce5ff;
            color: #004085;
            border: 1px solid #b8daff;
        }
tr { 
            border-bottom: 1px solid #eee;
        }
tr:last-child {
            border-bottom: none;
        }
@media (max-width: 992px) {
            .dashboard {
                flex-direction: column;
            }
            
            .sidebar {
                width: 100%;
                padding: 10px;
            }
            
            .logo {
                padding: 10px;
                margin-bottom: 10px;
            }
            
            .nav-menu {
                display: flex;
                flex-direction: column;
                overflow-x: auto;
            }
            
            .nav-item {
                margin-bottom: 0;
                margin-right: 5px;
            }
            
            .nav-link {
                padding: 10px 15px;
                border-radius: 5px;
            }
            
            .nav-link:hover, .nav-link.active {
                border-left: none;
                border-bottom: 3px solid var(--accent);
            }
            
            .submenu .nav-link {
                padding-left: 30px;
            }
        }
@media (max-width: 768px) {
            .main-content {
                padding: 15px;
            }
            
            .controls {
                flex-direction: column;
                align-items: center;
            }
            
            .controls button {
                width: 100%;
                max-width: 250px;
            }
            
            th, td {
                padding: 12px 10px;
            }
            
            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
        }
@media (max-width: 480px) {
            th, td {
                padding: 10px 8px;
                font-size: 0.85rem;
            }
        }
.login-container {
            background: white;
            border-radius: 15px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 400px;
            overflow: hidden;
        }
.login-header {
            background: var(--primary);
            color: white;
            padding: 30px;
            text-align: center;
        }
.login-header h1 {
            font-size: 2rem;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
        }
.login-header p {
            opacity: 0.9;
        }
.login-form {
            padding: 30px;
        }
.login-footer {
            text-align: center;
            padding: 20px;
            border-top: 1px solid #eee;
            color: #7f8c8d;
        }
.login-footer a {
            color: var(--accent);
            text-decoration: none;
        }
.login-footer a:hover {
            text-decoration: underline;
        }
@media (max-width: 480px) {
            .login-header {
                padding: 20px;
            }
            
            .login-form {
                padding: 20px;
            }
            
            .login-header h1 {
                font-size: 1.5rem;
            }
        }


/* ================= RECOVERED COMPONENT STYLES ================= */

/* Index user-info and dashboard items */
.user-info { display: flex; align-items: center; gap: 15px; color: var(--text); font-weight: 500; }
.user-info i { color: var(--accent); }
.logout-btn { display: flex; align-items: center; gap: 8px; padding: 8px 15px; background: var(--danger); color: white; text-decoration: none; border-radius: 5px; transition: var(--transition); font-size: 0.9rem; }
.logout-btn:hover { background: #c0392b; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 30px; }
.dashboard-item { background: white; border-radius: 10px; overflow: hidden; box-shadow: var(--card-shadow); transition: var(--transition); text-decoration: none; color: var(--text); display: flex; flex-direction: column; height: 100%; }
.dashboard-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }
.icon-wrapper { width: 70px; height: 70px; border-radius: 50%; background: var(--light); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; transition: var(--transition); }
.dashboard-item:hover .icon-wrapper { background: var(--accent); transform: scale(1.1); }
.dashboard-item:hover .icon-wrapper i { color: white; }
.icon-wrapper i { font-size: 28px; color: var(--accent); transition: var(--transition); }
.dashboard-body { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.dashboard-title { font-size: 1.3rem; margin-bottom: 10px; color: var(--primary); }
.dashboard-description { color: var(--text-light); font-size: 0.95rem; line-height: 1.5; }
.dashboard-footer { padding: 15px 20px; background: #f9f9f9; display: flex; justify-content: flex-end; }
.btn-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: white; }
.summary-card { display: flex; align-items: center; gap: 15px; font-weight: 500; }

/* Order Form CSS Missing */
.order-panel-wrapper { display: grid; grid-template-columns: 420px 1fr; gap: 20px; align-items: start; }
.order-form-card { background: white; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); overflow: hidden; }
.order-tabs { display: flex; }
.tab-btn { flex: 1; padding: 14px; border: none; font-size: 1rem; font-weight: 700; cursor: pointer; transition: var(--transition); letter-spacing: 0.5px; }
.tab-btn.buy { background: #e8f8f0; color: var(--buy); }
.tab-btn.sell { background: #fdf0f0; color: var(--sell); }
.tab-btn.buy.active { background: var(--buy); color: white; }
.tab-btn.sell.active { background: var(--sell); color: white; }
.order-body { padding: 20px; }
.symbol-search-wrapper { position: relative; margin-bottom: 16px; }
.symbol-search-input { width: 100%; padding: 12px 40px 12px 14px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 1rem; transition: var(--transition); }
.symbol-search-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(52,152,219,0.15); }
.symbol-search-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-light); }
.symbol-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: white; border: 1px solid #e0e0e0; border-radius: 8px; max-height: 220px; overflow-y: auto; z-index: 100; box-shadow: 0 4px 20px rgba(0,0,0,0.12); display: none; }
.symbol-option { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f5f5f5; display: flex; justify-content: space-between; align-items: center; transition: background 0.15s; }
.symbol-option:hover { background: #f0f7ff; }
.symbol-option-name { font-weight: 600; font-size: 0.9rem; }
.symbol-option-full { font-size: 0.78rem; color: var(--text-light); }
.symbol-option-exch { font-size: 0.75rem; background: #eaf4fd; color: var(--accent); padding: 2px 6px; border-radius: 4px; }
.selected-symbol-banner { display: none; background: linear-gradient(135deg, #f0f7ff, #e8f4fd); border: 1px solid #bee3f8; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; align-items: center; justify-content: space-between; }
.selected-symbol-banner.visible { display: flex; }
.sym-name { font-weight: 700; font-size: 1rem; }
.sym-ltp-block { text-align: right; }
.sym-ltp { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.sym-change { font-size: 0.8rem; }
.sym-clear { cursor: pointer; color: var(--text-light); padding: 4px; border: none; background: none; font-size: 1rem; margin-left: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.form-row.single { grid-template-columns: 1fr; }
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 0.82rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.4px; }
.field-select, .field-input { padding: 10px 12px; border: 1.5px solid #e0e0e0; border-radius: 7px; font-size: 0.95rem; background: white; transition: var(--transition); color: var(--text); }
.field-select:focus, .field-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(52,152,219,0.1); }
.field-input:disabled { background: #f8f9fa; color: var(--text-light); }
.funds-strip { background: #f8f9fa; border-radius: 8px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 0.85rem; }
.funds-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.funds-label { color: var(--text-light); font-size: 0.75rem; }
.funds-value { font-weight: 700; color: var(--primary); }
.funds-required-value { color: var(--warning); font-weight: 700; }
.place-order-btn { width: 100%; padding: 14px; border: none; border-radius: 8px; font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: var(--transition); letter-spacing: 0.5px; }
.place-order-btn.buy { background: var(--buy); color: white; }
.place-order-btn.sell { background: var(--sell); color: white; }
.place-order-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.place-order-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.right-panel { display: flex; flex-direction: column; gap: 20px; }
.info-card { background: white; border-radius: 12px; box-shadow: var(--card-shadow); padding: 20px; }
.info-card h3 { font-size: 1rem; color: var(--primary); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.funds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fund-cell { background: #f8f9fa; border-radius: 8px; padding: 12px; text-align: center; }
.fund-cell-label { font-size: 0.75rem; color: var(--text-light); margin-bottom: 4px; }
.fund-cell-value { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.fund-cell-value.available { color: var(--buy); }
.orders-table-wrapper { overflow-x: auto; }
.empty-orders { text-align: center; padding: 30px; color: var(--text-light); }
.empty-orders i { font-size: 2rem; display: block; margin-bottom: 10px; color: #ddd; }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: white; border-radius: 14px; padding: 28px; width: 400px; max-width: 95vw; box-shadow: 0 20px 60px rgba(0,0,0,0.25); animation: slideUp 0.25s ease; }
.modal-header { font-size: 1.2rem; font-weight: 700; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.modal-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.9rem; }
.modal-row:last-of-type { border-bottom: none; }
.modal-row span:first-child { color: var(--text-light); }
.modal-row span:last-child { font-weight: 600; }
.modal-actions { display: flex; gap: 12px; margin-top: 20px; }
.modal-actions button { flex: 1; padding: 12px; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.modal-cancel-btn { background: #f0f0f0; color: var(--text); }
.modal-cancel-btn:hover { background: #e0e0e0; }
.modal-confirm-btn.buy { background: var(--buy); color: white; }
.modal-confirm-btn.sell { background: var(--sell); color: white; }

/* Portfolio Specific */
.exit-btn { background:#fff0f0; color:var(--sell); border:1px solid #fca5a5; padding:5px 14px; border-radius:6px; cursor:pointer; font-size:0.8rem; font-weight:600; transition:var(--transition); }
.exit-btn:hover { background:var(--sell); color:white; }
.modal-sym { font-size:1.1rem; font-weight:800; color:var(--primary); margin-bottom:4px; }
.modal-meta { font-size:0.82rem; color:var(--text-light); margin-bottom:18px; }
.exit-options { display:grid; gap:10px; }
.exit-option { border:2px solid #e5e7eb; border-radius:10px; padding:14px; cursor:pointer; transition:var(--transition); background:#fafafa; }
.exit-option:hover { border-color:var(--accent); background:#f0f7ff; }
.exit-option.selected { border-color:var(--accent); background:#e8f4fd; }
.exit-option-title { font-weight:700; font-size:0.9rem; margin-bottom:4px; display:flex; align-items:center; gap:8px; }
.exit-option-desc { font-size:0.78rem; color:var(--text-light); }
.price-input-row { margin-top:8px; display:none; }
.price-input-row input { width:100%; padding:9px 12px; border:1.5px solid #e0e0e0; border-radius:7px; font-size:0.92rem; transition:var(--transition); }
.price-input-row input:focus { border-color:var(--accent); outline:none; }

/* Backtesting Specific */
.card { background: white; border-radius: 10px; padding: 25px; margin-bottom: 30px; box-shadow: var(--card-shadow); transition: var(--transition); }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); }
.card.info { border-left: 4px solid var(--accent); }
.card h3 { margin-top: 0; margin-bottom: 15px; color: var(--primary); display: flex; align-items: center; gap: 10px; cursor: pointer; }
.card h3 .toggle-icon { transition: var(--transition); }
.card h3.collapsed .toggle-icon { transform: rotate(-90deg); }
.strategy-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 15px; }
.rule-item { padding: 10px; background: #f8f9fa; border-radius: 6px; border-left: 3px solid var(--accent); }
.rule-item strong { color: var(--primary); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 25px; }

/* Indicator specific filters */
.indicator-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; margin-bottom: 20px; }
.indicator-filters select, .indicator-filters input { min-width: 150px; }
.indicator-filters input[type="number"] { width: 80px; text-align: center; }
.indicator-filters .date-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.indicator-filters .date-inputs input { width: 100%; min-width: auto; }

.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-label { font-weight: 600; color: var(--text); font-size: 0.9rem; }
.filter-select, .filter-input { padding: 12px 15px; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; background-color: white; transition: var(--transition); }
.filter-input, .control-input { width: 100%; box-sizing: border-box; }
.date-inputs { display: flex; flex-direction: column; gap: 10px; }
.small-input { width: 100% !important; max-width: 150px; text-align: center; }
.medium-input { width: 100% !important; max-width: 180px; }
.btn-warning { background-color: var(--warning); color: white; }
.btn-warning:hover { background-color: #e67e22; transform: translateY(-2px); }
.chart-section { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.chart-container { background: white; border-radius: 10px; padding: 25px; box-shadow: var(--card-shadow); height: 400px; position: relative; overflow: hidden; }
.chart-container.full-width { grid-column: 1 / -1; height: 500px; }
.chart-tabs { display: flex; gap: 10px; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.chart-tab { padding: 8px 16px; background: #f8f9fa; border: none; border-radius: 4px; cursor: pointer; transition: var(--transition); font-size: 0.9rem; }
.chart-tab.active { background: var(--accent); color: white; }
.chart-tab:hover { background: var(--secondary); color: white; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-value { font-size: 1.8rem; font-weight: bold; margin: 10px 0; }
.stat-profit { color: var(--success); }
.stat-loss { color: var(--danger); }
.stat-neutral { color: var(--text); }
.stat-label { color: var(--text-light); font-size: 0.9rem; font-weight: 600; }
.stat-subtext { font-size: 0.8rem; color: var(--text-light); margin-top: 5px; }
.data-table { background: white; border-radius: 10px; padding: 25px; box-shadow: var(--card-shadow); overflow-x: auto; }
.trade-profit { color: var(--success); font-weight: bold; }
.trade-loss { color: var(--danger); font-weight: bold; }
.loading { text-align: center; padding: 40px; }
.summary-section { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.exit-reasons { background: white; border-radius: 10px; padding: 20px; box-shadow: var(--card-shadow); }
.reason-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; }
.reason-item:last-child { border-bottom: none; }
.pagination-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding: 15px 0; border-top: 1px solid #eee; }
.pagination-info { color: var(--text-light); font-size: 0.9rem; }
.pagination-buttons { display: flex; gap: 10px; align-items: center; }
.pagination-page { font-weight: bold; color: var(--primary); }
.advanced-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
.advanced-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 15px; }
.advanced-toggle.collapsed i { transform: rotate(-90deg); }
.advanced-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; }
.margin-input-group { display: flex; gap: 10px; align-items: center; }

@media (max-width: 1200px) {
    .order-panel-wrapper { grid-template-columns: 1fr; }
    .filters { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (max-width: 992px) {
    .strategy-rules { grid-template-columns: 1fr; }
    .summary-section { grid-template-columns: 1fr; }
    .chart-section { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .funds-grid { grid-template-columns: 1fr 1fr; }
    .filters { grid-template-columns: 1fr; }
    .results-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .results-grid { grid-template-columns: 1fr; }
    .controls-grid { grid-template-columns: 1fr; }
    .control-group .date-inputs { grid-template-columns: 1fr; }
}

/* ================= HISTORY & MONITORING DASHBOARD STYLES ================= */

/* Controls and Filters */
.controls-card { background: white; border-radius: 10px; padding: 25px; margin-bottom: 30px; box-shadow: var(--card-shadow); }
.controls-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.control-group { display: flex; flex-direction: column; gap: 8px; }
.control-label { font-weight: 600; color: var(--text); }
.control-select, .control-input { padding: 12px 15px; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; background-color: white; transition: var(--transition); }
.control-select:focus, .control-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); }
.control-select[multiple] { height: 150px; }
.control-group .date-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.buttons-row { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 20px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

.filter-container { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; padding: 20px; background: white; border-radius: 10px; box-shadow: var(--card-shadow); }
.filter-container label { font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.filter-container input, .filter-container select { padding: 10px 15px; border: 1px solid #ddd; border-radius: 6px; }
.btn-filter { background-color: var(--success); color: white; padding: 10px 15px; }
.btn-filter:hover { background-color: #27ae60; }

/* Data Tables & Containers */
.data-table-container, .table-container { background: white; border-radius: 10px; padding: 25px; box-shadow: var(--card-shadow); overflow-x: auto; margin-bottom: 30px; }
.table-container { padding: 0; }
.table-container table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.table-container th, .table-container td { padding: 15px 12px; text-align: center; border-bottom: 1px solid #eee; }
.table-container th { background-color: var(--primary); color: white; font-weight: 600; position: sticky; top: 0; white-space: nowrap; }
.table-container tr:hover, tr:nth-child(even):hover { background-color: #f8f9fa; }
.table-container tr:nth-child(even) { background-color: #f9f9f9; }

.table-info { margin-bottom: 15px; padding: 10px 15px; background-color: #f8f9fa; border-radius: 6px; border-left: 4px solid var(--accent); }

/* Table Specific Cells */
.symbol-cell { font-weight: 600; color: var(--primary); text-align: left; }
.ltp-cell { font-weight: bold; font-size: 15px; }
.range-cell { font-weight: 600; padding: 8px 12px; border-radius: 4px; }
.signal-cell { font-weight: bold; padding: 8px 12px; border-radius: 4px; }

/* Buttons & Pagination */
.btn-success { background-color: var(--success); color: white; }
.btn-success:hover { background-color: #27ae60; transform: translateY(-2px); }
.btn-danger { background-color: var(--danger); color: white; }
.btn-danger:hover { background-color: #c0392b; transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: white; }

.pagination { display: flex; justify-content: center; margin-top: 20px; gap: 10px; }
.page-btn { padding: 8px 12px; border: 1px solid #ddd; background: white; cursor: pointer; border-radius: 4px; }
.page-btn.active { background-color: var(--accent); color: white; border-color: var(--accent); }
.page-btn:hover:not(.active) { background-color: #f8f9fa; }

/* Dashboard Summaries & Stats */
.dashboard-summary, .stats-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 30px; }
.summary-card, .stat-card { background: white; padding: 15px; border-radius: 8px; box-shadow: var(--card-shadow); text-align: center; }
.summary-value { font-size: 1.5rem; font-weight: bold; color: var(--accent); margin: 10px 0; }
.stat-value { font-size: 1.5rem; font-weight: bold; margin: 10px 0; }
.summary-value.large { font-size: 2rem; }
.summary-label, .stat-label { font-size: 0.9rem; color: var(--text-light); }
.summary-value.updating { color: var(--warning); animation: pulse 1.5s infinite; }

/* Cards Grid & Headers */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 30px; }
.dashboard-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
@media (max-width: 992px) { .dashboard-cards { grid-template-columns: 1fr; } }

.card { background: white; border-radius: 10px; overflow: hidden; box-shadow: var(--card-shadow); transition: var(--transition); }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }
.card.alert { border-left: 4px solid var(--warning); }
.card.info { border-left: 4px solid var(--accent); }

.card-grid .card-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); background: var(--secondary); color: white; }
.card-grid .card-header h3 { margin: 0; display: flex; align-items: center; gap: 10px; color: white; }

.dashboard-cards .card-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 15px 20px; border-bottom: 1px solid #eee; background: white; color: var(--primary); }
.dashboard-cards .card-header h3 { margin: 0; color: var(--primary); display: flex; align-items: center; gap: 10px; }

.card-title { font-size: 1.1rem; font-weight: 600; }
.card-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.card-content.expanded { max-height: 500px; }
.card-body { padding: 20px; }
.card ul { margin: 0; padding-left: 20px; }
.card li { margin-bottom: 8px; padding: 5px 0; }
.card-footer { padding: 15px 20px; background: #f9f9f9; display: flex; justify-content: space-between; }

/* Metrics & Status Badges */
.metric { display: flex; justify-content: space-between; margin-bottom: 15px; }
.metric:last-child { margin-bottom: 0; }
.metric-label { color: var(--text-light); }
.metric-value { font-weight: 600; }

.status { padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }
.status-active { background: var(--success); color: white; }
.status-paused { background: var(--warning); color: white; }
.status-error { background: var(--danger); color: white; }

.status-badge { padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: bold; }
.status-success { background-color: #d4edda; color: #155724; }
.status-warning { background-color: #fff3cd; color: #856404; }
.status-error { background-color: #f8d7da; color: #721c24; }

.alert-badge { padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; }
.alert-badge.sell { background-color: var(--danger); color: white; }
.alert-badge.buy { background-color: var(--success); color: white; }

/* Empty States */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-light); }
.empty-state i { font-size: 2.5rem; margin-bottom: 15px; color: #ddd; }

/* Signal Indicators */
.signal-buy, .ema-buy { color: var(--success); font-weight: bold; }
.signal-sell, .ema-sell { color: var(--danger); font-weight: bold; }
.signal-none { color: var(--text-light); }

/* Range Legends */
.range-legend { font-weight: 500; }
.AWR10_H-AWR5_H { color: var(--danger); }
.ADR10_H-ADR5_H { color: var(--warning); }
.ADR5_L-ADR10_L { color: var(--accent); }
.AWR5_L-AWR10_L { color: var(--success); }

/* Results & Lists */
.results-container { background: white; border-radius: 10px; padding: 25px; box-shadow: var(--card-shadow); }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.results-title { font-size: 1.3rem; color: var(--primary); }
.success-list, .error-list { max-height: 300px; overflow-y: auto; }
.list-title { font-weight: 600; margin-bottom: 10px; padding-bottom: 5px; border-bottom: 2px solid #eee; }
.success-item, .error-item { padding: 10px 15px; margin-bottom: 8px; border-radius: 6px; border-left: 4px solid; }
.success-item { background-color: #d4edda; border-left-color: var(--success); }
.error-item { background-color: #f8d7da; border-left-color: var(--danger); }
.item-symbol { font-weight: 600; }
.item-details { font-size: 0.9rem; color: var(--text-light); }

/* Progress Bar */
.progress-container { margin: 20px 0; }
.progress-bar { width: 100%; height: 10px; background-color: #eee; border-radius: 5px; overflow: hidden; }
.progress-fill { height: 100%; background-color: var(--accent); transition: width 0.3s ease; }
.progress-text { text-align: center; margin-top: 5px; font-size: 0.9rem; color: var(--text-light); }

/* Miscellaneous Info / Warnings */
.info-card, .warning-card { padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.info-card { background-color: #e7f3ff; border-left: 4px solid var(--accent); }
.warning-card { background-color: #fff3cd; border-left: 4px solid var(--warning); }
.resolution-info { font-size: 0.85rem; color: var(--text-light); margin-top: 5px; }
.resolution-warning { color: var(--warning); font-weight: 500; }
#alertStatus { font-weight: 600; margin: 15px 0; }

/* Keyframes */
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }
@keyframes fa-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }


/* ================= RECOVERED MISSING STYLES ================= */

.progress-text { text-align: center;
            margin-top: 5px;
            font-size: 0.9rem;
            color: var(--text-light); }

.card-footer { padding: 15px 20px;
            background: #f9f9f9;
            display: flex;
            justify-content: space-between; }

.spinner { animation: rotate 2s linear infinite;
            font-size: 2rem;
            color: var(--accent); }

.filters select, .filters button { width: 100%; }

.success-item, .error-item { padding: 10px 15px;
            margin-bottom: 8px;
            border-radius: 6px;
            border-left: 4px solid; }

.sum-card { background:white; border-radius:10px; padding:16px 18px;
            box-shadow:var(--card-shadow); border-left:4px solid var(--accent); }

.dashboard-cards { display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 30px; }

.empty-state { text-align: center;
            padding: 40px 20px;
            color: var(--text-light); }

.sym-change { font-size: 0.8rem; }

.status-info { display: flex;
            align-items: center;
            gap: 15px;
            flex-grow: 1; }

.config-body { padding: 25px; }

.config-body .form-group {
    max-width: 100%;
    margin-bottom: 20px;
    display: block; /* Override the default flex column */
}

.page-btn { padding: 8px 12px;
            border: 1px solid #ddd;
            background: white;
            cursor: pointer;
            border-radius: 4px; }

.message-error { background: #f8d7da;
            color: #721c24;
            border-left: 4px solid var(--danger); }

.card.info { border-left: 4px solid var(--accent); }

.badge-sell { background:#fdf0f0; color:var(--sell); }

.page-header { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }

.card-header { display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            padding: 15px 20px;
            border-bottom: 1px solid #eee; }

.dashboard-cards { grid-template-columns: 1fr; }

.register-footer { text-align: center;
            padding: 20px;
            border-top: 1px solid #eee;
            color: #7f8c8d; }

.filter-container select { padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            background-color: white; }

.data-table { font-size: 0.85rem; }

.stat-label { color: var(--text-light);
            font-size: 0.9rem;
            font-weight: 600; }

.form-control { padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 1rem;
            outline: none;
            transition: border-color 0.3s; }

.bullish { color: var(--success);
            font-weight: 600; }

.margin-adjustment { display: flex;
            gap: 20px;
            align-items: center;
            flex-wrap: wrap; }

.login-header h1 { font-size: 2rem;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px; }

.btn-sm { padding: 8px 15px;
            font-size: 0.9rem; }

.medium-input { width: 120px !important; }

.btn { padding: 12px 20px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: bold;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 8px; }

.modal-confirm-btn.buy { background: var(--buy-color); color: white; }

.btn-primary:hover { background-color: #2980b9;
            transform: translateY(-2px); }

.card.info { border-left: 4px solid var(--success); }

.form-help { font-size: 0.85rem;
            color: var(--text-light);
            margin-top: 5px; }

.date-inputs { display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px; }

.toast.error { background: var(--sell-color); }

.low-level { color: var(--success);  /* Green for low values */
            font-weight: 500; }

.signal-none { color: var(--text-light); }

.exit-btn:hover { background:var(--sell); color:white; }

.name-input-container input { width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem; }

.dashboard { display:flex; min-height:100vh; }

.results-grid { grid-template-columns: repeat(2, 1fr); }

th, td { padding: 15px; 
            text-align: center;
            border-bottom: 1px solid #eee; }

th { background-color: var(--secondary);
            color: white;
            font-weight: 600;
            position: sticky;
            top: 0; }

@keyframes fadeIn { from{opacity:0;transform:translateY(10px) }

.info-card { background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 30px;
            box-shadow: var(--card-shadow);
            border-left: 4px solid var(--accent); }

.date-inputs { display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px; }

.signal-buy { color: var(--success); }

th,
        td { padding: 15px 12px;
            text-align: center;
            border-bottom: 1px solid #eee; }

.submenu.expanded { max-height: 500px; }

.symbol-option-exch { font-size: 0.75rem; background: #eaf4fd; color: var(--accent); padding: 2px 6px; border-radius: 4px; }

.modal-confirm-btn:disabled { opacity:.5; cursor:not-allowed; }

.symbol-search-input { width: 100%; padding: 12px 40px 12px 14px;
            border: 2px solid #e0e0e0; border-radius: 8px;
            font-size: 1rem; transition: var(--transition); }

.flash-messages { margin-bottom: 20px; }

.fund-cell-value.available { color: var(--buy-color); }

}

        @media (max-width: 768px) { .main-content {
                padding: 15px; }

.btn-success { background-color: var(--success);
            color: white; }

.btn-outline:hover { background-color: var(--success);
            color: white; }

.filters input { width: 80px;
            text-align: center; }

th, td { padding: 12px 10px; }

.submenu { list-style: none; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }

.range-cell { font-weight: 600;
            padding: 8px 12px;
            border-radius: 4px; }

.gap-up { color: var(--success);
            font-weight: 600; }

.page-btn.active { background-color: var(--accent);
            color: white;
            border-color: var(--accent); }

th, td { padding: 12px; 
            text-align: center;
            border-bottom: 1px solid #eee; }

.symbol-name { font-weight: bold;
            font-size: 1rem; }

.login-header h1 { font-size: 1.5rem; }

.pagination { display: flex;
            justify-content: center;
            margin-top: 20px;
            gap: 5px; }

.results-grid { display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px; }

.neutral { color:var(--text-light); }

.symbol-option-name { font-weight: 600; font-size: 0.9rem; }

.form-label { display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--primary); }

.table-container { background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            overflow-x: auto; }

.control-group { display: flex;
            flex-direction: column;
            gap: 8px; }

.reason-item:last-child { border-bottom: none; }

.success-list, .error-list { max-height: 300px;
            overflow-y: auto; }

.modal-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.9rem; }

.toast.error { background:var(--sell); }

.sym-clear { cursor: pointer; color: var(--text-light); padding: 4px; border: none; background: none; font-size: 1rem; margin-left: 8px; }

.resolution-warning { color: var(--warning);
            font-weight: 500; }

.symbol-form { padding: 20px; }

.exit-option { border:2px solid #e5e7eb; border-radius:10px; padding:14px;
            cursor:pointer; transition:var(--transition); background:#fafafa; }

.btn { padding: 12px 20px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 500;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 8px; }

.ema-value.secondary { background-color: #fff9e6;
            border-left-color: var(--warning);
            color: var(--warning); }

.logo h1 { font-size: 1.5rem;
            display: flex;
            align-items: center;
            gap: 10px; }

.selected-symbol-banner.visible { display: flex; }

.chart-tabs { display: flex;
            gap: 10px;
            margin-bottom: 15px;
            border-bottom: 1px solid #eee;
            padding-bottom: 10px; }

.login-header p { opacity: 0.9; }

.name-input-container { flex: 1;
            min-width: 200px; }

.control-select:focus,
        .control-input:focus { outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); }

.card-content.expanded { max-height: 500px; }

.btn-filter:hover { background-color: #27ae60; }

.strategy-rules { display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-top: 15px; }

.dashboard { display: flex; min-height: 100vh; }

.filters { display: flex;
            gap: 15px;
            align-items: center;
            flex-wrap: wrap;
            margin-bottom: 20px; }

.margin-info small { color: var(--text-light); }

.margin-info { margin-top: 10px;
            padding: 10px;
            background-color: #e7f3ff;
            border-radius: 6px;
            border-left: 4px solid var(--accent); }

.pagination-page { font-weight: bold;
            color: var(--primary); }

.symbol-info { display: flex;
            flex-direction: column; }

.header { flex-direction: column;
                align-items: flex-start;
                gap: 15px; }

.status-email { background: rgba(52, 152, 219, 0.1);
            color: var(--accent); }

.card { background: white;
            border-radius: 10px;
            box-shadow: var(--card-shadow);
            transition: var(--transition); }

.logo { padding: 0 20px 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            margin-bottom: 20px; }

.btn-success:hover { background: #27ae60; }

.filters { display: flex;
            gap: 15px;
            align-items: center;
            flex-wrap: wrap; }

.tab-btn.sell { background: #fdf0f0; color: var(--sell-color); }

.status-text { font-weight: 500; }

.message { padding: 15px;
            border-radius: 6px;
            margin-bottom: 20px;
            display: none; }

.period2-container.visible, .period3-container.visible { display: block; }

.btn-primary { background: var(--accent);
            color: white; }

.symbol-search-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-light); }

.sym-name { font-weight: 700; font-size: 1rem; }

.AWR5_L-AWR10_L { color: var(--success); }

.login-container { background: white;
            border-radius: 15px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 400px;
            overflow: hidden; }

.submenu-toggle::after { content: '\f107';
            font-family: 'Font Awesome 5 Free';
            font-weight: 900;
            margin-left: auto;
            transition: var(--transition); }

.search-result-item:hover { background-color: #f5f7fa; }

.tab-btn:hover { background:#f8f9fa; color:var(--primary); }

.ADR5_L-ADR10_L { color: var(--accent); }

.field-label { font-size: 0.82rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.4px; }

.signal-no { background-color: #f8f9fa;
            color: var(--text-light); }

.advanced-content { display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 15px; }

.slider { position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 24px; }

.funds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

input:checked + .slider { background-color: var(--success); }

.parsed-preview.ready { color: var(--success); }

}

        @media (max-width: 992px) { .dashboard {
                flex-direction: column; }

.search-results { position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #ddd;
            border-radius: 0 0 6px 6px;
            max-height: 300px;
            overflow-y: auto;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            display: none; }

.table-container { background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            overflow-x: auto;
            position: relative; }

.stat-value { font-size: 1.5rem;
            font-weight: bold;
            color: var(--accent); }

.success-item { background-color: #d4edda;
            border-left-color: var(--success); }

.filters { flex-direction: column;
                align-items: stretch; }

.chart-tab.active { background: var(--success);
            color: white; }

.exit-options { display:grid; gap:10px; }

.sum-label { font-size:0.78rem; color:var(--text-light); font-weight:600; text-transform:uppercase; letter-spacing:.4px; }

.btn-success:hover:not(:disabled) { background: #27ae60; }

}
        
        @media (max-width: 480px) { th, td {
                padding: 10px 6px;
                font-size: 0.8rem; }

.control-select[multiple] { height: 150px; }

th, td { padding: 15px; 
            text-align: left; }

.price-input-row input { width:100%; padding:9px 12px; border:1.5px solid #e0e0e0; border-radius:7px;
            font-size:0.92rem; transition:var(--transition); }

.modal-sym { font-size:1.1rem; font-weight:800; color:var(--primary); margin-bottom:4px; }

table { border-collapse: collapse; 
            width: 100%; 
            font-size: 0.95rem; }

.results-header { display: flex;
            justify-content: between;
            align-items: center;
            margin-bottom: 20px; }

.dashboard-item { background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            transition: var(--transition);
            text-decoration: none;
            color: var(--text);
            display: flex;
            flex-direction: column;
            height: 100%; }

.status-connecting { background-color: #cce5ff;
            color: #004085;
            border: 1px solid #b8daff; }

.badge-rejected { background: #fee2e2; color: #991b1b; }

.empty-state i { font-size: 3rem;
            margin-bottom: 15px;
            color: #ddd; }

.progress-container { margin: 20px 0; }

.sum-value.up { color:var(--buy); }

.status { padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500; }

}
        
        @media (max-width: 480px) { .page-title {
                font-size: 1.5rem; }

.fund-cell-label { font-size: 0.75rem; color: var(--text-light); margin-bottom: 4px; }

.symbol-option:hover { background: #f0f7ff; }

.dashboard-title { font-size: 1.3rem;
            margin-bottom: 10px;
            color: var(--primary); }

.symbol-form input { width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            padding-left: 40px; }

.chart-tab { padding: 8px 16px;
            background: #f8f9fa;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: var(--transition);
            font-size: 0.9rem; }

.controls-card { background: white;
            border-radius: 10px;
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: var(--card-shadow); }

.btn-secondary { background-color: var(--secondary);
            color: white; }

}
        .spinner { animation: spin 1s linear infinite; }

.status-enabled { background: var(--success);
            color: white; }

tr:nth-child(even):hover { background-color: #f1f1f1; }

table { border-collapse: collapse;
            width: 100%;
            font-size: 0.85rem; }

.form-panel-title { font-size: 1rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--light); }

.card { padding: 0; }

.login-header { background: var(--primary);
            color: white;
            padding: 30px;
            text-align: center; }

.summary-card { background: white;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            box-shadow: var(--card-shadow); }

.sum-value { font-size:1.4rem; font-weight:800; color:var(--primary); margin-top:4px; }

.icon-wrapper { width: 70px;
            height: 70px;
            border-radius: 50%;
            background: var(--light);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
            transition: var(--transition); }

.btn-outline:hover { background: var(--accent);
            color: white; }

.page-btn { padding: 8px 12px;
            border: 1px solid #ddd;
            background: white;
            cursor: pointer;
            border-radius: 4px;
            min-width: 40px; }

.data-table tr:hover { background-color: #f8f9fa; }

.card-header { background: var(--secondary);
            color: white;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center; }

.order-form-card { background: white;
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.12);
            overflow: hidden; }

.table-info { margin-bottom: 15px;
            padding: 10px 15px;
            background-color: #f8f9fa;
            border-radius: 6px;
            border-left: 4px solid var(--accent);
            font-size: 0.9rem;
            color: var(--text-light); }

.status-info { width: 100%; }

.trade-profit { color: var(--success);
            font-weight: bold; }

.register-form { padding: 30px; }

.search-icon { position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-light);
            z-index: 2; }

}
        .modal-header { font-size: 1.2rem; font-weight: 700; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }

.card h3 { margin-top: 0;
            margin-bottom: 15px;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer; }

.advanced-toggle.collapsed i { transform: rotate(-90deg); }

.card h3 .toggle-icon { transition: var(--transition); }

.tab-btn.buy { background: #e8f8f0; color: var(--buy-color); }

.symbol-cell { position: static;
                box-shadow: none; }

.margin-type, .margin-value { width: 100%; }

.form-group label { font-weight: 600;
            color: var(--secondary);
            font-size: 0.9rem; }

.alert-row:hover { background-color: #ffdada !important; }

.importance-medium { background-color: var(--warning);
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
            font-weight: bold; }

.stat-card { background: white;
            padding: 15px;
            border-radius: 8px;
            box-shadow: var(--card-shadow);
            text-align: center; }

.filters select, .filters input, .filters button { width: 100%; }

.card-grid { display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px; }

50% { opacity: 0.5; }

.card:hover { transform: translateY(-3px);
            box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); }

.dashboard-item:hover .icon-wrapper i { color: white; }

.form-label { display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--text); }

.has-submenu { position: relative; }

.filter-select:focus,
        .filter-input:focus { outline: none;
            border-color: var(--success);
            box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2); }

.ltp-cell { font-weight: bold;
            font-size: 15px; }

.form-input { width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            transition: var(--transition); }

.form-group { margin-bottom: 20px; }

}
        
        .symbol-input-container { flex: 1;
            min-width: 250px;
            position: relative; }

}
        
        @media (max-width: 480px) { .content {
                padding: 20px; }

.logo h1 { font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }

.modal-actions { display: flex; gap: 12px; margin-top: 20px; }

.tab-btn .tab-badge { background:var(--accent); color:white; border-radius:12px;
            padding:1px 8px; font-size:0.72rem; font-weight:700; }

.filter-container label { font-weight: 600;
            color: var(--primary); }

.status-not-configured { background: var(--warning);
            color: white; }

@keyframes spin { to { transform: rotate(360deg); }

.period-inputs input { width: 80px; }

.advanced-toggle i { transition: var(--transition); }

.place-order-btn.sell { background: var(--sell-color); color: white; }

.controls-card { flex-direction: column;
                align-items: stretch; }

.status-card { flex-direction: column;
                align-items: flex-start;
                gap: 15px; }

.modal-confirm-btn.sell { background: var(--sell-color); color: white; }

.toolbar-info { font-size:0.82rem; color:var(--text-light); }

.chart-container { background: white;
            border-radius: 10px;
            padding: 25px;
            box-shadow: var(--card-shadow);
            height: 400px;
            position: relative;
            overflow: hidden; }

.chart-section { grid-template-columns: 1fr; }

tr { border-bottom: 1px solid #eee; }

.metric { display: flex;
            justify-content: space-between;
            margin-bottom: 15px; }

.btn-outline { background-color: transparent;
            border: 2px solid var(--accent);
            color: var(--accent); }

.info-card li { margin-bottom: 5px; }

.has-submenu { position:relative; }

.tab-btn.sell.active { background: var(--sell-color); color: white; }

.controls-grid { grid-template-columns: 1fr; }

table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }

.logo { padding:0 20px 20px; border-bottom:1px solid rgba(255,255,255,0.1); margin-bottom:20px; }

@media(max-width:768px) { .dashboard { flex-direction:column; }

.stat-card { background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: var(--card-shadow);
            text-align: center;
            border-top: 4px solid var(--accent); }

.modal-actions button { flex: 1; padding: 12px; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: var(--transition); }

.badge-buy { background: #e8f8f0; color: var(--buy-color); }

.toast.success { background: var(--buy-color); }

.filter-container { display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 20px;
            padding: 20px;
            background: white;
            border-radius: 10px;
            box-shadow: var(--card-shadow); }

@keyframes slideUp { from{transform:translateY(30px);opacity:0 }

.funds-required-value { color: var(--warning); font-weight: 700; }

.controls-grid { display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 20px; }

.table-toolbar { display:flex; align-items:center; justify-content:space-between;
            padding:12px 18px; border-bottom:1px solid #eee; background:#fafbfc; }

.btn-outline:hover { background-color: var(--accent);
            color: white; }

.exit-option-title { font-weight:700; font-size:0.9rem; margin-bottom:4px; display:flex; align-items:center; gap:8px; }

.login-form { padding: 30px; }

.badge-pending { background: #fff3cd; color: #856404; }

.symbol-cell { font-weight: 600;
            color: var(--primary); }

.submenu { list-style: none;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease; }

.modal { background:white; border-radius:14px; width:420px; max-width:95vw;
            box-shadow:0 20px 60px rgba(0,0,0,0.25); animation:slideUp .25s ease;
            overflow:hidden; }

.field-select, .field-input { padding: 10px 12px; border: 1.5px solid #e0e0e0; border-radius: 7px;
            font-size: 0.95rem; background: white; transition: var(--transition);
            color: var(--text); }

.btn-primary:hover { background: #2980b9;
            transform: translateY(-2px); }

.progress-bar { width: 100%;
            height: 10px;
            background-color: #eee;
            border-radius: 5px;
            overflow: hidden; }

.sum-card.pos { border-left-color:var(--buy); }

table { border-collapse: collapse;
            width: 100%;
            font-size: 0.9rem; }

table { width:100%; border-collapse:collapse; font-size:0.875rem; }

.btn-danger { background: var(--danger);
            color: white; }

.dashboard-grid { grid-template-columns: 1fr; }

.empty-orders i { font-size: 2rem; display: block; margin-bottom: 10px; color: #ddd; }

.symbol-search-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(52,152,219,0.15); }

.card { background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            transition: var(--transition); }

.stat-subtext { font-size: 0.8rem;
            color: var(--text-light);
            margin-top: 5px; }

.margin-type label, .margin-value label { font-weight: 600;
            min-width: 120px; }

.page-btn:hover:not(.active) { background-color: #f8f9fa; }

.card-header h3 { margin: 0;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px; }

.reason-item { display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid #eee; }

.symbols-list li:hover { transform: translateY(-3px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); }

.chart-tabs { flex-wrap: wrap; }

.chart-tab:hover { background: var(--secondary);
            color: white; }

th { background-color: var(--primary);
            color: white;
            font-weight: 600; }

.btn-primary:hover { background: #2980b9; }

.symbol-item { display: flex;
            align-items: center;
            gap: 10px; }

.symbol-form { flex-direction: column; }

.form-control:focus { border-color: var(--accent); }

.modal-header.sell { color: var(--sell-color); }

td { padding: 9px 8px; border-bottom: 1px solid #eee; }

.logo { padding: 10px;
                margin-bottom: 10px; }

.exit-option:hover { border-color:var(--accent); background:#f0f7ff; }

.summary-section { display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 20px;
            margin-bottom: 20px; }

.dashboard-grid { display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px; }

.summary-value { font-size: 2rem;
            font-weight: bold;
            color: var(--accent);
            margin: 10px 0; }

.btn-outline { background: transparent;
            border: 1px solid var(--accent);
            color: var(--accent); }

.card { background: white;
            border-radius: 10px;
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: var(--card-shadow);
            transition: var(--transition); }

.item-symbol { font-weight: 600; }

.period-checkboxes { display: flex;
            gap: 20px;
            align-items: center; }

.submenu-toggle { cursor:pointer; }

.sum-value.down { color:var(--sell); }

.dashboard-item:hover { transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }

.dashboard-footer { padding: 15px 20px;
            background: #f9f9f9;
            display: flex;
            justify-content: flex-end; }

.empty-state { text-align: center;
            padding: 40px;
            color: var(--text-light);
            grid-column: 1 / -1; }

.btn-primary { background-color: var(--accent);
            color: white; }

.stat-card { background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: var(--card-shadow);
            text-align: center;
            border-top: 4px solid var(--success); }

.switch input { opacity: 0;
            width: 0;
            height: 0; }

.advanced-toggle { display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            color: var(--accent);
            font-weight: 600;
            margin-bottom: 15px; }

.controls button { width: 100%;
                max-width: 250px; }

.rule-item strong { color: var(--primary); }

.price-input-row input:focus { border-color:var(--accent); outline:none; }

.page-title { font-size: 1.5rem; }

@keyframes pulse { 0% {
                opacity: 1; }

.place-order-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }

.message { padding: 15px;
            margin: 20px 0;
            border-radius: 8px;
            text-align: center;
            font-weight: 500; }

tr:hover { background-color: #f8f9fa; }

.period-inputs input { width: 100%; }

.rule-item { padding: 10px;
            background: #f8f9fa;
            border-radius: 6px;
            border-left: 3px solid var(--success); }

.date-inputs { grid-template-columns: 1fr; }

.date-inputs input { width: 100%;
            min-width: auto; }

.filters select { padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            min-width: 200px;
            background-color: white;
            transition: var(--transition); }

.place-order-btn.buy { background: var(--buy-color); color: white; }

.field-select:focus, .field-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(52,152,219,0.1); }

tr:hover td { background: #f8f9fa; }

.card ul { margin: 0;
            padding-left: 20px; }

.control-label { font-weight: 600;
            color: var(--text); }

.page-btn:disabled { opacity: 0.5;
            cursor: not-allowed; }

.btn-filter { background-color: var(--success);
            color: white;
            padding: 10px 15px; }

.symbol-item:before { content: "•";
            color: var(--accent);
            font-weight: bold;
            font-size: 1.2rem; }

.error-item { background-color: #f8d7da;
            border-left-color: var(--danger); }

.page-title { font-size: 1.6rem; color: var(--primary); }

input:checked + .slider:before { transform: translateX(26px); }

.funds-grid { grid-template-columns: 1fr 1fr; }

.symbol-input-container { min-width: 100%; }

.register-footer a { color: var(--accent);
            text-decoration: none; }

.funds-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }

.logo i { color: var(--accent); }

.sum-card.neg { border-left-color:var(--sell); }

.filters-card { padding: 20px; }

.stat-value { font-size: 1.8rem;
            font-weight: bold;
            margin: 10px 0; }

to { transform:translateY(0);opacity:1 }

.user-info { width: 100%;
                justify-content: space-between; }

.page-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }

.setup-title { font-weight: 600;
            margin-bottom: 15px;
            color: var(--primary); }

.step-list code { background: rgba(0, 0, 0, 0.05);
            padding: 2px 6px;
            border-radius: 4px;
            font-family: monospace; }

.status-paused { background: var(--warning); }

.alert-badge { padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
            font-weight: bold; }

.summary-value.updating { color: var(--warning);
            animation: pulse 1.5s infinite; }

.card.alert { border-left: 4px solid var(--danger); }

.small-input,
            .medium-input { width: 100% !important; }

.ADR10_H-ADR5_H { color: var(--warning); }

.parsed-preview { font-size: 0.8rem;
            color: var(--text-light);
            margin-top: 5px;
            min-height: 18px; }

.filter-select,
        .filter-input { padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            background-color: white;
            transition: var(--transition); }

th { background:var(--primary); color:white; padding:11px 14px; text-align:left; font-weight:600; white-space:nowrap; position:sticky; top:0; }

.symbol-cell { font-weight: 600;
            color: var(--primary);
            background-color: #f8f9fa; }

}

        @media (max-width: 768px) { .main-content {
                padding: 20px; }

.ema-values { grid-template-columns: 1fr; }

.margin-value input { width: 80px;
            text-align: center; }

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

.field-input:disabled { background: #f8f9fa; color: var(--text-light); }

.symbols-list li { padding: 15px;
            background-color: white;
            border-radius: 8px;
            border-left: 4px solid var(--accent);
            box-shadow: var(--card-shadow);
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px; }

.badge-filled { background: #e3f9e5; color: #2d6a4f; }

.pagination { display: flex;
            justify-content: center;
            margin-top: 20px;
            gap: 10px;
            flex-wrap: wrap; }

.chart-section { display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 30px; }

.modal-row:last-of-type { border-bottom: none; }

.alert-badge.buy { background-color: var(--success);
            color: white; }

.rule-item { padding: 10px;
            background: #f8f9fa;
            border-radius: 6px;
            border-left: 3px solid var(--accent); }

.logo { padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; }

.filter-container label { font-weight: 600;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 8px; }

.login-footer { text-align: center;
            padding: 20px;
            border-top: 1px solid #eee;
            color: #7f8c8d; }

.btn { padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 600;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 8px;
            height: 42px; }

.symbol-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0;
            background: white; border: 1px solid #e0e0e0; border-radius: 8px;
            max-height: 220px; overflow-y: auto; z-index: 100;
            box-shadow: 0 4px 20px rgba(0,0,0,0.12); display: none; }

.modal-overlay.active { display:flex; }

.card h3.collapsed .toggle-icon { transform: rotate(-90deg); }

.status-success { background-color: #d4edda;
            color: #155724; }

.ema-buy { color: var(--success);
            font-weight: bold; }

.period-inputs { flex-direction: column; }

.info-card { background-color: #e7f3ff;
            padding: 15px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            border-left: 4px solid var(--accent);
            display: flex;
            align-items: center;
            gap: 10px; }

.tab-btn.active { color:var(--accent); border-bottom-color:var(--accent); background:#f0f7ff; }

.stats-summary { display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 20px; }

.margin-type select, .margin-value input { flex: 1; }

tr:hover td { background:#f5f8ff; }

.data-table th { background-color: var(--primary);
            color: white;
            padding: 12px 15px;
            text-align: left;
            font-weight: 600;
            position: sticky;
            top: 0; }

th { background-color: var(--primary);
            color: white;
            font-weight: 600;
            position: sticky;
            top: 0;
            white-space: nowrap; }

.card:hover { transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }

.filter-select:focus,
        .filter-input:focus { outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); }

.field-group { display: flex; flex-direction: column; gap: 5px; }

.form-group { max-width: 100%; }

.badge-cancelled { background: #f3f4f6; color: #6b7280; }

#alertStatus { font-weight: 600;
            margin: 15px 0; }

.btn-danger:disabled { background: #95a5a6;
            cursor: not-allowed; }

.advanced-toggle { display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            color: var(--success);
            font-weight: 600;
            margin-bottom: 15px; }

.symbol-option-full { font-size: 0.78rem; color: var(--text-light); }

.tab-btn { flex:1; padding:13px 20px; border:none; background:transparent;
            font-size:0.95rem; font-weight:600; cursor:pointer; color:var(--text-light);
            border-bottom:3px solid transparent; transition:var(--transition);
            display:flex; align-items:center; justify-content:center; gap:8px; }

.high-level { color: var(--danger);  /* Red for high values */
            font-weight: 500; }

.trade-loss { color: var(--danger);
            font-weight: bold; }

.symbol-form .buttons { display: flex;
                gap: 10px;
                width: 100%; }

.register-header { background: var(--primary);
            color: white;
            padding: 30px;
            text-align: center; }

.margin-value span { font-weight: 600;
            color: var(--accent); }

.date-inputs { display: flex;
            flex-direction: column;
            gap: 10px; }

th { background-color: var(--primary);
            color: white;
            font-weight: 600;
            position: sticky;
            top: 0; }

.filter-label { font-weight: 600;
            color: var(--text);
            font-size: 0.9rem; }

.submenu-toggle.expanded::after { transform:rotate(180deg); }

.filter-container input,
        .filter-container select { padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            width: 90px; }

.empty-state i { font-size:3rem; display:block; margin-bottom:14px; color:#ddd; }

th, td { padding: 10px 6px;
                font-size: 0.85rem; }

.results-grid { grid-template-columns: 1fr; }

.data-table-container { background: white;
            border-radius: 10px;
            padding: 25px;
            box-shadow: var(--card-shadow);
            overflow-x: auto; }

@keyframes slideUp { from { transform: translateY(30px); opacity: 0; }

to { opacity:1;transform:translateY(0) }

.AWR10_H-AWR5_H { color: var(--danger); }

.submenu-toggle { cursor: pointer; }

.advanced-section h4 { margin-bottom: 15px;
            color: var(--secondary);
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.1rem; }

}

        @media (max-width: 480px) { th,
            td {
                padding: 10px 6px;
                font-size: 0.8rem; }

.summary-label { color: var(--text-light);
            font-size: 0.9rem; }

.badge-buy { background:#e8f8f0; color:var(--buy); }

.resolution-info { font-size: 0.85rem;
            color: var(--text-light);
            margin-top: 5px; }

.place-order-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.range-legend { font-weight: 500; }

.exit-option.selected { border-color:var(--accent); background:#e8f4fd; }

.status-error { background-color: #fff3cd;
            color: #856404;
            border: 1px solid #ffeaa7; }

.login-form { padding: 20px; }

.fund-cell-value { font-size: 1.1rem; font-weight: 700; color: var(--primary); }

.symbol-form button { padding: 12px 20px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: bold;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 8px; }

}
        
        @media (max-width: 768px) { .main-content {
                padding: 15px; }

.data-table { background: white;
            border-radius: 10px;
            padding: 25px;
            box-shadow: var(--card-shadow);
            overflow-x: auto; }

.chart-tab.active { background: var(--accent);
            color: white; }

.funds-value { font-weight: 700; color: var(--primary); }

.user-info { display: flex;
            align-items: center;
            gap: 15px;
            color: var(--text);
            font-weight: 500; }

.flash-message { padding: 12px;
            border-radius: 6px;
            margin-bottom: 10px;
            font-weight: 500; }

.toast.success { background:var(--buy); }

.card.important { border-left: 4px solid var(--danger);
            background: linear-gradient(135deg, #fff 0%, #ffeaea 100%); }

.form-input { width: 100%;
            padding: 12px 15px;
            border: 2px solid #ddd;
            border-radius: 8px;
            font-size: 1rem;
            transition: all 0.3s ease; }

.logout-btn:hover { background: #c0392b; }

.loading { text-align: center;
            padding: 40px; }

.submenu { list-style:none; max-height:0; overflow:hidden; transition:max-height 0.3s ease; }

.icon-wrapper i { font-size: 28px;
            color: var(--accent);
            transition: var(--transition); }

.margin-type, .margin-value { display: flex;
            align-items: center;
            gap: 10px; }

.filter-container { flex-direction: column;
                align-items: stretch; }

.modal-row span:last-child { font-weight: 600; }

.page-title { font-size: 1.8rem;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 15px; }

.switch { position: relative;
            display: inline-block;
            width: 50px;
            height: 24px; }

.status-running { background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb; }

.btn-outline { background-color: transparent;
            border: 2px solid var(--success);
            color: var(--success); }

.empty-orders { text-align: center; padding: 30px; color: var(--text-light); }

.down { color:var(--sell); font-weight:700; }

.ema-values { display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin: 20px 0; }

.up { color:var(--buy);  font-weight:700; }

.step-list { padding-left: 20px; }

.control-select, .control-input { padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            background-color: white;
            transition: var(--transition); }

.info-card h3 { font-size: 1rem; color: var(--primary); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #eee; padding-bottom: 10px; }

.search-result-item { padding: 12px 15px;
            cursor: pointer;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center; }

.control-select:focus, .control-input:focus { outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); }

.buttons-row { flex-direction: column; }

th, td { padding: 12px 8px;
                font-size: 0.85rem; }

.sym-ltp-block { text-align: right; }

.buttons-row { display: flex;
            gap: 15px;
            flex-wrap: wrap;
            margin-top: 20px; }

.modal-confirm-btn:hover { opacity:.9; }

.card { padding: 20px; }

.info-card p { margin: 0;
            color: var(--text-light); }

.logo i { color:var(--accent); }

.modal-confirm-btn { width:100%; margin-top:18px; padding:13px; border:none; border-radius:8px;
            background:var(--sell); color:white; font-size:1rem; font-weight:700;
            cursor:pointer; transition:var(--transition); }

.filter-group { display: flex;
            flex-direction: column;
            gap: 8px; }

.flash-success { background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb; }

@media (max-width: 992px) { .dashboard {
                flex-direction: column; }

.chart-container.full-width { grid-column: 1 / -1;
            height: 500px; }

.filters-card { background: white;
            border-radius: 10px;
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: var(--card-shadow); }

#loadingSpinner { display: none;
            justify-content: center;
            align-items: center;
            padding: 40px;
            color: var(--accent);
            font-size: 2rem;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.8);
            z-index: 10; }

.checkbox-group input[type="checkbox"] { width: 18px;
            height: 18px; }

.small-input { width: 100px !important;
            text-align: center; }

.btn-danger { background-color: var(--danger);
            color: white; }

.filters { grid-template-columns: 1fr; }

.list-title { font-weight: 600;
            margin-bottom: 10px;
            padding-bottom: 5px;
            border-bottom: 2px solid #eee; }

.config-section:hover { transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }

.filter-container select { width: 140px; }

.signal-sell { background-color: var(--danger);
            color: white; }

.config-header i { font-size: 1.5rem; }

.sym-ltp { font-size: 1.3rem; font-weight: 800; color: var(--primary); }

.info-card { padding: 15px; }

to { opacity: 1; transform: translateY(0); }

.summary-section { grid-template-columns: 1fr; }

.page-title { font-size: 1.8rem;
            color: var(--primary); }

.login-footer a { color: var(--accent);
            text-decoration: none; }

.margin-input-group { display: flex;
            gap: 10px;
            align-items: center; }

.user-info i { color: var(--accent); }

.dashboard { display: flex;
            min-height: 100vh; }

.filters select:focus, .filters input:focus { outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); }

.tab-btn.buy.active { background: var(--buy-color); color: white; }

.step-list li { margin-bottom: 10px;
            color: var(--text); }

.btn:disabled { opacity: 0.6;
            cursor: not-allowed;
            transform: none !important; }

.btn-secondary:hover { background-color: #2c3e50;
            transform: translateY(-2px); }

@keyframes fa-spin { 0% {
                transform: rotate(0deg); }

.badge-cnc { background:#f3e8ff; color:#7c3aed; }

.filters select:focus { outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); }

.card li { margin-bottom: 8px;
            padding: 5px 0; }

.stat-label { font-size: 0.9rem;
            color: var(--text-light); }

.config-header { background: var(--secondary);
            color: white;
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 15px; }

.results-container { background: white;
            border-radius: 10px;
            padding: 25px;
            box-shadow: var(--card-shadow); }

}
        
        @media (max-width: 768px) { .main-content {
                padding: 20px; }

.info-card ul { margin-left: 20px;
            margin-top: 10px; }

.status-warning { background-color: #fff3cd;
            color: #856404; }

.summary-strip { grid-template-columns:1fr 1fr; }

.warning-card { background-color: #fff3cd;
            padding: 15px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            border-left: 4px solid var(--warning);
            display: flex;
            align-items: center;
            gap: 10px; }

.modal-header.buy { color: var(--buy-color); }

.status-stopped { background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb; }

.status-badge { padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: bold; }

.filter-input { width: 100%; }

td { padding:11px 14px; border-bottom:1px solid #eef0f3; white-space:nowrap; }

.results-title { font-size: 1.3rem;
            color: var(--primary); }

.status-card { background: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            box-sizing: border-box; }

.table-container { background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: var(--card-shadow); }

.submenu-toggle::after { content:'\f107'; font-family:'Font Awesome 5 Free'; font-weight:900; margin-left:auto; transition:var(--transition); }

.submenu-toggle.expanded::after { transform: rotate(180deg); }

.status-error { background: var(--danger); }

@media (max-width: 480px) { .login-header {
                padding: 20px; }

tr:last-child { border-bottom: none; }

.checkbox-group { display: flex;
            align-items: center;
            gap: 8px; }

.dashboard-description { color: var(--text-light);
            font-size: 0.95rem;
            line-height: 1.5; }

.progress-fill { background:var(--accent); height:100%; border-radius:4px; }

.filters { display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 15px;
            margin-bottom: 20px; }

.modal-cancel-btn:hover { background: #e0e0e0; }

.period-checkboxes { flex-direction: column;
                align-items: flex-start;
                gap: 10px; }

.table-container { background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            margin-bottom: 30px;
            overflow-x: auto; }

.empty-state i { font-size: 2.5rem;
            margin-bottom: 15px;
            color: #ddd; }

.price-input-row { margin-top:8px; display:none; }

th, td { padding: 12px 8px;
                font-size: 0.9rem; }

.funds-label { color: var(--text-light); font-size: 0.75rem; }

.config-title { font-size: 1.3rem;
            font-weight: 600; }

100% { opacity: 1; }

.form-input:focus { outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); }

.data-table th,
            .data-table td { padding: 8px 10px; }

.filters button:hover { background-color: #2980b9;
            transform: translateY(-2px); }

.metric:last-child { margin-bottom: 0; }

.btn-warning:hover { background-color: #e67e22;
            transform: translateY(-2px); }

.status-telegram { background: rgba(46, 204, 113, 0.1);
            color: var(--success); }

.dashboard-cards { display: grid;
            grid-template-columns: 1fr;
            gap: 20px;
            margin-bottom: 30px; }

.chart-container { background: white;
            border-radius: 10px;
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: var(--card-shadow);
            height: 400px; }

.tab-btn.active .tab-badge { background:var(--accent); }

.data-table { width: 100%;
            border-collapse: collapse;
            margin-top: 20px; }

.controls { flex-direction: column;
                align-items: center; }

.period2-container, .period3-container { display: none; }

.empty-state { text-align: center;
            padding: 40px;
            color: var(--text-light); }

.form-group { display: flex;
            flex-direction: column;
            gap: 8px;
            flex: 1;
            max-width: 300px; }

.card.alert { border-left: 4px solid var(--warning); }

.btn-success { background: var(--success);
            color: white; }

.metric-label { color: var(--text-light); }

.signal-buy { background-color: var(--success);
            color: white; }

.gap-down { color: var(--danger);
            font-weight: 600; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }

.advanced-section { margin-bottom: 25px; }

.card-header { display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            margin-bottom: 15px; }

.symbol-cell { font-weight: 600;
            color: var(--primary);
            text-align: left;
            position: sticky;
            left: 0;
            background-color: white;
            z-index: 1;
            box-shadow: 2px 0 0 #eee; }

.header { flex-direction: column;
                align-items: flex-start;
                gap: 10px; }

.header { display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px; }

.modal-confirm-btn:hover { opacity: 0.9; }

.form-panels { display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 30px; }

.stat-neutral { color: var(--text); }

.signal-cell { font-weight: bold;
            padding: 8px 12px;
            border-radius: 4px; }

.sym-change.up { color: var(--buy-color); }

.status-browser { background: rgba(243, 156, 18, 0.1);
            color: var(--warning); }

.dashboard { flex-direction: column; }

.pagination-controls { flex-direction: column;
                gap: 10px;
                text-align: center; }

.symbol-details { font-size: 0.85rem;
            color: var(--text-light); }

.flash-error { background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb; }

.status-active { background: var(--success); }

.modal-row span:first-child { color: var(--text-light); }

.chart-tab { font-size: 0.8rem;
                padding: 6px 12px; }

.error { background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb; }

.dashboard-item:hover .icon-wrapper { background: var(--accent);
            transform: scale(1.1); }

th,
        td { padding: 12px 8px;
            text-align: center;
            border-bottom: 1px solid #eee; }

.filters { grid-template-columns: 1fr 1fr; }

.symbols-list { grid-template-columns: 1fr; }

.symbol-option { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f5f5f5;
            display: flex; justify-content: space-between; align-items: center;
            transition: background 0.15s; }

.page-title { font-size:1.6rem; color:var(--primary); display:flex; align-items:center; gap:12px; }

.fund-cell { background: #f8f9fa; border-radius: 8px; padding: 12px; text-align: center; }

.form-row.single { grid-template-columns: 1fr; }

.info-card { background: white; border-radius: 12px; box-shadow: var(--card-shadow); padding: 20px; }

table { border-collapse: collapse;
            width: 100%;
            font-size: 0.9rem;
            min-width: 800px; }

.advanced-section { margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid #eee; }

th { background: var(--primary); color: white; padding: 10px 8px; text-align: left; font-weight: 600; }

}
        @media (max-width: 768px) { .sidebar { width: 100%; }

.btn-success:hover { background-color: #27ae60;
            transform: translateY(-2px); }

.advanced-options { margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid #eee; }

@keyframes rotate { 100% {
                transform: rotate(360deg); }

@media (max-width: 900px) { .form-panels { grid-template-columns: 1fr; }

.btn { width: 100%;
            padding: 12px;
            border: none;
            border-radius: 8px;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px; }

.item-details { font-size: 0.9rem;
            color: var(--text-light); }

.message-success { background: #d4edda;
            color: #155724;
            border-left: 4px solid var(--success); }

.control-select,
        .control-input { padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            background-color: white;
            transition: var(--transition); }

.results-grid { display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 20px; }

.metric-value { font-weight: 600; }

.status-badge { padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 500; }

.modal-meta { font-size:0.82rem; color:var(--text-light); margin-bottom:18px; }

.exit-option-desc { font-size:0.78rem; color:var(--text-light); }

.status-error { background-color: #f8d7da;
            color: #721c24; }

th, td { padding: 15px 12px; 
            text-align: center;
            border-bottom: 1px solid #eee; }

.pagination-controls { display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 15px;
            padding: 15px 0;
            border-top: 1px solid #eee; }

.period-inputs { display: flex;
            gap: 10px; }

.btn-danger:hover { background: #c0392b; }

.symbol-form button { flex: 1; }

.btn { padding: 8px 15px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 500;
            transition: var(--transition); }

.info-card p { margin: 0;
            color: var(--text-light);
            margin-bottom: 10px; }

.controls-card { background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 30px;
            box-shadow: var(--card-shadow);
            display: flex;
            gap: 20px;
            align-items: end; }

.modal-cancel-btn { background: #f0f0f0; color: var(--text); }

.submenu-toggle::after { content: '\f107'; font-family: 'Font Awesome 5 Free'; font-weight: 900; margin-left: auto; transition: var(--transition); }

.btn-danger:hover:not(:disabled) { background: #c0392b; }

.orders-table-wrapper { overflow-x: auto; }

.card h3 { margin-top: 0;
            margin-bottom: 15px;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px; }

.pagination-buttons { display: flex;
            gap: 10px;
            align-items: center; }

.btn-warning { background-color: var(--warning);
            color: white; }

.register-container { background: white;
            border-radius: 15px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 400px;
            overflow: hidden; }

.btn-primary:active { transform: scale(0.98); }

.register-footer a:hover { text-decoration: underline; }

table { border-collapse: collapse; 
            width: 100%; 
            font-size: 0.9rem;
            min-width: 1000px; }

#status { padding: 15px;
            margin-bottom: 20px;
            border-radius: 8px;
            text-align: center;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px; }

.table-info { margin-bottom: 15px;
            padding: 10px 15px;
            background-color: #f8f9fa;
            border-radius: 6px;
            border-left: 4px solid var(--accent); }

.pagination { display: flex;
            justify-content: center;
            margin-top: 20px;
            gap: 10px; }

.logo h1 { font-size:1.3rem; display:flex; align-items:center; gap:10px; }

}
        .modal-header { background:var(--sell); color:white; padding:16px 20px;
            display:flex; align-items:center; justify-content:space-between;
            font-size:1.05rem; font-weight:700; }

}

        @media (max-width: 480px) { .results-grid {
                grid-template-columns: 1fr; }

.sym-change.down { color: var(--sell-color); }

.tab-btn { flex: 1; padding: 14px; border: none; font-size: 1rem; font-weight: 700;
            cursor: pointer; transition: var(--transition); letter-spacing: 0.5px; }

.btn { padding: 8px 15px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 500;
            transition: var(--transition);
            text-decoration: none;
            display: inline-block;
            text-align: center; }

.modal { background: white; border-radius: 14px; padding: 28px;
            width: 400px; max-width: 95vw; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
            animation: slideUp 0.25s ease; }

.pagination-info { color: var(--text-light);
            font-size: 0.9rem; }

.controls-grid { display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 20px; }

.refresh-btn { background:var(--accent); color:white; border:none;
            padding:8px 16px; border-radius:7px; cursor:pointer;
            font-size:0.85rem; font-weight:600; display:flex; align-items:center; gap:6px; }

to { transform: translateY(0); opacity: 1; }

.card { background: white;
            border-radius: 10px;
            padding: 25px;
            box-shadow: var(--card-shadow);
            transition: var(--transition); }

.register-header h1 { font-size: 2rem;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px; }

.login-footer a:hover { text-decoration: underline; }

.filters select, .filters input { padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 1rem;
            min-width: 150px;
            background-color: white;
            transition: var(--transition); }

.checkbox-group { display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px; }

th,
            td { padding: 10px 6px;
                font-size: 0.8rem; }

.refresh-btn:hover { background:#2980b9; }

.status-icon { width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem; }

.card-content { max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease; }

.card-title { font-size: 1.1rem;
            font-weight: 600; }

.stat-profit { color: var(--success); }

.setup-steps { background: #e7f3ff;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            border-left: 4px solid var(--accent); }

.filter-container { display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
            padding: 20px;
            background: white;
            border-radius: 10px;
            box-shadow: var(--card-shadow); }

.submenu.expanded { max-height:500px; }

.info-card ul { color: var(--text-light);
            margin-left: 20px;
            font-size: 0.95rem; }

.empty-state { text-align: center;
            padding: 60px 20px;
            color: var(--text-light); }

.ema-value { font-size: 1.5rem;
            font-weight: bold;
            color: var(--accent);
            text-align: center;
            padding: 20px;
            background-color: #e7f3ff;
            border-radius: 8px;
            border-left: 4px solid var(--accent); }

.slider:before { position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .4s;
            border-radius: 50%; }

.signal-sell { color: var(--danger); }

.auto-refresh { display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 15px; }

.table-wrap { overflow-x:auto; }

.bearish { color: var(--danger);
            font-weight: 600; }

.alert-badge.sell { background-color: var(--danger);
            color: white; }

.exit-reasons { background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: var(--card-shadow); }

.btn-success:disabled { background: #95a5a6;
            cursor: not-allowed; }

.data-table td { padding: 12px 15px;
            border-bottom: 1px solid #eee; }

.card-grid { grid-template-columns: 1fr; }

.status-value { font-size: 0.9rem;
            color: var(--text-light);
            margin-top: 5px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); }

.badge-intraday { background:#e3f0ff; color:var(--accent); }

}
        
        @media (max-width: 480px) { th, td {
                padding: 10px 8px;
                font-size: 0.85rem; }

.filters button { padding: 12px 20px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: bold;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 8px;
            background-color: var(--accent);
            color: white; }

.ema-value.tertiary { background-color: #e6f3ff;
            border-left-color: var(--accent);
            color: var(--accent); }

.stat-loss { color: var(--danger); }

.btn { width: 100%; }

100% { transform: rotate(360deg); }

.modal-overlay.active { display: flex; }

.badge-sell { background: #fdf0f0; color: var(--sell-color); }

.ema-value { font-size: 1.3rem; }

.modal-close { background:none; border:none; color:white; cursor:pointer; font-size:1.2rem; }

.status-disabled { background: var(--danger);
            color: white; }

.logout-btn { display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 15px;
            background: var(--danger);
            color: white;
            text-decoration: none;
            border-radius: 5px;
            transition: var(--transition);
            font-size: 0.9rem; }

.btn-danger:hover { background-color: #c0392b;
            transform: translateY(-2px); }

th,
            td { padding: 12px 8px;
                font-size: 0.85rem; }

.success { background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb; }

.progress-fill { height: 100%;
            background-color: var(--accent);
            transition: width 0.3s ease; }

.spinner { animation: rotate 2s linear infinite;
            font-size: 2rem;
            color: var(--success); }

/* ================= WATCHLIST STYLES ================= */

/* Watchlist Tabs */
.watchlist-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    overflow-x: auto;
    white-space: nowrap;
}

.watchlist-tab {
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    background: #f8f9fa;
    color: var(--text);
}

.watchlist-tab:hover {
    background: #f0f7ff;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.watchlist-tab.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.watchlist-tab .count-badge {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.watchlist-tab.active .count-badge {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Watchlist Tables Container */
.watchlist-table-container {
    display: none;
    animation: fadeIn 0.3s ease;
}

.watchlist-table-container.active {
    display: block;
}

/* Watchlist Tables */
.watchlist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.watchlist-table th {
    background: var(--primary);
    color: white;
    padding: 12px 15px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
    font-weight: 600;
    white-space: nowrap;
}

.watchlist-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.watchlist-table tr:hover {
    background: #f5f8ff;
}

.watchlist-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.watchlist-table tr:nth-child(even):hover {
    background-color: #f1f1f1;
}

/* Watchlist Header */
.watchlist-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

.watchlist-header h3 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.watchlist-header .badge {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* LTP and Change Colors */
.ltp-positive {
    color: var(--success);
    font-weight: 700;
}

.ltp-negative {
    color: var(--danger);
    font-weight: 700;
}

.change-positive {
    color: var(--success);
}

.change-negative {
    color: var(--danger);
}

/* Watchlist Management Button */
.watchlist-manager {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 1000;
}

.manage-watchlists-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.manage-watchlists-btn:hover {
    transform: scale(1.1) rotate(90deg);
    background: #2980b9;
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.color-option {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.color-option:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.color-option.selected {
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--accent);
}

/* Watchlist Badges on Symbols Page */
.watchlist-badges {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
}

.watchlist-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    background: var(--accent);
    white-space: nowrap;
}

.watchlist-select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.watchlist-select:hover {
    border-color: var(--accent);
}

.watchlist-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Modal Enhancements for Watchlist Manager */
.modal .modal-header {
    background: var(--primary);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal .modal-header .modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.8;
    transition: var(--transition);
}

.modal .modal-header .modal-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.modal .modal-body {
    padding: 20px;
}

.modal .modal-body h4 {
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Watchlist Items in Manager */
.watchlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.watchlist-item:hover {
    background: #f8f9fa;
}

.watchlist-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.watchlist-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.watchlist-item-name {
    font-weight: 600;
    color: var(--text);
}

.watchlist-item-desc {
    font-size: 0.8rem;
    color: var(--text-light);
}

.watchlist-actions {
    display: flex;
    gap: 8px;
}

.watchlist-actions .btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Empty State for Watchlists */
.empty-watchlist {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
}

.empty-watchlist i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ddd;
}

/* Watchlist Count Badge */
.watchlist-count {
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: 8px;
}

/* Responsive Design for Watchlists */
@media (max-width: 992px) {
    .watchlist-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .watchlist-tab {
        flex: 0 0 auto;
    }
    
    .watchlist-manager {
        right: 20px;
        bottom: 20px;
    }
    
    .manage-watchlists-btn {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .watchlist-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .watchlist-table {
        font-size: 0.85rem;
    }
    
    .watchlist-table th,
    .watchlist-table td {
        padding: 10px;
    }
    
    .color-picker {
        gap: 8px;
    }
    
    .color-option {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .watchlist-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .watchlist-table th,
    .watchlist-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    .watchlist-header h3 {
        font-size: 1rem;
    }
    
    .modal {
        width: 95%;
        margin: 10px;
    }
    
    .watchlist-manager {
        right: 15px;
        bottom: 15px;
    }
    
    .manage-watchlists-btn {
        width: 44px;
        height: 44px;
    }
}

/* Animation for watchlist switching */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Drag and drop reordering styles (if you implement it later) */
.watchlist-symbol-draggable {
    cursor: move;
    user-select: none;
}

.watchlist-symbol-draggable.dragging {
    opacity: 0.5;
    background: var(--accent);
    color: white;
}

.watchlist-symbol-drag-over {
    border-top: 2px solid var(--accent);
}

/* Tooltip for watchlist info */
.watchlist-tooltip {
    position: relative;
    display: inline-block;
}

.watchlist-tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: var(--primary);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
}

.watchlist-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Watchlist summary stats */
.watchlist-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.watchlist-summary-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: var(--card-shadow);
    text-align: center;
    border-left: 4px solid var(--accent);
}

.watchlist-summary-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin: 5px 0;
}

.watchlist-summary-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Quick actions for watchlists */
.watchlist-quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.watchlist-quick-action {
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.watchlist-quick-action:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.fa-spin { animation: fa-spin 1s infinite linear; }

/* ── Per-Strategy Alert Toggle ─────────────────────────────── */
.btn-alert-on  { background: var(--success); color: white; }
.btn-alert-on:hover  { background: #27ae60; transform: translateY(-1px); }
.btn-alert-off { background: var(--danger);  color: white; }
.btn-alert-off:hover { background: #c0392b; transform: translateY(-1px); }