:root {
  --bg: #f4f7f9; --card: #ffffff; --text: #1f2a33; --muted: #66737f; --line: #dde4ea;
  --brand: #0e7490; --brand-dark: #0b5d73; --brand-soft: #e6f4f7;
  --ok: #157f3b; --ok-soft: #e8f6ed; --err: #b42318; --err-soft: #fdecea; --warn-soft: #fff6e0;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--brand); }
h1 { font-size: 1.35rem; margin: 0 0 .5rem; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo { height: 40px; width: auto; display: block; }
.brand-sub { font-weight: 500; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line); }
.login-logo { text-align: center; margin: 48px 0 0; }
.login-logo img { width: 296px; max-width: 80%; height: auto; }
.card.narrow-left { max-width: 460px; }
fieldset.access { border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px 0; margin: 0; }
fieldset.access legend { font-weight: 600; font-size: .9rem; padding: 0 4px; }
fieldset.access .check { padding-bottom: 6px; }
.countdown { position: relative; width: 84px; height: 84px; flex: none; }
.countdown svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cd-track { fill: none; stroke: #cfe7ed; stroke-width: 9; }
.cd-bar { fill: none; stroke: var(--brand); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 326.73; stroke-dashoffset: 0; }
.cd-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a, .linkish { padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.nav a.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.nav a:hover, .linkish:hover { background: var(--bg); }
main.wrap { padding-top: 24px; padding-bottom: 48px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.card.narrow { max-width: 420px; margin: 24px auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
.inline { display: inline; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
input[type=text], input[type=password], input[type=number], input:not([type]), input[name=username] {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; width: 100%; background: #fff; }
input:focus-visible, .btn:focus-visible, a:focus-visible, .linkish:focus-visible, summary:focus-visible {
  outline: 3px solid #7cc6d8; outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.big { padding: 14px 22px; font-size: 1.05rem; }
.btn[disabled] { opacity: .6; cursor: wait; }
.danger { color: var(--err); }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; }
.alert.err { background: var(--err-soft); color: var(--err); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { padding: 9px 14px; border-radius: 999px; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: .95rem; }
.tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.drop { position: relative; border: 2px dashed #b9c7d2; border-radius: var(--radius); padding: 22px 18px; background: #fafcfd; cursor: pointer; font-weight: 400; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-title { font-weight: 600; }
.drop-hint { color: var(--muted); font-size: .9rem; }
.drop-files { font-size: .9rem; color: var(--brand-dark); font-weight: 600; word-break: break-word; }
.state { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: var(--radius); background: var(--brand-soft); margin: 14px 0; flex-wrap: wrap; }
.state.ok { background: var(--ok-soft); flex-direction: column; align-items: flex-start; }
.state.err { background: var(--err-soft); flex-direction: column; align-items: flex-start; }
.state-title { font-weight: 700; font-size: 1.1rem; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #b7dde6; border-top-color: var(--brand); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
details.files { margin-top: 10px; }
summary { cursor: pointer; }
pre.log { background: #10161b; color: #d7e1e8; padding: 12px; border-radius: 8px; font-size: 12px; overflow: auto; max-height: 420px; white-space: pre-wrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.nowrap { white-space: nowrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--bg); }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.pill.failed { background: var(--err-soft); color: var(--err); }
.pill.running, .pill.queued { background: var(--warn-soft); color: #8a5a00; }
.pill.admin { background: var(--brand-soft); color: var(--brand-dark); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { display: flex; gap: 6px; }
.search input { min-width: 0; width: 240px; }
.inline-label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.num { width: 90px !important; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; margin: 10px 0; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; padding-bottom: 10px; }
.users { display: grid; gap: 8px; }
.user { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.user.disabled { opacity: .7; }
.user summary { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.uname { font-weight: 700; }
.push { margin-left: auto; }
@media (max-width: 600px) {
  .card { padding: 16px; }
  .brand-sub { display: none; }
  .logo { height: 32px; }
  .search input { width: 100%; }
  .search { width: 100%; }
}
