/* ==========================================================================
   ELITE NEWS RISK LOCK CSS
   Glassmorphism, Quant Warnings, Animated Countdowns
   ========================================================================== */

/* Layout & Globals */
.nws-container { margin-left: 20px; padding: 32px; min-height: 100vh; color: #ffffff; display: flex; flex-direction: column; gap: 24px; font-family: 'Inter', sans-serif; position: relative; }
.nws-layout { display: flex; gap: 24px; align-items: flex-start; }
.nws-upcoming-panel { width: 380px; flex-shrink: 0; position: sticky; top: 32px; }
.nws-main-panel { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

/* Utilities */
.hidden { display: none !important; }
.m-0 { margin: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-sm { font-size: 0.85rem; } .text-muted { color: rgba(255,255,255,0.6); } .w-full { width: 100%; } .text-center { text-align: center; }
.uppercase { text-transform: uppercase; } .letter-spacing { letter-spacing: 1px; } .font-bold { font-weight: 700; } .tabular-nums { font-variant-numeric: tabular-nums; }
.text-purple { color: #c084fc; } .text-cyan { color: #06b6d4; } .text-gold { color: #fbbf24; } .text-red { color: #ef5350; } .text-green { color: #22c55e; } .text-orange { color: #f97316; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseDanger { 0% { box-shadow: 0 0 0 0 rgba(239,83,80,0.4); } 70% { box-shadow: 0 0 0 20px rgba(239,83,80,0); } 100% { box-shadow: 0 0 0 0 rgba(239,83,80,0); } }
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.fade-in { animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.pulse { animation: pulseDanger 2s infinite; border-radius: 50%; }

/* Cards */
.nws-card { background: rgba(255,255,255,0.03); backdrop-filter: blur(24px) saturate(180%); border: 1px solid rgba(255,255,255,0.08); border-radius: 24px; padding: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05); transition: all 0.4s; }

/* Active Banner (The Lockout) */
.nws-active-banner { background: radial-gradient(circle at center, rgba(239,83,80,0.15) 0%, rgba(0,0,0,0.8) 100%); border: 2px solid #ef5350; border-radius: 16px; padding: 24px 32px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 0 40px rgba(239,83,80,0.3), inset 0 0 20px rgba(239,83,80,0.2); animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; margin-bottom: 24px; z-index: 100; position: relative; }
.nws-active-content { display: flex; align-items: center; gap: 24px; }
.nws-active-icon { font-size: 3rem; color: #ef5350; display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; background: rgba(239,83,80,0.1); border-radius: 50%; }
.nws-timer { font-size: 2rem; letter-spacing: 2px; }

/* Header */
.nws-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 24px; }
.nws-header__title { font-size: 2.2rem; font-weight: 800; margin: 0 0 8px 0; letter-spacing: 1px; text-transform: uppercase; }
.nws-header__subtitle { color: #c084fc; margin: 0; font-size: 1rem; }
.nws-header__stats { display: flex; gap: 24px; }
.nws-stat-card { text-align: center; }
.nws-stat-val { display: block; font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.nws-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); text-transform: uppercase; }

/* Buttons & Inputs */
.nws-btn { padding: 10px 20px; border-radius: 12px; font-weight: 600; font-size: 0.85rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.4s; border: none; text-transform: uppercase; font-family: inherit; }
.nws-btn--primary { background: linear-gradient(135deg, #a855f7, #7e22ce); color: white; box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3); }
.nws-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5); }
.nws-btn--secondary { background: rgba(255,255,255,0.05); color: white; border: 1px solid rgba(255,255,255,0.1); }
.nws-btn--secondary:hover { background: rgba(255,255,255,0.1); border-color: #c084fc; color: #c084fc; }
.nws-btn--danger { background: linear-gradient(135deg, #ef5350, #c62828); color: white; box-shadow: 0 4px 15px rgba(239, 83, 80, 0.3); }
.nws-btn--danger:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(239, 83, 80, 0.5); }
.nws-btn--danger:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.nws-btn-icon { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: white; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.nws-btn-icon:hover { background: rgba(192,132,252,0.2); color: #c084fc; border-color: #c084fc; }

.nws-input, .nws-select { width: 100%; padding: 10px 14px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: white; border-radius: 8px; transition: 0.3s; font-family: inherit; font-size: 0.85rem; outline: none; }
.nws-input:focus, .nws-select:focus { border-color: #c084fc; box-shadow: 0 0 0 2px rgba(192,132,252,0.2); }
.nws-form-group { margin-bottom: 16px; }
.nws-form-group label { display: block; margin-bottom: 8px; font-size: 0.85rem; color: rgba(255,255,255,0.8); }
.nws-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Switch Toggle */
.nws-switch { position: relative; display: inline-block; width: 42px; height: 22px; flex-shrink: 0; }
.nws-switch input { opacity: 0; width: 0; height: 0; }
.nws-slider-toggle { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255,255,255,0.1); transition: .4s; border-radius: 24px; }
.nws-slider-toggle:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
.nws-switch input:checked + .nws-slider-toggle { background-color: #a855f7; }
.nws-switch input:checked + .nws-slider-toggle:before { transform: translateX(20px); }

/* Timeline Events */
.nws-timeline { display: flex; flex-direction: column; gap: 16px; position: relative; }
.nws-timeline::before { content:''; position:absolute; top:0; bottom:0; left:12px; width:2px; background: rgba(255,255,255,0.05); }
.nws-event-card { position: relative; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 16px; margin-left: 32px; transition: 0.3s; }
.nws-event-card:hover { transform: translateX(4px); background: rgba(255,255,255,0.03); border-color: rgba(192,132,252,0.3); }
.nws-event-card::before { content:''; position:absolute; top:20px; left:-24px; width:10px; height:10px; border-radius:50%; background: #c084fc; box-shadow: 0 0 10px rgba(192,132,252,0.5); }
.ev-time-chip { font-size: 0.75rem; color: #fbbf24; font-weight: 700; margin-bottom: 4px; text-transform: uppercase; }
.ev-title { font-size: 1rem; font-weight: 700; margin: 0 0 8px 0; }
.ev-impact-low { border-left: 4px solid #22c55e; } .ev-impact-low::before { background: #22c55e; box-shadow: 0 0 10px rgba(34,197,94,0.5); }
.ev-impact-medium { border-left: 4px solid #fbbf24; } .ev-impact-medium::before { background: #fbbf24; box-shadow: 0 0 10px rgba(251,191,36,0.5); }
.ev-impact-high { border-left: 4px solid #f97316; } .ev-impact-high::before { background: #f97316; box-shadow: 0 0 10px rgba(249,115,22,0.5); }
.ev-impact-extreme { border-left: 4px solid #ef5350; } .ev-impact-extreme::before { background: #ef5350; box-shadow: 0 0 10px rgba(239,83,80,0.5); }
.ev-symbols { font-size: 0.7rem; color: rgba(255,255,255,0.5); margin-top: 8px; }
.ev-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; opacity: 0; transition: 0.3s; }
.nws-event-card:hover .ev-actions { opacity: 1; }
.ev-btn { background: transparent; border: none; color: rgba(255,255,255,0.4); cursor: pointer; transition: 0.2s; }
.ev-btn:hover { color: #fff; }

/* Historical Impact */
.nws-impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.nws-impact-box { background: rgba(0,0,0,0.2); padding: 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); text-align: center; }
.nws-impact-box .lbl { font-size: 0.75rem; color: rgba(255,255,255,0.5); text-transform: uppercase; display: block; margin-bottom: 8px; }
.nws-impact-box .val { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.nws-verdict-box { padding: 16px; border-radius: 8px; font-weight: 700; text-align: center; font-size: 0.95rem; }
.verdict-bad { background: rgba(239,83,80,0.1); border: 1px solid rgba(239,83,80,0.3); color: #ef5350; }
.verdict-good { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #22c55e; }

/* Audit Table */
.nws-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.nws-table th { text-align: left; padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); text-transform: uppercase; font-size: 0.75rem; }
.nws-table td { padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.nws-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Modals */
.nws-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.nws-modal__overlay { position: absolute; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); }
.nws-modal__content { position: relative; background: #0d0b12; border: 1px solid rgba(255,255,255,0.1); border-radius: 24px; width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; padding: 32px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); animation: fadeInUp 0.3s ease-out; }
.nws-modal__close { position: absolute; top: 24px; right: 24px; background: none; border: none; color: rgba(255,255,255,0.5); font-size: 1.5rem; cursor: pointer; transition: 0.3s; }
.nws-modal__close:hover { color: white; }

/* Settings Form */
.nws-settings-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.nws-settings-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; align-items: center; margin-top: 16px; }

/* Presets List */
.nws-presets-list { display: flex; flex-direction: column; gap: 12px; }
.nws-preset-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); padding: 16px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: 0.2s; }
.nws-preset-card:hover { background: rgba(192,132,252,0.1); border-color: #c084fc; transform: translateX(4px); }