/*
Theme Name: Romgaz DCF Analysis
Theme URI: https://romgaz.ro
Author: Claude / Anthropic
Description: Dashboard interactiv de analiză DCF pentru S.N.G.N. Romgaz S.A. — 3 scenarii (Conservator, Moderat, Optimist) bazate pe situațiile financiare individuale la 31.12.2025.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: romgaz-dcf
*/

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:      #060d1a;
  --bg-mid:       #0a1628;
  --bg-card:      rgba(15,23,42,0.85);
  --border:       #1e3a5f;
  --text-primary: #e2e8f0;
  --text-muted:   #94a3b8;
  --text-dim:     #64748b;
  --text-faint:   #475569;

  --col-cons:     #e07b54;
  --col-cons-lt:  #ff9a6c;
  --col-mod:      #5b9bd5;
  --col-mod-lt:   #7bb8f0;
  --col-opt:      #4caf7d;
  --col-opt-lt:   #6dcc9a;

  --active-col:   var(--col-mod);
  --active-lt:    var(--col-mod-lt);

  --font-serif:   'Georgia', 'Times New Roman', serif;
  --font-mono:    'Courier New', 'Lucida Console', monospace;
}

html, body { width: 100%; min-height: 100vh; }

body {
  font-family: var(--font-serif);
  background: linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-mid) 50%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
}

/* ===========================
   LAYOUT
   =========================== */
.dcf-wrapper { max-width: 1400px; margin: 0 auto; }

.dcf-header {
  background: linear-gradient(180deg, var(--bg-mid) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  padding: 28px 36px 20px;
}

.dcf-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.dcf-body { padding: 24px 36px; }

/* ===========================
   BADGE & TITLES
   =========================== */
.dcf-badge {
  display: inline-block;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 2px;
  color: #93c5fd;
  font-family: var(--font-mono);
  margin-bottom: 6px;
  margin-right: 10px;
}
.dcf-badge-date { color: var(--text-dim); font-size: 12px; vertical-align: middle; }

.dcf-title {
  font-size: 26px;
  font-weight: bold;
  color: #f1f5f9;
  letter-spacing: -0.5px;
  margin: 0 0 4px;
}
.dcf-subtitle {
  color: var(--text-dim);
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  margin: 0;
}

.dcf-header-right { text-align: right; }
.dcf-header-right .label { color: var(--text-dim); font-size: 11px; letter-spacing: 1px; font-family: var(--font-mono); }
.dcf-header-right .big-num { font-size: 28px; font-weight: bold; color: var(--col-opt); line-height: 1.1; }
.dcf-header-right .small-note { color: var(--text-muted); font-size: 12px; }

/* ===========================
   KPI STRIP
   =========================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  backdrop-filter: blur(10px);
}
.kpi-card .kpi-label {
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 1.5px;
  font-family: var(--font-mono);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.kpi-card .kpi-value { font-size: 16px; font-weight: bold; color: var(--text-primary); margin-bottom: 2px; }
.kpi-card .kpi-sub   { color: var(--col-opt); font-size: 11px; }

/* ===========================
   SCENARIO BUTTONS
   =========================== */
.scenario-grid {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.scenario-btn {
  flex: 1;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s ease;
  color: var(--text-primary);
  font-family: var(--font-serif);
}
.scenario-btn:hover { border-color: var(--sc-col); background: rgba(15,23,42,0.9); }
.scenario-btn.active { border-color: var(--sc-col); background: color-mix(in srgb, var(--sc-col) 15%, transparent); }

.scenario-btn .sc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.scenario-btn .sc-icon { font-size: 20px; color: var(--sc-col); }
.scenario-btn .sc-name { font-weight: bold; font-size: 16px; color: var(--sc-col); }
.scenario-btn .sc-desc { color: var(--text-muted); font-size: 11px; line-height: 1.4; margin-bottom: 10px; }

.scenario-btn .sc-params { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.scenario-btn .sc-params span { color: var(--text-dim); font-size: 11px; }
.scenario-btn .sc-params strong { color: var(--sc-col); }

.scenario-btn .sc-price-box {
  padding: 8px 12px;
  background: color-mix(in srgb, var(--sc-col) 8%, transparent);
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--sc-col) 30%, transparent);
}
.scenario-btn .sc-price-label { color: var(--text-dim); font-size: 10px; letter-spacing: 1px; font-family: var(--font-mono); }
.scenario-btn .sc-price-num   { color: var(--sc-col); font-size: 22px; font-weight: bold; }

/* ===========================
   TABS
   =========================== */
.tabs-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  margin-bottom: -1px;
  transition: color 0.2s;
}
.tab-btn:hover { color: var(--text-muted); }
.tab-btn.active { color: var(--active-col); border-bottom-color: var(--active-col); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===========================
   CARDS / PANELS
   =========================== */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}
.panel.accent-border { border-color: color-mix(in srgb, var(--active-col) 40%, transparent); }

.panel-title {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 2px;
  font-family: var(--font-mono);
  margin: 0 0 20px;
  text-transform: uppercase;
}

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

/* ===========================
   WATERFALL ROWS
   =========================== */
.wf-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  border: none;
}
.wf-row.total { background: #1e293b; border: 1px solid #334155; }
.wf-row.equity { border: 1px solid color-mix(in srgb, var(--active-col) 50%, transparent); background: color-mix(in srgb, var(--active-col) 12%, transparent); }

.wf-row .wf-label { color: var(--text-muted); font-size: 13px; }
.wf-row .wf-sub   { color: var(--text-faint); font-size: 11px; }
.wf-row.total .wf-label, .wf-row.equity .wf-label { color: var(--text-primary); font-weight: bold; font-size: 14px; }
.wf-row.equity .wf-label { color: var(--active-col); }
.wf-row .wf-val   { color: var(--text-muted); font-family: var(--font-mono); font-size: 14px; }
.wf-row.total .wf-val { color: var(--text-primary); font-weight: bold; }
.wf-row.equity .wf-val { color: var(--active-col); font-size: 18px; font-weight: bold; }
.wf-row .wf-val.positive { color: var(--col-opt); }

.price-box {
  margin-top: 16px;
  padding: 14px;
  text-align: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--active-col) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--active-col) 30%, transparent);
}
.price-box .pb-label { color: var(--text-dim); font-size: 10px; letter-spacing: 2px; font-family: var(--font-mono); margin-bottom: 6px; }
.price-box .pb-price { color: var(--active-col); font-size: 40px; font-weight: bold; line-height: 1; }
.price-box .pb-unit  { color: var(--text-dim); font-size: 13px; margin-top: 2px; }

/* ===========================
   CHART CONTAINERS
   =========================== */
.chart-box { position: relative; height: 260px; }

/* ===========================
   METRIC MINI-CARDS (overview bottom)
   =========================== */
.mini-card {
  background: rgba(15,23,42,0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.mini-card .mc-label { color: var(--text-dim); font-size: 10px; letter-spacing: 1.5px; font-family: var(--font-mono); margin-bottom: 6px; text-transform: uppercase; }
.mini-card .mc-val   { font-size: 22px; font-weight: bold; color: var(--active-col); }
.mini-card .mc-sub   { color: var(--text-faint); font-size: 11px; margin-top: 2px; }

/* ===========================
   PROJECTIONS TABLE
   =========================== */
.proj-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 12px; overflow-x: auto; }
.proj-table th {
  padding: 12px 14px;
  color: var(--text-dim);
  border-bottom: 1px solid color-mix(in srgb, var(--active-col) 25%, transparent);
  background: rgba(15,23,42,0.9);
  font-weight: normal;
  font-size: 11px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.proj-table th:first-child { text-align: left; }
.proj-table th:not(:first-child) { text-align: right; }
.proj-table td { padding: 10px 14px; white-space: nowrap; }
.proj-table td:first-child { text-align: left; }
.proj-table td:not(:first-child) { text-align: right; }
.proj-table tr:nth-child(odd) td { background: rgba(15,23,42,0.3); }
.proj-table .row-bold td { font-weight: bold; }
.proj-table .row-fcff td:first-child { border-left: 3px solid var(--active-col); }
.proj-table .row-fcff .col-active { color: var(--active-col); font-weight: bold; }
.proj-table .row-pv { background: color-mix(in srgb, var(--active-col) 8%, transparent) !important; }
.proj-table .row-pv td { color: var(--active-lt); font-weight: bold; }
.proj-table .col-base { color: var(--text-faint); }
.proj-table .col-val  { color: var(--text-muted); }

.table-wrapper { overflow-x: auto; margin-bottom: 20px; }

/* ===========================
   COMPARISON
   =========================== */
.sc-compare-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
  background: rgba(15,23,42,0.5);
}
.sc-compare-row.active { border-color: var(--sc-col); background: color-mix(in srgb, var(--sc-col) 10%, transparent); }
.sc-compare-row .cmp-name { font-weight: bold; font-size: 14px; color: var(--sc-col); }
.sc-compare-row .cmp-ev   { color: var(--text-dim); font-size: 11px; font-family: var(--font-mono); margin-top: 2px; }
.sc-compare-row .cmp-price-big { font-size: 22px; font-weight: bold; color: var(--sc-col); text-align: right; }
.sc-compare-row .cmp-unit { color: var(--text-dim); font-size: 11px; text-align: right; }

.range-box {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(94,234,212,0.05);
  border: 1px solid rgba(94,234,212,0.2);
  border-radius: 10px;
}
.range-box .range-label { color: #5eead4; font-size: 11px; letter-spacing: 1px; font-family: var(--font-mono); }
.range-box .range-val   { color: var(--text-primary); font-size: 18px; font-weight: bold; margin-top: 4px; }
.range-box .range-sub   { color: var(--text-dim); font-size: 11px; margin-top: 2px; }

.comp-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 12px; }
.comp-table th { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 11px; letter-spacing: 1px; font-weight: bold; }
.comp-table th:first-child { text-align: left; color: var(--text-dim); }
.comp-table th.h-cons { color: var(--col-cons); text-align: center; }
.comp-table th.h-mod  { color: var(--col-mod);  text-align: center; }
.comp-table th.h-opt  { color: var(--col-opt);  text-align: center; }
.comp-table td { padding: 10px 14px; }
.comp-table td:first-child { color: var(--text-dim); text-align: left; }
.comp-table td:not(:first-child) { text-align: center; color: var(--text-muted); }
.comp-table tr:nth-child(odd) td { background: rgba(15,23,42,0.3); }
.comp-table .row-bold td { font-weight: bold; color: var(--text-primary); }
.comp-table .row-price td.v-cons { color: var(--col-cons); font-size: 16px; font-weight: bold; }
.comp-table .row-price td.v-mod  { color: var(--col-mod);  font-size: 16px; font-weight: bold; }
.comp-table .row-price td.v-opt  { color: var(--col-opt);  font-size: 16px; font-weight: bold; }

/* ===========================
   ASSUMPTIONS
   =========================== */
.wacc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  margin-bottom: 4px;
  border-radius: 6px;
}
.wacc-row.hl { background: color-mix(in srgb, var(--active-col) 12%, transparent); border: 1px solid color-mix(in srgb, var(--active-col) 35%, transparent); }
.wacc-row .wr-label { color: var(--text-dim); font-size: 12px; }
.wacc-row .wr-val   { color: var(--text-muted); font-family: var(--font-mono); font-size: 13px; }
.wacc-row.hl .wr-label { color: var(--text-primary); }
.wacc-row.hl .wr-val   { color: var(--active-col); font-size: 16px; font-weight: bold; }

.risk-item {
  padding: 12px 14px;
  margin-bottom: 10px;
  border-left: 3px solid var(--ri-col);
  background: color-mix(in srgb, var(--ri-col) 5%, transparent);
  border-radius: 0 8px 8px 0;
}
.risk-item .ri-title { font-weight: bold; font-size: 12px; color: var(--ri-col); margin-bottom: 4px; }
.risk-item .ri-text  { color: var(--text-dim); font-size: 11px; line-height: 1.5; }

.disclaimer {
  background: rgba(15,23,42,0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.6;
}
.disclaimer strong { color: var(--text-dim); }

/* ===========================
   FOOTER
   =========================== */
.dcf-footer {
  border-top: 1px solid var(--border);
  padding: 16px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #334155;
  font-size: 11px;
  font-family: var(--font-mono);
  flex-wrap: wrap;
  gap: 8px;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 900px) {
  .dcf-header, .dcf-body { padding: 16px 16px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid .kpi-card:last-child { grid-column: span 2; }
  .scenario-grid { flex-direction: column; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .dcf-footer { flex-direction: column; text-align: center; }
}
@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .dcf-title { font-size: 20px; }
}
