/* VolaraID — Dashboard Theme
   Navy/Gold color scheme with Oswald headings, Raleway body */

:root {
    --navy: #0a1628;
    --navy-light: #132240;
    --navy-card: #1a2d4a;
    --gold: #d4a017;
    --gold-light: #e8b824;
    --gold-dim: rgba(212, 160, 23, 0.3);
    --text: #e0e0e0;
    --text-dim: #a8bbd0;
    --green: #00c853;
    --red: #ff1744;
    --blue: #2196f3;
    --border: rgba(212, 160, 23, 0.2);
    --radius: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --text-xs: 0.65rem;
    --text-sm: 0.75rem;
    --text-base: 0.85rem;
    --text-md: 0.9rem;
    --text-lg: 1rem;
    --text-xl: 1.1rem;
}

/* ── Light Mode ─────────────────────────────────────────── */

body.light,
html.light body {
    --navy: #f0f4fa;
    --navy-light: #e2e8f4;
    --navy-card: #ffffff;
    --gold: #9a6f00;
    --gold-light: #b8860b;
    --gold-dim: rgba(154, 111, 0, 0.15);
    --text: #1a2332;
    --text-dim: #4a5f7a;
    --border: rgba(154, 111, 0, 0.25);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --blue: #1976d2;
}

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

body {
    font-family: 'Raleway', sans-serif;
    background: var(--navy);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────── */

.app-header {
    background: var(--navy-light);
    border-bottom: 2px solid var(--gold);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    flex-shrink: 0;
}

.header-logo {
    height: 36px;
    width: auto;
}

.logo-brand {
    font-family: 'Oswald', sans-serif;
    font-size: 42px;
}
.logo-volara {
    font-weight: 500;
    fill: var(--text);
}
.logo-id {
    font-weight: 700;
    fill: var(--gold);
}

.header-subtitle {
    font-size: var(--text-xs);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Tab Navigation ─────────────────────────────────────── */

.tab-nav {
    display: flex;
    gap: 0.25rem;
}

.tab-link {
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-md);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: all 0.2s;
    border: 1px solid transparent;
    border-bottom: none;
}

.tab-link:hover {
    color: var(--gold-light);
    background: rgba(184, 134, 11, 0.1);
}

.tab-link.active {
    color: var(--gold);
    background: var(--navy);
    border-color: var(--gold);
    border-bottom-color: var(--navy);
    margin-bottom: -2px;
}

.tab-icon {
    margin-right: 0.3rem;
}

/* ── Main Content ───────────────────────────────────────── */

.app-main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.tab-content h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.tab-content > p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    font-size: var(--text-md);
}

/* ── Cards ──────────────────────────────────────────────── */

.card {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.card-header {
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-xl);
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Buttons ────────────────────────────────────────────── */

.btn {
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-base);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--gold);
    color: var(--navy);
}

.btn-primary:hover {
    background: var(--gold-light);
    box-shadow: 0 0 20px rgba(184, 134, 11, 0.4);
}

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

.btn-secondary:hover {
    background: rgba(184, 134, 11, 0.1);
}

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

.btn-danger:hover {
    background: rgba(255, 23, 68, 0.1);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: var(--text-sm);
}

.btn-theme {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    font-size: var(--text-lg);
    line-height: 1;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-theme:hover {
    color: var(--gold);
    border-color: var(--gold);
    background: var(--gold-dim);
}

/* ── Form Elements ──────────────────────────────────────── */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-base);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.form-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: var(--navy);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: 'Raleway', sans-serif;
    font-size: var(--text-md);
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 8px rgba(184, 134, 11, 0.2);
}

.form-input::placeholder {
    color: var(--text-dim);
}

select.form-input {
    cursor: pointer;
}

.form-input-sm {
    padding: 0.35rem 0.55rem;
    font-size: var(--text-sm);
}

/* ── Ticker Pills ───────────────────────────────────────── */

.ticker-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ticker-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--gold-dim);
    color: var(--gold-light);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 1px;
}

.ticker-pill .remove-ticker {
    cursor: pointer;
    opacity: 0.6;
    font-size: var(--text-base);
}

.ticker-pill .remove-ticker:hover {
    opacity: 1;
    color: var(--red);
}

/* ── Badge ──────────────────────────────────────────────── */

.badge {
    display: inline-block;
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    background: var(--gold-dim);
    color: var(--gold);
}

/* ── Period Pills ───────────────────────────────────────── */

.period-pills {
    display: flex;
    gap: 0.3rem;
}

.period-pill {
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-dim);
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-base);
    cursor: pointer;
    transition: all 0.2s;
}

.period-pill:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.period-pill.active {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    font-weight: 600;
}

/* ── Progress Bar ───────────────────────────────────────── */

.progress-container {
    display: none;
    margin: 1.5rem 0;
}

.progress-container.visible {
    display: block;
}

.progress-bar-outer {
    background: var(--navy);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    height: 2rem;
    overflow: hidden;
    position: relative;
}

.progress-bar-inner {
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: var(--radius);
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-base);
    color: var(--text);
    z-index: 1;
}

/* ── Config Grid ────────────────────────────────────────── */

.config-category {
    margin-bottom: 2rem;
}

.config-category h3 {
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-lg);
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
}

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

.config-item {
    position: relative;
}

.config-item.modified .form-input {
    border-color: var(--gold);
    background: rgba(184, 134, 11, 0.05);
}

.config-item .default-hint {
    font-size: var(--text-xs);
    color: var(--text-dim);
    margin-top: 0.2rem;
}

/* ── Autocomplete ──────────────────────────────────────── */

.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-light);
    border: 1px solid var(--gold);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 240px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: var(--shadow);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
    font-size: var(--text-base);
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: rgba(184, 134, 11, 0.15);
}

.autocomplete-symbol {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    color: var(--gold);
    min-width: 60px;
    letter-spacing: 1px;
}

.autocomplete-name {
    color: var(--text-dim);
    font-size: var(--text-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-empty {
    padding: 0.75rem 0.8rem;
    color: var(--text-dim);
    font-size: var(--text-base);
    font-style: italic;
}

/* Staging area — selected tickers before adding */

.staging-area {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.staging-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--green);
    color: var(--navy);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 1px;
}

.staging-remove {
    cursor: pointer;
    font-size: var(--text-md);
    opacity: 0.7;
    line-height: 1;
}

.staging-remove:hover {
    opacity: 1;
}

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

/* ── Toast Notification ────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-base);
    letter-spacing: 1px;
    z-index: 200;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.toast.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.toast-error {
    background: var(--red);
    color: #fff;
}

/* ── Footer ─────────────────────────────────────────────── */

.app-footer {
    text-align: center;
    padding: 1rem;
    color: var(--text-dim);
    font-size: var(--text-sm);
    border-top: 1px solid var(--border);
}

.app-footer p + p {
    margin-top: 0.25rem;
}

/* ── Table Scroll Wrapper ── */
.table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.summary-table {
    min-width: 520px;
}

/* ── Utilities ──────────────────────────────────────────── */

.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }
.text-dim { color: var(--text-dim); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.hidden { display: none !important; }

/* ── Responsive Breakpoints ──────────────────────────────── */

@media (max-width: 900px) {
    .app-main {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .header-logo {
        height: 28px;
    }

    .header-subtitle {
        display: none;
    }

    .tab-nav {
        gap: 0.25rem;
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .tab-link {
        font-size: var(--text-xs);
        padding: 0.35rem 0.6rem;
    }

    .btn-theme {
        margin-left: auto;
    }

    .app-main {
        padding: 1rem 0.75rem;
    }

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

    .form-group {
        min-width: unset;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 0.6rem 0.75rem;
    }

    .header-logo {
        height: 24px;
    }

    .tab-link {
        font-size: var(--text-xs);
        padding: 0.3rem 0.5rem;
    }

    .tab-link .tab-icon {
        display: none;
    }

    .app-main {
        padding: 0.75rem 0.5rem;
    }

    .btn {
        font-size: var(--text-xs);
        padding: 0.4rem 0.75rem;
    }

    .autocomplete-dropdown {
        max-height: 200px;
    }
}

/* ============================================================
   HOME PAGE
   ============================================================ */

/* Shared container */
.home-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* ── Hero ── */
.home-hero {
    position: relative;
    overflow: hidden;
    background: var(--navy);
    border-bottom: 1px solid var(--border);
}

.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 70% 50%, var(--gold-dim) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 50%, rgba(33, 150, 243, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.home-hero .home-container {
    text-align: center;
    position: relative;
    z-index: 1;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.hero-logo-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 1.5rem;
    display: block;
    filter: drop-shadow(0 4px 20px rgba(212, 160, 23, 0.3));
}

.hero-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 1rem;
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 0.9rem 2.5rem;
    font-size: var(--text-lg);
}

/* Hero feature highlights */
.hero-features {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    min-width: 200px;
    flex: 1;
    max-width: 260px;
    backdrop-filter: blur(4px);
    transition: border-color 0.2s, background 0.2s;
}

.hero-feature-item:hover {
    border-color: var(--gold);
    background: var(--gold-dim);
}

.hero-feature-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
}

.hero-feature-name {
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.5px;
}

.hero-feature-desc {
    font-size: var(--text-sm);
    color: var(--text-dim);
    margin-top: 0.1rem;
}

/* Plan saving line */
.plan-saving {
    font-size: var(--text-sm);
    color: var(--green);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* Pro Annual badge variant */
.plan-badge-green {
    background: var(--green);
    color: #fff;
}

/* ── Sections ── */
.home-section {
    border-top: 1px solid var(--border);
}

.home-section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--gold);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 2.5rem;
}

/* ── Capabilities ── */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.capability-card {
    text-align: center;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.capability-icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.capability-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 0.5rem;
}

.capability-desc {
    font-size: var(--text-md);
    color: var(--text-dim);
    line-height: 1.5;
    margin: 0;
}

/* ── Plans ── */
.home-section-plans {
    padding-bottom: 2rem;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
}

.plan-card-featured {
    border: 2px solid var(--gold);
    box-shadow: 0 0 24px var(--gold-dim);
}

.plan-card-trial {
    border: 2px solid transparent;
    background-image: linear-gradient(var(--navy-card), var(--navy-card)), linear-gradient(135deg, var(--gold), #00bcd4);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 20px rgba(212, 160, 23, 0.12);
}

.plan-badge-trial {
    background: linear-gradient(135deg, var(--gold), #00bcd4);
    color: var(--navy-deep);
    font-weight: 700;
}

.plan-badge {
    position: absolute;
    top: -1px;
    right: 1.5rem;
    background: var(--gold);
    color: var(--navy);
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.2rem 0.75rem;
    border-radius: 0 0 var(--radius) var(--radius);
}

.plan-name {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.25rem;
}

.plan-price {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    margin: 0 0 0.25rem;
}

.plan-period {
    font-family: 'Raleway', sans-serif;
    font-size: var(--text-sm);
    color: var(--text-dim);
    font-weight: 400;
}

.plan-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.25rem 0;
}

.plan-features {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.plan-features li {
    font-size: var(--text-md);
    color: var(--text-dim);
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.plan-features li::before {
    content: "✓";
    color: var(--gold);
    font-weight: 700;
    flex-shrink: 0;
}

.plan-features li.plan-feature-dim {
    opacity: 0.45;
}

.plan-features li.plan-feature-dim::before {
    content: "–";
    color: var(--text-dim);
}

.plan-cta {
    width: 100%;
    text-align: center;
    margin-top: auto;
}

.plan-cta:disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

/* ── Home Responsive ── */
@media (max-width: 900px) {
    .capabilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .plans-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }

    .hero-logo-icon { width: 80px; height: 80px; }

    .hero-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .home-container {
        padding: 2rem 1rem;
    }

    .home-hero .home-container {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .hero-logo-icon { width: 72px; height: 72px; }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-features {
        gap: 0.75rem;
    }

    .hero-feature-item {
        min-width: 160px;
        padding: 0.6rem 1rem;
    }
}

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

    .hero-logo-icon { width: 64px; height: 64px; }

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

    .btn-hero {
        padding: 0.8rem 1.5rem;
        width: 100%;
    }

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

    .hero-feature-item {
        max-width: 100%;
        flex: 1 1 100%;
    }
}

/* ── Smooth scroll ── */
html {
    scroll-behavior: smooth;
}

/* ── Hero Premium Label ── */
.hero-premium-label {
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin: 2rem 0 1rem;
    opacity: 0.85;
}

/* ── Hero feature item as link ── */
a.hero-feature-item {
    text-decoration: none;
    color: inherit;
}

/* ── Feature Detail Sections ── */
.feature-details-section {
    background: var(--navy-light);
}

.feature-detail-block {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 80px;
}

.feature-detail-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.feature-detail-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.feature-detail-icon {
    font-size: 2.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.feature-detail-name {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 0.2rem;
}

.feature-detail-tagline {
    font-size: var(--text-md);
    color: var(--text-dim);
    margin: 0;
}

.feature-detail-body {
    font-size: var(--text-md);
    color: var(--text-dim);
    line-height: 1.7;
    margin: 0 0 1.5rem;
    max-width: 780px;
}

.feature-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.feature-metric {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
}

.feature-metric-label {
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    margin-bottom: 0.35rem;
}

.feature-metric-value {
    font-size: var(--text-sm);
    color: var(--text-dim);
    line-height: 1.4;
}

/* Feature detail responsive */
@media (max-width: 900px) {
    .feature-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .feature-metrics-grid {
        grid-template-columns: 1fr;
    }

    .feature-detail-header {
        gap: 0.75rem;
    }

    .feature-detail-icon {
        font-size: 2rem;
    }
}

/* ============================================================
   AUTH NAV
   ============================================================ */

.auth-nav {
    display: flex;
    align-items: center;
    margin-left: 0.5rem;
}

/* Login button */
.btn-auth-login {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: var(--radius);
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.4rem 1rem;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}

.btn-auth-login:hover { opacity: 0.85; }

/* Avatar wrapper */
.auth-avatar {
    position: relative;
    align-items: center;
}

.auth-avatar-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--navy-light);
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s;
}

.auth-avatar-btn:hover { border-color: var(--gold); }

.auth-avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.auth-avatar-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gold);
    background: var(--navy-card);
    border-radius: 50%;
}

/* Dropdown */
.auth-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 200;
    overflow: hidden;
}

.auth-dropdown.open { display: block; }

.auth-dropdown-info {
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.auth-dropdown-name {
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text);
}

.auth-dropdown-email {
    font-size: var(--text-xs);
    color: var(--text-dim);
    word-break: break-all;
}

.auth-dropdown-divider {
    border-top: 1px solid var(--border);
}

.auth-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: var(--text-md);
    color: var(--text-dim);
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.auth-dropdown-item:hover {
    background: var(--navy-light);
    color: var(--text);
}

.auth-dropdown-logout { color: var(--red); }
.auth-dropdown-logout:hover { color: var(--red); }

.auth-dropdown-guide-row { display:flex; align-items:center; gap:0.4rem; }
.auth-dropdown-guide-label { flex:1; }
.auth-dropdown-guide-link {
    font-size:0.72rem; font-weight:600; padding:0.2rem 0.5rem;
    border:1px solid var(--border); border-radius:4px;
    color:var(--text-dim); text-decoration:none;
    transition:background 0.15s, color 0.15s;
    white-space:nowrap;
}
.auth-dropdown-guide-link:hover { background:var(--blue); border-color:var(--blue); color:#fff; }

/* ── FAQ ────────────────────────────────────────────────────────────────────── */
.home-section-faq { padding: 3rem 0 4rem; }
.faq-lang-toggle { display:flex; justify-content:center; gap:0.5rem; margin-bottom:2rem; }
.faq-lang-btn { padding:0.35rem 1.1rem; border:1px solid var(--border); border-radius:20px;
  background:none; color:var(--text-dim); cursor:pointer; font-size:0.82rem;
  transition:background 0.15s, color 0.15s, border-color 0.15s; }
.faq-lang-btn.active { background:var(--blue); border-color:var(--blue); color:#fff; }
.faq-category { margin-bottom:2rem; }
.faq-category-title { font-size:0.9rem; font-weight:700; color:var(--blue);
  margin-bottom:0.75rem; padding-bottom:0.4rem; border-bottom:1px solid var(--border);
  text-transform:uppercase; letter-spacing:0.04em; }
.faq-item { border:1px solid var(--border); border-radius:8px; margin-bottom:0.5rem;
  overflow:hidden; transition:border-color 0.2s; }
.faq-item.open { border-color:var(--blue); }
.faq-q { display:flex; justify-content:space-between; align-items:center;
  padding:0.85rem 1rem; cursor:pointer; font-weight:600; font-size:0.88rem;
  color:var(--text); user-select:none; }
.faq-q::after { content:'▸'; transition:transform 0.2s; font-size:0.75rem;
  color:var(--text-dim); flex-shrink:0; margin-left:0.5rem; }
.faq-item.open .faq-q::after { transform:rotate(90deg); }
.faq-a { padding:0 1rem 1rem 1rem; font-size:0.83rem; color:var(--text-dim);
  line-height:1.7; display:none; }
.faq-item.open .faq-a { display:block; }
@media (max-width:640px) {
  .faq-q { font-size:0.82rem; }
  .faq-a { font-size:0.78rem; }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    padding: 2rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.login-logo-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 0.75rem;
    display: block;
}

.login-logo h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 0.5rem;
}

.login-logo p {
    font-size: var(--text-md);
    color: var(--text-dim);
    margin: 0;
    line-height: 1.5;
}


/* ── Auth Gate (sign-in required screen) ─────────────────────────────── */
.auth-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.auth-gate-card {
    text-align: center;
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.auth-gate-logo {
    width: 72px;
    height: 72px;
}

.auth-gate-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
}

.auth-gate-desc {
    font-size: var(--text-md);
    color: var(--text-dim);
    margin: 0;
    line-height: 1.5;
}

.login-note {
    font-size: var(--text-sm);
    color: var(--text-dim);
    margin: 0;
}

.login-back a {
    font-size: var(--text-sm);
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s;
}

.login-back a:hover { color: var(--gold); }

/* ============================================================
   AUTH MODAL
   ============================================================ */

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-modal-card {
    background: var(--navy);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    z-index: 301;
    overflow: hidden;
}

.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 0;
    gap: 0.75rem;
}

.auth-modal-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.auth-modal-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.auth-modal-close:hover {
    color: var(--text);
    background: var(--navy-light);
}

/* ── Error / Success banner ── */
.auth-error {
    margin: 0.75rem 1.5rem 0;
    padding: 0.6rem 0.875rem;
    background: rgba(255, 23, 68, 0.1);
    border: 1px solid rgba(255, 23, 68, 0.3);
    border-radius: var(--radius);
    color: var(--red);
    font-size: var(--text-sm);
    line-height: 1.4;
}
.auth-success-msg {
    background: rgba(0, 200, 83, 0.1);
    border-color: rgba(0, 200, 83, 0.3);
    color: var(--green);
}

/* ── Panels — all hidden; data-state reveals the active one ── */
.auth-panel {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1.5rem 1.5rem;
}

#authModal[data-state="sign-in"]        #authPanelSignin { display: flex; }
#authModal[data-state="sign-up"]        #authPanelSignup { display: flex; }
#authModal[data-state="forgot-password"] #authPanelForgot { display: flex; }
#authModal[data-state="verify-pending"] #authPanelVerify { display: flex; }

/* ── Tabs ── */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.25rem;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.6rem 0.5rem;
    font-family: 'Raleway', sans-serif;
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}
.auth-tab.active,
.auth-tab:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* ── Form fields group ── */
.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

/* ── Submit button ── */
.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: var(--radius);
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-md);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}
.auth-submit-btn:hover   { background: var(--gold-light); }
.auth-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── CSS-only spinner ── */
.auth-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }


/* ── Link buttons ── */
.auth-link-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: var(--text-sm);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: color 0.15s;
    text-align: center;
}
.auth-link-btn:hover { color: var(--gold); }

.auth-forgot-link { align-self: flex-end; }
.auth-back-link   { align-self: flex-start; }

/* ── Verify panel ── */
.auth-verify-icon {
    font-size: 2.5rem;
    text-align: center;
}
.auth-panel-desc {
    font-size: var(--text-md);
    color: var(--text-dim);
    line-height: 1.5;
    text-align: center;
}
.auth-resend-status {
    font-size: var(--text-sm);
    color: var(--green);
    text-align: center;
    min-height: 1.2em;
}

/* ── Auth provider badge in dropdown ── */
.auth-dropdown-provider {
    display: inline-block;
    font-size: var(--text-xs);
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    background: var(--gold-dim);
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

/* ============================================================
   EXPORT TOOLBAR
   ============================================================ */

.export-toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0.875rem;
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.export-label {
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-right: 0.2rem;
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   PAYMENT & SUBSCRIPTION STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Plan badge in nav dropdown ─────────────────────────────────────────── */
.nav-plan-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold), #e5a800);
    color: var(--navy);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 2px;
}

.auth-dropdown-upgrade {
    color: var(--gold) !important;
    font-weight: 600;
}

/* ── Grace period banner ─────────────────────────────────────────────────── */
.grace-period-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: #b45309;
    color: #fff;
    text-align: center;
    font-size: 0.85rem;
    padding: 8px 16px;
    font-weight: 500;
}

/* ── Payment toast ───────────────────────────────────────────────────────── */
.payment-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 400;
    min-width: 260px;
    max-width: 380px;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    animation: toast-in 0.2s ease;
}

.payment-toast--success { background: #166534; color: #dcfce7; border-left: 4px solid #22c55e; }
.payment-toast--error   { background: #7f1d1d; color: #fee2e2; border-left: 4px solid #ef4444; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Payment / Subscription modals ──────────────────────────────────────── */
.payment-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.payment-modal-card {
    background: var(--navy);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

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

.payment-modal-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.payment-modal-body {
    padding: 20px;
}

.payment-modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.1);
}

/* ── Subscription status rows ─────────────────────────────────────────── */
.sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.sub-row:last-child { border-bottom: none; }
.sub-label { font-size: 0.85rem; color: var(--text-dim); }
.sub-value  { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.sub-expiry-warning {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    background: rgba(180, 83, 9, 0.15);
    border: 1px solid #b45309;
    color: #fbbf24;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}
.light .sub-expiry-warning {
    background: #fef3c7;
    border-color: #d97706;
    color: #92400e;
}

/* ── Upgrade prompt modal ─────────────────────────────────────────────── */
.upgrade-prompt-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* ── Duration picker modal ────────────────────────────────────────────── */
.duration-picker-card {
    max-width: 560px;
}

.duration-picker-subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: -4px 0 16px;
    text-align: center;
}

.duration-options {
    display: flex;
    gap: 10px;
}

.duration-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 12px 16px;
    background: var(--navy-light);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
    color: var(--text);
    text-align: center;
    min-height: 140px;
    justify-content: flex-start;
}

.duration-option:hover {
    border-color: var(--gold);
    background: rgba(212,160,23,0.07);
    box-shadow: 0 4px 16px rgba(212,160,23,0.15);
    transform: translateY(-2px);
}

.duration-option-featured {
    border-color: var(--gold);
    background: rgba(212,160,23,0.06);
    box-shadow: 0 2px 10px rgba(212,160,23,0.12);
}

.duration-option-badge {
    display: inline-block;
    background: var(--gold);
    color: #0d1b2a;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    align-self: center;
}

.duration-option-badge--value {
    background: #3a9e6b;
    color: #fff;
}

.duration-option-spacer {
    height: 20px;
    flex-shrink: 0;
}

.duration-option-label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.duration-option-price {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.2;
    margin-top: 2px;
}

.duration-option-period {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.duration-save {
    font-size: 0.72rem;
    color: #3a9e6b;
    font-weight: 600;
    margin-top: 2px;
}

@media (max-width: 500px) {
    .duration-options {
        flex-direction: column;
    }
    .duration-option {
        flex-direction: row;
        min-height: unset;
        padding: 12px 14px;
        gap: 10px;
        justify-content: flex-start;
        align-items: center;
    }
    .duration-option-spacer {
        display: none;
    }
    .duration-option-badge,
    .duration-option-badge--value {
        margin-bottom: 0;
    }
}

/* ── Mayar payment iframe modal ───────────────────────────────────────── */
.mayar-payment-card {
    max-width: 640px;
    width: 95%;
    height: 85vh;
    max-height: 720px;
    display: flex;
    flex-direction: column;
}

.mayar-iframe-container {
    flex: 1;
    position: relative;
    min-height: 0;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

#mayarPaymentIframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.mayar-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--navy);
    color: var(--text-dim);
    font-size: 0.9rem;
}

@media (max-width: 500px) {
    .mayar-payment-card {
        height: 92vh;
        max-height: none;
    }
}

/* ── Custom dialog & toast system (ui-dialog.js) ─────────────────────── */
.ui-dialog-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 400;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ui-dialog-card {
    background: var(--navy);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px 28px 20px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    animation: uiDialogIn 0.18s ease;
}

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

.ui-dialog-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 10px;
}

.ui-dialog-message {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.55;
    margin: 0 0 18px;
}

.ui-dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.ui-prompt-input {
    margin-top: 14px;
    width: 100%;
    background: var(--navy-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
    padding: 8px 12px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.ui-prompt-input:focus {
    border-color: var(--gold);
}

/* Toast container */
#uiToastContainer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 500;
    pointer-events: none;
}

.ui-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--navy);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    border-radius: 8px;
    padding: 11px 14px;
    min-width: 260px;
    max-width: 360px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.ui-toast--visible {
    opacity: 1;
    transform: translateX(0);
}

.ui-toast--success { border-left-color: #3a9e6b; }
.ui-toast--error   { border-left-color: #e05c5c; }
.ui-toast--warning { border-left-color: #d4a017; }
.ui-toast--info    { border-left-color: #4a9fd4; }

.ui-toast-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.ui-toast--success .ui-toast-icon { color: #3a9e6b; }
.ui-toast--error   .ui-toast-icon { color: #e05c5c; }
.ui-toast--warning .ui-toast-icon { color: #d4a017; }
.ui-toast--info    .ui-toast-icon { color: #4a9fd4; }

.ui-toast-msg {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.4;
}

.ui-toast-close {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0 2px;
    flex-shrink: 0;
    line-height: 1;
}

.ui-toast-close:hover {
    color: var(--text);
}

/* ── Export toolbar lock state ────────────────────────────────────────── */
.export-btn-locked {
    opacity: 0.55;
    cursor: pointer !important; /* still clickable — opens upgrade prompt */
}

.export-lock {
    font-size: 0.75rem;
    margin-left: 2px;
    vertical-align: middle;
}

/* ── Pro feature locked sections ─────────────────────────────────────── */
.section-locked {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.5;
}

.section-locked-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    opacity: 0.65;
    margin-top: 1px;
}

.section-locked a {
    color: var(--gold, #f59e0b);
    text-decoration: underline;
    cursor: pointer;
}

.section-locked a:hover { opacity: 0.8; }

/* Small inline lock badge (used in key metrics grid and prediction summary bar) */
.inline-pro-lock {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-dim);
    padding: 0.15rem 0.45rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.inline-pro-lock a {
    color: var(--gold, #f59e0b);
    text-decoration: underline;
    cursor: pointer;
}

/* ── Danger button ────────────────────────────────────────────────────── */
.btn-danger {
    background: #7f1d1d;
    color: #fee2e2;
    border: 1px solid #ef4444;
}
.btn-danger:hover { background: #991b1b; }

/* ── Research Tab ────────────────────────────────────────────────────── */

.research-wrapper {
    margin-top: 1rem;
}

/* Sub-tab bar */
.research-sub-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 0;
}

.sub-tab {
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-base);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sub-tab:hover {
    color: var(--gold-light);
    background: rgba(184, 134, 11, 0.1);
}

.sub-tab.active {
    color: var(--gold);
    background: var(--navy-card);
    border-color: var(--border);
    border-bottom-color: var(--navy-card);
    margin-bottom: -2px;
}

/* Panels */
.research-panel {
    display: none;
}

.research-panel.active {
    display: block;
}

/* Search bar */
.research-search-bar {
    margin-bottom: 1rem;
}

/* Search input wrapper */
.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    pointer-events: none;
    font-size: 1rem;
}

.search-input-wrapper .search-with-icon {
    padding-left: 2.5rem;
}

.search-clear-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.search-clear-btn:hover {
    opacity: 1;
    color: var(--text);
}

/* Loading state */
.research-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
    color: var(--text-dim);
    font-size: var(--text-md);
}

/* Empty state */
.research-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-dim);
    font-size: var(--text-md);
}

.empty-state-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.empty-state-title {
    font-size: var(--text-md);
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.empty-state-hint {
    font-size: var(--text-sm);
    color: var(--text-dim);
    opacity: 0.6;
}

.research-panel .table-scroll-wrapper {
    max-height: 60vh;
    overflow-y: auto;
}

/* Shareholders table */
.shareholders-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    font-size: var(--text-base);
}

.shareholders-table th {
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--navy-card);
}

.shareholders-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text);
    vertical-align: middle;
}

.shareholders-table th.text-right,
.shareholders-table td.text-right {
    text-align: right;
}

.shareholders-table tbody tr:nth-child(even) {
    background: rgba(212, 160, 23, 0.03);
}

.shareholders-table tbody tr:hover {
    background: rgba(212, 160, 23, 0.05);
}

.research-type-badge {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: var(--gold-dim);
    color: var(--gold);
}

.type-badge-institution {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.type-badge-insider {
    background: var(--gold-dim);
    color: var(--gold);
}

.type-badge-other {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.type-badge-government {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.type-badge-public {
    background: rgba(45, 212, 191, 0.15);
    color: #2dd4bf;
}

/* Free Float filter bar */
.research-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.filter-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-right: 0.25rem;
}
.ff-filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    font-size: var(--text-xs);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
}
.ff-filter-btn:hover:not(.disabled) {
    border-color: var(--gold);
    color: var(--gold);
}
.ff-filter-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-deep);
    font-weight: 600;
}
.ff-filter-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Result info */
.research-result-info {
    font-size: var(--text-sm);
    color: var(--text-dim);
    padding: 0.35rem 0;
    margin-bottom: 0.5rem;
}

/* Skeleton loader */
.skeleton-row {
    height: 1rem;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Pagination */
.research-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.research-page-info {
    font-size: var(--text-sm);
    color: var(--text-dim);
}

/* Feature blur overlay */
.feature-blur-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: var(--radius);
    z-index: 10;
}

.feature-blur-content {
    text-align: center;
    padding: 2rem;
    max-width: 360px;
}

.feature-blur-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.feature-blur-content h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.feature-blur-content p {
    color: var(--text-dim);
    font-size: var(--text-base);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* Holder link (clickable shareholder name) */
.holder-link {
    color: var(--gold);
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px dotted var(--gold-dim);
    transition: color 0.2s, border-color 0.2s;
}
.holder-link:hover {
    color: var(--gold-light);
    border-bottom-color: var(--gold-light);
}

/* HHI concentration colours */
.hhi-low { color: #4ade80; }
.hhi-moderate { color: #fbbf24; }
.hhi-high { color: #f87171; }

/* HHI tooltip */
.hhi-tooltip {
    cursor: help;
    font-size: 0.75em;
    opacity: 0.6;
}
.hhi-tooltip:hover {
    opacity: 1;
}

/* Pro lock icon (inline in table cells) */
.pro-lock-icon {
    cursor: pointer;
    opacity: 0.5;
    font-size: 0.85em;
    transition: opacity 0.2s;
}
.pro-lock-icon:hover {
    opacity: 1;
}
.pro-col-cell .pro-lock-icon {
    display: inline-block;
}

/* Trend button */
.class-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--blue);
    cursor: pointer;
    padding: 1px 5px;
    font-size: 0.75em;
    margin-left: 0.4rem;
    transition: background 0.2s;
    vertical-align: middle;
}
.class-btn:hover {
    background: rgba(96,165,250,0.12);
}
.trend-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--gold);
    cursor: pointer;
    padding: 1px 5px;
    font-size: 0.75em;
    margin-left: 0.4rem;
    transition: background 0.2s;
    vertical-align: middle;
}
.trend-btn:hover {
    background: var(--gold-dim);
}

/* Chart modal */
.chart-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.chart-modal-card {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    max-width: 640px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.chart-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.chart-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: var(--font-heading);
}
.chart-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.chart-modal-close:hover {
    color: var(--text-primary);
}
.chart-modal-body {
    padding: 1.25rem;
    position: relative;
    min-height: 300px;
}
.chart-modal-body canvas {
    width: 100% !important;
    height: 300px !important;
}

/* Sort arrows */
.sort-arrow {
    font-size: 0.7em;
    opacity: 0.5;
    margin-left: 0.25rem;
}
.sort-arrow.active {
    opacity: 1;
    color: var(--gold);
}

/* Relation fallback rows */
.relation-fallback-row {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}
.relation-fallback-row:last-child {
    border-bottom: none;
}

/* Coming Soon */
.research-coming-soon {
    text-align: center;
    padding: 3rem 1rem;
}

.research-coming-soon-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.research-coming-soon h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.research-coming-soon p {
    color: var(--text-dim);
    font-size: var(--text-md);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Research responsive */
@media (max-width: 768px) {
    .research-sub-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .sub-tab {
        font-size: var(--text-xs);
        padding: 0.4rem 0.75rem;
        white-space: nowrap;
    }

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

    .chart-modal-card {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 8px;
    }

    .chart-modal-body canvas {
        height: 250px !important;
    }

    .insight-pills {
        gap: 0.3rem;
    }

    .insight-pill {
        font-size: var(--text-xs);
        padding: 0.25rem 0.6rem;
    }

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

    .ff-summary-grid {
        grid-template-columns: 1fr;
    }
    .ff-summary-card-wide {
        grid-column: span 1;
    }
    .ff-search-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .ff-search-bar .search-input-wrapper {
        flex: 1;
    }
}

/* ── Insights ──────────────────────────────────────────── */

.insight-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.insight-pill {
    font-family: 'Raleway', sans-serif;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.insight-pill:hover {
    color: var(--gold-light);
    border-color: var(--gold-dim);
    background: rgba(212, 160, 23, 0.08);
}

.insight-pill.active {
    color: var(--navy);
    background: var(--gold);
    border-color: var(--gold);
    font-weight: 700;
}

/* Locked (pro) insight pill style */
.insight-pill.locked {
    opacity: 0.55;
    position: relative;
    cursor: pointer;
}
.insight-pill.locked::after {
    content: '\1F512'; /* lock emoji */
    font-size: 0.95em;
    margin-left: 0.4em;
    vertical-align: middle;
    opacity: 0.7;
}

.insights-content-wrap {
    position: relative;
    min-height: 280px;
}

.insight-content {
    min-height: 120px;
}

/* Breadth summary cards */
.insight-breadth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.insight-card {
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
}

.insight-card-label {
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

.insight-card-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

/* ── Foreign Flow Dashboard ─────────────────────────────────────────────── */
.ff-dashboard {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ff-summary-date {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.ff-summary-date strong {
    color: var(--gold);
}
.ff-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}
.ff-summary-card {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--navy-light);
}
.ff-summary-card-wide {
    grid-column: span 2;
}
.ff-summary-label {
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
}
.ff-summary-value {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
}
.ff-summary-tickers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.ff-ticker-chip {
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}
.ff-chip-buy {
    background: rgba(0, 200, 83, 0.12);
    color: var(--green);
}
.ff-chip-sell {
    background: rgba(255, 23, 68, 0.12);
    color: var(--red);
}

/* Foreign Flow search */
.ff-search-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.ff-search-bar .search-input-wrapper {
    flex: 0 1 280px;
}
.ff-result-count {
    font-size: var(--text-sm);
    color: var(--text-dim);
}

/* Foreign Flow sortable headers */
.ff-sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}
.ff-sortable:hover {
    color: var(--gold-light);
}
.ff-sort-arrow {
    font-size: 0.7em;
    color: var(--gold);
    margin-left: 0.2rem;
}

/* Foreign Flow table min-width for 8 columns */
.ff-table {
    min-width: 900px;
}

/* FF filter action bar */
.ff-filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.ff-filter-actions .btn-sm {
    font-size: var(--text-xs);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}
.ff-filter-actions .btn-sm:hover,
.ff-filter-actions .btn-sm.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(184,134,11,0.1);
}

/* FF Anomaly banner */
.ff-anomaly-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: rgba(184,134,11,0.07);
    border: 1px solid rgba(184,134,11,0.2);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}
.ff-anomaly-label {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--gold);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 0.25rem;
}
.ff-anomaly-chip {
    border: 1px solid rgba(184,134,11,0.3) !important;
}
.ff-anomaly-row-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(184,134,11,0.18);
    color: var(--gold);
    margin-left: 5px;
    vertical-align: middle;
}
tr.ff-row-anomaly td:first-child {
    border-left: 2px solid var(--gold);
}

/* FF Sector Heatmap */
.ff-sector-heatmap {
    margin-bottom: 1rem;
}
.ff-sector-label {
    font-size: var(--text-xs);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}
.ff-sector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.4rem;
}
.ff-sector-card {
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.ff-sector-card.ff-sector-buy {
    background: rgba(0,200,83,0.06);
    border-color: rgba(0,200,83,0.2);
}
.ff-sector-card.ff-sector-sell {
    background: rgba(255,23,68,0.06);
    border-color: rgba(255,23,68,0.2);
}
.ff-sector-name {
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-dim);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ff-sector-value {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text);
}
.ff-sector-card.ff-sector-buy .ff-sector-value { color: var(--green); }
.ff-sector-card.ff-sector-sell .ff-sector-value { color: var(--red); }
.ff-sector-meta {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
}

/* ── Data Update Button ──────────────────────────────────── */

.sh-update-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    font-size: var(--text-xs); font-weight: 600; font-family: 'Oswald', sans-serif;
    letter-spacing: 0.4px; text-transform: uppercase;
    background: var(--gold-dim); color: var(--gold);
    border: 1px solid var(--border); border-radius: 4px;
    cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.sh-update-btn:hover {
    background: rgba(212,160,23,0.18); border-color: var(--gold);
}

/* ── Data Update Modal ───────────────────────────────────── */

.du-modal-card { max-width: 500px; width: 95vw; overflow: hidden; }

/* Header inner layout: icon + title/subtitle block */
.du-modal-header-inner {
    display: flex; align-items: center; gap: 0.65rem;
}
.du-modal-icon {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
    background: var(--gold-dim); color: var(--gold);
    border: 1px solid var(--border);
}
.du-modal-title {
    font-size: 1rem; font-weight: 700; margin: 0;
    font-family: var(--font-heading); color: var(--text);
}
.du-modal-subtitle {
    font-size: 0.72rem; color: var(--text-dim); margin: 0.1rem 0 0;
}

.du-modal-body { padding: 1rem 1.25rem; }
.du-modal-footer {
    display: flex; justify-content: flex-end;
    padding: 0.75rem 1.25rem; border-top: 1px solid var(--border);
}

/* Stats row */
.du-stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 0; margin-bottom: 1.25rem;
    background: var(--navy-light);
    border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.du-stat {
    display: flex; flex-direction: column; align-items: center;
    padding: 0.9rem 0.5rem;
    border-right: 1px solid var(--border);
}
.du-stat:last-child { border-right: none; }
.du-stat-value {
    font-size: 1.6rem; font-weight: 700; font-family: 'Oswald', sans-serif; line-height: 1;
}
.du-stat-label {
    font-size: 0.6rem; color: var(--text-dim); text-transform: uppercase;
    letter-spacing: 0.6px; margin-top: 0.25rem; text-align: center;
}
.du-stat-green   { color: var(--green); }
.du-stat-gold    { color: var(--gold); }
.du-stat-neutral { color: var(--text); }

/* Section blocks */
.du-section { margin-bottom: 1.1rem; }
.du-section-label {
    font-size: 0.63rem; font-family: 'Oswald', sans-serif; text-transform: uppercase;
    letter-spacing: 0.7px; color: var(--gold);
    border-left: 2px solid var(--gold); padding-left: 0.45rem;
    margin-bottom: 0.55rem;
}

/* New tickers row */
.du-new-ticker-row {
    display: flex; align-items: center; gap: 0.65rem;
    background: var(--navy-light); border: 1px solid var(--border);
    border-radius: 6px; padding: 0.55rem 0.75rem; margin-bottom: 0.5rem;
}
.du-new-icon {
    width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0;
    background: var(--gold-dim); color: var(--gold);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700;
}
.du-new-desc { font-size: 0.8rem; color: var(--text); margin: 0; }
.du-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.1rem; }
.du-ticker-chip {
    display: inline-block; padding: 0.15rem 0.5rem;
    background: var(--navy-light); border: 1px solid var(--border);
    border-radius: 4px; font-size: 0.7rem; font-weight: 700;
    font-family: 'Oswald', sans-serif; color: var(--gold);
    cursor: default; letter-spacing: 0.4px;
    transition: border-color 0.15s;
}
.du-ticker-chip:hover { border-color: var(--gold); }

/* Investor change rows */
.du-investor-row {
    display: flex; align-items: center; gap: 0.65rem;
    background: var(--navy-light); border: 1px solid var(--border);
    border-radius: 6px; padding: 0.5rem 0.75rem; margin-bottom: 0.35rem;
    font-size: 0.8rem; color: var(--text);
}
.du-investor-icon {
    width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; border: 1px solid var(--border);
}
.du-investor-in  .du-investor-icon { background: rgba(0,200,83,0.1);  color: var(--green); }
.du-investor-out .du-investor-icon { background: rgba(255,23,68,0.1); color: var(--red); }
.du-investor-in  strong { color: var(--green); }
.du-investor-out strong { color: var(--red); }

/* ── Network Button ──────────────────────────────────────── */

.network-btn {
    display: inline-block;
    margin-left: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    color: #4FC3F7;
    border: 1px solid rgba(79,195,247,0.35);
    border-radius: 3px;
    padding: 0 4px;
    vertical-align: middle;
    transition: color 0.2s, border-color 0.2s;
}
.network-btn:hover {
    color: #81D4FA;
    border-color: rgba(79,195,247,0.7);
}

/* ── Network Graph Legend ────────────────────────────────── */

.du-network-legend {
    display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap;
    padding: 0.4rem 0.75rem; font-size: 0.72rem; color: var(--text-dim);
}
.du-legend-dot {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%;
}
.du-legend-center  { background: #FFB703; }
.du-legend-ticker  { background: #4FC3F7; }
.du-legend-inst    { background: #A5D6A7; }
.du-legend-individual { background: #CE93D8; }

/* ── Data Update Modal — investor detail list ──────────────────────── */
.du-modal-card { max-width: 640px; }

.du-stats-grid { grid-template-columns: repeat(4, 1fr); }

.du-stat-red { color: var(--red); }

.du-label-green { color: var(--green); border-left-color: var(--green); }
.du-label-red   { color: var(--red);   border-left-color: var(--red);   }

.du-empty { color: var(--text-dim); font-size: 0.8rem; padding: 0.5rem 0; margin: 0; }

.du-inv-scroll {
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.du-inv-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
}
.du-inv-row:last-child { border-bottom: none; }

.du-inv-type {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 62px;
    text-align: center;
}
.du-type-insider  { background: rgba(206,147,216,0.15); color: #CE93D8; }
.du-type-inst     { background: rgba(129,199,132,0.15); color: #81C784; }
.du-type-other    { background: rgba(148,163,184,0.12); color: var(--text-dim); }

.du-inv-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.du-inv-name    { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.du-inv-company { color: var(--text-dim); font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.du-inv-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}
.du-inv-ticker { color: var(--gold); font-weight: 700; font-size: 0.78rem; }
.du-inv-pct    { color: var(--text-dim); font-size: 0.72rem; }

/* ── Connection Network Modal ─────────────────────────────────────── */
.network-modal-card {
    max-width: 980px;
    width: 95vw;
}

.network-fs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.network-fs-btn:hover {
    color: var(--gold);
    border-color: var(--gold-dim);
    background: rgba(255,183,3,0.08);
}

/* Fullscreen mode — modal card fills the viewport */
#networkModal.network-fs-mode {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}
#networkModal.network-fs-mode .network-modal-card {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}
#networkModal.network-fs-mode .chart-modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0.25rem 0.5rem;
}
#networkModal.network-fs-mode #networkCanvas {
    flex: 1;
    width: 100% !important;
}

/* ── Shareholders Delta Styles ───────────────────────────── */

.delta-btn {
    display: inline-block;
    margin-left: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold-dim);
    cursor: pointer;
    border: 1px solid var(--gold-dim);
    border-radius: 3px;
    padding: 0 4px;
    vertical-align: middle;
    transition: color 0.2s, border-color 0.2s;
}
.delta-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.sh-delta-header {
    display: flex;
    gap: 2rem;
    font-size: var(--text-sm);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.sh-delta-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.sh-delta-badge {
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-family: 'Raleway', sans-serif;
}
.sh-delta-accum { background: rgba(0,200,83,0.12); color: var(--green); }
.sh-delta-dist  { background: rgba(255,23,68,0.12); color: var(--red); }
.sh-delta-new   { background: rgba(33,150,243,0.12); color: var(--blue); }
.sh-delta-exit  { background: rgba(148,163,184,0.12); color: var(--text-dim); }
.sh-delta-ff    { font-size: var(--text-sm); align-self: center; margin-left: auto; }

.sh-row-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
    letter-spacing: 0.3px;
    font-family: 'Oswald', sans-serif;
}
.sh-badge-accum { background: rgba(0,200,83,0.15);  color: var(--green); }
.sh-badge-dist  { background: rgba(255,23,68,0.15);  color: var(--red); }
.sh-badge-new   { background: rgba(33,150,243,0.15); color: var(--blue); }
.sh-badge-exit  { background: rgba(148,163,184,0.1); color: var(--text-dim); }

tr.sh-delta-exited td { opacity: 0.55; }

/* ── Shareholders Screener Panel ──────────────────────────── */

.sh-screener-toggle {
    font-size: var(--text-xs);
    font-weight: 600;
    font-family: 'Raleway', sans-serif;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: all 0.2s;
    white-space: nowrap;
}
.sh-screener-toggle:hover,
.sh-screener-toggle.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(184,134,11,0.1);
}

.sh-screener-panel {
    padding: 1rem;
    background: rgba(184,134,11,0.04);
    border: 1px solid rgba(184,134,11,0.15);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}
.sh-screener-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.sh-screener-label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-dim);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.35rem;
}
.sh-screener-checks {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.sh-check-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-sm);
    color: var(--text-dim);
    cursor: pointer;
}
.sh-screener-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sh-screener-mode-badge {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--gold);
    border: 1px solid rgba(184,134,11,0.3);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-family: 'Oswald', sans-serif;
}

/* ── Shareholders Accumulation Summary Cards ─────────────── */

.sh-accum-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.sh-accum-card {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    min-width: 100px;
    border: 1px solid var(--border);
}
.sh-accum-buy  { background: rgba(0,200,83,0.07); border-color: rgba(0,200,83,0.2); }
.sh-accum-sell { background: rgba(255,23,68,0.07); border-color: rgba(255,23,68,0.2); }
.sh-accum-ticker {
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    font-size: var(--text-sm);
    color: var(--text);
}
.sh-accum-name {
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.sh-accum-flag {
    font-size: 0.65rem;
    font-weight: 700;
    margin-top: 0.2rem;
    font-family: 'Oswald', sans-serif;
}
.sh-accum-buy  .sh-accum-flag { color: var(--green); }
.sh-accum-sell .sh-accum-flag { color: var(--red); }

/* ── Plan feature note (add-on hint inside plan card) ───── */

.plan-feature-note {
    font-size: var(--text-xs);
    color: var(--gold);
    opacity: 0.85;
    font-style: italic;
    list-style: none;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(184, 134, 11, 0.2);
    margin-top: 0.25rem;
}
.plan-feature-note::before {
    content: none;
}

/* ── Shareholders Pro add-on callout ────────────────────── */

.plan-addon-callout {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: rgba(184, 134, 11, 0.06);
    border: 1px solid rgba(184, 134, 11, 0.25);
    border-radius: var(--radius);
}

.plan-addon-callout-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.plan-addon-callout-body {
    flex: 1;
    min-width: 0;
}

.plan-addon-callout-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 0.2rem;
}

.plan-addon-callout-desc {
    font-size: var(--text-xs);
    color: var(--text-dim);
    line-height: 1.5;
}

.plan-addon-callout-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .plan-addon-callout {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .plan-addon-callout-btn {
        width: 100%;
    }
}

/* ── Responsive: Auth modal (mobile) ────────────────────── */

@media (max-width: 480px) {
    .auth-modal-card {
        max-width: 100%;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: var(--radius) var(--radius) 0 0;
    }
    .auth-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
}

/* ── Responsive: Profile dropdown (mobile) ──────────────── */

@media (max-width: 480px) {
    .auth-dropdown {
        position: fixed;
        top: 60px;
        left: 0.5rem;
        right: 0.5rem;
        min-width: unset;
        width: auto;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
}

/* ── Responsive: FF search full-width (mobile) ──────────── */

@media (max-width: 480px) {
    .ff-search-bar .search-input-wrapper {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* ── Responsive: Tab-nav horizontal scroll ──────────────── */

@media (max-width: 640px) {
    .tab-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .tab-nav::-webkit-scrollbar {
        display: none;
    }
    .tab-link {
        flex-shrink: 0;
    }
}

/* ── Shareholders Changelog ─────────────────────────────────── */
.cl-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.cl-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.cl-stat-green { border-color: var(--green); }
.cl-stat-red   { border-color: var(--red); }
.cl-stat-num   { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.cl-stat-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.cl-stat-green .cl-stat-num { color: var(--green); }
.cl-stat-red   .cl-stat-num { color: var(--red); }

.cl-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 1.25rem 0 0.6rem;
}
.cl-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.cl-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
}
.cl-chip-removed { border-color: var(--red); opacity: 0.75; }
.cl-chip-ticker  { font-weight: 700; font-size: 0.82rem; color: var(--blue); }
.cl-chip-name    { font-size: 0.78rem; color: var(--text-dim); }
.cl-chip-count   { font-size: 0.72rem; background: var(--navy-mid); border-radius: 10px; padding: 0.1rem 0.4rem; color: var(--text-dim); }

.cl-accordion-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.cl-accordion-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  background: var(--card-bg);
  user-select: none;
  transition: background 0.15s;
}
.cl-accordion-header:hover { background: var(--navy-mid); }
.cl-acc-ticker { font-weight: 700; color: var(--blue); min-width: 70px; }
.cl-acc-badges { display: flex; gap: 0.4rem; flex: 1; }
.cl-acc-arrow  { color: var(--text-dim); font-size: 0.7rem; transition: transform 0.2s; }

.cl-badge { font-size: 0.7rem; border-radius: 10px; padding: 0.15rem 0.5rem; font-weight: 600; }
.cl-badge-new  { background: rgba(76,175,80,0.15); color: var(--green); }
.cl-badge-exit { background: rgba(239,83,80,0.15); color: var(--red); }

.cl-accordion-body { padding: 0.5rem 1rem; background: var(--bg); }
.cl-inv-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.cl-inv-row:last-child { border-bottom: none; }
.cl-inv-badge {
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  min-width: 34px;
  text-align: center;
}
.cl-inv-badge.new  { background: rgba(76,175,80,0.2); color: var(--green); }
.cl-inv-badge.exit { background: rgba(239,83,80,0.2); color: var(--red); }
.cl-inv-name    { font-weight: 600; color: var(--text); flex: 1; }
.cl-inv-company { color: var(--text-dim); font-size: 0.78rem; flex: 1; }
.cl-inv-pct     { font-weight: 600; color: var(--gold); min-width: 50px; text-align: right; }
.cl-inv-type    { color: var(--text-dim); font-size: 0.72rem; min-width: 70px; text-align: right; }

@media (max-width: 768px) {
  .cl-stats-row { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
}
@media (max-width: 480px) {
  .cl-stats-row { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; margin-bottom: 1rem; }
  .cl-stat { padding: 0.5rem; }
  .cl-stat-num { font-size: 1.2rem; }
  .cl-accordion-header { gap: 0.4rem; padding: 0.5rem 0.75rem; }
  .cl-acc-ticker { min-width: 52px; font-size: 0.82rem; }
  .cl-inv-row { flex-wrap: wrap; gap: 0.3rem; }
  .cl-inv-company { display: none; }
  .cl-inv-pct  { min-width: unset; }
  .cl-inv-type { min-width: unset; }
  .sh-inner-tab { padding: 0.4rem 0.65rem; font-size: 0.75rem; }
}


/* ── Shareholders inner tabs ─────────────────────────────────────────────── */
.sh-inner-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}
.sh-inner-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}
.sh-inner-tab:hover { color: var(--text); }
.sh-inner-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ── Classification panel ────────────────────────────────────────────────── */
.sh-class-search-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.sh-class-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
}
.sh-class-chart-wrap {
    height: 260px;
    position: relative;
}
.sh-class-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}
.sh-class-date, .sh-class-total {
    color: var(--text-dim);
    font-size: 0.78rem;
}
.sh-class-breakdown-table {
    width: 100%;
    min-width: 0; /* override .shareholders-table min-width on mobile */
}
.sh-class-breakdown-table th,
.sh-class-breakdown-table td {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
}
.sh-class-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.4rem;
    flex-shrink: 0;
}
@media (max-width: 680px) {
    .sh-class-layout {
        grid-template-columns: 1fr;
    }
    .sh-class-chart-wrap {
        height: 220px;
    }
    .sh-class-breakdown-table th,
    .sh-class-breakdown-table td {
        font-size: 0.75rem;
        padding: 0.25rem 0.35rem;
    }
}
@media (max-width: 420px) {
    .sh-class-chart-wrap { height: 190px; }
    .sh-class-meta { font-size: 0.78rem; }
}

/* ── Volume Profile ──────────────────────────────────────────────────────── */
.volume-profile-panel { padding: 0; }

.vp-range-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}
.vp-pill {
    background: var(--navy-input, #1e293b);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.vp-pill:hover { border-color: var(--blue); color: var(--blue); }
.vp-pill.active { background: var(--blue); border-color: var(--blue); color: #fff; }

.vp-key-levels {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.vp-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}
.vp-level-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dim);
}
.vp-level-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}
.vp-poc-level .vp-level-label,
.vp-poc-level .vp-level-value { color: var(--gold, #f59e0b); }
.vp-vah-level .vp-level-label { color: var(--blue); }
.vp-val-level .vp-level-label { color: #f97316; }

.vp-position-note {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}
.vp-no-data {
    font-size: 0.8rem;
    color: var(--text-dim);
    padding: 1rem 0;
    text-align: center;
}

/* Bars */
.vp-chart { margin: 0.25rem 0; }
.vp-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1px;
}
.vp-price {
    width: 68px;
    font-size: 0.68rem;
    color: var(--text-dim);
    text-align: right;
    flex-shrink: 0;
}
.vp-bar-wrap {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border-radius: 2px;
    height: 10px;
    position: relative;
    overflow: hidden;
}
.vp-bar {
    height: 100%;
    background: rgba(148,163,184,0.5);
    border-radius: 2px;
    transition: width 0.3s;
}
.vp-bar.vp-poc { background: var(--gold, #f59e0b); }
.vp-bar.vp-va  { background: rgba(96,165,250,0.65); }
.vp-bar.vp-hvn { background: #22c55e; }
.vp-bar.vp-lvn { background: rgba(100,116,139,0.4); }
.vp-pct {
    width: 36px;
    font-size: 0.68rem;
    color: var(--text-dim);
    text-align: right;
    flex-shrink: 0;
}
.vp-node-label {
    width: 28px;
    font-size: 0.58rem;
    font-weight: 700;
    flex-shrink: 0;
    text-align: left;
}
.vp-node-label.hvn { color: #22c55e; }
.vp-node-label.lvn { color: #64748b; }

/* Delta rows */
.vp-delta-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 3px;
}
.vp-delta-price {
    width: 68px;
    flex-shrink: 0;
}
.vp-delta-wrap {
    flex: 1;
    display: flex;
    height: 3px;
    border-radius: 2px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}
.vp-delta-buy  { background: #22c55e; height: 100%; }
.vp-delta-sell { background: #ef4444; height: 100%; }
.vp-delta-spacer { width: 64px; flex-shrink: 0; }

.vp-footnote {
    font-size: 0.67rem;
    color: var(--text-dim);
    margin: 0.6rem 0 0;
    line-height: 1.55;
    opacity: 0.75;
}

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

/* ── VP custom date range picker ─────────────────────────────────────────── */
.vp-custom-picker {
    margin-bottom: 0.85rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.vp-custom-picker.visible { display: block; }
.vp-custom-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.vp-custom-label {
    font-size: 0.75rem;
    color: var(--text-dim, #64748b);
    white-space: nowrap;
}
.vp-date-input {
    background: var(--navy-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.78rem;
    padding: 0.3rem 0.5rem;
    flex: 1;
    min-width: 120px;
    max-width: 160px;
}
.vp-date-input:focus { outline: none; border-color: var(--blue); }
/* Ensure calendar icon is visible in both themes */
.vp-date-input::-webkit-calendar-picker-indicator { filter: invert(0.5); cursor: pointer; }
.vp-recalc-btn {
    background: var(--blue);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.vp-recalc-btn:hover { opacity: 0.85; }
.vp-recalc-btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* Date range subtitle shown inside the BARS card */
.vp-date-range {
    display: block;
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 2px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
@media (max-width: 480px) {
    .vp-date-input { max-width: 100%; }
    .vp-custom-row { gap: 0.4rem; }
}

/* ── Sortable table headers ──────────────────────────────────────────────── */
.sortable-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.sortable-th:hover { color: var(--blue); }
.sortable-th.th-sorted { color: var(--blue); }
.th-sort-icon { font-size: 0.7rem; }

/* ── Insight narrative ───────────────────────────────────────────────────── */
.insight-narrative {
    margin: 0.4rem 0 0.75rem;
    padding: 0.6rem 0.75rem;
    background: rgba(96, 165, 250, 0.07);
    border-left: 3px solid var(--blue);
    border-radius: 0 6px 6px 0;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ── Foreign Flow sparklines ─────────────────────────────────────────────── */
.ff-spark-th  { width: 70px; white-space: nowrap; }
.ff-spark-cell { width: 70px; padding: 0.25rem 0.5rem; }
.ff-sparkline  { display: block; margin: 0 auto; overflow: visible; }
.ff-spark-loading { color: var(--text-dim); font-size: 0.7rem; }

/* ── Wyckoff chart overlay (Sprint 10) ───────────────────────────────────── */
/* ── Wyckoff toggle panels (Weekly + Price Chart) ────────────────────────── */
.wk-weekly-toggle,
.wk-chart-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.3rem 0;
    border-top: 1px solid var(--border);
    cursor: pointer;
}
.wk-weekly-toggle:hover .form-label,
.wk-chart-toggle:hover .form-label { color: var(--blue); }

.wk-weekly-card {
    display: none;
    margin-top: 0.5rem;
}
.wk-weekly-card.open { display: block; }

.wk-chart-body {
    display: none;
    margin-top: 0.5rem;
}
.wk-chart-body.open { display: block; }

.wk-chart-container {
    width: 100%;
    height: 230px;
    border-radius: 6px;
    overflow: hidden;
    background: #0f172a;
}

/* ── Wyckoff fullscreen chart overlay ────────────────────────────────────── */
.wk-chart-fs-btn {
    margin-left: auto;
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
    font-size: 0.75rem;
    padding: 0.1rem 0.35rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s, border-color 0.15s;
}
.wk-chart-fs-btn:hover { color: var(--blue); border-color: var(--blue); }

.wk-fs-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.wk-fs-modal {
    background: var(--surface-2, #0f172a);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: min(960px, 100%);
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.wk-fs-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.wk-fs-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}
.wk-fs-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
    transition: color 0.15s;
}
.wk-fs-close:hover { color: var(--red); }
.wk-fs-container {
    flex: 1;
    width: 100%;
    background: #0f172a;
}

/* ── Toggle arrow animation (Wyckoff Weekly / Price Chart / Score Breakdown) */
.wk-weekly-toggle .section-toggle,
.wk-chart-toggle   .section-toggle,
.wk-factors-toggle .section-toggle {
    display: inline-block;
    transition: transform 0.2s ease;
}
.wk-weekly-toggle.open .section-toggle,
.wk-chart-toggle.open   .section-toggle,
.wk-factors-toggle.open .section-toggle {
    transform: rotate(-180deg);
}

/* ── Daily Brief ─────────────────────────────────────────────────────────── */
.brief-section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    margin-top: 0.25rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}
.brief-phase-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
    font-size: 0.82rem;
}
.brief-phase-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.brief-phase-count {
    margin-left: auto;
    font-weight: 700;
    color: var(--text);
}
.brief-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
/* Compact table used inside Daily Brief cards — overrides 600px min-width */
.brief-table {
    min-width: 0;
    width: 100%;
}
.brief-table td,
.brief-table th {
    padding: 0.35rem 0.5rem;
    white-space: nowrap;
}
.brief-table .brief-col-sector {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .brief-grid-2 { grid-template-columns: 1fr; }
    /* Drop sector column on narrow screens */
    .brief-table .brief-col-sector { display: none; }
}

/* ── Guide language toggle bar ──────────────────────────────────────────── */
.guide-lang-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: var(--navy-light, #0d1f38);
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}
.guide-lang-label {
    font-size: 0.75rem;
    color: var(--text-dim, #64748b);
    margin-right: 0.25rem;
}
.guide-lang-btn {
    font-size: 0.78rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--border, rgba(255,255,255,0.12));
    color: var(--text-dim, #64748b);
    text-decoration: none;
    transition: all 0.15s;
}
.guide-lang-btn:hover {
    color: var(--text, #e2e8f0);
    border-color: var(--blue, #3b82f6);
}
.guide-lang-btn.guide-lang-active {
    background: var(--blue, #3b82f6);
    border-color: var(--blue, #3b82f6);
    color: #fff;
    font-weight: 600;
}
