/* ============================================
   Tradesteady Algo Portal - Professional Trading UI
   Tradesteady Algo Portal
   ============================================ */

:root {
    --primary-dark: #1a2940;
    --primary-navy: #243b55;
    --primary-blue: #2563eb;
    --accent-gold: #d4a84b;
    --accent-gold-light: #e6c370;
    --accent-gold-dark: #b8923d;
    /* Birth-date themed secondary accents (14.01.65, 15:13 – January/Capricorn + afternoon clarity) */
    --accent-calm-blue: #4f7c9c;
    --accent-calm-blue-light: rgba(79, 124, 156, 0.12);
    --accent-sage: #5a7d6a;
    --accent-sage-light: rgba(90, 125, 106, 0.1);
    /* Enhanced birth-aligned colors */
    --capricorn-earth: #2c3e50;
    --capricorn-slate: #4a5568;
    --achievement-amber: #f0b429;
    --wisdom-sapphire: #2563eb;
    --wisdom-twilight: #475569;
    --path9-forest: #065f46;
    --saturn-purple: #7c3aed;
    --saturn-lavender: #a78bfa;
    --soul9-violet: #5b21b6;
    --soul9-light: #ddd6fe;
    --success-green: #10b981;
    --danger-red: #ef4444;
    --error-red: #ef4444;
    --warning-yellow: #f59e0b;
    --text-dark: #1a2940;
    --text-light: #6b7280;
    --text-white: #ffffff;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a2940;
    --border-light: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Dashboard: light, pro background (aligned with home feel) */
body.dashboard-page {
    background: #f0f4f8;
}

/* ============================================
   Global link + focus normalization
   Prevent "stuck blue" visited/focus states across browsers.
   ============================================ */
a {
    color: var(--primary-dark);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

a:visited {
    color: var(--primary-dark);
}

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

a:focus {
    outline: none;
}

a:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.20);
    border-radius: 10px;
}

button,
.btn,
.tab-btn,
.nav-links a,
.nav-dropdown-menu a {
    -webkit-tap-highlight-color: transparent;
}

button:focus {
    outline: none;
}

button:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.20);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

/* Skip link: first focusable element for keyboard/screen reader users */
.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    z-index: 1001;
    padding: 12px 20px;
    background: var(--primary-dark);
    color: var(--text-white);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: top 0.2s ease;
    text-decoration: none;
}

.skip-link:focus {
    top: 20px;
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Used by `admin-tv-access.html` */
.dashboard-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    background: var(--bg-white);
    padding: 28px;
    border-radius: var(--radius-lg);
    margin: 24px 0;
    box-shadow: var(--shadow-sm);
}

.dashboard-header h1 {
    color: var(--primary-dark);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dashboard-header p {
    color: var(--text-light);
    font-size: 15px;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 0.98) 100%);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(79, 124, 156, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 15px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-brand:visited {
    color: inherit;
}

.nav-brand:focus {
    outline: none;
}

.nav-brand:focus-visible {
    outline: 3px solid rgba(212, 168, 75, 0.35);
    outline-offset: 4px;
    border-radius: 12px;
}

.nav-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-navy));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 18px;
}

.nav-brand-logo {
    height: 64px;
    width: auto;
    object-fit: contain;
    display: block;
}

.navbar-landing .nav-brand-logo-light,
.nav-brand-logo-light {
    filter: brightness(1.15) contrast(1.05);
}

.nav-brand-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
}

.nav-brand-text span {
    color: var(--accent-gold);
}

.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links>a.nav-link-item,
.nav-links .nav-dropdown-trigger {
    white-space: nowrap;
}

.nav-links .dashboard-tab-bar {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-trigger {
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-dropdown-arrow {
    font-size: 10px;
    opacity: 0.8;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(26, 41, 64, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 8px;
    z-index: 120;
}

.nav-dropdown-menu a,
.nav-dropdown-menu button.nav-dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-menu a:visited {
    color: var(--text-dark);
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu button.nav-dropdown-item:hover {
    background: rgba(26, 41, 64, 0.06);
    color: var(--primary-dark);
}

.nav-dropdown-menu a:focus,
.nav-dropdown-menu button.nav-dropdown-item:focus {
    outline: none;
}

.nav-dropdown-menu a:focus-visible,
.nav-dropdown-menu button.nav-dropdown-item:focus-visible {
    background: rgba(212, 168, 75, 0.12);
    box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.25);
}

/* Dashboard tab bar: grouped tabs with clear visual container */
.dashboard-tab-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(26, 41, 64, 0.06);
    padding: 6px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(26, 41, 64, 0.08);
}

.dashboard-tab-bar .tab-btn {
    flex: 0 1 auto;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.dashboard-tab-bar .tab-btn:hover {
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.8);
}

.dashboard-tab-bar .tab-btn.active {
    background: var(--bg-white);
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
    border-bottom: none;
    border-left: 3px solid var(--accent-gold);
}

/* ============================================
   Sidebar Layout (Dashboard / Admin pages)
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

.sidebar {
    width: 250px;
    min-width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border-right: 1px solid var(--border-light);
    z-index: 110;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-header .nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.sidebar-header .nav-brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.sidebar-group {
    margin-bottom: 8px;
}

.sidebar-group-label {
    padding: 8px 20px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    user-select: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% - 16px);
    margin: 0 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    min-width: 0;
}

.sidebar-item:visited {
    color: var(--text-dark);
}

.sidebar-item:hover {
    background: var(--bg-light);
    color: var(--primary-dark);
}

.sidebar-item:focus {
    outline: none;
}

.sidebar-item:focus-visible {
    box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.3);
}

.sidebar-item.active {
    background: rgba(212, 168, 75, 0.12);
    color: var(--primary-dark);
    font-weight: 600;
    border-left: 3px solid var(--accent-gold);
    padding-left: 9px;
}

.sidebar-item .sidebar-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-item.active .sidebar-icon {
    opacity: 1;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 16px;
}

.sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--primary-dark);
    flex-shrink: 0;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.sidebar-user-actions {
    display: flex;
    gap: 6px;
}

.sidebar-user-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 7px 10px;
}

.main-content-area {
    flex: 1;
    min-width: 280px;
    max-width: 100%;
    margin-left: 250px;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 28px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    min-height: 52px;
}

body.tab-alert-setup-active .topbar {
    display: none;
}

body.tab-alert-setup-active .main-content-area {
    display: block !important;
    max-width: 100% !important;
}

body.tab-alert-setup-active .container {
    max-width: 100% !important;
    margin: 0 !important;
}

.topbar-breadcrumb {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.topbar-breadcrumb strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.sidebar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 9px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary-dark);
    transition: var(--transition);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 109;
}

.app-layout .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 14px 20px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        width: 250px;
        min-width: 250px;
        transition: left 0.25s ease;
        box-shadow: none;
    }

    .main-content-area {
        margin-left: 0;
    }

    body.sidebar-open .sidebar {
        left: 0;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    body.sidebar-open .sidebar-overlay {
        display: block;
    }

    .sidebar-toggle {
        display: flex;
    }

    .app-layout .container {
        padding: 16px;
    }

    .topbar {
        padding: 10px 16px;
    }
}

/* Wisdom Banner (birth-aligned for insights/analytics) */
.wisdom-banner {
    position: relative;
    isolation: isolate;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.3);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.wisdom-banner:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 48px rgba(37, 99, 235, 0.22);
}

.wisdom-banner::before {
    content: "";
    position: absolute;
    inset: -6px;
    background: conic-gradient(from 180deg,
            rgba(37, 99, 235, 0.0),
            rgba(37, 99, 235, 0.8),
            rgba(124, 58, 237, 0.7),
            rgba(91, 33, 182, 0.7),
            rgba(37, 99, 235, 0.8),
            rgba(37, 99, 235, 0.0));
    filter: blur(16px);
    opacity: 0.45;
    z-index: 0;
    animation: wisdomGlowSpin 6s linear infinite;
    pointer-events: none;
}

.wisdom-banner-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    color: var(--text-white);
    background: radial-gradient(1200px circle at 20% 30%, rgba(37, 99, 235, 0.35), rgba(26, 41, 64, 0.9)),
        linear-gradient(135deg, var(--primary-dark), var(--capricorn-earth));
    z-index: 1;
}

@keyframes wisdomGlowSpin {
    0% {
        transform: rotate(0turn);
    }

    100% {
        transform: rotate(1turn);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wisdom-banner::before {
        animation: none !important;
    }

    .wisdom-banner:hover {
        transform: none;
    }
}

.nav-links>a.nav-link-item,
.nav-links button.nav-dropdown-trigger {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.nav-links button.nav-dropdown-trigger {
    width: auto;
}

.nav-links>a.nav-link-item:visited {
    color: var(--text-light);
}

.nav-links>a.nav-link-item:hover,
.nav-links button.nav-dropdown-trigger:hover {
    color: var(--primary-dark);
    background: var(--bg-light);
}

.nav-links>a.nav-link-item:active,
.nav-links button.nav-dropdown-trigger:active {
    color: var(--primary-dark);
}

.nav-links>a.nav-link-item:focus,
.nav-links button.nav-dropdown-trigger:focus {
    outline: none;
}

.nav-links>a.nav-link-item:focus-visible,
.nav-links button.nav-dropdown-trigger:focus-visible {
    color: var(--primary-dark);
    background: var(--bg-light);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.18);
}

/* Active state for Dashboard/Home (nav links) and Products trigger */
.nav-links>a.nav-link-item.active,
.nav-links .nav-dropdown-trigger.active {
    color: var(--text-white);
    background: var(--primary-dark);
}

.nav-links>a.nav-link-item.active:visited,
.nav-links .nav-dropdown-trigger.active:visited {
    color: var(--text-white);
}

.nav-links>a.nav-link-item.active:focus-visible,
.nav-links .nav-dropdown-trigger.active:focus-visible {
    background: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.22);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.nav-user #nav-user-display,
.nav-user .nav-user-label {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.nav-user #nav-user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Mobile nav toggle (hamburger) - hidden on desktop */
.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary-dark);
    transition: var(--transition);
}

.nav-mobile-toggle:focus {
    outline: none;
}

.nav-mobile-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.25);
}

/* Landing page navbar: prevent visited turning blue/purple */
.navbar-landing .nav-links a:visited {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-landing .nav-links a:focus {
    outline: none;
}

.navbar-landing .nav-links a:focus-visible {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.22);
}

/* Admin TV access links: prevent visited turning blue/purple */
.tv-link:visited {
    color: var(--primary-dark);
}

.nav-user-info {
    text-align: right;
}

.nav-user-name {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 14px;
}

.nav-user-email {
    font-size: 12px;
    color: var(--text-light);
}

/* ============================================
   Login Card
   ============================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-navy) 100%);
}

.login-wrapper-inner {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.login-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.login-logo img {
    max-width: 220px;
    height: auto;
}

.login-logo svg {
    width: 32px;
    height: 32px;
    color: var(--accent-gold);
}

.login-card h1 {
    color: var(--primary-dark);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Login: Forgot password & Login with OTP – visible button style */
.login-card .login-aux-buttons .btn-outline {
    color: var(--primary-dark);
    border: 2px solid var(--accent-gold);
    font-weight: 600;
}

.login-card .login-aux-buttons .btn-outline:hover {
    background: rgba(212, 168, 75, 0.12);
    border-color: var(--accent-gold-dark);
    color: var(--primary-dark);
}

.login-card .login-aux-buttons a.btn {
    color: var(--primary-dark);
    display: inline-block;
}

.subtitle {
    color: var(--text-light);
    font-size: 15px;
}

.subtitle-premium {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 15px;
}

/* Hero hook – eye-catching headline below logo */
.hero-hook {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
    text-align: center;
    margin: 12px 0 24px;
    line-height: 1.35;
}

@media (max-width: 768px) {
    .hero-hook {
        font-size: 18px;
        margin: 10px 0 20px;
    }
}

/* Trust row – below login card, on dark background */
.trust-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    padding: 16px 20px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success-green);
    flex-shrink: 0;
    animation: trustPulse 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .pulse-dot {
        animation: none;
    }
}

/* Trust badge row above email form (legacy – kept for other pages) */
.trust-badge-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.trust-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-green);
    flex-shrink: 0;
    animation: trustPulse 2s ease-in-out infinite;
}

@keyframes trustPulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        opacity: 0.9;
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .trust-badge-dot {
        animation: none;
    }
}

.trust-badge-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--path9-forest);
}

/* Login page – phone input group (country code + number) */
.form-group .phone-input-group {
    display: flex;
    gap: 8px;
}

.form-group .phone-input-group select {
    flex: 0 1 110px;
    min-width: 70px;
    width: auto;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

.form-group .phone-input-group input {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
}

@media (max-width: 374px) {
    .form-group .phone-input-group select {
        flex-basis: 28%;
        min-width: 65px;
    }
}

/* Login page – profile form prompt box */
.profile-info-box {
    background: #e3f2fd;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #1565c0;
    text-align: center;
}

/* Login page – Supported Brokers / feature list (Dashboard classes) */
.login-features {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.login-features h4 {
    font-size: 13px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    text-align: center;
}

.feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    justify-items: start;
}

.feature-list-brokers {
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    justify-items: center;
    align-items: center;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-dark);
}

.feature-icon,
.supported-logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.feature-icon {
    background: rgba(212, 168, 75, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    font-size: 11px;
}

/* ============================================
   Tabs
   ============================================ */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    background: var(--bg-light);
    padding: 6px;
    border-radius: var(--radius-md);
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-light);
    transition: var(--transition);
}

.tab-btn:focus {
    outline: none;
}

.tab-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.18);
}

.tab-btn:hover {
    color: var(--primary-dark);
}

.tab-btn.active {
    background: var(--bg-white);
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
    border-bottom: 2px solid var(--accent-gold);
}

/* Wizard alert tabs (Strategy vs Indicator) */
.wizard-alert-tab {
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}

.wizard-alert-tab:hover {
    color: var(--primary-dark);
}

.wizard-alert-tab.active {
    color: var(--primary-dark);
    border-bottom-color: var(--accent-gold);
}

/* Paper trading wizard (Create Route modal) */
.paper-wizard-msg-tab {
    padding: 8px 14px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}

.paper-wizard-msg-tab:hover {
    color: #1b5e20;
}

.paper-wizard-msg-tab.active {
    color: #1b5e20;
    border-bottom-color: #2e7d32;
}

/* ============================================
   Forms
   ============================================ */
.form-container {
    margin-top: 24px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.15);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

/* Prevent anchor-buttons from adopting default visited colors */
a.btn,
a.btn:visited {
    color: inherit;
}

a.btn.btn-primary:visited,
a.btn.btn-secondary:visited,
a.btn.btn-success:visited,
a.btn.btn-danger:visited {
    color: var(--text-white);
}

a.btn.btn-outline:visited {
    color: var(--text-dark);
}

.btn:focus {
    outline: none;
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.20);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    color: var(--text-white);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 168, 75, 0.4);
}

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

.btn-secondary:hover {
    background: var(--primary-navy);
    transform: translateY(-2px);
}

.btn-wisdom {
    background: linear-gradient(135deg, var(--wisdom-sapphire), #1d4ed8);
    color: var(--text-white);
    width: 100%;
}

.btn-wisdom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-premium {
    background: linear-gradient(135deg, var(--saturn-purple), #6d28d9);
    color: var(--text-white);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
    width: 100%;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(124, 58, 237, 0.5);
}

.btn-master {
    background: linear-gradient(135deg, var(--soul9-violet), var(--saturn-purple));
    color: var(--text-white);
    box-shadow: 0 4px 14px rgba(91, 33, 182, 0.3);
    width: 100%;
}

.btn-master:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(91, 33, 182, 0.5);
}

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

.btn-outline:hover {
    border-color: var(--primary-dark);
    background: var(--bg-light);
}

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

.btn-success:hover {
    background: #059669;
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover,
.btn[disabled]:hover {
    transform: none;
    box-shadow: none;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-icon {
    padding: 10px;
    min-width: auto;
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    background: var(--bg-white);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-bottom: 2px solid var(--primary-dark);
}

.page-header h1 {
    color: var(--primary-dark);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.page-header p,
.page-header-subtitle {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.4;
}

/* ============================================
   Stats Grid
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

/* Options Paper stats dashboard */
.options-paper-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr));
    gap: 8px;
}

.options-paper-stats-grid .stat-card {
    padding: 10px 12px;
}

.options-paper-stats-grid .stat-number {
    font-size: 18px;
}

@media (min-width: 1100px) {
    .options-paper-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1400px) {
    .options-paper-stats-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}

.stat-card {
    background: var(--bg-white);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-left: 3px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.12);
}

@media (prefers-reduced-motion: reduce) {
    .stat-card:hover {
        transform: none;
    }
}

.stat-card.gold {
    border-left-color: var(--accent-gold);
}

.stat-card.green {
    border-left-color: var(--success-green);
}

.stat-card.red {
    border-left-color: var(--danger-red);
}

.stat-card.blue {
    border-left-color: var(--primary-dark);
}

.stat-card h3 {
    color: var(--text-light);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 600;
}

.stat-number {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ============================================
   Sections
   ============================================ */
.section {
    background: var(--bg-white);
    padding: 16px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.section h2 {
    color: var(--primary-dark);
    font-size: 16px;
    font-weight: 700;
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================
   Tables
   ============================================ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

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

table th,
table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Options paper: P&L column */
table td.pnl-cell {
    font-weight: 600;
    white-space: nowrap;
}

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

table tr:hover td {
    background: var(--bg-light);
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-red);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-yellow);
}

.badge-info {
    background: rgba(26, 41, 64, 0.1);
    color: var(--primary-dark);
}

.badge-master {
    background: linear-gradient(135deg, var(--soul9-violet), var(--saturn-purple));
    color: white;
}

.badge-achievement {
    background: linear-gradient(135deg, var(--achievement-amber), var(--accent-gold-dark));
    color: var(--primary-dark);
}

.badge-wisdom {
    background: linear-gradient(135deg, var(--wisdom-sapphire), #1d4ed8);
    color: white;
}

.badge-premium {
    background: linear-gradient(135deg, var(--saturn-purple), #6d28d9);
    color: white;
}

/* ============================================
   Messages
   ============================================ */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-red);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border-left: 4px solid var(--danger-red);
    font-size: 14px;
    min-width: 200px;
    width: 100%;
    word-break: normal;
    white-space: normal;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border-left: 4px solid var(--success-green);
    font-size: 14px;
    min-width: 200px;
    width: 100%;
    word-break: normal;
    white-space: normal;
}

/* Login success alert (OTP success, profile saved, etc.) */
.success-alert {
    display: none;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}

/* Inline feedback near button (test connection, save webhook/route, etc.) */
.inline-feedback {
    display: none;
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.4;
    max-width: 100%;
    min-width: 200px;
    word-break: normal;
    white-space: normal;
}

.inline-feedback--success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--path9-forest);
    border-left: 4px solid var(--success-green);
}

.inline-feedback--error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-red);
    border-left: 4px solid var(--danger-red);
}

.info-message {
    background: rgba(212, 168, 75, 0.1);
    color: var(--accent-gold-dark);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-gold);
    font-size: 14px;
}

/* Birth-date themed accents (14.01.65, 15:13 – January/Capricorn + afternoon clarity) */
.info-message-calm {
    background: var(--accent-calm-blue-light);
    border-left-color: var(--accent-calm-blue);
    color: var(--primary-dark);
}

.info-message-calm a {
    color: var(--accent-calm-blue);
    font-weight: 600;
}

.info-message-wisdom {
    background: rgba(37, 99, 235, 0.08);
    border-left-color: var(--wisdom-sapphire);
    color: var(--primary-dark);
}

.info-message-wisdom a {
    color: var(--wisdom-sapphire);
    font-weight: 600;
}

.info-message-soul {
    background: var(--soul9-light);
    border-left-color: var(--soul9-violet);
    color: var(--primary-dark);
}

.info-message-soul a {
    color: var(--soul9-violet);
    font-weight: 600;
}

.first-time-hint-themed {
    background: var(--accent-calm-blue-light);
    border-left: 4px solid var(--accent-calm-blue);
    color: var(--text-dark);
}

.stat-card.calm {
    border-left-color: var(--accent-calm-blue);
}

.stat-card.sage {
    border-left-color: var(--accent-sage);
}

.stat-card.wisdom {
    border-left-color: var(--wisdom-sapphire);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), transparent);
}

.stat-card.path9 {
    border-left-color: var(--soul9-violet);
    background: linear-gradient(135deg, rgba(91, 33, 182, 0.03), transparent);
}

.stat-card.premium {
    border-left-color: var(--saturn-purple);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.04), transparent);
}

.stat-card.achievement {
    border-left-color: var(--achievement-amber);
    background: linear-gradient(135deg, rgba(240, 180, 41, 0.04), transparent);
}

.hero-accent-calm {
    background: radial-gradient(circle, rgba(79, 124, 156, 0.12) 0%, transparent 65%);
}

/* ============================================
   Disclaimer / Legal
   ============================================ */
.site-disclaimer {
    background: rgba(26, 41, 64, 0.04);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary-dark);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.6;
}

.site-disclaimer strong {
    color: var(--text-dark);
}

.site-disclaimer a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}

.site-disclaimer a:hover {
    text-decoration: underline;
}

/* Dashboard banners grid – pairs banners side-by-side */
.dashboard-banners-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.dashboard-banners-grid>[style*="display: none"],
.dashboard-banners-grid>[style*="display:none"] {
    display: none !important;
}

/* Dashboard banners (trial) – aligned with dashboard palette */

.trial-banner-inner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-navy) 100%);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.trial-banner-inner h3 {
    margin: 0;
    font-size: 13px;
    flex: 1;
    white-space: nowrap;
}

.trial-banner-inner .btn {
    background: var(--accent-gold);
    color: var(--primary-dark);
    font-weight: 600;
    padding: 5px 14px;
    font-size: 11px;
    text-decoration: none;
    border: none;
    flex-shrink: 0;
}

.trial-active-banner-inner {
    background: linear-gradient(135deg, var(--path9-forest) 0%, #047857 100%);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.trial-active-banner-inner h3 {
    margin: 0;
    font-size: 12px;
    white-space: nowrap;
}

.trial-active-banner-inner p {
    margin: 0;
    opacity: 0.9;
    font-size: 11px;
    white-space: nowrap;
}

.trial-active-banner-inner>div {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.trial-active-banner-inner .btn {
    background: #fff;
    color: var(--path9-forest) !important;
    font-weight: 600;
    padding: 5px 12px;
    font-size: 11px;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.trial-expired-banner-inner {
    background: linear-gradient(135deg, var(--capricorn-slate) 0%, var(--primary-navy) 100%);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.trial-expired-banner-inner h3 {
    margin: 0;
    font-size: 12px;
    white-space: nowrap;
}

.trial-expired-banner-inner p {
    margin: 0;
    opacity: 0.9;
    font-size: 11px;
    white-space: nowrap;
}

.trial-expired-banner-inner>div {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.trial-expired-banner-inner .btn {
    background: var(--accent-gold);
    color: var(--primary-dark);
    font-weight: 600;
    padding: 5px 12px;
    font-size: 11px;
    text-decoration: none;
    border: none;
    flex-shrink: 0;
}

/* Premium Options Analytics Banners */
.options-analytics-trial-banner-inner,
.options-analytics-open-cta-inner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.3); /* Subtle gold border */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.3s ease;
}

.options-analytics-trial-banner-inner:hover,
.options-analytics-open-cta-inner:hover {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15), 0 0 12px rgba(212, 175, 55, 0.15);
}

.options-analytics-trial-banner-inner h3,
.options-analytics-open-cta-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.options-analytics-trial-banner-inner .btn,
.options-analytics-open-cta-inner .btn {
    background: var(--accent-gold);
    color: var(--primary-dark);
    font-weight: 600;
    padding: 5px 14px;
    font-size: 11px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    width: auto;
}

.options-analytics-trial-banner-inner .btn:hover,
.options-analytics-open-cta-inner .btn:hover {
    filter: brightness(1.08);
}

/* Paper Trading banner */
.paper-trading-banner-inner {
    background: linear-gradient(135deg, var(--path9-forest) 0%, #047857 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.paper-trading-banner-inner h3 {
    margin: 0;
    font-size: 12px;
    color: #fff;
    flex: 1;
    white-space: nowrap;
}

.paper-trading-banner-inner .btn {
    background: #fff;
    color: var(--path9-forest) !important;
    font-weight: 600;
    padding: 5px 14px;
    font-size: 11px;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

/* ── Paper Trading stat cards ── */
.pt-stat-card {
    background: var(--bg-white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s;
}
.pt-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.pt-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 6px;
}
.pt-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

/* ── Paper Trading Table ── */
#paper-trades-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

#paper-trades-container thead th {
    text-align: left;
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    white-space: nowrap;
}

#paper-trades-container tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    white-space: nowrap;
}

#paper-trades-container tbody tr:hover {
    background: #f8fafc;
}

#paper-trades-container tbody tr:last-child td {
    border-bottom: none;
}

/* P&L colouring is added dynamically via inline style; support .pnl-positive / .pnl-negative */
#paper-trades-container .pnl-positive {
    color: #16a34a;
    font-weight: 700;
}

#paper-trades-container .pnl-negative {
    color: #dc2626;
    font-weight: 700;
}

/* Status badges inside paper trades table */
#paper-trades-container .badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* Sub-tab filter buttons */
.paper-segment-btn.active {
    background: var(--primary-dark) !important;
    color: #fff !important;
    border-color: var(--primary-dark) !important;
}

/* Site footer - legal and support links; link text must always be visible */
.site-footer-legal {
    margin-top: 32px;
    padding: 24px 20px;
    border-top: 2px solid var(--border-light);
    background: rgba(26, 41, 64, 0.04);
    color: var(--text-dark);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.footer-nav {
    display: block;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 0;
    row-gap: 8px;
}

.site-footer-legal .footer-links a {
    display: inline-block;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 2px 4px;
}

.site-footer-legal .footer-links a:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

.site-footer-legal .footer-sep {
    display: inline-block;
    color: var(--text-light);
    font-weight: 400;
    margin: 0 6px;
    user-select: none;
}

/* Login card footer – legal links and company */
.login-card .site-footer-legal {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.login-card .site-footer-legal .login-footer-links {
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 8px;
}

.login-card .site-footer-legal .login-footer-links a {
    color: var(--accent-gold);
}

.login-card .site-footer-legal .login-footer-sep {
    margin: 0;
    color: var(--border-light);
    user-select: none;
}

.login-card .site-footer-legal .login-footer-company {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.5;
}

/* Floating footer – absolute bottom, discreet on dark background */
.site-footer-legal-floating {
    margin-top: auto;
    padding: 16px 24px calc(20px + env(safe-area-inset-bottom, 0));
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
}

.site-footer-legal-floating .login-footer-links {
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 8px;
}

.site-footer-legal-floating .login-footer-links a {
    color: rgba(255, 255, 255, 0.55);
}

.site-footer-legal-floating .login-footer-links a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.site-footer-legal-floating .login-footer-sep {
    color: rgba(255, 255, 255, 0.35);
}

.site-footer-legal-floating .login-footer-company {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
}

.site-footer-legal-floating .login-footer-company strong {
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Modal
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    /* Increased to stay above everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: rgba(15, 23, 42, 0.75);
    /* Sleeker dark slate */
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Class-based open state: _openModal toggles this class.
   !important overrides any cached or specificity CSS issues. */
.modal.modal-active {
    display: flex !important;
    visibility: visible !important;
}

.modal-content {
    background-color: var(--bg-white);
    margin: auto;
    /* Robust centering */
    padding: 32px;
    border-radius: 20px;
    /* Slightly more rounded */
    max-width: 560px;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    /* Deeper shadow */
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal.modal-active .modal-content {
    transform: translateY(0);
}

/* Create Webhook modal: same width on admin and user dashboard */
.modal-content.create-webhook-modal-content {
    max-width: 560px;
}

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

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
    color: var(--primary-dark);
    font-size: 22px;
    font-weight: 700;
}

.close {
    color: var(--text-light);
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

button.close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: var(--danger-red);
}

.close:focus {
    outline: none;
}

.close:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.25);
    border-radius: 4px;
}

/* ============================================
   Cards Grid
   ============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    align-items: stretch;
}

/* Product cards: uniform height, flex layout */
.cards-grid .product-card,
.cards-grid .card.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cards-grid .product-card .card-body,
.cards-grid .card.product-card .card-body {
    flex: 1;
    min-height: 0;
}

.cards-grid .product-card .card-footer,
.cards-grid .card.product-card .card-footer {
    margin-top: auto;
}

.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-gold);
}

.subscribed-bot-card {
    border-color: var(--success);
    background: linear-gradient(135deg, var(--bg-white) 0%, rgba(16, 185, 129, 0.04) 100%);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

.card-body {
    color: var(--text-light);
    font-size: 14px;
}

.card-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
}

.card.card-featured {
    border: 2px solid var(--accent-gold, #d4a84b);
    box-shadow: 0 4px 16px rgba(212, 168, 75, 0.15);
    background: linear-gradient(135deg, var(--bg-white) 0%, rgba(212, 168, 75, 0.04) 100%);
}

.card.card-featured:hover {
    box-shadow: 0 8px 28px rgba(212, 168, 75, 0.25);
    border-color: var(--accent-gold, #d4a84b);
}

.premium-tool-card {
    background: linear-gradient(to bottom right, #ffffff, #f8fafc);
    border: 1px solid var(--accent-gold) !important;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.08) !important;
    position: relative;
    overflow: hidden;
}
.premium-tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), #FFF8DC);
}

.btn-tradingview {
    border-color: #2962FF;
    color: #2962FF;
    font-weight: 600;
}

.btn-tradingview:hover {
    background: #2962FF;
    color: #fff;
    border-color: #2962FF;
}

/* ============================================
   Credentials Grid
   ============================================ */
.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.credential-card {
    background: var(--bg-white);
    padding: 32px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.04);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.credential-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.1);
}

.credential-icon,
.credential-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin: 0 auto 20px;
    display: block;
    object-fit: contain;
}

.credential-icon {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-navy));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    font-size: 24px;
}

.credential-card h3 {
    color: var(--primary-dark);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.credential-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    display: inline-block;
}

.credential-status.configured {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.credential-status.not-configured {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-red);
}

/* ============================================
   Route Config Fields
   ============================================ */
.route-config-field {
    margin-bottom: 16px;
}

.route-config-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-dark);
}

.route-config-field input[type="password"] {
    font-family: monospace;
}

/* ============================================
   Copy Button
   ============================================ */
.copy-field {
    display: flex;
    gap: 8px;
}

.copy-field input {
    flex: 1;
    font-family: monospace;
    font-size: 13px;
    background: var(--bg-light);
}

.copy-btn {
    padding: 10px 16px;
    background: var(--primary-dark);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    font-weight: 600;
}

.copy-btn:hover {
    background: var(--primary-navy);
}

/* ============================================
   Loading
   ============================================ */
.loading {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
}

.loading-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border-light);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

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

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.stat-number.skeleton-loading {
    color: transparent;
    background: var(--border-light);
    border-radius: 4px;
    display: inline-block;
    min-width: 28px;
    min-height: 24px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-dark);
    margin-bottom: 8px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 0;
    }

    .nav-mobile-toggle {
        display: flex;
        margin-left: auto;
    }

    .nav-menu {
        display: none;
        width: 100%;
        order: 3;
        padding-top: 16px;
        border-top: 1px solid var(--border-light);
        margin-top: 12px;
    }

    .nav-container.nav-mobile-open .nav-menu {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 4px;
    }

    .nav-links>a.nav-link-item,
    .nav-dropdown-trigger {
        display: flex;
        align-items: center;
        padding: 14px 16px;
        font-size: 15px;
        min-height: 44px;
        border-radius: var(--radius-sm);
    }

    .nav-links .dashboard-tab-bar {
        width: 100%;
        flex: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-links .dashboard-tab-bar::-webkit-scrollbar {
        height: 0;
    }

    .nav-links .dashboard-tab-bar .tab-btn {
        flex: 0 0 auto;
        white-space: nowrap;
        min-height: 44px;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 0 0 0 16px;
        max-height: none;
        margin-top: 4px;
    }

    .nav-dropdown-menu a,
    .nav-dropdown-menu button.nav-dropdown-item {
        padding: 12px 16px;
    }

    .nav-user {
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid var(--border-light);
        margin-top: 8px;
    }

    .nav-user .btn {
        width: 100%;
        min-height: 44px;
    }

    .nav-brand-text {
        font-size: 16px;
    }

    .nav-brand-logo {
        height: 52px;
    }

    .navbar-landing .nav-brand-logo {
        height: 56px;
    }

    /* Tabs: allow horizontal scroll on mobile (many tabs in admin pages) */
    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs::-webkit-scrollbar {
        height: 0;
    }

    .tab-btn {
        flex: 0 0 auto;
        white-space: nowrap;
        min-height: 44px;
        padding: 12px 16px;
    }

    .container {
        padding: 16px;
    }

    .login-card {
        padding: 24px 20px;
        margin: 16px;
    }

    .login-logo img {
        max-width: 180px;
    }

    .login-wrapper {
        padding: 20px 16px;
    }

    .page-header {
        padding: 12px 14px;
    }

    .page-header h1 {
        font-size: 18px;
    }

    .page-header p {
        font-size: 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .section {
        padding: 16px;
    }

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

    .section-header .btn {
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
        min-height: 44px;
    }

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

    /* Override inline max-width so modals fit on small screens */
    .modal .modal-content {
        margin: 0;
        padding: 20px 16px;
        max-width: calc(100% - 24px) !important;
        width: calc(100% - 24px);
        box-sizing: border-box;
    }

    .modal-header h2 {
        font-size: 18px;
    }

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

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }

    .table-container table {
        min-width: 500px;
    }

    table th,
    table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Touch-friendly small buttons (min 44px tap target) */
    .btn-sm {
        min-height: 44px;
        padding: 10px 16px;
    }

    /* Prevent iOS zoom on focus (16px+ avoids auto-zoom) */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
    }

    /* Banners: single column on mobile */
    .dashboard-banners-grid {
        grid-template-columns: 1fr;
    }

    /* Modals: break long URLs and codes so they don't overflow */
    .modal-content pre,
    .modal-content code,
    .modal-content .font-mono {
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .modal-content input,
    .modal-content select,
    .modal-content textarea {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Prevent horizontal overflow on body */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    /* Safe area for notched devices (iPhone X+, etc.) */
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Very small screens: card layout for tables, login feature list stacks */
@media (max-width: 480px) {
    .feature-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .table-container table.table-cards-mobile,
    .table-container table.table-cards-mobile thead,
    .table-container table.table-cards-mobile tbody,
    .table-container table.table-cards-mobile tr,
    .table-container table.table-cards-mobile th,
    .table-container table.table-cards-mobile td {
        display: block;
    }

    .table-container table.table-cards-mobile thead {
        display: none;
    }

    .table-container table.table-cards-mobile tr {
        border: 1px solid var(--border-light);
        border-radius: var(--radius-sm);
        margin-bottom: 12px;
        padding: 12px;
        background: var(--bg-white);
        overflow: hidden;
    }

    .table-container table.table-cards-mobile td {
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid var(--border-light);
    }

    .table-container table.table-cards-mobile tr td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .table-container table.table-cards-mobile td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 4px;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-light);
    }
}

/* Very small screens */
@media (max-width: 400px) {
    .container {
        padding: 12px;
    }

    .nav-brand-text {
        font-size: 14px;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-gold {
    color: var(--accent-gold);
}

.text-success {
    color: var(--success-green);
}

.text-danger {
    color: var(--danger-red);
}

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

.font-mono {
    font-family: monospace;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

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

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

/* ============================================
   WhatsApp Customer Care Floating Button
   ============================================ */
.whatsapp-float {
    position: fixed !important;
    bottom: calc(24px + env(safe-area-inset-bottom, 0)) !important;
    right: calc(24px + env(safe-area-inset-right, 0)) !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: #25D366 !important;
    color: #fff !important;
    padding: 12px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 99999 !important;
    transition: transform 0.2s, box-shadow 0.2s;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Dashboard / app layout: small, bottom-left below sidebar to avoid overlapping ask input */
body.dashboard-page .whatsapp-float,
body:has(.app-layout .sidebar) .whatsapp-float {
    left: 20px !important;
    right: auto !important;
    padding: 8px !important;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50% !important;
    justify-content: center;
}

body.dashboard-page .whatsapp-float span,
body:has(.app-layout .sidebar) .whatsapp-float span {
    display: none !important;
}

body.dashboard-page .whatsapp-float svg,
body.dashboard-page .whatsapp-float img,
body:has(.app-layout .sidebar) .whatsapp-float svg,
body:has(.app-layout .sidebar) .whatsapp-float img {
    width: 20px !important;
    height: 20px !important;
}

.whatsapp-float:hover {
    transform: scale(1.05);
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
}

.whatsapp-float:visited {
    color: #fff !important;
}

.whatsapp-float img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.whatsapp-float svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .whatsapp-float {
        padding: 10px !important;
        border-radius: 50% !important;
        bottom: calc(16px + env(safe-area-inset-bottom, 0)) !important;
        right: calc(16px + env(safe-area-inset-right, 0)) !important;
    }

    body.dashboard-page .whatsapp-float,
    body:has(.app-layout .sidebar) .whatsapp-float {
        left: 16px !important;
        right: auto !important;
    }

    .whatsapp-float span {
        display: none !important;
    }

    .whatsapp-float svg,
    .whatsapp-float img {
        width: 22px;
        height: 22px;
    }
}

/* ============================================
   Options Paper Engine Config Wizard (Premium)
   ============================================ */
.engine-config-section {
    margin-top: 24px;
}

.engine-config-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.engine-config-toggle:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f4f8 100%);
    border-color: var(--accent-gold);
    box-shadow: 0 2px 8px rgba(212, 168, 75, 0.15);
}

.engine-config-toggle[aria-expanded="true"] {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-navy) 100%);
    color: #fff;
    border-color: var(--primary-dark);
}

.engine-config-toggle::before {
    content: "⚙";
    font-size: 16px;
}

.engine-config-body {
    margin-top: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(212, 168, 75, 0.2);
    box-shadow: 0 4px 20px rgba(26, 41, 64, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.engine-config-intro {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.engine-config-intro strong {
    color: var(--primary-dark);
}

.engine-config-scope {
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.engine-config-json-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-blue);
    text-decoration: none;
    padding: 6px 0;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.engine-config-json-link:hover {
    color: var(--accent-gold);
}

.engine-config-json-link::before {
    content: "{ }";
    font-family: monospace;
    font-size: 14px;
    font-weight: 700;
}

/* Config Wizard Sections */
.engine-config-wizard {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.config-wizard-section {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.config-wizard-section:hover {
    border-color: var(--accent-gold-light);
    box-shadow: 0 2px 8px rgba(212, 168, 75, 0.08);
}

.config-wizard-head {
    margin: 0;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f4f8 100%);
    border-bottom: 1px solid transparent;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    user-select: none;
}

.config-wizard-head:hover {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8ecf0 100%);
}

.config-wizard-head[aria-expanded="true"] {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-navy) 100%);
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.config-wizard-head[aria-expanded="true"]::before {
    filter: brightness(10);
}

.config-wizard-arrow {
    font-size: 12px;
    opacity: 0.6;
    transition: transform 0.25s ease;
}

.config-wizard-head[aria-expanded="true"] .config-wizard-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.config-wizard-body {
    padding: 20px;
    background: #fff;
    border-top: 1px solid var(--border-light);
}

/* Form groups inside wizard */
.config-wizard-body .form-group {
    margin-bottom: 16px;
}

.config-wizard-body .form-group:last-child {
    margin-bottom: 0;
}

.config-wizard-body label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
}

.config-wizard-body label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-gold);
    cursor: pointer;
    flex-shrink: 0;
}

.engine-config-time-tz {
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-right: 12px;
    min-width: 120px;
}

.config-wizard-body input[type="number"],
.config-wizard-body input[type="text"],
.config-wizard-body input[type="time"] {
    width: 100px;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.config-wizard-body input[type="number"]:focus,
.config-wizard-body input[type="text"]:focus,
.config-wizard-body input[type="time"]:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.15);
}

.config-wizard-body .form-hint {
    display: block;
    margin-top: 6px;
    margin-left: 28px;
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
}

.config-wizard-body .form-group-indent {
    margin-left: 28px;
    padding-left: 16px;
    border-left: 2px solid var(--border-light);
}

/* JSON Editor */
.engine-config-json-wrap {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.engine-config-json-wrap textarea {
    width: 100%;
    min-height: 280px;
    padding: 14px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-dark);
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.engine-config-json-wrap textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.15);
}

.engine-config-json-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 10px;
}

/* Action buttons */
.engine-config-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.engine-config-status {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 3px solid var(--success-green);
}

.engine-config-status:empty {
    display: none;
}

/* ===== Onboarding Overlay ===== */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.onboarding-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px 32px 16px;
    background: linear-gradient(to right, #0f172a, #1e293b);
    border-bottom: none;
    flex-shrink: 0;
    position: relative;
}

.onboarding-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}

.onboarding-progress-step span {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.onboarding-progress-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.onboarding-progress-step.active .onboarding-progress-dot {
    background: var(--accent-gold, #c8a22e);
    border-color: #f5ecd0;
    box-shadow: 0 0 0 4px rgba(200, 162, 46, 0.15);
}

.onboarding-progress-step.active span {
    color: var(--accent-gold, #c8a22e);
}

.onboarding-progress-step.done span {
    color: rgba(255, 255, 255, 0.7);
}

.onboarding-progress-step.done .onboarding-progress-dot {
    background: var(--success-green, #10b981);
    border-color: #d1fae5;
}

.onboarding-progress-line {
    flex: 1;
    max-width: 80px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 8px;
    margin-bottom: 22px;
}

.onboarding-body {
    flex: 1;
    display: flex;
    overflow-y: auto;
    padding: 32px;
    gap: 32px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.onboarding-vinny {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    position: sticky;
    top: 0;
    align-self: flex-start;
}

.onboarding-vinny-orb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f5ecd0, #c8a22e);
    box-shadow: 0 4px 24px rgba(200, 162, 46, 0.3);
    animation: vinny-onboard-pulse 2s ease-in-out infinite;
}

@keyframes vinny-onboard-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 24px rgba(200, 162, 46, 0.3);
    }

    50% {
        transform: scale(1.06);
        box-shadow: 0 6px 32px rgba(200, 162, 46, 0.45);
    }
}

.onboarding-vinny-bubble {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    max-width: 200px;
    text-align: center;
}

.onboarding-vinny-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.onboarding-vinny-ask {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 200px;
}

.onboarding-vinny-ask-input {
    font-size: 12px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #334155;
    background: #fff;
}

.onboarding-vinny-ask-input::placeholder {
    color: #94a3b8;
}

.onboarding-vinny-ask-btn {
    font-size: 12px;
    padding: 8px 14px;
    background: var(--primary, #d4a84b);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.onboarding-vinny-ask-btn:hover {
    background: var(--primary-dark, #b8923a);
}

.onboarding-vinny-ask-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.onboarding-content {
    flex: 1;
    min-width: 0;
}

.onboarding-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.onboarding-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: var(--primary-dark, #1a2940);
}

.onboarding-card .ob-subtitle {
    color: #64748b;
    margin: 0 0 24px;
    font-size: 15px;
}

.ob-path-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.ob-path-card {
    border: 1.5px solid #e8edf2;
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    text-align: left;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ob-path-card:hover {
    border-color: var(--accent-gold, #c8a22e);
    box-shadow: 0 8px 24px rgba(200, 162, 46, 0.12), 0 1px 4px rgba(0,0,0,0.04);
    transform: translateY(-2px);
}

.ob-path-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
    color: var(--primary-dark, #1a2940);
}

.ob-path-card p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.ob-path-card .ob-path-icon {
    font-size: 32px;
    margin-bottom: 14px;
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.ob-path-card.selected {
    border-color: var(--accent-gold, #c8a22e);
    background: #fefbf0;
}

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

.ob-form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #334155;
    margin-bottom: 6px;
}

.ob-form-group input,
.ob-form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.ob-form-group input:focus,
.ob-form-group select:focus {
    outline: none;
    border-color: var(--accent-gold, #c8a22e);
    box-shadow: 0 0 0 3px rgba(200, 162, 46, 0.1);
}

.ob-url-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin: 12px 0;
}

.ob-url-box code {
    flex: 1;
    font-size: 12px;
    word-break: break-all;
    color: #334155;
}

.ob-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.ob-btn-primary {
    background: var(--accent-gold, #c8a22e);
    color: #fff;
}

.ob-btn-primary:hover {
    background: #b08f28;
}

.ob-btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.ob-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.ob-btn-secondary:hover {
    background: #e2e8f0;
}

.ob-btn-skip {
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    padding: 8px 16px;
}

.ob-btn-skip:hover {
    color: #64748b;
    text-decoration: underline;
}

.ob-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.ob-section {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
}

.ob-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f8fafc;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #334155;
    user-select: none;
}

.ob-section-head .ob-section-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.ob-section-tag.mandatory {
    background: #fef2f2;
    color: #ef4444;
}

.ob-section-tag.optional {
    background: #f0fdf4;
    color: #22c55e;
}

.ob-section-body {
    padding: 18px;
    border-top: 1px solid #e2e8f0;
}

.ob-section.collapsed .ob-section-body {
    display: none;
}

.ob-example {
    background: #f8fafc;
    border-left: 3px solid var(--accent-gold, #c8a22e);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.7;
    color: #475569;
}

.ob-code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 14px 18px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    position: relative;
    margin: 12px 0;
}

.ob-code-block .ob-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    font-size: 11px;
    background: #334155;
    color: #94a3b8;
    border: 1px solid #475569;
    border-radius: 4px;
    cursor: pointer;
}

.ob-code-block .ob-copy-btn:hover {
    color: #fff;
}

.ob-coin-chip {
    transition: all 0.2s ease;
}

.ob-coin-chip:hover {
    border-color: var(--accent-gold, #c8a22e) !important;
    background: #fefbf0 !important;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(200, 162, 46, 0.15);
}

.ob-action-chip {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #334155;
}

.ob-action-chip:hover {
    border-color: var(--accent-gold, #c8a22e);
    background: #fefbf0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(200, 162, 46, 0.15);
}

.ob-action-chip-active {
    border-color: var(--accent-gold, #c8a22e) !important;
    background: #fef3c7 !important;
    color: #92400e;
    box-shadow: 0 0 0 2px rgba(200, 162, 46, 0.25);
}

.ob-verify-area {
    margin-top: 16px;
}

.ob-verify-area textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
}

.ob-verify-result {
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.ob-verify-result.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.ob-verify-result.warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.ob-verify-result.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.ob-completion {
    text-align: center;
    padding: 48px 32px;
}

.ob-completion h2 {
    font-size: 28px;
    margin-bottom: 12px;
}

.ob-completion .ob-summary {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin: 24px auto;
    max-width: 400px;
    text-align: left;
    font-size: 14px;
    line-height: 2;
}

.ob-subscription-banner {
    background: linear-gradient(135deg, #fefbf0, #f5ecd0);
    border: 1px solid #c8a22e33;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 16px 0 24px;
    text-align: center;
}

.ob-product-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin: 4px 4px;
}

.ob-badge-trial {
    background: #d1fae5;
    color: #065f46;
}

.ob-badge-can_trial {
    background: #f0fdf4;
    color: #065f46;
    border: 1.5px dashed #34d399;
}

.ob-badge-paper_active {
    background: #dbeafe;
    color: #1e40af;
}

.ob-badge-options_analytics {
    background: #ede9fe;
    color: #5b21b6;
}

.ob-badge-can_oa_trial {
    background: #f5f3ff;
    color: #5b21b6;
    border: 1.5px dashed #a78bfa;
}

.ob-badge-copy_trading {
    background: #fef3c7;
    color: #92400e;
}

.onboarding-overlay {
    z-index: 9999 !important;
    isolation: isolate;
}

.ob-exit-dashboard-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    z-index: 10;
    transition: all 0.2s;
}

.ob-exit-dashboard-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.ob-path-card {
    position: relative;
}

.ob-oa-pricing-cards {
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 640px) {
    .ob-oa-pricing-cards {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .onboarding-body {
        flex-direction: column;
        padding: 16px;
        gap: 16px;
    }

    .onboarding-vinny {
        width: 100%;
        flex-direction: row;
        position: static;
        padding-top: 0;
    }

    .onboarding-vinny-orb {
        width: 48px;
        height: 48px;
    }

    .onboarding-vinny-ask {
        flex: 1;
        max-width: none;
    }

    .onboarding-vinny-bubble {
        max-width: none;
        flex: 1;
        text-align: left;
    }

    .onboarding-vinny-bubble::before {
        display: none;
    }

    .onboarding-card {
        padding: 20px;
    }

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

    .onboarding-progress {
        padding: 12px 16px;
    }

    .onboarding-progress-step {
        min-width: 60px;
    }

    .onboarding-progress-step span {
        font-size: 10px;
    }
}

/* Section icons - using simple text symbols */
.config-wizard-section[data-section="entry"] .config-wizard-head::before {
    content: "▶";
    margin-right: 10px;
    color: var(--success-green);
}

.config-wizard-section[data-section="profit"] .config-wizard-head::before {
    content: "$";
    margin-right: 10px;
    color: var(--success-green);
    font-weight: 700;
}

.config-wizard-section[data-section="time"] .config-wizard-head::before {
    content: "◷";
    margin-right: 10px;
    color: var(--primary-blue);
}

.config-wizard-section[data-section="stop"] .config-wizard-head::before {
    content: "●";
    margin-right: 10px;
    color: var(--danger-red);
}

.config-wizard-section[data-section="breakout"] .config-wizard-head::before {
    content: "↗";
    margin-right: 10px;
    color: var(--warning-yellow);
    font-weight: 700;
}

.config-wizard-section[data-section="reentry"] .config-wizard-head::before {
    content: "↻";
    margin-right: 10px;
    color: var(--primary-blue);
}

.config-wizard-section[data-section] .config-wizard-head[aria-expanded="true"]::before {
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .engine-config-body {
        padding: 16px;
    }

    .config-wizard-head {
        padding: 12px 14px;
        font-size: 13px;
    }

    .config-wizard-body {
        padding: 14px;
    }

    .config-wizard-body input[type="number"],
    .config-wizard-body input[type="text"] {
        width: 80px;
        padding: 8px 10px;
    }
}