@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');/* ===== CSS Variables - Dark Theme (Default) ===== */
:root,
:root.dark {
  /* Backgrounds */
  --bg-primary: #010416;
  --bg-secondary: #050c28;
  --bg-elevated: #0b1738;
  --bg-card: #0b1738;
  --bg-panel: #050c28;
  --bg-dark: #010416;

  /* Text Colors */
  --text-primary: #f4f6ff;
  --text-secondary: #dbe7ff;
  --text-muted: #8a96bf;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);

  /* Accent Colors */
  --accent: #6c63ff;
  --accent-strong: #a76bff;
  --accent-glow: rgba(108, 99, 255, 0.35);

  /* Status Colors */
  --success: #43e6b1;
  --danger: #ff8b8b;
  --warning: #BFC9D1;

  /* Gradients */
  --gradient-bg: radial-gradient(circle at top, rgba(47, 72, 159, 0.45), transparent 55%),
    linear-gradient(135deg, #010416 0%, #030a20 50%, #050c28 100%);
}

/* ===== CSS Variables - Light Theme ===== */
:root.light {
  /* Backgrounds - Premium soft whites with subtle blue tint */
  --bg-primary: #FAFBFF;
  /* Soft blue-tinted white for main background */
  --bg-secondary: #F4F6FA;
  /* Light cool gray for secondary surfaces */
  --bg-elevated: #FFFFFF;
  /* Pure white for elevated cards */
  --bg-card: #FFFFFF;
  /* Pure white for cards */
  --bg-panel: #EEF1F7;
  /* Slightly darker panel background */
  --bg-dark: #E8ECF4;
  /* Darkest background shade */

  /* Text Colors - Rich, readable with excellent contrast */
  --text-primary: #1A202C;
  /* Deep charcoal for primary text */
  --text-secondary: #2D3748;
  /* Medium gray for secondary text */
  --text-muted: #718096;
  /* Soft gray for subtle/muted text */

  /* Borders - Elegant and subtle */
  --border-subtle: rgba(100, 116, 139, 0.12);
  --border-medium: rgba(100, 116, 139, 0.20);

  /* Accent Colors - Refined indigo matching dark mode aesthetic */
  --accent: #6366F1;
  /* Professional indigo */
  --accent-strong: #4F46E5;
  /* Deeper indigo for emphasis */
  --accent-glow: rgba(99, 102, 241, 0.15);

  /* Status Colors - Vibrant and clear on light background */
  --success: #059669;
  /* Rich emerald green */
  --danger: #DC2626;
  /* Clear, bold red */
  --warning: #BFC9D1;
  /* Warm amber */

  /* Gradients - Soft, elegant multi-layer background */
  --gradient-bg: linear-gradient(180deg, #FAFBFF 0%, #F0F3FA 50%, #E8ECF4 100%);
}

/* ===== Base Styles ===== */
:root {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--gradient-bg);
  color: var(--text-primary);
  transition: background 0.3s ease, color 0.3s ease;
}

#root {
  min-height: 100vh;
}

a {
  color: var(--accent);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-strong);
}

/* ===== Access Restricted Fallback ===== */
.access-restricted {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  min-height: 50vh;
  gap: 1rem;
}

.access-restricted__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 139, 139, 0.08);
  border: 1px solid rgba(255, 139, 139, 0.2);
  color: var(--danger);
  margin-bottom: 0.5rem;
}

.access-restricted__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.access-restricted__message {
  max-width: 420px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}


/* ===== Modern Trading Platform Layout ===== */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --topbar-height: 64px;

    --bg-primary: #0a0e1a;
    --bg-secondary: #12161f;
    --bg-elevated: #1a1f2e;
    --bg-card: #1e2433;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.12);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);

    --accent: #6c63ff;
    --accent-hover: #5a52e0;
    --accent-glow: rgba(108, 99, 255, 0.4);

    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --error: #ef4444;
    --error-glow: rgba(239, 68, 68, 0.3);
    --warning: #BFC9D1;
    --info: #3b82f6;

    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}
* {
    box-sizing: border-box;
}
body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* ===== App Layout Grid ===== */
.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: grid-template-columns 0.3s var(--transition-smooth);
}
.app-layout:has(.sidebar.collapsed) {
    grid-template-columns: var(--sidebar-collapsed-width) 1fr;
}
/* ===== Sidebar ===== */
.sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s var(--transition-smooth);
    z-index: 100;
}
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}
.sidebar.collapsed .sidebar__brand {
    padding: 2rem 0.75rem;
    justify-content: center;
}
.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem;
}
.sidebar.collapsed .user-info {
    justify-content: center;
    padding: 0.75rem;
}
.sidebar.collapsed .btn-signin {
    justify-content: center;
    padding: 0.875rem;
}
/* ===== Sidebar Brand ===== */
.sidebar__brand {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s var(--transition-smooth);
}
.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px var(--accent-glow);
    flex-shrink: 0;
    transition: all 0.3s var(--transition-smooth);
}
.brand-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--accent-glow);
}
.brand-text {
    overflow: hidden;
    transition: opacity 0.2s var(--transition-smooth);
}
.brand-text h2 {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}
.brand-text span {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
}
/* ===== Navigation ===== */
.sidebar__nav {
    flex: 1;
    padding: 1.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}
.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    transform: translateX(2px);
}
.nav-item.active {
    background: rgba(108, 99, 255, 0.12);
    color: #fff;
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.2);
}
.nav-item.active::before {
    transform: scaleY(1);
}
.nav-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s var(--transition-smooth);
}
.nav-item:hover .nav-item__icon {
    transform: scale(1.1);
}
.nav-item.active .nav-item__icon {
    filter: drop-shadow(0 0 8px var(--accent-glow));
}
.nav-item__label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s var(--transition-smooth);
}
/* ===== Sidebar Footer ===== */
.sidebar__footer {
    padding: 1rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s var(--transition-smooth);
}
.user-info:hover {
    border-color: var(--border-medium);
    background: var(--bg-card);
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
    transition: transform 0.2s var(--transition-smooth);
}
.user-info:hover .user-avatar {
    transform: scale(1.05);
}
.user-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    transition: opacity 0.2s var(--transition-smooth);
}
.user-email {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-status {
    font-size: 0.75rem;
    color: var(--success);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 var(--success-glow);
    }

    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 4px var(--success-glow);
    }
}
.btn-logout {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    transform: scale(1.05);
}
.btn-signin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}
/* ===== Sidebar Collapse Button ===== */
.sidebar__collapse-btn {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s var(--transition-smooth);
    z-index: 10;
}
.sidebar__collapse-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}
.desktop-only {
    display: flex;
}
.mobile-only {
    display: none;
}
/* ===== Main Content Area ===== */
.main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    background: var(--bg-primary);
}
/* ===== Top Bar ===== */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(18, 22, 31, 0.95);
    scrollbar-width: none;
    overflow-y: hidden;
}
.topbar__left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
}
.topbar__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.menu-toggle {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
    display: none;
    align-items: center;
    justify-content: center;
}
.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}
/* ===== Breadcrumbs ===== */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.breadcrumbs::-webkit-scrollbar {
    display: none;
}
.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}
.breadcrumb-separator {
    color: var(--text-muted);
    flex-shrink: 0;
}
.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.breadcrumb-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}
.breadcrumb-current {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
}
/* ===== Search Bar ===== */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    transition: all 0.3s var(--transition-smooth);
}
.search-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    padding: 0.625rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-medium);
}
.search-bar.open .search-toggle {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.search-input {
    position: absolute;
    right: 48px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    padding: 0.625rem 1rem;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    width: 280px;
    outline: none;
    animation: slideInRight 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.search-input::placeholder {
    color: var(--text-muted);
}
.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--accent-glow);
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}
/* ===== Icon Buttons ===== */
.icon-button {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    padding: 0.625rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.icon-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-medium);
    transform: translateY(-1px);
}
/* ===== Notifications ===== */
.notifications-wrapper {
    position: relative;
}
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px var(--error-glow);
    animation: notificationPulse 2s ease-in-out infinite;
}
@keyframes notificationPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}
/* Full-screen overlay behind the dropdown */
.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 900;
    /* higher than other content but below the dropdown */
}
/* Dropdown itself */
.notifications-dropdown {
    position: fixed;
    /* changed from absolute */
    top: 64px;
    /* adjust to match header height */
    right: 16px;
    /* distance from the right edge */
    width: 360px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    /* above overlay */
    animation: dropdownSlide 0.2s ease;
    overflow: hidden;
}
/* Optional: adjust slide animation for fixed positioning */
@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.dropdown-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dropdown-header h3 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}
.text-button {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.text-button:hover {
    background: rgba(108, 99, 255, 0.1);
    color: var(--accent-hover);
}
.notification-list {
    max-height: 360px;
    overflow-y: auto;
}
.notification-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item:hover {
    background: rgba(255, 255, 255, 0.04);
}
.notification-item.unread {
    background: rgba(108, 99, 255, 0.05);
}
.notification-content {
    flex: 1;
}
.notification-content p {
    margin: 0 0 0.25rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
}
.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.unread-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.375rem;
    box-shadow: 0 0 8px var(--accent-glow);
}
.dropdown-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
}
.dropdown-footer .text-button {
    width: 100%;
    padding: 0.5rem;
    justify-content: center;
    display: flex;
}
.topbar__user {
    display: flex;
    align-items: center;
}
.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 2px 8px var(--accent-glow);
}
/* ===== Content ===== */
.content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    animation: fadeIn 0.4s var(--transition-smooth);
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ===== Toast Notifications ===== */
.toast {
    position: sticky;
    top: var(--topbar-height);
    z-index: 1000;
    margin: 0;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-medium);
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.toast--success {
    background: rgba(16, 185, 129, 0.15);
    border-bottom-color: var(--success);
}
.toast--error {
    background: rgba(239, 68, 68, 0.15);
    border-bottom-color: var(--error);
}
.toast--warning {
    background: rgba(191, 201, 209, 0.15);
    border-bottom-color: var(--warning);
}
.toast--info {
    background: rgba(59, 130, 246, 0.15);
    border-bottom-color: var(--info);
}
.toast__content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}
.toast__icon {
    font-size: 1.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
}
.toast--success .toast__icon {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}
.toast--error .toast__icon {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}
.toast--warning .toast__icon {
    background: rgba(191, 201, 209, 0.2);
    color: var(--warning);
}
.toast--info .toast__icon {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}
.toast__text {
    font-weight: 500;
    color: var(--text-primary);
}
.toast__close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 0.5rem;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toast__close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}
/* ===== Sidebar Overlay (Mobile) ===== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    animation: fadeIn 0.2s ease;
}
/* ===== Utility Classes ===== */
.page-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}
.single-column {
    display: flex;
    max-width: 100%;
    justify-content: center;
}
.form-switch {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
}
.link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 500;
}
.link-btn:hover {
    text-decoration: underline;
}
/* ===== Mobile Responsive ===== */
@media (max-width: 1024px) {
    .content {
        padding: 1.5rem;
    }
}
@media (max-width: 768px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 100;
        transition: left 0.3s var(--transition-smooth);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar.collapsed {
        width: 280px;
    }

    .sidebar__collapse-btn {
        display: none;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .topbar {
        padding: 0 1rem;
    }

    .topbar__left {
        gap: 0.75rem;
    }

    .topbar__right {
        gap: 0.375rem;
    }

    .search-input {
        width: 200px;
    }

    .notifications-dropdown {
        width: 320px;
        right: -1rem;
    }

    .content {
        padding: 1rem;
    }

    .toast {
        padding: 1rem;
        top: var(--topbar-height);
    }

    .two-column {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .sidebar {
        width: 100%;
    }

    .sidebar.open {
        width: 100%;
    }

    .user-email {
        font-size: 0.75rem;
    }

    .nav-item {
        font-size: 0.875rem;
    }

    .content {
        padding: 0.75rem;
    }

    .topbar {
        padding: 0 0.75rem;
    }

    .search-input {
        width: 160px;
        font-size: 0.8125rem;
    }

    .notifications-dropdown {
        width: calc(100vw - 1.5rem);
        right: -0.75rem;
    }

    .icon-button {
        padding: 0.5rem;
    }

    .icon-button svg {
        width: 18px;
        height: 18px;
    }
}
/* ===== Scrollbar Styling ===== */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}
/* ===== Smooth Transitions ===== */
* {
    transition-timing-function: var(--transition-smooth);
}
/* ===== Search Results Dropdown ===== */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}
.search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 80;
    /* Below topbar (50) but above content */
    cursor: default;
}
.search-results-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    width: 400px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    margin-top: 0.75rem;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    z-index: 100;
    overflow: hidden;
    animation: dropdownSlide 0.2s ease;
}
.search-results-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 480px;
    overflow-y: auto;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.1s ease;
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-item:hover,
.search-result-item.selected {
    background: rgba(255, 255, 255, 0.05);
    /* Hover state */
}
.search-result-item.selected {
    background: rgba(108, 99, 255, 0.1);
    border-left: 3px solid var(--accent);
    padding-left: calc(1rem - 3px);
}
.search-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    width: 20px;
}
.search-result-item.selected .search-result-icon {
    color: var(--accent);
}
.search-result-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.search-result-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-result-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-result-type {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}
.enter-icon {
    color: var(--text-muted);
    margin-left: 0.5rem;
    opacity: 0.5;
}
.search-result-item.selected .enter-icon {
    opacity: 1;
    color: var(--accent);
}
.no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9375rem;
}
/* Update search input to be relative for dropdown positioning if needed */
/* .search-input {} */
/* No Notifications */
.no-notifications {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.text-muted {
    color: var(--text-muted);
}
.text-xs {
    font-size: 0.75rem;
}
/* ===== User Menu ===== */
.user-menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.user-avatar-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.2s var(--transition-smooth);
}
.user-avatar-btn:hover {
    transform: scale(1.05);
}
.user-avatar-btn .unauthenticated {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}
.user-dropdown {
    position: fixed;
    top: 64px;
    right: 1.5rem;
    width: 240px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: dropdownSlide 0.2s ease;
    overflow: hidden;
}
.user-dropdown .dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}
.user-details-dropdown {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.user-dropdown .user-email {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-dropdown .user-status {
    font-size: 0.75rem;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--text-primary);
}
.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.btn-logout-dropdown {
    color: var(--error);
}
.btn-logout-dropdown:hover {
    background: rgba(239, 68, 68, 0.1);
}
.btn-signin-dropdown {
    color: var(--accent);
}
.btn-signin-dropdown:hover {
    background: rgba(108, 99, 255, 0.1);
}
@media (max-width: 768px) {
    .user-dropdown {
        right: 1rem;
    }
}
@media (max-width: 480px) {
    .user-dropdown {
        width: calc(100vw - 2rem);
    }
}/* Component Styles */

/* Auth Chips */
.auth-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.4);
    font-size: 0.95rem;
}

.auth-chip.ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Buttons */
.btn {
    border: 0;
    border-radius: 999px;
    padding: 0.65rem 1.3rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s;
    color: #fff;
}

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

.btn:not(:disabled):hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #ff4f6d, #ff8b8b);
    box-shadow: 0 10px 30px rgba(255, 79, 109, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.btn-warning {
    background: linear-gradient(135deg, #BFC9D1, #a3a6a8);
    color: #fff;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #BFC9D1, #a3a6a8);
}

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

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
}

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

/* Notices */
.notice {
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(4, 8, 35, 0.9);
}

.notice.success {
    border-color: rgba(67, 230, 177, 0.6);
    color: var(--success);
}

.notice.error {
    border-color: rgba(255, 139, 139, 0.6);
    color: var(--danger);
}

.notice.info {
    border-color: rgba(108, 99, 255, 0.6);
}

.notice.idle-notice {
    margin-bottom: 1rem;
}

/* Cards & Sections */
.section-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 35px 65px rgba(1, 4, 22, 0.55);
}

.section-card.highlight {
    border: 1px solid rgba(108, 99, 255, 0.4);
    box-shadow: 0 40px 80px rgba(108, 99, 255, 0.15);
}

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

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-header h2 {
    font-size: 3rem;
    margin: 0 0 0.25rem;
}

.section-header p {
    margin: 0;
    color: var(--text-muted);
}

/* Forms */
.form-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 18px;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    width: 40%;
}

.form-card h3 {
    margin: 0;
}

.form-card.wide {
    margin-top: 0.5rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input,
textarea,
select {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(2, 8, 28, 0.9);
    padding: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.input-small {
    width: 60px;
}

.hint {
    color: var(--text-muted);
}

.broker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Strategy Selection */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.strategy-card {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
    background: rgba(6, 11, 32, 0.8);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.strategy-card header {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.strategy-card.active {
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(108, 99, 255, 0.2);
}

.strategy-key {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-pill.success {
    color: var(--success);
    border-color: rgba(67, 230, 177, 0.4);
}

.status-pill.muted {
    color: var(--text-muted);
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

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

th,
td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.6rem 0.4rem;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--text-muted);
    font-weight: 600;
}

td pre {
    margin: 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 0.5rem;
    font-size: 0.8rem;
    max-height: 120px;
    overflow: auto;
}

code {
    font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85em;
    color: var(--accent-strong);
}

/* Generic Actions & Lists */
.actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.empty-placeholder {
    text-align: center;
    color: var(--text-muted);
    margin: 0;
}

.empty-placeholder.success {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.2);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.hint-list {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    color: var(--text-muted);
}

.hint-list li {
    margin-bottom: 0.35rem;
}

/* Side Badges */
.side-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.side-badge.buy {
    background: rgba(67, 230, 177, 0.15);
    color: var(--success);
    border: 1px solid rgba(67, 230, 177, 0.3);
}

.side-badge.sell {
    background: rgba(255, 139, 139, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 139, 139, 0.3);
}

/* Mixed utility */
h4 {
    margin: 1rem 0 0.5rem;
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.danger-zone {
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.06);
}

.danger-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.danger-note {
    margin-top: 0.75rem;
}

/* ===== Mobile Responsive Styles ===== */

/* Tablet and smaller */
@media (max-width: 768px) {
    .btn {
        padding: 0.6rem 1.1rem;
        font-size: 0.9rem;
    }

    .section-card {
        padding: 1.25rem;
        border-radius: 18px;
        margin-bottom: 1.25rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .header-controls {
        width: 100%;
        flex-wrap: wrap;
    }

    .form-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .form-row label {
        width: 100%;
    }

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

    .notice {
        padding: 0.875rem 1rem;
        border-radius: 12px;
    }

    .broker-actions {
        flex-direction: column;
    }

    .broker-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .btn {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
    }

    .section-card {
        padding: 1rem;
        border-radius: 14px;
        margin-bottom: 1rem;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    .form-card {
        padding: 1rem;
        border-radius: 14px;
        width: 100%;
    }

    .strategy-card {
        padding: 0.875rem;
        border-radius: 14px;
    }

    .auth-chip {
        padding: 0.3rem 0.75rem;
        font-size: 0.85rem;
    }

    .status-pill {
        padding: 0.2rem 0.65rem;
        font-size: 0.8rem;
    }

    .notice {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    input,
    textarea,
    select {
        padding: 0.65rem;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .table-wrapper {
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }

    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 0.5rem 0.3rem;
    }

    .danger-controls {
        gap: 0.5rem;
    }
}

/* Splash Screen Styles */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-bg);
    /* Use theme background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* Ensure it stays on top */
    transition: opacity 0.5s ease-in-out;
}

.splash-screen.visible {
    opacity: 1;
}

.splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
    /* Allow clicks to pass through after fade out */
}

.splash-logo-container {
    width: 200px;
    /* Adjust as needed */
    height: auto;
}

.splash-logo {
    width: 100%;
    height: auto;
    animation: pulse 2s infinite ease-in-out;
}

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

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}/* Admin Console */
.admin-shell {
    min-height: 100vh;
    background: radial-gradient(circle at top, rgba(19, 25, 54, 0.95), #050914);
    color: #fff;
    padding: 2.5rem clamp(1.5rem, 4vw, 3rem) 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.admin-shell__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.admin-shell__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 0.3rem;
}

.admin-shell__subtitle {
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.65);
}

.admin-shell__nav {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(5, 9, 20, 0.8);
    width: fit-content;
}

.admin-shell__nav-link {
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-shell__nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.admin-shell__nav-link.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    box-shadow: 0 15px 35px rgba(108, 99, 255, 0.35);
}

.admin-shell__main {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.01);
}

/* Admin page building blocks */
.admin-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-card {
    background: rgba(8, 12, 28, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
}

.admin-card--headline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-card__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.25rem;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.admin-section-header h3 {
    margin: 0;
}

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

.admin-metric {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 0.9rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-metric span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.admin-metric strong {
    font-size: 1.35rem;
    font-weight: 700;
}

.admin-metric small {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.admin-page__split {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 1.5rem;
}

@media (max-width: 1100px) {
    .admin-page__split {
        grid-template-columns: 1fr;
    }
}

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-filters input[type='search'] {
    flex: 1;
    min-width: 220px;
}

.inline-checkbox {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
}

.inline-checkbox input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
}

.admin-card label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

.admin-card input:not([type='checkbox']),
.admin-card textarea,
.admin-card select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    color: #fff;
    color-scheme: dark;
}

/* Force dark dropdown menus globally in admin */
.admin-page select,
.admin-sub-form select,
.admin-analytics select,
.admin-modal select {
    color-scheme: dark;
}

.admin-page select option,
.admin-card select option,
.admin-sub-form select option,
.admin-analytics select option,
.admin-modal select option {
    background: #1a1a2e;
    color: #fff;
}

.admin-card textarea {
    resize: vertical;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    min-height: 100px;
}

.admin-card input:focus:not([type='checkbox']),
.admin-card textarea:focus,
.admin-card select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.25);
}

.admin-table-wrapper {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    overflow-y: visible;
    background: rgba(5, 9, 20, 0.6);
}

.admin-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

.admin-table thead th {
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.03);
}

.admin-table tbody td {
    padding: 0.95rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.admin-table tbody tr.is-selected {
    background: rgba(108, 99, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(108, 99, 255, 0.35);
}

.admin-table__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.link-button {
    background: none;
    border: none;
    color: var(--accent);
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.link-button:hover {
    color: var(--accent-strong);
}

.admin-notice {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-radius: 18px;
    padding: 0.9rem 1.2rem;
    border: 1px solid transparent;
}

.admin-notice--success {
    background: rgba(67, 230, 177, 0.1);
    border-color: rgba(67, 230, 177, 0.4);
    color: #c9ffef;
}

.admin-notice--error {
    background: rgba(255, 139, 139, 0.12);
    border-color: rgba(255, 139, 139, 0.35);
    color: #ffdede;
}

.admin-notice button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.admin-detail__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.admin-detail__section {
    margin-top: 1.5rem;
}

.admin-detail__section ul {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.admin-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.admin-inline-form input {
    flex: 1;
    min-width: 220px;
}

.admin-empty-state {
    margin: 0;
    padding: 1rem 0;
    color: var(--text-muted);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.admin-form__actions {
    display: flex;
    justify-content: flex-end;
}

.admin-button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.status-pill.ghost {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 720px) {
    .admin-inline-form {
        flex-direction: column;
    }

    .admin-form__actions {
        justify-content: stretch;
    }

    .admin-form__actions .btn {
        width: 100%;
    }
}

/* ── Admin User Detail Page ────────────────────────────────── */
.admin-user-detail {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-user-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-user-detail__header-left {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-user-detail__header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.admin-user-detail__back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.15s;
}

.admin-user-detail__back-btn:hover {
    opacity: 0.8;
}

.admin-user-detail__user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user-detail__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.admin-user-detail__name {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.admin-user-detail__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.admin-user-detail__email {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-user-detail__joined {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-user-detail__metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.admin-user-detail__charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

@media (max-width: 900px) {
    .admin-user-detail__charts-row {
        grid-template-columns: 1fr;
    }
}

.admin-user-detail__chart-card {
    background: rgba(8, 12, 28, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
}

.admin-user-detail__chart-card--wide {
    /* used as modifier, no additional styles needed */
}

.admin-user-detail__chart-card--full {
    background: rgba(8, 12, 28, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
}

.admin-user-detail__section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.admin-user-detail__section {
    background: rgba(8, 12, 28, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
}

.admin-user-detail__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
}

.admin-user-detail__error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: var(--text-muted);
}

.admin-user-detail__error a {
    color: var(--accent);
}

/* ── Admin Buttons ───────────────────────────────────────── */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.admin-btn--secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

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

.admin-btn--sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

/* ── Text utilities ──────────────────────────────────────── */
.admin-text-mono {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85em;
}

.admin-text-positive {
    color: #10b981;
}

.admin-text-negative {
    color: #ef4444;
}

.admin-text-muted {
    color: rgba(255, 255, 255, 0.5);
}

/* ── Chart common styles ─────────────────────────────────── */
.admin-chart-tooltip {
    background: rgba(15, 20, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.admin-chart-tooltip__label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 0.35rem;
}

.admin-chart-tooltip__row {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0.15rem 0;
}

.admin-chart-tooltip__positive {
    color: #10b981;
    font-weight: 600;
}

.admin-chart-tooltip__negative {
    color: #ef4444;
    font-weight: 600;
}

.admin-chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.admin-chart-loading__spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: admin-spin 0.8s linear infinite;
}

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

.admin-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* ── Metric Card modifiers ───────────────────────────────── */
.admin-metric-card--positive .admin-metric-card__value {
    color: #10b981;
}

.admin-metric-card--negative .admin-metric-card__value {
    color: #ef4444;
}

/* ── Trade Distribution Chart ────────────────────────────── */
.admin-trade-distribution {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-trade-distribution__legend {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.admin-trade-distribution__legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
}

.admin-trade-distribution__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* ── Pagination ───────────────────────────────────────────── */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 0 0.25rem;
    flex-wrap: wrap;
}

.admin-pagination__info {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    min-width: 100px;
    text-align: center;
}

.admin-pagination__size {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-left: auto;
}

/* ── Analytics Page ───────────────────────────────────────── */
.admin-analytics {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-analytics__filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
    align-items: end;
}

.admin-analytics__filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
}

.admin-analytics__filter-grid input,
.admin-analytics__filter-grid select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    color: #fff;
}

.admin-analytics__filter-grid input:focus,
.admin-analytics__filter-grid select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.25);
}

.admin-analytics__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.admin-analytics__cards .metric {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.5rem 0 0.25rem;
}

/* ── Section header (title + action button) ─────────────── */
.admin-user-detail__section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

/* ── Subscription form ──────────────────────────────────── */
.admin-sub-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.admin-sub-form__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.admin-sub-form__header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.admin-sub-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.admin-sub-form__grid label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
}

.admin-sub-form__grid select,
.admin-sub-form__grid input[type="text"] {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    color: #fff;
}

.admin-sub-form__grid select:focus,
.admin-sub-form__grid input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.25);
}

.admin-sub-form__checkbox {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding-top: 1.2rem;
}

.admin-sub-form__config-label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.75rem;
}

.admin-sub-form__config {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.75rem;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.82rem;
    color: #e0e0e0;
    resize: vertical;
    min-height: 60px;
}

.admin-sub-form__config:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.25);
}

.admin-sub-form__actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ── Config preview in table ────────────────────────────── */
.admin-sub-config-preview {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', monospace;
}

/* ── Icon buttons ───────────────────────────────────────── */
.admin-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.15s ease;
}

.admin-btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.admin-btn-icon--danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.admin-btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Danger button ──────────────────────────────────────── */
.admin-btn--danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.admin-btn--danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* ── Modal overlay ──────────────────────────────────────── */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.admin-modal {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.admin-modal--sm {
    max-width: 380px;
}

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

.admin-modal__header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

/* ── Spin animation ──────────────────────────────────────── */
.spin {
    animation: admin-spin 1s linear infinite;
}/* Feature Styles */

/* Trades & PnL */
.trades-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.trades-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.trades-group h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.positions-section {
    border: 1px solid rgba(67, 230, 177, 0.25);
    background: linear-gradient(180deg, rgba(11, 23, 56, 1) 0%, rgba(6, 15, 40, 1) 100%);
}

.pnl-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.pnl-card {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pnl-card.total {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(167, 107, 255, 0.1));
    border-color: rgba(108, 99, 255, 0.3);
    grid-column: span 1;
}

@media (min-width: 600px) {
    .pnl-card.total {
        grid-column: span 2;
    }
}

.pnl-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.pnl-value {
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pnl-value.profit {
    color: var(--success);
}

.pnl-value.loss {
    color: var(--danger);
}

.pnl-value.neutral {
    color: var(--text-primary);
}

.profit {
    color: var(--success);
}

.loss {
    color: var(--danger);
}

.flat-position {
    opacity: 0.5;
}

.instrument-cell {
    font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    font-size: 0.85rem;
}

.side-badge.flat {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.timestamp {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Scrollable trades container */
.trades-scroll-container {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.15);
    scrollbar-width: thin;
    scrollbar-color: rgba(108, 99, 255, 0.4) transparent;
}

.trades-scroll-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.trades-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.trades-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(108, 99, 255, 0.4);
    border-radius: 4px;
}

.trades-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 99, 255, 0.6);
}

.trades-scroll-container table {
    margin: 0;
}

.trades-scroll-container thead {
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.trades-scroll-container thead th {
    background: rgba(11, 23, 56, 0.95);
    backdrop-filter: blur(8px);
}

.trades-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn.load-more,
.btn.collapse-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.btn.load-more {
    color: var(--accent);
}

.btn.collapse-btn {
    color: var(--text-muted);
}

.trades-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

@media (max-width: 720px) {
    .section-card {
        padding: 1.3rem;
    }

    .broker-actions,
    .actions {
        flex-direction: column;
    }

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

    .pnl-card.total {
        grid-column: span 2;
    }
}

/* Strategy Status Display */
.strategy-status-card {
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(11, 23, 56, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.strategy-status-card .status-section {
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.strategy-status-card .status-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.strategy-status-card .status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
}

.strategy-status-card .status-row .label {
    color: var(--text-muted);
    font-weight: 500;
}

.strategy-status-card .status-row .value {
    font-weight: 600;
    color: var(--text-default);
}

.strategy-status-card .status-row .value.success {
    color: var(--success);
}

.strategy-status-card .status-row .value.warning {
    color: #BFC9D1;
}

.strategy-status-card .status-row .value.danger {
    color: var(--danger);
}

.strategy-status-card .status-row .value.muted {
    color: var(--text-muted);
}

/* ============================================================================
   ORB Strategy Status Styles
   ============================================================================ */

.orb-strategy-status {
    background: linear-gradient(135deg, rgba(26, 31, 54, 0.95) 0%, rgba(15, 19, 36, 0.98) 100%);
    border-radius: 12px;
    padding: 14px;
    color: #e1e5f0;
    font-size: 0.85rem;
    border: 1px solid rgba(108, 99, 255, 0.15);
}

.orb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 8px;
}

.orb-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.orb-meta {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    flex-wrap: wrap;
}

.orb-meta .meta-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.orb-meta .meta-muted {
    font-weight: 400;
    opacity: 0.72;
    font-size: 0.7rem;
}

.orb-meta .trading-status {
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.orb-meta .trading-status.active {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.orb-meta .trading-status.inactive {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

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

.orb-instrument-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.orb-instrument-card:last-child {
    margin-bottom: 0;
}

.instrument-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.instrument-token {
    font-weight: 600;
    font-size: 0.8rem;
    color: #818cf8;
    font-family: 'JetBrains Mono', monospace;
}

.position-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-badge.flat {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.position-badge.long {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.position-badge.short {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.orb-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
}

.orb-section:last-child {
    margin-bottom: 0;
}

.orb-section h4 {
    margin: 0 0 8px 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.range-values,
.position-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.range-row,
.indicator-row,
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 0.8rem;
}

.orb-section .label {
    color: #94a3b8;
    font-weight: 500;
}

.orb-section .value {
    font-weight: 600;
    color: #e2e8f0;
}

.orb-section .value.high {
    color: #4ade80;
}

.orb-section .value.low {
    color: #f87171;
}

.orb-section .value.above {
    color: #4ade80;
}

.orb-section .value.below {
    color: #f87171;
}

.orb-section .value.inside {
    color: #BFC9D1;
}

.orb-section .value.profit {
    color: #4ade80;
}

.orb-section .value.loss {
    color: #f87171;
}

.orb-section .value.ready {
    color: #60a5fa;
}

.orb-section .value.warming {
    color: #BFC9D1;
}

.orb-section .value.stop {
    color: #f87171;
}

.orb-section .value.target {
    color: #4ade80;
}

.range-status {
    text-align: center;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
}

.range-status.captured {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.range-status.waiting {
    background: rgba(191, 201, 209, 0.12);
    color: #BFC9D1;
    border: 1px solid rgba(191, 201, 209, 0.25);
}

.position-section.active {
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(129, 140, 248, 0.08);
}

.breakout-section {
    border: 1px solid rgba(191, 201, 209, 0.2);
}

.breakout-checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checklist-item {
    font-size: 0.8rem;
    padding: 4px 0;
}

.checklist-item.done {
    color: #4ade80;
}

.checklist-item.pending {
    color: #BFC9D1;
}

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

.summary-item {
    text-align: center;
    padding: 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.summary-item .label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.summary-item .value {
    font-size: 0.9rem;
    font-weight: 700;
}

.summary-item .value.profit {
    color: #4ade80;
}

.summary-item .value.loss {
    color: #f87171;
}

.summary-item .value.confirmed {
    color: #4ade80;
}

.summary-item .value.pending {
    color: #94a3b8;
}

.option-section.active {
    border: 1px solid rgba(191, 201, 209, 0.3);
    background: rgba(191, 201, 209, 0.08);
}

.option-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-contract {
    font-weight: 700;
    color: #BFC9D1 !important;
}

/* Advanced Indicators Styling */
.advanced-indicators {
    border: 1px solid rgba(129, 140, 248, 0.15);
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.05) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.advanced-indicators h4 {
    color: #a5b4fc;
}

.indicator-group {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.indicator-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.indicator-group:first-child {
    padding-top: 0;
}

.indicator-row.sub-indicator {
    padding-left: 12px;
    font-size: 0.75rem;
    opacity: 0.85;
}

.indicator-row.sub-indicator .label {
    font-size: 0.7rem;
}

.indicator-row.sub-indicator .value {
    font-size: 0.75rem;
}

/* Threshold badges */
.threshold-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 600;
}

.threshold-badge.pass {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.threshold-badge.fail {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

/* DI coloring */
.bullish-di {
    color: #4ade80;
    font-weight: 700;
}

.bearish-di {
    color: #f87171;
    font-weight: 700;
}

.di-direction {
    margin-left: 4px;
}

/* Trend direction */
.trend-direction {
    font-weight: 600;
}

.trend-direction.long {
    color: #4ade80;
}

.trend-direction.short {
    color: #f87171;
}

/* Bullish/Bearish EMA */
.bullish-ema {
    color: #4ade80;
    font-weight: 600;
}

.bearish-ema {
    color: #f87171;
    font-weight: 600;
}

/* Disabled badge */
.disabled-badge {
    font-size: 0.6rem;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

/* PCR Styling */
.pcr-bullish {
    color: #4ade80;
}

.pcr-bearish {
    color: #f87171;
}

.pcr-neutral {
    color: #94a3b8;
}

.sentiment-badge {
    font-size: 0.7rem;
    margin-left: 6px;
}

.pcr-thresholds {
    opacity: 0.7;
}

.pcr-thresholds .value {
    font-size: 0.65rem;
    color: #94a3b8;
}

/* Muted value text */
.orb-section .value.muted,
.indicator-row .value .muted {
    color: #64748b;
    font-weight: 400;
    font-size: 0.7rem;
}

@media (max-width: 480px) {
    .orb-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

/* New additions */
.instrument-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-badge {
    font-size: 0.75rem;
    color: #BFC9D1;
    font-weight: 500;
}

.reason-tag {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ==================== Trade Reports Page ==================== */

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
    padding: 1rem 0;
}

.filter-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.filter-row input[type="date"],
.filter-row input[type="number"],
.filter-row select {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 0.9rem;
}

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

.filter-inline {
    display: flex;
    align-items: end;
    gap: 0.75rem;
}

.filter-inline label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.stat-value.positive {
    color: #4ade80;
}

.stat-value.negative {
    color: #f87171;
}

.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 1rem;
}

.stat-mini {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-mini strong {
    color: #fff;
    font-weight: 600;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-success {
    color: #4ade80 !important;
}

.text-warning {
    color: #BFC9D1 !important;
}

.text-mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
}

.positive {
    color: #4ade80;
}

.negative {
    color: #f87171;
}

.table-scroll {
    overflow-x: auto;
    margin-top: 0.75rem;
}

.table-scroll table {
    width: 100%;
    min-width: 600px;
}

.row-warning {
    background: rgba(191, 201, 209, 0.08);
}

.row-warning td {
    border-color: rgba(191, 201, 209, 0.2);
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* ORB Dashboard Layout */
.orb-dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.orb-main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
    align-items: start;
}

.orb-section.summary-section {
    /* margin-top: auto; */
}

/* ============================================================================
   Subscriptions Dashboard
   ============================================================================ */

.subscriptions-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-title h2 {
    margin: 0 0 0.25rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
}

.dashboard-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.dashboard-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}

.auto-refresh-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 600px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-box.active {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(74, 222, 128, 0.05));
    border-color: rgba(74, 222, 128, 0.25);
}

.stat-box.paper {
    background: linear-gradient(135deg, rgba(191, 201, 209, 0.1), rgba(191, 201, 209, 0.05));
    border-color: rgba(191, 201, 209, 0.25);
}

.stat-box.live {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.1), rgba(248, 113, 113, 0.05));
    border-color: rgba(248, 113, 113, 0.25);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.stat-box.active .stat-number {
    color: #4ade80;
}

.stat-box.paper .stat-number {
    color: #BFC9D1;
}

.stat-box.live .stat-number {
    color: #f87171;
}

.stat-box .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* Empty State */
.empty-state-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.empty-state-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: #fff;
}

.empty-state-card p {
    margin: 0;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
}

/* Subscription Grid */
.subscription-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 440px) {
    .subscription-grid {
        grid-template-columns: 1fr;
    }
}

/* Subscription Card */
.subscription-card {
    background: linear-gradient(145deg, rgba(15, 23, 56, 0.9), rgba(8, 14, 36, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 1.25rem;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.subscription-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.subscription-card.is-active {
    border-color: rgba(74, 222, 128, 0.3);
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.1), 0 12px 40px rgba(74, 222, 128, 0.1);
}

.subscription-card.is-expanded {
    grid-column: span 1;
}

@media (min-width: 900px) {
    .subscription-card.is-expanded {
        grid-column: span 2;
    }
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.card-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.strategy-icon {
    font-size: 1.75rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.card-title-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.subscription-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.card-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mode-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-badge.paper {
    background: rgba(191, 201, 209, 0.15);
    color: #BFC9D1;
    border: 1px solid rgba(191, 201, 209, 0.3);
}

.mode-badge.live {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.status-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-badge.idle {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* Card Config */
.card-config {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 0.85rem;
}

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

.config-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.config-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.config-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.action-btn {
    flex: 1;
    padding: 0.65rem 0.75rem;
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.action-btn.primary {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #fff;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.action-btn.primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74, 222, 128, 0.4);
}

.action-btn.warning {
    background: linear-gradient(135deg, #BFC9D1, #a3a6a8);
    color: #000;
    box-shadow: 0 4px 12px rgba(191, 201, 209, 0.3);
}

.action-btn.warning:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(191, 201, 209, 0.4);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn.secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
}

.action-btn.danger {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.25);
    flex: 0 0 auto;
    min-width: 42px;
}

.action-btn.danger:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.25);
}

/* Status Panel */
.card-status-panel {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    animation: slideDown 0.25s ease;
}

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

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

/* Override ORB status styles when inside subscription card */
.subscription-card .orb-strategy-status {
    background: transparent;
    border: none;
    padding: 0;
}

.subscription-card .orb-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
}

.subscription-card .orb-instrument-card {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.04);
}

/* BYO Credentials Page */
.credentials-setup {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-box {
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-box.info {
    background: rgba(108, 99, 255, 0.08);
    border-color: rgba(108, 99, 255, 0.3);
}

.info-box.warning {
    background: rgba(191, 201, 209, 0.08);
    border-color: rgba(191, 201, 209, 0.3);
    color: #BFC9D1;
}

.info-box h3,
.info-box h4 {
    margin: 0 0 0.75rem;
}

.info-box ul,
.info-box ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.info-box li {
    margin-bottom: 0.5rem;
}

.setup-steps {
    list-style-position: inside;
    color: rgba(255, 255, 255, 0.85);
}

.setup-steps a {
    color: var(--accent);
    text-decoration: underline;
}

.credentials-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.required {
    color: var(--danger);
}

.password-field {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.password-field input {
    flex: 1;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(108, 99, 255, 0.4);
    color: var(--accent);
    border-radius: 12px;
    padding: 0.65rem 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    background: rgba(108, 99, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* ================================================
   Gamma-OI Strategy Enhancements
   ================================================ */

.gamma-risk-footnote {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted, #94a3b8);
  max-width: 52rem;
}

.gamma-risk-footnote strong {
  color: var(--text-secondary, #cbd5e1);
  font-weight: 600;
}

.gamma-oi-mode-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.badge-strict {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-relative {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-aggregate {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

:root.light .badge-strict {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

:root.light .badge-relative {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
}

:root.light .badge-aggregate {
    background: rgba(100, 116, 139, 0.08);
    color: #475569;
}

/* Conviction tiers */
.gamma-conviction {
    font-weight: 600;
}

.conviction-high {
    color: #22c55e !important;
}

.conviction-mid {
    color: #f59e0b !important;
}

.conviction-none {
    color: #94a3b8 !important;
}

/* VIX Regime badge */
.gamma-regime-badge {
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.regime-high {
    color: #f87171 !important;
    background: rgba(239, 68, 68, 0.1);
}

.regime-normal {
    color: #94a3b8 !important;
}

.regime-low {
    color: #60a5fa !important;
    background: rgba(59, 130, 246, 0.1);
}

/* OI divider for rolling section */
.gamma-oi-divider {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    padding: 0.3rem 0 0.15rem;
    margin-top: 0.3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 0.7;
}

:root.light .gamma-oi-divider {
    border-top-color: rgba(0, 0, 0, 0.06);
}

/* Call wall / put floor chips */
.gamma-walls-section {
    margin-top: 0.4rem;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

:root.light .gamma-walls-section {
    border-top-color: rgba(0, 0, 0, 0.06);
}

.gamma-wall-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.15rem 0;
    font-size: 0.82rem;
}

.gamma-wall-row .label {
    color: var(--text-secondary);
    font-size: 0.78rem;
    min-width: 80px;
}

.gamma-wall-strikes {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.wall-chip {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-family: var(--font-mono, monospace);
}

.call-wall {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.put-floor {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

:root.light .call-wall {
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
}

:root.light .put-floor {
    background: rgba(34, 197, 94, 0.06);
    color: #16a34a;
}

/* BN weight indicator */
.value.warn {
    color: #f59e0b !important;
}

.gamma-section-gap {
    margin-top: 0.5rem;
}

.gamma-divergence-badge {
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.gamma-trail-box {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
}

.gamma-trail-box.trail-active {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.gamma-trail-box.trail-pending {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.gamma-halt-msg {
    margin-top: 0.5rem;
    color: #ef4444;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Alert banners */
.gamma-alert {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.gamma-alert-critical {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.gamma-alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

/* ATR mode tag */
.gamma-atr-tag {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.08rem 0.3rem;
    border-radius: 3px;
    margin-left: 0.25rem;
    vertical-align: middle;
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.gamma-risk-badge {
    font-family: var(--font-mono, monospace);
    font-size: 0.82rem !important;
}

/* Position hero card */
.gamma-position-hero {
    background: linear-gradient(135deg, rgba(11, 23, 56, 1) 0%, rgba(15, 30, 65, 1) 100%) !important;
    border: 1px solid rgba(67, 230, 177, 0.25) !important;
}

.gamma-position-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 720px) {
    .gamma-position-grid {
        grid-template-columns: 1fr;
    }
}

.gamma-pos-col {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.gamma-direction-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    width: fit-content;
}

.gamma-direction-badge.long {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.gamma-direction-badge.short {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.gamma-contract-label {
    font-family: var(--font-mono, monospace);
    font-size: 0.88rem;
    color: var(--text-primary);
    font-weight: 600;
}

.gamma-expiry {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.8rem;
}

.gamma-entry-time {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* P&L hero */
.gamma-pnl-hero {
    text-align: center;
    justify-content: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    min-width: 120px;
}

.gamma-pnl-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.gamma-pnl-value {
    font-size: 1.4rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.gamma-pnl-value.profit {
    color: #22c55e;
}

.gamma-pnl-value.loss {
    color: #ef4444;
}

/* Premium details */
.gamma-premiums {
    gap: 0.15rem !important;
}

.gamma-premium-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    line-height: 1.6;
}

.gamma-premium-row .label {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.gamma-premium-row .value {
    font-family: var(--font-mono, monospace);
    font-weight: 600;
}

.gamma-premium-row .value.above {
    color: #4ade80;
}

.gamma-premium-row .value.below {
    color: #f87171;
}

.gamma-premium-row .value.stop {
    color: #ef4444;
}

.gamma-premium-row .value.target {
    color: #22c55e;
}

/* Visual progress bar for SL → Current → Target */
.gamma-progress-container {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gamma-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    font-family: var(--font-mono, monospace);
    margin-bottom: 0.3rem;
    padding: 0 0.1rem;
}

.gamma-progress-labels .stop { color: #ef4444; }
.gamma-progress-labels .target { color: #22c55e; }

.gamma-progress-bar {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: visible;
}

.gamma-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.gamma-progress-fill.profit {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.6));
}

.gamma-progress-fill.loss {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.6));
}

.gamma-progress-needle {
    position: absolute;
    top: -3px;
    width: 3px;
    height: 14px;
    background: #fff;
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
    z-index: 2;
    transition: left 0.4s ease;
}

.gamma-progress-marker {
    position: absolute;
    top: -2px;
    width: 2px;
    height: 12px;
    border-radius: 1px;
    transform: translateX(-50%);
    z-index: 1;
}

.gamma-progress-marker.entry-marker {
    background: rgba(148, 163, 184, 0.5);
}

.gamma-progress-marker.watermark-marker {
    background: rgba(34, 197, 94, 0.5);
    width: 1px;
    border-left: 1px dashed rgba(34, 197, 94, 0.4);
}

:root.light .gamma-progress-bar {
    background: rgba(0, 0, 0, 0.06);
}

:root.light .gamma-progress-needle {
    background: #1e293b;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

:root.light .gamma-position-hero {
    background: linear-gradient(135deg, rgba(248, 250, 252, 1) 0%, rgba(241, 245, 249, 1) 100%) !important;
    border-color: rgba(34, 197, 94, 0.2) !important;
}

:root.light .gamma-pnl-hero {
    background: rgba(0, 0, 0, 0.04);
}

:root.light .gamma-direction-badge.long {
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
    border-color: rgba(34, 197, 94, 0.2);
}

:root.light .gamma-direction-badge.short {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.2);
}

.gamma-atr-tag-spaced {
    margin-left: 0.4rem;
}

:root.light .gamma-atr-tag {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    border-color: rgba(139, 92, 246, 0.2);
}

:root.light .gamma-alert-critical {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

:root.light .gamma-alert-warning {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
}

/* ============================================================
   Counter-Breakout Fade Strategy (cb- prefix)
   ============================================================ */

/* ── Layout shell ──────────────────────────────────────────── */
.cb-strategy {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.cb-card {
    background: linear-gradient(145deg, rgba(14, 22, 48, 0.96), rgba(8, 14, 36, 0.96));
    border: 1px solid rgba(64, 162, 255, 0.12);
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.cb-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.cb-card-header h4 {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.85);
}

/* ── Header ────────────────────────────────────────────────── */
.cb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.cb-header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.cb-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #e2e8f0;
}

.cb-stage-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.18rem 0.65rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cb-stage-badge.stage-monitoring { background: rgba(148, 163, 184, 0.18); color: #94a3b8; }
.cb-stage-badge.stage-breakout   { background: rgba(250, 204, 21, 0.18);  color: #facc15; }
.cb-stage-badge.stage-rejection  { background: rgba(251, 146, 60, 0.18);  color: #fb923c; }
.cb-stage-badge.stage-confirmed  { background: rgba(239, 68, 68, 0.18);   color: #ef4444; }
.cb-stage-badge.stage-entry      { background: rgba(52, 211, 153, 0.18);  color: #34d399; }
.cb-stage-badge.stage-position   { background: rgba(59, 130, 246, 0.18);  color: #3b82f6; }

.cb-header-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.cb-header-pills {
    display: flex;
    gap: 0.35rem;
}

.cb-pill {
    font-size: 0.68rem;
    font-weight: 600;
    font-family: var(--font-mono, monospace);
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    white-space: nowrap;
}

.cb-market-status {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.18rem 0.55rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cb-market-status.open {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: #4ade80;
}

.cb-market-status.closed {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

/* ── Pipeline ──────────────────────────────────────────────── */
.cb-pipeline {
    padding-bottom: 0.5rem;
}

.cb-direction-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
}

.cb-direction-tag.up {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.cb-direction-tag.down {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}

.cb-pipeline-track {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.45rem 0;
}

.cb-pipe-step {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.cb-pipe-node {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.1);
    border: 1.5px solid rgba(148, 163, 184, 0.2);
    transition: all 0.25s ease;
}

.cb-pipe-icon {
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.5);
    line-height: 1;
}

.cb-pipe-step.active .cb-pipe-node {
    border-width: 2px;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.25);
}

.cb-pipe-step.active .cb-pipe-node.stage-monitoring {
    background: rgba(148, 163, 184, 0.2);
    border-color: #94a3b8;
}
.cb-pipe-step.active .cb-pipe-node.stage-monitoring .cb-pipe-icon { color: #94a3b8; }

.cb-pipe-step.active .cb-pipe-node.stage-breakout {
    background: rgba(250, 204, 21, 0.15);
    border-color: #facc15;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.2);
}
.cb-pipe-step.active .cb-pipe-node.stage-breakout .cb-pipe-icon { color: #facc15; }

.cb-pipe-step.active .cb-pipe-node.stage-rejection {
    background: rgba(251, 146, 60, 0.15);
    border-color: #fb923c;
    box-shadow: 0 0 12px rgba(251, 146, 60, 0.2);
}
.cb-pipe-step.active .cb-pipe-node.stage-rejection .cb-pipe-icon { color: #fb923c; }

.cb-pipe-step.active .cb-pipe-node.stage-confirmed {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}
.cb-pipe-step.active .cb-pipe-node.stage-confirmed .cb-pipe-icon { color: #ef4444; }

.cb-pipe-step.active .cb-pipe-node.stage-entry {
    background: rgba(52, 211, 153, 0.15);
    border-color: #34d399;
}
.cb-pipe-step.active .cb-pipe-node.stage-entry .cb-pipe-icon { color: #34d399; }

.cb-pipe-step.active .cb-pipe-node.stage-position {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}
.cb-pipe-step.active .cb-pipe-node.stage-position .cb-pipe-icon { color: #3b82f6; }

.cb-pipe-step.past .cb-pipe-node {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.5);
}
.cb-pipe-step.past .cb-pipe-icon { color: rgba(52, 211, 153, 0.8); }

.cb-pipe-label {
    font-size: 0.65rem;
    color: rgba(148, 163, 184, 0.6);
    margin: 0 0.3rem;
    white-space: nowrap;
}

.cb-pipe-step.active .cb-pipe-label {
    color: #e2e8f0;
    font-weight: 600;
}

.cb-pipe-step.past .cb-pipe-label {
    color: rgba(52, 211, 153, 0.7);
}

.cb-pipe-line {
    width: 18px;
    height: 2px;
    background: rgba(148, 163, 184, 0.15);
    margin: 0 0.1rem;
    border-radius: 1px;
}

.cb-pipe-line.done {
    background: rgba(52, 211, 153, 0.45);
}

/* ── Main grid (3-col) ─────────────────────────────────────── */
.cb-main-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

/* ── Price Levels (range bars) ─────────────────────────────── */
.cb-ranges {
    display: flex;
    flex-direction: column;
}

.cb-spot-price {
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    color: #e2e8f0;
}

.cb-levels-stack {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
}

.cb-level-bar {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.cb-level-header {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.68rem;
}

.cb-level-label {
    font-weight: 600;
    color: rgba(148, 163, 184, 0.8);
    min-width: 55px;
}

.cb-level-range {
    font-family: var(--font-mono, monospace);
    color: rgba(148, 163, 184, 0.55);
    font-size: 0.65rem;
    flex: 1;
}

.cb-level-width {
    font-family: var(--font-mono, monospace);
    color: rgba(148, 163, 184, 0.45);
    font-size: 0.63rem;
}

.cb-level-track {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: visible;
}

.cb-level-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.cb-level-fill.orb    { background: linear-gradient(90deg, rgba(250, 204, 21, 0.5), rgba(250, 204, 21, 0.25)); }
.cb-level-fill.today  { background: linear-gradient(90deg, rgba(34, 197, 94, 0.5), rgba(56, 189, 248, 0.35)); }
.cb-level-fill.prev   { background: linear-gradient(90deg, rgba(167, 139, 250, 0.45), rgba(56, 189, 248, 0.3)); }

.cb-level-marker {
    position: absolute;
    top: -3px;
    width: 3px;
    height: 12px;
    background: #e2e8f0;
    border-radius: 2px;
    transform: translateX(-1px);
    box-shadow: 0 0 6px rgba(226, 232, 240, 0.4);
}

/* ── Key-value grid (Detection card) ──────────────────────── */
.cb-kv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 0.6rem;
}

.cb-kv {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.cb-k {
    font-size: 0.63rem;
    color: rgba(148, 163, 184, 0.6);
    letter-spacing: 0.02em;
}

.cb-v {
    font-size: 0.78rem;
    font-family: var(--font-mono, monospace);
    color: #cbd5e1;
}

.cb-v.accent { color: #60a5fa; font-weight: 600; }
.cb-v.dim    { color: rgba(148, 163, 184, 0.55); }
.cb-v.green  { color: #34d399; }
.cb-v.yellow { color: #facc15; }

.cb-seed-pill {
    font-size: 0.63rem;
    font-weight: 600;
    padding: 0.12rem 0.45rem;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cb-seed-pill.ready {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.cb-seed-pill.pending {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

/* ── Filter rows (replaces tick/cross checklist) ──────────── */
.cb-filters-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cb-filter-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.32rem 0.5rem;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.cb-filter-row.pass {
    background: rgba(52, 211, 153, 0.06);
    border-color: rgba(52, 211, 153, 0.15);
}

.cb-filter-row.fail {
    background: rgba(251, 146, 60, 0.06);
    border-color: rgba(251, 146, 60, 0.15);
}

.cb-filter-row.waiting {
    background: rgba(148, 163, 184, 0.04);
    border-color: rgba(148, 163, 184, 0.08);
}

.cb-filter-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cb-filter-dot.pass    { background: #34d399; box-shadow: 0 0 5px rgba(52, 211, 153, 0.4); }
.cb-filter-dot.fail    { background: #fb923c; box-shadow: 0 0 5px rgba(251, 146, 60, 0.3); }
.cb-filter-dot.waiting { background: rgba(148, 163, 184, 0.35); }
.cb-filter-dot.disabled { background: rgba(148, 163, 184, 0.2); }

.cb-filter-label {
    font-size: 0.72rem;
    color: #cbd5e1;
    flex: 1;
}

.cb-filter-row.waiting .cb-filter-label {
    color: rgba(148, 163, 184, 0.6);
}

.cb-filter-detail {
    font-size: 0.65rem;
    font-family: var(--font-mono, monospace);
    color: rgba(148, 163, 184, 0.55);
}

.cb-filter-row.pass .cb-filter-detail { color: rgba(52, 211, 153, 0.7); }
.cb-filter-row.fail .cb-filter-detail { color: rgba(251, 146, 60, 0.7); }

.cb-halt-pill {
    font-size: 0.63rem;
    font-weight: 700;
    padding: 0.12rem 0.5rem;
    border-radius: 5px;
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Indicators strip ──────────────────────────────────────── */
.cb-indicators-bar {
    padding: 0.6rem 1rem;
}

.cb-ind-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.45rem;
}

.cb-ind-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
}

.cb-ind-label {
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(148, 163, 184, 0.55);
}

.cb-ind-val {
    font-size: 0.76rem;
    font-weight: 600;
    font-family: var(--font-mono, monospace);
    color: #cbd5e1;
    white-space: nowrap;
}

.cb-ind-val.dim { color: rgba(148, 163, 184, 0.4); }

.cb-ind-bn {
    min-width: 0;
}

.cb-ind-sub {
    font-size: 0.6rem;
    font-weight: 500;
    font-family: var(--font-mono, monospace);
    color: rgba(148, 163, 184, 0.62);
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-ind-delta {
    font-size: 0.63rem;
    font-weight: 600;
}

.cb-ind-delta.up   { color: #f87171; }
.cb-ind-delta.down { color: #4ade80; }

/* ── Position card ─────────────────────────────────────────── */
.cb-position-card {
    border-color: rgba(52, 211, 153, 0.2);
}

.cb-dir-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cb-dir-badge.long {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.cb-dir-badge.short {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.cb-position-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.cb-position-contract {
    font-family: var(--font-mono, monospace);
    font-size: 0.88rem;
    color: #e2e8f0;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.cb-position-desc {
    font-size: 0.72rem;
    color: rgba(148, 163, 184, 0.6);
}

.cb-pnl-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(148, 163, 184, 0.55);
}

.cb-pnl-value {
    font-size: 1.3rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.cb-pnl-value.profit { color: #22c55e; }
.cb-pnl-value.loss   { color: #ef4444; }

.cb-position-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.4rem;
    margin-bottom: 0.55rem;
}

.cb-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 7px;
    padding: 0.3rem 0.2rem;
}

.cb-metric-k {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(148, 163, 184, 0.5);
}

.cb-metric-v {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono, monospace);
    color: #cbd5e1;
}

.cb-trail-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.cb-trail-status.active {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.18);
}

.cb-trail-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.65);
}

.cb-trail-status.active .cb-trail-label {
    color: #34d399;
}

.cb-trail-value {
    font-size: 0.72rem;
    font-family: var(--font-mono, monospace);
    color: rgba(148, 163, 184, 0.6);
}

.cb-trail-status.active .cb-trail-value {
    color: rgba(52, 211, 153, 0.8);
}

/* ── Summary bar ───────────────────────────────────────────── */
.cb-summary-bar {
    padding: 0.55rem 1rem;
}

.cb-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.cb-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.08rem;
}

.cb-summary-k {
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(148, 163, 184, 0.5);
}

.cb-summary-v {
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    color: #cbd5e1;
}

.cb-summary-v .dim {
    color: rgba(148, 163, 184, 0.4);
    font-weight: 400;
}

.cb-summary-v.profit { color: #22c55e; }
.cb-summary-v.loss   { color: #ef4444; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .cb-ind-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .cb-main-grid {
        grid-template-columns: 1fr;
    }

    .cb-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cb-position-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .cb-pipeline-track {
        overflow-x: auto;
        padding-bottom: 0.3rem;
    }

    .cb-pipe-label {
        font-size: 0.55rem;
    }

    .cb-pipe-line {
        width: 10px;
    }

    .cb-pipe-node {
        width: 24px;
        height: 24px;
    }

    .cb-ind-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cb-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cb-header-pills {
        flex-wrap: wrap;
    }
}

@media (max-width: 500px) {
    .cb-kv-grid {
        grid-template-columns: 1fr;
    }

    .cb-position-body {
        flex-direction: column;
        align-items: flex-start;
    }

    .cb-position-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}/* Theme Variables and Base Styles */

/* Apply theme-aware backgrounds and transitions */
body {
    background: var(--gradient-bg);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

/* Common component styles using CSS variables */
.shell {
    min-height: 100vh;
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.section-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 35px 65px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease, border-color 0.3s ease;
}

:root.light .section-card {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 0.65rem 1.3rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s;
    color: #fff;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

input,
textarea,
select {
    border-radius: 12px;
    border: 1px solid var(--border-medium);
    background: var(--bg-secondary);
    padding: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

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

th,
td {
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.6rem 0.4rem;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--text-muted);
    font-weight: 600;
}

.notice {
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-medium);
    background: var(--bg-secondary);
}

.notice.success {
    border-color: var(--success);
    color: var(--success);
    background: color-mix(in srgb, var(--success) 10%, var(--bg-secondary));
}

.notice.error {
    border-color: var(--danger);
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 10%, var(--bg-secondary));
}

.notice.info {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-secondary));
}/* ===== Enhanced Light Mode Styling ===== */
/* Inspired by modern fintech design principles and Color Hunt palettes */

:root.light {
    /* Premium shadow system for depth and elegance */
    --shadow-sm: 0 1px 3px rgba(100, 116, 139, 0.08), 0 1px 2px rgba(100, 116, 139, 0.06);
    --shadow-md: 0 4px 6px rgba(100, 116, 139, 0.07), 0 2px 4px rgba(100, 116, 139, 0.06);
    --shadow-lg: 0 10px 15px rgba(100, 116, 139, 0.1), 0 4px 6px rgba(100, 116, 139, 0.05);
    --shadow-xl: 0 20px 25px rgba(100, 116, 139, 0.1), 0 10px 10px rgba(100, 116, 139, 0.04);
    --shadow-2xl: 0 25px 50px rgba(100, 116, 139, 0.15);

    /* Accent shadows for interactive elements */
    --shadow-accent: 0 8px 20px rgba(99, 102, 241, 0.18);
    --shadow-success: 0 8px 20px rgba(5, 150, 105, 0.18);
}

/* ===== Cards & Panels ===== */
:root.light .dash-card,
:root.light .section-card,
:root.light .feature-card,
:root.light .chart-card {
    box-shadow: var(--shadow-md);
    border-color: var(--border-subtle);
    background: var(--bg-elevated);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

:root.light .dash-card:hover,
:root.light .chart-card:hover,
:root.light .feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--border-medium);
}

/* Premium accent highlights */
:root.light .section-card.highlight {
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
    box-shadow: var(--shadow-accent);
}

/* ===== Backgrounds with Subtle Depth ===== */
:root.light .broker-status,
:root.light .pnl-box,
:root.light .sub-item,
:root.light .catalog-item,
:root.light .dash-empty {
    background: color-mix(in srgb, var(--text-primary) 2%, var(--bg-primary));
    border-color: var(--border-subtle);
}

:root.light .sub-item:hover,
:root.light .catalog-item:hover {
    background: color-mix(in srgb, var(--text-primary) 4%, var(--bg-primary));
    border-color: var(--border-medium);
}

/* ===== Tables ===== */
:root.light .strategy-pnl-table th,
:root.light .admin-table thead th,
:root.light table thead th {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-medium);
}

:root.light .admin-table tbody tr:hover,
:root.light table tbody tr:hover {
    background: color-mix(in srgb, var(--accent) 3%, transparent);
}

/* ===== Hero & Feature Elements ===== */
:root.light .hero-chart-card,
:root.light .feature-card,
:root.light .audience-item,
:root.light .value-item {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

:root.light .hero-chart-card {
    box-shadow: var(--shadow-2xl);
    border-color: var(--border-medium);
}

/* ===== Icons & Decorative Elements ===== */
:root.light .dash-card__icon,
:root.light .feature-card__icon {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* ===== Subscription Cards ===== */
:root.light .subscription-card {
    background: var(--bg-card);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-md);
}

:root.light .subscription-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border-medium));
}

:root.light .subscription-card.is-active {
    border-color: color-mix(in srgb, var(--success) 40%, transparent);
    box-shadow: var(--shadow-success);
}

/* ===== Admin Panel ===== */
:root.light .admin-card,
:root.light .admin-metric {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

:root.light .admin-shell {
    background: var(--bg-secondary);
}

:root.light .admin-shell__main {
    background: var(--bg-primary);
    border-color: var(--border-subtle);
}

/* ===== Status Badges & Pills ===== */
:root.light .mode-badge.paper {
    background: color-mix(in srgb, var(--warning) 12%, transparent);
    border-color: color-mix(in srgb, var(--warning) 28%, transparent);
    color: #B45309;
}

:root.light .mode-badge.live {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    border-color: color-mix(in srgb, var(--danger) 28%, transparent);
    color: #B91C1C;
}

:root.light .status-badge.active,
:root.light .status-pill.success {
    background: color-mix(in srgb, var(--success) 12%, transparent);
    border-color: color-mix(in srgb, var(--success) 28%, transparent);
    color: #047857;
}

/* ===== PNL Boxes ===== */
:root.light .pnl-box.main {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), var(--bg-card));
    border-color: color-mix(in srgb, var(--accent) 22%, transparent);
    box-shadow: var(--shadow-accent);
}

/* ===== Empty States ===== */
:root.light .dash-empty,
:root.light .empty-state-card {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
    border-style: dashed;
}

/* ===== About Page Stats ===== */
:root.light .about-section--stats {
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-secondary));
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
}

/* ===== CTA Section ===== */
:root.light .about-cta {
    background: linear-gradient(135deg,
            color-mix(in srgb, var(--accent) 6%, var(--bg-elevated)),
            color-mix(in srgb, var(--accent) 2%, var(--bg-elevated)));
    border-color: color-mix(in srgb, var(--accent) 18%, transparent);
    box-shadow: var(--shadow-accent);
}

/* ===== Modals & Overlays ===== */
:root.light .settings-modal {
    box-shadow: var(--shadow-2xl);
    border-color: var(--border-medium);
}

:root.light .settings-backdrop {
    background: rgba(26, 32, 44, 0.35);
}

/* ===== Navigation ===== */
:root.light .shell__nav,
:root.light .admin-shell__nav {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

:root.light .shell__nav-link:hover,
:root.light .admin-shell__nav-link:hover {
    background: color-mix(in srgb, var(--accent) 6%, transparent);
}

/* ===== Forms ===== */
:root.light input,
:root.light textarea,
:root.light select {
    background: var(--bg-primary);
    border-color: var(--border-subtle);
}

:root.light input:focus,
:root.light textarea:focus,
:root.light select:focus {
    background: var(--bg-elevated);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ===== Trade Details ===== */
:root.light .trade-details-card {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

:root.light .details-grid section {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
}

/* ===== Floating Messages ===== */
:root.light .hero-msg-bubble {
    background: var(--bg-elevated);
    border-color: color-mix(in srgb, var(--success) 30%, transparent);
    box-shadow: var(--shadow-lg);
}

/* ===== Text Readability ===== */
:root.light .pnl-value,
:root.light .stat-number,
:root.light .trading-stat__value,
:root.light h1,
:root.light h2,
:root.light h3,
:root.light h4 {
    color: var(--text-primary);
}

/* ===== Button Refinements ===== */
:root.light .btn-secondary {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-sm);
}

:root.light .btn-secondary:hover {
    background: color-mix(in srgb, var(--text-primary) 4%, var(--bg-elevated));
    box-shadow: var(--shadow-md);
}

:root.light .btn-outline {
    border-color: var(--border-medium);
}

:root.light .btn-outline:hover {
    background: color-mix(in srgb, var(--text-primary) 3%, transparent);
    border-color: var(--text-secondary);
}

/* ===== Accent Button Glow ===== */
:root.light .btn-primary:hover {
    box-shadow: var(--shadow-accent);
}

/* ===== Sidebar & Topbar Light Mode Overrides ===== */

:root.light .sidebar {
    background: var(--bg-elevated);
    border-right-color: var(--border-medium);
}

:root.light .sidebar__brand {
    border-bottom-color: var(--border-subtle);
}

:root.light .brand-text h2 {
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

:root.light .nav-item {
    color: var(--text-secondary);
}

:root.light .nav-item:hover {
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    /* Subtle accent tint on hover */
    color: var(--accent-strong);
    transform: translateX(4px);
}

:root.light .nav-item.active {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent-strong);
    box-shadow: inset 3px 0 0 0 var(--accent);
    /* Left border indicator instead of glow */
}

:root.light .nav-item.active::before {
    display: none;
    /* Hide default glow bar to use inset shadow instead */
}

:root.light .sidebar__footer {
    background: var(--bg-secondary);
    border-top-color: var(--border-medium);
}

:root.light .user-info {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

:root.light .user-info:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-medium);
}

:root.light .sidebar__collapse-btn {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-sm);
    color: var(--text-secondary);
}

:root.light .sidebar__collapse-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ===== Topbar ===== */

:root.light .topbar {
    background: rgba(255, 255, 255, 0.9);
    /* More opaque for cleaner look */
    border-bottom-color: var(--border-medium);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
    /* Subtle shadow for separation */
}

:root.light .breadcrumb-link {
    color: var(--text-secondary);
}

:root.light .breadcrumb-link:hover {
    background: color-mix(in srgb, var(--text-primary) 5%, transparent);
    color: var(--text-primary);
}

:root.light .breadcrumb-current {
    color: var(--text-primary);
    font-weight: 700;
}

:root.light .search-toggle,
:root.light .icon-button,
:root.light .menu-toggle {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary);
}

:root.light .search-toggle:hover,
:root.light .icon-button:hover,
:root.light .menu-toggle:hover {
    background: color-mix(in srgb, var(--text-primary) 5%, transparent);
    color: var(--accent);
    /* Accent color on hover for icons */
}

:root.light .search-bar.open .search-toggle {
    background: var(--accent);
    color: white;
}

:root.light .search-input {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

:root.light .search-input::placeholder {
    color: var(--text-muted);
}

:root.light .search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Fix user avatar text in sidebar */
:root.light .user-email {
    color: var(--text-primary);
}

:root.light .user-details .user-status {
    color: var(--success);
}

:root.light .btn-logout {
    color: var(--text-muted);
}

:root.light .btn-logout:hover {
    background: color-mix(in srgb, var(--error) 10%, transparent);
    color: var(--error);
}

/* ===== Subscription Page Overrides ===== */

:root.light .dashboard-header {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-sm);
}

:root.light .stat-box {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

:root.light .stat-box:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-medium);
}

:root.light .stat-box.active {
    background: color-mix(in srgb, var(--success) 8%, transparent);
    border-color: color-mix(in srgb, var(--success) 20%, transparent);
}

:root.light .stat-box.active .stat-number {
    color: var(--success);
}

:root.light .stat-box.paper {
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    border-color: color-mix(in srgb, var(--accent) 20%, transparent);
}

:root.light .stat-box.paper .stat-number {
    color: var(--accent);
}

:root.light .stat-box.live {
    background: color-mix(in srgb, var(--danger) 8%, transparent);
    border-color: color-mix(in srgb, var(--danger) 20%, transparent);
}

:root.light .stat-box.live .stat-number {
    color: var(--danger);
}

:root.light .stat-label {
    color: var(--text-secondary);
    font-weight: 600;
}

:root.light .subscription-card {
    background: var(--bg-elevated);
    /* Ensure card background is white */
    border-color: var(--border-subtle);
}

:root.light .strategy-icon {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent);
}

:root.light .card-config,
:root.light .config-grid {
    background: var(--bg-secondary);
    /* Light gray background for details */
    color: var(--text-secondary);
}

:root.light .config-grid {
    border: 1px solid var(--border-subtle);
}

:root.light .config-label {
    color: var(--text-muted);
}

:root.light .config-value {
    color: var(--text-primary);
}

:root.light .action-btn.secondary {
    background: white;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

:root.light .action-btn.secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

:root.light .action-btn.quick-status {
    background: white;
    border-color: var(--border-medium);
    color: var(--text-secondary);
}

:root.light .action-btn.quick-status:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

:root.light .strategy-status-card {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

:root.light .status-section {
    border-bottom-color: var(--border-medium);
}

/* ===== Positions Page Overrides ===== */

/* Section Cards */
:root.light .positions-section,
:root.light .section-card,
:root.light .page-header,
:root.light .orb-section,
:root.light .orb-instrument-card {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

:root.light .positions-section {
    background: var(--bg-elevated);
    /* Override gradient */
}

/* PnL Cards */
:root.light .pnl-card {
    background: var(--bg-secondary);
    border-color: var(--border-subtle);
}

:root.light .pnl-card.total {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 15%, transparent), var(--bg-secondary));
    border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}

:root.light .pnl-label {
    color: var(--text-muted);
    font-weight: 600;
}

:root.light .pnl-value.neutral {
    color: var(--text-primary);
}

/* Tables */
:root.light .trades-scroll-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
}

:root.light .trades-scroll-container thead th {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-medium);
}

:root.light .trades-table th {
    color: var(--text-muted);
}

:root.light .trades-table tbody tr:hover {
    background: color-mix(in srgb, var(--accent) 5%, transparent);
}

:root.light .trades-table td {
    border-bottom-color: var(--border-subtle);
    color: var(--text-primary);
}

/* Strategy Details */
:root.light .back-btn {
    background: white;
    border-color: var(--border-medium);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

:root.light .back-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

:root.light .range-value,
:root.light .stat-item,
:root.light .summary-item,
:root.light .config-section .config-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
}

:root.light .orb-strategy-status {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}

:root.light .orb-header h3 {
    color: var(--text-primary);
}

:root.light .orb-header {
    border-bottom-color: var(--border-medium);
}

:root.light .orb-meta .meta-item {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

:root.light .orb-section h4 {
    color: var(--text-muted);
}

:root.light .orb-section .value {
    color: var(--text-primary);
}

:root.light .orb-section .value.high,
:root.light .orb-section .value.profit,
:root.light .orb-section .value.target,
:root.light .orb-section .value.above {
    color: var(--success);
}

:root.light .orb-section .value.low,
:root.light .orb-section .value.loss,
:root.light .orb-section .value.stop,
:root.light .orb-section .value.below {
    color: var(--danger);
}

:root.light .strategy-status-card {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

:root.light .strategy-status-card .status-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
}

:root.light .strategy-status-card .status-row .label {
    color: var(--text-muted);
}

:root.light .strategy-status-card .status-row .value {
    color: var(--text-primary);
}

/* ===== Catalog Page Overrides ===== */

:root.light .catalog-card {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

:root.light .catalog-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
}

:root.light .catalog-card.active {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), var(--bg-elevated));
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}

:root.light .catalog-card__key {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

:root.light .catalog-card__header h3 {
    color: var(--text-primary);
}

:root.light .catalog-card__desc {
    color: var(--text-secondary);
}

:root.light .config-field select {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

:root.light .config-field select:hover {
    border-color: var(--text-muted);
}

:root.light .config-field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

:root.light .checkbox-field span {
    color: var(--text-secondary);
}

/* ===== Trade Reports Page Overrides ===== */

:root.light .filter-row input,
:root.light .filter-row select {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

:root.light .filter-row input:focus,
:root.light .filter-row select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

:root.light .filter-row label,
:root.light .filter-inline label {
    color: var(--text-secondary);
}

:root.light .stat-card {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

:root.light .stat-label,
:root.light .stat-mini {
    color: var(--text-secondary);
}

:root.light .stat-value,
:root.light .stat-mini strong {
    color: var(--text-primary);
}

:root.light .stats-row {
    border-bottom-color: var(--border-medium);
}

:root.light .table-scroll table thead th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-bottom-color: var(--border-medium);
}

:root.light .table-scroll table tbody td {
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

:root.light .table-scroll table tbody tr:hover {
    background: color-mix(in srgb, var(--accent) 5%, transparent);
}

:root.light .row-warning {
    background: color-mix(in srgb, var(--warning) 10%, transparent);
}

:root.light .row-warning td {
    border-color: color-mix(in srgb, var(--warning) 20%, transparent);
}

:root.light .section-card.danger-zone {
    border-color: color-mix(in srgb, var(--danger) 30%, transparent);
    background: color-mix(in srgb, var(--danger) 3%, white);
}

:root.light .danger-note {
    color: var(--text-muted);
}

/* ===== About Page Overrides ===== */

:root.light .about-hero__badge {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border-color: color-mix(in srgb, var(--accent) 20%, transparent);
    color: var(--accent-strong);
}

:root.light .about-hero__title,
:root.light .about-section__header h2,
:root.light .feature-card h3,
:root.light .about-cta h2,
:root.light .stat-item__value,
:root.light .value-item h4,
:root.light .audience-item h4,
:root.light .hero-stat__value {
    color: var(--text-primary);
}

:root.light .about-hero__subtitle,
:root.light .about-why p,
:root.light .feature-card p,
:root.light .about-cta p,
:root.light .stat-item__label,
:root.light .value-item p,
:root.light .audience-item p,
:root.light .hero-stat__label {
    color: var(--text-muted);
}

:root.light .hero-chart-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-2xl);
    backdrop-filter: blur(20px);
}

:root.light .hero-msg-bubble {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

:root.light .hero-stat__divider {
    background: var(--border-medium);
}

:root.light .feature-card,
:root.light .audience-item,
:root.light .value-item {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

:root.light .feature-card:hover,
:root.light .audience-item:hover,
:root.light .value-item:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
    background: var(--bg-secondary);
}

:root.light .about-section--stats {
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-secondary));
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
}

:root.light .about-cta {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, transparent), var(--bg-elevated));
    border-color: color-mix(in srgb, var(--accent) 15%, transparent);
    box-shadow: var(--shadow-lg);
}

:root.light .chart-card {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
}

:root.light .trade-log__item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
}

:root.light .trade-log__time {
    color: var(--text-secondary);
}

:root.light .trade-summary {
    border-top-color: var(--border-medium);
}

:root.light .trade-summary__divider {
    background: var(--border-medium);
}

:root.light .metric-row {
    border-bottom-color: var(--border-subtle);
}

:root.light .metric-row:hover {
    background: var(--bg-secondary);
}

:root.light .hero-chart-title {
    color: var(--text-secondary);
}

:root.light .stat-item__note {
    color: var(--text-muted);
}

/* ===== About Page Table Fixes ===== */
:root.light .metrics-table-wrapper {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
}

:root.light .metrics-table th {
    background: var(--bg-secondary);
    color: var(--text-muted);
    border-bottom-color: var(--border-medium);
}

:root.light .metrics-table td {
    color: var(--text-primary);
    border-bottom-color: var(--border-subtle);
}

:root.light .metrics-table tbody tr:hover {
    background: var(--bg-secondary);
}