:root {
  --bg: #f4f7f6;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #5b6b73;
  --line: #d7e3df;
  --brand: #0f766e;
  --brand-2: #115e59;
  --ok: #047857;
  --warn: #b45309;
  --bad: #b91c1c;
  --side: #0b1f24;
  --side-2: #12343c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .06);
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, var(--side), var(--side-2)); color: #d9eeea; padding: 18px 14px 32px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand-mark { display: flex; gap: 10px; align-items: center; padding: 6px 8px 18px; color: #fff; text-decoration: none; }
.brand-mark strong { display: block; font-size: 15px; }
.brand-mark span { display: block; font-size: 11px; opacity: .7; }
.nav-group { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #7aa8a3; margin: 16px 10px 6px; }
.nav a { display: flex; gap: 10px; align-items: center; color: #cfe7e3; padding: 8px 10px; border-radius: 10px; text-decoration: none; font-size: 13px; }
.nav a:hover, .nav a.active { background: rgba(15, 118, 110, .35); color: #fff; }
.nav svg { width: 16px; height: 16px; flex: none; }
.main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.page { padding: 24px; }
h1, h2, h3 { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.stat { padding: 18px; }
.stat b { display: block; font-size: 22px; margin-top: 6px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 8px 12px; cursor: pointer; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--brand-2); text-decoration: none; color: #fff; }
.btn.ghost { background: #e7f3f1; color: var(--brand-2); }
.btn.danger { background: var(--bad); }
.btn.sm { padding: 5px 9px; font-size: 12px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge.ok, .badge.active, .badge.paid, .badge.operational, .badge.completed { background: #d1fae5; color: var(--ok); }
.badge.warn, .badge.unpaid, .badge.pending, .badge.lead { background: #fef3c7; color: var(--warn); }
.badge.bad, .badge.suspended, .badge.overdue, .badge.critical { background: #fee2e2; color: var(--bad); }
.badge.idle { background: #e2e8f0; color: #334155; }
form.stack, .stack { display: grid; gap: 10px; }
label { font-size: 12px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 4px; }
input, select, textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
textarea { min-height: 90px; }
.flash { background: #ccfbf1; color: #115e59; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; }
.errors { background: #fee2e2; color: #991b1b; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; }
.site-header, .site-footer { background: #fff; border-bottom: 1px solid var(--line); padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.site-footer { border-top: 1px solid var(--line); border-bottom: 0; margin-top: 40px; }
.hero { padding: 56px 24px 32px; background: linear-gradient(135deg, #0f766e, #134e4a); color: #fff; }
.hero h1 { font-size: 40px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 24px; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #ccfbf1, #f4f7f6); }
.auth-card { width: min(420px, 100%); background: #fff; padding: 28px; border-radius: 18px; box-shadow: var(--shadow); }
.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.plant { position: relative; height: 420px; background: #ecfdf5; border-radius: 14px; overflow: hidden; border: 1px dashed #99f6e4; }
.plant-node { position: absolute; transform: translate(-50%, -50%); background: #fff; border: 2px solid var(--brand); border-radius: 12px; padding: 6px 10px; font-size: 12px; font-weight: 700; }
.hotspot { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #042f2e, #0f766e); }
.hotspot .auth-card { width: min(440px, 92vw); }
.pagination { display: flex; gap: 6px; list-style: none; padding: 12px 0; margin: 0; }
.pagination a, .pagination span { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; }
.pagination .active span { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: relative; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
