/* Zoghi Enterprise: light operations console matching the reference
   photos. White rounded cards on a pale green gray page, emerald and
   blue accents, clear headings. No em dashes in any copy. */
:root {
  --bg: #f2f5f1; --card: #ffffff; --ink: #12211a; --muted: #5c6f63;
  --line: #e3eae4; --green: #0e9f6e; --green-soft: #e6f6ee; --blue: #2563eb;
  --blue-soft: #e8effe; --amber: #b45309; --amber-soft: #fdf1e0;
  --red: #b91c1c; --red-soft: #fdecec; --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); width: 100%; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
h1 { font-size: 24px; margin: 0 0 4px; } h2 { font-size: 18px; margin: 0 0 10px; } h3 { font-size: 15px; margin: 0 0 8px; }
a { color: var(--blue); }

.btn { background: var(--green); color: #fff; border: none; padding: 10px 18px; border-radius: 10px; font-weight: 600; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: #fff; color: var(--red); border: 1px solid var(--line); }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: default; }

.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 36px 32px; max-width: 400px; width: 100%; box-shadow: 0 8px 30px rgba(18,33,26,.06); }
.auth-card .diamond { width: 40px; height: 40px; background: var(--green); transform: rotate(45deg); border-radius: 9px; margin-bottom: 18px; }
.auth-card p.sub { color: var(--muted); font-size: 14px; margin: 4px 0 14px; }
.error { background: var(--red-soft); color: var(--red); border-radius: 9px; padding: 9px 12px; font-size: 13px; margin: 10px 0; }
.notice { background: var(--blue-soft); color: #1e40af; border-radius: 9px; padding: 9px 12px; font-size: 13px; margin: 10px 0; }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 228px; flex: 0 0 228px; background: var(--card); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 700; font-size: 16px; }
.brand .diamond { width: 24px; height: 24px; background: var(--green); transform: rotate(45deg); border-radius: 6px; flex: 0 0 24px; }
.nav a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 14px; margin-bottom: 2px; }
.nav a.active { background: var(--green-soft); color: #067a54; font-weight: 600; }
.nav a:hover { background: #f4f8f4; }
.side-user { border-top: 1px solid var(--line); margin-top: 16px; padding: 12px 8px; font-size: 13px; color: var(--muted); }
.main { flex: 1; min-width: 0; padding: 20px 26px 60px; }
.topbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.modebar { display: inline-flex; background: #e8eee9; border-radius: 10px; padding: 3px; }
.modebar button { border: none; background: transparent; padding: 7px 16px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.modebar button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.topbar .spacer { flex: 1; }
.datepick { width: auto; }

.grid { display: grid; gap: 16px; }
.grid.cols3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.soft-green { background: var(--green-soft); border-color: transparent; }
.card.soft-amber { background: var(--amber-soft); border-color: transparent; }
.card.soft-blue { background: var(--blue-soft); border-color: transparent; }
.big-num { font-size: 30px; font-weight: 700; line-height: 1.1; }
.tile-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f0f3f0; font-size: 14px; }
.row:last-child { border-bottom: none; }
.row .grow { flex: 1; min-width: 0; }
.row .meta { color: var(--muted); font-size: 12px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill.green { background: var(--green-soft); color: #067a54; }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.blue { background: var(--blue-soft); color: #1e40af; }
.pill.gray { background: #eef1ee; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); }
td { padding: 9px 8px 9px 0; border-bottom: 1px solid #f0f3f0; vertical-align: top; }
.empty { color: var(--muted); font-size: 14px; padding: 14px 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-card { margin-bottom: 16px; }
details.addbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; }
details.addbox summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 200px; }
.sect-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sect-head p { color: var(--muted); margin: 0; font-size: 14px; }
.bar-track { height: 8px; background: #edf1ed; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green); border-radius: 99px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.legend { font-size: 13px; color: var(--muted); }
.legend div { margin: 4px 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { width: 108px; }
.swatch .box { height: 72px; border-radius: 10px; border: 1px solid var(--line); }
.swatch .hex { font-size: 12px; font-weight: 700; margin-top: 6px; }
.swatch .role { font-size: 12px; color: var(--muted); }
.type-spec { font-size: 34px; font-weight: 700; }
.weather-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.weather-day { text-align: center; padding: 10px 4px; }
.weather-day .wd { font-weight: 700; font-size: 13px; }
.weather-day .cond { font-size: 12px; color: var(--muted); min-height: 30px; }
.weather-day .temps { font-size: 14px; font-weight: 600; }
.rail-item { padding: 10px 0; border-bottom: 1px solid #f0f3f0; font-size: 14px; }
.rail-item:last-child { border-bottom: none; }
.kv { font-size: 13px; color: var(--muted); }
.kv b { color: var(--ink); }
footer.note { color: var(--muted); font-size: 12px; margin-top: 22px; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--line); }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav a { margin-bottom: 0; }
  .side-user { display: none; }
  .main { padding: 16px 14px 50px; }
  .grid.cols3, .grid.cols4 { grid-template-columns: 1fr 1fr; }
  .grid.cols2 { grid-template-columns: 1fr; }
  .weather-row { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid.cols3, .grid.cols4 { grid-template-columns: 1fr; }
  .weather-row { grid-template-columns: repeat(2, 1fr); }
}
