:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07100f;
  color: #edf7f0;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 90% -10%, rgba(58, 191, 130, .24), transparent 34rem),
    radial-gradient(circle at -10% 50%, rgba(114, 81, 211, .17), transparent 31rem),
    #07100f;
}

button, input { font: inherit; }
button { cursor: pointer; }

.shell { width: min(760px, 100%); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px 38px; }
.topbar, .section-head, .dashboard-hero, .actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.topbar { margin-bottom: 20px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar h1 { margin: 2px 0 0; font-size: clamp(1.55rem, 7vw, 2rem); letter-spacing: -.04em; }
.eyebrow { margin: 0; color: #83d7a7; font-size: .69rem; font-weight: 800; letter-spacing: .13em; }
.card, .hero-card {
  border: 1px solid rgba(164, 231, 190, .16);
  border-radius: 18px;
  background: rgba(11, 27, 23, .88);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .18);
}
.card { margin: 14px 0; padding: 20px; }
.hero-card { padding: 24px 20px; background: linear-gradient(135deg, rgba(30, 97, 67, .88), rgba(13, 31, 27, .94)); }
.hero-card h2, .card h2 { margin: 6px 0 10px; font-size: clamp(1.25rem, 6vw, 1.65rem); letter-spacing: -.035em; }
.hero-card p, .card p { line-height: 1.5; }
.hero-card p:last-child, .card p:last-child { margin-bottom: 0; }
.loading-card { color: #b9d8c5; text-align: center; }
.hidden { display: none !important; }

.text-button { border: 0; background: transparent; color: #a9edc5; padding: 10px 2px; text-decoration: none; }
label { display: grid; gap: 8px; font-size: .9rem; font-weight: 700; color: #cce7d5; }
.form-grid, #loginForm, #bootstrapForm { display: grid; gap: 16px; }
input {
  width: 100%;
  border: 1px solid rgba(183, 236, 205, .25);
  border-radius: 12px;
  padding: 13px 14px;
  background: #061512;
  color: #f4fff7;
  outline: none;
}
input:focus { border-color: #80dfaa; box-shadow: 0 0 0 3px rgba(90, 207, 140, .16); }
button:not(.text-button) {
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  background: linear-gradient(135deg, #7be3a9, #42af7f);
  color: #052216;
  font-weight: 850;
}
button:not(.text-button):hover { filter: brightness(1.06); }
button:not(.text-button):disabled { cursor: not-allowed; opacity: .55; }
.muted, .footnote { color: #a7c1b0; }
.footnote { font-size: .82rem; }
.warning { border-color: rgba(247, 200, 82, .4); background: rgba(66, 48, 12, .45); }
.status-pill, .count-chip, .save-state { border-radius: 999px; padding: 7px 10px; font-size: .76rem; font-weight: 750; white-space: nowrap; }
.status-pill.neutral { background: rgba(194, 171, 90, .16); color: #f6d570; border: 1px solid rgba(246, 213, 112, .25); }
.count-chip { background: rgba(130, 226, 169, .14); color: #9febbe; }
.save-state { background: rgba(132, 158, 148, .13); color: #bbd4c6; }
.save-state.saved { background: rgba(74, 198, 125, .16); color: #98e9b5; }
.notice { margin-top: 16px; padding: 14px; border-left: 3px solid #72d99d; border-radius: 4px 10px 10px 4px; background: rgba(55, 135, 91, .11); color: #c6e2d0; line-height: 1.48; }
.actions { justify-content: flex-start; flex-wrap: wrap; margin-top: 16px; }
.task-link { color: #a9ecca; font-size: .88rem; font-weight: 750; text-decoration: none; }
.task-link:hover { text-decoration: underline; }
.work-order-title { color: #e7f8ec; font-weight: 800; }
.boundaries { padding-left: 20px; color: #c4dbc9; line-height: 1.55; }
.boundaries li + li { margin-top: 7px; }
.watchlist { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 9px; margin-top: 14px; }
.watch-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid rgba(169, 227, 191, .13); border-radius: 12px; padding: 11px 12px; background: rgba(4, 15, 12, .54); }
.watch-item a { color: #d8f8e3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.watch-item a:hover { text-decoration: underline; }
.group-tag { color: #a2c2ae; font-size: .66rem; text-align: right; }
.global-status { min-height: 1.5em; margin: 16px 2px 0; color: #b8d3c1; font-size: .9rem; }
.global-status.error { color: #ffaaaa; }
.global-status.ok { color: #9fe8ba; }

@media (max-width: 480px) {
  .shell { padding-left: 13px; padding-right: 13px; }
  .card { padding: 17px; }
  .hero-card { padding: 21px 17px; }
  .dashboard-hero { align-items: flex-start; flex-direction: column; }
  .section-head { align-items: flex-start; }
  .status-pill { white-space: normal; }
}
