:root {
  color-scheme: light;
  --ink: #17231f;
  --muted: #69766f;
  --line: #dfe6e2;
  --paper: #ffffff;
  --canvas: #f3f6f4;
  --green: #0c6b50;
  --green-dark: #064b38;
  --mint: #dff4e9;
  --orange: #e77735;
  --shadow: 0 18px 55px rgba(18, 47, 37, .10);
}
* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--canvas); color: var(--ink); }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
a { color: inherit; }
.eyebrow { margin: 0 0 .45rem; color: var(--green); font-size: .76rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--muted); }
.brand-mark { width: 58px; height: 58px; display: flex; align-items: flex-end; justify-content: center; gap: 5px; padding: 12px; border-radius: 18px; color: white; background: linear-gradient(145deg, var(--green), var(--green-dark)); box-shadow: 0 12px 25px rgba(12,107,80,.23); }
.brand-mark span { display: block; width: 7px; border-radius: 10px; background: currentColor; transform: skewY(-18deg); }
.brand-mark span:nth-child(1) { height: 19px; opacity: .65; }
.brand-mark span:nth-child(2) { height: 29px; }
.brand-mark span:nth-child(3) { height: 23px; opacity: .82; }
.brand-mark.compact { width: 42px; height: 42px; padding: 8px; border-radius: 13px; box-shadow: none; }
.brand-mark.compact span { width: 5px; }
.brand-mark.compact span:nth-child(1) { height: 14px; }.brand-mark.compact span:nth-child(2) { height: 22px; }.brand-mark.compact span:nth-child(3) { height: 17px; }

.login-page { background: radial-gradient(circle at 8% 12%, #d9f0e5 0, transparent 30%), radial-gradient(circle at 92% 90%, #f6dfd1 0, transparent 26%), #f6f8f7; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.login-card { width: min(100%, 440px); padding: 2.6rem; border: 1px solid rgba(255,255,255,.8); border-radius: 28px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.login-card .brand-mark { margin-bottom: 1.8rem; }
.login-card h1 { margin: 0; font-size: clamp(2rem, 8vw, 2.75rem); line-height: 1.05; letter-spacing: -.045em; }
.intro { margin: 1rem 0 1.8rem; color: var(--muted); line-height: 1.55; }
.login-form { display: grid; gap: .65rem; }
.login-form label { margin-top: .4rem; font-weight: 700; font-size: .9rem; }
.login-form input, select { width: 100%; border: 1px solid #cdd8d2; border-radius: 12px; background: white; color: var(--ink); outline: none; }
.login-form input { padding: .85rem 1rem; }
.login-form input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(12,107,80,.12); }
.primary-button, .secondary-button, .text-button { cursor: pointer; border: 0; border-radius: 11px; font-weight: 750; text-decoration: none; }
.primary-button { margin-top: .9rem; padding: .9rem 1rem; color: white; background: var(--green); box-shadow: 0 8px 18px rgba(12,107,80,.18); }
.primary-button:hover { background: var(--green-dark); }
.secure-note { margin: 1.5rem 0 0; color: var(--muted); font-size: .8rem; text-align: center; }
.secure-note span { color: var(--green); }
.form-error:empty { display: none; }
.form-error { padding: .75rem .9rem; border-radius: 10px; color: #832b23; background: #fff0ed; font-size: .88rem; }

.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(1.25rem, calc((100vw - 1180px)/2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.93); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand > span:last-child { display: grid; line-height: 1.05; }
.brand strong { font-size: 1.03rem; }.brand small { margin-top: .25rem; color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.account { display: flex; align-items: center; gap: 1rem; }.account form { margin: 0; }
.account-name { color: var(--muted); font-size: .9rem; }
.text-button { padding: .55rem .75rem; color: var(--green); background: var(--mint); }
.dashboard { width: min(1180px, calc(100% - 2.5rem)); margin: 0 auto; padding: 3rem 0 2rem; }
.hero-row { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.hero-row h1 { margin: 0; font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1; letter-spacing: -.055em; }
.hero-row .muted { margin-bottom: 0; }
.meter-controls { min-width: 310px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .55rem; }
.meter-controls label { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.meter-controls select { min-width: 180px; height: 42px; padding: 0 .75rem; }
.secondary-button { display: inline-flex; height: 42px; align-items: center; padding: 0 1rem; color: var(--green); background: white; border: 1px solid #cdd8d2; white-space: nowrap; }
.status-message, .test-warning { margin: -1rem 0 1.5rem; padding: .9rem 1rem; border-radius: 12px; }
.status-message { color: #832b23; background: #fff0ed; }.test-warning { color: #664416; background: #fff4d9; border: 1px solid #f3d89e; }
.test-warning strong { display: inline-block; margin-right: .4rem; }
.metric-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.metric-card { min-width: 0; padding: 1.35rem 1.25rem; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 7px 23px rgba(18,47,37,.045); }
.metric-card.accent { color: white; border-color: transparent; background: linear-gradient(145deg, var(--green), var(--green-dark)); }
.metric-card p { margin: 0 0 .8rem; color: var(--muted); font-size: .84rem; font-weight: 700; }
.metric-card.accent p, .metric-card.accent span { color: rgba(255,255,255,.72); }
.metric-card strong { display: block; overflow: hidden; font-size: clamp(1.45rem, 2.8vw, 2.15rem); letter-spacing: -.04em; text-overflow: ellipsis; }
.metric-card span { display: block; margin-top: .25rem; color: var(--muted); font-size: .78rem; }
.panel { margin-top: 1.25rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: 0 7px 23px rgba(18,47,37,.04); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.panel-heading h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.025em; }
.chip { padding: .45rem .75rem; border-radius: 99px; color: var(--green); background: var(--mint); font-size: .78rem; font-weight: 700; }
.chart { min-height: 260px; }
.chart svg { display: block; width: 100%; height: 280px; overflow: visible; }
.chart-grid { stroke: #e5ebe8; stroke-width: 1; }.chart-area { fill: url(#area-gradient); }.chart-line { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }.chart-dot { fill: white; stroke: var(--orange); stroke-width: 2; }
.chart-label { fill: var(--muted); font-size: 12px; }.empty-chart { height: 250px; display: grid; place-items: center; color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: .85rem .75rem; border-bottom: 1px solid #edf1ef; text-align: right; white-space: nowrap; }
th { color: var(--muted); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; }
th:first-child, td:first-child { padding-left: 0; text-align: left; } th:last-child, td:last-child { padding-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
footer { padding: 1.5rem; color: var(--muted); font-size: .78rem; text-align: center; }

@media (max-width: 900px) { .metric-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 650px) {
  .topbar { height: 66px; padding: 0 1rem; }.brand small, .account-name { display: none; }.brand-mark.compact { width: 38px; height: 38px; }
  .dashboard { width: min(100% - 1.5rem, 1180px); padding-top: 2rem; }
  .hero-row { align-items: stretch; flex-direction: column; gap: 1.4rem; }
  .meter-controls { min-width: 0; }.metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card:first-child { grid-column: 1 / -1; }.panel { padding: 1.15rem; border-radius: 16px; }
  .panel-heading { align-items: flex-start; }.chart svg { height: 230px; }
  .login-card { padding: 2rem 1.35rem; border-radius: 22px; }
}
