:root {
  color-scheme: dark;
  --bg: #080d0b;
  --panel: #101815;
  --line: #25322d;
  --muted: #829087;
  --text: #f2f7f3;
  --green: #8dffaf;
  --green-strong: #42df78;
  --violet: #d58aff;
  --red: #ff7474;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 82% -10%, rgba(83, 219, 130, .13), transparent 34rem),
    linear-gradient(160deg, #0b110f, var(--bg) 55%);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 38px 38px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .08em;
}
.brand > span:last-child, .brand span { color: var(--green); }
.brand-mark {
  width: 21px;
  height: 21px;
  border: 5px solid var(--text);
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-28deg);
}
.kicker {
  margin: 0 0 7px;
  color: var(--green);
  font: 700 11px/1.2 Consolas, monospace;
  letter-spacing: .15em;
}
.muted, .subtle { color: var(--muted); }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  position: relative;
  width: min(440px, 100%);
  padding: 42px;
  background: rgba(16, 24, 21, .95);
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}
.login-card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 76px;
  height: 3px;
  background: var(--green);
}
.login-card .brand { margin-bottom: 52px; }
.login-card h1 { margin: 0; font-size: 34px; }
.login-card .muted { margin: 10px 0 30px; line-height: 1.55; }
.login-card label {
  display: grid;
  gap: 8px;
  margin-top: 17px;
  color: #c5d0ca;
  font-size: 13px;
}
.login-card input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #34443c;
  outline: none;
  background: #0a100e;
  color: var(--text);
}
.login-card input:focus { border-color: var(--green-strong); }
.login-card button {
  width: 100%;
  margin-top: 24px;
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  border: 0;
  background: var(--green);
  color: #07110b;
  font-weight: 900;
}
.login-card button:disabled { opacity: .55; cursor: wait; }
.form-message { min-height: 20px; margin: 15px 0 0; color: var(--muted); font-size: 12px; }
.form-message.error { color: var(--red); }

.topbar {
  height: 74px;
  padding: 0 max(24px, calc((100vw - 1220px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 11, .82);
  backdrop-filter: blur(14px);
}
.top-actions { display: flex; align-items: center; gap: 16px; }
.secure { color: var(--green); font: 700 11px Consolas, monospace; letter-spacing: .12em; }
.secure i, .dot, .legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px currentColor;
}
.username { color: #b9c4be; font-size: 13px; }
.ghost { padding: 8px 12px; border: 1px solid var(--line); background: transparent; color: #cbd5cf; }
.ghost:hover { border-color: #596a61; }

main { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 58px 0 80px; }
.page-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 30px; }
.page-head h1 { margin: 0; font-size: clamp(35px, 5vw, 58px); letter-spacing: -.04em; }
.updated { margin: 0 0 6px; color: var(--muted); font: 12px Consolas, monospace; }

.live-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 14px; }
.metric, .panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(20, 30, 26, .96), rgba(13, 20, 17, .96));
}
.metric { min-height: 205px; padding: 25px; }
.metric-primary { background: linear-gradient(145deg, #163624, #102019); border-color: #2c6843; }
.metric p { margin: 0; color: #9dac9f; font: 700 11px Consolas, monospace; letter-spacing: .12em; }
.metric strong { display: block; margin: 25px 0 6px; font-size: 63px; line-height: .9; letter-spacing: -.06em; }
.metric strong small { margin-left: 8px; color: var(--muted); font-size: 17px; letter-spacing: 0; }
.metric > span { color: var(--muted); font-size: 12px; }
.metric-title { display: flex; justify-content: space-between; align-items: center; }
.dot.violet, .legend i.violet { color: var(--violet); background: var(--violet); }
.meter { height: 4px; margin: 22px 0 13px; overflow: hidden; background: #26322c; }
.meter i { display: block; height: 100%; width: 0; background: var(--green); transition: width .35s ease; }
#meter-test { background: var(--violet); }

.panel { margin-top: 16px; padding: 27px; }
.panel-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.panel h2 { margin: 0; font-size: 22px; }
.legend { color: var(--muted); font-size: 12px; white-space: nowrap; }
.legend i { margin-left: 14px; }
.month-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.month-card { padding: 18px; background: #0b1210; border: 1px solid #202d27; }
.month-card > p { margin: 0 0 17px; color: #cbd5cf; text-transform: capitalize; }
.month-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.month-values span { color: var(--muted); font: 10px Consolas, monospace; }
.month-values strong { display: block; margin-top: 5px; color: var(--text); font: 700 24px Consolas, monospace; }
.month-values div:nth-child(2) strong { color: var(--violet); }
.month-values div:first-child strong { color: var(--green); }

.daily-chart {
  height: 210px;
  padding: 20px 4px 0;
  display: flex;
  align-items: end;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.bar-column { flex: 1; min-width: 16px; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 8px; }
.bar-value { color: #b8c5bd; font: 10px Consolas, monospace; }
.bar { width: min(26px, 82%); min-height: 3px; background: linear-gradient(var(--green), #358c54); transition: height .35s ease; }
.bar-label { min-height: 18px; color: #6e7c74; font: 9px Consolas, monospace; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 17px; }
th, td { padding: 12px 8px; text-align: right; border-bottom: 1px solid #1e2924; font-size: 13px; }
th:first-child, td:first-child { text-align: left; }
th { color: #718078; font: 10px Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
td:nth-child(2) { color: var(--green); font-weight: 800; }
.footnote { margin: 17px 2px 0; color: #66736c; font: 11px/1.6 Consolas, monospace; }

@media (max-width: 820px) {
  .live-grid { grid-template-columns: 1fr; }
  .month-list { grid-template-columns: 1fr; }
  .page-head, .panel-head { align-items: start; flex-direction: column; }
  .topbar { padding: 0 18px; }
  .username { display: none; }
  main { width: min(100% - 28px, 1220px); padding-top: 35px; }
  .login-card { padding: 31px 24px; }
}
