@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);
}


/* ===== 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;
}/* 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 .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);
}/* 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);
}/* ===== Admin Console - Extends layout.css ===== */

/* Admin-specific brand styling */
.admin-brand-icon {
    background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4) !important;
}

/* Back to App link in topbar */
.admin-back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    border-radius: 8px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.admin-back-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #fff);
    border-color: var(--border-medium, rgba(255, 255, 255, 0.12));
}

/* Admin content area */
.admin-content-main {
    padding: 2rem;
    max-width: 1600px;
}

/* Loading and blocked states */
.admin-shell__loading,
.admin-shell__blocked {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--bg-primary, #0a0e1a);
    color: var(--text-primary, #fff);
}

.admin-shell__blocked a {
    color: var(--accent, #6c63ff);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.admin-shell__blocked a:hover {
    background: rgba(108, 99, 255, 0.2);
}

/* 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;
}

.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;
}

.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;
}

/* ============================================
   METRIC CARD COMPONENT
   ============================================ */
.admin-metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.admin-metric-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.admin-metric-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-metric-card__title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
}

.admin-metric-card__icon {
    color: var(--accent, #6c63ff);
    opacity: 0.8;
}

.admin-metric-card__value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.admin-metric-card__subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.admin-metric-card__trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
}

.admin-metric-card__trend--up {
    color: #43e6b1;
    background: rgba(67, 230, 177, 0.1);
}

.admin-metric-card__trend--down {
    color: #ff8b8b;
    background: rgba(255, 139, 139, 0.1);
}

.admin-metric-card__trend--neutral {
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

/* Loading skeleton */
.admin-metric-card--loading {
    animation: pulse 1.5s ease-in-out infinite;
}

.admin-metric-card__skeleton-title,
.admin-metric-card__skeleton-value,
.admin-metric-card__skeleton-subtitle {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
}

.admin-metric-card__skeleton-title {
    width: 60%;
    height: 14px;
}

.admin-metric-card__skeleton-value {
    width: 80%;
    height: 32px;
    margin: 0.5rem 0;
}

.admin-metric-card__skeleton-subtitle {
    width: 40%;
    height: 12px;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ============================================
   STATUS BADGE COMPONENT
   ============================================ */
.admin-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    border-radius: 50px;
    white-space: nowrap;
}

.admin-status-badge--sm {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

.admin-status-badge--md {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
}

.admin-status-badge--lg {
    font-size: 0.9rem;
    padding: 0.4rem 0.9rem;
}

.admin-status-badge__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.admin-status-badge--success {
    background: rgba(67, 230, 177, 0.15);
    color: #43e6b1;
    border: 1px solid rgba(67, 230, 177, 0.3);
}

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

.admin-status-badge--error {
    background: rgba(255, 139, 139, 0.15);
    color: #ff8b8b;
    border: 1px solid rgba(255, 139, 139, 0.3);
}

.admin-status-badge--muted {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-status-badge--info {
    background: rgba(108, 99, 255, 0.15);
    color: #a29bff;
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.admin-status-badge--ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   MODAL COMPONENT
   ============================================ */
.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 9, 20, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.admin-modal {
    background: rgba(15, 20, 40, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.25s ease;
}

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

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

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

.admin-modal--md {
    max-width: 560px;
}

.admin-modal--lg {
    max-width: 768px;
}

.admin-modal--xl {
    max-width: 1024px;
}

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

.admin-modal__title {
    font-size: 1.25rem;
    margin: 0;
}

.admin-modal__description {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
}

.admin-modal__close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 10px;
    padding: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-modal__content {
    padding: 1.5rem;
}

.admin-modal__footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ============================================
   CONFIRM DIALOG COMPONENT
   ============================================ */
.admin-confirm-dialog__body {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.admin-confirm-dialog__icon {
    flex-shrink: 0;
}

.admin-confirm-dialog__icon--warning {
    color: #BFC9D1;
}

.admin-confirm-dialog__icon--danger {
    color: #ff8b8b;
}

.admin-confirm-dialog__icon--info {
    color: #6c63ff;
}

.admin-confirm-dialog__title {
    margin: 0;
    font-size: 1.1rem;
}

.admin-confirm-dialog__message {
    margin: 0.5rem 0 0;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
}

.admin-confirm-dialog__actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    justify-content: flex-end;
}

/* ============================================
   SEARCH INPUT COMPONENT
   ============================================ */
.admin-search-input {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 220px;
}

.admin-search-input__icon {
    position: absolute;
    left: 1rem;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.admin-search-input__input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 0.7rem 2.5rem 0.7rem 2.8rem;
    font-size: 0.95rem;
    color: #fff;
    transition: all 0.2s ease;
}

.admin-search-input__input:focus {
    outline: none;
    border-color: var(--accent, #6c63ff);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

.admin-search-input__input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.admin-search-input__loader {
    position: absolute;
    right: 1rem;
    color: var(--accent, #6c63ff);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.admin-search-input__clear {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    padding: 0.25rem;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.admin-search-input__clear:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ============================================
   FORM FIELD COMPONENT
   ============================================ */
.admin-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.admin-form-field__label {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.admin-form-field__required {
    color: #ff8b8b;
    margin-left: 0.2rem;
}

.admin-form-field__error {
    font-size: 0.8rem;
    color: #ff8b8b;
}

.admin-form-field__helper {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
}

.admin-input,
.admin-select,
.admin-textarea {
    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;
    transition: all 0.2s ease;
}

.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
    outline: none;
    border-color: var(--accent, #6c63ff);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

.admin-input--error,
.admin-select--error,
.admin-textarea--error {
    border-color: #ff8b8b;
}

.admin-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.admin-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.admin-checkbox input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--accent, #6c63ff);
}

/* ============================================
   DATE RANGE PICKER COMPONENT
   ============================================ */
.admin-date-range-picker {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-date-range-picker__presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-date-range-picker__preset {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-date-range-picker__preset:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.admin-date-range-picker__preset.is-active {
    background: var(--accent, #6c63ff);
    border-color: var(--accent, #6c63ff);
    color: #fff;
}

.admin-date-range-picker__inputs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-date-range-picker__field {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-date-range-picker__icon {
    position: absolute;
    left: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.admin-date-range-picker__input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.6rem 0.85rem 0.6rem 2.5rem;
    font-size: 0.9rem;
    color: #fff;
    color-scheme: dark;
}

.admin-date-range-picker__input:focus {
    outline: none;
    border-color: var(--accent, #6c63ff);
}

.admin-date-range-picker__separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* ============================================
   DATA TABLE COMPONENT
   ============================================ */
.admin-data-table-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-data-table-container {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    background: rgba(5, 9, 20, 0.6);
}

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

.admin-data-table--compact td,
.admin-data-table--compact th {
    padding: 0.6rem 0.8rem;
}

.admin-data-table thead th {
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-data-table__sortable-header {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.admin-data-table__sortable-header:hover {
    color: #fff;
}

.admin-data-table__header-content {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-data-table__sort-icon {
    opacity: 0.8;
}

.admin-data-table__sort-icon--inactive {
    opacity: 0.3;
}

.admin-data-table tbody td {
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.9);
}

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

.admin-data-table tbody tr.is-selected {
    background: rgba(108, 99, 255, 0.1);
}

.admin-data-table__clickable-row {
    cursor: pointer;
}

.admin-data-table__checkbox-cell {
    width: 40px;
}

.admin-data-table__empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

.admin-data-table__loading-row td {
    padding: 0.85rem 1rem;
}

.admin-data-table__skeleton {
    height: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    animation: pulse 1.5s ease-in-out infinite;
}

.admin-data-table__pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem 0;
}

.admin-data-table__pagination-info {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.admin-data-table__page-size select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    color: #fff;
}

.admin-data-table__pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-data-table__pagination-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-data-table__pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

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

.admin-data-table__pagination-page {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 0 0.5rem;
}

/* ============================================
   SIDEBAR LAYOUT
   ============================================ */
.admin-shell--with-sidebar {
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    grid-row: 1 / -1;
    background: rgba(10, 14, 30, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
}

.admin-sidebar.is-collapsed {
    width: 80px;
}

.admin-sidebar__brand {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 1rem;
}

.admin-sidebar__brand h2 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-sidebar__nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0.75rem;
}

.admin-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.admin-sidebar__link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.admin-sidebar__link.is-active {
    background: linear-gradient(135deg, var(--accent, #6c63ff), var(--accent-strong, #8b5cf6));
    color: #fff;
    box-shadow: 0 8px 20px rgba(108, 99, 255, 0.3);
}

.admin-sidebar__link-icon {
    flex-shrink: 0;
}

.admin-sidebar__footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
}

/* Button variants */
.btn-warning {
    background: linear-gradient(135deg, #BFC9D1, #94a3b8);
    color: #fff;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .admin-shell--with-sidebar {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        display: none;
    }

    .admin-page__split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .admin-metric-card__value {
        font-size: 1.5rem;
    }

    .admin-date-range-picker__inputs {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-date-range-picker__separator {
        text-align: center;
    }
}

/* ============================================
   CONTENT AREA & TOPBAR
   ============================================ */
.admin-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(10, 14, 30, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-topbar__left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-topbar__toggle {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.admin-topbar__title h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-topbar__subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.admin-topbar__right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-topbar__email {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.admin-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* ============================================
   DASHBOARD PAGE STYLES
   ============================================ */
.admin-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.admin-dashboard__header h2 {
    margin: 0;
}

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

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

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

.admin-dashboard__stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.admin-dashboard__stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-dashboard__stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
}

.admin-dashboard__stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-dashboard__stat-value--success {
    color: #43e6b1;
}

.admin-dashboard__stat-value--error {
    color: #ff8b8b;
}

.admin-dashboard__stat-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    width: fit-content;
}

.admin-dashboard__stat-badge.success {
    background: rgba(67, 230, 177, 0.15);
    color: #43e6b1;
}

.admin-dashboard__stat-badge.info {
    background: rgba(108, 99, 255, 0.15);
    color: #a29bff;
}

.admin-dashboard__stat-badge.muted {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
}

.admin-dashboard__stat-icon {
    margin-top: 0.25rem;
}

.admin-dashboard__stat-icon.success {
    color: #43e6b1;
}

.admin-dashboard__stat-icon.error {
    color: #ff8b8b;
}

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

.admin-dashboard__action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
}

.admin-dashboard__action:hover {
    background: rgba(108, 99, 255, 0.1);
    border-color: rgba(108, 99, 255, 0.3);
    color: #fff;
}

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

/* ============================================
   SETTINGS PAGE STYLES
   ============================================ */
.admin-settings {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
}

.admin-settings__section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-settings__section-icon {
    color: var(--accent, #6c63ff);
}

.admin-settings__group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1rem;
}

.admin-settings__row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-settings__help {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    padding-left: 1.6rem;
}

.admin-settings__api-note {
    background: rgba(255, 193, 7, 0.05);
    border-color: rgba(255, 193, 7, 0.2);
}

.admin-settings__api-note-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    color: #ffc107;
}

.admin-settings__api-note-content h4 {
    margin: 0;
    font-size: 0.95rem;
}

.admin-settings__api-note-content p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   ACTIVITY PAGE STYLES
   ============================================ */
.admin-activity {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-activity__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.admin-activity__filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-activity__filter-icon {
    color: rgba(255, 255, 255, 0.4);
}

.admin-activity__time {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.admin-activity__details {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Section header */
.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.admin-section-header h3 {
    margin: 0;
    font-size: 1rem;
}

.admin-section-header p {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* User info in sidebar */
.admin-sidebar__user {
    margin-bottom: 0.75rem;
}

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

.admin-sidebar__signout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: flex-start;
}

/* Admin notices styling */
.admin-notices {
    padding: 0 1.5rem;
}

.admin-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.admin-notice--success {
    background: rgba(67, 230, 177, 0.1);
    border: 1px solid rgba(67, 230, 177, 0.2);
    color: #43e6b1;
}

.admin-notice--error {
    background: rgba(255, 139, 139, 0.1);
    border: 1px solid rgba(255, 139, 139, 0.2);
    color: #ff8b8b;
}

.admin-notice--warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.admin-notice--info {
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.2);
    color: #a29bff;
}

.admin-notice button {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
}

.admin-notice button:hover {
    opacity: 1;
}

/* Text utilities */
.text-muted {
    color: rgba(255, 255, 255, 0.5);
}/* ===== Settings Modal ===== */

.settings-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

:root.light .settings-backdrop {
    background: rgba(0, 0, 0, 0.3);
}

.settings-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 550px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: flex;
    overflow: hidden;
    animation: scaleIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Sidebar */
.settings-sidebar {
    width: 240px;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-subtle);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.settings-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.settings-nav-item:hover {
    background: color-mix(in srgb, var(--text-primary) 8%, transparent);
    color: var(--text-primary);
}

.settings-nav-item.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Content */
.settings-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-subtle);
}

.settings-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.settings-body {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 2rem;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section h3 {
    margin: 0 0 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

.settings-info label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.settings-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Theme Toggle */
.theme-toggle-group {
    display: flex;
    background: var(--bg-primary);
    padding: 0.25rem;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-option:hover {
    color: var(--text-primary);
}

.theme-option.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Placeholder */
.settings-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

/* Account Settings */
.account-settings-container {
    display: flex;
    flex-direction: column;
}

.profile-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent, #6366f1), var(--accent-glow, #818cf8));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.settings-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 2rem 0;
}

/* Forms */
.password-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--accent, #6366f1);
    box-shadow: 0 0 0 2px var(--accent-glow, rgba(99, 102, 241, 0.3));
}

.input-wrapper input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9375rem;
    flex: 1;
    outline: none;
    width: 100%;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Buttons */
.btn-primary,
.btn-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--accent, #6366f1);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    filter: brightness(110%);
    box-shadow: 0 4px 12px var(--accent-glow, rgba(99, 102, 241, 0.3));
}

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

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

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

.text-danger {
    color: #ef4444 !important;
}

/* Messages */
.message {
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Danger Zone */
.danger-zone {
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.danger-zone h3 {
    color: #ef4444;
}

.danger-row {
    background: rgba(239, 68, 68, 0.05);
    border: none;
}

.settings-loading,
.settings-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    gap: 1rem;
    color: var(--text-muted);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent, #6366f1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Security Settings */
.btn-toggle {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-toggle.active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.session-row {
    padding: 1rem;
    gap: 1rem;
}

.session-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.session-details {
    display: flex;
    gap: 1rem;
    margin-top: 0.25rem;
}

.session-detail {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.current-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.icon-button-danger {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Billing Settings */
.plan-card {
    align-items: flex-start;
}

.plan-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.plan-icon {
    color: var(--accent);
    margin-top: 0.25rem;
}

.plan-name {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

.plan-interval {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.plan-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.renewal-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.plan-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-secondary {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-secondary.danger {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

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

.payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-row {
    padding: 1rem;
}

.payment-icon {
    width: 48px;
    height: 32px;
    background: var(--bg-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
}

.payment-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.default-badge {
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--border-subtle);
}

.capitalize {
    text-transform: capitalize;
}

.btn-dashed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px dashed var(--border-medium);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-dashed:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

/* Invoices Table */
.invoices-table {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
}

.invoice-row {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
}

.invoice-row:last-child {
    border-bottom: none;
}

.invoice-date {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.invoice-amount {
    flex: 1;
    color: var(--text-primary);
}

.invoice-status {
    flex: 1;
}

.status-pill {
    padding: 0.125rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-pill.paid {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.status-pill.pending {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .settings-modal {
        width: 95vw;
        height: 90vh;
        flex-direction: column;
        border-radius: 12px;
    }

    .settings-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 1rem;
        flex-shrink: 0;
    }

    .settings-title {
        margin-bottom: 1rem;
        font-size: 1rem;
    }

    .settings-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.5rem;
        padding-bottom: 0.25rem;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .settings-nav::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .settings-nav-item {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.03);
    }

    .settings-nav-item.active {
        background: var(--accent);
    }

    .settings-content {
        flex: 1;
        overflow-y: auto;
    }

    .settings-header {
        padding: 1rem 1.25rem;
    }

    .settings-header h2 {
        font-size: 1.125rem;
    }

    .settings-body {
        padding: 1rem 1.25rem;
    }

    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .settings-info {
        width: 100%;
    }

    .theme-toggle-group {
        width: 100%;
    }

    .theme-option {
        flex: 1;
        justify-content: center;
    }

    /* Account Settings Mobile */
    .profile-info {
        gap: 1.5rem;
    }

    .input-wrapper {
        padding: 0.625rem 0.875rem;
    }

    .sessions-list {
        gap: 0.5rem;
    }

    .session-row {
        padding: 0.75rem;
    }

    .session-icon {
        width: 32px;
        height: 32px;
    }
}/* About Page - Professional Fintech Design */

.about-page {
    /* max-width: 900px; */
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

/* ===== Hero Section ===== */
/* ===== Hero Section ===== */
.about-hero {
    padding: 3rem 0;
    animation: fadeIn 0.6s ease-out;
}

.about-hero__content {
    display: flex;
    align-items: center;
    gap: 4rem;
    justify-content: space-between;
}

.about-hero__text {
    flex: 1;
    max-width: 540px;
    text-align: left;
}

.about-hero__visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    max-width: 600px;
}

.about-hero__badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 20px;
    margin-bottom: 2rem;
}

.about-hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.about-hero__subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0 0 2.5rem;
    max-width: 480px;
}

.about-hero__actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3.5rem;
}

/* Hero Stats */
.about-hero__stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hero-stat__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hero-stat__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-stat__divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Chart Card */
.hero-chart-card {
    position: relative;
    width: 100%;
    background: rgba(11, 23, 56, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    overflow: visible;
}

.hero-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.hero-chart-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-chart-value {
    font-family: 'Space Mono', monospace;
    font-size: 1.25rem;
    color: #43e6b1;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(67, 230, 177, 0.3);
}

.dot {
    position: relative;
    width: 12px;
    height: 12px;
    background: rgb(67, 230, 177);
    border-radius: 50%;
    transform: translateZ(0);
}

.dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(67, 230, 177, 0.6);
    transform: scale(1);
    opacity: 1;
    animation: pulse 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
    will-change: transform, opacity;
}

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

    70% {
        transform: scale(2.5);
        opacity: 0;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Floating Messages */
.hero-msg-bubble {
    position: absolute;
    padding: 0.75rem 1.25rem;
    background: rgba(15, 25, 50, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(67, 230, 177, 0.3);
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #f4f6ff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10;
    animation: float 4s ease-in-out infinite;
    white-space: nowrap;
}

.hero-msg-bubble span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-msg-bubble--1 {
    top: -20px;
    right: -20px;
    animation-delay: 0s;
    border-color: rgba(67, 230, 177, 0.3);
}

.hero-msg-bubble--2 {
    bottom: 40px;
    left: -30px;
    animation-delay: 2s;
    border-color: rgba(108, 99, 255, 0.3);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    20% {
        transform: translateY(-8px);
    }

    40% {
        transform: translateY(0px);
    }

    60% {
        transform: translateY(0px);
    }

    80% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Mobile Responsive */
@media (max-width: 960px) {
    .about-hero__content {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .about-hero__text {
        max-width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .about-hero__actions {
        justify-content: center;
    }

    .about-hero__stats {
        justify-content: center;
    }

    .hero-msg-bubble--2 {
        left: 0;
    }
}


.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ===== Section Layout ===== */
.about-section {
    animation: fadeIn 0.6s ease-out backwards;
}

.about-section:nth-child(2) {
    animation-delay: 0.1s;
}

.about-section:nth-child(3) {
    animation-delay: 0.15s;
}

.about-section:nth-child(4) {
    animation-delay: 0.2s;
}

.about-section:nth-child(5) {
    animation-delay: 0.25s;
}

.about-section:nth-child(6) {
    animation-delay: 0.3s;
}

.about-section__header {
    margin-bottom: 2rem;
}

.about-section__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.about-section__header h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

/* ===== Why We Exist ===== */
.about-why {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-why p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin: 0;
}

/* ===== Feature Cards ===== */
.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: rgba(11, 23, 56, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(108, 99, 255, 0.3);
}

.feature-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 10px;
    color: var(--accent);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

/* ===== Stats Section ===== */
.about-section--stats {
    background: linear-gradient(135deg, rgba(11, 23, 56, 0.5), rgba(5, 12, 40, 0.4));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    margin: 0 -1rem;
}

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

.stat-item {
    text-align: center;
}

.stat-item__value {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-item__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.stat-item__note {
    font-size: 0.75rem;
    color: rgba(138, 150, 191, 0.7);
    margin-top: 0.25rem;
}

.about-stats__disclaimer {
    font-size: 0.8125rem;
    color: rgba(138, 150, 191, 0.6);
    text-align: center;
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ===== Audience Section ===== */
.about-audience {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.audience-item {
    padding: 1.5rem;
    background: rgba(11, 23, 56, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.2s ease;
}

.audience-item:hover {
    border-color: rgba(108, 99, 255, 0.25);
}

.audience-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.audience-item p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

/* ===== Values Section ===== */
.about-values {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.value-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: rgba(11, 23, 56, 0.25);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.2s ease;
}

.value-item:hover {
    border-color: rgba(108, 99, 255, 0.25);
}

.value-item__number {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.6;
    min-width: 28px;
}

.value-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
}

.value-item p {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
}

/* ===== CTA Section ===== */
.about-cta {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.08), rgba(108, 99, 255, 0.03));
    border: 1px solid rgba(108, 99, 255, 0.15);
    border-radius: 16px;
    animation: fadeIn 0.6s ease-out 0.35s backwards;
}

.about-cta h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.about-cta p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 1.5rem;
}

.about-cta__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Performance Dashboard ===== */
.performance-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

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

/* ===== Trading Showcase ===== */
.trading-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.chart-card--large {
    grid-column: 1 / -1;
}

.chart-card__subtitle {
    font-size: 0.75rem;
    color: rgba(138, 150, 191, 0.6);
    margin-top: 0.125rem;
}

.chart-card__live {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #43e6b1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #43e6b1;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

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

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.chart-card__signals {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

.signal-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.signal-item--buy {
    color: #43e6b1;
}

.signal-item--sell {
    color: #e74c3c;
}

.signal-item--profit {
    color: #43e6b1;
    font-weight: 700;
    margin-left: auto;
}

.signal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Volume Bars */
.volume-bars {
    display: flex;
    gap: 4px;
    height: 30px;
    align-items: flex-end;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

.volume-bar {
    flex: 1;
    min-width: 8px;
    border-radius: 2px 2px 0 0;
    opacity: 0.7;
}

/* Trading Stats */
.chart-card--stats {
    display: flex;
    flex-direction: column;
}

.trading-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    flex: 1;
    align-content: center;
}

.trading-stat {
    text-align: center;
}

.trading-stat__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.trading-stat__value--profit {
    color: #43e6b1;
}

.trading-stat__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Trade Summary Bar ===== */
.trade-summary {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.trade-summary__item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.trade-summary__label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trade-summary__value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.trade-summary__value--buy {
    color: #43e6b1;
}

.trade-summary__value--sell {
    color: #e74c3c;
}

.trade-summary__value--profit {
    color: #43e6b1;
    font-weight: 700;
}

.trade-summary__arrow {
    font-size: 1.25rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.trade-summary__divider {
    width: 1px;
    height: 28px;
    background: var(--border);
    margin: 0 0.5rem;
}

/* ===== Trade Execution Log ===== */
.trade-log {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.trade-log__item {
    display: grid;
    grid-template-columns: 50px 50px 80px 50px 1fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    font-size: 0.8125rem;
}

.trade-log__item--buy {
    border-left: 2px solid #43e6b1;
}

.trade-log__item--sell {
    border-left: 2px solid #e74c3c;
}

.trade-log__time {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.trade-log__type {
    font-weight: 700;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trade-log__type--buy {
    color: #43e6b1;
}

.trade-log__type--sell {
    color: #e74c3c;
}

.trade-log__price {
    color: var(--text-primary);
    font-weight: 500;
}

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

.trade-log__pnl {
    color: #43e6b1;
    font-weight: 600;
    text-align: right;
}

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot--success {
    background: #43e6b1;
}

.chart-card {
    background: rgba(11, 23, 56, 0.5);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    transition: border-color 0.2s ease;
}



.chart-card:hover {
    border-color: rgba(108, 99, 255, 0.3);
}

.chart-card--full {
    grid-column: 1 / -1;
}

.chart-card--centered {
    text-align: center;
}

.chart-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.chart-card__header h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 0.25rem;
}

.chart-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.chart-card__badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chart-card__badge--success {
    background: rgba(67, 230, 177, 0.15);
    color: #43e6b1;
}

.chart-card__body {
    margin: 0.5rem 0;
}

.chart-card__body--pie {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pie-center-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.pie-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.pie-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chart-card__footer {
    font-size: 0.75rem;
    color: rgba(138, 150, 191, 0.6);
    margin-top: 0.5rem;
}

.perf-card {
    background: rgba(11, 23, 56, 0.5);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    transition: border-color 0.2s ease;
}

.perf-card:hover {
    border-color: rgba(108, 99, 255, 0.3);
}

.perf-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.perf-card__header h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

.perf-card__badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.perf-card__badge--success {
    background: rgba(67, 230, 177, 0.15);
    color: #43e6b1;
}

.perf-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.perf-card__chart {
    height: 60px;
    margin-bottom: 0.5rem;
}

.perf-card__footer {
    font-size: 0.75rem;
    color: rgba(138, 150, 191, 0.6);
}

.perf-card--donut {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.perf-card--donut .perf-card__header {
    width: 100%;
}

/* Mini Chart */
.mini-chart {
    width: 100%;
    height: 100%;
}

/* Donut Chart */
.donut-chart {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0.5rem 0;
}

.donut-chart svg {
    width: 100%;
    height: 100%;
}

.donut-chart__progress {
    transition: stroke-dashoffset 1s ease-out;
}

.donut-chart__center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-chart__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.donut-chart__label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Speed Comparison ===== */
.speed-comparison {
    background: rgba(11, 23, 56, 0.4);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
}

.speed-comparison__note {
    font-size: 0.8125rem;
    color: rgba(138, 150, 191, 0.6);
    margin: 1.25rem 0 0;
    text-align: center;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar-chart__item {
    display: grid;
    grid-template-columns: 140px 1fr 60px;
    align-items: center;
    gap: 1rem;
}

.bar-chart__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.bar-chart__track {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
}

.bar-chart__fill {
    height: 100%;
    background: linear-gradient(90deg, #43e6b1, #6c63ff);
    border-radius: 5px;
    transition: width 1s ease-out;
}

.bar-chart__item:nth-child(2) .bar-chart__fill {
    background: linear-gradient(90deg, #f5a623, #e67e22);
}

.bar-chart__item:nth-child(3) .bar-chart__fill {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.bar-chart__value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: right;
}

/* ===== Metrics Table ===== */
.metrics-table-wrapper {
    background: rgba(11, 23, 56, 0.4);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.metrics-table {
    width: 100%;
    border-collapse: collapse;
}

.metrics-table th,
.metrics-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.metrics-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
}

.metrics-table td {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.metrics-table tbody tr:last-child td {
    border-bottom: none;
}

.metrics-table tbody tr:hover {
    background: rgba(108, 99, 255, 0.05);
}

/* Status Badge */
.status-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge--success {
    background: rgba(67, 230, 177, 0.15);
    color: #43e6b1;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .about-hero__content {
        flex-direction: column;
        gap: 3rem;
    }

    .about-hero__text {
        max-width: 100%;
        text-align: center;
    }

    .about-hero__visual {
        max-width: 100%;
    }

    .about-hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .about-hero__actions {
        justify-content: center;
    }

    .about-hero__stats {
        justify-content: center;
    }

    .hero-msg-bubble {
        display: none;
    }

    .about-page {
        gap: 4rem;
        padding: 0 1rem 3rem;
    }

    .about-hero {
        padding: 3rem 0 2rem;
    }

    .about-hero__title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }

    .about-hero__subtitle {
        font-size: 1rem;
    }

    .about-section--stats {
        padding: 2rem 1.5rem;
        margin: 0;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .about-audience {
        grid-template-columns: 1fr;
    }

    .value-item {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1.25rem;
    }

    .about-cta {
        padding: 2rem 1.5rem;
    }

    .about-hero__actions,
    .about-cta__actions {
        flex-direction: column;
        align-items: stretch;
    }

    /* Performance Dashboard Mobile */
    .performance-dashboard,
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-card--full {
        grid-column: 1;
    }

    .bar-chart__item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .bar-chart__value {
        text-align: left;
    }

    .metrics-table-wrapper {
        overflow-x: auto;
    }

    .metrics-table {
        min-width: 500px;
    }
}.auth-page-container {
    margin: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
}

.auth-card {
    --color-primary: var(--accent);
    position: relative;
    overflow: hidden;
    width: 660px;
    height: 480px;
    /* Increased slightly for better fit */
    border-radius: 32px;
    background: var(--bg-secondary);
    box-shadow: 0 12px 80px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
}

.auth-card .card-bg {
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    left: 0;
    width: 860px;
    height: 480px;
    rotate: -45deg;
    transform-origin: 0% 100%;
    background: var(--color-primary);
    transition: 1.5s;
}

.auth-card .card-bg-2 {
    background: var(--color-primary);
    rotate: 0deg;
    opacity: 0;
    right: 0;
    left: auto;
    transform-origin: 100% 100%;
}

.auth-card .card-bg-1.register {
    animation: card-bg-register 1.5s both;
}

.auth-card .card-bg-1.login {
    animation: card-bg-login 1.5s both;
}

.auth-card .card-bg-2.register {
    animation: card-bg-2-register 1.5s both;
}

.auth-card .card-bg-2.login {
    animation: card-bg-2-login 1.5s both;
}

.auth-card .logo-container {
    position: absolute;
    top: 40px;
    z-index: 5;
    transition: 0.3s;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.auth-card .logo-img {
    height: 40px;
    object-fit: contain;
}

.auth-card .logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    text-transform: none;
}

.auth-card .logo-1 {
    translate: -280px 0;
    left: 64px;
}

.auth-card .logo-2 {
    translate: 280px 0;
    right: 64px;
}

.auth-card .card-bg.login~.logo-1,
.auth-card .card-bg.register~.logo-2 {
    opacity: 1;
    translate: 0;
    transition: 0.3s 1.05s;
}

.auth-card .form-container {
    position: absolute;
    z-index: 10;
    top: 0;
    left: 0;
    bottom: 0;
    width: 50%;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.auth-card .form-container h2 {
    text-align: center;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.auth-card .form-container form {
    display: grid;
    gap: 16px;
    opacity: 0;
    transition: 0.3s;
    width: 100%;
}

.auth-card .form-container a {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    margin-top: 1rem;
    text-decoration: none;
}

.auth-card .form-container .forgot-password {
    font-size: 13px;
    text-align: center;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-card .form-container .forgot-password:hover {
    color: var(--text-secondary);
}

.auth-card .form-container a em {
    display: block;
    font-style: normal;
    font-size: 15px;
    color: var(--color-primary);
    font-weight: 500;
}

.auth-card .form-container.register {
    translate: 100% 0;
}

.auth-card .form-container.register form {
    translate: 320px 0;
}

.auth-card .form-container.login form {
    translate: -320px 0;
}

.auth-card .form-container.register.active form,
.auth-card .form-container.login.active form {
    opacity: 1;
    translate: 0;
    transition: 0.5s 1s;
}

.auth-card form input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.auth-card form input:focus {
    outline: none;
    border-color: var(--accent);
}

.auth-card form input::placeholder {
    color: var(--text-muted);
}

.auth-card button {
    border: 0;
    border-radius: 12px;
    height: 48px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.auth-card button:active {
    transform: scale(0.98);
}

.auth-card button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-card form .btn-submit {
    color: #fff;
    background: var(--color-primary);
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Animations */
@keyframes card-bg-register {
    0% {
        rotate: -45deg;
    }

    50% {
        opacity: 1;
    }

    50%,
    100% {
        rotate: 0deg;
    }

    50.01%,
    100% {
        opacity: 0;
    }
}

@keyframes card-bg-login {
    0% {
        opacity: 0;
        rotate: 0deg;
    }

    50% {
        rotate: 0deg;
        opacity: 0;
    }

    50%,
    100% {
        rotate: 0;
    }

    50.01%,
    100% {
        opacity: 1;
    }

    100% {
        rotate: -45deg;
    }
}

@keyframes card-bg-2-register {

    0%,
    50% {
        rotate: 0;
        opacity: 0;
    }

    50.01% {
        opacity: 1;
        rotate: 0deg;
    }

    100% {
        opacity: 1;
        rotate: 45deg;
    }
}

@keyframes card-bg-2-login {
    0% {
        rotate: 45deg;
        opacity: 1;
    }

    50%,
    100% {
        rotate: 0deg;
        opacity: 1;
    }

    50.01%,
    100% {
        opacity: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 700px) {
    .auth-card {
        width: 90%;
        height: auto;
        min-height: 500px;
        display: flex;
        flex-direction: column;
    }

    .auth-card .card-bg,
    .auth-card .logo {
        display: none;
        /* Hide background animations on small screens for simplicity */
    }

    .auth-card .form-container {
        width: 100% !important;
        position: relative;
        translate: 0 !important;
        padding: 2.5rem 1.5rem;
    }

    .auth-card .form-container:not(.active) {
        display: none;
    }

    .auth-card .form-container form {
        opacity: 1;
        translate: 0;
    }
}/* CatalogPage.css - Strategy Catalog Styling */

/* Strategy Card Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}

/* Individual Strategy Card */
.catalog-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem;
  background: rgba(6, 11, 32, 0.8);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.catalog-card:hover {
  border-color: rgba(108, 99, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.catalog-card.active {
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(108, 99, 255, 0.25);
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(6, 11, 32, 0.9));
}

/* Card Header */
.catalog-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.catalog-card__header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
  overflow-wrap: break-word;
}

.catalog-card__key {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Card Description */
.catalog-card__desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  min-height: 3.8em;
}

/* Config Form */
.config-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.config-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.config-field span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.config-field select {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(4, 8, 28, 0.9);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.config-field select:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.config-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

/* Config Actions */
.config-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.5rem;
}

/* Checkbox Field Style */
.checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-field span {
  color: var(--text-secondary);
  font-weight: 400;
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
}

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

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

  .config-row {
    grid-template-columns: 1fr;
  }

  .catalog-card__header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .catalog-card__key {
    align-self: flex-start;
  }

  .catalog-card {
    padding: 1rem;
    border-radius: 14px;
  }

  .catalog-card__desc {
    font-size: 0.8rem;
    min-height: auto;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .config-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

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

  .btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .catalog-card {
    padding: 0.875rem;
    gap: 0.5rem;
  }

  .catalog-card__header h3 {
    font-size: 0.95rem;
  }

  .catalog-card__key {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }

  .catalog-card__desc {
    font-size: 0.75rem;
  }

  .config-form {
    gap: 1.25rem;
  }

  .config-field span {
    font-size: 0.8rem;
  }

  .config-field select {
    padding: 0.65rem 0.875rem;
    font-size: 0.9rem;
  }

  .checkbox-field {
    font-size: 0.85rem;
  }
}/* DashboardPage.css - Modern Dashboard Styling */

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

/* Dashboard Card */
.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.dash-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.dash-card__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dash-card__icon {
    font-size: 1.5rem;
    padding: 0.75rem;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 14px;
}

.dash-card__info {
    flex: 1;
}

.dash-card__info h3 {
    margin: 0 0 0.15rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.dash-card__info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Broker Card */
.broker-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.broker-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.broker-status.connected .broker-indicator {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.broker-status.disconnected .broker-indicator {
    background: #ff6b6b;
}

.broker-text {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* P&L Grid */
.pnl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

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

.pnl-box.main {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(6, 11, 32, 0.9));
    border-color: rgba(108, 99, 255, 0.3);
}

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

.pnl-value {
    font-size: 1.25rem;
    font-weight: 700;
}

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

.pnl-value.loss {
    color: #ff6b6b;
}

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

/* Empty State */
.dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    text-align: center;
}

.dash-empty span {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.dash-empty p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Subscription List */
.subscription-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sub-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.15s ease;
}

.sub-item:hover {
    background: rgba(0, 0, 0, 0.3);
}

.sub-item.active {
    border-color: rgba(67, 230, 177, 0.3);
    background: linear-gradient(135deg, rgba(67, 230, 177, 0.05), rgba(0, 0, 0, 0.2));
}

.sub-icon {
    font-size: 1.25rem;
}

.sub-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sub-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.sub-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mode-tag,
.status-tag {
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mode-tag.paper {
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent);
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.mode-tag.live {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.status-tag.active {
    background: rgba(67, 230, 177, 0.15);
    color: var(--success);
}

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

/* Strategy P&L Table */
.strategy-pnl-table {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.strategy-pnl-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.strategy-pnl-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.25);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.strategy-pnl-table td {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.strategy-pnl-table td.profit {
    color: var(--success);
}

.strategy-pnl-table td.loss {
    color: #ff6b6b;
}

/* Catalog Preview */
.catalog-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.catalog-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.catalog-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(108, 99, 255, 0.4);
    transform: translateY(-2px);
}

.catalog-item__header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.catalog-item__icon {
    font-size: 1.5rem;
}

.catalog-item__header h4 {
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.catalog-item__key {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.catalog-item__desc {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

/* Tablet and smaller */
@media (max-width: 768px) {
    .dashboard {
        gap: 1.25rem;
    }

    .dash-card {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .dash-card__header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .dash-card__header .btn {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }

    .dash-card__info h3 {
        font-size: 1rem;
    }

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

    .pnl-box {
        padding: 0.875rem;
    }

    .pnl-value {
        font-size: 1.1rem;
    }

    .sub-item {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .sub-info {
        min-width: 0;
        flex: 1 1 auto;
    }

    .mode-tag,
    .status-tag {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }

    .catalog-preview {
        grid-template-columns: 1fr;
    }

    .catalog-item {
        padding: 1rem;
    }

    .strategy-pnl-table table {
        min-width: 400px;
    }

    .strategy-pnl-table th,
    .strategy-pnl-table td {
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .dashboard {
        gap: 1rem;
    }

    .dash-card {
        padding: 1rem;
        border-radius: 14px;
    }

    .dash-card__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-card__icon {
        font-size: 1.25rem;
        padding: 0.6rem;
        border-radius: 10px;
    }

    .dash-card__info h3 {
        font-size: 0.95rem;
    }

    .dash-card__info p {
        font-size: 0.8rem;
    }

    .pnl-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .pnl-box {
        padding: 0.75rem;
        border-radius: 10px;
    }

    .pnl-label {
        font-size: 0.65rem;
    }

    .pnl-value {
        font-size: 1rem;
    }

    .broker-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.875rem;
    }

    .broker-text {
        font-size: 0.8rem;
    }

    .sub-item {
        padding: 0.75rem;
        border-radius: 10px;
    }

    .sub-icon {
        font-size: 1.1rem;
    }

    .sub-name {
        font-size: 0.875rem;
    }

    .sub-meta {
        font-size: 0.7rem;
    }

    .dash-empty {
        padding: 2rem 0.75rem;
    }

    .dash-empty span {
        font-size: 1.5rem;
    }

    .dash-empty p {
        font-size: 0.8rem;
    }

    .catalog-item {
        padding: 0.875rem;
        border-radius: 12px;
    }

    .catalog-item__icon {
        font-size: 1.25rem;
    }

    .catalog-item__header h4 {
        font-size: 0.875rem;
    }

    .catalog-item__desc {
        font-size: 0.75rem;
    }

    .strategy-pnl-table {
        border-radius: 10px;
    }

    .strategy-pnl-table table {
        min-width: 360px;
    }

    .strategy-pnl-table th,
    .strategy-pnl-table td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}/* VWAP EMA Momentum Strategy Status Styles */

.vwap-ema-status {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ─── Phase Banner ─── */
.phase-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
}

.phase-label {
    font-size: 1.1rem;
}

.phase-meta {
    font-size: 0.85rem;
    opacity: 0.8;
}

.phase-waiting {
    background: linear-gradient(135deg, #2d2d3f, #3a3a4d);
    color: #aab;
}

.phase-scanning {
    background: linear-gradient(135deg, #2a2a4f, #3b3b6a);
    color: #8899ff;
}

.phase-monitoring {
    background: linear-gradient(135deg, #2a3f4f, #3b5a6a);
    color: #66ccff;
}

.phase-ready {
    background: linear-gradient(135deg, #2a4f3f, #3b6a5a);
    color: #66ffcc;
}

.phase-in-position {
    background: linear-gradient(135deg, #2a4f2a, #3b6a3b);
    color: #66ff66;
}

.phase-done {
    background: linear-gradient(135deg, #3f3f2a, #6a6a3b);
    color: #cccc66;
}

/* ─── Status Cards ─── */
.status-card {
    background: var(--card-bg, #1e1e2e);
    border: 1px solid var(--border-color, #2a2a3e);
    border-radius: 12px;
    padding: 16px 20px;
}

.status-card h3 {
    margin: 0 0 14px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary, #aab);
}

/* ─── Scanner Card ─── */
.scanner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.scanner-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.scanner-item.selected {
    border-color: #66ccff;
    box-shadow: 0 0 12px rgba(102, 204, 255, 0.15);
}

.scanner-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-ce {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.badge-pe {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.strike {
    font-weight: 600;
    color: var(--text-primary, #eee);
}

.scanner-premium,
.scanner-candles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.scanner-premium .label,
.scanner-candles .label {
    font-size: 0.8rem;
    color: var(--text-secondary, #888);
}

.scanner-premium .value {
    font-weight: 600;
    font-size: 0.9rem;
}

.scanner-premium .value.above {
    color: #22c55e;
}

.scanner-selection {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(102, 204, 255, 0.08);
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    color: #66ccff;
}

/* ─── Indicators Card ─── */
.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.indicator-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.indicator-name {
    font-size: 0.75rem;
    color: var(--text-secondary, #888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.indicator-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #eee);
}

.indicator-value.ready {
    color: #22c55e;
}

.indicator-value.not-ready {
    color: var(--text-secondary, #666);
}

.indicator-value.spike {
    color: #f59e0b;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.indicator-badge {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
}

.badge-ready {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.badge-pending {
    background: rgba(255, 255, 255, 0.06);
    color: #666;
}

.badge-spike {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.ema-crossover-status {
    margin-top: 12px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
}

.crossover-label {
    font-size: 0.85rem;
    color: var(--text-secondary, #888);
}

.crossover-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.crossover-value.bullish {
    color: #22c55e;
}

.crossover-value.bearish {
    color: #ef4444;
}

/* ─── Position Card ─── */
.active-trade {
    border-top: 4px solid #66ccff;
}

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

.position-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.position-title-group h3 {
    margin: 0;
}

.direction-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.direction-badge.long {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.direction-badge.short {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.contract-pill {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #eee;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pnl-showcase {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.pnl-showcase.profit {
    background-color: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.2);
}

.pnl-showcase.loss {
    background-color: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

.pnl-points {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.pnl-showcase.profit .pnl-points,
.pnl-showcase.profit .pnl-value,
.text-profit {
    color: #22c55e;
}

.pnl-showcase.loss .pnl-points,
.pnl-showcase.loss .pnl-value,
.text-loss {
    color: #ef4444;
}

.pnl-value {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

.pnl-subtitle {
    font-size: 0.85rem;
    color: #888;
}

.risk-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 600px) {
    .risk-metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.metric-box {
    background-color: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.metric-context {
    font-size: 0.75rem;
    color: #888;
}

.metric-context.trailing {
    color: #66ccff;
    font-weight: 600;
}

/* ─── Time Card ─── */
.time-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.time-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.time-label {
    font-size: 0.72rem;
    color: var(--text-secondary, #888);
    text-transform: uppercase;
}

.time-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary, #eee);
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .scanner-grid {
        grid-template-columns: 1fr;
    }

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

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

    .time-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}/* StrategyPositionPage.css - Detailed Strategy View Styling */

.strategy-position-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.25rem 1.75rem;
  background: var(--bg-card);
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-primary);
  color: var(--text-primary);
  transform: translateX(-2px);
}

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

.strategy-icon-large {
  font-size: 2rem;
  padding: 0.5rem;
  background: rgba(108, 99, 255, 0.15);
  border-radius: 14px;
}

.header-title h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

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

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

/* Error Banner */
.error-banner {
  padding: 1rem 1.5rem;
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 12px;
  color: #ff6b6b;
  font-size: 0.9rem;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
}

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

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

/* Status Overview Grid */
.status-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .status-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .status-overview-grid {
    grid-template-columns: 1fr;
  }
}

.overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.overview-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.overview-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Health Card */
.health-status {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.health-indicator {
  font-size: 1.1rem;
  font-weight: 600;
}

.health-indicator.running {
  color: var(--success);
}

.health-indicator.stopped {
  color: #ff6b6b;
}

.last-seen,
.started-at {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Position Card */
.position-status {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.position-indicator {
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
}

.position-indicator.flat {
  color: var(--text-muted);
}

.position-indicator.long {
  color: var(--success);
}

.position-indicator.short {
  color: #ff6b6b;
}

.option-info {
  font-size: 0.8rem;
  color: var(--accent);
}

/* PnL Cards */
.pnl-display {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pnl-display .pnl-value {
  font-size: 1.5rem;
  font-weight: 700;
}

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

.pnl-display .pnl-value.loss {
  color: #ff6b6b;
}

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

/* Section Cards */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
}

.section-card h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

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

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

/* Collapsible Section Header */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header-row h2 {
  margin: 0;
}

.section-header-row.clickable {
  cursor: pointer;
  user-select: none;
  padding: 0.75rem 1rem;
  margin: -0.5rem -0.5rem 1rem -0.5rem;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.section-header-row.clickable:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.caret-icon {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.caret-icon.open {
  transform: rotate(180deg);
}

/* Config Section */
.config-section .config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.config-section .config-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

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

.config-section .config-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Range Section */
.range-display {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.range-status-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

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

.range-status-badge.waiting {
  background: #bfc9d11f;
  color: #BFC9D1;
  /* border: 0.2 px solid #BFC9D1; */
}

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

.range-value {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.range-value .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.range-value .value {
  font-size: 1.1rem;
  font-weight: 600;
}

.range-value.high .value {
  color: var(--success);
}

.range-value.low .value {
  color: #ff6b6b;
}

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  text-align: center;
}

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

.stat-item .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
}

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

.stat-item .stat-value.loss {
  color: #ff6b6b;
}

/* Strategy State Section */
.strategy-state-section {
  overflow: hidden;
}

.generic-state pre {
  margin: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  font-size: 0.8rem;
  overflow-x: auto;
  color: var(--text-muted);
}

/* Trades Section */
.trades-table-wrapper {
  overflow-x: auto;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}

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

.trades-table th,
.trades-table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trades-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

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

.instrument-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.instrument-name {
  font-weight: 500;
}

.option-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  background: rgba(108, 99, 255, 0.2);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--accent);
}

.side-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

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

.side-badge.sell {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
}

.trades-table .pnl-value {
  font-weight: 600;
}

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

.trades-table .pnl-value.loss {
  color: #ff6b6b;
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.filled {
  background: rgba(67, 230, 177, 0.15);
  color: var(--success);
}

.status-badge.pending {
  background: rgba(245, 166, 35, 0.15);
  color: #f5a623;
}

.status-badge.cancelled {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
}

.time-cell {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Trades Pagination */
.trades-pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.trades-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Empty States */
.empty-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.empty-state-card p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

.empty-trades {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* Button Styles */
.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  text-decoration: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Auto-refresh Toggle */
.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: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .strategy-position-page {
    gap: 1.25rem;
    padding: 0 0.5rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 16px;
  }

  .header-left {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .header-title h1 {
    font-size: 1.25rem;
  }

  .strategy-icon-large {
    font-size: 1.5rem;
    padding: 0.4rem;
    border-radius: 10px;
  }

  .header-controls {
    width: 100%;
    justify-content: space-between;
  }

  .section-card {
    padding: 1.25rem;
    border-radius: 16px;
  }

  .section-card h2 {
    font-size: 1rem;
  }

  .overview-card {
    padding: 1rem;
    border-radius: 14px;
  }

  .overview-card h3 {
    font-size: 0.75rem;
  }

  .config-section .config-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

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

  .trades-table {
    font-size: 0.8rem;
  }

  .trades-table th,
  .trades-table td {
    padding: 0.5rem 0.35rem;
  }
}

@media (max-width: 480px) {
  .strategy-position-page {
    gap: 1rem;
    padding: 0;
  }

  .page-header {
    padding: 0.875rem;
    border-radius: 14px;
    gap: 0.75rem;
  }

  .back-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .header-title h1 {
    font-size: 1.1rem;
  }

  .subscription-meta {
    font-size: 0.75rem;
  }

  .status-overview-grid {
    gap: 0.75rem;
  }

  .overview-card {
    padding: 0.875rem;
    border-radius: 12px;
  }

  .health-indicator,
  .position-indicator {
    font-size: 1rem;
  }

  .pnl-display .pnl-value {
    font-size: 1.25rem;
  }

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

  .config-section .config-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .config-section .config-item {
    padding: 0.6rem;
    border-radius: 8px;
  }

  .config-section .config-label {
    font-size: 0.65rem;
  }

  .config-section .config-value {
    font-size: 0.85rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .stat-item {
    padding: 0.75rem;
    border-radius: 10px;
  }

  .stat-item .stat-label {
    font-size: 0.65rem;
  }

  .stat-item .stat-value {
    font-size: 1.1rem;
  }

  .range-values {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .range-value {
    padding: 0.6rem;
  }

  .trades-table {
    font-size: 0.75rem;
    min-width: 500px;
  }

  .trades-table th,
  .trades-table td {
    padding: 0.4rem 0.25rem;
  }

  .loading-state,
  .empty-state-card {
    padding: 3rem 1rem;
    border-radius: 16px;
  }

  .auto-refresh-toggle {
    font-size: 0.8rem;
  }
}

/* ==================== Kill Switch ==================== */

.btn-kill-switch {
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 60, 60, 0.5);
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.btn-kill-switch:hover:not(:disabled) {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.45);
  transform: translateY(-1px);
}

.btn-kill-switch:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.3);
}

.btn-kill-switch:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

/* Kill Switch Toast Notification */
.kill-switch-toast {
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  animation: toast-slide-in 0.3s ease-out;
}

.kill-switch-toast.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.kill-switch-toast.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* SubscriptionsPage.css - Adaptive Compact Glassmorphism */

/* Dashboard Container */
.subscriptions-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.5rem;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    /* Dark mode default */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
}

:root.light .dashboard-header {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.05);
}

.dashboard-title h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: initial;
}

.dashboard-subtitle {
    margin: 0.15rem 0 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.2;
}

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


/* Auto Refresh Toggle - Square Style */
.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    background: var(--bg-elevated);
    border-radius: 6px;
    /* Square corners */
    border: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
    user-select: none;
}

.auto-refresh-toggle:hover {
    background: var(--bg-card);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

.auto-refresh-toggle input {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-medium);
    border-radius: 4px;
    /* Square checkbox */
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    display: grid;
    place-content: center;
}

.auto-refresh-toggle input::before {
    content: '';
    width: 0.6rem;
    height: 0.6rem;
    transform: scale(0);
    transition: 0.2s transform ease-in-out;
    box-shadow: inset 1em 1em var(--text-primary);
    background-color: var(--text-primary);
    transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.auto-refresh-toggle input:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.auto-refresh-toggle input:checked::before {
    transform: scale(1);
    background-color: #fff;
    box-shadow: inset 1em 1em #fff;
}

:root.light .auto-refresh-toggle input {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

:root.light .auto-refresh-toggle input:checked {
    background: var(--accent);
    border-color: var(--accent);
}


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

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

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

.stat-box {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--bg-elevated);
    /* Adaptive background */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

:root.light .stat-box {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.05);
}

.stat-box:hover {
    transform: translateY(-2px);
    border-color: var(--border-medium);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-box.active {
    border-bottom: 2px solid var(--success);
}

.stat-box.paper {
    border-bottom: 2px solid var(--accent);
}

.stat-box.live {
    border-bottom: 2px solid var(--danger);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    /* Adaptive text */
}

.stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--text-muted);
}

/* Empty State */
.empty-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-medium);
    border-radius: 16px;
    text-align: center;
}

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

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

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

/* Individual Subscription Card */
.subscription-card {
    background: rgba(20, 25, 40, 0.6);
    /* Default Dark Glass */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

:root.light .subscription-card {
    background: rgba(255, 255, 255, 0.8);
    /* Light Glass */
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.subscription-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.subscription-card.is-active {
    border-color: var(--success);
}

:root.light .subscription-card.is-active {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--success);
}

/* Card Header */
.card-header {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

:root.light .card-header {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.02), transparent);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

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

.strategy-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(108, 99, 255, 0.2);
}

.card-title-info h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.subscription-id {
    display: block;
    font-size: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    line-height: 1.1;
    margin-top: 2px;
}

/* Badges */
.card-badges {
    display: flex;
    gap: 0.4rem;
}

.mode-badge,
.status-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.mode-badge.paper {
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent);
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.mode-badge.live {
    background: rgba(255, 107, 107, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.idle {
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border-medium);
}

/* Card Config */
.card-config {
    padding: 0.85rem 1rem;
    flex: 1;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    /* Dark mode default */
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}

:root.light .config-item {
    background: rgba(0, 0, 0, 0.03);
    /* Light mode background */
    border-color: rgba(0, 0, 0, 0.05);
}

.config-item.highlight {
    background: rgba(108, 99, 255, 0.08);
    border-color: rgba(108, 99, 255, 0.2);
}

.config-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.config-value {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

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

.config-value.target {
    color: var(--success);
}

.config-value.accent {
    color: var(--accent);
}

/* Card Actions */
.card-actions {
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
}

:root.light .card-actions {
    background: rgba(0, 0, 0, 0.03);
    border-top-color: rgba(0, 0, 0, 0.05);
}

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

/* Primary Action (Activate) */
.action-btn.primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.3);
    flex: 2;
}

.action-btn.primary:hover:not(:disabled) {
    background: var(--accent-strong);
    transform: translateY(-1px);
}

/* Warning Action (Pause) */
.action-btn.warning {
    background: linear-gradient(135deg, #BFC9D1 0%, #94a3b8 100%);
    color: #1e293b;
    /* Dark slate text for better contrast on light button */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.25);
    flex: 2;
}

.action-btn.warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #BFC9D1 20%, #94a3b8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.35);
    filter: brightness(1.05);
}

/* Secondary Action (Details) */
.action-btn.secondary {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
}

.action-btn.secondary:hover:not(:disabled) {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Icon Buttons */
.action-btn.quick-status,
.action-btn.danger {
    padding: 0;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    border-radius: 8px;
}

:root.light .action-btn.quick-status,
:root.light .action-btn.danger {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

.action-btn.quick-status:hover:not(:disabled) {
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent);
}

.action-btn.danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: var(--danger);
}

/* Status Panel (Expanded) */
.card-status-panel {
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
}

:root.light .card-status-panel {
    background: rgba(0, 0, 0, 0.02);
    border-top-color: rgba(0, 0, 0, 0.05);
}

/* Strategy Status Card */
.strategy-status-card {
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

.status-section {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.status-section h4 {
    color: var(--accent);
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
}

.status-row {
    padding: 0.25rem 0;
    font-size: 0.8rem;
}

.status-row .label {
    color: var(--text-muted);
}/* TradesPage.css - Pro Minimalist Redesign */

.trade-row {
    transition: background-color 0.1s ease;
}

.trade-row.expanded {
    background-color: rgba(255, 255, 255, 0.02);
}

.trade-details-row td {
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background-color: #050505;
    /* Deep black for pro feel */
}

.trade-details-wrapper {
    padding: 0.75rem 1rem;
}

/* --- Pro Card Container --- */
.pro-card {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    /* Sharp corners */
    font-family: 'JetBrains Mono', monospace;
    /* Monospace everywhere */
}

/* --- Grid Layouts --- */
.pro-section-main {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 cols: Entry | Exit | Qty | P&L */
    column-gap: 1rem;
    row-gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pro-section-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    /* Auto-fill space efficiently */
    gap: 1rem 1.5rem;
    /* Tighter vertical gap, reasonable horizontal */
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.meta-group {
    display: contents;
    /* Let children participate in the parent grid directly */
}

/* --- Data Points --- */
.pro-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    /* Tighter label-to-value */
    min-width: 0;
    /* Crucial for text-overflow to work in Grid/Flex */
    overflow: hidden;
}

.pro-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
    line-height: 1;
    white-space: nowrap;
}

.pro-value {
    font-size: 0.9rem;
    color: #e5e5e5;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Highlights */
.pro-value.profit {
    color: #4ade80;
}

/* Tailwind green-400 */
.pro-value.loss {
    color: #f87171;
}

/* Tailwind red-400 */
.pro-value.highlight {
    color: #fff;
}

/* --- Mobile / Responsive --- */
@media (max-width: 768px) {
    .trade-details-wrapper {
        padding: 0;
    }

    .pro-card {
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
    }

    .pro-section-main {
        grid-template-columns: 1fr 1fr;
        /* 2 cols */
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .pro-section-meta {
        grid-template-columns: 1fr 1fr 1fr;
        /* 3 cols on mobile for density if possible, or 2 */
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    /* On very small screens, maybe 2 cols */
    @media (max-width: 400px) {
        .pro-section-meta {
            grid-template-columns: 1fr 1fr;
        }
    }

    .pro-item.pnl-huge {
        grid-column: 1 / -1;
        /* P&L takes full width on mobile if needed */
        margin-top: 0.25rem;
        padding-top: 0.5rem;
        border-top: 1px dashed rgba(255, 255, 255, 0.1);
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .pro-item.pnl-huge .pro-label {
        font-size: 0.75rem;
    }

    .pro-value.pnl-huge-val {
        font-size: 1.1rem;
    }
}

/* Full Width Utility for Pro Grid */
.pro-item.full-width {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
}/* Analytics Dashboard Styles */
/* Glassmorphism & Bento Grid Layout */

:root {
    --glass-bg: rgba(13, 18, 48, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --card-hover-bg: rgba(20, 25, 60, 0.8);
    --chart-grid-color: rgba(255, 255, 255, 0.05);
    --stat-positive: #10b981;
    --stat-negative: #ef4444;
}

.analytics-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 2rem;
}

/* Header Controls */
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.analytics-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.analytics-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* Base Card Style */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    /* transform: translateY(-2px); */
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

.glass-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Metric Cards Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.metric-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    position: relative;
    overflow: hidden;
}

/* Gradient accents for cards */
.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.5;
}

.metric-card.positive::before {
    background: linear-gradient(90deg, var(--stat-positive), transparent);
}

.metric-card.negative::before {
    background: linear-gradient(90deg, var(--stat-negative), transparent);
}

.metric-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0.5rem 0;
    font-variant-numeric: tabular-nums;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    width: fit-content;
}

.metric-trend.up {
    background: rgba(16, 185, 129, 0.15);
    color: var(--stat-positive);
}

.metric-trend.down {
    background: rgba(239, 68, 68, 0.15);
    color: var(--stat-negative);
}

/* Main Charts Section */
.charts-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    /* height: 450px; Ensures uniform height */
}

/* Chart Tooltip Customization */
.custom-tooltip {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    padding: 0.75rem !important;
}

.tooltip-label {
    color: var(--text-muted) !important;
    font-size: 0.8rem !important;
    margin-bottom: 0.25rem !important;
}

.tooltip-value {
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
}

/* Table Section */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
}

.elegant-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.elegant-table th {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    backdrop-filter: blur(4px);
}

.elegant-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: background 0.15s;
}

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

.elegant-table tr:last-child td {
    border-bottom: none;
}

.text-right {
    text-align: right;
}

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

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--stat-positive);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge.danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--stat-negative);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Empty State */
.empty-chart-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-muted);
    text-align: center;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .charts-split {
        grid-template-columns: 1fr;
        height: auto;
    }

    .charts-split>div {
        min-height: 400px;
    }
}

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

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

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

    .metric-value {
        font-size: 1.75rem;
    }
}

/* Segmented Control */
.segmented-control {
    display: flex;
    padding: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    gap: 2px;
}

.segment-btn {
    padding: 6px 16px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.segment-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.segment-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    margin-top: 1rem;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

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

/* --- UI Utility Classes (to handle missing Tailwind classes) --- */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-4 {
    gap: 1rem;
}

.min-h-\[500px\] {
    min-height: 500px;
}

.text-accent {
    color: var(--accent);
}

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

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

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

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

.font-mono {
    font-family: monospace;
}

.font-bold {
    font-weight: bold;
}

.text-sm {
    font-size: 0.875rem;
}