/* ==========================================================================
   ELITE COT REPORTS CSS
   Glassmorphism, Quant Dashboards, Data Viz
   ========================================================================== */

/* Layout & Globals */
.cot-container { margin-left: 20px; padding: 32px; min-height: 100vh; color: #ffffff; font-family: 'Inter', sans-serif; display: flex; flex-direction: column; gap: 24px; position: relative; }

/* 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-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.pt-8 { padding-top: 8px; } .border-top { border-top: 1px solid rgba(255,255,255,0.1); }
.text-sm { font-size: 0.85rem; } .text-muted { color: rgba(255,255,255,0.6); } .w-full { width: 100%; } .text-center { text-align: center; } .text-right { text-align: right; }
.uppercase { text-transform: uppercase; } .letter-spacing { letter-spacing: 1px; } .font-bold { font-weight: 700; } .tabular-nums { font-variant-numeric: tabular-nums; }
.flex-align-center { display: flex; align-items: center; } .gap-8 { gap: 8px; } .flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Palette */
.text-purple { color: #c084fc; } .text-cyan { color: #06b6d4; } .text-gold { color: #fbbf24; } .text-red { color: #ef5350; } .text-green { color: #22c55e; } .text-white { color: #ffffff; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } 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 15px 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.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.pulse { animation: pulseDanger 2s infinite; border-radius: 50%; }

/* Cards & Buttons */
.cot-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; }
.cot-btn { padding: 10px 20px; border-radius: 12px; font-weight: 700; font-size: 0.85rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.3s; border: none; text-transform: uppercase; font-family: inherit; }
.cot-btn--primary { background: linear-gradient(135deg, #a855f7, #7e22ce); color: white; box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3); }
.cot-btn--primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5); }
.cot-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }
.cot-btn--secondary { background: rgba(255,255,255,0.05); color: white; border: 1px solid rgba(255,255,255,0.1); }
.cot-btn--secondary:hover { background: rgba(255,255,255,0.1); border-color: #c084fc; color: #c084fc; }
.cot-btn-icon { background: transparent; border: none; color: rgba(255,255,255,0.6); cursor: pointer; transition: 0.2s; font-size: 1.2rem; }
.cot-btn-icon:hover { color: white; }

.cot-input { width: 100%; padding: 12px 16px; 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; }
.cot-input:focus { border-color: #c084fc; box-shadow: 0 0 0 2px rgba(192,132,252,0.2); }

/* Banner */
.cot-extremes { background: radial-gradient(circle at left, rgba(239,83,80,0.15), transparent); border: 1px solid rgba(239,83,80,0.3); padding: 16px 24px; border-radius: 16px; margin-bottom: 8px; animation: slideDown 0.4s ease-out; }
.cot-extremes-header { display: flex; justify-content: space-between; align-items: center; }
.cot-extremes-list { display: flex; flex-direction: column; gap: 8px; }
.cot-extreme-item { background: rgba(0,0,0,0.3); padding: 12px 16px; border-radius: 8px; font-size: 0.85rem; border-left: 3px solid #ef5350; cursor: pointer; transition: 0.2s; }
.cot-extreme-item:hover { background: rgba(255,255,255,0.05); transform: translateX(4px); }

/* Header Elements */
.cot-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 24px; }
.cot-header__title { font-size: 2.2rem; font-weight: 800; margin: 0 0 8px 0; letter-spacing: 1px; }
.cot-header__subtitle { color: #c084fc; margin: 0; font-size: 1rem; }
.cot-header__stats { display: flex; gap: 24px; }
.cot-stat-card { text-align: center; }
.cot-stat-val { display: block; font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cot-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); text-transform: uppercase; }

/* Tabs */
.cot-categories { display: flex; gap: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.cot-tab { background: transparent; border: 1px solid transparent; color: rgba(255,255,255,0.6); padding: 8px 16px; border-radius: 20px; font-weight: 600; cursor: pointer; transition: 0.3s; white-space: nowrap; }
.cot-tab:hover { color: white; background: rgba(255,255,255,0.05); }
.cot-tab.active { background: rgba(192,132,252,0.2); color: #c084fc; border-color: rgba(192,132,252,0.4); }

/* Grid */
.cot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.cot-m-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 24px; transition: 0.3s; cursor: pointer; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.cot-m-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.05); border-color: rgba(192,132,252,0.4); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.cot-m-card.is-extreme { border-color: rgba(239,83,80,0.5); background: radial-gradient(circle at top right, rgba(239,83,80,0.1), transparent); }
.cot-m-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.cot-m-title { font-size: 1.1rem; font-weight: 800; margin: 0; line-height: 1.3; }
.cot-m-sym { font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.cot-badge { font-size: 0.65rem; padding: 3px 6px; border-radius: 4px; background: rgba(255,255,255,0.1); text-transform: uppercase; font-weight: 800; letter-spacing: 1px; color: #fff; }
.cot-m-net { font-size: 2rem; font-weight: 800; margin: 16px 0 8px 0; tabular-nums: tabular-nums; }
.cot-m-wow { font-size: 0.85rem; font-weight: 700; }
.cot-m-gauge { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; margin: 16px 0 8px 0; overflow: hidden; position: relative; }
.cot-m-gauge-fill { position: absolute; left: 0; top: 0; height: 100%; background: #c084fc; border-radius: 3px; }
.cot-m-gauge-fill.is-high { background: #22c55e; }
.cot-m-gauge-fill.is-low { background: #ef5350; }
.cot-m-spark { width: 100%; height: 50px; margin-top: 16px; }

/* SVG */
.spark-svg { width: 100%; height: 100%; overflow: visible; }
.spark-line { fill: none; stroke: rgba(255,255,255,0.4); stroke-width: 2; stroke-linecap: round; }
.spark-line-up { stroke: #22c55e; } .spark-line-dn { stroke: #ef5350; }
.spark-zero { stroke: rgba(255,255,255,0.1); stroke-width: 1; stroke-dasharray: 2; }

/* Modals */
.cot-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.cot-modal__overlay { position: absolute; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); }
.cot-modal__content { position: relative; background: #0d0b12; border: 1px solid rgba(255,255,255,0.1); border-radius: 24px; width: 90%; 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; }
.cot-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; }
.cot-modal__close:hover { color: white; }

/* Detail KPI Grid */
.cot-kpi-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.cot-kpi-box { background: rgba(0,0,0,0.2); padding: 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; }
.box-large { border-top: 3px solid #06b6d4; }
.box-comm { border-top: 3px solid #ef5350; }
.box-small { border-top: 3px solid #fbbf24; }
.cot-kpi-box .lbl { font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.cot-kpi-box .val { font-size: 0.95rem; tabular-nums: tabular-nums; }

/* Big Chart */
.cot-chart-container { width: 100%; height: 300px; background: rgba(255,255,255,0.02); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); position: relative; overflow: hidden; }
.chart-axis { stroke: rgba(255,255,255,0.1); stroke-width: 1; }
.chart-bar-ls { fill: #06b6d4; opacity: 0.8; }
.chart-bar-cm { fill: #ef5350; opacity: 0.8; }

.cot-interpretation { background: rgba(168,85,247,0.1); border-left: 4px solid #c084fc; padding: 16px; border-radius: 8px; font-size: 0.95rem; line-height: 1.5; }