:root {
    --color-navy: #002147;
    --color-navy-dark: #00152e;
    --color-gold: #C5A059;
    --color-gold-light: #e6c885;
    --color-bg: #fdfcf8; /* "Financial Paper" Cream */
    --color-bg-alt: #f4f1ea;
    --color-text: #2c3e50;
    --color-text-light: #555555;
    --color-border: #dcdcdc;
    --color-success: #27ae60;
    --color-danger: #c0392b;
    
    --font-heading: Georgia, 'Times New Roman', Times, serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-elevated: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 18px; /* High readability for target demo */
}

/* --- Navigation --- */
.main-nav {
    background-color: var(--color-navy);
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    gap: 0.75rem;
}

/* --- Filter Bar (inside data section) --- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    flex-wrap: wrap;
}

.filter-select {
    background-color: var(--color-bg-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
    min-width: 140px;
    max-width: 200px;
    transition: all 0.2s;
}

.filter-select:hover, .filter-select:focus {
    border-color: var(--color-gold);
}

.logo {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
    flex-shrink: 0;
}

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

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.25rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-links a:hover { color: var(--color-gold); }

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
    color: white;
    padding: 5rem 1rem;
    text-align: center;
    border-bottom: 6px solid var(--color-gold);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-sub {
    font-size: 1.25rem;
    color: #cccccc;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--color-gold);
    color: var(--color-navy);
    border: 2px solid var(--color-gold);
}

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

/* --- Layout Utils --- */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

section { margin: 4rem 0; }

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.divider {
    height: 3px;
    width: 60px;
    background-color: var(--color-gold);
    margin: 0 auto;
}

/* --- Methodology Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    border-top: 4px solid var(--color-navy);
}

.feature-card h3 {
    color: var(--color-navy);
    margin-top: 0;
}

/* --- Data Table / Cards --- */
.data-container {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-elevated);
    overflow: hidden; /* Contains the table */
}

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

thead {
    background-color: var(--color-navy);
    color: white;
}

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

th { font-weight: normal; letter-spacing: 0.5px; }
td { font-size: 0.95rem; }

/* Numeric Columns Alignment */
td[data-type="currency"], 
td[data-type="number"], 
td[data-type="percent"],
td[data-type="score"] {
    text-align: right;
    font-family: 'Consolas', 'Monaco', monospace; /* Tabular figures */
}

/* Badges */
.badge {
    background-color: var(--color-navy);
    color: var(--color-gold);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Insights/FAQ */
.insights-section {
    background-color: var(--color-bg-alt);
    padding: 3rem;
    border-radius: 8px;
}

.faq-item { margin-bottom: 2rem; }
.faq-item h3 { color: var(--color-navy); margin-bottom: 0.5rem; }

/* Tax Toggle */
.tax-switch-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text-light);
    user-select: none;
}

.tax-switch-container input {
    display: none;
}

.tax-slider {
    width: 36px;
    height: 20px;
    background-color: var(--color-border);
    border-radius: 20px;
    position: relative;
    transition: background 0.3s;
    border: 1px solid var(--color-border);
}

.tax-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.tax-switch-container input:checked + .tax-slider {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
}

.tax-switch-container input:checked + .tax-slider::after {
    transform: translateX(16px);
}

.lang-container {
    position: relative;
    cursor: pointer;
    margin-left: 0;
    padding: 0.5rem;
    color: white;
    flex-shrink: 0;
}

.current-lang {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-arrow {
    font-size: 0.8rem;
    color: var(--color-gold);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--color-navy);
    border: 1px solid var(--color-gold);
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 150px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 4px;
}

.lang-container:hover .lang-dropdown {
    display: block;
}

.lang-dropdown li {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e0e0;
}

.lang-dropdown li:last-child {
    border-bottom: none;
}

.lang-dropdown li:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-gold);
}

/* Ensure flags are sized correctly */
.fi { font-size: 1.2rem; }

footer {
    background: var(--color-navy-dark);
    color: #ccc;
    padding: 3rem 1rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h4 { color: var(--color-gold); font-size: 1.5rem; margin: 0; }
.footer-disclaimer p { font-size: 0.85rem; color: #888; max-width: 500px; }
.footer-bottom { text-align: center; color: #666; font-size: 0.9rem; }


/* --- MOBILE RESPONSIVENESS (The 70%) --- */
@media (max-width: 768px) {
    /* --- Mobile Nav: two-row layout ---
       Row 1: logo | nav-links | auth | lang
       Row 2: search (full width)
    */
    .nav-container {
        height: auto;
        padding: 0.5rem 0;
        flex-wrap: wrap;
        gap: 0.4rem;
        align-items: center;
    }

    .logo {
        font-size: 1.1rem;
        order: 1;
        letter-spacing: 0;
    }

    .nav-links {
        order: 2;
        gap: 0.5rem;
        margin-right: auto;
    }

    .nav-links a {
        font-size: 0.75rem;
    }

    .nav-auth {
        order: 3;
        gap: 0.3rem;
    }

    .nav-user-name { display: none; }
    .nav-avatar { width: 20px; height: 20px; }

    .nav-login-btn, .nav-logout-btn {
        padding: 0.2rem 0.5rem;
        font-size: 0.75rem;
    }

    .lang-container {
        order: 4;
        padding: 0.3rem;
    }

    .lang-arrow { font-size: 0.6rem; }
    .fi { font-size: 1rem; }

    /* Search drops to its own row */
    .nav-search {
        order: 5;
        flex: 1 1 100%;
        margin-top: 0.25rem;
    }

    .hero-content h1 { font-size: 2.2rem; }
}

/* Extra-small phones */
@media (max-width: 374px) {
    .logo {
        font-size: 0.95rem;
    }

    .nav-links {
        gap: 0.3rem;
    }

    .nav-links a {
        font-size: 0.7rem;
    }

    .nav-login-btn, .nav-logout-btn {
        padding: 0.15rem 0.4rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {

    /* Filter bar responsive */
    .filter-bar {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-select {
        width: 100%;
        max-width: none;
    }

    .tax-switch-container {
        width: 100%;
        justify-content: center;
        margin: 0;
        background: var(--color-bg-alt);
        padding: 0.5rem;
        border-radius: 4px;
    }

    /* CARD VIEW TRANSFORMATION — bonds table only */
    #bonds-table, #bonds-table thead, #bonds-table tbody,
    #bonds-table th, #bonds-table td, #bonds-table tr { display: block; }
    #bonds-table thead tr { position: absolute; top: -9999px; left: -9999px; }

    #bonds-table tr {
        margin-bottom: 1.5rem;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: white;
        box-shadow: var(--shadow-card);
        padding: 1rem;
    }

    #bonds-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right !important;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

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

    #bonds-table td::before {
        position: absolute;
        top: 0.75rem;
        left: 0;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--color-text-light);
        content: attr(data-label);
    }

    #bonds-table td[data-label="Symbol"] {
        background-color: var(--color-navy);
        color: var(--color-gold);
        padding: 0.75rem;
        text-align: left !important;
        margin: -1rem -1rem 0.5rem -1rem;
        border-radius: 8px 8px 0 0;
        font-size: 1.2rem;
        font-weight: bold;
        padding-left: 1rem;
    }

    /* Ticker link inside navy header must be gold */
    #bonds-table td[data-label="Symbol"] .ticker-link {
        color: var(--color-gold);
        border-bottom-color: rgba(255,255,255,0.3);
    }

    #bonds-table td[data-label="Symbol"]::before,
    #bonds-table td[data-label="Symbol"]::after { display: none; }

    /* Hide the action "+" column in card view — show as centered row */
    #bonds-table td.bond-actions {
        padding-left: 0;
        text-align: center !important;
        border-bottom: none;
    }
    #bonds-table td.bond-actions::before { display: none; }

    /* Footer stacks on mobile */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-disclaimer p {
        max-width: none;
    }
}

.loading { text-align: center; padding: 4rem; }
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ======================================================
   AUTH & PORTFOLIO STYLES
   ====================================================== */

/* --- Nav Auth Area --- */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-login-btn, .nav-logout-btn {
    background: transparent;
    color: var(--color-gold);
    border: 1px solid var(--color-gold);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font-body);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-login-btn:hover, .nav-logout-btn:hover {
    background: var(--color-gold);
    color: var(--color-navy);
}

.nav-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    vertical-align: middle;
}

.nav-user-name {
    color: #ccc;
    font-size: 0.85rem;
}

/* --- Auth Modal --- */
.auth-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.auth-modal {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: var(--shadow-elevated);
}

.auth-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-light);
    cursor: pointer;
    line-height: 1;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-border);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--color-text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--color-navy);
    border-bottom-color: var(--color-gold);
    font-weight: 600;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-field label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
}

.auth-field input, .auth-field select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.auth-field input:focus, .auth-field select:focus {
    outline: none;
    border-color: var(--color-gold);
}

.auth-error {
    color: var(--color-danger);
    font-size: 0.9rem;
    min-height: 1.2em;
}

.auth-submit {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
}

/* --- Portfolio Auth Gate --- */
.portfolio-auth-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.auth-gate-content {
    text-align: center;
    max-width: 500px;
}

.auth-gate-content h1,
.auth-gate-content h2 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.auth-gate-content p {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.auth-gate-register {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.auth-gate-register a {
    color: var(--color-gold);
    font-weight: 600;
    text-decoration: none;
}

/* --- Portfolio Layout --- */
.portfolio-app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

.portfolio-layout {
    display: flex;
    gap: 1.5rem;
    min-height: 70vh;
}

/* --- Sidebar --- */
.portfolio-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    padding: 1rem;
    align-self: flex-start;
    position: sticky;
    top: 80px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-border);
}

.sidebar-header h3 {
    margin: 0;
    font-family: var(--font-heading);
    color: var(--color-navy);
    font-size: 1.1rem;
}

.btn-icon {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--color-navy);
    color: white;
    border-color: var(--color-navy);
}

.portfolio-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portfolio-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    border-left: 3px solid transparent;
}

.portfolio-list-item:hover {
    background: var(--color-bg-alt);
}

.portfolio-list-item.active {
    background: var(--color-bg-alt);
    border-left-color: var(--color-gold);
}

.portfolio-list-info {
    flex: 1;
    min-width: 0;
}

.portfolio-list-name {
    display: block;
    font-weight: 600;
    color: var(--color-navy);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portfolio-list-meta {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.portfolio-list-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* --- Portfolio Main --- */
.portfolio-main {
    flex: 1;
    min-width: 0;
}

.portfolio-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
}

.portfolio-empty h2 {
    font-family: var(--font-heading);
    color: var(--color-navy);
}

.portfolio-empty p {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

/* --- Summary Cards --- */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    border-top: 4px solid var(--color-navy);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.summary-label {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* --- Top Holdings Styling --- */
.top-holding-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-bg-alt);
}

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

.top-holding-ticker {
    width: 60px;
    font-weight: 800;
    color: var(--color-gold);
    font-size: 0.9rem;
}

.top-holding-info {
    flex: 1;
    min-width: 0;
}

.top-holding-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-holding-bar-container {
    height: 6px;
    background: var(--color-bg-alt);
    border-radius: 3px;
    margin-top: 0.4rem;
    overflow: hidden;
}

.top-holding-bar-fill {
    height: 100%;
    background: var(--color-navy);
    border-radius: 3px;
}

.top-holding-pct {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    width: 45px;
    text-align: right;
}

/* --- Action Bar --- */
.portfolio-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.portfolio-title-area h2 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--color-navy);
}

.portfolio-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 0.4rem;
    background: var(--color-bg-alt);
    color: var(--color-text-light);
}

.portfolio-actions-bar {
    display: flex;
    gap: 0.75rem;
}

/* Badge for Table */
.badge-sector {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

/* --- Global Announcements --- */
.announcement-banner {
    padding: 0.75rem 0;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.ann-info { background: #e0f2fe; color: #0369a1; }
.ann-warning { background: #fef3c7; color: #92400e; }
.ann-danger { background: #fee2e2; color: #b91c1c; }
.ann-success { background: #dcfce7; color: #15803d; }
.announcement-banner .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-navy);
    font-family: var(--font-heading);
}

.summary-sub {
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

/* --- Allocation Section --- */
.allocation-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.allocation-panel {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
}

.allocation-panel h4 {
    margin: 0 0 1rem 0;
    font-family: var(--font-heading);
    color: var(--color-navy);
    font-size: 1rem;
}

.alloc-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.alloc-label {
    width: 120px;
    font-size: 0.85rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.alloc-bar-track {
    flex: 1;
    height: 8px;
    background: var(--color-bg-alt);
    border-radius: 4px;
    overflow: hidden;
}

.alloc-bar-fill {
    height: 100%;
    background: var(--color-navy);
    border-radius: 4px;
    transition: width 0.3s;
}

.alloc-pct {
    width: 40px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-light);
    flex-shrink: 0;
}

.top-holding-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--color-border);
}

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

.top-holding-ticker {
    font-weight: bold;
    color: var(--color-navy);
    width: 60px;
    flex-shrink: 0;
}

.top-holding-name {
    flex: 1;
    font-size: 0.9rem;
    color: var(--color-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-holding-pct {
    font-weight: 600;
    color: var(--color-text);
    flex-shrink: 0;
}

/* --- Holdings Section --- */
.holdings-section {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
}

.holdings-section .data-container {
    overflow-x: auto;
}

#holdings-table {
    min-width: 600px;
}

#holdings-table th,
#holdings-table td {
    padding: 0.75rem 0.6rem;
    font-size: 0.9rem;
}

.holdings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.holdings-header h3 {
    margin: 0;
    font-family: var(--font-heading);
    color: var(--color-navy);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

.holdings-actions {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-end;
}

/* --- Ticker Autocomplete --- */
.ticker-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 4px 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    z-index: 3000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ticker-autocomplete li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.ticker-autocomplete li:last-child { border-bottom: none; }

.ticker-autocomplete li:hover,
.ticker-autocomplete li.ac-active {
    background: var(--color-bg-alt);
}

.ac-ticker {
    font-weight: bold;
    color: var(--color-navy);
    min-width: 60px;
}

.ac-name {
    flex: 1;
    color: var(--color-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-price {
    color: var(--color-text);
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* --- Holding Modal Extra --- */
.holding-modal {
    max-width: 480px;
}

/* --- Portfolio Page Logo as link --- */
a.logo {
    color: white;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

a.logo:hover {
    opacity: 0.9;
}

.nav-links a.active {
    color: var(--color-gold);
}

/* ======================================================
   PORTFOLIO MOBILE RESPONSIVE
   ====================================================== */
@media (max-width: 768px) {
    .portfolio-layout {
        flex-direction: column;
    }

    .portfolio-sidebar {
        width: 100%;
        position: static;
    }

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

    .allocation-section {
        grid-template-columns: 1fr;
    }

    /* Holdings table → card view on portfolio page */
    #holdings-table, #holdings-table thead,
    #holdings-table tbody, #holdings-table th,
    #holdings-table td, #holdings-table tr {
        display: block;
    }

    #holdings-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    #holdings-table tr {
        margin-bottom: 1.5rem;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: white;
        box-shadow: var(--shadow-card);
        padding: 1rem;
    }

    #holdings-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right !important;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

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

    #holdings-table td::before {
        position: absolute;
        top: 0.75rem;
        left: 0;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--color-text-light);
        content: attr(data-label);
    }

    .holdings-actions {
        justify-content: center;
        padding-top: 0.5rem;
    }
}

/* ======================================================
   TICKER LINKS
   ====================================================== */
.ticker-link {
    color: var(--color-navy);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px dashed var(--color-gold);
    transition: color 0.2s;
}

.ticker-link:hover {
    color: var(--color-gold);
}

a.ticker-link.top-holding-ticker {
    width: 60px;
    flex-shrink: 0;
    display: inline-block;
}

/* ======================================================
   NAV SEARCH
   ====================================================== */
.nav-search {
    position: relative;
    flex: 0 1 200px;
}

.nav-search input {
    width: 100%;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.85rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.nav-search input::placeholder {
    color: rgba(255,255,255,0.5);
}

.nav-search input:focus {
    border-color: var(--color-gold);
    background: rgba(255,255,255,0.15);
}

.nav-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 4px 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
    z-index: 3000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    display: none;
}

.nav-search-results li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
    color: var(--color-text);
}

.nav-search-results li:last-child { border-bottom: none; }

.nav-search-results li:hover,
.nav-search-results li.ac-active {
    background: var(--color-bg-alt);
}

/* ======================================================
   BONDS TABLE ACTION COLUMN
   ====================================================== */
.bond-actions {
    text-align: center !important;
    padding: 0.5rem !important;
}

.btn-add-to-portfolio {
    background: none;
    border: 1px solid var(--color-gold);
    border-radius: 4px;
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    transition: all 0.2s;
    line-height: 1;
}

.btn-add-to-portfolio:hover {
    background: var(--color-gold);
    color: var(--color-navy);
}

/* ======================================================
   QUICK ADD TOAST
   ====================================================== */
.quick-add-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--color-navy);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: var(--shadow-elevated);
    z-index: 5000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.quick-add-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ======================================================
   STOCK DETAIL PAGE
   ====================================================== */
.stock-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.stock-not-found {
    text-align: center;
    padding: 4rem 2rem;
}

.stock-not-found h1 {
    font-family: var(--font-heading);
    color: var(--color-navy);
}

/* Stock Header */
.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--color-gold);
}

.stock-header-info {
    flex: 1;
    min-width: 0;
}

.stock-ticker-name {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-navy);
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.stock-ticker {
    color: var(--color-gold);
    letter-spacing: 1px;
}

.stock-dash {
    color: var(--color-text-light);
    margin: 0 0.5rem;
}

.stock-name {
    color: var(--color-navy);
}

.stock-meta {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin: 0;
}

.btn-add-stock {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

/* Stock Cards Grid */
.stock-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

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

.stock-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    border-top: 3px solid var(--color-navy);
}

.stock-card h3 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.stock-price-big {
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-navy);
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

/* Metric rows */
.stock-metric-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stock-metric-grid-wide {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}

.stock-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.stock-metric-label {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.stock-metric-value {
    font-weight: 600;
    color: var(--color-text);
    text-align: right;
}

/* About Section */
.stock-about {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    margin-top: 1.5rem;
}

.stock-about h3 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    margin: 0 0 1rem 0;
}

.stock-description {
    color: var(--color-text);
    line-height: 1.7;
    font-size: 0.95rem;
}

.stock-about-meta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.stock-about-meta a {
    color: var(--color-gold);
    text-decoration: none;
}

.stock-about-meta a:hover {
    text-decoration: underline;
}

/* ======================================================
   STOCK PAGE MOBILE
   ====================================================== */
@media (max-width: 768px) {
    .stock-header {
        flex-direction: column;
    }

    .stock-ticker-name {
        font-size: 1.5rem;
    }

    .btn-add-stock {
        width: 100%;
        text-align: center;
    }

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

    .stock-metric-grid-wide {
        grid-template-columns: 1fr;
    }

    .stock-about-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ======================================================
   RISK LEVEL BADGES
   ====================================================== */
.risk-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.risk-conservative {
    background: #d5e8d4;
    color: #276727;
}

.risk-balanced {
    background: #dae8fc;
    color: #1a5276;
}

.risk-growth {
    background: #fff2cc;
    color: #7d6608;
}

/* ======================================================
   PROFILE PAGE
   ====================================================== */
.profile-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.profile-container h1 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    margin-bottom: 1.5rem;
}

.profile-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow-card);
    border-top: 3px solid var(--color-navy);
}

.profile-avatar-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--color-gold);
    object-fit: cover;
}

/* --- Profile Danger Zone --- */
.profile-danger-zone {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--color-danger);
    border-radius: 8px;
    background: #fdf2f2;
}

.profile-danger-zone h3 {
    font-family: var(--font-heading);
    color: var(--color-danger);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.profile-danger-zone p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.btn-danger {
    background-color: var(--color-danger);
    color: white;
    border: 2px solid var(--color-danger);
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.btn-danger:hover {
    background-color: transparent;
    color: var(--color-danger);
}

/* ======================================================
   SCORE SECTION
   ====================================================== */
.score-section {
    margin-bottom: 1.5rem;
}

.score-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 1rem;
    position: relative;
}

.score-warnings {
    margin-left: auto;
}

.warning-icon {
    font-size: 1.5rem;
    color: #f39c12;
    background: #fff3cd;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    border: 1px solid #ffe69c;
    transition: background 0.2s;
}

.warning-icon:hover {
    background: #ffe69c;
    color: #e67e22;
}

.score-info h3 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    margin: 0 0 0.5rem 0;
}

.score-risk-label {
    margin: 0;
}

/* --- Score Gauge --- */
.gauge-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gauge-inner {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gauge-number {
    font-size: 1.8rem;
    font-weight: bold;
    font-family: var(--font-heading);
    color: var(--color-navy);
    line-height: 1;
}

.gauge-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-label-poor { color: #c0392b; }
.score-label-fair { color: #f39c12; }
.score-label-good { color: #2980b9; }
.score-label-strong { color: #27ae60; }
.score-label-excellent { color: #C5A059; }

/* --- Holdings Breakdown --- */
.score-holdings {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 1rem;
}

.score-holdings h4 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

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

.score-holding-row {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.75rem;
    transition: border-color 0.2s;
}

.score-holding-row.score-weak {
    border-color: var(--color-danger);
    background: #fdf2f2;
}

.score-holding-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.score-holding-ticker {
    font-weight: bold;
    color: var(--color-navy);
    min-width: 60px;
}

.score-holding-name {
    flex: 1;
    color: var(--color-text-light);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.score-weak-tag {
    font-size: 0.7rem;
    background: var(--color-danger);
    color: white;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 600;
}

.score-holding-score {
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 30px;
    text-align: right;
}

/* --- Sub-score Bars --- */
.sub-score-bars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
}

.sub-score-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sub-score-label {
    font-size: 0.75rem;
    color: var(--color-text-light);
    width: 50px;
    flex-shrink: 0;
}

.sub-score-track {
    flex: 1;
    height: 6px;
    background: var(--color-bg-alt);
    border-radius: 3px;
    overflow: hidden;
}

.sub-score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

.sub-score-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text);
    width: 24px;
    text-align: right;
    flex-shrink: 0;
}

/* --- Suggestions --- */
.suggestions-section {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
}

.suggestions-section h4 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

.suggestion-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 1rem 0 0.5rem 0;
    font-weight: 600;
}

.suggestion-card {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.suggestion-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.suggestion-weak-ticker {
    font-weight: bold;
    color: var(--color-danger);
}

.suggestion-weak-score {
    font-size: 0.85rem;
}

.suggestion-reason {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: 0.25rem 0;
}

.suggestion-alternatives {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

.suggestion-alt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
}

.suggestion-alt-ticker {
    font-weight: bold;
    color: var(--color-navy);
    min-width: 60px;
}

.suggestion-alt-name {
    flex: 1;
    font-size: 0.85rem;
    color: var(--color-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-alt-price {
    font-size: 0.85rem;
    color: var(--color-text);
}

.btn-add-suggestion {
    background: none;
    border: 1px solid var(--color-gold);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-add-suggestion:hover {
    background: var(--color-gold);
    color: var(--color-navy);
}

/* Add new grid */
.suggestion-add-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.suggestion-add-ticker {
    font-weight: bold;
    color: var(--color-navy);
    flex: 1;
}

.suggestion-add-name {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
}

.suggestion-add-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.no-suggestions {
    color: var(--color-text-light);
    font-style: italic;
    margin: 0;
}

/* ======================================================
   SECTOR ANALYSIS
   ====================================================== */
.sector-analysis-section {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    margin-top: 1rem;
}

.sector-analysis-section:empty {
    display: none;
}

.sector-analysis-section h4 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

/* Sector Insights */
.sector-insights {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sector-insight {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.sector-insight-warning {
    background: #fff8e1;
    border-left: 3px solid #f39c12;
    color: #7d6608;
}

.sector-insight-info {
    background: #e8f4fd;
    border-left: 3px solid #2980b9;
    color: #1a5276;
}

.sector-insight-opportunity {
    background: #e8f8f0;
    border-left: 3px solid #27ae60;
    color: #1e7e46;
}

.sector-insight-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1.3;
}

.sector-insight-text {
    flex: 1;
}

/* Market Sector Performance Grid */
.market-sectors-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.market-sector-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

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

.market-sector-name {
    flex: 1;
    font-weight: 600;
    color: var(--color-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.market-sector-trend {
    font-weight: bold;
    min-width: 65px;
    text-align: right;
}

.market-sector-score {
    color: var(--color-text-light);
    font-size: 0.85rem;
    min-width: 70px;
    text-align: right;
}

.market-sector-z {
    color: var(--color-text-light);
    font-size: 0.85rem;
    min-width: 45px;
    text-align: right;
}

/* Nav user name as link */
a.nav-user-name {
    color: #ccc;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

a.nav-user-name:hover {
    color: var(--color-gold);
}

/* ======================================================
   SCORE / PROFILE MOBILE
   ====================================================== */
@media (max-width: 768px) {
    .score-header {
        flex-direction: column;
        text-align: center;
    }

    .sub-score-bars {
        grid-template-columns: 1fr;
    }

    .suggestion-add-grid {
        grid-template-columns: 1fr;
    }

    .profile-page {
        padding: 1rem;
    }

    .suggestion-alt {
        flex-wrap: wrap;
    }

    .market-sector-row {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .market-sector-name {
        flex: 1 1 100%;
    }

    .market-sector-trend,
    .market-sector-score,
    .market-sector-z {
        min-width: auto;
        text-align: left;
        font-size: 0.8rem;
    }
}

 / *   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
       H O L D I N G S   T A B L E   E N H A N C E M E N T S 
       = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   * / 
 . h o l d i n g - g r o u p - r o w : h o v e r   { 
         b a c k g r o u n d - c o l o r :   # f 8 f a f c ; 
 } 
 . h o l d i n g - s u b - r o w   { 
         a n i m a t i o n :   f a d e I n R o w   0 . 2 s   e a s e - i n - o u t ; 
 } 
 @ k e y f r a m e s   f a d e I n R o w   { 
         f r o m   {   o p a c i t y :   0 ;   t r a n s f o r m :   t r a n s l a t e Y ( - 5 p x ) ;   } 
         t o   {   o p a c i t y :   1 ;   t r a n s f o r m :   t r a n s l a t e Y ( 0 ) ;   } 
 } 
 
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
         . h o l d i n g - s u b - h e a d e r   { 
                 d i s p l a y :   n o n e   ! i m p o r t a n t ; 
         } 
 } 
  
 