:root {
  --bg: #0d1016;
  --panel: #171b24;
  --panel2: #202632;
  --text: #f4f7fb;
  --muted: #9aa6b6;
  --line: #303849;
  --electric: #59dd91;
  --petrol: #ff8d4e;
  --accent: #80bcff;
  --warn: #ffd166;
  --danger: #ff7777;
  --radius: 22px;
  --shadow: 0 18px 55px rgba(0,0,0,.25);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(89,221,145,.15), transparent 35rem),
    radial-gradient(circle at top right, rgba(255,141,78,.13), transparent 34rem),
    var(--bg);
}
a { color: var(--accent); }
.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 70px; }
header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 28px; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 4.4rem); line-height: .95; letter-spacing: -.055em; }
.subtitle { margin: 14px 0 0; color: var(--muted); font-size: 1.05rem; max-width: 760px; line-height: 1.45; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.pill {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: .9rem;
  white-space: nowrap;
}
.grid { display: grid; gap: 18px; }
.kpis { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.068), rgba(255,255,255,.035));
  border: 1px solid rgba(255,255,255,.105);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.kpi { padding: 20px; min-height: 142px; display: flex; flex-direction: column; justify-content: space-between; }
.label { color: var(--muted); font-size: .9rem; }
.value { margin-top: 10px; font-size: clamp(1.7rem, 3vw, 2.85rem); line-height: 1; letter-spacing: -.045em; font-weight: 780; }
.sub { margin-top: 10px; color: var(--muted); font-size: .88rem; line-height: 1.35; }
.two-col { grid-template-columns: 1.12fr .88fr; align-items: stretch; }
.panel { padding: 24px; }
.panel h2 { margin: 0 0 4px; font-size: 1.18rem; letter-spacing: -.015em; }
.panel p { margin: 0 0 22px; color: var(--muted); font-size: .94rem; line-height: 1.45; }
.chart-wrap { width: 100%; overflow-x: auto; padding-bottom: 4px; }
svg { max-width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: .9rem; }
.dot { display: inline-block; width: .72rem; height: .72rem; border-radius: 50%; margin-right: 7px; vertical-align: -1px; }
.electric { background: var(--electric); }
.petrol { background: var(--petrol); }
.accent { background: var(--accent); }
.warn { color: var(--warn); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 13px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; vertical-align: top; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 560; font-size: .82rem; }
.positive { color: var(--electric); font-weight: 720; }
.negative { color: var(--danger); font-weight: 720; }
.muted { color: var(--muted); }
.badge {
  display: inline-block;
  font-size: .76rem;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.045);
  border-radius: 999px;
  padding: 4px 8px;
}
.data-section { grid-template-columns: 1fr; margin-top: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
button, input, textarea, select { font: inherit; }
input, textarea, select {
  width: 100%;
  background: rgba(0,0,0,.24);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 13px;
  outline: none;
}
textarea { min-height: 86px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: rgba(128,188,255,.8); box-shadow: 0 0 0 3px rgba(128,188,255,.12); }
.form-label { color: var(--muted); font-size: .86rem; margin: 0 0 6px; }
button {
  border: 0;
  cursor: pointer;
  color: #07110c;
  background: var(--electric);
  padding: 12px 15px;
  border-radius: 999px;
  font-weight: 760;
}
button.secondary { color: var(--text); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
button.danger { background: rgba(255,119,119,.14); color: #ffb6b6; border: 1px solid rgba(255,119,119,.28); }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.message { margin-top: 14px; color: var(--muted); min-height: 1.4em; }
.message.ok { color: var(--electric); }
.message.error { color: var(--danger); }
.actions { display: flex; justify-content: flex-end; gap: 8px; }
.actions button { padding: 7px 10px; font-size: .82rem; }
.note { margin-top: 16px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
@media (max-width: 920px) {
  header { flex-direction: column; align-items: flex-start; }
  .header-actions { justify-content: flex-start; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .page { width: min(100% - 22px, 1180px); padding-top: 26px; }
  .kpis, .form-grid { grid-template-columns: 1fr; }
  .panel, .kpi { padding: 18px; }
  th, td { padding: 11px 5px; font-size: .86rem; }
}
