/* core.css - styles for core's own pages (home, admin). Module pages do
   not load this; they bring their own. The token names are the ones the
   modules use, so the theme's accent applies everywhere. */
:root {
  color-scheme: light;
  --bg: #f4f3f0; --surface: #fcfcfb; --surface-2: #f0efec; --line: #e2e0da;
  --text: #0b0b0b; --text-2: #52514e; --text-3: #7a7974;
  --accent: #2a78d6; --critical: #d03b3b; --good: #0ca30c;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #121211; --surface: #1a1a19; --surface-2: #232321; --line: #34332f;
    --text: #f0efec; --text-2: #c3c2b7; --text-3: #8e8d85;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
main { padding: 24px 20px 48px; max-width: 1100px; margin: 0 auto; }
h1 { font-size: 20px; margin: 0 0 4px; font-weight: 650; }
h2 { font-size: 15px; margin: 28px 0 10px; font-weight: 650; }
.sub { color: var(--text-2); margin: 0 0 20px; }
.err { color: var(--critical); min-height: 1.4em; margin: 8px 0 0; }
[hidden] { display: none !important; }

input[type="text"], input[type="password"] {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--text); font: inherit; width: 100%;
}
button.btn {
  padding: 8px 14px; border: 1px solid var(--accent); border-radius: 6px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
button.btn:disabled { opacity: .5; cursor: default; }

/* sign-in */
.signin { max-width: 340px; margin: 12vh auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.signin img { max-height: 44px; max-width: 200px; display: block; margin-bottom: 14px; }
.signin label { display: block; margin: 12px 0 4px; color: var(--text-2); font-size: 13px; }
.signin button { margin-top: 16px; width: 100%; }

/* module tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; color: inherit; text-decoration: none; }
.tile:hover { border-color: var(--accent); }
.tile b { display: block; font-size: 15px; margin-bottom: 4px; }
.tile span { color: var(--text-2); font-size: 13px; }

/* admin */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-size: 12px; color: var(--text-2); font-weight: 600; background: var(--surface-2); }
td.c, th.c { text-align: center; }
.muted { color: var(--text-3); }
.addrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: 720px; }
.addrow input[type="text"] { flex: 1 1 180px; width: auto; }
