/* Spark theme (G:\My Drive\mindmap\design_themes\spark_theme), the same tokens as transferet-admin. */
:root {
  --brand: #1b4df5; --brand-strong: #1440d8; --brand-soft: #eaf0ff;
  --cyan: #33c6f4; --gold: #f5a623;
  --navy: #0a1a40; --bg: #f4f6fb; --surface: #ffffff; --surface2: #eef2fb; --line: #e2e8f5;
  --text: #0a1a40; --muted: #4b5672;
  --green: #15803d; --green-soft: #e8f6ee; --red: #e11d48; --red-soft: #fff0f3; --red-line: #f5c2cf;
  --radius: 14px; --radius-control: 10px;
  --shadow: 0 10px 30px rgba(10, 26, 64, .08);
  --control-h: 2.5rem;
  --top-h: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; background: var(--bg); }
body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; background: var(--surface2); padding: 1px 5px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.top { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; }
.top-row { height: var(--top-h); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 16px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.search { flex: 1; max-width: 420px; }
.search input {
  width: 100%; height: var(--control-h); padding: 0 14px; border-radius: var(--radius-control);
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff;
  font: inherit; font-size: 14px; outline: none;
}
.search input::placeholder { color: rgba(255, 255, 255, .6); }
.search input:focus { border-color: var(--cyan); background: rgba(255, 255, 255, .14); }
.nav { display: flex; gap: 20px; margin-left: auto; order: 2; }
.lang { order: 3; display: flex; height: 2rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; overflow: hidden; }
.lang a { display: flex; align-items: center; padding: 0 9px; color: rgba(255, 255, 255, .7); font-size: 12px; font-weight: 800; }
.lang a:hover { color: #fff; text-decoration: none; }
.lang a[aria-current] { background: rgba(255, 255, 255, .18); color: #fff; }
.signout { order: 4; display: inline-flex; align-items: center; gap: 6px; height: 2rem; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; color: rgba(255, 255, 255, .85); font-size: 13px; font-weight: 700; white-space: nowrap; }
.signout:hover { color: #fff; border-color: rgba(255, 255, 255, .5); text-decoration: none; }
.nav a { color: rgba(255, 255, 255, .85); font-weight: 600; font-size: 14px; white-space: nowrap; }
.nav a:hover { color: #fff; }

main.wrap { padding-top: 32px; padding-bottom: 32px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding: 0 24px; }
h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 800; }
h2 { margin: 0 0 4px; font-size: 16px; font-weight: 800; }
.sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; max-width: 70ch; }
.hint { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.card .hint:last-child { margin: 12px 0 0; }
.muted { color: var(--muted); }
.empty { margin: 0; padding: 32px 0; text-align: center; color: var(--muted); font-size: 14px; }
.problem { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--red-line); background: var(--red-soft); color: var(--red); border-radius: var(--radius-control); font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; min-height: var(--control-h); padding: 0 16px; white-space: nowrap;
  border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface);
  color: var(--text); font-weight: 700; font-size: 14px;
}
.btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 20px; }
.stat { display: grid; gap: 2px; margin: 0; color: var(--text); }
.stat:hover { text-decoration: none; border-color: var(--brand); }
.stat-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.stat-title { font-size: 16px; font-weight: 800; }
.stat-value { font-size: 30px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 14px; color: var(--muted); font-weight: 600; }
.stat-foot { font-size: 13px; color: var(--muted); }

.table-wrap { margin: 0 -24px; overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
th { position: sticky; top: var(--top-h); z-index: 5; background: var(--surface2); text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 700; color: var(--muted); box-shadow: inset 0 -1px 0 var(--line); white-space: nowrap; }
.table-wrap th { position: static; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
th button:hover { color: var(--navy); }
th button::after { content: '↕'; opacity: .45; font-size: 11px; }
th[aria-sort='ascending'] button { color: var(--navy); }
th[aria-sort='ascending'] button::after { content: '↑'; opacity: 1; color: var(--brand); }
th[aria-sort='descending'] button { color: var(--navy); }
th[aria-sort='descending'] button::after { content: '↓'; opacity: 1; color: var(--brand); }
th.num button { flex-direction: row-reverse; }

.pos { display: inline-block; min-width: 2.4em; text-align: center; padding: 1px 6px; border-radius: 6px; font-size: 12px; font-weight: 800; }
.pos-GK { background: #fff5e3; color: #b45309; }
.pos-DF { background: var(--brand-soft); color: var(--brand-strong); }
.pos-MF { background: var(--green-soft); color: var(--green); }
.pos-FW { background: var(--red-soft); color: var(--red); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag.ok { background: var(--green-soft); color: var(--green); }
.tag.out { background: var(--red-soft); color: var(--red); }

/* Data flow: one row per step, source → target, what moves, how often. */
.flow { display: grid; grid-template-columns: repeat(4, max-content) 1fr; gap: 12px 10px; align-items: center; margin-top: 12px; font-size: 14px; }
.flow h3 { grid-column: 1 / -1; margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.flow h3:first-child { margin-top: 0; }
.flow-row { display: contents; }
.flow-path { display: contents; }
.flow-what { margin-left: 18px; }
.flow-when { margin-left: 18px; }
.flow-path b { justify-self: start; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); font-size: 13px; font-weight: 700; white-space: nowrap; }
.flow-arrow { color: var(--brand); font-size: 18px; font-weight: 800; }
.flow-what { font-weight: 700; }
.flow-when small { display: block; color: var(--muted); font-size: 13px; }
@media (max-width: 720px) {
  .flow { display: block; }
  .flow h3 { margin: 16px 0 8px; }
  .flow-row { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
  .flow-path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .flow-what, .flow-when { margin-left: 0; }
}
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }

/* Sign-in: the wordmark and name centred above the card, the card's text left-aligned (login.md). */
.login-body { min-height: 100vh; display: grid; place-items: center; }
.login { width: min(380px, calc(100% - 32px)); display: grid; justify-items: center; gap: 12px; padding: 32px 0; }
.login h1 { font-size: 24px; text-align: center; }
.login-card { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: grid; gap: 16px; }
.login-card p { margin: 0; font-size: 14px; }
.g_id_signin { min-height: 44px; }
.login-wait { display: flex; align-items: center; gap: 10px; height: 44px; font-weight: 700; }
.login-wait[hidden] { display: none; }
.spin { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.login-lang { border-color: var(--line); }
.login-lang a { color: var(--muted); }
.login-lang a:hover { color: var(--text); }
.login-lang a[aria-current] { background: var(--surface2); color: var(--text); }

.foot { padding-top: 8px; padding-bottom: 32px; color: var(--muted); font-size: 13px; }
.foot { padding-left: 40px; }

@media (max-width: 720px) {
  /* The menu gets a row of its own, so every link stays reachable. */
  :root { --top-h: 6.5rem; }
  .top-row { gap: 10px 12px; flex-wrap: wrap; align-content: center; }
  .brand span { display: none; }
  .nav { gap: 16px; width: 100%; margin-left: 0; overflow-x: auto; order: 3; }
  .lang { order: 2; height: var(--control-h); }
  .signout { order: 2; height: var(--control-h); padding: 0 11px; }
  .signout span { display: none; }
  .page-head { flex-direction: column; padding: 0 8px; }
  .card { padding: 16px; }
  .table-wrap { margin: 0 -16px; }
  th:first-child, td:first-child { padding-left: 16px; }
  th:last-child, td:last-child { padding-right: 16px; }
  .foot { padding-left: 24px; }
}
