/* StockView — Reference Header */

.sv-ref-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 8px #0f172a0a;
    backdrop-filter: blur(12px);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #0f172a;
}

.sv-ref-header * {
    box-sizing: border-box;
}

.sv-ref-header a {
    text-decoration: none;
}

.sv-ref-bar {
    width: min(1280px, calc(100% - 32px));
    margin: auto;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Logo */

.sv-ref-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: none;
    color: #0047c1 !important;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -.5px;
    white-space: nowrap;
}

.sv-ref-brand > span:last-child > span {
    color: #0d6efd;
}

.sv-ref-logo {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #0047c1;
    color: #fff;
    font-size: 23px;
    line-height: 1;
}

/* Market ticker */

.sv-ref-ticker {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 11px;
}

.sv-ref-market-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-weight: 700;
}

.sv-ref-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    display: block;
}

.sv-ref-market-status[data-state="open"] {
    color: #198754;
}

.sv-ref-market-status[data-state="open"] .sv-ref-status-dot {
    background: #198754;
}

.sv-ref-market-status[data-state="closed"] .sv-ref-status-dot {
    background: #dc3545;
}

.sv-ref-ticker-divider {
    height: 15px;
    width: 1px;
    background: #dee2e6;
    margin: 0 2px;
}

.sv-ref-ticker-label {
    color: #64748b;
}

.sv-ref-ticker strong {
    font-size: 11px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

/* Search */

.sv-ref-header .sv-ref-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 230px;
    min-width: 145px;
    max-width: 670px;
    margin: 0;
    background: #f8f9fa;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 6px 9px;
    color: #64748b;
}

.sv-ref-header .sv-ref-search:focus-within {
    background: #fff;
    border-color: #155eef;
    box-shadow: 0 0 0 2px #155eef16;
}

.sv-ref-header .sv-ref-search input {
    min-width: 0;
    flex: 1;
    width: 100%;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    padding: 2px 0;
    font-size: 12px;
    color: #0f172a;
}

.sv-ref-header .sv-ref-search button {
    border: 0;
    background: #e5eeff;
    color: #334155;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 12px;
    cursor: pointer;
}

.sv-ref-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

.sv-ref-header .sv-search-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1100;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 9px;
    box-shadow: 0 14px 30px #0f172a1f;
    max-height: 340px;
    overflow: auto;
}

.sv-ref-header .sv-search-panel[hidden] {
    display: none !important;
}

/* Desktop navigation */

.sv-ref-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}

.sv-ref-nav a {
    font-size: 12px;
    font-weight: 550;
    color: #434655;
}

.sv-ref-nav a:hover,
.sv-ref-nav a[aria-current] {
    color: #0047c1;
    font-weight: 700;
}

/* Actions */

.sv-ref-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.sv-ref-lang {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 1px solid #e9ecef;
    border-radius: 7px;
}

.sv-ref-lang a {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    padding: 4px 6px;
    border-radius: 5px;
}

.sv-ref-lang a[aria-current] {
    background: #dcecff;
    color: #0047c1;
}

.sv-ref-portfolio {
    background: #0047c1;
    color: white !important;
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 700;
}

.sv-ref-portfolio:hover {
    background: #003da9;
}

.sv-ref-login {
    font-size: 16px;
    color: #334155;
}

/* User dropdown */

.sv-ref-user {
    position: relative;
}

.sv-ref-user summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    background: #dcecff;
    border-radius: 50%;
    color: #0047c1;
    font-size: 12px;
    font-weight: 800;
}

.sv-ref-user summary::-webkit-details-marker {
    display: none;
}

.sv-ref-user-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    min-width: 185px;
    padding: 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    box-shadow: 0 12px 28px #0f172a1c;
    display: grid;
    gap: 10px;
    font-size: 12px;
}

.sv-ref-user-menu strong {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sv-ref-user-menu a {
    color: #0047c1;
}

.sv-ref-user-menu form {
    margin: 0;
}

.sv-ref-user-menu button {
    background: none;
    border: 0;
    padding: 0;
    color: #dc3545;
    font-size: 12px;
    cursor: pointer;
}

/* Mobile navigation */

.sv-ref-mobile-nav {
    display: none;
}

@media (max-width: 1190px) {
    .sv-ref-ticker {
        display: none;
    }

    .sv-ref-nav {
        gap: 11px;
    }

    .sv-ref-bar {
        gap: 12px;
    }
}

@media (max-width: 850px) {
    .sv-ref-nav {
        display: none;
    }

    .sv-ref-header .sv-ref-search {
        max-width: none;
    }

    .sv-ref-mobile-nav {
        display: flex;
        align-items: center;
        gap: 22px;
        overflow-x: auto;
        padding: 10px 16px;
        border-top: 1px solid #f1f5f9;
        white-space: nowrap;
    }

    .sv-ref-mobile-nav a {
        font-size: 12px;
        color: #475569;
        font-weight: 600;
    }

    .sv-ref-header .sv-ref-bar {
        min-height: 60px;
    }
}

@media (max-width: 560px) {
    .sv-ref-bar {
        width: calc(100% - 20px);
        gap: 9px;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .sv-ref-brand {
        font-size: 16px;
    }

    .sv-ref-logo {
        width: 27px;
        height: 27px;
    }

    .sv-ref-header .sv-ref-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .sv-ref-actions {
        gap: 6px;
    }

    .sv-ref-portfolio {
        padding: 7px 8px;
        font-size: 10px;
    }

    .sv-ref-lang a {
        padding: 3px 4px;
    }

    .sv-ref-login {
        font-size: 11px;
    }
}



/* =========================================
   StockView — StockNow reference header
   Full-width layout correction
========================================= */

.sv-ref-header {
    position: sticky !important;
    top: 0;
    z-index: 1050;
    width: 100%;
    background: #f8f8f8;
    border-bottom: 1px solid #d6d6d6;
    box-shadow: none;
}

.sv-ref-header .sv-ref-bar {
    width: 100% !important;
    max-width: none !important;
    min-height: 49px;
    padding: 0 24px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

.sv-ref-header .sv-ref-brand {
    flex: 0 0 auto;
    margin-right: auto;
    color: #3483ff !important;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -.3px;
}

.sv-ref-header .sv-ref-logo {
    display: none;
}

.sv-ref-center {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 1 670px;
    min-width: 0;
}

.sv-ref-header .sv-ref-search {
    width: 280px;
    min-width: 170px;
    max-width: 670px;
    height: 36px;
    flex: 1 1 280px;
    margin: 0;
    padding: 5px 9px;
    background: #e8e8e8;
    border-radius: 10px;
}

.sv-ref-header .sv-ref-search input {
    text-align: center;
    font-size: 14px;
    font-weight: 400;
}

.sv-ref-header .sv-ref-ticker {
    display: flex;
    padding: 0;
    background: transparent;
    font-size: 16px;
}

.sv-ref-header .sv-ref-market-status {
    color: #e53945;
    font-weight: 400;
}

.sv-ref-header .sv-ref-market-status .sv-ref-status-dot {
    display: none;
}

.sv-ref-header .sv-ref-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.sv-ref-header .sv-ref-nav a {
    color: #3483ff;
    font-size: 16px;
    font-weight: 400;
}

.sv-ref-header .sv-ref-nav a:hover,
.sv-ref-header .sv-ref-nav a[aria-current] {
    color: var(--sv-ink);
}

.sv-ref-header .sv-ref-actions {
    margin-left: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.sv-ref-header .sv-ref-lang {
    border: 0;
    background: transparent;
}

.sv-ref-header .sv-ref-portfolio {
    border-radius: 5px;
    padding: 7px 10px;
}

.sv-ref-header .sv-ref-more {
    position: relative;
}

.sv-ref-header .sv-ref-more summary {
    list-style: none;
    cursor: pointer;
    color: #3483ff;
    font-size: 15px;
    white-space: nowrap;
}

.sv-ref-header .sv-ref-more summary::-webkit-details-marker {
    display: none;
}

.sv-ref-more-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 190px;
    padding: 10px;
    display: grid;
    gap: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px #00000018;
}

.sv-ref-more-panel a {
    color: #3483ff;
    font-size: 13px;
}

/* Medium screens */

@media (max-width: 1450px) {
    .sv-ref-header .sv-ref-bar {
        padding: 0 16px;
        gap: 12px;
    }

    .sv-ref-header .sv-ref-nav {
        gap: 12px;
    }

    .sv-ref-header .sv-ref-nav a {
        font-size: 13px;
    }

    .sv-ref-center {
        flex-basis: 300px;
    }
}

/* Tablet */

@media (max-width: 1100px) {
    .sv-ref-header .sv-ref-nav {
        display: none;
    }

    .sv-ref-header .sv-ref-brand {
        margin-right: auto;
    }

    .sv-ref-center {
        flex: 0 1 320px;
    }
}

/* Mobile */

@media (max-width: 640px) {
    .sv-ref-header .sv-ref-bar {
        min-height: 50px;
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 9px;
    }

    .sv-ref-header .sv-ref-brand {
        font-size: 17px;
    }

    .sv-ref-center {
        order: 3;
        flex: 1 0 100%;
    }

    .sv-ref-header .sv-ref-search {
        width: 100%;
        max-width: none;
        flex: 1;
    }

    .sv-ref-header .sv-ref-actions {
        gap: 8px;
    }

    .sv-ref-header .sv-ref-portfolio {
        display: none;
    }

    .sv-ref-header .sv-ref-lang {
        display: none;
    }
}


/* Google Material Symbols — Header */

.sv-ref-header .material-symbols-outlined {
    font-family: "Material Symbols Outlined" !important;
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    flex-shrink: 0;
}

.sv-ref-header .sv-ref-nav a,
.sv-ref-header .sv-ref-more summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.sv-ref-header .sv-ref-nav a {
    color: var(--sv-ink);
    font-size: 15px;
    font-weight: 400;
}

.sv-ref-header .sv-ref-nav a:hover {
    color: #0758d5;
}

.sv-ref-header .sv-ref-search > .material-symbols-outlined {
    font-size: 21px;
    color: #737373;
}

.sv-ref-header .sv-ref-more summary .material-symbols-outlined {
    font-size: 19px;
}

@media (max-width: 1450px) {
    .sv-ref-header .sv-ref-nav a {
        font-size: 13px;
        gap: 3px;
    }

    .sv-ref-header .sv-ref-nav .material-symbols-outlined {
        font-size: 18px;
    }
}


