/* Timbers Alert - self-contained styles. No CDN: the host is on an internal
   network and may have no route to the internet when a page is opened. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #d3d8e0;
  --text: #1c2024;
  --muted: #4d5763;
  --accent: #2f6f4e;
  --accent-soft: #e8f2ec;
  --danger: #b3261e;
  --warn: #9a6700;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --surface: #1c2024;
    --border: #363d45;
    --text: #e7ebef;
    --muted: #aab6c2;
    --accent: #7ac59b;
    --accent-soft: #1e2b24;
    --danger: #f2b8b5;
    --warn: #e9c46a;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
}

a { color: var(--accent); }

/* ---- chrome ---- */

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  height: 54px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav .brand {
  font-weight: 650;
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--text);
}
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; }
.nav a:hover, .nav a.active { color: var(--text); }
.nav .spacer { margin-left: auto; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 64px; }
.page-title { margin: 0 0 4px; font-size: 22px; letter-spacing: -.01em; }
.page-sub { margin: 0 0 24px; color: var(--muted); font-size: 14px; }

/* ---- cards ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 20px;
}
.card h2 { margin: 0 0 2px; font-size: 15px; font-weight: 640; }
.card .hint { margin: 0 0 14px; color: var(--muted); font-size: 13px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 24px; font-weight: 640; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.chart { width: 100%; height: 420px; }
.chart.tall { height: 520px; }
.chart.short { height: 280px; }

/* ---- notices ---- */

.note {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  margin: 10px 0 0;
}
.note.warn { border-left-color: var(--warn); }

/* ---- tables ---- */

.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-weight: 600; color: var(--muted);
  padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.data tr:last-child td { border-bottom: 0; }
.swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; }
.pill { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); font-size: 12px; }

/* ---- forms ---- */

form p { margin: 0 0 14px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=number], select {
  width: 100%; max-width: 420px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg); color: var(--text); font: inherit;
}
input[type=checkbox] { margin-right: 6px; }
.helptext, .helptext li { color: var(--muted); font-size: 12.5px; }
ul.errorlist { margin: 6px 0; padding-left: 18px; color: var(--danger); font-size: 13px; }

.btn {
  display: inline-block; padding: 8px 15px; border: 0; border-radius: 7px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 550;
  cursor: pointer; text-decoration: none;
}
.btn.secondary { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn.danger { background: var(--danger); }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }

.empty { color: var(--muted); padding: 28px 0; text-align: center; }
