/* 
   Indian Stock Analysis AI Workstation
   Premium Glassmorphic Dark-Slate Theme Stylesheet
*/

:root {
    --bg-main: #060913;
    --bg-sidebar: #0b0f1d;
    --bg-card: rgba(18, 25, 41, 0.7);
    --bg-card-hover: rgba(26, 36, 59, 0.85);
    --border-glass: rgba(255, 255, 255, 0.06);
    
    --color-primary: #3b82f6;
    --color-primary-glow: rgba(59, 130, 246, 0.3);
    --color-emerald: #10b981;
    --color-emerald-glow: rgba(16, 185, 129, 0.25);
    --color-crimson: #ef4444;
    --color-crimson-glow: rgba(239, 68, 68, 0.25);
    --color-amber: #f59e0b;
    --color-amber-glow: rgba(245, 158, 11, 0.25);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-main: #f3f4f6;
    --bg-sidebar: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --border-glass: rgba(0, 0, 0, 0.08);
    
    --color-primary: #2563eb;
    --color-primary-glow: rgba(37, 99, 235, 0.15);
    --color-emerald: #059669;
    --color-emerald-glow: rgba(5, 150, 105, 0.15);
    --color-crimson: #dc2626;
    --color-crimson-glow: rgba(220, 38, 38, 0.15);
    --color-amber: #d97706;
    --color-amber-glow: rgba(217, 119, 6, 0.15);
    
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

/* App Core Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-glass);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 35px;
}

.logo-icon {
    font-size: 22px;
    color: var(--color-primary);
    background: linear-gradient(135deg, var(--color-primary), var(--color-emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px var(--color-primary-glow);
}

.logo-text h1 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.logo-text span {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

/* Navigation Links */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-btn {
    width: 100%;
    padding: 12px 15px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(59,130,246,0.06), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: inherit;
}

.nav-btn:hover {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-glass);
    transform: translateX(3px);
}

.nav-btn:hover::before {
    opacity: 1;
}

.nav-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(16, 185, 129, 0.04));
    color: var(--text-primary);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.08), 0 0 0 0.5px rgba(59,130,246,0.2);
    transform: translateX(0);
}

.nav-btn.active .btn-icon {
    filter: drop-shadow(0 0 5px rgba(59,130,246,0.6));
}

/* Investor Profiling Card */
.profile-card {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 15px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.profile-card h3 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.profile-field {
    margin-bottom: 10px;
}

.profile-field:last-child {
    margin-bottom: 0;
}

.profile-field label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.profile-field select {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 6px 10px;
    font-family: var(--font-body);
    font-size: 12px;
    cursor: pointer;
}

.profile-field select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.sidebar-footer {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border-glass);
    padding-top: 15px;
}

.status-indicator {
    width: 6px;
    height: 6px;
    background-color: var(--color-emerald);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-emerald);
}

/* Collapsible Sidebar Premium Upgrades */
.sidebar {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

.sidebar.collapsed {
    width: 78px;
    padding: 25px 12px;
    align-items: center;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .profile-card,
.sidebar.collapsed .rebalancer-status-card,
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .btn-text {
    display: none !important;
}

.sidebar.collapsed .logo-area {
    margin-bottom: 25px;
    width: 100%;
    justify-content: center;
    gap: 0;
    flex-direction: column;
}

.sidebar.collapsed #sidebar-collapse-btn {
    margin-left: 0 !important;
    margin-top: 10px;
}

.sidebar.collapsed .logo-icon {
    font-size: 24px;
}

.sidebar.collapsed .desktop-theme-toggle {
    display: none !important;
}

.sidebar.collapsed .nav-btn {
    padding: 12px;
    justify-content: center;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    margin: 0 auto;
}

.sidebar.collapsed .nav-btn .btn-icon {
    font-size: 16px;
    margin: 0;
}

/* Glassmorphic Floating tooltips when collapsed */
.sidebar.collapsed .nav-btn:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-sidebar);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-heading);
    border-radius: 6px;
    white-space: nowrap;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    pointer-events: none;
    animation: fadeInTooltip 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInTooltip {
    from { opacity: 0; transform: translate(-8px, -50%); }
    to { opacity: 1; transform: translate(0, -50%); }
}

/* Main Content Workspace */
.main-content {
    flex-grow: 1;
    padding: 30px 40px;
    overflow-y: auto;
    max-height: 100vh;
}

.workspace-tab {
    animation: fadeIn 0.4s ease;
}

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

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.section-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Glass Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    border-left: 3px solid var(--color-primary);
    padding-left: 10px;
    margin-bottom: 15px;
}

/* ── Primary & Secondary Buttons ── */
.btn-primary, .btn-secondary {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2563eb 60%, #4f46e5 100%);
    background-size: 200% 200%;
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3), 0 1px 3px rgba(0,0,0,0.2);
    animation: btnGradientShift 5s ease infinite;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -70%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: skewX(-20deg);
    animation: btnShimmerSweep 4s ease-in-out infinite;
    pointer-events: none;
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5), 0 2px 6px rgba(0,0,0,0.2);
    transform: translateY(-2px) scale(1.01);
    animation-play-state: paused;
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(4px);
}

.btn-secondary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.06), transparent);
    opacity: 0;
    border-radius: inherit;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.btn-secondary:hover::after {
    opacity: 1;
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Input Fields */
input[type="text"] {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 10px 15px;
    font-family: var(--font-body);
    font-size: 14px;
    transition: all 0.2s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary-glow);
}

/* Data Tables */
.table-scroll {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.data-table th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-glass);
    padding: 12px 15px;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.small-table {
    font-size: 12px;
}

.small-table th, .small-table td {
    padding: 8px 10px;
}

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

.center-text {
    text-align: center;
}

/* Badges */
.badge-ticker {
    background-color: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.badge-rec {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 6px;
    text-shadow: 0 0 10px currentColor;
}

.rec-strong-buy, .rec-buy {
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--color-emerald);
}

.rec-hold {
    background-color: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--color-amber);
}

.rec-sell, .rec-strong-sell {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-crimson);
}

.breakout-badge {
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-shadow: 0 0 8px currentColor;
    display: inline-block;
}

.breakout-bull {
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--color-emerald);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.breakout-bear {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-crimson);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.breakout-neutral {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.02);
}

.green-text { color: var(--color-emerald); }
.red-text { color: var(--color-crimson); }
.yellow-text { color: var(--color-amber); }

/* AI SCREENER SPECIFIC */
.screener-controls-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.strategy-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.strategy-btn {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    text-align: left;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.strategy-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
    transform: skewX(-18deg);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.strategy-btn:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.14);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.strategy-btn:hover::before {
    opacity: 1;
    animation: btnShimmerSweep 0.7s ease-in-out forwards;
}

.strategy-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.06));
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(59,130,246,0.18), inset 0 0 15px rgba(59,130,246,0.05);
    transform: translateY(0);
}

.strategy-btn.active .strat-title {
    color: #93c5fd;
}

.strat-title {
    display: block;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.strat-desc {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* SINGLE STOCK ANALYZER SPECIFIC */
.workspace-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.search-box-container {
    display: flex;
    gap: 12px;
    flex-grow: 1;
    max-width: 680px;
    align-items: center;
}

/* Analyzer Input Wrap — glass pill with icon */
.analyzer-input-wrap {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.analyzer-input-icon {
    position: absolute;
    left: 14px;
    font-size: 15px;
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1;
}

.analyzer-input-wrap:focus-within .analyzer-input-icon {
    opacity: 0.9;
    transform: scale(1.1);
}

.analyzer-input-wrap input {
    width: 100%;
    padding-left: 42px !important;
    padding-right: 16px !important;
    background: rgba(10, 14, 28, 0.7) !important;
    border: 1.5px solid rgba(59, 130, 246, 0.2) !important;
    border-radius: 12px !important;
    font-size: 13.5px !important;
    height: 46px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease !important;
}

.analyzer-input-wrap input:focus {
    border-color: rgba(59, 130, 246, 0.65) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12), 0 0 20px rgba(59, 130, 246, 0.08) !important;
    background: rgba(14, 20, 38, 0.9) !important;
    outline: none !important;
}

/* ── Analyze Asset Button ── */
.analyze-asset-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    height: 46px;
    min-width: 165px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
    background-size: 200% 200%;
    animation: btnGradientShift 4s ease infinite;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35), 0 1px 4px rgba(0,0,0,0.3);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
}

.analyze-asset-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.55), 0 2px 8px rgba(0,0,0,0.3);
    animation-play-state: paused;
}

.analyze-asset-btn:active {
    transform: translateY(0px) scale(0.97);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.4);
}

.analyze-asset-btn.loading {
    cursor: not-allowed;
    opacity: 0.85;
    pointer-events: none;
    background: linear-gradient(135deg, #1e40af 0%, #4338ca 100%);
    animation: btnLoadingPulse 1.2s ease-in-out infinite;
}

.analyze-asset-btn.success-flash {
    background: linear-gradient(135deg, #059669, #10b981);
    animation: none;
}

/* Shimmer sweep across button */
.analyze-btn-shimmer {
    position: absolute;
    top: 0; left: -80%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    transform: skewX(-20deg);
    animation: btnShimmerSweep 3s ease-in-out infinite;
    pointer-events: none;
}

.analyze-asset-btn:hover .analyze-btn-shimmer {
    animation-duration: 0.8s;
}

/* Icon spin on load */
.analyze-btn-icon {
    font-style: normal;
    font-size: 16px;
    line-height: 1;
    transition: transform 0.4s ease;
    display: inline-block;
}

.analyze-asset-btn.loading .analyze-btn-icon {
    animation: iconSpin 0.9s linear infinite;
}

/* Particle burst container */
.analyze-btn-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
}

.analyze-btn-particles .particle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    animation: particleBurst 0.7s ease-out forwards;
}

/* ── Keyframes ── */
@keyframes btnGradientShift {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}

@keyframes btnShimmerSweep {
    0%   { left: -80%; }
    60%  { left: 130%; }
    100% { left: 130%; }
}

@keyframes btnLoadingPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(99,102,241,0.3); }
    50%       { box-shadow: 0 4px 30px rgba(99,102,241,0.7); }
}

@keyframes iconSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes particleBurst {
    0%   { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--px), var(--py)) scale(0.2); }
}

.empty-state-card {
    text-align: center;
    padding: 60px 40px;
    margin-top: 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.empty-state-card p {
    color: var(--text-secondary);
    margin-top: 5px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.stock-meta-banner {
    background: linear-gradient(90deg, rgba(22, 28, 45, 0.8), rgba(7, 10, 19, 0.6));
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.meta-left h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.meta-sub {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.meta-right {
    text-align: right;
}

.meta-price {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.meta-change {
    font-size: 13px;
    font-weight: 700;
    margin-top: 2px;
}

/* Dashboard Responsive Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }

.primary-card {
    background: linear-gradient(135deg, rgba(18, 25, 41, 0.9), rgba(10, 15, 28, 0.95));
}

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

.card-header h3 {
    margin-bottom: 0;
}

/* CIO Summary Box */
.score-meters {
    display: flex;
    gap: 25px;
    margin-bottom: 20px;
}

.meter-box {
    flex-grow: 1;
}

.meter-box label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.meter-bar-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.meter-bar {
    height: 100%;
    border-radius: 4px;
}

.valuation-bar {
    background: linear-gradient(90deg, var(--color-primary), var(--color-emerald));
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.growth-bar {
    background: linear-gradient(90deg, var(--color-primary), var(--color-amber));
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.meter-value {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.price-targets-block {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.target-price-box {
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.target-price-box span {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.target-price-box strong {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
}

.target-price-box.buy-box {
    background-color: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--color-emerald);
}

.target-price-box.sell-box {
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-crimson);
}

.cio-thesis-text h4 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 4px;
}

.cio-thesis-text p {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.55;
}

/* Technical Metrics List */
.tech-metrics-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.tech-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    padding-bottom: 8px;
}

.tech-metric-row span {
    color: var(--text-secondary);
}

.tech-metric-row strong {
    color: var(--text-primary);
}

.sentiment-catalyst-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255,255,255,0.02);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 12px;
}

.sentiment-catalyst-block span {
    color: var(--text-secondary);
}

.sentiment-indicator {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
}

.sentiment-indicator.positive {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--color-emerald);
}

.sentiment-indicator.negative {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--color-crimson);
}

.sentiment-indicator.neutral {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--color-amber);
}

/* Interactive DCF Sandbox */
.sandbox-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
}

.sandbox-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: -10px;
    margin-bottom: 20px;
}

.sandbox-workspace {
    display: flex;
    gap: 30px;
}

.sandbox-sliders {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.slider-header label {
    color: var(--text-secondary);
}

.slider-value {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    outline: none;
}

[data-theme="light"] input[type="range"] {
    background: rgba(0, 0, 0, 0.15);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary-glow);
    cursor: pointer;
    transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

.sandbox-outputs {
    width: 250px;
    background-color: rgba(0,0,0,0.25);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
    flex-shrink: 0;
}

.dcf-fair-value-box, .dcf-margin-box {
    text-align: center;
}

.dcf-fair-value-box span, .dcf-margin-box span {
    display: block;
    font-size: 9px;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.dcf-fair-value-box strong {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.dcf-margin-box strong {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
}

.dcf-indicator {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.dcf-indicator.undervalued {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--color-emerald);
}

.dcf-indicator.overvalued {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--color-crimson);
}

.dcf-indicator.fair {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--color-amber);
}

/* Charts */
.chart-card {
    min-height: 380px;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin-top: 15px;
}

/* P/E Bands */
.pe-bands-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    justify-content: center;
}

.current-pe-callout {
    text-align: center;
    background-color: rgba(0,0,0,0.25);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 15px;
}

.current-pe-callout span {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
}

.current-pe-callout strong {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--color-primary);
    text-shadow: 0 0 10px var(--color-primary-glow);
}

.pe-stat-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pe-stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.pe-stat-item span {
    color: var(--text-secondary);
}

.pe-stat-item strong {
    color: var(--text-primary);
}

/* Shareholding grid */
.shareholding-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.shareholding-item {
    background-color: rgba(255,255,255,0.01);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 8px 12px;
}

.shareholding-item span {
    display: block;
    font-size: 9px;
    color: var(--text-secondary);
}

.shareholding-item strong {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
}

.pledging-alert-box {
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 11px;
}

.pledging-alert-box.alert-green {
    background-color: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--color-emerald);
}

.pledging-alert-box.alert-red {
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-crimson);
}

.alert-icon {
    font-size: 14px;
    font-weight: bold;
}

/* Catalyst list */
.catalyst-list, .risk-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
    font-size: 12.5px;
}

.catalyst-list li, .risk-list li {
    padding-left: 20px;
    position: relative;
    line-height: 1.45;
}

.catalyst-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--color-emerald);
}

.risk-list li::before {
    content: "⚠️";
    position: absolute;
    left: 0;
    color: var(--color-crimson);
}

/* news grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.news-card {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.news-card:hover {
    background-color: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.1);
}

.news-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 10px;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-secondary);
}

/* Slide-out Q&A Advisor Chat Drawer */
.chat-drawer-container {
    position: fixed;
    top: 0;
    right: -360px;
    width: 360px;
    height: 100vh;
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-glass);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-drawer-container.open {
    right: 0;
}

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

.chat-drawer-header h4 {
    font-size: 15px;
    font-weight: 600;
}

#close-chat-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

#close-chat-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-crimson);
    border-color: rgba(239, 68, 68, 0.35);
    transform: scale(1.05);
}


.chat-drawer-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.45;
}

.chat-message.assistant {
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-message.user {
    background: linear-gradient(135deg, var(--color-primary), #1d4ed8);
    color: var(--text-primary);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-suggested-prompts {
    padding: 10px 20px;
    border-top: 1px solid rgba(255,255,255,0.03);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chat-prompt-pill {
    background-color: rgba(59,130,246,0.05);
    border: 1px solid rgba(59,130,246,0.12);
    border-radius: 100px;
    padding: 5px 12px;
    color: var(--text-secondary);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
    overflow: hidden;
}

.chat-prompt-pill:hover {
    background-color: rgba(99,102,241,0.18);
    color: #c4b5fd;
    border-color: rgba(99,102,241,0.45);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(99,102,241,0.2);
}

.chat-drawer-input-area {
    padding: 20px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    gap: 8px;
}

.chat-drawer-input-area input {
    flex-grow: 1;
    font-size: 12.5px;
    padding: 8px 12px;
}

.chat-drawer-input-area button {
    background: linear-gradient(135deg, var(--color-primary), #4f46e5);
    border: none;
    color: #fff;
    border-radius: 10px;
    padding: 8px 16px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 12px rgba(59,130,246,0.3);
    position: relative;
    overflow: hidden;
}

.chat-drawer-input-area button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(59,130,246,0.5);
}

.chat-drawer-input-area button:active {
    transform: scale(0.97);
}

/* Floating Chat Trigger button */
.floating-chat-trigger {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #4f46e5 100%);
    background-size: 200% 200%;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    padding: 12px 22px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    box-shadow: 0 5px 24px rgba(59, 130, 246, 0.45), 0 0 0 0 rgba(59,130,246,0.4);
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    animation: floatingBtnPulse 2.5s ease-in-out infinite, btnGradientShift 5s ease infinite;
}

.floating-chat-trigger:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.65);
    animation-play-state: paused;
}

.floating-chat-trigger:active {
    transform: scale(0.97);
}

@keyframes floatingBtnPulse {
    0%, 100% { box-shadow: 0 5px 24px rgba(59,130,246,0.45), 0 0 0 0 rgba(59,130,246,0.3); }
    50%       { box-shadow: 0 5px 24px rgba(59,130,246,0.45), 0 0 0 8px rgba(59,130,246,0); }
}

/* COMPARISON ARENA */
.compare-inputs-card {
    background-color: rgba(255,255,255,0.01);
}

.compare-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.compare-input-row {
    display: flex;
    gap: 12px;
    max-width: 600px;
}

.compare-input-row input {
    flex-grow: 1;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.battleground-thesis-content {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
}

/* ALERT CENTER */
.alerts-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
}

.alert-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 11px;
    color: var(--text-secondary);
}

.form-group select, .form-group input {
    width: 100%;
    background-color: rgba(0,0,0,0.3);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 13px;
}

.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.helper-text {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* GLOBAL SPINNER OVERLAY */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(6, 9, 19, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.loader-content {
    text-align: center;
    max-width: 500px;
    padding: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(59, 130, 246, 0.15);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 25px;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px var(--color-primary-glow);
}

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

.loader-content h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.loader-content p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================================
   PREMIUM HIGH-FIDELITY PRINT STYLESHEET (@media print)
   Optimizes dashboard outputs for clean white-paper PDF reports.
   ======================================================== */
@media print {
    /* Hide interactive elements, sidebars and drawers */
    .no-print, 
    .sidebar, 
    .workspace-header-actions,
    .sandbox-card,
    .chat-drawer-container,
    .floating-chat-trigger,
    .alerts-grid,
    .screener-controls-card,
    .logo-area,
    .logo-text,
    .profile-card,
    .chat-suggested-prompts,
    .chat-drawer-input-area,
    .screener-results-container {
        display: none !important;
    }

    body {
        background-color: #ffffff !important;
        color: #0b0f19 !important;
        font-size: 11pt !important;
        font-family: var(--font-body);
        padding: 0;
        margin: 0;
    }

    .app-container {
        display: block !important;
        width: 100% !important;
    }

    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .workspace-tab {
        display: none !important;
        animation: none !important;
    }

    #tab-analyzer {
        display: block !important;
    }

    /* Print layouts for dashboard grid */
    .dashboard-grid {
        display: block !important;
    }

    .card {
        background: #ffffff !important;
        border: 1px solid #d1d5db !important;
        border-radius: 0 !important;
        padding: 15px !important;
        margin-bottom: 20px !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        width: 100% !important;
    }

    .card h3 {
        color: #0b0f19 !important;
        border-left: 4px solid #3b82f6 !important;
        font-size: 14pt !important;
        margin-bottom: 12px !important;
    }

    .stock-meta-banner {
        background: #f3f4f6 !important;
        border: 1px solid #d1d5db !important;
        border-radius: 0 !important;
        color: #0b0f19 !important;
        margin-bottom: 25px !important;
    }

    .meta-left h2 {
        color: #0b0f19 !important;
        font-size: 20pt !important;
    }

    .meta-sub {
        color: #4b5563 !important;
    }

    .meta-price {
        color: #0b0f19 !important;
    }

    .target-price-box {
        border-radius: 0 !important;
        padding: 10px !important;
    }

    .target-price-box.buy-box {
        background-color: #f0fdf4 !important;
        border: 1px solid #bbf7d0 !important;
        color: #166534 !important;
    }

    .target-price-box.sell-box {
        background-color: #fef2f2 !important;
        border: 1px solid #fecaca !important;
        color: #991b1b !important;
    }

    .badge-ticker {
        background-color: #eff6ff !important;
        border: 1px solid #bfdbfe !important;
        color: #1e40af !important;
    }

    .badge-rec {
        border-radius: 0 !important;
        border: 1px solid #000000 !important;
        text-shadow: none !important;
    }

    .rec-strong-buy, .rec-buy {
        background-color: #f0fdf4 !important;
        color: #166534 !important;
    }

    .rec-hold {
        background-color: #fef3c7 !important;
        color: #92400e !important;
    }

    .rec-sell, .rec-strong-sell {
        background-color: #fef2f2 !important;
        color: #991b1b !important;
    }

    .data-table th {
        color: #374151 !important;
        border-bottom: 2px solid #9ca3af !important;
    }

    .data-table td {
        color: #0b0f19 !important;
        border-bottom: 1px solid #e5e7eb !important;
    }

    .pe-stat-item span {
        color: #4b5563 !important;
    }

    .pe-stat-item strong {
        color: #0b0f19 !important;
    }

    .current-pe-callout {
        background-color: #f9fafb !important;
        border: 1px solid #e5e7eb !important;
    }

    .current-pe-callout strong {
        color: #1d4ed8 !important;
        text-shadow: none !important;
    }

    /* Hide all workspace cards by default under print to completely decouple the output from active UI tab */
    .card, .card-hidden {
        display: none !important;
    }

    /* Force-display only the approved corporate print report cards using higher specificity */
    .card.primary-card,
    #business-summary-card {
        display: block !important;
    }
    #business-summary-content {
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
    }

    /* Display checklist sections only when checked (not print-exclude) */
    #tech-timing-card:not(.print-exclude),
    #tech-fib-card:not(.print-exclude),
    #tech-volatility-card:not(.print-exclude),
    #drawdown-card:not(.print-exclude),
    #sandbox-card:not(.print-exclude),
    #historical-bands-card:not(.print-exclude),
    #consensus-comparator-card:not(.print-exclude),
    #peers-card:not(.print-exclude),
    #shareholding-card:not(.print-exclude),
    #earnings-quality-card:not(.print-exclude),
    #strategical-audit-card:not(.print-exclude) {
        display: block !important;
    }

    /* Display sibling companion print-cards based on check status */
    #sandbox-card:not(.print-exclude) ~ #dcf-sensitivity-card {
        display: block !important;
    }
    #peers-card:not(.print-exclude) ~ #peer-chart-card {
        display: block !important;
    }

    /* Page Breaks control for high-fidelity multi-page look */
    .primary-card {
        page-break-before: always;
    }

    .chart-card {
        page-break-inside: avoid;
    }

    /* Logical Page breaks for portrait A4 layout, only triggered when section is shown */
    #business-summary-card,
    #consensus-comparator-card:not(.print-exclude),
    #drawdown-card:not(.print-exclude),
    #earnings-quality-card:not(.print-exclude) {
        page-break-after: always !important;
        break-after: always !important;
    }

    /* Hide interactive elements inside printed cards */
    .card button, 
    .card input[type="range"] {
        display: none !important;
    }

    .print-exclude,
    .card.print-exclude,
    .card-hidden.print-exclude {
        display: none !important;
    }
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(18, 25, 41, 0.95);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 12px 20px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    min-width: 280px;
    max-width: 380px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), fadeOut 0.3s ease 4.7s forwards;
    backdrop-filter: blur(10px);
}

@keyframes slideIn {
    from { transform: translateX(120%); }
    to { transform: translateX(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
}

.toast-success {
    border-left: 4px solid var(--color-emerald);
}

.toast-error {
    border-left: 4px solid var(--color-crimson);
}

.toast-warning {
    border-left: 4px solid var(--color-amber);
}

.toast-info {
    border-left: 4px solid var(--color-primary);
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    margin-left: 15px;
    line-height: 1;
}

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

/* ==================== SKELETON LOADERS ==================== */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

[data-theme="light"] .skeleton {
    background-color: rgba(0, 0, 0, 0.06);
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.06) 20%,
        rgba(255, 255, 255, 0.1) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 1.5s infinite;
}

[data-theme="light"] .skeleton::after {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.4) 60%,
        rgba(255, 255, 255, 0) 100%
    );
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.skeleton-text {
    height: 12px;
    margin-bottom: 8px;
    width: 100%;
}

.skeleton-title {
    height: 20px;
    margin-bottom: 15px;
    width: 60%;
}

.skeleton-card {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ==================== THEME TOGGLE BUTTON ==================== */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.25s ease;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.logo-area {
    justify-content: space-between;
    width: 100%;
}

[data-theme="light"] body {
    color: #111827;
}

[data-theme="light"] .card {
    background: var(--bg-card);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

/* ==================== DCF SENSITIVITY GRID ==================== */
.sensitivity-matrix-table {
    border-collapse: collapse !important;
}

.sensitivity-matrix-table th, .sensitivity-matrix-table td {
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

[data-theme="light"] .sensitivity-matrix-table th, 
[data-theme="light"] .sensitivity-matrix-table td {
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

.sensitivity-matrix-table th {
    background-color: rgba(0, 0, 0, 0.15);
    text-align: center;
}

[data-theme="light"] .sensitivity-matrix-table th {
    background-color: rgba(0, 0, 0, 0.03);
}

.sensitivity-cell {
    font-weight: 600;
    transition: all 0.2s ease;
}

.sensitivity-cell.undervalued {
    background-color: rgba(16, 185, 129, 0.08);
    color: var(--color-emerald);
}

.sensitivity-cell.overvalued {
    background-color: rgba(239, 68, 68, 0.08);
    color: var(--color-crimson);
}

.sensitivity-cell.fair {
    background-color: rgba(245, 158, 11, 0.08);
    color: var(--color-amber);
}

/* ==================== ALERTS LOG STYLING ==================== */
.btn-delete-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-crimson);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete-alert:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

/* ==================== MOBILE & RESPONSIVE LAYOUTS ==================== */
.mobile-header {
    display: none;
    height: 60px;
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-glass);
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 99;
}

.mobile-menu-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

.mobile-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.05em;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .col-span-3, .col-span-4 {
        grid-column: span 2;
    }
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    .comparison-grid .col-span-3 {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: fixed;
        top: 60px;
        left: -100%;
        height: calc(100vh - 60px);
        z-index: 98;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
    }

    .sidebar.open {
        left: 0;
    }

    .desktop-theme-toggle {
        display: none;
    }

    .main-content {
        padding: 20px;
        max-height: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .col-span-2, .col-span-3, .col-span-4 {
        grid-column: span 1;
    }

    .strategy-selector {
        grid-template-columns: 1fr;
    }

    .alerts-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-drawer-container {
        width: 100%;
        right: -100%;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .volatility-charts-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .workspace-header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box-container {
        width: 100%;
    }

    .stock-meta-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .meta-right {
        text-align: left;
    }

    .score-meters {
        flex-direction: column;
        gap: 15px;
    }

    .sandbox-workspace {
        flex-direction: column;
    }

    .sandbox-outputs {
        width: 100%;
    }
    
    .watchlist-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Fix #4: Universe Status / Rebalancer Card */
.rebalancer-status-card {
    margin: 12px 16px;
    padding: 12px 14px;
    background: rgba(15, 20, 40, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    backdrop-filter: blur(6px);
}

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

.rebalancer-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.rebalance-btn {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.rebalance-btn:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: var(--color-primary);
    transform: rotate(20deg);
}

.rebalance-btn.syncing {
    opacity: 0.6;
    cursor: not-allowed;
    animation: spin 1s linear infinite;
}

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

.rebalancer-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rebalancer-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
}

.stat-value {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ==================== 9-FEATURE MEGA-UPGRADE STYLES ==================== */

/* Earnings Quality Scorecard details list scrollbar styling */
#piotroski-details-list::-webkit-scrollbar {
    width: 4px;
}
#piotroski-details-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
#piotroski-details-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
}

/* Portfolio ledger and table input styles */
.portfolio-qty-input, .portfolio-price-input {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 4px !important;
    color: var(--text-primary) !important;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.portfolio-qty-input:focus, .portfolio-price-input:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 5px var(--color-primary-glow);
}

/* Mini Drawdown Chart */
#drawdown-chart {
    max-height: 120px !important;
}

/* Sentiment needle transition */
#sentiment-gauge-needle {
    transition: left 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Custom Dropdown Calendar Styling */
.cal-day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.15s ease;
    user-select: none;
}
.cal-day-cell:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}
.cal-day-cell.active {
    background: var(--color-primary) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 0 8px var(--color-primary-glow);
}
.cal-day-cell.other-month {
    color: var(--text-muted);
    opacity: 0.4;
}
.cal-day-cell.today {
    border: 1px solid var(--color-emerald);
}
#cal-prev-month:hover, #cal-next-month:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary) !important;
}

/* ==================== UPGRADED EARNINGS QUALITY SCORECARD STYLES ==================== */

/* Interactive Piotroski Matrix Capsules */
.piotroski-matrix-cell {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 6px 4px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    user-select: none;
}
.piotroski-matrix-cell:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15) !important;
}
.piotroski-matrix-cell .cell-abbrev {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}
.piotroski-matrix-cell:hover .cell-abbrev {
    color: var(--text-primary);
}
.piotroski-matrix-cell .cell-status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* Altman Ratios Mathematical Rows */
.altman-comp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 9px;
    padding: 2.5px 0;
    width: 100%;
}
.altman-comp-label {
    color: var(--text-secondary);
    font-weight: 500;
    width: 125px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.altman-comp-progress-container {
    flex-grow: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 8px;
    position: relative;
}
.altman-comp-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    width: 0%;
}
.altman-comp-val {
    color: var(--text-primary);
    font-weight: 700;
    width: 45px;
    text-align: right;
    font-family: monospace;
}

/* ==========================================================================
   HYBRID SAAS AI EQUITIES SYNTHESIS OVERHAUL RULES
   ========================================================================== */

/* Stock Meta Banner Trigger Pill */
.conviction-pill-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.18), rgba(59, 130, 246, 0.12));
    border: 1.5px solid rgba(147, 51, 234, 0.35);
    border-radius: 20px;
    color: #c084fc;
    font-family: var(--font-heading);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.15);
    user-select: none;
    margin-left: 15px;
    height: fit-content;
    align-self: center;
}

.conviction-pill-trigger:hover {
    transform: scale(1.04);
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.28), rgba(59, 130, 246, 0.22));
    border-color: rgba(168, 85, 247, 0.7);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.45);
    color: #e9d5ff;
}

.conviction-pill-trigger .pulse-ring {
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    border: 1.5px solid rgba(168, 85, 247, 0.5);
    animation: triggerPillPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    pointer-events: none;
}

@keyframes triggerPillPulse {
    0% {
        transform: scale(0.96);
        opacity: 0.8;
    }
    50% {
        opacity: 0;
        transform: scale(1.12);
    }
    100% {
        transform: scale(0.96);
        opacity: 0;
    }
}

.conviction-pill-trigger .pill-icon {
    font-size: 13px;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-1.5px); }
}

/* Slide-out Drawer Tab Button Highlights */
.drawer-tab-btn {
    border-bottom: 2px solid transparent !important;
}

.drawer-tab-btn:hover {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

.drawer-tab-btn.active {
    color: #a855f7 !important; /* purple highlight */
    border-bottom-color: #a855f7 !important;
    background: rgba(168, 85, 247, 0.08) !important;
}

/* Synthesis Gauge SVG styles */
.synthesis-gauge-svg {
    transform: rotate(-90deg);
}

.synthesis-gauge-bg {
    stroke: rgba(255, 255, 255, 0.04);
}

.synthesis-gauge-fill {
    stroke-dashoffset: 0;
    transition: stroke-dasharray 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Synthesis markdown renderer clean styling */
.synthesis-report-text h3 {
    font-size: 13px;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 15px;
    margin-bottom: 8px;
    border-left: 2.5px solid #a855f7;
    padding-left: 8px;
}

.synthesis-report-text p {
    margin-bottom: 12px;
    line-height: 1.55;
    color: var(--text-muted);
}

.synthesis-report-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.synthesis-report-text ul {
    margin-left: 15px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.synthesis-report-text li {
    font-size: 11.5px;
    color: var(--text-secondary);
}

.synthesis-report-text li strong {
    color: var(--text-primary);
}

/* ==========================================================================
   ENTERPRISE HEADER & FOOTER OVERHAUL STYLES
   ========================================================================== */

/* Sticky Enterprise Header Styling */
.main-header {
    position: sticky;
    top: -30px; /* Offset parent's 30px padding so it binds perfectly to the top of the container! */
    margin: -30px -40px 25px -40px; /* Offset parent's padding left/right/top */
    padding: 15px 40px;
    background: rgba(11, 15, 29, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    gap: 25px;
}

/* Light theme support */
[data-theme="light"] .main-header {
    background: rgba(255, 255, 255, 0.75);
}

/* Live Index Ticker Container */
.index-ticker-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 6px 15px;
    flex-grow: 1;
    overflow: hidden;
    max-width: calc(100% - 100px);
}

.index-ticker-label {
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    white-space: nowrap;
    border-right: 1px solid var(--border-glass);
    padding-right: 15px;
}

.index-ticker-marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    position: relative;
    display: flex;
}

.index-ticker-marquee {
    display: inline-flex;
    gap: 30px;
    animation: indexTicker 28s linear infinite;
}

.ticker-item {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ticker-item strong.val {
    color: var(--text-primary);
    font-family: monospace;
    font-size: 11.5px;
}

@keyframes indexTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Standard looping marquee */
}

/* Header Utilities Cog and Bell */
.header-utils {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-bell-wrapper, .header-settings-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    user-select: none;
}

.header-bell-wrapper:hover, .header-settings-wrapper:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.bell-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--color-amber);
    color: #000;
    font-weight: 700;
    font-size: 8.5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px var(--color-amber-glow);
}

/* Dropdown styling */
.header-dropdown {
    position: absolute;
    top: 38px;
    right: 0;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    width: 300px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    cursor: default;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-glass);
    font-family: var(--font-heading);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.clear-alerts-btn {
    background: transparent;
    border: none;
    color: var(--color-crimson);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
}

.clear-alerts-btn:hover {
    text-decoration: underline;
}

.dropdown-body {
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Notification item */
.notification-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.2s;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-badge {
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.badge-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge-green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-orange { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-red { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.notif-time {
    font-size: 8px;
    color: var(--text-muted);
}

.notif-text {
    font-size: 10.5px;
    line-height: 1.4;
    color: var(--text-secondary);
}

/* System Settings Dropdown Row */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px dashed var(--border-glass);
}

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

.setting-row label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Footer Styling */
.main-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-disclaimer {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: justify;
}

.footer-diagnostics {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 8px 15px;
}

.diag-item {
    font-size: 10.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.diag-item .status-indicator {
    width: 6px;
    height: 6px;
}

/* ==================== ANALYZER SUB-TABS (BLOOMBERG-STYLE) ==================== */
.analyzer-subtabs {
    scrollbar-width: none; /* Hide standard scrollbars */
}

.analyzer-subtabs::-webkit-scrollbar {
    display: none; /* Hide scrollbars for Chrome/Safari */
}

.subtab-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 11.5px;
    font-weight: 600;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.subtab-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.subtab-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(147, 51, 234, 0.1));
    color: var(--color-primary);
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
    font-weight: 700;
}

[data-theme="light"] .subtab-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(147, 51, 234, 0.05));
    border-color: rgba(59, 130, 246, 0.3);
}

/* Card visibility utilities */
.card-hidden {
    display: none !important;
}

/* ==================== LIGHT THEME ACCESSIBILITY OVERRIDES ==================== */
[data-theme="light"] .stock-meta-banner {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(243, 244, 246, 0.85)) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] .meta-left h2,
[data-theme="light"] .meta-price {
    color: var(--text-primary) !important;
}

[data-theme="light"] .meta-sub {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .badge-ticker {
    color: var(--color-primary) !important;
    background-color: rgba(37, 99, 235, 0.08) !important;
    border-color: rgba(37, 99, 235, 0.25) !important;
}

[data-theme="light"] .conviction-pill-trigger {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.08), rgba(59, 130, 246, 0.06)) !important;
    border-color: rgba(147, 51, 234, 0.3) !important;
    color: #7c3aed !important;
    box-shadow: 0 2px 10px rgba(147, 51, 234, 0.06) !important;
}

[data-theme="light"] .conviction-pill-trigger:hover {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(59, 130, 246, 0.12)) !important;
    border-color: rgba(147, 51, 234, 0.6) !important;
    color: #6d28d9 !important;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.15) !important;
}

[data-theme="light"] .analyzer-input-wrap input {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] .analyzer-input-wrap input:focus {
    background: #ffffff !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 0 20px rgba(37, 99, 235, 0.08) !important;
}

[data-theme="light"] .analyzer-input-wrap input::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.8 !important;
}

/* Print Checklist Collapsible Accordion Upgrades */
#print-checklist-toggle {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#print-checklist-toggle:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] #print-checklist-toggle {
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: var(--text-secondary) !important;
}

[data-theme="light"] #print-checklist-toggle:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: var(--text-primary) !important;
}

#print-checklist-content {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
