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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    padding: 20px;
    color: #1f2937;
    line-height: 1.6;
}

.env-banner {
    background: #111827;
    color: #f9fafb;
    padding: 10px 16px;
    border-radius: 10px;
    margin: 0 auto 16px;
    max-width: 1400px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.env-banner--hidden {
    display: none;
}

.beta-banner {
    background: linear-gradient(90deg, #1e3a5f 0%, #2563eb 100%);
    color: #f9fafb;
    padding: 10px 16px;
    border-radius: 10px;
    margin: 0 auto 16px;
    max-width: 1400px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.beta-banner--hidden {
    display: none;
}

.beta-inquire-btn {
    padding: 6px 14px !important;
    font-size: 0.85em !important;
    background: #fff !important;
    color: #1e3a5f !important;
    border: none !important;
}

.billing-interval-toggle {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.tier-upgrade-banner {
    margin-bottom: 16px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 55%, #ffedd5 100%);
    border: 1px solid #f59e0b;
    border-radius: 10px;
    color: #422006;
    line-height: 1.55;
    font-size: 0.95rem;
    box-shadow: 0 1px 0 rgba(245, 158, 11, 0.15);
}

.tier-upgrade-banner strong {
    display: block;
    color: #78350f;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.tier-upgrade-banner a {
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tier-upgrade-banner a:hover {
    color: #1e40af;
}

.tier-upgrade-banner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.tier-upgrade-banner-actions .btn {
    margin: 0;
}

.daily-picks-upgrade-callout ul.daily-picks-upgrade-list,
.billing-whats-missing-list {
    margin: 10px 0 10px 20px;
    padding: 0;
}

.daily-picks-upgrade-callout ul.daily-picks-upgrade-list li,
.billing-whats-missing-list li {
    margin: 4px 0;
}

.billing-manage-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.billing-plan-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

.dashboard-basic-banner {
    margin-bottom: 12px;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    color: #1e3a8a;
    line-height: 1.55;
    font-size: 0.95rem;
}

.dashboard-basic-banner a {
    margin-left: 8px;
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dashboard-basic-banner a:hover {
    color: #1e40af;
}

.billing-interval-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.billing-save-badge {
    font-size: 0.75em;
    background: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

/* Billing extras: annual / referral / leaderboard / practice */
.billing-extras {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 8px;
}

.billing-perk-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 22px 20px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    min-height: 100%;
}

.billing-perk-annual {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(34, 197, 94, 0.12), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-color: #bbf7d0;
}

.billing-perk-referral {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(37, 99, 235, 0.10), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-color: #bfdbfe;
}

.billing-perk-practice {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(14, 165, 233, 0.12), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-color: #bae6fd;
}

.billing-perk-header h3 {
    margin: 4px 0 0;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    color: #0f172a;
}

.billing-perk-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.billing-perk-lead {
    margin: 8px 0 0;
    color: #475569;
    line-height: 1.5;
    font-size: 0.95rem;
}

.billing-perk-note {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.45;
}

.annual-savings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.annual-savings-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 12px 14px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.annual-savings-plan {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.annual-savings-price {
    font-size: 1.15rem;
    font-weight: 750;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.annual-savings-price span {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin-left: 2px;
}

.annual-savings-save {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #166534;
    background: #dcfce7;
}

.referral-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.referral-code-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
}

.referral-code-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.referral-code-value {
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #f8fafc;
}

.referral-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.referral-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 10px 12px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.referral-stat-value {
    font-size: 1.1rem;
    font-weight: 750;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.referral-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.billing-perk-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.billing-perk-checklist li {
    position: relative;
    padding: 8px 12px 8px 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.4;
}

.billing-perk-checklist li::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.billing-perk-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: auto;
}

.billing-perk-toggle label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #334155;
    line-height: 1.45;
}

@media (max-width: 960px) {
    .billing-extras {
        grid-template-columns: 1fr;
    }

    .annual-savings-grid,
    .referral-stat-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .annual-savings-grid {
        grid-template-columns: 1fr;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: fadeIn 0.5s ease-in;
}

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

header {
    background: var(--bg-gradient);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.portfolio-selector {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

#portfolio-select {
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    color: #1f2937;
    min-width: 180px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#portfolio-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.portfolio-switch-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    flex-shrink: 0;
}

.api-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.status-label {
    font-size: 0.85em;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-badge {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    min-width: 120px;
    text-align: center;
}

.holdings-table .status-badge {
    padding: 4px 10px;
    font-size: 0.75em;
    min-width: auto;
    letter-spacing: 0.4px;
}

.mode-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.mode-paper {
    background: #e0f2fe;
    color: #075985;
}

.mode-live {
    background: #fee2e2;
    color: #991b1b;
}

.status-ok {
    background: #10b981;
    color: white;
}

.status-error {
    background: #ef4444;
    color: white;
}

.status-unknown {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.status-filled,
.status-completed {
    background: #10b981;
    color: white;
}

.status-partially-filled {
    background: #f59e0b;
    color: #111827;
}

.status-new,
.status-accepted,
.status-pending-new,
.status-accepted-for-bidding,
.status-held {
    background: #3b82f6;
    color: white;
}

.status-canceled,
.status-replaced {
    background: #6b7280;
    color: white;
}

.status-rejected,
.status-expired {
    background: #ef4444;
    color: white;
}

.status-submitted {
    background: #8b5cf6;
    color: white;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 20s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

header h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.subtitle {
    opacity: 0.95;
    font-size: 1.2em;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

/* Layout */
.main-layout {
    display: flex;
    min-height: 600px;
}

.sidebar {
    width: 260px;
    background: #f8fafc;
    border-right: 2px solid #e5e7eb;
    padding: 20px 14px;
}

.content-area {
    flex: 1;
    padding: 30px 36px 40px 36px;
    background: white;
}

.nav-group {
    margin-bottom: 18px;
}

.nav-group-title {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin: 10px 8px 8px;
    font-weight: 700;
}

.tab-btn {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.tab-btn:hover {
    background: #eef2ff;
    color: var(--primary-color);
}

.tab-btn.active {
    color: white;
    background: var(--primary-color);
}

.tab-content {
    display: none;
    padding: 0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.section-header > div {
    display: flex;
    gap: 12px;
    align-items: center;
}

.section-header h2 {
    color: #1f2937;
    font-size: 2em;
    font-weight: 700;
    margin: 0;
}

.section-subtitle {
    margin: 8px 0 0 0;
    color: #64748b;
    font-size: 0.95em;
}

.inline-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.broker-layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.broker-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
}

.broker-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.broker-section-header h3 {
    margin: 0;
    font-size: 1.25em;
    color: #111827;
}

.helper-text {
    margin: 6px 0 0 0;
    color: #374151; /* darker muted — readable on white/light fills */
    font-size: 0.9em;
}

.legal-notice {
    margin: 12px 0 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.88em;
    line-height: 1.5;
    color: #374151;
    background: #fffbeb;
    border: 1px solid #fcd34d;
}

.legal-notice a {
    color: #b45309;
    font-weight: 600;
}

.legal-notice--prominent {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-left: 6px solid #f59e0b;
    font-size: 0.9em;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.legal-notice--prominent p:first-child {
    font-size: 1.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-notice--prominent p:first-child::before {
    content: '⚠️';
}

.legal-notice--prominent p {
    margin: 0 0 8px;
}

.legal-notice--prominent p:last-child {
    margin-bottom: 0;
}

.legal-notice--short {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #4b5563;
}

.legal-notice--signup {
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 0.85em;
    line-height: 1.45;
    color: #4b5563;
}

.legal-notice--signup a {
    color: #2563eb;
}

#app-legal-footer {
    margin-top: 32px;
    padding: 16px 0 24px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-size: 0.82em;
    line-height: 1.5;
    color: #6b7280;
}

#app-legal-footer a {
    color: #4b5563;
}

.register-legal-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.register-legal-label input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
}

.verification-overlay {
    z-index: 10001;
}

.verification-card {
    position: relative;
    max-width: 480px;
    max-height: min(92vh, 760px);
    overflow-y: auto;
}

.verification-progress {
    margin: 0 0 8px;
    font-weight: 600;
    color: var(--text-muted, #4b5563);
}

.verification-step {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.verification-step h3 {
    margin: 0 0 8px;
    font-size: 1.05em;
}

.verification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 12px;
}

.totp-setup-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 12px 0 16px;
}

.totp-qr {
    width: 168px;
    height: 168px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.totp-qr img,
.totp-qr canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.totp-manual-entry {
    width: 100%;
    font-size: 0.92em;
}

.totp-manual-entry summary {
    cursor: pointer;
    color: var(--text-muted, #4b5563);
    margin-bottom: 8px;
}

.totp-secret-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.totp-secret-box {
    flex: 1 1 180px;
    font-family: ui-monospace, monospace;
    font-size: 0.85em;
    word-break: break-all;
    background: #f3f4f6;
    padding: 10px;
    border-radius: 6px;
    display: block;
}

.broker-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.broker-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.compact-card {
    padding: 20px;
}

.compact-card h3 {
    margin-top: 0;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.btn:active {
    transform: translateY(0);
}

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

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

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-inline {
    padding: 8px 12px;
    font-size: 0.8em;
    text-transform: none;
    letter-spacing: 0;
}

.order-override-input {
    width: 120px;
    padding: 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85em;
}

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

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

#holdings-table-container {
    margin: 20px 0;
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.holdings-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.holdings-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.holdings-table th {
    padding: 16px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.holdings-table td {
    padding: 16px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
}

.holdings-table tbody tr {
    transition: all 0.2s ease;
}

.holdings-table tbody tr:hover {
    background-color: #f8fafc;
    transform: scale(1.01);
}

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

.gain-positive {
    color: var(--success-color);
    font-weight: 700;
    font-size: 1.05em;
}

.gain-negative {
    color: var(--danger-color);
    font-weight: 700;
    font-size: 1.05em;
}

.last-updated {
    font-size: 0.85em;
    color: #6b7280;
    font-style: italic;
}

.status-message {
    padding: 14px 18px;
    border-radius: 8px;
    margin: 15px 0;
    display: none;
    font-weight: 500;
    box-shadow: var(--card-shadow);
    animation: slideDown 0.3s ease;
}

.status-details {
    margin-top: 8px;
    font-size: 0.9em;
}

.status-details summary {
    cursor: pointer;
    color: var(--text-muted);
}

.status-details ul {
    margin: 8px 0 0 18px;
}

.cash-hint {
    color: var(--text-muted);
    font-size: 0.85em;
}

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

.status-message.show {
    display: block;
}

.status-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.status-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.status-message.info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--primary-color);
}

.holdings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.holding-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--card-shadow);
}

.holding-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-color);
}

.holding-symbol {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.holding-details {
    margin: 12px 0;
    color: #6b7280;
    line-height: 1.8;
}

.holding-details strong {
    color: #1f2937;
    font-weight: 600;
}

.recommendation-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-left: 5px solid var(--primary-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateX(4px);
}

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

.recommendation-tags {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.filters-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-impact-filters {
    flex-wrap: wrap;
    gap: 10px 16px;
}

.admin-impact-filters input[type="number"],
.admin-impact-filters input[type="text"],
.admin-impact-filters select {
    width: auto;
    min-width: 140px;
}

.impact-chart-container {
    margin: 16px 0 20px 0;
    height: 320px;
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    position: relative;
}

.filters-row label {
    font-weight: 600;
    color: #1f2937;
}

.recommendation-symbol {
    font-size: 1.4em;
    font-weight: 700;
    color: #1f2937;
}

.model-badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: #e0e7ff;
    color: #3730a3;
}

.model-consensus {
    background: #dcfce7;
    color: #166534;
}

.model-specific {
    background: #e0e7ff;
    color: #3730a3;
}

.action-badge {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--card-shadow);
}

.action-badge.BUY {
    background: var(--success-color);
    color: white;
}

.action-badge.SELL {
    background: var(--danger-color);
    color: white;
}

.action-badge.HOLD {
    background: var(--warning-color);
    color: white;
}

.confidence-bar {
    background: #e5e7eb;
    border-radius: 10px;
    height: 28px;
    margin: 16px 0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.confidence-fill {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85em;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.reasoning {
    margin-top: 16px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    color: #1f2937;
    line-height: 1.8;
    border: 1px solid #e5e7eb;
}

.reasoning p,
.reasoning strong {
    color: inherit;
}

/* Dashboard list rows that used to be pale grey on white under dark theme */
.dash-list-item {
    padding: 10px 12px;
    margin: 5px 0;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    background: #f3f4f6;
    color: #1f2937;
}

.dash-list-item--up {
    border-left-color: #27ae60;
}

.dash-list-item--down {
    border-left-color: #e74c3c;
}

.dash-list-item__meta {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.85em;
    color: #4b5563;
}

.contrast-note {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef3c7;
    color: #1f2937;
    border: 1px solid #f59e0b;
}

.contrast-note .helper-text,
.contrast-note strong {
    color: inherit;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
    gap: clamp(10px, 1.5vw, 20px);
    margin-bottom: 30px;
}

/* Portfolio dashboard KPI strip: keep all five cards on one row when possible. */
#dashboard-stats.stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(8px, 1.2vw, 16px);
    align-items: stretch;
}

.stat-card {
    background: var(--bg-gradient);
    color: white;
    padding: clamp(12px, 1.6vw, 24px);
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--card-shadow-hover);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 0; /* allow CSS grid children to shrink without clipping */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.stat-value {
    font-size: clamp(1.05rem, 1.7vw + 0.55rem, 2rem);
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
}

.stat-label {
    font-size: clamp(0.7rem, 0.35vw + 0.65rem, 0.95rem);
    opacity: 0.95;
    font-weight: 500;
    position: relative;
    z-index: 1;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#dashboard-stats .stat-value {
    font-size: clamp(0.95rem, 1.35vw + 0.45rem, 1.75rem);
}

#dashboard-stats .stat-label {
    font-size: clamp(0.65rem, 0.3vw + 0.6rem, 0.88rem);
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s;
}

/* Hide trading UI until checkAuth/login succeeds (also inlined in index.html head). */
html.auth-pending .container {
    display: none !important;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    padding: 16px;
    overflow-y: auto;
}

.auth-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    max-height: min(90vh, 720px);
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.auth-card--dialog {
    position: relative;
    padding-top: 40px;
}

.auth-dialog-close {
    position: absolute;
    right: 16px;
    top: 12px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 999px;
}

.auth-dialog-close:hover {
    color: #1f2937;
    background: #f3f4f6;
}

.auth-dialog-footer {
    margin-top: 16px;
}

.auth-forgot-link {
    margin: 8px 0 0;
    text-align: right;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: #818cf8;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
}

.btn-link:hover {
    color: #a5b4fc;
    transform: none;
    box-shadow: none;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    max-height: min(92vh, 900px);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

/* Tall import review: keep actions reachable via scroll inside the dialog */
.portfolio-image-import-modal {
    display: none;
    overflow-y: auto;
    padding: 24px 12px;
    box-sizing: border-box;
}

.portfolio-image-import-modal[style*="display: block"],
.portfolio-image-import-modal.is-open {
    display: block;
}

.portfolio-image-import-modal__content {
    max-width: 960px;
    width: 95%;
    margin: 0 auto 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.portfolio-image-import-meta {
    color: #cbd5e1;
    margin-bottom: 12px;
    line-height: 1.5;
}

.portfolio-image-import-warnings {
    display: none;
    margin-bottom: 12px;
    padding: 12px 14px;
    background: rgba(251, 191, 36, 0.16);
    border: 1px solid rgba(251, 191, 36, 0.45);
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    color: #fef3c7;
    font-size: 0.95rem;
    line-height: 1.55;
}

.close {
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 32px;
    font-weight: 700;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #1f2937;
    background: #f3f4f6;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 0.95em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-group .input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

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

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #f1f5f9;
}

.loading {
    text-align: center;
    padding: 60px 40px;
    color: #6b7280;
    font-size: 1.1em;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #e5e7eb;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: #6b7280;
    font-size: 1.05em;
}

#daily-picks-list .loading-state,
#daily-picks-history-body .loading-state,
.daily-picks-tab-loading .loading-state {
    padding: 28px 16px;
    min-height: 120px;
    justify-content: center;
}

.daily-picks-tab-loading {
    margin: 8px 0 16px;
}

.daily-picks-tab-busy {
    position: relative;
}

.daily-picks-tab-busy #daily-picks-list,
.daily-picks-tab-busy #daily-picks-history-section {
    opacity: 0.55;
    pointer-events: none;
}

#daily-picks-list .spinner,
#daily-picks-history-body .spinner {
    width: 36px;
    height: 36px;
    border-width: 4px;
}

.daily-picks-history-loading-row td {
    padding: 0;
    border-bottom: none;
}

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

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 4px solid var(--danger-color);
    font-weight: 500;
}

.success {
    background: #d1fae5;
    color: #065f46;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 4px solid var(--success-color);
    font-weight: 500;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    box-shadow: var(--card-shadow);
    border-radius: 12px;
    overflow: hidden;
}

table th,
table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

table tr:hover {
    background: #f8fafc;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.leaderboard-you-banner {
    margin: 0 0 14px 0;
    padding: 12px 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.leaderboard-you-id {
    font-size: 1.05rem;
    color: #0f172a;
}

.leaderboard-you-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 6px;
    color: #334155;
}

.leaderboard-scroll {
    max-height: min(60vh, 520px);
    overflow: auto;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
}

.leaderboard-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
}

.leaderboard-row-you td {
    background: rgba(37, 99, 235, 0.12);
    font-weight: 600;
}

.leaderboard-pin-separator td {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 12px;
}

.leaderboard-footnote {
    margin: 10px 0 0 0;
}

#performance-chart-container,
.performance-chart-canvas-host {
    margin: 24px 0;
    height: 400px;
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

#model-performance-chart-container {
    margin: 24px 0;
}

#model-performance-chart-container h3 {
    margin-bottom: 12px;
}

#performance-chart-container canvas,
.performance-chart-canvas-host canvas,
#performance-chart,
#model-performance-chart {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-height: 100%;
}

#portfolio-chart-container {
    margin: 12px 0 24px 0;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

#benchmark-chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

/* Tablet and Mobile Responsive Styles */
@media (max-width: 1024px) {
    .container {
        margin: 0;
        max-width: 100%;
        border-radius: 0;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Header adjustments */
    .header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-controls {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 12px;
    }

    .portfolio-selector,
    .api-status {
        align-items: flex-start;
        flex: 1 1 45%;
        min-width: 150px;
    }

    /* Grid layouts */
    .holdings-grid,
    .stat-cards {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #dashboard-stats.stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    /* Section headers */
    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .section-header > div {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

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

    .inline-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    /* Navigation */
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #e5e7eb;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 12px;
    }

    .nav-group {
        margin-bottom: 0;
    }

    .nav-group-title {
        grid-column: 1 / -1;
        margin-top: 8px;
        font-size: 0.9em;
    }
    
    .tab-btn {
        font-size: 0.9em;
        padding: 10px 12px;
    }

    .content-area {
        padding: 16px 12px;
    }
    
    /* Tables */
    .holdings-table {
        font-size: 0.8em;
        display: block;
        overflow-x: auto;
    }
    
    .holdings-table thead {
        display: none;
    }
    
    .holdings-table tbody {
        display: block;
    }
    
    .holdings-table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 12px;
        background: white;
    }
    
    .holdings-table td {
        display: block;
        text-align: right;
        padding: 8px;
        border: none;
        position: relative;
        padding-left: 50%;
    }
    
    .holdings-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        font-weight: bold;
        text-align: left;
    }
    
    /* Billing table: keep horizontal layout, allow scroll on mobile */
    .billing-table thead,
    .billing-table tbody,
    .billing-table tr,
    .billing-table td {
        display: revert;
    }
    .billing-table td::before {
        content: none;
    }
    .billing-table-wrapper {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Touch-friendly buttons */
    .btn {
        min-height: 44px;
        font-size: 1em;
        padding: 12px 20px;
    }
    
    .btn-sm {
        min-height: 38px;
        padding: 10px 16px;
    }
    
    /* Forms */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        max-width: 400px;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Charts — do not force height:auto on Chart.js hosts (causes runaway resize) */
    canvas {
        max-width: 100%;
    }

    #portfolio-chart-container,
    #performance-chart-container,
    .performance-chart-canvas-host {
        height: 300px !important;
    }

    #performance-chart-container canvas,
    .performance-chart-canvas-host canvas,
    #performance-chart,
    #model-performance-chart,
    #portfolio-performance-chart {
        height: 100% !important;
        max-height: 100%;
    }
    
    /* Filters row */
    .filters-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .filters-row select,
    .filters-row input {
        width: 100%;
    }
    
    /* Auth overlay */
    .auth-card {
        width: 95%;
        max-width: 400px;
        padding: 24px;
    }
    
    /* Collapsible card content on mobile */
    .card {
        margin-bottom: 16px;
    }
    
    .card h3 {
        cursor: pointer;
        user-select: none;
    }
    
    /* Status badges */
    .status-label {
        font-size: 0.85em;
    }
    
    .status-badge {
        font-size: 0.8em;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile devices */
    h1 {
        font-size: 1.5em;
    }
    
    h2 {
        font-size: 1.3em;
    }
    
    h3 {
        font-size: 1.1em;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .nav-group-title {
        grid-column: 1;
    }
    
    .header-controls {
        flex-direction: column;
    }
    
    .portfolio-selector,
    .api-status {
        width: 100%;
    }
    
    .stat-card {
        padding: 14px 10px;
    }

    #dashboard-stats.stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .btn {
        width: 100%;
    }
    
    .section-header > div {
        width: 100%;
    }
    
    /* Make table even more compact */
    .holdings-table {
        font-size: 0.75em;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Dark theme + animated background */
:root {
    --bg-dark: #0b1020;
    --surface-dark: #111827;
    --surface-darker: #0f172a;
    --text-primary: #e2e8f0;
    /* Was #94a3b8 — too close to pale fills / low contrast on dark cards */
    --text-muted: #cbd5e1;
    --text-on-light: #1f2937;
    --muted-on-light: #374151;
    --border-dark: #1f2937;
    --accent-glow: rgba(56, 189, 248, 0.25);
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: -20%;
    z-index: -1;
    background: radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.22), transparent 35%),
        radial-gradient(circle at 80% 10%, rgba(168, 85, 247, 0.22), transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(16, 185, 129, 0.18), transparent 45%);
    filter: blur(20px);
    animation: aurora 18s ease-in-out infinite alternate;
}

body::after {
    animation-duration: 26s;
    mix-blend-mode: screen;
    opacity: 0.8;
}

@keyframes aurora {
    0% { transform: translate3d(-2%, -2%, 0) scale(1); }
    50% { transform: translate3d(2%, 1%, 0) scale(1.05); }
    100% { transform: translate3d(3%, -1%, 0) scale(1.08); }
}

.container {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-dark);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

header {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

.sidebar {
    background: var(--surface-darker);
    border-right: 1px solid var(--border-dark);
}

.content-area {
    background: rgba(15, 23, 42, 0.65);
}

.tier-upgrade-banner {
    background: rgba(146, 64, 14, 0.55);
    border-color: #d97706;
    color: #fef3c7;
}

.tier-upgrade-banner strong {
    color: #fde68a;
}

.tier-upgrade-banner a {
    color: #93c5fd;
}

.tier-upgrade-banner a:hover {
    color: #bfdbfe;
}

.dashboard-basic-banner {
    background: rgba(30, 64, 175, 0.45);
    border-color: #60a5fa;
    color: #dbeafe;
}

.dashboard-basic-banner a {
    color: #93c5fd;
}

.dashboard-basic-banner a:hover {
    color: #bfdbfe;
}

.nav-group-title {
    color: var(--text-muted);
}

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

.tab-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #c7d2fe;
}

.tab-btn.active {
    background: rgba(79, 70, 229, 0.9);
}

.section-header {
    border-bottom: 1px solid var(--border-dark);
}

.section-header h2,
.section-header h3,
.broker-section-header h3,
.recommendation-symbol {
    color: var(--text-primary);
}

.section-subtitle,
.helper-text,
.filters-row label,
.holding-details,
.last-updated {
    color: var(--text-muted);
}

.card,
.broker-section,
.holding-card,
.recommendation-card,
.reasoning,
.impact-chart-container,
#performance-chart-container,
.performance-chart-canvas-host,
#portfolio-chart-container,
.auth-card,
.modal-content {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
}

.reasoning {
    color: var(--text-primary);
}

.dash-list-item {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-dark);
    border-left-width: 4px;
    color: var(--text-primary);
}

.dash-list-item__meta {
    color: #cbd5e1;
}

.contrast-note {
    background: rgba(251, 191, 36, 0.18);
    border-color: rgba(251, 191, 36, 0.55);
    color: #fef3c7;
}

.holding-symbol,
.holding-details strong {
    color: #c7d2fe;
}

.holdings-table,
table {
    background: rgba(15, 23, 42, 0.85);
}

.holdings-table td,
table td {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-dark);
}

.holdings-table tbody tr:hover,
table tr:hover {
    background: rgba(59, 130, 246, 0.08);
}

table th {
    background: rgba(30, 41, 59, 0.9);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-dark);
}

.status-message.success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #a7f3d0;
}

.status-message.error {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fecaca;
}

.status-message.info {
    background-color: rgba(59, 130, 246, 0.15);
    color: #bfdbfe;
}

.status-message.warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #fde68a;
}

.form-group input,
.form-group select,
.form-group textarea,
#portfolio-select,
.order-override-input {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-primary);
    border: 1px solid var(--border-dark);
}

.form-group label {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.btn-secondary {
    background: #334155;
}

.btn-secondary:hover {
    background: #475569;
}

.model-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
}

.model-consensus {
    background: rgba(16, 185, 129, 0.2);
    color: #bbf7d0;
}

.grok-prompt-card {
    background: rgba(15, 23, 42, 0.92);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-dark);
    margin-bottom: 20px;
}

.grok-prompt-block {
    margin-bottom: 16px;
}

.grok-prompt-label {
    color: var(--text-primary);
    display: inline-block;
    margin-bottom: 8px;
}

.grok-prompt-pre {
    background: rgba(2, 6, 23, 0.85);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 0.95em;
}

.grok-prompt-pre--scroll {
    max-height: 500px;
    overflow-y: auto;
}

.grok-prompt-tip {
    background: rgba(59, 130, 246, 0.16);
    color: #bfdbfe;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #60a5fa;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.metric-row strong {
    color: var(--text-primary);
    font-weight: 700;
}

.metric-row:last-of-type {
    border-bottom: none;
    margin-bottom: 12px;
}

/* Basic dashboard: inconspicuous, plain, monospace, no charts */
#dashboard-content.dashboard-basic {
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
    font-size: 14px;
    color: #374151;
}

#dashboard-content.dashboard-basic [data-basic-hide] {
    display: none !important;
}

#dashboard-content.dashboard-basic .stats-grid,
#dashboard-content.dashboard-basic .stat-card {
    background: #fafafa;
    color: #374151;
    transform: none;
    box-shadow: none;
    border: 1px solid #e5e7eb;
}

#dashboard-content.dashboard-basic .stat-card::before {
    display: none;
}

#dashboard-content.dashboard-basic .stat-card:hover {
    transform: none;
}

#dashboard-content.dashboard-basic .stat-label {
    font-size: clamp(0.65rem, 0.3vw + 0.6rem, 0.85rem);
    opacity: 0.9;
}

#dashboard-content.dashboard-basic .stat-value {
    font-size: clamp(0.9rem, 1.2vw + 0.45rem, 1.35rem);
}

#dashboard-content.dashboard-basic #top-performers > div,
#dashboard-content.dashboard-basic #underperformers > div,
#dashboard-content.dashboard-basic #recent-activity .activity-item,
#dashboard-content.dashboard-basic .dash-list-item {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #6b7280;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 0;
    color: #1f2937;
}

#dashboard-content.dashboard-basic #recent-activity .activity-item__meta,
#dashboard-content.dashboard-basic .dash-list-item__meta {
    color: #4b5563;
}

/* Recent Activity: dark-theme cards (avoid white boxes + inherited light text) */
.activity-item {
    padding: 10px 12px;
    margin: 5px 0;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-dark, #1f2937);
    border-left: 4px solid #667eea;
    border-radius: 6px;
    color: var(--text-primary, #e2e8f0);
}

.activity-item strong {
    color: #e2e8f0;
    font-weight: 700;
}

.activity-item__meta {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.85em;
    color: #cbd5e1;
}

#dashboard-content.dashboard-basic h3 {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 16px 0 8px;
}

/* Congress sub-tabs */
.congress-subtab {
    padding: 8px 18px;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    border-radius: 0;
    transition: color 0.15s, border-color 0.15s;
}

.congress-subtab:hover {
    color: var(--text-primary, #111827);
}

.congress-subtab--active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    font-weight: 600;
}

/* Dashboard insights (daily picks + recommendations preview) */
.dashboard-insights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-insight-panel {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-dark, #1f2937);
    border-radius: 10px;
    padding: 16px 18px;
}

.dashboard-insight-link {
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-insight-link:hover {
    text-decoration: underline;
}

.dashboard-insight-card {
    padding: 12px 14px;
    margin: 8px 0 0;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    border-left: 4px solid #667eea;
    color: #e2e8f0;
}

/* Symbol + action + target + confidence headline (daily picks & portfolio AI previews) */
.pick-headline {
    font-size: 1rem;
    line-height: 1.5;
    color: #f1f5f9;
}

.pick-headline-symbol {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #f8fafc;
}

.pick-headline-action {
    margin-left: 0.4em;
    font-weight: 700;
    color: #e2e8f0;
}

.pick-headline-action.BUY {
    color: #34d399;
}

.pick-headline-action.SELL {
    color: #f87171;
}

.pick-headline-action.HOLD {
    color: #fbbf24;
}

.pick-headline-detail {
    font-weight: 500;
    color: #e2e8f0;
}

.pick-reasoning {
    margin: 10px 0 0;
    color: #cbd5e1;
    line-height: 1.55;
    font-size: 0.92rem;
}

@media (max-width: 960px) {
    .dashboard-insights-grid {
        grid-template-columns: 1fr;
    }
}

/* Daily Picks tab: the pick list is the focus of this page - give it real
   visual weight instead of reusing the plain, unpadded .card look. */
#daily-picks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.daily-pick-card {
    position: relative;
    padding: 20px 22px;
    border-radius: 14px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-left: 5px solid var(--success-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.92) 65%);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.daily-pick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.daily-pick-card[data-action="SELL"] {
    border-left-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(15, 23, 42, 0.92) 65%);
}

.daily-pick-card[data-action="HOLD"] {
    border-left-color: var(--warning-color);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.92) 65%);
}

.daily-pick-card.daily-pick-top {
    border-left-width: 7px;
    box-shadow: 0 12px 32px rgba(56, 189, 248, 0.35);
}

.daily-pick-symbol {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #f8fafc;
    margin-right: 10px;
}

.pick-new-badge {
    font-size: 0.7em;
    background: #0ea5e9;
    color: #fff;
    vertical-align: middle;
}

.pick-first-seen {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    vertical-align: middle;
    margin-left: 2px;
}

.daily-picks-history-symbol {
    min-width: 11rem;
    vertical-align: top;
}

.daily-picks-history-symbol .pick-symbol-name {
    display: block;
    letter-spacing: 0.02em;
}

.daily-picks-history-symbol .pick-symbol-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 4px;
}

.daily-picks-history-symbol .pick-first-seen,
.daily-picks-history-symbol .pick-new-badge {
    margin-left: 0;
}

.daily-pick-rank-badge {
    position: absolute;
    top: -10px;
    left: 16px;
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 999px;
    background: #38bdf8;
    color: #0b1020;
    box-shadow: 0 4px 10px rgba(56, 189, 248, 0.5);
}

.daily-pick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.daily-pick-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 96px;
}

.daily-pick-stat-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #cbd5e1;
}

.daily-pick-stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f1f5f9;
}

.pick-ret.up { color: #16a34a; }
.pick-ret.down { color: #dc2626; }
.pick-ret.muted { color: #94a3b8; }

.daily-picks-history-section {
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.daily-picks-history-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.daily-picks-history-nav-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.daily-picks-history-day-center {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 160px;
}

.daily-picks-history-day-label {
    text-align: center;
    font-weight: 650;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.daily-picks-history-date-label select {
    min-width: 160px;
    max-width: 220px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.daily-picks-history-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 12px;
}

.daily-picks-history-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 96px;
}

.daily-picks-history-row:hover {
    background: rgba(56, 189, 248, 0.08);
}

.daily-picks-disclaimers {
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.daily-pick-horizon-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.daily-pick-horizon-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 72px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.daily-pick-horizon-chip.is-active {
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(56, 189, 248, 0.12);
}

.daily-pick-horizon-chip .chip-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cbd5e1;
}

.daily-pick-horizon-chip .chip-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
}

.daily-picks-horizon-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    flex-wrap: wrap;
}

.daily-picks-horizon-row label {
    font-size: 0.85rem;
    color: #cbd5e1;
    font-weight: 600;
}

.daily-picks-horizon-row select {
    min-width: 120px;
}

.daily-pick-meta {
    margin: 8px 0 0;
    font-size: 0.9em;
    color: #cbd5e1;
    line-height: 1.45;
}

.daily-pick-card .daily-pick-meta {
    color: #cbd5e1;
}

.market-forecast-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.market-forecast-summary-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.forecast-outlook-badge {
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.forecast-outlook-badge.outlook-bullish { background: rgba(22, 163, 74, 0.22); color: #bbf7d0; border: 1px solid rgba(74, 222, 128, 0.35); }
.forecast-outlook-badge.outlook-bearish { background: rgba(220, 38, 38, 0.18); color: #fecaca; border: 1px solid rgba(248, 113, 113, 0.35); }
.forecast-outlook-badge.outlook-neutral { background: rgba(100, 116, 139, 0.22); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.35); }
.forecast-outlook-badge.outlook-mixed { background: rgba(234, 88, 12, 0.18); color: #fed7aa; border: 1px solid rgba(251, 146, 60, 0.35); }

.forecast-summary-text {
    flex: 1;
    line-height: 1.65;
    color: var(--text-primary);
    font-size: 1rem;
}

.market-forecast-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.forecast-metric {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.forecast-metric-wide {
    grid-column: 1 / -1;
}

.forecast-metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.forecast-metric-value {
    font-size: 0.98rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.market-forecast-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.market-forecast-panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.forecast-chart-container {
    height: 280px;
    position: relative;
    overflow: hidden;
}

.forecast-chart-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-height: 100%;
}

.forecast-chart-empty {
    margin: 0;
    padding: 24px 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.forecast-list-item {
    border-left: 3px solid #cbd5e1;
    padding: 8px 0 8px 12px;
    margin-bottom: 12px;
}

.forecast-list-item.impact-positive { border-left-color: #16a34a; }
.forecast-list-item.impact-negative { border-left-color: #dc2626; }
.forecast-list-item.severity-high { border-left-color: #dc2626; }
.forecast-list-item.severity-medium { border-left-color: #d97706; }
.forecast-list-item.severity-low { border-left-color: #64748b; }
.forecast-list-item.outlook-item-bullish { border-left-color: #16a34a; }
.forecast-list-item.outlook-item-bearish { border-left-color: #dc2626; }

.forecast-list-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.forecast-tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-left: 6px;
}

.forecast-list-item p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.helper-text,
.forecast-chart-empty,
#market-forecast-meta {
    color: var(--text-muted);
}

.market-summary-panel {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #38bdf8;
    background: rgba(14, 165, 233, 0.12);
    color: var(--text-primary);
}

.market-summary-panel h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.code-panel {
    white-space: pre-wrap;
    background: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-dark, #1f2937);
}

.code-panel-iframe {
    width: 100%;
    min-height: 420px;
    border: 1px solid var(--border-dark, #1f2937);
    background: #fff;
}

/* Safety net: pale inline fills under dark theme keep dark ink (not inherited slate) */
.content-area [style*="background: #f"],
.content-area [style*="background:#f"],
.content-area [style*="background: white"],
.content-area [style*="background:white"],
.content-area [style*="background: #fff"],
.content-area [style*="background:#fff"],
.modal [style*="background: #f"],
.modal [style*="background:#f"],
.modal [style*="background: white"],
.modal [style*="background:white"] {
    color: var(--text-on-light, #1f2937);
}

.content-area [style*="background: #f"] .helper-text,
.content-area [style*="background:#f"] .helper-text,
.content-area [style*="background: white"] .helper-text,
.content-area [style*="background:white"] .helper-text,
.modal [style*="background: #f"] .helper-text,
.modal [style*="background:#f"] .helper-text {
    color: var(--muted-on-light, #374151);
}

/* Auth/modals: muted labels stay clearly above dark surfaces */
.auth-card .helper-text,
.modal-content .helper-text,
.modal-content small {
    color: var(--text-muted);
}

.auth-card .form-group label,
.modal-content .form-group label {
    color: #e2e8f0;
}

/* ===== Notifications tab ===== */
.notifications-lead {
    margin: -4px 0 20px;
    max-width: 52rem;
}

.notifications-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.notifications-panel {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--border-dark, #1f2937);
    border-radius: 12px;
    padding: 18px 18px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.notifications-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.notifications-panel__header h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 650;
    color: var(--text-primary, #e2e8f0);
}

.notifications-panel__header .helper-text {
    margin: 0;
}

.notifications-panel__actions {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.notification-pref-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-pref-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.35);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.notification-pref-row:hover {
    border-color: rgba(129, 140, 248, 0.45);
    background: rgba(30, 41, 59, 0.55);
}

.notification-pref-row input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: #818cf8;
}

.notification-pref-row__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.notification-pref-row__title {
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    line-height: 1.3;
}

.notification-pref-row__hint {
    font-size: 0.85em;
    color: var(--text-muted, #cbd5e1);
    line-height: 1.35;
}

.notification-pref-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-pref-lookback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 0 28px;
    font-size: 0.9em;
    color: var(--text-muted, #cbd5e1);
}

.notification-pref-lookback__label {
    font-weight: 500;
    color: var(--text-primary, #e2e8f0);
}

.notification-pref-lookback input[type="number"] {
    width: 5.5rem;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.45);
    color: var(--text-primary, #e2e8f0);
}

.notification-pref-lookback__hint {
    font-size: 0.85em;
    color: var(--text-muted, #94a3b8);
}

.price-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 4rem;
}

.price-alerts-empty {
    padding: 28px 16px;
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    background: rgba(2, 6, 23, 0.25);
}

.price-alerts-empty__title {
    margin: 0 0 6px;
    font-weight: 650;
    color: var(--text-primary, #e2e8f0);
}

.price-alerts-empty .helper-text {
    margin: 0;
}

.price-alert-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.35);
}

.price-alert-card__topline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.price-alert-card__symbol {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #f8fafc;
}

.price-alert-status {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.price-alert-status.is-active {
    color: #bbf7d0;
    background: rgba(22, 163, 74, 0.18);
    border-color: rgba(74, 222, 128, 0.35);
}

.price-alert-status.is-triggered {
    color: #e2e8f0;
    background: rgba(100, 116, 139, 0.25);
    border-color: rgba(148, 163, 184, 0.35);
}

.price-alert-card__condition {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    color: var(--text-primary, #e2e8f0);
}

.price-alert-card__price {
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.price-alert-card__meta {
    margin: 0;
    font-size: 0.82em;
    color: var(--text-muted, #cbd5e1);
}

.price-alert-chip {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    border-radius: 6px;
}

.price-alert-chip--above {
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.22);
}

.price-alert-chip--below {
    color: #fecaca;
    background: rgba(220, 38, 38, 0.2);
}

.price-alert-card__actions .btn-sm {
    padding: 6px 10px;
    font-size: 0.85em;
}

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