/* Resend verification button styled like Try demo */
.resend-verify-btn {
    border: 2px solid var(--blue);
    background-color: var(--blue);
    color: var(--grey-bg);
    margin-top: 1.5rem;
    padding: 0.5em 1.2em;
    font-size: 1em;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.resend-verify-btn:hover {
    background-color: var(--grey-bg);
    color: var(--blue);
}

/* =====================
   Rithmic Sync Section
   ===================== */
.rithmic-sync-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}
.rithmic-login-form {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.rithmic-form-row {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}
.rithmic-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.rithmic-field-full {
    flex: 1 1 100%;
}
.rithmic-field label {
    font-size: 0.85rem;
    color: var(--black);
    font-weight: 500;
}
.rithmic-field input,
.rithmic-field select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: var(--app-font-stack);
    background: #fff;
}
.rithmic-field input:focus,
.rithmic-field select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(8,29,89,0.1);
}
.rithmic-form-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}
.rithmic-error {
    color: var(--red);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 0.5rem;
}
.rithmic-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(98,168,124,0.08);
    border-radius: 8px;
    width: 100%;
}
/* When rithmic-status is inside import-card, adjust for compact display */
.import-card .rithmic-status {
    padding: 0.25rem;
    background: transparent;
    gap: 6px;
}
.import-card .rithmic-connected {
    font-size: 0.85rem;
}
.import-card .rithmic-account-info {
    font-size: 0.8rem;
}
.import-card .rithmic-actions {
    gap: 6px;
}
.rithmic-connected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--green);
}
.rithmic-account-info {
    font-size: 0.9rem;
    color: var(--black);
}
.rithmic-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}
.rithmic-disconnect {
    background: transparent !important;
    border-color: var(--red) !important;
    color: var(--red) !important;
}
.rithmic-disconnect:hover {
    background: var(--red) !important;
    color: #fff !important;
}
/* Remember me checkbox */
.rithmic-remember {
    margin-top: 0.25rem;
}
.rithmic-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--black);
}
.rithmic-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
/* Loading state for Rithmic button */
.rithmic-loading {
    opacity: 0.7;
    pointer-events: none;
    /* Keep button width stable during loading animation */
    min-width: 120px;
    position: relative;
}
.rithmic-loading::after {
    content: '...';
    /* Position dots absolutely so they don't affect button width */
    position: absolute;
    animation: rithmic-dots 1s infinite;
}
@keyframes rithmic-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* N/A value styling for Rithmic limited data */
.na-value {
    color: #999;
    font-style: italic;
}

/* Rithmic import progress bar (shared by light/dark themes) */
.rithmic-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.rithmic-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(8, 29, 89, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.rithmic-progress-fill {
    height: 100%;
    background: var(--green);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.rithmic-progress-text {
    font-size: 12px;
    color: var(--black);
    opacity: 0.9;
}

/* Rithmic limited data notice in trade details */
.rithmic-limited-notice {
    background: #fff8e6;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.rithmic-limited-notice i {
    color: #ffc107;
}

/* Disabled button styling (e.g., View chart for Rithmic imports) */
button.btn-reset:disabled,
button.btn-reset[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc;
    border-color: #bbb;
    color: #666;
}
button.btn-reset:disabled:hover,
button.btn-reset[disabled]:hover {
    background: #ccc;
    border-color: #bbb;
}

/* Rithmic disclaimer in form */
.rithmic-disclaimer {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.4;
}
.rithmic-disclaimer i {
    color: #6c757d;
    margin-right: 0.25rem;
}
.rithmic-disclaimer a {
    color: var(--green);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .rithmic-form-row {
        flex-direction: column;
    }
    .rithmic-field {
        width: 100%;
    }
}

/* Landing Page Rithmic Collapsible Section */
.landing-rithmic-section {
    max-width: 600px;
    margin: 2rem auto 0;
}
.rithmic-collapsible {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}
.rithmic-collapsible[open] {
    background: white;
}
.rithmic-toggle {
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--black);
    user-select: none;
    list-style: none;
}
.rithmic-toggle::-webkit-details-marker {
    display: none;
}
.rithmic-toggle span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.rithmic-toggle span i {
    color: var(--blue);
}
.rithmic-toggle-icon {
    transition: transform 0.2s ease;
    color: #666;
}
.rithmic-collapsible[open] .rithmic-toggle-icon {
    transform: rotate(180deg);
}
.rithmic-sync-content {
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
/* Adjust landing page form spacing */
.landing-rithmic-section .rithmic-form {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}
.landing-rithmic-section .rithmic-form-grid {
    padding: 0;
}
.landing-rithmic-section .rithmic-button {
    width: 100%;
}

/* Center and equally space upload controls in the second column */
.upload-controls-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 2.2rem;
}
@media (min-width: 769px) {
    .upload-widget .auth-buttons { grid-column: 2; }
}
@font-face {
    font-family: 'Sentinel, sans-serif';
    src: url('/fonts/Sentinel-Book.otf') format('opentype');
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    background-color: var(--grey-bg, #ffffff);
    /* Ensure in-page anchor jumps (e.g., #generate-report) account for fixed navbar */
    scroll-padding-top: var(--navbar-offset, 56px);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* Merged: base theming */
    background-color: var(--grey-bg, #ffffff);
    color: var(--black, #000);
    line-height: 1.5;
    font-family: var(--app-font-stack);
}

:root {
    font-family: "Sen", sans-serif;
        /* Merged variables from styles 2.css */
        --blue: #081d59;
        --green: #62a87c;
        --red: #d33e43;
        --yellow: #f3ca40;
    --grey-bg: #ffffff;
        --black: #000000;
    /* Default navbar offset for anchor scrolling; updated at runtime */
    --navbar-offset: 56px;
}

/* Merged font-face from styles 2.css */
/* Removed Avenir @font-face (files not present -> 404). Using system font stack instead. */
/* Define a reusable CSS variable for app font - matching dark mode */
:root { --app-font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body, button, input, select, textarea { font-family: var(--app-font-stack); }

/* Lock scroll when mobile menu is open */
body.menu-open { overflow: hidden; }

/* Additional semantic color variable */
:root { --be-grey: #888888; }

/* Headings use the same system font stack for consistency */
h1, h2, h3, .hero-text, .feature-header { font-family: var(--app-font-stack); }

/* Landing page typography - use system-ui fonts everywhere (matching dark mode) */
.nav-link,
.btn-try-demo,
.btn-contact-sales,
.btn-get-started,
.hero-subtext,
.feature-body,
.section-heading,
.features-heading,
.features-subtitle,
.broker-name,
.broker-group-title,
.brokers-subtitle,
.integration-badge,
.prop-firms-label,
.prop-tag,
.faq-question,
.faq-answer-content,
.footer-link {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* =====================
     Merged marketing UI
     from styles 2.css
     ===================== */
/* Container utility */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Site header (shared across landing + dashboard) */
.site-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; }
.logo { font-weight: 700; font-size: 1.25rem; color: var(--blue); text-decoration: none; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
/* Upload timezone debug line */
.tz-debug { color: var(--be-grey); font-size: 0.9rem; }
/* Custom crosshair time label for TradingView chart */
.custom-crosshair-time { display: none; }

/* Navbar (logo + top actions) */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(255,255,255, var(--navbar-bg-opacity, 1)); border-bottom: 1px solid rgba(8,29,89,0.08); margin-top: 0; padding-top: constant(safe-area-inset-top); padding-top: env(safe-area-inset-top); -webkit-backface-visibility: hidden; backface-visibility: hidden; -webkit-transform: translateZ(0); transform: translateZ(0); will-change: transform; }
.navbar::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: rgba(255,255,255, var(--navbar-bg-opacity, 1)); pointer-events: none; }
.navbar .container { display: flex; align-items: center; justify-content: flex-start; gap: 2.25rem; padding: 0.5rem 1rem; }
.nav-menu { display: flex; align-items: center; gap: 1rem; flex: 1; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-actions { display: flex; gap: 0.5rem; align-items: center; margin-left: auto; }
/* Match 'Standard template' link look */
.nav-link { color: var(--blue); text-decoration: none; border-bottom: 1px solid var(--blue); transition: border-bottom-color 0.3s ease; font: inherit; }
.dashboard-active .nav-links { display: none !important; }
.dashboard-active #viewDashboardBtn { display: none !important; }
.nav-link:hover { border-bottom-color: transparent; }
/* Hamburger default hidden on desktop */
.hamburger { display: none; border: none; background: transparent; font-size: 1.4rem; color: var(--blue); padding: 0.25rem 0.5rem; cursor: pointer; }
@media (max-width: 768px) {
    .navbar .container { padding: 0.4rem 0.75rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.5rem; }
    /* Center logo in the middle cell */
    .navbar .logo { grid-column: 2; justify-self: center; }
    /* Place hamburger right */
    .hamburger { display: inline-flex; grid-column: 3; justify-self: end; align-items: center; }
    /* Mobile menu overlays content instead of changing navbar height */
    .nav-menu { position: fixed; top: var(--navbar-offset, 56px); left: 0; right: 0; z-index: 1001; width: 100vw; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; background: rgba(255,255,255,0.98); border-bottom: 1px solid rgba(8,29,89,0.08); box-shadow: 0 6px 18px rgba(0,0,0,0.06); padding: 1rem 0.5rem; max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-6px); transition: max-height 220ms ease, opacity 200ms ease, transform 200ms ease; }
    .nav-menu.open { max-height: 480px; opacity: 1; transform: translateY(0); }
    /* Stack nav-links and nav-actions vertically and center their children */
    .nav-links { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
    .nav-actions { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; width: 100%; }
    /* Reduce button sizes on mobile menu */
    .nav-actions .btn-contact-sales { padding: 0.4rem 0.75rem; font-size: 0.95rem; }
    .nav-actions .btn-icon { width: 2rem; height: 2rem; font-size: 0.95rem; }
    .nav-actions .theme-toggle-btn { margin: 0; }
    
    /* Mobile user dropdown - show items inline instead of popup */
    /* Note: .user-dropdown visibility is controlled by JS inline style */
    /* When JS removes display:none, this flex layout takes effect */
    .user-dropdown:not([style*="none"]) { 
        width: 100%; 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
    }
    .user-dropdown-trigger { display: none !important; } /* Hide the trigger button on mobile */
    .user-dropdown-menu { 
        position: static !important; 
        opacity: 1 !important; 
        visibility: visible !important; 
        transform: none !important; 
        width: 100%; 
        max-width: 280px;
        background: transparent !important; 
        border: none !important; 
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    .user-dropdown-menu .dropdown-item {
        justify-content: center;
        border: 2px solid var(--blue) !important;
        border-radius: 4px !important;
        background: var(--grey-bg) !important;
        color: var(--blue) !important;
        padding: 0.4rem 0.75rem;
        font-size: 0.95rem;
        width: auto;
        min-width: 140px;
    }
    .user-dropdown-menu .dropdown-item:hover {
        background: var(--blue) !important;
        color: var(--grey-bg) !important;
    }
    .user-dropdown-menu .dropdown-item-danger {
        border-color: #d32f2f !important;
        color: #d32f2f !important;
    }
    .user-dropdown-menu .dropdown-item-danger:hover {
        background: #d32f2f !important;
        color: #fff !important;
    }
    .user-dropdown-menu .dropdown-divider { display: none !important; }
}

/* Buttons */
/* Apply base button look to actual <button> elements and anchor-based CTAs */
button, .btn-try-demo, .btn-contact-sales { cursor: pointer; font-family: var(--app-font-stack); font-weight: 600; font-size: 1rem; padding: 0.5rem 1.5rem; border-radius: 4px; border-width: 2px; border-style: solid; transition: background-color 0.3s ease, color 0.3s ease; display: inline-block; text-decoration: none; }
.btn-contact-sales { border-color: var(--blue); background-color: var(--grey-bg); color: var(--blue); }
.btn-contact-sales:hover { background-color: var(--blue); color: var(--grey-bg); }
/* Icon-only button (Settings) - same height as text buttons */
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 2px solid var(--blue); border-radius: 4px; background-color: var(--grey-bg); color: var(--blue); font-size: 1rem; cursor: pointer; transition: background-color 0.3s ease, color 0.3s ease; text-decoration: none; }
.btn-icon:hover { background-color: var(--blue); color: var(--grey-bg); }

/* User dropdown menu */
.user-dropdown { position: relative; display: inline-block; }
.user-dropdown-trigger { gap: 0.25rem; width: auto; padding: 0 0.5rem; }
.user-dropdown-trigger .dropdown-caret { font-size: 0.7rem; margin-left: 0.15rem; }
.user-dropdown-menu { 
    position: absolute; 
    top: calc(100% + 0.5rem); 
    right: 0; 
    min-width: 180px; 
    background: #fff; 
    border: 1px solid rgba(8, 29, 89, 0.15); 
    border-radius: 8px; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
    opacity: 0; 
    visibility: hidden; 
    transform: translateY(-8px); 
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 1001;
}
.user-dropdown.open .user-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { 
    display: flex; 
    align-items: center; 
    gap: 0.6rem; 
    width: 100%; 
    padding: 0.65rem 1rem; 
    border: none; 
    background: transparent; 
    color: var(--blue); 
    font-size: 0.9rem; 
    font-weight: 500; 
    text-decoration: none; 
    cursor: pointer; 
    transition: background 0.15s;
    text-align: left;
    font-family: var(--app-font-stack);
}
.dropdown-item:first-child { border-radius: 8px 8px 0 0; }
.dropdown-item:last-child { border-radius: 0 0 8px 8px; }
.dropdown-item:hover { background: var(--grey-bg); }
.dropdown-item i { width: 1rem; text-align: center; opacity: 0.7; }
.dropdown-item-danger { color: #d32f2f; }
.dropdown-item-danger:hover { background: rgba(211, 47, 47, 0.08); }
.dropdown-divider { margin: 0.25rem 0; border: none; border-top: 1px solid rgba(8, 29, 89, 0.1); }

/* Dark mode dropdown styles */
html.dark-theme .user-dropdown-menu, .landing-dark .user-dropdown-menu { background: #0a1628; border-color: rgba(255, 255, 255, 0.1); }
html.dark-theme .dropdown-item, .landing-dark .dropdown-item { color: #fff; }
html.dark-theme .dropdown-item:hover, .landing-dark .dropdown-item:hover { background: rgba(255, 255, 255, 0.08); }
html.dark-theme .dropdown-item-danger, .landing-dark .dropdown-item-danger { color: #ff6b6b; }
html.dark-theme .dropdown-item-danger:hover, .landing-dark .dropdown-item-danger:hover { background: rgba(255, 107, 107, 0.1); }
html.dark-theme .dropdown-divider, .landing-dark .dropdown-divider { border-top-color: rgba(255, 255, 255, 0.1); }

/* Dark mode button styles */
html.dark-theme .btn-contact-sales, body.landing-dark .btn-contact-sales { border-color: #fff !important; background-color: transparent !important; color: #fff !important; }
html.dark-theme .btn-contact-sales:hover, body.landing-dark .btn-contact-sales:hover { background-color: #fff !important; color: var(--blue) !important; }
html.dark-theme .btn-icon, body.landing-dark .btn-icon { border-color: #fff !important; background-color: transparent !important; color: #fff !important; }
html.dark-theme .btn-icon:hover, body.landing-dark .btn-icon:hover { background-color: #fff !important; color: var(--blue) !important; }
html.dark-theme .user-dropdown-trigger, body.landing-dark .user-dropdown-trigger { border-color: #fff !important; background-color: transparent !important; color: #fff !important; }
html.dark-theme .user-dropdown-trigger:hover, body.landing-dark .user-dropdown-trigger:hover { background-color: #fff !important; color: var(--blue) !important; }

.btn-try-demo { border-color: var(--blue); background-color: var(--blue); color: var(--grey-bg); margin-top: 0.75rem; }
.btn-try-demo:hover { background-color: var(--grey-bg); color: var(--blue); }

/* Hero */
.hero-section {
    text-align: center;
    padding: 2rem 1rem;
    max-width: none;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - var(--navbar-offset, 56px));
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}
/* Mobile browsers with dynamic toolbars: prefer small viewport units when available */
@supports (height: 100svh) {
    .hero-section { height: calc(100svh - var(--navbar-offset, 56px)); }
}
.hero-text { font-size: 2.75rem; font-weight: 700; line-height: 1.2; margin-bottom: 0.4rem; }
.hero-text .blue { color: var(--blue); }
.hero-text .green { color: var(--green); }
.hero-image { max-width: 600px; width: 100%; height: auto; margin: 0 auto; border-radius: 10px; display: block; }
/* Subheadline under hero title */
.hero-subtext {
    margin: 0 auto 0;
    max-width: 60ch;
    color: var(--black);
    text-align: center;
    font-weight: 500;
    font-size: 1.15rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.5);
}
/* Make the hero typewriter text match the headline blue */
#heroTypewriter { color: var(--blue); }
/* Add a bit more space before the primary CTA under the subtext */
.hero-section .btn-try-demo { margin-top: 1.25rem; }
/* Typewriter effect */
.typewriter { position: relative; display: inline-block; min-height: 1.5em; }
.tw-caret { display: inline-block; width: 1px; height: 1.1em; background: currentColor; margin-left: 2px; vertical-align: -0.1em; animation: tw-blink 0.95s steps(1) infinite; opacity: 0.8; }
@keyframes tw-blink { 0%, 49% { opacity: 0.8; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .tw-caret { animation: none; }
}

/* Background video inside hero */
.hero-video-bg { position: absolute; top: calc(-1 * var(--navbar-offset, 56px)); left: 50%; width: 100vw; height: calc(100% + var(--navbar-offset, 56px)); transform: translateX(-50%); z-index: 0; overflow: hidden; border-radius: 0; pointer-events: none; background: url('/images/placeholderbg.webp') center/cover no-repeat; }
.hero-video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 260ms ease; }
.hero-video.is-ready { opacity: 1; }

/* Hero canvas animation - positioned behind content */
#heroCanvas {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Ensure hero content renders above the background layer */
.hero-section > *:not(.hero-video-bg):not(#heroCanvas) { position: relative; z-index: 1; }

/* Respect prefers-reduced-motion: show poster only */
@media (prefers-reduced-motion: reduce) {
    .hero-video { display: none; }
    /* Background image already applied above; keep it for reduced motion */
}

/* Features - structural styles (shared by light/dark themes)
   Note: Only structural/layout properties here. Color overrides go in landing-dark.css */
.features-section { 
    max-width: none;
    width: 100%;
    margin: 0; 
    padding: 2rem 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    height: calc(100vh - var(--navbar-offset, 56px));
}
@supports (height: 100svh) {
    .features-section { height: calc(100svh - var(--navbar-offset, 56px)); }
}
.section-heading { color: var(--blue); font-size: 2rem; font-weight: 700; margin-bottom: 2rem; text-align: center; }
.features-heading { color: var(--blue); font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; text-align: center; flex-shrink: 0; }
.features-subtitle { color: var(--be-grey); font-size: 1rem; text-align: center; margin-bottom: 1.5rem; max-width: 600px; margin-left: auto; margin-right: auto; flex-shrink: 0; }
.features-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 1rem; 
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    align-items: stretch;
}

/* Feature cards - base styles with animations */
.feature-card {
    background: var(--grey-bg);
    border: 1px solid rgba(8, 29, 89, 0.15);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    animation: cardFadeIn 0.6s ease-out backwards;
}

/* Staggered fade-in for feature cards */
.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.15s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.25s; }
.feature-card:nth-child(5) { animation-delay: 0.3s; }
.feature-card:nth-child(6) { animation-delay: 0.35s; }
.feature-card:nth-child(7) { animation-delay: 0.4s; }
.feature-card:nth-child(8) { animation-delay: 0.45s; }

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

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .feature-card {
        animation: none;
    }
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(8, 29, 89, 0.12);
    border-color: var(--blue);
}

.feature-card-highlight {
    border-color: var(--green);
    background: linear-gradient(135deg, rgba(98, 168, 124, 0.08) 0%, var(--grey-bg) 100%);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
    color: var(--green);
    background: linear-gradient(135deg, var(--blue) 0%, rgba(8, 29, 89, 0.6) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--grey-bg);
    stroke-width: 1.5;
}

.feature-text { text-align: left; }
.feature-header { color: var(--blue); font-weight: 700; font-size: 0.95rem; margin-bottom: 0.4rem; line-height: 1.3; }
.upload-manual-note { text-align: center; margin-top: 0.75rem; }
.upload-manual-note .manual-entry-link { color: var(--green); text-decoration: none; }
.upload-manual-note .manual-entry-link:hover { text-decoration: underline; }
.feature-body { color: var(--black); font-weight: 400; font-size: 0.8rem; line-height: 1.5; margin: 0; }
.feature-image { background-color: #d8d8d8; border-radius: 8px; height: 120px; display: flex; justify-content: center; align-items: center; color: #555; font-size: 1rem; user-select: none; }

/* Features/Brokers/FAQ responsive - Tablet: 2x4 grid */
@media (min-width: 769px) and (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .feature-card {
        padding: 1rem 0.75rem;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.5rem;
    }
    
    .feature-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .feature-header {
        font-size: 0.85rem;
    }
    
    .feature-body {
        font-size: 0.75rem;
    }
}

/* Mobile: vertical list layout with icons on left */
@media (max-width: 768px) {
    /* Stack sections naturally on mobile */
    .features-section,
    .faq-section,
    .pricing-section {
        height: auto;
        min-height: 0;
        overflow: visible;
        padding: 2rem 1rem;
        justify-content: flex-start;
        position: relative;
        z-index: 1;
    }
    
    /* Brokers section needs extra bottom padding for button */
    .brokers-section {
        height: auto;
        min-height: 0;
        overflow: visible;
        padding: 2rem 1rem 3rem;
        justify-content: flex-start;
        position: relative;
        z-index: 1;
    }
    
    /* Single column grid on mobile with spacing */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        max-width: 100%;
    }
    
    /* Horizontal card layout: icon left, text right */
    .feature-card {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    
    .feature-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        margin-bottom: 0;
        border-radius: 8px;
        flex-shrink: 0;
    }
    
    .feature-icon svg {
        width: 16px;
        height: 16px;
    }
    
    /* Text container for header and body */
    .feature-card .feature-header,
    .feature-card .feature-body {
        text-align: left;
    }
    
    .features-heading,
    .features-section .section-heading {
        font-size: 1.5rem;
    }
    
    .features-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .feature-header {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    /* Hide feature descriptions on mobile */
    .feature-body {
        display: none;
    }
    
    /* Show all feature cards on mobile (previously hid some to save space) */
    
    /* Hide "Popular" badge on mobile to save space */
    .feature-card-highlight::after {
        display: none;
    }
    
    /* Reduce scroll offset on mobile */
    #features,
    #supported-brokers,
    #faqs {
        scroll-margin-top: 56px;
    }
    
    /* Brokers section mobile */
    .brokers-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .brokers-section .section-heading {
        font-size: 1.5rem;
    }
    
    .brokers-subtitle {
        font-size: 0.875rem;
    }
    
    /* Unified broker card mobile - stack vertically */
    .broker-unified-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .broker-section-featured,
    .broker-section-props {
        text-align: center;
    }
    
    .broker-divider {
        width: 100%;
        height: 1px;
    }
    
    .broker-list-direct {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .broker-list-props {
        justify-content: center;
    }
    
    /* Brokers CTA mobile - ensure button is fully visible */
    .brokers-cta {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.5rem;
    }
    
    .btn-get-started {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
    
    .brokers-upload-note {
        margin-top: 1rem;
        font-size: 0.7rem;
        padding: 0.4rem 0.5rem;
        gap: 0.5rem;
    }
    
    /* Hide icon in upload note on mobile */
    .brokers-upload-note i {
        display: none;
    }
    
    /* FAQ section mobile */
    .faq-section .section-heading {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .faq-list {
        max-width: 100%;
    }
    
    .faq-question {
        padding: 0.875rem;
        font-size: 0.875rem;
    }
    
    .faq-answer-content {
        padding: 0.875rem;
        font-size: 0.8rem;
    }
}

/* Dashboard feature image overrides */
.feature-image.dashboard-feature { background: transparent; height: auto; padding: 0; }
.feature-image.dashboard-feature img { width: 100%; height: auto; display: block; border-radius: 8px; object-fit: cover; }
/* Equity chart feature image overrides */
.feature-image.equity-feature { background: transparent; height: auto; padding: 0; }
.feature-image.equity-feature img { width: 100%; height: auto; display: block; border-radius: 8px; object-fit: cover; }
/* Calendar feature image overrides */
.feature-image.calendar-feature { background: transparent; height: auto; padding: 0; }
.feature-image.calendar-feature img { width: 100%; height: auto; display: block; border-radius: 8px; object-fit: cover; }
/* Trade details feature image overrides */
.feature-image.trades-feature { background: transparent; height: auto; padding: 0; }
.feature-image.trades-feature img { width: 100%; height: auto; display: block; border-radius: 8px; object-fit: cover; }
/* Accurate order matching feature image */
.feature-image.matching-feature { background: transparent; height: auto; padding: 0; }
.feature-image.matching-feature img { width: 100%; height: auto; display: block; border-radius: 8px; object-fit: cover; }
/* Unified blue border for feature images */
.feature-image.dashboard-feature img,
.feature-image.equity-feature img,
.feature-image.calendar-feature img,
.feature-image.trades-feature img,
.feature-image.matching-feature img,
.feature-image.journal-feature img {
    border: 2px solid var(--blue);
    box-sizing: border-box;
}
/* Trade journal (beta) feature image */
.feature-image.journal-feature { background: transparent; height: auto; padding: 0; }
.feature-image.journal-feature img { width: 100%; height: auto; display: block; border-radius: 8px; object-fit: cover; }
/* Report demo image */
.report-demo-image { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.placeholder-panel { position: relative; overflow: hidden; border-radius: 8px; }
@media (max-width: 768px) {
    .feature-image.dashboard-feature img { max-width: 100%; }
}

/* Use cases (For partners) */
.use-cases-section { max-width: 900px; margin: 0 auto 2.5rem; padding: 0 1rem; }
.use-cases-grid { display: grid; grid-template-columns: 100px 1fr; row-gap: 30px; column-gap: 40px; align-items: center; }
.use-case-row { display: contents; }
.use-case-image { display: flex; justify-content: center; align-items: center; }
.placeholder-square { width: 80px; height: 80px; background-color: var(--grey-bg, #ffffff); border: 2px solid var(--blue, #081d59); border-radius: 8px; }
.use-case-text h3 { margin: 0 0 8px 0; font-family: var(--app-font-stack); font-weight: 700; font-size: 1.25rem; }
.use-case-text p { margin: 0; font-family: var(--app-font-stack); color: var(--black, #000); font-weight: 400; line-height: 1.4; }
@media (max-width: 768px) {
    .use-cases-grid { display: flex; flex-direction: column; gap: 30px; }
    .use-case-row { display: flex; flex-direction: column; align-items: center; text-align: center; }
    .use-case-image { order: -1; margin-bottom: 12px; }
    .use-case-text h3, .use-case-text p { text-align: center; }
}

/* =============================================
   Pricing Section - Structural Styles
   ============================================= */
.pricing-section {
    padding: 3rem 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(8, 29, 89, 0.02) 0%, rgba(8, 29, 89, 0.06) 100%);
    border-radius: 0;
    border-top: 1px solid rgba(8, 29, 89, 0.1);
    border-bottom: 1px solid rgba(8, 29, 89, 0.1);
    margin: 0;
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    gap: 1rem;
    min-height: calc(100vh - var(--navbar-offset, 56px));
}

@supports (min-height: 100svh) {
    .pricing-section { min-height: calc(100svh - var(--navbar-offset, 56px)); }
}

.pricing-section .section-heading {
    margin-bottom: 0.25rem;
    font-size: 1.75rem;
    color: var(--blue, #081d59);
}

.pricing-subtitle {
    color: var(--black, #333);
    opacity: 0.7;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 500px;
}

.pricing-cards {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 850px;
    width: 100%;
}

.pricing-card {
    flex: 1 1 300px;
    max-width: 380px;
    min-width: 280px;
    background: var(--grey-bg, #ffffff);
    border: 2px solid rgba(8, 29, 89, 0.12);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(8, 29, 89, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(8, 29, 89, 0.12);
}

.pricing-card-trial {
    border-color: var(--green, #62a87c);
    box-shadow: 0 4px 24px rgba(98, 168, 124, 0.15);
}

.pricing-card-trial:hover {
    box-shadow: 0 8px 36px rgba(98, 168, 124, 0.2);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green, #62a87c);
    color: #ffffff;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.pricing-badge.pro {
    background: var(--blue, #081d59);
}

.pricing-title {
    color: var(--black, #333);
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0.75rem 0 1rem;
}

.pricing-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.pricing-currency {
    font-size: 1.25rem;
    color: var(--black, #333);
    opacity: 0.6;
}

.pricing-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--black, #333);
    line-height: 1;
}

.pricing-vat {
    font-size: 0.8rem;
    color: var(--black, #333);
    opacity: 0.5;
}

.pricing-period {
    color: var(--black, #333);
    opacity: 0.6;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    text-align: left;
}

.pricing-features li {
    color: var(--black, #333);
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(8, 29, 89, 0.06);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li i {
    color: var(--green, #62a87c);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.btn-pricing {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    font-family: var(--app-font-stack);
}

.btn-pricing-trial {
    background: var(--green, #62a87c);
    color: #ffffff;
    border-color: var(--green, #62a87c);
}

.btn-pricing-trial:hover {
    background: #4a9066;
    border-color: #4a9066;
    transform: scale(1.02);
}

.btn-pricing-pro {
    background: transparent;
    color: var(--blue, #081d59);
    border-color: var(--blue, #081d59);
}

.btn-pricing-pro:hover {
    background: var(--blue, #081d59);
    color: #ffffff;
}

.pricing-note {
    color: var(--black, #333);
    opacity: 0.5;
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

.pricing-guarantee {
    color: var(--black, #333);
    opacity: 0.6;
    font-size: 0.85rem;
    margin-top: 2rem;
    text-align: center;
    max-width: 450px;
    line-height: 1.5;
}

.pricing-guarantee i {
    color: var(--green, #62a87c);
    margin-right: 0.5rem;
}

/* Pricing Section - Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .pricing-section {
        padding: 2.5rem 1.25rem;
    }
    
    .pricing-cards {
        gap: 1.25rem;
    }
    
    .pricing-card {
        padding: 1.5rem 1.25rem;
    }
    
    .pricing-value {
        font-size: 3rem;
    }
}

/* Pricing Section - Mobile */
@media (max-width: 768px) {
    .pricing-section {
        height: auto;
        min-height: 0;
        overflow: visible;
        padding: 2rem 1rem 3rem;
        justify-content: flex-start;
        position: relative;
        z-index: 1;
    }
    
    .pricing-section .section-heading {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .pricing-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }
    
    .pricing-cards {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 100%;
    }
    
    .pricing-card {
        max-width: 100%;
        width: 100%;
        padding: 1.5rem 1.25rem;
    }
    
    .pricing-value {
        font-size: 2.75rem;
    }
    
    .pricing-features li {
        font-size: 0.85rem;
        padding: 0.4rem 0;
    }
    
    .btn-pricing {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .pricing-guarantee {
        font-size: 0.8rem;
        padding: 0 0.5rem;
    }
}

/* Pricing Section - Small Mobile */
@media (max-width: 480px) {
    .pricing-section {
        padding: 1.5rem 0.75rem 2.5rem;
    }
    
    .pricing-card {
        padding: 1.25rem 1rem;
    }
    
    .pricing-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.75rem;
    }
    
    .pricing-title {
        font-size: 1.25rem;
    }
    
    .pricing-value {
        font-size: 2.5rem;
    }
}

/* FAQ */
.faq-section {
    background: var(--grey-bg);
    padding: 2rem 1.5rem 4rem;
    max-width: none;
    width: 100%;
    height: calc(100vh - var(--navbar-offset, 56px));
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

@supports (height: 100svh) {
    .faq-section {
        height: calc(100svh - var(--navbar-offset, 56px));
    }
}

.faq-section .section-heading {
    color: var(--blue);
    text-align: center;
}

.faq-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 800px;
}

.faq-item { margin-bottom: 1rem; border: 2px solid var(--blue); border-radius: 8px; overflow: hidden; background: #fff; }
.faq-question { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem; background-color: transparent; cursor: pointer; font-weight: 600; color: var(--blue); transition: background-color 0.3s ease; }
.faq-question:hover { background-color: rgba(8, 29, 89, 0.05); }
.faq-toggle { width: 24px; height: 24px; position: relative; margin-left: 1rem; }
.faq-toggle::before, .faq-toggle::after { content: ''; position: absolute; background-color: var(--blue); transition: transform 0.3s ease; }
.faq-toggle::before { width: 2px; height: 16px; left: 11px; top: 4px; }
.faq-toggle::after { width: 16px; height: 2px; left: 4px; top: 11px; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; background-color: transparent; }
.faq-answer-content { padding: 1.25rem; color: var(--black); }
.faq-item.active .faq-question { background-color: rgba(8, 29, 89, 0.05); }
.faq-item.active .faq-toggle::before { transform: rotate(90deg); }
.faq-item.active .faq-answer { max-height: 500px; }
.faq-link { color: var(--blue); text-decoration: none; border-bottom: 1px solid var(--blue); transition: border-bottom-color 0.3s ease; }
.faq-link:hover { border-bottom-color: transparent; }

/* Generate Report */
.generate-section { max-width: 900px; margin: 2rem auto 4rem; padding: 0 1rem; }
.generate-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
.generate-grid .upload-instructions { grid-column: 1 / -1; text-align: center; }
.placeholder-panel { width: 100%; background-color: white; border-radius: 8px; border: 2px solid var(--blue); padding: 0; display: flex; align-items: center; justify-content: center; color: #555; font-weight: 600; min-height: 160px; overflow: hidden; }
.upload-instructions { color: var(--black); line-height: 1.6; }
.upload-instructions a { color: var(--blue); text-decoration: none; border-bottom: 1px solid var(--blue); transition: border-bottom-color 0.3s ease; }
/* Do not underline or add borders to linked provider logos */
.upload-instructions .provider-logo-link,
.upload-instructions .provider-logo-link:hover,
.upload-instructions .provider-logo-link:focus { border-bottom: none !important; text-decoration: none !important; }
.upload-instructions a:hover { border-bottom-color: transparent; }
.supported-note { margin: 0.25rem 0 0.5rem; color: var(--blue); font-weight: 700; }
.upload-help-note { margin: 0.75rem 0 0; color: var(--black); }
.provider-logos { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 1.25rem; }
.provider-logo { height: 28px; width: auto; object-fit: contain; filter: none; }
/* Ensure linked provider logos keep appearance and layout */
.provider-logo-link { display: inline-block; line-height: 0; text-decoration: none; }
.provider-logo-link:hover, .provider-logo-link:focus { text-decoration: none; }
@media (max-width: 768px) { .provider-logo { height: 24px; } }
@media (min-width: 769px) {
    .provider-logos { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; }
    .provider-logos .provider-logo { order: 1; }
    /* Place the help note below the row of logos */
    .provider-logos .upload-help-note { order: 2; flex-basis: 100%; text-align: center; margin-top: 0.75rem; }
}
.upload-widget { width: 100%; background-color: var(--grey-bg); padding: 0.75rem; border-radius: 8px; border: 2px solid var(--blue); display: flex; flex-direction: column; justify-content: space-between; }
    /* dropzone hover/drag-over rule kept below; remove upload-widget-level background to avoid duplicate highlights */
.file-input-wrapper { display: flex; flex-direction: column; align-items: center; margin-bottom: 0.5rem; text-align: center; flex: 1; }
.dropzone { width: 100%; padding: 0.5rem; margin-bottom: 0.5rem; border: none; border-radius: 8px; cursor: pointer; transition: background-color 0.3s ease; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; flex: 1; min-height: auto; background-color: rgba(8, 29, 89, 0.05); }
.dropzone:hover, .dropzone.drag-over { background-color: rgba(8, 29, 89, 0.08); }
.upload-image { width: 60px; height: auto; margin-bottom: 0.125rem; }
.file-status { margin: 0; color: var(--black); font-family: var(--app-font-stack); }
.file-input { display: none; }
.file-input-button { padding: 0.5rem 1.5rem; border: 2px solid var(--blue); border-radius: 4px; cursor: pointer; font-family: var(--app-font-stack); font-weight: 600; font-size: 1rem; background-color: var(--grey-bg); color: var(--blue); transition: all 0.3s ease; white-space: nowrap; }
#submit_btn {
    height: 48px;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    border-radius: 4px;
}
.file-input-button:hover { background-color: var(--blue); color: var(--grey-bg); }
.checkbox-group { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.checkbox-wrapper { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-wrapper input[type="checkbox"] { -webkit-appearance: none; -moz-appearance: none; appearance: none; width: 20px; height: 20px; background-color: var(--grey-bg); border: 2px solid var(--blue); border-radius: 0; cursor: pointer; position: relative; margin: 0; }
.checkbox-wrapper input[type="checkbox"]:checked::before { content: '✓'; position: absolute; color: var(--blue); font-size: 16px; line-height: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.checkbox-wrapper label { color: var(--black); cursor: pointer; }
/* Keep disabled appearance consistent for in-zone Generate button */
#submit_btn { display: block; margin: 0.5rem auto 0; }
#submit_btn:not(:disabled) { background-color: #0C1C55; border-color: #0C1C55; color: var(--grey-bg); }
#submit_btn:disabled { background-color: #bdbdbd !important; color: #ffffff !important; cursor: not-allowed; opacity: 0.8; border-color: #bdbdbd !important; }

/* Footer section (class-based) */
.footer-section { padding: 1rem 0; margin-top: 1rem; width: 100%; }
.footer-links { display: flex; justify-content: center; align-items: center; gap: 2rem; flex-wrap: wrap; }
.footer-link { color: var(--blue); text-decoration: none; font-weight: 600; font-size: 1rem; transition: color 0.3s ease; }
.footer-link:hover { color: #4a6cc3; }

/* Supported Brokers Section - structural styles (shared by light/dark themes)
   Note: Only structural/layout properties here. Color overrides go in landing-dark.css */
.brokers-section {
    padding: 3rem 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(8, 29, 89, 0.02) 0%, rgba(8, 29, 89, 0.05) 100%);
    border-radius: 0;
    border-top: 1px solid rgba(8, 29, 89, 0.1);
    border-bottom: 1px solid rgba(8, 29, 89, 0.1);
    margin: 0;
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    gap: 1rem;
    height: calc(100vh - var(--navbar-offset, 56px));
}
@supports (height: 100svh) {
    .brokers-section { height: calc(100svh - var(--navbar-offset, 56px)); }
}

.brokers-section .section-heading {
    margin-bottom: 0.25rem;
    font-size: 1.75rem;
}

.brokers-subtitle {
    color: var(--black);
    opacity: 0.7;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.brokers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
}

.broker-group {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(8, 29, 89, 0.08);
}

.broker-group-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(8, 29, 89, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rithmic-badge {
    height: 18px;
    width: auto;
    opacity: 0.8;
}

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

.broker-list-rithmic {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 0.75rem;
}

.broker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.broker-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.broker-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
}

.broker-logo-large {
    height: 36px;
}

.broker-list-direct {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.broker-name {
    font-size: 0.9rem;
    color: var(--black);
    font-weight: 500;
}

.broker-list-rithmic .broker-name {
    font-size: 0.85rem;
    font-weight: 400;
}

.brokers-upload-note {
    margin-top: 0;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(8, 29, 89, 0.05);
    border: 1px solid rgba(8, 29, 89, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--black);
}

.brokers-upload-note i {
    color: var(--blue);
    font-size: 1rem;
}

.brokers-upload-note a {
    color: var(--blue);
    text-decoration: underline;
}

/* Desktop/mobile text toggle for upload note */
.upload-note-desktop { display: inline; }
.upload-note-mobile { display: none; }

@media (max-width: 768px) {
    .upload-note-desktop { display: none; }
    .upload-note-mobile { display: inline; }
}

/* Brokers CTA */
.brokers-cta {
    margin-top: 0;
    text-align: center;
}

.btn-get-started {
    display: inline-block;
    padding: 0.875rem 2.5rem;
    background-color: var(--blue, #081d59);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--app-font-stack);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.btn-get-started:hover {
    background-color: #0a2470;
    transform: translateY(-1px);
}

.brokers-cta-note {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--black);
    opacity: 0.6;
}

/* Brokers card - centered card layout for light mode */
.brokers-card {
    background: var(--grey-bg);
    border: 1px solid rgba(8, 29, 89, 0.12);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    max-width: 700px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 16px rgba(8, 29, 89, 0.08);
}

.integrations-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.integration-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(8, 29, 89, 0.1) 0%, rgba(8, 29, 89, 0.05) 100%);
    border: 1px solid var(--blue);
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    color: var(--blue);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.integration-badge:hover {
    background: var(--blue);
    color: var(--grey-bg);
    transform: translateY(-2px);
}

.brokers-card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(8, 29, 89, 0.15), transparent);
    margin: 0.75rem 0;
}

.prop-firms-label {
    color: var(--be-grey);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.prop-firms-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
}

.prop-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    color: var(--be-grey);
    background: rgba(8, 29, 89, 0.06);
    border: 1px solid rgba(8, 29, 89, 0.15);
    border-radius: 1rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.prop-tag:hover {
    color: var(--blue);
    background: rgba(8, 29, 89, 0.12);
    border-color: var(--blue);
}

/* Mobile: Stack broker groups vertically - broker card specific */
@media (max-width: 768px) {
    .brokers-card {
        padding: 1.25rem 1rem;
    }

    .integrations-row {
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .brokers-card-divider {
        margin: 0.75rem 0;
    }
    
    .prop-firms-label {
        margin-bottom: 0.5rem;
    }
    
    .prop-firms-row {
        margin-top: 0.25rem;
    }

    .integration-badge {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .broker-list-direct {
        flex-direction: column;
        gap: 1rem;
    }

    .broker-logo-large {
        height: 32px;
    }

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

    .brokers-upload-note {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .broker-list-rithmic {
        grid-template-columns: 1fr;
    }
}

/* Hide legacy site-wide login link; dashboard will render scoped links */
.site-login-link { display: none !important; }

/* Dashboard-only Tradovate/NinjaTrader login links (under Trade entry title) */
.tv-login-links { display:flex; align-items:center; justify-content:center; gap:8px; margin: 4px 0 8px; font-family: var(--app-font-stack); }
.tv-login-label { color:#445; opacity:0.85; font-size:0.95rem; }
.tv-login-a { color:#0a5bd8; text-decoration: underline; font-weight:600; }
.tv-login-a:hover { color:#0849ad; text-decoration: underline; }
.tv-login-sep { color:#99a; }

/* Button look for Live/Demo links (purely aesthetic; remains anchors) */
.tv-login-btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--blue);
    border-radius: 4px;
    background-color: var(--grey-bg);
    color: var(--blue) !important;
    text-decoration: none !important;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.tv-login-btn:hover {
    background-color: var(--blue);
    color: var(--grey-bg) !important;
}

/* Mobile: stack Auto-sync elements vertically */
@media (max-width: 768px) {
    .tv-login-links { flex-direction: column; gap: 10px; }
    .tv-login-sep { display: none; }
    .tv-login-btn { width: 100%; max-width: 320px; text-align: center; }
}

/* Auto-sync provider logos above buttons */
.sync-logos { display:flex; align-items:center; justify-content:center; gap: 16px; margin: 6px 0 8px; }
.sync-logo { height: 28px; width: auto; object-fit: contain; filter: none; }
@media (max-width: 480px) { .sync-logo { height: 24px; } }

/* Widget Grid (dashboard cards) */
.widget-grid { display: grid; grid-template-columns: repeat(3, 360px); grid-auto-rows: auto; gap: 1rem; align-items: start; justify-content: center; margin-bottom: 2rem; }
.widget-card { width: 360px; height: 360px; box-sizing: border-box; }
.widget-card.wide { grid-column: 1 / -1; width: 100%; height: auto; }
.spider-container { position: relative; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; background: #fff; border: 1px solid rgba(8,29,89,0.15); border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,0.06); overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 0.5rem; padding-top: 60px; box-sizing: border-box; }
/* Allow overflow for dropdowns specifically inside the Trade entry card (dashboard) */
#tradeEntryWidget.spider-container { overflow: visible; }
#tradeEntryWidget .widget-content { overflow: visible; }
.spider-canvas, .pie-canvas { width: 100%; height: 100%; display: block; }
.widget-heading { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); color: var(--blue); font-size: 2rem; font-weight: 700; background: rgba(255,255,255,0.9); padding: 2px 8px; border-radius: 8px; z-index: 24; text-align: center; white-space: nowrap; font-family: "Sen", sans-serif; }
.stats-widget { position: relative; width: 100%; height: 100%; max-width: none; background: #fff; border: 1px solid rgba(8,29,89,0.15); border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,0.06); padding: 0.75rem; box-sizing: border-box; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.stats-content { display: grid; grid-template-columns: auto auto; row-gap: 0.5rem; column-gap: 0.25rem; align-items: center; justify-content: center; }
.stat-label { color: var(--blue); font-weight: 700; }
.stats-content .stat-label::after { content: ":\00a0"; }
.stat-value { color: var(--blue); font-weight: 800; text-align: center; }
#overallWidget .stat-value.pos { color: var(--green); }
#overallWidget .stat-value.neg { color: var(--red); }
#spiderWidget .widget-content, #wlbeWidget .widget-content, #equityWidget .widget-content { margin-top: 60px; height: calc(100% - 60px); box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
#equityWidget .widget-content { margin-top: 60px; height: calc(100% - 60px); padding: 12px 16px 12px; display: flex; flex-direction: column; align-items: stretch; }
#equityWidget #chart_container { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; width: 100%; }
#equityWidget .widget-content.empty-mode { justify-content: center; align-items: center; }
#equityWidget .widget-content.empty-mode #chart_container { display: none !important; }
#equityWidget .chart-x-label { text-align: center; margin-top: 6px; font-family: var(--app-font-stack); font-weight: 600; font-size: 12px; color: #081d59; }
#spiderWidget.spider-container, #wlbeWidget.spider-container, #equityWidget.spider-container, #calendarWidget.spider-container { display: block; align-items: stretch; justify-content: stretch; padding-top: 0; }
#equityWidget.spider-container { min-height: 360px; }

/* Center empty-state text in widgets */
.spider-container .widget-content .empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
    padding: 8px 12px;
    color: var(--black);
    line-height: 1.3;
}
/* Equity widget uses column layout; ensure the message centers across axis too */
#equityWidget .widget-content .empty-state { align-self: center; }
/* Equity widget: absolutely center the empty-state in the card */
#equityWidget.spider-container { position: relative; }
#equityWidget.spider-container .empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
}

/* Utility */
.blue { color: #081d59; }
/* Auth modal (login/register) styles - Improved */
.auth-modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(0,0,0,0.5); 
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-modal-box {
    position: relative;
    z-index: 10000;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 280px;
    width: min(92vw, 400px);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.75rem;
}

/* Tab Navigation */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    background: #f0f0f0;
    padding: 3px;
}

.auth-tab {
    flex: 1;
    padding: 0.65rem 1rem;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.auth-tab:hover {
    color: #333;
}

.auth-tab.active {
    background: var(--blue, #081d59);
    color: #fff;
}

/* Field Container */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.auth-field-error {
    font-size: 0.8rem;
    color: #d33e43;
    min-height: 1.1rem;
}

/* Input Styling */
.auth-modal-box input[type="email"],
.auth-modal-box input[type="password"],
.auth-modal-box input[type="text"] {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #333;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.auth-modal-box input::placeholder {
    color: #999;
}

.auth-modal-box input:focus {
    outline: none;
    border-color: var(--blue, #081d59);
    box-shadow: 0 0 0 3px rgba(8, 29, 89, 0.1);
}

/* Password Wrapper */
.auth-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-password-wrapper input {
    padding-right: 3rem;
}

.auth-password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.auth-password-toggle:hover {
    color: var(--blue, #081d59);
}

/* Password Strength */
.auth-password-strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: -0.25rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 2px;
}

.strength-label {
    font-size: 0.75rem;
    color: #666;
    min-width: 60px;
    text-align: right;
}

/* Options Row */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin: 0.25rem 0;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    cursor: pointer;
}

.auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--blue, #081d59);
    cursor: pointer;
}

.auth-forgot {
    color: var(--blue, #081d59);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-forgot:hover {
    text-decoration: underline;
}

/* Error Message */
.auth-error {
    display: none;
    font-size: 0.9rem;
    color: #d33e43;
    text-align: center;
    padding: 0.75rem;
    background: rgba(211, 62, 67, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(211, 62, 67, 0.2);
}

/* Submit Button */
.auth-submit {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: var(--blue, #081d59);
    border: 2px solid var(--blue, #081d59);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.auth-submit:hover:not(:disabled) {
    background: transparent;
    color: var(--blue, #081d59);
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-submit-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Cancel Button */
.auth-cancel {
    width: 100%;
    padding: 0.7rem 1rem;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-cancel:hover {
    border-color: #999;
    color: #333;
}

/* Success State */
.auth-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1rem 0;
}

.auth-success h3 {
    color: #333;
    font-size: 1.25rem;
    margin: 0;
}

.auth-success p {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
}

.auth-success-note {
    font-size: 0.85rem !important;
    opacity: 0.8;
}

/* Legacy styles for compatibility */
.auth-modal-error { overflow-wrap: anywhere; word-break: break-word; white-space: normal; max-width: 100%; }
.auth-modal-title { margin: 0 0 0.25em 0; font-size: 1.25em; font-weight: 700; color: var(--blue, #081d59); text-align: center; }
.auth-modal-box input { position: relative; z-index: 2; }
.empty-dashboard-notice {
        margin: 0 0 16px 0;
        padding: 14px 16px;
        border: 1px solid rgba(8,29,89,0.18);
        border-left-width: 4px;
        border-left-color: #0b4cc2; /* brand-ish blue */
        border-radius: 10px;
        background: #f8fafc;
        color: #0f172a;
        font-size: 15px;
}
.empty-dashboard-notice .edn-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.empty-dashboard-notice i { color: #0b4cc2; font-size: 18px; }
.empty-dashboard-notice .edn-text { flex: 1 1 auto; min-width: 220px; }
.empty-dashboard-notice .edn-link { color: #0b4cc2; text-decoration: underline; font-weight: 700; }
.empty-dashboard-notice .edn-link:hover { color: #0837a8; }

/* Auto-sync note: center and shrink to content */
.auto-sync-note { display: inline-block; width: auto; max-width: 100%; align-self: center; }
.auto-sync-note .edn-text { flex: 0 1 auto; min-width: 0; }

/* Auto-sync section layout: equally spaced, centered items */
.auto-sync-content { gap: 12px; padding-top: 12px; }
.auto-sync-content .sync-logos,
.auto-sync-content .tv-login-links,
.auto-sync-content .auto-sync-note { margin: 0; }

@media (max-width: 768px) {
    .empty-dashboard-notice { font-size: 14px; padding: 12px 14px; border-radius: 8px; }
    .empty-dashboard-notice i { font-size: 16px; }
}

/* Mobile: center the Auto-sync info note icon and text */
@media (max-width: 768px) {
    .auto-sync-note .edn-row { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
    .auto-sync-note .edn-text { text-align: center; min-width: 0; }
}

/* Responsive merges */
@media (max-width: 768px) {
    /* Mobile: normalize empty-state line wrapping across cards */
    .spider-container .widget-content .empty-state { max-width: 280px; margin: 0 auto; }
    /* Equity: absolute center with consistent width on mobile */
    #equityWidget.spider-container .empty-state { left: 0; right: 0; transform: translateY(-50%); width: 100%; max-width: 280px; margin: 0 auto; }
    /* Mobile header tweaks */
    .site-header { padding: 1.5rem; flex-direction: row; justify-content: flex-start; align-items: center; }
    /* Legacy: hide old header CTA on mobile; do not affect navbar actions */
    header.site-header .btn-contact-sales.header-contact-sales { display: none; }
    .btn-contact-sales.mobile-contact-sales { display: inline-block; margin: 1.5rem auto 0; border-color: var(--blue); background-color: var(--grey-bg); color: var(--blue); }
    .btn-contact-sales.mobile-contact-sales:hover { background-color: var(--blue); color: var(--grey-bg); }
    /* Stack hero CTAs vertically on mobile */
    .hero-section .btn-try-demo,
    .hero-section .btn-contact-sales.mobile-contact-sales { display: block; margin-left: auto; margin-right: auto; }
    .hero-section .btn-contact-sales.mobile-contact-sales { margin-top: 0.75rem; }
    /* Reserve space for up to two lines of typed text */
    #heroTypewriter.typewriter { min-height: 3.2em; }
    /* Equalize spacing: control via subtext margins only */
    .hero-text { margin-bottom: 0; }
    .hero-subtext { margin: 1.25rem auto; }
    .hero-section .btn-try-demo { margin-top: 0; }

    /* Partners page: hide the mobile-specific 'Become a partner' CTA on mobile */
    body.partners-page .btn-contact-sales.mobile-contact-sales { display: none !important; }

    /* Features */
    .features-grid { display: flex; flex-direction: column; gap: 0.75rem; }
        .feature-text { text-align: center; margin-bottom: 1rem; }
        /* Make feature placeholder images match Generate placeholder width on mobile */
        .feature-image { margin: 0 auto 1rem; height: auto; width: 100%; max-width: none; box-sizing: border-box; }
        .feature-image img { width: 100%; height: auto; display: block; }

    /* Tighter container gutters on tablet/mobile to reduce left/right spacing */
    .container { padding: 0 0.75rem; }

    /* Generate */
    .generate-grid { grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
    .upload-instructions { text-align: center; }
    /* Mobile: fix panel height and make image fill it to remove vertical gaps */
    .placeholder-panel { min-height: 0; height: auto; aspect-ratio: auto; display: flex; align-items: center; justify-content: center; padding: 0; overflow: visible; }
    .report-demo-image { width: 100%; height: auto; object-fit: contain; margin: 0; display: block; }

    /* Mobile: make Generate section panels match FAQ dropdown widths
       FAQ items live inside a .container (padding: 0 1rem). Ensure the
       placeholder and upload widget use the same effective width and
       center themselves. Also make the dropzone and file-wrapper fill
       that width for consistent alignment with FAQ dropdowns. */
    .generate-section .placeholder-panel,
    .generate-section .upload-widget {
        width: 100%;
        max-width: 100%; /* allow panels to span the container's inner width */
        margin: 0 auto;
        box-sizing: border-box;
    }

    .generate-section .upload-widget .file-input-wrapper,
    .generate-section .upload-widget .file-input-wrapper .dropzone,
    .generate-section .drag-drop-box {
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }

    /* Footer links */
    .footer-links { gap: 1.5rem; }
    .footer-link { font-size: 0.9rem; }

    /* Widgets */
    .widget-grid { grid-template-columns: 300px; grid-auto-rows: auto; gap: 0.75rem; }
    .widget-card { width: 300px; height: 300px; }
    .widget-heading { font-size: 1rem; }
    /* Ensure calendar heading follows mobile sizing like other cards */
    #calendarWidget .widget-heading { font-size: 1rem; }
    .spider-container { padding-top: 36px; }
    #equityWidget.spider-container { min-height: 300px; }
    #spiderWidget .widget-content, #wlbeWidget .widget-content, #equityWidget .widget-content { margin-top: 36px; height: calc(100% - 36px); }
    #equityWidget .widget-content { margin-top: 36px; height: calc(100% - 36px); padding: 12px 12px 12px; display: flex; flex-direction: column; align-items: stretch; }
    #equityWidget #chart_container { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; width: 100%; }
    #equityWidget .widget-content.empty-mode { justify-content: center; align-items: center; }
    #equityWidget .chart-x-label { margin-top: 6px; font-size: 11px; }
}

@media (min-width: 769px) {
    /* Desktop widget tweaks */
    .spider-container { padding: 0.05rem; padding-top: 60px; }
    #overallWidget .stat-label { font-size: 1.05rem; }
    #overallWidget .stat-value { font-size: 1.2rem; }
    #spiderWidget.spider-container, #wlbeWidget.spider-container, #equityWidget.spider-container { padding-top: 0; }
    #spiderWidget .widget-content, #wlbeWidget .widget-content, #equityWidget .widget-content { margin-top: 40px; height: calc(100% - 40px); }
    #equityWidget .widget-content { margin-top: 40px; height: calc(100% - 40px); padding: 16px 20px 16px; display: flex; flex-direction: column; align-items: stretch; }
    #equityWidget #chart_container { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; width: 100%; }
    #equityWidget .widget-content.empty-mode { justify-content: center; align-items: center; }
    #calendarWidget .widget-content { margin-top: 20px; height: calc(100% - 20px); padding: 16px 20px 16px; box-sizing: border-box; }
    #equityWidget .chart-x-label { margin-top: 8px; }

    /* Desktop: split upload widget into two columns (file selector left, controls right) */
    .upload-widget { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; position: relative; }
    /* Provide more space at the bottom for the Generate report button */
    .upload-widget { padding-bottom: 1.5rem; }
    /* Left column: vertical stack centered in the column */
    /* Left column: make the wrapper span the full first grid column so hover fills the column */
    .upload-widget { align-items: stretch; }
    .upload-widget .file-input-wrapper { grid-column: 1; position: absolute; top: 0; bottom: 0; left: 0; right: calc(50% + 0.5rem); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0.5rem; gap: 0.25rem; box-sizing: border-box; z-index: 1; margin-bottom: 0; }
    .upload-widget .file-input-wrapper .dropzone { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; padding: 0.4rem; margin-bottom: 0; box-sizing: border-box; }
    /* Hover/drag-over styling for the dropzone is applied to .dropzone (keep that rule). */
    .upload-widget .filter-control,
    .upload-widget .checkbox-group,
    .upload-widget .btn-try-demo,
    .upload-widget #uploadTimezoneDebug { grid-column: 2; }
    /* Reduce spacing between the timezone selector and checkboxes on desktop */
    .upload-widget .filter-control { margin-bottom: 0.25rem; }
    .upload-widget .checkbox-group { gap: 0.4rem; }
    /* Add extra top spacing on desktop so the timezone instruction sits away from the widget border */
    .upload-widget .filter-control { margin-top: 0.75rem; }
    .upload-widget .btn-try-demo { justify-self: start; }
}

#container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    flex: 1;
    margin: 0 auto;
    width: 100%;
    max-width: 1000px; /* make the main container responsive */
}

/* Landing page: remove container width constraint so sections can be full-width */
body:not(.dashboard-active) #container {
    max-width: none;
    padding: 0;
}

body:not(.dashboard-active) #main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

#banner {
    width: 100%;
    background-color: #365663;
    padding: 0.75rem 0;
}

#banner p {
    text-align: center;
    color: #fff;
    margin: 0;
    font-weight: 500;
}

#banner a {
    color: #43BCA4;
    text-decoration: none;
}

header {
    width: 100%;
    padding: 0.5rem 0;
}

header>a {
    margin-left: 1rem;
    color: #365663;
    font-size: 1.4rem;
    text-decoration: none;
}

#upload_container,
#animation_container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 2rem 0;
}


#animation_left {
    width: 33%;
    padding-left: 1.5rem;
    align-self: center;
}

#upload_left {
    width: 24rem;
}

#upload_left a {
    color: #43BCA4;
    text-decoration: none;
}

#upload_left h2 {
    font-family: "Sentinel", sans-serif;
    color: #365663;
    font-weight: 400;
    font-size: 2.5rem;
    margin: 0;
}

#upload_left p {
    font-family: "Sentinel", sans-serif;
    color: #365663;
    font-weight: 400;
    font-size: 1.2rem;
    margin: 0;
}

#animation_left h2 {
    font-family: "Sentinel", sans-serif;
    color: #365663;
    font-weight: 400;
    font-size: 3rem;
    margin: 0;
}


#animation_left p {
    font-family: "Sentinel", sans-serif;
    color: #43BCA4;
    font-size: 2rem;
    margin: 0;
}

#animation_right {
    display: flex;
    justify-content: center;
    width: 67%;
}

#animation_right video {
    width: 90%;
}

#upload_right {
    width: 24rem;
    display: flex;
    margin-top: 0.5rem;
    margin-right: 4rem;
}

#upload_right_right {
    box-sizing: content-box;
    margin-left: 2rem;
}

#date_format_wrapper,
#accept_wrapper {
    display: flex;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

#date_format_wrapper button,
#accept_wrapper button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    margin-right: 0.75rem;
}

#date_format_wrapper i,
#accept_wrapper i {
    font-size: 20px;
}

#date_format_wrapper label,
#accept_wrapper label {
    font-weight: 300;
    font-size: 0.8rem;
}

#accept_wrapper a {
    color: #43BCA4;
    text-decoration: none;
}

.drag-drop-box {
    width: 150px;
    height: 100%;
    border: none; /* removed inner border */
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    text-align: center;
    cursor: pointer;
}

.drag-drop-box i {
    font-size: 30px;
    margin-bottom: 10px;
    color: #365663;
}

.drag-drop-box p {
    margin: 0;
    color: #365663;
    width: 70%;
}

#file_upload {
    display: none;
}

#submit_btn {
    display: block;
    width: 186px;
    background-color: #365663;
    padding: 4px 10px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #fff;
    margin-top: 0.25rem;
}

#submit_btn:disabled {
    opacity: 0.5;
    cursor: auto;
}

#capcha_btn {
    margin-top: 0.5rem;
}

#upload_help {
    margin-top: 0.5rem;
    width: 260px;
    color: #365663;
    font-size: 1.2rem;
    text-align: center;
}

#upload_help a {
    color: #43BCA4;
    text-decoration: none;
}

#caroussel_container {
    width: 100%;
    max-width: 1000px; /* responsive container */
    margin: 2rem auto;
    overflow: hidden;
    position: relative;
}

#carroussel_track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: max-content;
}

.carroussel-item {
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.carroussel-item {
    height: 18rem;
    padding: 1rem;
    border: 1px solid #365663;
    min-width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
} 

.carroussel-item img {
    width: 100%;
    height: 100px;
    margin-top: 3rem;

}

.carroussel-item-inner,
.carroussel-item-inner-no-img {
    display: flex;
    justify-content: space-between;
    align-items: start;
    height: 100%;
}

.carroussel-item-inner-no-img {
    height: 100%;
}

.carroussel-left {
    width: 400px;
}

.carroussel-left h1 {
    margin: 0;
    padding-left: 0.5rem;
    color: #365663;
    font-size: 2.5rem;
    font-weight: 400;
}

.carroussel-left h2 {
    margin: 0;
    padding-left: 0.5rem;
    color: #43BCA4;
    font-size: 1.5rem;
    font-weight: 400;
}

.carroussel-left p {
    margin: 0;
    padding-left: 0.5rem;
    color: #365663;
    font-size: 1.2rem;
    font-weight: 400;
    margin-top: 0.5rem;
}

.carroussel-right {
    display: flex;
    justify-content: flex-end;
    width: 500px;
    height: 100%;
    padding: 1rem;
    box-sizing: border-box;
}

.carroussel-right p {
    color: #365663;
    font-size: 2rem;
    margin: 0;
    padding-top: 1rem;
}

.carroussel-right .carrousel-image {
    height: 100%;
    width: 500px;
    margin-top: unset;
}


#caroussel_nav_wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

#caroussel_nav {
    display: flex;
    justify-self: center;
    align-items: center;
    margin-top: 0.5rem;
}

#nav_left i,
#nav_right i {
    color: #365663;
}

#nav_left, 
#nav_right {
    display: flex;
    padding: 0.6rem 0.75rem;
    border: 1px solid #365663;
    border-radius: 50%;
    opacity: 0.4;
    margin: 0 1.5rem;
    color: #365663;
    background-color: #fff;
    cursor: default;
}

#nav_right {
    opacity: 1;
    cursor: pointer;
}

#nav_dots i {
    color: #365663;
    font-size: 0.5rem;
    opacity: 0.4;
    margin: 0 0.1rem;
}

#nav_dots .nav-active {
    opacity: 1;
}

#carroussel_container {
  overflow: hidden;
  position: relative;
}

#carroussel_track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carroussel-item {
  min-width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}


#expl_container {
    width: 100%;
    background-color: #365663;
    padding: 1.5rem 0 2rem 0;
}

#expl_container h1 {
    margin-top: 0;
    font-size: 3rem;
    color: #fff;
    text-align: center;
    font-weight: 400;
}

#expl_container p {
    font-size: 1.2rem;
}

#expl_items {
    display: flex;
    justify-content: center;
}

.expl-item {
    padding: 1rem;
    width: 220px;
    border: 3px solid #fff;
    color: #fff;
    margin: 0 2rem;
}

.expl-item h2 {
    font-size: 2rem;
    font-weight: 400;
    margin: 0;
}

.expl-item p {
    font-size: 1.5rem;
    font-weight: 300;
}

#form_container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    align-self: center;
}

#form_container h1 {
    font-size: 3rem;
    font-weight: 400;
    color: #365663;
    margin-bottom: 1rem;
    text-align: center;
}

.form-row {
    display: flex;
    margin-bottom: 1rem;
}

.form-row input {
    margin-right: 2rem;
    border: 2px solid #365663;
    font-size: 1.5rem;
    padding: 0.5rem 0rem 0.5rem 2.5rem;
    width: 200px;
    color: #365663;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
}
 
.form-row textarea {
    width: 100%;
    resize: none;
    border: 2px solid #365663;
    padding: 0.5rem 0rem 0.5rem 2.5rem;
    font-size: 1.5rem;
    color: #365663;
}

textarea::placeholder {
    text-align: center;
    line-height: 140px;
}

#form_btns {
    display: flex;
    justify-content: flex-end;
}

#form_btns button {
    width: 186px;
    background-color: #365663;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: #fff;
}

#form_btns button:first-of-type {
    margin-right: 1rem;
}

/* Legacy element footer (kept minimal; prefer .footer-section + .footer-links) */
footer {
    display: flex;
    justify-content: center;
    /* inherit background */
    padding: 0.75rem;
    align-self: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

footer a { cursor: pointer; margin: 0 1rem; font-size: 1rem; text-decoration: none; }

/* Desktop: hide mobile-specific contact button by default */
@media (min-width: 769px) {
    .btn-contact-sales.mobile-contact-sales { display: none; }
}

/* Anchor scroll offset so headings aren’t hidden behind fixed navbar */
#features, #generate-report, #faqs { scroll-margin-top: var(--navbar-offset, 56px); }

#dashboard {
    display: none;
    width: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Dashboard typography - ensure consistent font across all elements */
#dashboard #filters_title,
#dashboard #trade_details_title,
#dashboard #data_title,
#dashboard .section-heading,
#dashboard .widget-heading,
#dashboard .section-subheading,
#dashboard .import-card-title,
#dashboard h1, 
#dashboard h2, 
#dashboard h3,
#dashboard h4,
#dashboard h5,
#dashboard h6 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

#dashboard p,
#dashboard span,
#dashboard label,
#dashboard button,
#dashboard input,
#dashboard select,
#dashboard textarea,
#dashboard th,
#dashboard td,
#dashboard .btn,
#dashboard .filter-toggle,
#dashboard .pager-btn,
#dashboard .page-number,
#dashboard .stat-label,
#dashboard .stat-value,
#dashboard .metrics-col span {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}


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

tr {
    border-bottom: 1px solid #365663;
}
 
th,
td {
    padding: 8px;
    font-family: 'Sentinel, sans-serif';
    text-align: left;
    color: #365663;
}

th {

/* Offset content for fixed navbar height */
body.has-navbar { padding-top: 56px; }
@media (max-width: 768px) { body.has-navbar { padding-top: 48px; } }
    background-color: #365663;
    color: #fff;
    font-weight: 400;
}

th span {
    font-size: 1rem;
    color: #fff;
    font-weight: 400;
}

/* Section titles styled like reportstyles.css */
#filters_title {
    display: block;
    color: var(--blue);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    text-align: left;
}

#trade_details_title {
    display: block;
    color: var(--blue);
    font-weight: 700;
    font-size: 2rem;
    margin: 2rem auto 1rem;
    text-align: center;
}

/* Filter container base styles (shared by light/dark themes) */
#filter_container {
    background: var(--grey-bg, #f5f5f5);
    padding: 0.75rem 1rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    max-width: 1112px;
    width: calc(100% - 2rem);
    height: auto;
    min-height: 0;
    border-radius: 12px;
    border: 1px solid rgba(8, 29, 89, 0.1);
    box-sizing: border-box;
}

@media (min-width: 769px) {
    #filter_container {
        width: 1112px;
        max-width: calc(100% - 4rem);
    }
}

@media (max-width: 768px) {
    #filter_container {
        width: calc(100% - 2rem);
        max-width: none;
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

/* Trade details title: keep consistent look */
#data_title {
    display: block;
    color: var(--blue);
    font-weight: 700;
    font-size: 2rem;
    margin: 2rem auto 1rem;
    text-align: center;
}

#metrics {
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    padding: 0 2rem;
    margin-top: 1rem;
}

#metrics_left {
    display: flex;
}

.metrics-col {
    display: flex;
    flex-direction: column;
    margin-right: 4rem;
}

.metrics-col span {
    font-family: 'Sentinel, sans-serif';
    font-size: 1.2rem;
    margin-left: 0;
    margin-bottom: 0.5rem;
}

#total_gross_pnl,
#total_net_pnl,
#total_trades,
#expec,
#profit_factor {
    color: #365663;
}

#perc_chart_container {
    width: 160px;
    padding-top: 1rem;
    margin-right: 6rem;
}

#percentage_chart {
    width: 160px;
    height: 160px;
}

#filters_wrapper {
    padding: 0;
    border: none;
}

#filters_row {
    display: flex;
    justify-content: space-around;
}

.filter-wrapper {
    position: relative;
}

#win_loss_options,
#product_options,
#long_short_options,
#symbol_options {
    display: none;
    position: absolute;
    top: 31px;
    right: 0;
    width: 166px;
    background-color: #fff;
    border: 1px solid #365663;
    border-top: none;
    border-bottom: none;
    box-sizing: border-box;

}

.filter-option-btn {
    background-color: transparent;
    width: 100%;
    text-align: start;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #365663;
}

.filter-option-btn i {
    margin-right: 0.75rem;
    font-size: 18px;
    color: #365663;
}

input[type='radio'] {
    accent-color: #365663;
    margin-right: 0.75rem;
    margin-top: 0;
}

/* .filter-option-btn:hover {
    color: #43BCA4;
} */

/* .active-option {
    color: #43BCA4;
} */

.filter-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 166px;
    background-color: transparent;
    padding: 0.25rem 1rem;
    font-family: "Sen", sans-serif;
    font-weight: 400;
    border: 1px solid #365663;
    font-size: 1.1rem;
    color: #365663;
    cursor: pointer;
}

.filter-btn i,
.filter-btn svg {
    margin-left: 1rem;
}

#date_wrapper {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #365663;
    padding: 0 1rem;
    width: 14rem;
}

#datetime_range {
    width: 100%;
    border: none;
    z-index: 1;
    background-color: transparent;
    color: #365663;
    font-family: "Sen", sans-serif;
}

#date_wrapper i {
    position: absolute;
    right: 16px;
    
}

#datetime_range:focus {
    outline: none;
}


#details_modal {
    position: fixed;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    z-index: 1000;
    padding: 2rem;
}

.details-container {
    display: flex;
    justify-content: space-around;
}

.details-entry p,
.details-exit p,
.details-result p {
    margin: 0;
}

.details-entry p:first-of-type,
.details-exit p:first-of-type,
.details-result p:first-of-type {
    margin: 0.5rem 0 1rem 0;
}

.details-result p:last-of-type {
    margin-bottom: 0.5rem;
}


.fa-circle-question {
    cursor: pointer;
}

/* removed legacy display option buttons */

#chart_container {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 360px;
    margin: 0;
}

/* Advanced Calendar (report.html style) */
#calendarWidget.spider-container { position: relative; background:#fff; border:1px solid rgba(8,29,89,0.15); border-radius:12px; box-shadow:0 6px 18px rgba(0,0,0,0.06); padding:0.5rem 0.5rem 60px; overflow:hidden; }
#calendarWidget .widget-heading { position:absolute; top:6px; left:50%; transform:translateX(-50%); color:var(--blue,#081d59); font-size:2rem; font-weight:700; background:rgba(255,255,255,0.9); padding:2px 8px; border-radius:8px; z-index:24; text-align:center; }
@media (max-width: 768px) {
    #calendarWidget .widget-heading { font-size: 1rem; }
}
#calendarWidget .widget-content { margin-top: 30px; height: calc(100% - 30px); padding: 12px 16px 12px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
#calendarWidget .calendar-section { max-width:900px; margin:0 auto; padding:0; width:100%; }
#calendarWidget .calendar-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:0.5rem; }
#calendarWidget .calendar-nav-btn { border:2px solid var(--blue,#081d59); background: var(--grey-bg,#f7f7f9); color:var(--blue,#081d59); padding:0.4rem 0.9rem; font-weight:600; cursor:pointer; border-radius:4px; font-family: var(--app-font-stack); }
#calendarWidget .calendar-nav-btn:hover { background:var(--blue,#081d59); color:var(--grey-bg,#f7f7f9); }
#calendarWidget .month-header-center { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; }
#calendarWidget .month-label { font-size:1.5rem; font-weight:700; color:var(--blue,#081d59); text-align:center; }
#calendarWidget .month-summary { margin-top:0.25rem; font-family: var(--app-font-stack); font-weight:600; color:var(--blue,#081d59); text-align:center; }
#calendarWidget .calendar-grid { display:grid; grid-template-columns:repeat(8,1fr); border:2px solid var(--blue,#081d59); border-radius:8px; overflow:hidden; background:var(--grey-bg,#f7f7f9); gap:1px; padding:0; }
#calendarWidget .cal-dow, #calendarWidget .cal-cell { padding:0.5rem; min-height:70px; position:relative; border:none; font-family: var(--app-font-stack); font-size:0.85rem; background:transparent; }
#calendarWidget .cal-dow { background:#e5e4e9; font-weight:700; text-align:center; color:var(--blue,#081d59); min-height:auto; }
#calendarWidget .week-total-header { background:#e5e4e9; font-weight:700; color:var(--blue,#081d59); text-align:center; padding:0.5rem; font-size:0.85rem; }
#calendarWidget .cal-cell { text-align:right; padding-right:1.75rem; }
#calendarWidget .cal-cell.day-positive { background:rgba(98,168,124,0.15); }
#calendarWidget .cal-cell.day-negative { background:rgba(211,62,67,0.15); }
#calendarWidget .cal-cell.week-total.positive { background:rgba(98,168,124,0.18); }
#calendarWidget .cal-cell.week-total.negative { background:rgba(211,62,67,0.18); }
#calendarWidget .cal-cell.week-total.neutral { background:var(--grey-bg,#f7f7f9); }
#calendarWidget .day-number { font-weight:600; font-size:0.75rem; color:var(--black,#000); position:absolute; top:4px; right:18px; }
#calendarWidget .pnl-value { display:block; margin-top:1.2rem; font-weight:600; font-size:0.9rem; text-align:right; }
#calendarWidget .pnl-pos { color: var(--green,#62a87c); }
#calendarWidget .pnl-neg { color: var(--red,#d33e43); }
#calendarWidget .pnl-zero { color: var(--black,#000); opacity:0.65; }
#calendarWidget .trade-value { display:block; font-weight:400; font-size:0.65rem; margin-top:0.25rem; text-align:right; color:var(--black,#000); opacity:0.75; }
#calendarWidget .cal-cell.empty { background:#f7f7f9; }
#calendarWidget .cal-cell.week-total { position:relative; font-size:0.85rem; }
#calendarWidget .cal-cell.week-total .pnl-value { margin-top:1.2rem; font-weight:600; font-size:0.9rem; text-align:right; display:block; }
#calendarWidget .cal-cell.week-total.positive .pnl-value { color: var(--green,#62a87c); }
#calendarWidget .cal-cell.week-total.negative .pnl-value { color: var(--red,#d33e43); }
#calendarWidget .cal-cell.week-total.neutral .pnl-value { color: var(--black,#000); opacity:0.65; }
@media (max-width:768px){
    #calendarWidget .cal-cell, #calendarWidget .cal-dow { min-height:auto; padding:0.3rem; }
    #calendarWidget .cal-cell { padding-right:0.3rem; display:flex; align-items:center; justify-content:center; text-align:center; }
    #calendarWidget .cal-dow { padding:0.3rem; font-size:0.7rem; }
    #calendarWidget .day-number { position:static; top:auto; right:auto; font-size:0.7rem; }
    #calendarWidget .pnl-value, #calendarWidget .cal-cell.week-total .pnl-value, #calendarWidget .trade-value { display:none !important; }
    #calendarWidget .month-label { font-size:0.9rem; }
    #calendarWidget .month-summary { font-size:0.85rem; }
    #calendarWidget .calendar-nav-btn { padding:0.28rem 0.63rem; font-size:0.85rem; border-width:1.5px; border-radius:3px; }
    #calendarWidget.spider-container { padding-bottom:36px; }
    #calendarWidget .widget-content { margin-top: 18px; height: calc(100% - 18px); padding: 12px 12px 12px; box-sizing: border-box; }
}


#reset_filters_cont {
    display: flex;
    justify-content: center;
}

#show_cal button,
#reset_filters_cont button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: #365663;
    margin-top: 1rem;
}

#reset_filters_cont button {
    font-size: 1.1rem;
    font-family: "Sen", sans-serif;
}

/* removed legacy .reset-like-btn; use .btn-reset from filters.css for consistency */

/* Trade actions: align button dimensions */
.trade-actions .btn-reset,
.trade-actions .btn-danger {
    padding: 0.5rem 1.5rem; /* match .btn-reset */
    border-radius: 4px;     /* match .btn-reset */
    font-weight: 600;
    font-family: var(--app-font-stack);
    line-height: 1.2;
}
.trade-actions .btn-save {
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-family: var(--app-font-stack);
    line-height: 1.2;
    background: var(--green, #62a87c);
    color: #fff;
    border: 2px solid var(--green, #62a87c);
    cursor: pointer;
}
.trade-actions .btn-save:hover { background: #4f9068; border-color: #4f9068; }
.trade-actions .btn-danger {
    background: #d33e43;
    color: #fff;
    border: 2px solid #d33e43;
}
.trade-actions .btn-danger:hover { background: #b83236; }

/* Mobile: stack trade action buttons vertically */
@media (max-width: 768px) {
    .trade-actions { flex-direction: column; }
    .trade-actions .btn-save,
    .trade-actions .btn-reset,
    .trade-actions .btn-danger { width: 66.6667%; }
}

/* Equal widths on desktop: distribute space evenly */
.trade-actions .btn-save,
.trade-actions .btn-reset,
.trade-actions .btn-danger {
    flex: 0 0 calc(100% / 6); /* each ~1/6 of container so 3 sum to ~1/2 */
    text-align: center;
    min-width: 0;
}

#pnl_cal_container { display: block; margin: 0; width: 100%; }

#data_container {
    display: block;
    margin-bottom: 2rem;
}

@media only screen and (max-width: 600px) {
    #container {
        width: 100%;
    }

    /* Further reduce container side padding on very small screens */
    .container { padding: 0 0.5rem; }

    #main {
        width: 100%;
    }

    #banner p {
        font-size: 0.8rem;
    }

    header>a {
        font-size: 1.1rem;
    }

    #upload_container,
    #animation_container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    #animation_container {
        margin-top: 1.5rem;
    }

    #animation_left {
        width: 80%;
        margin-bottom: 3rem;
        padding: 0;
    }

    #animation_left h2 {
        font-size: 2.4rem;
    }

    #animation_left p {
        font-size: 1.6rem;
    }

    #animation_right {
        width: 95%;
    }

    #upload_left {
        width: 80%;
        margin-bottom: 2rem;
    }

    /* Very small screens: fix height and fill the panel (no top/bottom gaps) */
    .placeholder-panel { min-height: 0; height: auto; display: flex; align-items: center; justify-content: center; padding: 0; overflow: visible; }
    .report-demo-image { width: 100%; height: auto; object-fit: contain; margin: 0; display: block; }

    #upload_left h2 {
        font-size: 2rem;
    }

    #upload_left p {
        font-size: 0.8rem;
    }

    #upload_right {
        flex-direction: column;
        align-items: center;
        width: 80%;
        margin: 0;
    }

    #upload_right_right {
        width: 70%;
        margin: 0;
        margin-top: 2rem;
    }

    .drag-drop-box {
        width: 130px;
        padding: 1rem;
    }

    /* Mobile: make the dropzone fill the full column width */
    .upload-widget .file-input-wrapper,
    .upload-widget .file-input-wrapper .dropzone,
    .drag-drop-box {
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }

    /* Mobile: increase spacing between timezone selector and checkboxes */
    .upload-widget .filter-control { margin-bottom: 1rem; }

    .drag-drop-box p {
        font-size: 0.8rem;
    }

    #submit_btn {
        width: 100%;
    }

    #caroussel_container {
        width: 95%;
        margin: 2rem auto;
    }

    .carroussel-item-inner,
    .carroussel-item-inner-no-img {
        flex-direction: column;
        align-items: center;
    }

    .carroussel-item {
        height: unset;
        width: 100%;
        min-width: 100%;
        padding: 0;
        padding-top: 1rem;
    }

    .carroussel-left {
        width: 80%;
    }

    .carroussel-left h1 {
        font-size: 2rem;
    }

    .carroussel-left h2 {
        font-size: 1.2rem;
    }

    .carroussel-left p {
        font-size: 0.8rem;
    }

    .carroussel-right {
        width: 70%;
    }

    .carroussel-right .carrousel-image {
        width: 100%;
        object-fit: contain;
    }

    #expl_container {
        padding-bottom: 0;
    }

    #expl_items {
        flex-direction: column;
        align-items: center;
        margin: 0;
    }

    .expl-item {
        margin: 0;
        margin-bottom: 1rem;
    }

    .expl-item:last-of-type {
        margin-bottom: 0;
    }

    #expl_container h1 {
        font-size: 2.4rem;
    }

    .expl-item h2 {
        font-size: 1.6rem;
    }

    #expl_container p {
        font-size: 0.8rem;
    }

    footer {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    footer a {
        margin: 0.25rem 0;
        font-size: 1.4rem;
    }
}

/* ---- Trade details widget (ported) ---- */
#tradeWidget.spider-container { position: relative; background:#fff; border:1px solid rgba(8,29,89,0.15); border-radius:12px; box-shadow:0 6px 18px rgba(0,0,0,0.06); padding:0.5rem 0.5rem 60px; }
#tradeWidget .widget-heading { position:absolute; top:6px; left:50%; transform:translateX(-50%); color:var(--blue,#081d59); font-size:2rem; font-weight:700; background:rgba(255,255,255,0.9); padding:2px 8px; border-radius:8px; z-index:24; text-align:center; }
@media (max-width: 768px) { #tradeWidget .widget-heading { font-size: 1rem; } }
#tradeWidget .widget-content { margin-top: 60px; height: auto; padding: 12px 16px 12px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
#tradeDetails { max-width:900px; width:100%; margin:0 auto; padding:0; }
#tradeWidget .table-wrap { width: 100%; margin: 0 auto; }
#tradeDetails .table-wrap { overflow:auto; border:2px solid var(--blue,#081d59); border-radius:8px; background:var(--grey-bg,#f0eff4); }
#tradeDetails .trade-table { width:100%; border-collapse:collapse; background:transparent; }
#tradeDetails .trade-table thead th { background:#e5e4e9; color:var(--blue,#081d59); font-weight:700; position:sticky; top:0; z-index:1; }
#tradeDetails .trade-table th, #tradeDetails .trade-table td { padding:0.5rem; text-align:center; font-family: var(--app-font-stack); font-size:0.85rem; background:#fff; border-bottom:1px solid rgba(8,29,89,0.1); color: var(--blue,#081d59); }

/* P&L cell color overrides (apply these classes when injecting rows) */
#tradeDetails .trade-table td.pnl-positive { color: #62a87c; }
#tradeDetails .trade-table td.pnl-negative { color: #d33e43; }
#tradeDetails .trade-table td.pnl-breakeven { color: var(--be-grey,#888888); }
#tradeDetails .trade-table .pnl-be { color: var(--be-grey,#888888); }
#tradeDetails .trade-table thead th:last-child, #tradeDetails .trade-table tbody td:last-child { text-align:center; }
#tradeDetails .trade-table th:nth-child(1), #tradeDetails .trade-table td:nth-child(1) { width:56px; text-align:center; }
#tradeDetails .trade-table th:nth-child(7), #tradeDetails .trade-table td:nth-child(7) { text-align:center; }
#tradeDetails .trade-table tr:last-child td { border-bottom:none; }
#tradeDetails .trade-table thead th:first-child { border-top-left-radius:6px; }
#tradeDetails .trade-table thead th:last-child { border-top-right-radius:6px; }
#tradeDetails .trade-table th:first-child, #tradeDetails .trade-table td:first-child { padding-left:0.75rem; }
#tradeDetails .trade-table th:last-child, #tradeDetails .trade-table td:last-child { padding-right:0.75rem; }
#tradeDetails .pnl-pos { color:var(--green,#62a87c); font-weight:700; }
#tradeDetails .pnl-neg { color:var(--red,#d33e43); font-weight:700; }
#tradeDetails .details-cell { cursor:pointer; user-select:none; color:var(--blue,#081d59); font-weight:600; display:flex; align-items:center; justify-content:center; gap:0; text-align:center; }
#tradeDetails .faq-toggle { width:24px; height:24px; position:relative; margin-left:0.25rem; }
#tradeDetails .faq-toggle::before, #tradeDetails .faq-toggle::after { content:''; position:absolute; background-color:var(--blue,#081d59); transition:transform 0.3s ease; }
#tradeDetails .faq-toggle::before { width:2px; height:16px; left:11px; top:4px; }
#tradeDetails .faq-toggle::after { width:16px; height:2px; left:4px; top:11px; }
#tradeDetails tr.row-expanded .faq-toggle::before { transform:rotate(90deg); }
#tradeDetails tr.detail-row td { background:#f7f7f9; }
#tradeDetails .detail-content { display:grid; grid-template-columns:1fr; gap:0.5rem 1rem; font-size:0.85rem; }
#tradeDetails .detail-group { display:grid; row-gap:0.25rem; padding:0.5rem 0; background:transparent; }
#tradeDetails .detail-title { font-weight:700; color:var(--blue,#081d59); margin-bottom:0.25rem; font-size:0.85rem; text-align:center; }
#tradeDetails .detail-box { border:2px solid rgba(8,29,89,0.35); border-radius:6px; padding:0.5rem; text-align:center; }
#tradeDetails .detail-item { color:var(--blue,#081d59); }
#tradeDetails .detail-item strong { color:var(--black,#000); font-weight:700; margin-right:0.25rem; }
/* TradingView lightweight chart container styles for detail rows */
#tradeDetails .tv-chart-wrap { margin-top: 8px; }
#tradeDetails .tv-chart { width: 100%; height: 260px; border: 1px solid rgba(8,29,89,0.15); border-radius: 8px; background: #fff; }
/* Trade details: comment inputs under Entry/Exit/Results */
#tradeDetails .group-comment { grid-column: 1 / -1; }
#tradeDetails .trade-comment { display:block; width:100%; max-width:100%; box-sizing:border-box; margin-top:6px; padding:8px 10px; border:1px solid rgba(8,29,89,0.25); border-radius:6px; font-family: var(--app-font-stack); }
@media (max-width:768px){ #tradeDetails .trade-comment { font-size:0.9rem; } }
/* Live counter for comment input */
#tradeDetails .comment-counter { font-size: 0.75rem; color: var(--be-grey,#888); margin-top: 4px; text-align: right; }
@media (min-width:769px){
    /* Desktop: show border on landing upload widget to match the placeholder panel */
    .generate-section .upload-widget { border: 2px solid var(--blue); background-color: #fff; }
    #tradeWidget .widget-content { margin-top: 40px; padding: 16px 20px 16px; display: flex; align-items: center; justify-content: center; }
    #tradeDetails .detail-content { grid-template-columns:repeat(3,minmax(160px,1fr)); align-items:start; }
    #tradeDetails .trade-table { table-layout:fixed; width:100%; }
    #tradeDetails .trade-table thead th { width:12.5%; }
    #tradeDetails .trade-table thead th:nth-child(1) { width:12.5% !important; }
    #tradeDetails .trade-table thead th:nth-child(8) { text-align:center; }
    #tradeDetails .detail-group { padding:0 0.75rem; }
}
@media (max-width:768px){
    #tradeWidget .widget-content { margin-top: 36px; padding: 12px 12px 12px; display: flex; align-items: center; justify-content: center; }
    #tradeDetails .trade-table th, #tradeDetails .trade-table td { font-size:0.8rem; padding:0.35rem; }
    #tradeDetails .detail-content { grid-template-columns:1fr; font-size:0.8rem; }
    #tradeDetails .trade-table thead th:nth-child(3),
    #tradeDetails .trade-table thead th:nth-child(4),
    #tradeDetails .trade-table thead th:nth-child(5),
    #tradeDetails .trade-table thead th:nth-child(6),
    #tradeDetails .trade-table tbody td:nth-child(3),
    #tradeDetails .trade-table tbody td:nth-child(4),
    #tradeDetails .trade-table tbody td:nth-child(5),
    #tradeDetails .trade-table tbody td:nth-child(6) { display:none; }
}

/* Trade pager styles (centered under table) */
#tradeDetails .trade-pager { display:flex; flex-wrap:wrap; gap:0.5rem; align-items:center; justify-content:center; margin-top:0.75rem; }
#tradeDetails .pager-btn, #tradeDetails .page-number { border:2px solid var(--blue,#081d59); background: var(--grey-bg,#f0eff4); color: var(--blue,#081d59); padding:0.25rem 0.6rem; border-radius:4px; font-weight:600; cursor:pointer; font-family: var(--app-font-stack); }
#tradeDetails .pager-btn[disabled] { opacity:0.5; cursor:not-allowed; }
#tradeDetails .page-number.active { background: var(--blue,#081d59); color: var(--grey-bg,#f0eff4); }
#tradeDetails .ellipsis { padding:0 0.25rem; color: var(--blue,#081d59); opacity:0.7; user-select:none; }
@media (max-width:768px){
    #tradeDetails .trade-pager { gap:0.4rem; }
    #tradeDetails .pager-btn, #tradeDetails .page-number { padding:0.2rem 0.5rem; font-size:0.9rem; }
    /* On small screens show only Prev/Next for compactness */
    #tradeDetails .page-number, #tradeDetails .ellipsis { display:none !important; }
}

/* Clear all trades button area */
#tradeDetails .trade-clear-all { display:flex; justify-content:center; margin-top: 0.75rem; }
#tradeDetails .trade-clear-all .btn-danger { padding: 0.5rem 1.5rem; border: 2px solid #d33e43; background:#d33e43; color:#fff; border-radius:4px; font-weight:600; font-family: var(--app-font-stack); }
#tradeDetails .trade-clear-all .btn-danger:hover { background:#b83236; border-color:#b83236; }

/* ---- Trade entry widget ---- */
#tradeEntryWidget.spider-container { position: relative; background:#fff; border:1px solid rgba(8,29,89,0.15); border-radius:12px; box-shadow:0 6px 18px rgba(0,0,0,0.06); padding:0.5rem 0.5rem 20px; }
#tradeEntryWidget .widget-heading { position:absolute; top:6px; left:50%; transform:translateX(-50%); color:var(--blue,#081d59); font-size:2rem; font-weight:700; background:rgba(255,255,255,0.9); padding:2px 8px; border-radius:8px; z-index:24; text-align:center; }
@media (max-width: 768px) { #tradeEntryWidget .widget-heading { font-size: 1rem; } }
#tradeEntryWidget .widget-content { margin-top: 40px; height:auto; padding:8px 16px; box-sizing:border-box; }
/* Constrain Trade entry content width to match other wide cards (Calendar/Trade details) */
#tradeEntry { max-width: 900px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) {
    /* Desktop: force Trade entry content to exactly 900px width */
    #tradeEntry { width: 900px; }
}
@media (max-width: 768px) {
    #tradeEntryWidget .widget-content { margin-top: 36px; padding:8px 12px; }
}
@media (min-width: 769px) {
    /* Align desktop inner padding with Calendar/Trade details cards */
    #tradeEntryWidget .widget-content { padding: 16px 20px 16px; }
}

#tradeEntry .sections { display:grid; grid-template-columns: 1fr; gap:16px; align-items: stretch; }
@media (min-width: 900px) { #tradeEntry .sections { grid-template-columns: 1fr; align-items: stretch; } }
#tradeEntry .section-wrap { border:2px solid var(--blue,#081d59); border-radius:8px; background:#fff; padding:12px; height: 100%; display:flex; flex-direction: column; position: relative; margin-top: 10px; }
#tradeEntry .section-subheading {
    /* Visually place the title above (outside) the bordered container */
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0; /* remove in-flow spacing */
    font-size: 1rem;
    color: var(--blue,#081d59);
    font-weight: 700;
    text-align: center;
    background: #fff; /* ensure it sits cleanly above border */
    padding: 0 6px;
    line-height: 1.2;
    z-index: 2;
}

/* Manual input layout */
#tradeEntry .manual-form { display:flex; flex-direction: column; height: 100%; }
#tradeEntry .field-grid { display:grid; grid-template-columns: 1fr; gap:12px; }
/* Group containers for two-column layout */
#tradeEntry .field-grid .col-group { display: contents; }
@media (min-width: 900px) {
    /* Two equal columns on desktop */
    #tradeEntry .field-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; column-gap: 16px; row-gap: 12px; align-items: start; }
    /* Left top group: Symbol + Product side-by-side within left column */
    #tradeEntry .field-grid .col-left-top { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    #tradeEntry .field-grid .col-left-top .fld-symbol  { grid-column: 1; }
    #tradeEntry .field-grid .col-left-top .fld-product { grid-column: 2; }
    /* Right top group: Quantity occupies right column */
    #tradeEntry .field-grid .col-right-top { grid-column: 2; grid-row: 1; }
    /* Row 2: Long/Short (left) | Commission (right) */
    #tradeEntry .field-grid .fld-side       { grid-column: 1; grid-row: 2; }
    #tradeEntry .field-grid .fld-commission { grid-column: 2; grid-row: 2; }
    /* Row 3: Entry price (left) | Entry time (right) */
    #tradeEntry .field-grid .fld-entry-price { grid-column: 1; grid-row: 3; }
    #tradeEntry .field-grid .fld-entry-time  { grid-column: 2; grid-row: 3; }
    /* Row 4: Exit price (left) | Exit time (right) */
    #tradeEntry .field-grid .fld-exit-price  { grid-column: 1; grid-row: 4; }
    #tradeEntry .field-grid .fld-exit-time   { grid-column: 2; grid-row: 4; }
}
@media (max-width: 900px) { #tradeEntry .field-grid { grid-template-columns: 1fr; } }
#tradeEntry .field label { display:block; font-weight:600; margin-bottom:4px; color: var(--blue,#081d59); }
#tradeEntry .field input, #tradeEntry .field select { width:100%; box-sizing:border-box; padding:8px 10px; border:1px solid rgba(8,29,89,0.25); border-radius:6px; font-family: var(--app-font-stack); }
#tradeEntry .manual-actions { display:flex; justify-content:center; margin-top: auto; }

/* Manual input validation highlight */
#tradeEntry .field.field-error input,
#tradeEntry .field.field-error select {
    border-color: #d33e43 !important;
    box-shadow: 0 0 0 1px rgba(211,62,67,0.2);
}
#tradeEntry .field.field-error label { color: #d33e43; }
/* Highlight manual timezone dropdown toggle when marked as error (if used) */
#tradeEntry #timezoneDropdownToggleManual.field-error {
    border: 1px solid #d33e43 !important;
    border-radius: 6px;
}

/* Trade entry: mobile/tablet keep simple stacked upload layout; desktop restores landing-style widget */
#tradeEntry .upload-widget { border: none; background: transparent; padding: 0; border-radius: 0; width: 100%; display: flex; flex-direction: column; align-items: stretch; height: 100%; }
#tradeEntry .upload-widget .file-input-wrapper { margin-bottom: 0.75rem; align-items: stretch; padding: 0; position: static; top: auto; right: auto; bottom: auto; left: auto; }
#tradeEntry .upload-widget .file-input-wrapper .dropzone { width: 100%; margin-bottom: 0.75rem; padding: 0.75rem; border: none; border-radius: 8px; box-sizing: border-box; }
/* Push the generate button to the bottom (mobile/tablet); center within card */
#tradeEntry #submit_btn_entry { margin-top: auto; align-self: center; }
/* Desktop overrides: stack sections full-width and use landing upload widget layout inside Trade entry */
@media (min-width: 900px) {
    /* Ensure each section spans the full card width */
    #tradeEntry .section-wrap { width: 100%; }
    /* Restore landing widget look/behavior on desktop within Trade entry */
    #tradeEntry .upload-widget {
    /* Remove inner border to avoid double border with .section-wrap */
    border: none;
        background: var(--grey-bg);
        padding: 0.75rem;
        border-radius: 8px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        align-items: start;
        position: relative;
    }
    #tradeEntry .upload-widget .file-input-wrapper {
        grid-column: 1;
        position: absolute;
        top: 0; bottom: 0; left: 0; right: calc(50% + 0.5rem);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
        gap: 0.25rem;
        margin-bottom: 0;
        box-sizing: border-box;
    }
    #tradeEntry .upload-widget .file-input-wrapper .dropzone {
        width: 100%;
        padding: 0.4rem;
        margin-bottom: 0;
        gap: 0.25rem;
    }
    #tradeEntry .upload-widget .filter-control,
    #tradeEntry .upload-widget .checkbox-group,
    #tradeEntry .upload-widget .btn-try-demo,
    #tradeEntry .upload-widget #uploadTimezoneDebug { grid-column: 2; }
}

/* Mobile: prevent horizontal overflow inside the Trade entry card */
/* Treat <=900px as single-column/mobile for Trade entry */
@media (max-width: 900px) {
    /* Let the Trade entry card expand naturally and avoid inner scrollbars */
    #tradeEntryWidget.spider-container { height: auto; min-height: 0; overflow: visible; display: block; align-items: stretch; justify-content: stretch; padding-top: 0; }

    /* Make the Trade entry headline participate in layout so it never gets clipped */
    #tradeEntryWidget .widget-heading { position: static; top: auto; left: auto; transform: none; margin: 0 0 8px; display: block; }
    #tradeEntryWidget .widget-content { margin-top: 0; }

    /* Ensure the card content doesn't create horizontal scroll */
    #tradeEntryWidget .widget-content,
    #tradeEntry .section-wrap { overflow-x: hidden; height: auto; }

    /* Constrain all immediate controls to the card width */
    #tradeEntry .field,
    #tradeEntry .field input,
    #tradeEntry .field select,
    #tradeEntry .upload-widget,
    #tradeEntry .upload-widget .file-input-wrapper,
    #tradeEntry .upload-widget .file-input-wrapper .dropzone { max-width: 100%; width: 100%; box-sizing: border-box; }

    /* Let buttons wrap instead of forcing overflow */
    #tradeEntry .file-input-button { white-space: normal; max-width: 100%; text-align: center; }
    #tradeEntry .file-status, #tradeEntry .dropzone p { white-space: normal; overflow-wrap: anywhere; word-break: break-word; text-align: center; }

        /* Make filter dropdowns span the available width within the padded section */
    #tradeEntry .filter-control, #tradeEntry .filter-toggle, #tradeEntry .dropdown-panel { width: 100%; max-width: 100%; box-sizing: border-box; }
    /* Allow timezone dropdowns inside Trade entry to overflow beyond their section/card when open */
    #tradeEntryWidget.dropdown-open { overflow: visible; }
    #tradeEntryWidget .dropdown-panel { z-index: 2147483647; }

        /* Place section titles in normal flow on mobile so they are always visible */
        #tradeEntry .section-subheading { position: static; top: auto; left: auto; transform: none; margin: 0 0 8px; background: transparent; padding: 0; }
}
/* ====================================
   Import Options Card Grid (Trade Entry)
   ==================================== */

/* Container for the 3 import option cards */
.import-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 8px;
}

/* Individual import card */
.import-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: #f8fafc;
    border: 1px solid rgba(8, 29, 89, 0.12);
    border-radius: 10px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 140px;
    box-sizing: border-box;
    overflow: hidden;
    max-width: 100%;
}

.import-card:hover {
    border-color: rgba(8, 29, 89, 0.25);
    box-shadow: 0 2px 8px rgba(8, 29, 89, 0.08);
}

.import-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.import-card-logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 32px;
}

.import-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.import-logo-icon {
    font-size: 24px;
    color: var(--blue, #081d59);
}

.import-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blue, #081d59);
}

.import-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    width: 100%;
}

.import-card-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.import-btn {
    width: 100%;
    text-align: center;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.import-card-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #666;
    margin-top: auto;
}

.import-card-note i {
    color: #0b4cc2;
    font-size: 12px;
}

/* Rithmic connect prompt styling */
.rithmic-connect-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Expanded form panels (Rithmic & Upload) */
.rithmic-form-expanded,
.upload-form-expanded {
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid rgba(8, 29, 89, 0.15);
    border-radius: 10px;
    animation: slideDown 0.2s ease-out;
}

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

.rithmic-form-header,
.upload-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(8, 29, 89, 0.1);
}

.rithmic-form-header span,
.upload-form-header span {
    font-weight: 600;
    color: var(--blue, #081d59);
    font-size: 0.95rem;
}

.rithmic-form-close,
.upload-form-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: #666;
    font-size: 1rem;
    transition: color 0.2s;
}

.rithmic-form-close:hover,
.upload-form-close:hover {
    color: var(--red, #d33e43);
}

/* Rithmic form layout adjustments */
.rithmic-form-expanded .rithmic-login-form {
    padding: 0;
    margin: 0 auto;
    align-items: center;
}

.rithmic-form-expanded .rithmic-form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
}

.rithmic-form-expanded .rithmic-cancel {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
}

.rithmic-form-expanded .rithmic-cancel:hover {
    background: #d1d5db;
}

/* Upload form expanded adjustments */
.upload-form-expanded .upload-widget {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    /* Override desktop grid layout - keep vertical stack in dashboard card */
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: unset !important;
    position: static !important;
    overflow: visible;
    box-sizing: border-box;
    gap: 0.5rem;
    align-items: stretch !important;
    padding-bottom: 0 !important;
    justify-content: flex-start !important;
    height: auto !important;
}

/* Reset absolute positioning from desktop styles for dashboard widget */
.upload-form-expanded .upload-widget .file-input-wrapper {
    position: static !important;
    grid-column: unset !important;
    width: 100% !important;
    left: unset !important;
    right: unset !important;
    top: unset !important;
    bottom: unset !important;
    margin-bottom: 0.5rem;
    flex: none;
}

/* Reset grid-column for all dashboard widget children */
.upload-form-expanded .upload-widget .filter-control,
.upload-form-expanded .upload-widget .checkbox-group,
.upload-form-expanded .upload-widget .btn-try-demo {
    grid-column: unset !important;
    width: 100%;
    margin-top: 0;
    flex: none;
}

/* Ensure upload button stays within bounds */
.upload-form-expanded .upload-widget .btn-try-demo {
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
}

/* Dropzone styling for dashboard upload widget */
.upload-form-expanded .upload-widget .file-input-wrapper .dropzone {
    flex: none;
    min-height: auto;
    margin-bottom: 0;
}

/* Tablet: 2 columns, Upload card full width below */
@media (max-width: 900px) and (min-width: 601px) {
    .import-options-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .import-card:nth-child(3) {
        grid-column: span 2;
        max-width: 50%;
        justify-self: center;
    }
}

/* Mobile: Stack cards vertically */
@media (max-width: 600px) {
    .import-options-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .import-card {
        min-height: auto;
        padding: 14px 12px;
    }
    
    /* Keep header stacked vertically (centered) on mobile */
    .import-card-header {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
    }
    
    /* Stack logos vertically if they overflow */
    .import-card-logos {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        min-height: auto;
    }
    
    .import-logo {
        height: 24px;
        max-width: 100%;
    }
    
    /* Stack buttons vertically on mobile */
    .import-card-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .import-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .rithmic-form-expanded .rithmic-form-row {
        flex-direction: column;
    }
    
    .rithmic-form-expanded .rithmic-field {
        width: 100%;
    }
    
    /* Ensure upload widget fits on mobile */
    .upload-form-expanded .upload-widget {
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
    
    /* Ensure upload button stays within bounds on mobile */
    .upload-form-expanded .upload-widget .btn-try-demo {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Import options wrapper - inherits section-wrap styles but with adjustments */
.import-options-wrap {
    padding-top: 20px;
}

/* =====================
   Theme Toggle Button
   ===================== */
.theme-toggle-btn {
    background: transparent;
    border: 2px solid var(--blue);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    min-width: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    transition: all 0.3s ease;
    padding: 0;
    margin-left: 0.5rem;
}

.theme-toggle-btn:hover {
    background: var(--blue);
    color: var(--grey-bg);
}

.theme-toggle-btn i {
    font-size: 1rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .theme-toggle-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        margin-left: 0;
    }
    .theme-toggle-btn i {
        font-size: 0.9rem;
    }
}