:root {
    --bg-main: #060913;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(56, 189, 248, 0.25);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --color-up: #ef4444;      /* 한국 주식 상승 빨강 */
    --color-down: #3b82f6;    /* 한국 주식 하락 파랑 */
    --color-neutral: #cbd5e1;
    
    --accent-blue: #38bdf8;
    --accent-cyan: #06b6d4;
    --accent-purple: #818cf8;
    --accent-gold: #fbbf24;
    --accent-green: #10b981;

    --font-sans: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, "Noto Sans KR", sans-serif;
}

/* Light Theme Variables & Overrides */
[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.96);
    --bg-card-hover: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(14, 116, 144, 0.25);
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    --color-up: #dc2626;
    --color-down: #2563eb;
    --color-neutral: #475569;
}

html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 75px;
}

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

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(14, 116, 144, 0.18) 0px, transparent 45%),
        radial-gradient(at 100% 0%, rgba(30, 58, 138, 0.25) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(79, 70, 229, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    letter-spacing: -0.01em;
    transition: background-color 0.25s ease, color 0.25s ease;
}

[data-theme="light"] body {
    background-image: 
        radial-gradient(at 0% 0%, rgba(224, 242, 254, 0.8) 0px, transparent 45%),
        radial-gradient(at 100% 0%, rgba(219, 234, 254, 0.8) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(238, 242, 255, 0.7) 0px, transparent 50%);
}

/* =================================================================== */
/* Light Mode Comprehensive Typography, Surface & Component Overrides  */
/* =================================================================== */
[data-theme="light"] body {
    background-color: #f1f5f9;
    background-image: 
        radial-gradient(at 0% 0%, rgba(224, 242, 254, 0.8) 0px, transparent 45%),
        radial-gradient(at 100% 0%, rgba(219, 234, 254, 0.8) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(238, 242, 255, 0.7) 0px, transparent 50%);
    color: #0f172a;
}

[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .brand-info h1 {
    color: #0f172a;
}

[data-theme="light"] .brand-badge {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
    border-color: rgba(2, 132, 199, 0.25);
}

[data-theme="light"] .ticker-strip {
    background: #ffffff;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ticker-name {
    color: #64748b;
}

[data-theme="light"] .ticker-price {
    color: #0f172a;
}

/* Secondary Buttons in Light Mode */
[data-theme="light"] .btn-secondary {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .btn-secondary:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #94a3b8;
}

[data-theme="light"] .live-indicator {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #059669;
}

[data-theme="light"] .live-dot {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

/* Principle Banner in Light Mode */
[data-theme="light"] .principle-banner {
    background: linear-gradient(90deg, rgba(240, 253, 244, 0.95), rgba(240, 249, 255, 0.95));
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .principle-text {
    color: #334155;
}

[data-theme="light"] .principle-text strong {
    color: #0f172a;
}

/* Tabs in Light Mode */
[data-theme="light"] .tab-btn {
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
}

[data-theme="light"] .tab-btn:hover {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}

[data-theme="light"] .tab-btn.active {
    background: #ffffff;
    color: #0284c7;
    border-color: #0284c7;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
}

/* Section Title in Light Mode */
[data-theme="light"] .section-title {
    color: #0f172a;
}

/* Surfaces & Cards in Light Mode */
[data-theme="light"] .pulse-card,
[data-theme="light"] .macro-big4-card,
[data-theme="light"] .vc-card,
[data-theme="light"] .sentinel-card,
[data-theme="light"] .holding-card,
[data-theme="light"] .kpi-card,
[data-theme="light"] .ai-section,
[data-theme="light"] .ai-briefing-box,
[data-theme="light"] .archive-box {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Market Pulse in Light Mode */
[data-theme="light"] .pulse-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(2, 132, 199, 0.3);
}

[data-theme="light"] .direction-text h2 {
    color: #0f172a;
}

[data-theme="light"] .direction-text p {
    color: #475569;
}

[data-theme="light"] .quick-pill {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .quick-pill strong {
    color: #0284c7;
}

[data-theme="light"] .quick-pill span {
    color: #334155;
}

/* Macro Big 4 Cards in Light Mode */
[data-theme="light"] .macro-card-header {
    border-bottom-color: #f1f5f9;
}

[data-theme="light"] .card-title-sm {
    color: #0f172a;
}

[data-theme="light"] .macro-big-tile {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

[data-theme="light"] .macro-big-tile:hover {
    background: #f1f5f9;
    border-color: #38bdf8;
}

[data-theme="light"] .macro-big-label {
    color: #64748b;
}

[data-theme="light"] .macro-big-val {
    color: #0f172a;
}

/* Value Chain Groups in Light Mode */
[data-theme="light"] .highlight-group {
    background: linear-gradient(180deg, rgba(224, 242, 254, 0.45) 0%, #ffffff 100%);
    border-color: rgba(2, 132, 199, 0.35);
}

[data-theme="light"] .vc-card-header {
    border-bottom-color: #f1f5f9;
}

[data-theme="light"] .vc-title {
    color: #0f172a;
}

[data-theme="light"] .vc-sub {
    color: #64748b;
}

[data-theme="light"] .vc-stock-row {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

[data-theme="light"] .vc-stock-row:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

[data-theme="light"] .vc-stock-name {
    color: #0f172a;
}

[data-theme="light"] .vc-stock-sym {
    color: #64748b;
}

[data-theme="light"] .vc-stock-price {
    color: #0f172a;
}

/* Rate Badges in Light Mode */
[data-theme="light"] .rate-up {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

[data-theme="light"] .rate-down {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.25);
}

[data-theme="light"] .rate-neutral {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Macro Indicators & Sentinel Logs in Light Mode */
[data-theme="light"] .macro-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .macro-name {
    color: #334155;
}

[data-theme="light"] .macro-val {
    color: #0f172a;
}

[data-theme="light"] .sentinel-log-row {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .sentinel-desc {
    color: #475569;
}

/* Briefing Box in Light Mode */
[data-theme="light"] .briefing-meta-bar {
    background: #f8fafc;
    color: #334155;
    border-color: #e2e8f0;
}

[data-theme="light"] .ai-briefing-box {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .ai-briefing-box.collapsed::after {
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.98));
}

[data-theme="light"] .briefing-h2 {
    color: #0284c7;
    border-bottom-color: rgba(2, 132, 199, 0.2);
}

[data-theme="light"] .briefing-h3 {
    color: #0f172a;
    border-left-color: #0284c7;
}

[data-theme="light"] .briefing-callout {
    background: rgba(2, 132, 199, 0.06);
    border-color: #0284c7;
    color: #1e293b;
}

[data-theme="light"] .briefing-p {
    color: #334155;
}

[data-theme="light"] .briefing-list li {
    color: #334155;
}

/* Briefing Table in Light Mode (Crisp White High-Contrast) */
[data-theme="light"] .briefing-table {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .briefing-table th {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-bottom: 2px solid #cbd5e1 !important;
    font-weight: 700;
}

[data-theme="light"] .briefing-table td {
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #1e293b !important;
}

[data-theme="light"] .briefing-table tr:nth-child(even) td {
    background: #f8fafc !important;
}

[data-theme="light"] .briefing-table tr:hover td {
    background: #f0f9ff !important;
}

[data-theme="light"] .briefing-stock-pill {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

[data-theme="light"] .ai-briefing-box strong {
    color: #0f172a;
}

/* Technical Pattern Radar Cards in Light Mode */
[data-theme="light"] .pattern-radar-section {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .pattern-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .pattern-card:hover {
    border-color: #0284c7 !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12);
}

[data-theme="light"] .pattern-stock-name {
    color: #0f172a;
}

[data-theme="light"] .pattern-stock-code {
    color: #64748b;
}

[data-theme="light"] .pattern-detail-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

[data-theme="light"] .pattern-trend-val.trend-up {
    color: #059669 !important; /* 선명하고 또렷한 포레스트 다크그린 */
}

[data-theme="light"] .pattern-trend-val.trend-down {
    color: #475569 !important; /* 또렷한 슬레이트 */
}

[data-theme="light"] .pattern-stars {
    color: #d97706 !important; /* 깊이감 있는 앰버 골드 */
}

[data-theme="light"] .pattern-level-val {
    color: #0284c7 !important; /* 선명하고 가독성 높은 딥 블루 */
}

[data-theme="light"] .pattern-badge {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

[data-theme="light"] .pattern-badge.badge-gold {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border-color: #fde68a !important;
}

[data-theme="light"] .pattern-badge.badge-green {
    background: #d1fae5 !important;
    color: #047857 !important;
    border-color: #a7f3d0 !important;
}

[data-theme="light"] .pattern-badge.badge-purple {
    background: #ede9fe !important;
    color: #6d28d9 !important;
    border-color: #ddd6fe !important;
}

[data-theme="light"] .chart-link-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

[data-theme="light"] .chart-link-btn:hover {
    background: #e2e8f0;
    color: #0284c7;
    border-color: #cbd5e1;
}

/* Holdings & Portfolio in Light Mode */
[data-theme="light"] .kpi-label {
    color: #64748b;
}

[data-theme="light"] .kpi-value {
    color: #0f172a;
}

[data-theme="light"] .kpi-sub {
    color: #64748b;
}

[data-theme="light"] .holding-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .stock-name {
    color: #0f172a;
}

[data-theme="light"] .holding-stats-table {
    border-color: #f1f5f9;
}

[data-theme="light"] .holding-stats-table td {
    color: #64748b;
    border-bottom-color: #f1f5f9;
}

[data-theme="light"] .holding-stats-table td.val {
    color: #0f172a;
}

[data-theme="light"] .swing-track {
    background: #e2e8f0;
}

[data-theme="light"] .target-pill {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

/* Modal in Light Mode */
[data-theme="light"] .modal-content {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .modal-title {
    color: #0f172a;
}

[data-theme="light"] .form-label {
    color: #475569;
}

[data-theme="light"] .form-input {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

[data-theme="light"] .form-input:focus {
    background: #ffffff;
    border-color: #0284c7;
}

[data-theme="light"] .archive-sidebar-item {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
}

[data-theme="light"] .archive-sidebar-item.active {
    background: #f0f9ff;
    border-color: #0284c7;
    color: #0284c7;
}

.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* 1. Global Ticker Strip */
.ticker-strip {
    background: rgba(8, 13, 24, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 6px 0;
    font-size: 0.78rem;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.ticker-track {
    display: flex;
    gap: 1.75rem;
    align-items: center;
    animation: tickerLoop 40s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes tickerLoop {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.ticker-name {
    color: var(--text-secondary);
}

.ticker-price {
    color: #fff;
    font-weight: 600;
}

/* 2. Header */
header {
    background: rgba(6, 9, 19, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0284c7, #4f46e5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
}

.brand-info h1 {
    font-size: 1.15rem;
    font-weight: 700;
}

.brand-badge {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.12);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 6px;
    font-weight: 600;
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* Live Auto-Refresh Indicator */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #34d399;
    font-weight: 600;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: livePulse 1.2s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

/* 3. Capital Manager Principle Banner */
.principle-banner {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), rgba(56, 189, 248, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 12px 18px;
    margin: 1.25rem 0 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.principle-badge {
    background: #10b981;
    color: #042f2e;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.principle-text {
    font-size: 0.88rem;
    color: #e2e8f0;
    flex: 1;
}

.principle-text strong {
    color: #34d399;
}

.principle-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

/* Main Tab Navigation */
.main-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.75rem;
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 10px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    bottom: -2px;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px 6px 0 0;
}

.tab-btn.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.08);
    border-radius: 6px 6px 0 0;
}

.tab-badge {
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

/* Tab Contents Toggle */
.tab-content {
    display: none;
    animation: tabFadeIn 0.25s ease forwards;
}

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

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

/* Market Pulse Big Cards Grid */
.pulse-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.pulse-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

.pulse-tag {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.pulse-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.pulse-direction {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.direction-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.direction-text h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.direction-text p {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.action-quick-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
}

.quick-pill {
    background: rgba(2, 6, 23, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.quick-pill strong {
    color: var(--accent-blue);
    font-weight: 700;
}

.quick-pill span {
    color: #e2e8f0;
}

/* Macro Big 4 Card */
.macro-big4-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.macro-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 8px;
}

.card-title-sm {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f8fafc;
}

.macro-big4-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 640px) {
    .macro-big4-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.macro-big-tile {
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.macro-big-tile:hover {
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-1px);
}

.macro-big-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.macro-big-val {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

/* Highlight Group for Memory & Foundry */
.highlight-group {
    border-color: rgba(56, 189, 248, 0.35);
    background: linear-gradient(180deg, rgba(14, 116, 144, 0.15), var(--bg-card));
}

.highlight-group .vc-card-header {
    border-bottom-color: rgba(56, 189, 248, 0.3);
}

/* Briefing Box Collapsible */
.ai-briefing-box.collapsed {
    max-height: 220px;
    overflow: hidden;
    position: relative;
}

.ai-briefing-box.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.98));
    pointer-events: none;
}

/* Briefing Typography & Rich Components */
.briefing-h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #38bdf8;
    margin: 1.2rem 0 0.6rem 0;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    padding-bottom: 4px;
}

.briefing-h3 {
    font-size: 1.02rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 1rem 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.briefing-p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #cbd5e1;
    margin-bottom: 0.6rem;
}

.briefing-callout {
    background: rgba(30, 41, 59, 0.7);
    border-left: 4px solid #38bdf8;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    margin: 0.6rem 0;
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.6;
}

.briefing-stock-pill {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #f8fafc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.briefing-list {
    margin: 0.4rem 0 0.8rem 1.4rem;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.6;
}

.briefing-list li {
    margin-bottom: 4px;
}

.table-responsive {
    overflow-x: auto;
    margin: 0.8rem 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.briefing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: rgba(15, 23, 42, 0.6);
}

.briefing-table th, .briefing-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
}

.briefing-table th {
    background: rgba(30, 41, 59, 0.8);
    color: #94a3b8;
    font-weight: 600;
}

/* Archive Layout */
.archive-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    min-height: 520px;
}

.archive-sidebar {
    background: rgba(10, 15, 29, 0.6);
    border-right: 1px solid var(--border-color);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 550px;
}

.archive-sidebar-item {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.archive-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.archive-sidebar-item.active {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.35);
    color: #38bdf8;
}

.archive-viewer {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    max-height: 550px;
    font-size: 0.92rem;
    line-height: 1.75;
}

.link-btn {
    font-size: 0.75rem;
    color: var(--accent-blue);
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    transition: all 0.2s ease;
}

.link-btn:hover {
    background: rgba(56, 189, 248, 0.25);
    color: #fff;
}

/* Live Quote Flash Animations */
.flash-up {
    animation: flashGreen 1s ease;
}

.flash-down {
    animation: flashRed 1s ease;
}

@keyframes flashGreen {
    0% { background-color: rgba(239, 68, 68, 0.35); }
    100% { background-color: transparent; }
}

@keyframes flashRed {
    0% { background-color: rgba(59, 130, 246, 0.35); }
    100% { background-color: transparent; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
}

.btn-primary {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #fff;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0369a1, #1d4ed8);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(30, 41, 59, 0.7);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-ai {
    background: linear-gradient(135deg, #10b981, #0284c7);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.35);
}

.btn-ai:hover {
    background: linear-gradient(135deg, #059669, #0369a1);
    transform: translateY(-1px);
}

/* 4. Section Utilities */
section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f8fafc;
}

.badge-tag {
    font-size: 0.7rem;
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-blue);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    font-weight: 500;
}

/* Hero KPI Grid */
.hero-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

.kpi-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.weight-bar-wrap {
    margin-top: 0.6rem;
}

.weight-bar {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.weight-stock {
    background: linear-gradient(90deg, #38bdf8, #2563eb);
    height: 100%;
    transition: width 0.4s ease;
}

.weight-cash {
    background: #10b981;
    height: 100%;
    transition: width 0.4s ease;
}

/* 5. 07:50 Morning Briefing 5-Step Card */
.briefing-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.briefing-meta-bar {
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.ai-briefing-box {
    padding: 1.5rem 1.75rem;
    max-height: 520px;
    overflow-y: auto;
    font-size: 0.92rem;
    line-height: 1.75;
    color: #e2e8f0;
}

.ai-briefing-box h3 {
    color: var(--accent-cyan);
    font-size: 1.02rem;
    margin: 1.25rem 0 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-briefing-box h3:first-child {
    margin-top: 0;
}

.ai-briefing-box ul, .ai-briefing-box ol {
    margin-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.ai-briefing-box li {
    margin-bottom: 4px;
}

.ai-briefing-box table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 16px 0;
    font-size: 0.84rem;
}

.ai-briefing-box th {
    background: rgba(2, 6, 23, 0.6);
    color: var(--text-secondary);
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.ai-briefing-box td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* 6. Holdings & Swing Range Cards */
.holdings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 1.25rem;
}

.holding-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.holding-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
}

.stock-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stock-name {
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stock-code {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stock-price-box {
    text-align: right;
}

.stock-cur-price {
    font-size: 1.35rem;
    font-weight: 800;
}

.stock-pnl-rate {
    font-size: 0.85rem;
    font-weight: 700;
}

.holding-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin: 0.75rem 0 1.25rem 0;
}

.holding-stats-table td {
    padding: 5px 0;
    color: var(--text-secondary);
}

.holding-stats-table td.val {
    text-align: right;
    color: #fff;
    font-weight: 600;
}

/* Swing Range Gauge */
.swing-gauge-wrap {
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 0.5rem;
}

.swing-gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.swing-track {
    width: 100%;
    height: 8px;
    background: #1e293b;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.swing-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981, #fbbf24);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.swing-targets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 10px;
    font-size: 0.72rem;
    text-align: center;
}

.target-pill {
    padding: 4px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
}

.target-pill.stop-loss {
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.target-pill.tp1 {
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fde68a;
}

.target-pill.tp2 {
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* Supply Table Snippet */
.supply-badge-wrap {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.75rem;
}

.supply-badge {
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 7. Global Value-Chain 4-Group Grid */
.valuechain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.vc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.15rem;
    transition: transform 0.2s ease;
}

.vc-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

.vc-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.vc-icon {
    font-size: 1.4rem;
}

.vc-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
}

.vc-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.vc-stock-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vc-stock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.82rem;
    transition: background 0.15s ease;
}

.vc-stock-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.vc-stock-left {
    display: flex;
    flex-direction: column;
}

.vc-stock-name {
    font-weight: 600;
    color: #f1f5f9;
}

.vc-stock-sym {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.vc-stock-right {
    text-align: right;
}

.vc-stock-price {
    font-weight: 700;
}

.rate-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 2px;
}

.rate-up {
    color: var(--color-up);
    background: rgba(239, 68, 68, 0.12);
}

.rate-down {
    color: var(--color-down);
    background: rgba(59, 130, 246, 0.12);
}

.rate-neutral {
    color: var(--color-neutral);
    background: rgba(255, 255, 255, 0.08);
}

/* 8. Macro Indicators & Sentinel Logs */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.macro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.macro-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem;
}

.macro-name {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.macro-val {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.sentinel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    max-height: 290px;
    overflow-y: auto;
}

.sentinel-log-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 0;
    font-size: 0.82rem;
}

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

.sentinel-log-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 4px;
}

.sentinel-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.sentinel-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-line;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-backdrop.active {
    display: flex;
}

.modal-content {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 14px;
    width: 90%;
    max-width: 520px;
    padding: 1.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.close-btn:hover {
    color: #fff;
}

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

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-input {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.88rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.notif-status-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 12px;
}

.notif-icon {
    font-size: 1.5rem;
}

.notif-info {
    flex: 1;
}

.notif-title {
    font-weight: 700;
    font-size: 0.9rem;
}

.notif-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.history-item:hover {
    background: #334155;
}

.history-item-title {
    font-weight: 600;
    font-size: 0.88rem;
}

.history-item-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Spinner */
.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px auto;
}

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

.loading-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

/* ------------------------------------------------------------------- */
/* Stock Reason Tooltip & Indicators                                   */
/* ------------------------------------------------------------------- */
.vc-stock-row {
    position: relative;
    cursor: pointer;
    transition: background 0.15s ease;
}

.reason-indicator {
    font-size: 0.8rem;
    margin-left: 6px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.reason-indicator:hover {
    opacity: 1;
    transform: scale(1.2);
}

.vc-reason-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 290px;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    padding: 10px 12px;
    color: #f8fafc;
    font-size: 0.76rem;
    line-height: 1.45;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
    z-index: 100;
    pointer-events: auto;
    animation: tooltipFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.vc-reason-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.97) transparent transparent transparent;
}

[data-theme="light"] .vc-reason-tooltip {
    background: #ffffff;
    border-color: rgba(14, 116, 144, 0.3);
    color: #0f172a;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .vc-reason-tooltip::after {
    border-color: #ffffff transparent transparent transparent;
}

.vc-stock-row:hover .vc-reason-tooltip,
.vc-stock-row.tooltip-active .vc-reason-tooltip {
    display: block;
}

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

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    font-size: 0.8rem;
}

[data-theme="light"] .tooltip-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.tooltip-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.tooltip-body {
    color: var(--text-secondary);
    font-size: 0.74rem;
    margin-bottom: 6px;
}

.tooltip-footer {
    display: flex;
    justify-content: flex-end;
    font-size: 0.68rem;
    color: var(--accent-blue);
    cursor: pointer;
    font-weight: 600;
}

.tooltip-footer:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------------------- */
/* Comprehensive Mobile & Responsive Media Queries                     */
/* ------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .pulse-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .valuechain-grid {
        grid-template-columns: 1fr 1fr;
    }
    .hero-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: auto;
        padding: 10px 0;
        flex-wrap: wrap;
        gap: 8px;
    }
    .brand-info h1 {
        font-size: 1rem;
    }
    .brand-badge {
        display: none;
    }
    .header-actions {
        width: 100%;
        justify-content: space-between;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .header-actions .btn {
        padding: 4px 8px;
        font-size: 0.72rem;
        white-space: nowrap;
    }
    .live-indicator {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    
    .principle-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 14px;
    }
    
    /* Horizontal Scrolling Main Tabs */
    .main-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .main-tabs::-webkit-scrollbar {
        display: none;
    }
    .tab-btn {
        flex: 0 0 auto;
        padding: 8px 14px;
        font-size: 0.82rem;
        white-space: nowrap;
    }
    
    .pulse-grid {
        grid-template-columns: 1fr;
    }
    .macro-big4-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .macro-big-tile {
        padding: 10px;
    }
    .macro-big-val {
        font-size: 1.1rem;
    }
    
    .valuechain-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-2col {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    /* 4-Column Macro Grid -> Clean 2-Column Mobile Grid with Big Numbers */
    .macro-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
    .macro-item {
        padding: 12px 10px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 10px;
    }
    .macro-name {
        font-size: 0.78rem;
        font-weight: 600;
        color: var(--text-secondary);
        margin-bottom: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .macro-val {
        font-size: 1.35rem !important;
        font-weight: 800 !important;
        letter-spacing: -0.02em;
        margin-bottom: 4px;
        color: var(--text-primary);
    }
    .macro-item .rate-badge {
        align-self: flex-start;
        font-size: 0.75rem;
        padding: 2px 7px;
        font-weight: 700;
    }
    
    /* Mobile Quadrant Matrix Layout Enhancement (Wide & Roomy) */
    .quadrant-section {
        padding: 10px 8px !important;
        margin-bottom: 1.25rem !important;
        border-radius: 12px;
    }
    .quadrant-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 0.75rem;
    }
    .quadrant-header > div:last-child {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }
    .quadrant-canvas-wrap {
        height: 480px !important;
        border-radius: 10px;
    }
    
    /* Sticky Anchor Pills Mobile Optimization */
    .anchor-nav-pills {
        padding: 6px 10px;
        gap: 6px;
        margin-bottom: 1rem;
        top: 6px;
    }
    .anchor-pill {
        font-size: 0.78rem;
        padding: 6px 12px;
    }
    
    .hero-summary {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    .holdings-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-briefing-box {
        padding: 14px;
    }
    .briefing-table th, 
    .briefing-table td {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.25rem;
    }
    
    .vc-reason-tooltip {
        left: 0;
        transform: none;
        width: 100%;
        bottom: calc(100% + 4px);
    }
    .vc-reason-tooltip::after {
        left: 20px;
        transform: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem !important;
    }
    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    .brand-info h1 {
        font-size: 0.92rem;
    }
    .action-quick-badges {
        grid-template-columns: 1fr;
    }
    .holding-stats-table td {
        padding: 4px 6px;
        font-size: 0.74rem;
    }
    .swing-targets-grid {
        grid-template-columns: 1fr;
    }
    .quadrant-canvas-wrap {
        height: 460px !important;
    }
    .macro-val {
        font-size: 1.25rem !important;
    }
    .macro-item {
        padding: 10px 8px;
    }
}

/* ============================================================
   Technical Pattern Radar & Guest Market Styles
   ============================================================ */
.pattern-radar-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
}

.pattern-radar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 10px;
}

.pattern-radar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.pattern-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pattern-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.12);
}

.pattern-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.6rem;
}

.pattern-stock-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pattern-stock-code {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 4px;
}

.pattern-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.pattern-badge.badge-gold {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}

.pattern-badge.badge-green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.4);
}

.pattern-badge.badge-purple {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.4);
}

.pattern-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.6rem;
}

.pattern-cur-price {
    font-size: 1.15rem;
    font-weight: 700;
}

.pattern-detail-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.pattern-detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.pattern-detail-item:last-child {
    margin-bottom: 0;
}

.pattern-trend-val {
    font-weight: 700;
}
.pattern-trend-val.trend-up {
    color: #86efac;
}
.pattern-trend-val.trend-down {
    color: #cbd5e1;
}
.pattern-stars {
    color: #fbbf24;
    font-size: 0.85rem;
}
.pattern-level-val {
    color: #38bdf8;
    font-weight: 600;
}

.pattern-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 0.6rem;
    margin-top: auto;
}

.pattern-trend-label {
    font-size: 0.76rem;
    font-weight: 600;
}

.chart-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--bg-hover);
    transition: all 0.15s ease;
}

.chart-link-btn:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}

/* Quick Anchor Navigation Pills (Premium Glassmorphism Sticky Bar) */
.anchor-nav-pills {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: sticky;
    top: 10px;
    z-index: 95;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.anchor-nav-pills::-webkit-scrollbar {
    display: none;
}

.anchor-pill {
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 7px 15px;
    border-radius: 9999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.anchor-pill:hover {
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.12);
    transform: translateY(-1px);
}

.anchor-pill.active {
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    border-color: #38bdf8;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.4);
}

[data-theme="light"] .anchor-nav-pills {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .anchor-pill {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

[data-theme="light"] .anchor-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

[data-theme="light"] .anchor-pill.active {
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    border-color: #0284c7;
}

/* ============================================================
   Quadrant Map & Deep-Dive Chart Center Styles
   ============================================================ */
.quadrant-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
    position: relative;
}

.quadrant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 10px;
}

.quadrant-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.quadrant-canvas-wrap {
    width: 100%;
    height: 420px;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
}

.quadrant-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.quadrant-floating-tooltip {
    position: fixed;
    display: none;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    transition: opacity 0.1s ease;
}

/* Deep-Dive Chart Center Modal */
.chart-center-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    overflow-x: auto;
}

.chart-tab-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chart-tab-btn.active {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.chart-canvas-container {
    width: 100%;
    height: 380px;
    position: relative;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.chart-control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 8px;
}

/* After-Hours (시간외 단일가) Badge Styling */
.after-hours-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    padding: 3px 8px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.25);
    border-radius: 6px;
    font-size: 0.76rem;
    line-height: 1.3;
}
.after-hours-badge .ah-tag {
    color: var(--accent-blue);
    font-weight: 700;
}
.after-hours-badge .ah-val {
    font-weight: 700;
    color: var(--text-primary);
}
.after-hours-badge .ah-rate.ah-up {
    color: var(--color-up);
    font-weight: 700;
}
.after-hours-badge .ah-rate.ah-down {
    color: var(--color-down);
    font-weight: 700;
}
.after-hours-badge .ah-rate.ah-neutral {
    color: var(--text-muted);
    font-weight: 600;
}

.pattern-after-hours {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: -2px;
    margin-bottom: 10px;
    font-size: 0.76rem;
    line-height: 1.3;
}
.pattern-after-hours .ah-tag {
    background: rgba(14, 165, 233, 0.12);
    color: var(--accent-blue);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.72rem;
}
.pattern-after-hours .ah-val {
    font-weight: 700;
    color: var(--text-primary);
}
.pattern-after-hours .ah-rate.ah-up {
    color: var(--color-up);
    font-weight: 700;
}
.pattern-after-hours .ah-rate.ah-down {
    color: var(--color-down);
    font-weight: 700;
}
.pattern-after-hours .ah-rate.ah-neutral {
    color: var(--text-muted);
    font-weight: 600;
}/* ============================================================ */
/* AI Prediction Accuracy & Self-Reflection Learning Journal   */
/* ============================================================ */
.ai-learning-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

[data-theme="light"] .ai-learning-card {
    background: linear-gradient(135deg, #ffffff, #f0f9ff);
    border: 1px solid #bae6fd;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.08);
}

.ai-learning-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.85rem;
}

[data-theme="light"] .ai-learning-header {
    border-bottom-color: #e2e8f0;
}

.ai-learning-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ai-learning-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="light"] .ai-learning-title {
    color: #0f172a;
}

.ai-learning-badge {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #10b981;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ai-learning-badge .pulse-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.4); opacity: 1; }
}

.ai-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 1.25rem;
}

.ai-kpi-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

[data-theme="light"] .ai-kpi-item {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ai-kpi-item .label {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.ai-kpi-item .val {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.ai-kpi-item .sub {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 4px;
}

.ai-reflection-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-reflection-item {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    transition: all 0.2s ease;
}

[data-theme="light"] .ai-reflection-item {
    background: #ffffff;
    border-color: #e2e8f0;
}

.ai-reflection-item:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(15, 23, 42, 0.7);
}

[data-theme="light"] .ai-reflection-item:hover {
    background: #f8fafc;
    border-color: #0284c7;
}

.reflection-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.reflection-date-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reflection-date {
    font-weight: 700;
    font-size: 0.84rem;
    color: var(--text-primary);
}

.hit-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 4px;
}

.hit-badge.hit {
    background: rgba(16, 185, 129, 0.18);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.hit-badge.partial {
    background: rgba(245, 158, 11, 0.18);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.hit-badge.miss {
    background: rgba(239, 68, 68, 0.18);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.hit-badge.pending {
    background: rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.hit-badge.holiday {
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.45);
}

.reflection-metrics {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.reflection-metrics strong {
    color: var(--text-primary);
}

.reflection-text {
    font-size: 0.82rem;
    line-height: 1.6;
    color: #cbd5e1;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #38bdf8;
    margin-top: 6px;
}

[data-theme="light"] .reflection-text {
    background: #f1f5f9;
    color: #334155;
    border-left-color: #0284c7;
}

/* ============================================================ */
/* [NEW] 1. Lightweight CSS Tooltip System & Help Indicators   */
/* ============================================================ */
.help-term {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: help;
    border-bottom: 1px dotted rgba(56, 189, 248, 0.6);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.help-term:hover {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
}

.help-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    font-size: 0.68rem;
    font-weight: 800;
    margin-left: 3px;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.15s ease;
}

.help-icon-btn:hover {
    background: #38bdf8;
    color: #0f172a;
    transform: scale(1.1);
}

/* Global Floating Tooltip Box */
.global-floating-tooltip {
    position: fixed;
    z-index: 99999;
    max-width: 290px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.15);
    backdrop-filter: blur(8px);
    color: #e2e8f0;
    font-size: 0.78rem;
    line-height: 1.55;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    word-break: keep-all;
}

.global-floating-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-term-title {
    font-weight: 800;
    color: #38bdf8;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================ */
/* [NEW] 2. Supply Traits Tags (수급 성격 세분화 칩)           */
/* ============================================================ */
.supply-traits-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.trait-chip {
    font-size: 0.71rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.trait-chip.trait-foreign {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.trait-chip.trait-inst {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

.trait-chip.trait-prog {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.3);
    color: #c084fc;
}

.trait-chip.trait-warning {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* ============================================================ */
/* [NEW] 3. Global Gap Correlation Intelligence Card          */
/* ============================================================ */
.gap-intel-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.75));
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    margin-top: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

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

.gap-intel-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

@media (max-width: 768px) {
    .gap-intel-grid {
        grid-template-columns: 1fr;
    }
}

.gap-metric-tile {
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 12px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.gap-metric-tile:hover {
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-1px);
}

.gap-metric-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.gap-metric-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: #94a3b8;
}

.gap-rate-badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.gap-metric-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.02em;
    margin: 2px 0 4px;
}

.gap-metric-desc {
    font-size: 0.71rem;
    color: #94a3b8;
    line-height: 1.45;
}

