/* ========================================
   REVENUE LAB — GYC Simulator (Premium)
   ======================================== */

:root {
  --bg: #0C0B08;
  --bg2: #131210;
  --fg: #F4F0E7;
  --gold: #C9A84C;
  --gold-b: #DFC06A;
  --taupe: #A8998A;
  --esp: #3A352F;
  --grey: #B8B3A6;
  --carbon: #17150F;
  --green: #4CAF50;
  --yellow: #FFC107;
  --red: #E53935;
  --d: 'Fraunces', serif;
  --l: 'Schibsted Grotesk', sans-serif;
  --b: 'Inter', sans-serif;
  --radius: 12px;
  --glass: linear-gradient(145deg, rgba(30,28,22,0.9) 0%, rgba(18,16,12,0.95) 100%);
  --glass-border: rgba(201,168,76,0.12);
  --glow-gold: 0 4px 20px rgba(0,0,0,0.4), 0 0 30px rgba(201,168,76,0.06);
  --card-shine: inset 0 1px 0 rgba(255,255,255,0.04);
  --card-depth: inset 0 -2px 4px rgba(0,0,0,0.3);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--b); font-weight: 400; color: var(--fg);
  background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased;
  min-height: 100vh; overflow-x: hidden;
}

/* ---- TOPBAR ---- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12,11,8,0.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201,168,76,0.08);
}
.topbar__inner {
  max-width: 1440px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar__logo { font-family: var(--d); font-weight: 600; font-size: 1rem; color: var(--fg); text-decoration: none; }
.topbar__badge {
  font-family: var(--l); font-weight: 500; font-size: 0.7rem;
  color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 16px; border: 1px solid rgba(201,168,76,0.25); border-radius: 20px;
  background: rgba(201,168,76,0.04);
}

/* ---- MAIN LAYOUT ---- */
.lab {
  display: grid; grid-template-columns: 300px 1fr;
  max-width: 1440px; margin: 0 auto; min-height: calc(100vh - 50px);
}

/* ---- LEFT PANEL ---- */
.panel--inputs {
  background: linear-gradient(180deg, rgba(19,18,16,0.98) 0%, rgba(12,11,8,0.98) 100%);
  border-right: 1px solid rgba(201,168,76,0.06);
  overflow-y: auto; max-height: calc(100vh - 50px); position: sticky; top: 50px;
  padding: 20px 16px;
  scrollbar-width: thin; scrollbar-color: var(--esp) transparent;
}
.panel--inputs::-webkit-scrollbar { width: 4px; }
.panel--inputs::-webkit-scrollbar-thumb { background: var(--esp); border-radius: 4px; }
.panel__title {
  font-family: var(--d); font-weight: 700; font-size: 1.1rem;
  color: var(--gold); margin-bottom: 20px;
  text-shadow: 0 0 30px rgba(201,168,76,0.15);
}

/* ---- RIGHT PANEL ---- */
.panel--dashboard {
  padding: 24px 28px; overflow-y: auto;
  background: radial-gradient(ellipse at 30% 0%, rgba(201,168,76,0.02) 0%, transparent 60%);
}

/* ---- GROUPS ---- */
.group {
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(58,53,47,0.2);
}
.group:last-child { border-bottom: none; }
.group__title {
  font-family: var(--l); font-weight: 500; font-size: 0.68rem;
  color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 12px; opacity: 0.7;
}

/* ---- CONTROLS ---- */
.ctrl { margin-bottom: 10px; }
.ctrl__label {
  display: block; font-size: 0.73rem; color: var(--grey);
  margin-bottom: 4px; font-family: var(--l);
}
.ctrl__input {
  width: 100%; padding: 9px 10px;
  background: linear-gradient(145deg, rgba(30,28,22,0.6) 0%, rgba(20,18,14,0.8) 100%);
  border: 1px solid rgba(58,53,47,0.35); border-radius: 8px;
  color: var(--fg); font-family: var(--b); font-size: 0.85rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), inset 0 -1px 0 rgba(255,255,255,0.02);
}
.ctrl__input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 0 0 3px rgba(201,168,76,0.08), 0 0 16px rgba(201,168,76,0.06);
}
.ctrl__money { display: flex; align-items: stretch; }
.ctrl__currency {
  display: flex; align-items: center; padding: 0 8px;
  background: rgba(201,168,76,0.08); border: 1px solid rgba(58,53,47,0.35);
  border-right: none; border-radius: 8px 0 0 8px;
  color: var(--gold); font-family: var(--l); font-size: 0.8rem;
}
.ctrl__money .ctrl__input { border-radius: 0 8px 8px 0; }
.ctrl__desc { font-size: 0.65rem; color: var(--taupe); margin-top: 3px; line-height: 1.4; }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Duration unit toggle */
.ctrl__with-unit { display: flex; align-items: stretch; }
.ctrl__with-unit .ctrl__input { border-radius: 8px 0 0 8px; }
.ctrl__unit-toggle {
  display: flex; border: 1px solid rgba(58,53,47,0.35); border-left: none;
  border-radius: 0 8px 8px 0; overflow: hidden;
}
.ctrl__unit-btn {
  padding: 6px 10px; background: rgba(58,53,47,0.18);
  color: var(--taupe); font-family: var(--l); font-size: 0.72rem;
  border: none; cursor: pointer; transition: background 0.3s, color 0.3s;
}
.ctrl__unit-btn.active {
  background: rgba(201,168,76,0.15); color: var(--gold);
}

/* ---- VERDICT ---- */
.verdict {
  padding: 24px 28px; border-radius: var(--radius); margin-bottom: 24px;
  text-align: center; position: relative; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.03);
}
.verdict::before {
  content: ''; position: absolute; inset: -20px;
  border-radius: var(--radius); opacity: 0.3;
  background: radial-gradient(ellipse at 50% 50%, currentColor 0%, transparent 60%);
  filter: blur(50px); z-index: 0;
  animation: verdictPulse 3s ease-in-out infinite;
}
@keyframes verdictPulse { 0%,100% { opacity: 0.2; } 50% { opacity: 0.4; } }
.verdict > * { position: relative; z-index: 1; }
.verdict--green {
  background: linear-gradient(145deg, rgba(76,175,80,0.1) 0%, rgba(76,175,80,0.03) 100%);
  border: 1px solid rgba(76,175,80,0.25); color: var(--green);
}
.verdict--yellow {
  background: linear-gradient(145deg, rgba(255,193,7,0.1) 0%, rgba(255,193,7,0.03) 100%);
  border: 1px solid rgba(255,193,7,0.25); color: var(--yellow);
}
.verdict--red {
  background: linear-gradient(145deg, rgba(229,57,53,0.1) 0%, rgba(229,57,53,0.03) 100%);
  border: 1px solid rgba(229,57,53,0.25); color: var(--red);
}
.verdict__title {
  font-family: var(--d); font-weight: 700; font-size: 1.5rem;
  display: block; margin-bottom: 6px;
  text-shadow: 0 2px 10px currentColor;
}
.verdict__sub { font-size: 0.85rem; color: var(--grey); }

/* ---- KPIs ---- */
.kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 28px;
}
.kpi {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 20px 14px; text-align: center;
  box-shadow: var(--glow-gold), var(--card-shine), var(--card-depth);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s;
  position: relative; overflow: hidden;
}
.kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.2), transparent);
}
.kpi:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 35px rgba(201,168,76,0.15), 0 12px 32px rgba(0,0,0,0.4), var(--card-shine);
}
.kpi__value {
  font-family: var(--d); font-weight: 700; font-size: 1.5rem;
  color: var(--gold); display: block; margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(201,168,76,0.25), 0 0 40px rgba(201,168,76,0.08);
}
.kpi__value.green { color: var(--green); text-shadow: 0 2px 8px rgba(76,175,80,0.3), 0 0 40px rgba(76,175,80,0.1); }
.kpi__value.red { color: var(--red); text-shadow: 0 2px 8px rgba(229,57,53,0.3), 0 0 40px rgba(229,57,53,0.1); }
.kpi__label {
  font-size: 0.78rem; color: var(--fg); font-family: var(--d); font-weight: 600;
  display: block; margin-bottom: 2px;
}
.kpi__desc {
  font-size: 0.62rem; color: var(--taupe); line-height: 1.4;
  font-family: var(--b);
}

/* ---- SECTIONS ---- */
.section { margin-bottom: 28px; }
.section__title {
  font-family: var(--d); font-weight: 600; font-size: 1.05rem;
  color: var(--fg); margin-bottom: 14px;
  padding-bottom: 6px; border-bottom: 1px solid rgba(201,168,76,0.1);
}

/* ---- FUNNEL ---- */
.funnel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.funnel__step {
  text-align: center; padding: 18px 8px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); position: relative;
  box-shadow: var(--glow-gold), var(--card-shine), var(--card-depth);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s;
  overflow: hidden;
}
.funnel__step::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.15), transparent);
}
.funnel__step:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 25px rgba(201,168,76,0.1), 0 10px 28px rgba(0,0,0,0.35), var(--card-shine);
}
.funnel__step::after {
  content: '→'; position: absolute; right: -12px; top: 50%;
  transform: translateY(-50%); color: var(--gold); font-size: 0.9rem;
  opacity: 0.4;
}
.funnel__step:last-child::after { display: none; }
.funnel__num {
  font-family: var(--d); font-weight: 700; font-size: 1.25rem;
  color: var(--gold); display: block;
  text-shadow: 0 0 15px rgba(201,168,76,0.12);
}
.funnel__label {
  font-size: 0.62rem; color: var(--taupe); text-transform: uppercase;
  letter-spacing: 0.04em; font-family: var(--l); display: block; margin-top: 2px;
}
.funnel__pct { font-size: 0.7rem; color: var(--grey); margin-top: 4px; display: block; }

/* ---- CAPACITY BAR ---- */
.cap-bar {
  height: 36px; border-radius: 12px; overflow: hidden; position: relative;
  background: linear-gradient(180deg, rgba(30,28,22,0.8) 0%, rgba(18,16,12,0.9) 100%);
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.4), inset 0 -1px 0 rgba(255,255,255,0.03),
              0 2px 8px rgba(0,0,0,0.2);
  border: 1px solid rgba(58,53,47,0.2);
}
.cap-fill {
  height: 100%; border-radius: 11px; transition: width 0.5s ease;
  position: relative;
}
.cap-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.05) 40%, transparent 60%);
  border-radius: 11px;
}
.cap-fill.low {
  background: linear-gradient(90deg, #b71c1c, #ef5350);
  box-shadow: 0 0 20px rgba(229,57,53,0.3);
}
.cap-fill.mid {
  background: linear-gradient(90deg, #f57f17, #ffca28);
  box-shadow: 0 0 20px rgba(255,193,7,0.3);
}
.cap-fill.good {
  background: linear-gradient(90deg, #1b5e20, #66bb6a);
  box-shadow: 0 0 20px rgba(76,175,80,0.3);
}
.cap-mark {
  position: absolute; top: 0; bottom: 0; left: 80%; width: 2px;
  background: var(--gold); box-shadow: 0 0 8px rgba(201,168,76,0.3);
}
.cap-mark span {
  position: absolute; top: -18px; transform: translateX(-50%);
  font-size: 0.62rem; color: var(--gold); font-family: var(--l); white-space: nowrap;
}
.cap-labels {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: var(--grey); margin-top: 8px;
}

/* ---- PROJECTIONS ---- */
.projections { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.proj {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  box-shadow: var(--glow-gold), var(--card-shine), var(--card-depth);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s;
  position: relative; overflow: hidden;
}
.proj::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.15), transparent);
}
.proj:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 30px rgba(201,168,76,0.12), 0 12px 32px rgba(0,0,0,0.4), var(--card-shine);
}
.proj__label {
  font-family: var(--l); font-size: 0.68rem; color: var(--taupe);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px;
}
.proj__value {
  font-family: var(--d); font-weight: 700; font-size: 1.3rem;
  display: block; margin-bottom: 4px;
  text-shadow: 0 0 15px rgba(201,168,76,0.1);
}
.proj__sub { font-size: 0.72rem; color: var(--grey); display: block; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .lab { grid-template-columns: 1fr; }
  .panel--inputs {
    position: relative; top: auto; max-height: none;
    border-right: none; border-bottom: 1px solid rgba(201,168,76,0.06);
  }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .funnel { grid-template-columns: repeat(3, 1fr); }
  .funnel__step::after { display: none; }
}
@media (max-width: 500px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .projections { grid-template-columns: 1fr; }
  .panel--dashboard { padding: 16px; }
  .funnel { grid-template-columns: 1fr 1fr; }
}
