:root {
  --teal: #2c6e63;
  --teal-dark: #1f4f47;
  --amber: #d98e33;
  --red: #c1462f;
  --bg: #f6f4ef;
  --card: #ffffff;
  --text: #1f2a28;
  --muted: #6b7773;
  --border: #e3ddd1;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; background: var(--teal-dark); color: #fff;
}
.brand { font-weight: 700; }
.tag { font-weight: 400; opacity: .75; font-size: .85em; margin-left: 6px; }
.whoami { font-size: .9em; opacity: .9; }
.app { max-width: 640px; margin: 0 auto; padding: 16px; }
.view.hidden { display: none; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; margin-bottom: 16px;
}
.login-card { text-align: center; }
h1 { font-size: 1.3em; }
label { display: block; margin: 10px 0 4px; font-size: .9em; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 1em; background: #fdfcfa;
}
.row { display: flex; gap: 10px; }
.row.space-between { justify-content: space-between; align-items: center; }
.btn {
  display: inline-block; margin-top: 14px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; cursor: pointer; font-weight: 600;
}
.btn.primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.muted { color: var(--muted); font-size: .9em; }
.error { color: var(--red); font-size: .9em; }
.status-pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .85em;
  font-weight: 700; text-transform: uppercase; background: #eee; color: #444;
}
.status-pill.functional { background: #dff2ea; color: #1f6e4d; }
.status-pill.partially_functional { background: #fbead2; color: #9a5c10; }
.status-pill.non_functional { background: #fbe0dc; color: #a13521; }
.site-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer;
}
.site-row:last-child { border-bottom: none; }
.hist-row { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: .9em; }
.footer { text-align: center; color: var(--muted); font-size: .8em; padding: 24px; }
