:root {
  --ink: #f7fbff;
  --muted: #a9bfd1;
  --line: rgba(32, 181, 255, .36);
  --paper: rgba(5, 18, 38, .82);
  --paper-strong: rgba(7, 25, 55, .94);
  --canvas: #020712;
  --green: #82d61f;
  --accent: #18aaff;
  --green-dark: #65bc16;
  --green-soft: rgba(130, 214, 31, .16);
  --lime: #b6fb32;
  --blue: #0074d9;
  --navy: #07182e;
  --gold: #d9ae24;
  --shadow: 0 28px 80px rgba(0, 0, 0, .45);
  --glow-blue: 0 0 24px rgba(24, 170, 255, .28);
  --glow-green: 0 0 24px rgba(130, 214, 31, .24);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 14%, rgba(24, 170, 255, .25), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(130, 214, 31, .17), transparent 24%),
    radial-gradient(circle at 50% 110%, rgba(0, 116, 217, .28), transparent 34%),
    linear-gradient(180deg, #02050e 0%, #06142b 48%, #020712 100%);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background:
    linear-gradient(90deg, rgba(24, 170, 255, .16) 1px, transparent 1px),
    linear-gradient(rgba(24, 170, 255, .09) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 72%);
}
button, input, select { font: inherit; }
button, select, input[type="range"] { cursor: pointer; }

.topbar {
  min-height: 92px;
  padding: 12px max(28px, calc((100vw - 1440px)/2));
  background: rgba(2, 7, 18, .72);
  border-bottom: 1px solid rgba(24, 170, 255, .28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .34);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { text-decoration: none; display: flex; align-items: center; }
.brand img {
  width: clamp(180px, 17vw, 260px);
  height: auto;
  display: block;
  filter: drop-shadow(0 0 14px rgba(24, 170, 255, .28));
}
.topbar-actions, .status, .ghost-button { display: flex; align-items: center; }
.topbar-actions { gap: 22px; }
.status {
  gap: 8px;
  color: #d8f3ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(130, 214, 31, .14), 0 0 16px var(--green); }
.ghost-button {
  border: 1px solid rgba(24, 170, 255, .45);
  background: linear-gradient(180deg, rgba(24, 170, 255, .12), rgba(4, 16, 34, .7));
  color: #fff;
  gap: 7px;
  font-weight: 800;
  font-size: 12px;
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: var(--glow-blue);
}
.ghost-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; }

main { max-width: 1440px; margin: auto; position: relative; z-index: 1; }
.hero {
  padding: 58px 28px 46px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 60px;
  position: relative;
}
.hero:before {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(130, 214, 31, .7), rgba(24, 170, 255, .7), transparent);
}
.eyebrow { color: var(--green); letter-spacing: 2.5px; font-size: 11px; font-weight: 900; margin: 0 0 13px; text-shadow: 0 0 16px rgba(130, 214, 31, .55); }
h1 { margin: 0; color: #fff; font: 800 clamp(34px, 4.5vw, 62px)/1.03 "Manrope"; letter-spacing: -2.5px; text-transform: uppercase; text-shadow: 0 4px 20px rgba(0,0,0,.42); }
h1 em { color: var(--green); font-style: normal; background: linear-gradient(180deg, #d6ff5d, #67c319); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy { max-width: 430px; margin: 0 15px 4px 0; color: #d2e7f4; font-size: 15px; line-height: 1.65; }

.workspace { display: grid; grid-template-columns: 385px 1fr; gap: 22px; padding: 0 28px 42px; align-items: start; }
.panel, .results > article, .metric-card, .network-card, .breakdown-card {
  background: linear-gradient(180deg, rgba(7, 25, 55, .92), rgba(3, 12, 27, .92));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.03), var(--glow-blue);
}
.controls { overflow: hidden; }
.panel-heading {
  min-height: 82px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(24, 170, 255, .24);
  background: linear-gradient(90deg, rgba(130, 214, 31, .08), transparent);
}
.panel-heading > div, .results-head > div { display: flex; align-items: center; gap: 11px; }
.step {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #061325;
  background: linear-gradient(135deg, var(--lime), var(--accent));
  display: inline-grid;
  place-items: center;
  font: 900 10px "Manrope";
  box-shadow: 0 0 20px rgba(24, 170, 255, .45);
}
h2 { font: 800 16px "Manrope"; margin: 0; text-transform: uppercase; letter-spacing: .7px; }
.editable, .plan-pill {
  color: #061325;
  background: linear-gradient(135deg, var(--lime), var(--green));
  padding: 7px 10px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .8px;
  box-shadow: var(--glow-green);
}
.plan-pill { color: #fff; background: linear-gradient(135deg, var(--accent), #005fca); box-shadow: var(--glow-blue); }

.control-section { padding: 21px 22px 22px; border-bottom: 1px solid rgba(24, 170, 255, .18); }
.control-section:last-child { border-bottom: 0; }
.control-section h3 { margin: 0 0 20px; color: var(--green); font-size: 10px; text-transform: uppercase; letter-spacing: 1.7px; text-shadow: 0 0 12px rgba(130,214,31,.35); }
.field { display: block; margin: 0 0 20px; }
.field > span, .money-field > span:first-child { display: flex; justify-content: space-between; font-size: 12px; color: #d6e9f4; margin-bottom: 12px; }
.field b { color: var(--lime); font-size: 12px; }
input[type="range"] { width: 100%; height: 5px; appearance: none; border-radius: 999px; background: linear-gradient(to right, var(--green) var(--fill, 50%), rgba(24, 170, 255, .22) var(--fill, 50%)); box-shadow: inset 0 0 10px rgba(0,0,0,.35); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 0 18px rgba(24, 170, 255, .76); }
.money-field { display: block; margin-bottom: 18px; }
.select-field { display: block; margin-bottom: 14px; }
.select-field > span { display: block; color: #d6e9f4; font-size: 12px; margin-bottom: 8px; }
.select-field select {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(24, 170, 255, .42);
  border-radius: 10px;
  color: #fff;
  background: #06162e;
  padding: 0 12px;
  font-weight: 800;
  outline: 0;
}
.select-field select:focus, .input-shell:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(130, 214, 31, .16), var(--glow-green); }
.locked-card {
  border: 1px solid rgba(130, 214, 31, .38);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(130, 214, 31, .11), rgba(24, 170, 255, .08));
  box-shadow: inset 0 0 24px rgba(24, 170, 255, .08);
}
.locked-card span { display: block; color: #a9bfd1; font-size: 10px; text-transform: uppercase; letter-spacing: .9px; font-weight: 900; }
.locked-card strong { display: block; margin-top: 5px; color: #fff; font: 900 15px "Manrope"; }
.locked-card small { display: block; margin-top: 6px; color: #b6ccdc; font-size: 10px; line-height: 1.45; }
.matrix-card { margin-top: -2px; }
.input-shell { height: 40px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; background: #06162e; overflow: hidden; }
.input-shell small { padding: 0 10px; color: #93a1a5; font-size: 11px; }
.input-shell input { border: 0; border-left: 1px solid var(--line); outline: none; width: 100%; height: 100%; padding: 0 11px; color: #fff; font-weight: 700; background: #06162e; }

.results { min-width: 0; }
.results-head { min-height: 52px; display: flex; align-items: start; justify-content: space-between; padding: 2px 4px 13px; }
.headline-card {
  min-height: 160px;
  color: white;
  background:
    radial-gradient(circle at 85% -20%, rgba(130, 214, 31, .35), transparent 34%),
    linear-gradient(114deg, #07305c 0%, #0068c9 45%, #64bd17 125%) !important;
  border: 1px solid rgba(24,170,255,.5) !important;
  display: grid;
  grid-template-columns: 1fr 270px;
  align-items: stretch;
  box-shadow: 0 20px 60px rgba(0, 116, 217, .24), var(--glow-blue);
  overflow: hidden;
  position: relative;
}
.headline-card:after { content: ""; position: absolute; width: 310px; height: 310px; right: -100px; top: -190px; border: 44px solid rgba(255,255,255,.05); border-radius: 50%; }
.headline-main { padding: 28px 34px; }
.headline-main p { margin: 0 0 8px; font-size: 9px; font-weight: 900; letter-spacing: 1.4px; opacity: .86; }
.headline-main strong { display: block; font: 900 38px "Manrope"; letter-spacing: -1.6px; text-shadow: 0 0 18px rgba(255,255,255,.22); }
.info { display: inline-grid; place-items: center; width: 14px; height: 14px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; font-size: 8px; text-transform: none; }
.growth { display: inline-block; margin-top: 8px; padding: 5px 9px; border-radius: 15px; background: rgba(2, 7, 18, .28); font-size: 10px; }
.headline-side { border-left: 1px solid rgba(255,255,255,.18); padding: 0 30px; display: flex; flex-direction: column; justify-content: center; z-index: 1; }
.headline-side span { font-size: 10px; opacity: .8; }
.headline-side strong { margin-top: 7px; font: 800 20px "Manrope"; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.metric-card { min-height: 108px; padding: 20px; display: flex; align-items: center; gap: 15px; }
.metric-icon { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; }
.metric-icon.sales { color: #061325; background: linear-gradient(135deg, var(--lime), var(--green)); box-shadow: var(--glow-green); }
.metric-icon.network { color: #fff; background: linear-gradient(135deg, var(--accent), #005fca); box-shadow: var(--glow-blue); }
.metric-icon.bonus { color: #061325; background: linear-gradient(135deg, #ffe57a, var(--gold)); box-shadow: 0 0 20px rgba(217,174,36,.3); }
.metric-card p { margin: 0 0 5px; color: var(--green); font-size: 9px; font-weight: 900; letter-spacing: 1px; }
.metric-card strong { display: block; font: 800 21px "Manrope"; }
.metric-card small { color: #a9bfd1; font-size: 9px; }

.chart-card { margin-top: 12px; padding: 20px 22px 16px; }
.card-title { display: flex; align-items: start; justify-content: space-between; }
.card-title h3 { margin: 0; font: 800 14px "Manrope"; text-transform: uppercase; letter-spacing: .5px; }
.card-title p { margin: 4px 0 0; color: #a9bfd1; font-size: 9px; }
.legend { color: #d2e7f4; font-size: 9px; display: flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.chart {
  height: 178px;
  margin-top: 15px;
  display: flex;
  align-items: end;
  gap: clamp(5px, 1.2vw, 14px);
  padding: 10px 5px 24px 2px;
  border-bottom: 1px solid rgba(24, 170, 255, .32);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 43px, rgba(24, 170, 255, .12) 44px);
}
.chart-column { height: 100%; flex: 1; display: flex; flex-direction: column; justify-content: end; align-items: center; position: relative; min-width: 0; }
.chart-bar { width: min(30px, 75%); min-height: 2px; border-radius: 7px 7px 1px 1px; background: linear-gradient(#a8ff2f, #5dbd12); transition: height .25s ease; position: relative; box-shadow: 0 0 16px rgba(130,214,31,.36); }
.chart-bar.selected { background: linear-gradient(#2ec2ff, #005fca); box-shadow: 0 0 18px rgba(24,170,255,.55); }
.chart-bar:hover:after { content: attr(data-value); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 3; color: white; background: #06162e; border: 1px solid var(--line); padding: 5px 7px; border-radius: 5px; white-space: nowrap; font-size: 8px; }
.chart-column label { position: absolute; top: calc(100% + 8px); font-size: 8px; color: #a9bfd1; }

.bottom-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 12px; margin-top: 12px; }
.breakdown-card, .network-card { padding: 20px 22px; }
.card-title > strong { font: 800 15px "Manrope"; color: var(--lime); }
.stacked-bar { height: 9px; margin: 19px 0 16px; display: flex; gap: 2px; overflow: hidden; border-radius: 10px; background: rgba(24,170,255,.16); }
.stacked-bar i { display: block; min-width: 2px; }
.breakdown-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.breakdown-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(24,170,255,.16); font-size: 9px; }
.breakdown-item span { color: #d2e7f4; display: flex; align-items: center; gap: 7px; }
.breakdown-item i { width: 7px; height: 7px; border-radius: 50%; }
.breakdown-item b { font-size: 10px; color: #fff; }
.level-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(24,170,255,.16); font-size: 10px; }
.level-row span { display: flex; align-items: center; gap: 8px; color: #d2e7f4; }
.level-row small { color: var(--green); font-weight: 900; }
.level-dot { width: 8px; height: 8px; border-radius: 50%; }
.level-dot.one { background: var(--green); box-shadow: 0 0 10px var(--green); }
.level-dot.two { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.level-dot.three { background: #6be6ff; box-shadow: 0 0 10px #6be6ff; }
.level-dot.more { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.network-total { padding-top: 15px; display: flex; justify-content: space-between; align-items: end; }
.network-total span { font-size: 9px; color: #a9bfd1; }
.network-total strong { font-size: 11px; color: #fff; }
.formula-card { margin-top: 12px; padding: 0 !important; overflow: hidden; }
.formula-card summary { list-style: none; padding: 15px 20px; cursor: pointer; display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; }
.formula-card summary::-webkit-details-marker { display: none; }
.formula-card summary span { color: var(--green); font-weight: 800; }
#formulaDetails { border-top: 1px solid rgba(24,170,255,.22); padding: 16px 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 30px; color: #bfd4e2; font-size: 10px; line-height: 1.5; }
#formulaDetails b { color: #fff; }
.notice {
  margin: 0 28px 28px;
  padding: 17px 20px;
  background: rgba(5, 18, 38, .76);
  border: 1px solid rgba(130, 214, 31, .32);
  border-radius: 14px;
  display: flex;
  align-items: start;
  gap: 12px;
  color: #c8dbea;
  font-size: 10px;
  line-height: 1.5;
  box-shadow: var(--glow-green);
}
.notice svg { width: 17px; flex: 0 0 17px; fill: none; stroke: var(--green); stroke-width: 1.8; }
.notice p { margin: 0; }
footer { height: 62px; border-top: 1px solid rgba(24,170,255,.22); background: rgba(2, 7, 18, .72); display: flex; justify-content: space-between; align-items: center; padding: 0 max(28px, calc((100vw - 1384px)/2)); color: #a9bfd1; font-size: 9px; }

@media (max-width: 980px) {
  .workspace { grid-template-columns: 330px 1fr; }
  .headline-card { grid-template-columns: 1fr 210px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 80px; }
  .bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { position: relative; }
  .topbar-actions .status { display: none; }
  .brand img { width: 170px; }
  .hero { padding-top: 36px; display: block; }
  .hero-copy { margin-top: 22px; }
  .workspace { grid-template-columns: 1fr; }
  .results { margin-top: 15px; }
  .headline-card { grid-template-columns: 1fr; }
  .headline-side { border-left: 0; border-top: 1px solid rgba(255,255,255,.15); padding: 17px 30px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card:last-child { grid-column: 1/-1; }
}
@media (max-width: 480px) {
  .topbar, .hero, .workspace { padding-left: 17px; padding-right: 17px; }
  h1 { letter-spacing: -1.4px; }
  .topbar-actions { gap: 5px; }
  .ghost-button { font-size: 0; padding: 10px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card:last-child { grid-column: auto; }
  .results-head { align-items: center; gap: 12px; flex-wrap: wrap; }
  .breakdown-list, #formulaDetails { grid-template-columns: 1fr; }
  .chart { gap: 4px; }
  .notice { margin-left: 17px; margin-right: 17px; }
  footer { padding: 0 17px; }
  footer span:last-child { display: none; }
}
