/* 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.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
/* Cards on core's pages: a soft lift instead of a hard outline. */
.card, .tile, .signin, main table { box-shadow: 0 1px 4px rgba(42, 42, 42, .08); }
main { padding: 24px 20px 48px; max-width: 1100px; margin: 0 auto; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 700; }
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, a.btn {
  padding: 8px 14px; border: 1px solid var(--accent); border-radius: 6px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; text-align: center;
}
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; }
/* The logo sits on the bar's colour, as in the top bar, in both themes. */
.signin .brandstrip { background: var(--brand-bar-bg, #16202b); margin: -24px -24px 18px; padding: 22px; border-radius: 9px 9px 0 0; }
.signin .brandstrip img { max-height: 120px; max-width: 220px; display: block; margin: 0 auto; }
.signin label { display: block; margin: 12px 0 4px; color: var(--text-2); font-size: 13px; }
.signin button { margin-top: 16px; width: 100%; }
.signin a.btn { display: block; margin-top: 6px; }
.signin .or { text-align: center; color: var(--text-3); font-size: 12px; margin: 16px 0 0; }

/* home: the dashboards, a section per group */
.find { margin: 0 0 4px; max-width: 320px; }
.group { margin: 0 0 8px; }
.group h2 { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.group h2 small { font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.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: 14px 16px; color: inherit; text-decoration: none; }
.tile { border-left: 4px solid var(--accent); transition: box-shadow .15s ease, transform .15s ease; }
.tile:hover, .tile:focus-visible { border-color: var(--accent); box-shadow: 0 4px 16px rgba(42, 42, 42, .12); transform: translateY(-1px); }
.tile b { display: block; font-size: 15px; margin-bottom: 4px; }
.tile span { color: var(--text-2); font-size: 13px; }
.tag { font-size: 10px; font-weight: 600; line-height: 1; font-style: normal; letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px;
  padding: 2px 6px; margin-left: 4px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-3); }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }

/* 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); }
button.link { background: none; border: 0; padding: 0 0 0 4px; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; }
.addrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: 720px; }
.addrow input[type="text"] { flex: 1 1 180px; width: auto; }
