:root {
  --bg: #f4f7f8; --card: #ffffff; --ink: #14272c; --muted: #5a6f75; --line: #d7e1e4;
  --brand: #0b5c6b; --brand-ink: #ffffff; --accent: #e07a2f;
  --ok: #17794a; --ok-bg: #e3f4ea; --warn: #8a5a00; --warn-bg: #fff3d6; --err: #b3261e; --err-bg: #fde8e6;
  --radius: 12px;
}
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1a1d; --card: #15262a; --ink: #e6f0f2; --muted: #93a9af; --line: #27393e;
    --brand: #3fb2c6; --brand-ink: #062329; --accent: #f0a15e;
    --ok: #5ed39a; --ok-bg: #12301f; --warn: #f2c35b; --warn-bg: #33290f; --err: #ff8a80; --err-bg: #3a1a18;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.35rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; margin-top: 1.25rem; }
h2.inline { display: inline; }
p { margin: .25rem 0 .75rem; }
.muted { color: var(--muted); }
.k { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.center { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login { width: min(100%, 380px); }
.brand { display: flex; align-items: center; gap: .6rem; }
.wave {
  width: 28px; height: 28px; border-radius: 8px; background: var(--brand); flex: none; position: relative;
}
.wave::after {
  content: ""; position: absolute; inset: 7px 4px; border-bottom: 3px solid var(--brand-ink); border-radius: 50%;
}

.top {
  position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem;
  padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line);
}
.top .brand { flex: 1 1 auto; min-width: 0; }
.top .brand strong { white-space: nowrap; }
.tabs { display: flex; gap: .25rem; order: 3; flex: 1 1 100%; }
.top .btn { order: 2; }
@media (min-width: 560px) { .tabs { order: 0; flex: 0 0 auto; margin-left: auto; } .top .btn { order: 0; } }
.tabs button {
  border: 0; background: transparent; color: var(--muted); font: inherit; padding: .45rem .8rem; border-radius: 8px; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--bg); color: var(--ink); font-weight: 600; }

.wrap { max-width: 860px; margin: 0 auto; padding: 16px; }
.wrap > section { display: grid; gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0;
}
details.card > summary { cursor: pointer; }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .5rem 0; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }

.btn {
  font: inherit; font-weight: 600; padding: .6rem 1rem; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); min-height: 44px;
}
.btn:hover:not(:disabled) { border-color: var(--brand); }
.btn:focus-visible, input:focus-visible, summary:focus-visible, .tabs button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.danger { background: var(--err-bg); color: var(--err); border-color: var(--err); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 36px; padding: .3rem .7rem; font-weight: 500; }
.btn.big { padding: .85rem 1.25rem; font-size: 1.05rem; width: 100%; }
@media (min-width: 560px) { .btn.big { width: auto; } }

label { display: block; font-weight: 600; margin: .75rem 0 .25rem; }
input[type="password"] {
  width: 100%; font: inherit; padding: .65rem .8rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); min-height: 44px;
}

.grid-info, .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .75rem; margin: .75rem 0; }
.grid-info > div, .stats > div { background: var(--bg); border-radius: 10px; padding: .6rem .8rem; }

.bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar.tall { height: 14px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .35s ease; }

.progress-head { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; gap: .5rem; }
.count { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.chip { padding: .2rem .65rem; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; }
.chip.processing, .chip.pending { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip.completed { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.chip.failed, .chip.paused, .chip.cancelled { background: var(--err-bg); color: var(--err); border-color: transparent; }

.status { font-weight: 600; }
.error { color: var(--err); font-weight: 600; }
.success { color: var(--ok); font-weight: 600; }
.notice { background: var(--warn-bg); color: var(--warn); padding: .65rem .8rem; border-radius: 10px; font-weight: 500; }
.banner { padding: .6rem 16px; text-align: center; font-weight: 600; background: var(--err-bg); color: var(--err); }
.banner.info { background: var(--warn-bg); color: var(--warn); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.list > li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; padding: .6rem .8rem; background: var(--bg); border-radius: 10px; }
.list.compact > li { padding: .3rem .6rem; font-size: .9rem; }
.list .meta { color: var(--muted); font-size: .85rem; }
.list .grow { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.list .acts { display: flex; gap: .4rem; flex-wrap: wrap; }

.texts { padding-left: 1.5rem; display: grid; gap: .75rem; }
.texts li { overflow-wrap: anywhere; }
.pre { background: var(--bg); padding: .75rem; border-radius: 10px; overflow: auto; font-size: .85rem; white-space: pre-wrap; }

dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); max-width: min(92vw, 420px); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }

@media (prefers-reduced-motion: reduce) { .bar > i { transition: none; } }
