:root {
  --bg: #0b1020;
  --bg2: #121a2f;
  --card: #162038;
  --text: #e8eefc;
    --muted: #9aa7c2;
  --line: #243152;
  --brand: #6ea8fe;
  --brand2: #8b5cf6;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: radial-gradient(1200px 600px at 20% -10%, #1a2450 0%, var(--bg) 55%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100%;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(980px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  display:flex; justify-content:space-between; align-items:center;
  padding: 18px 0 8px;
}
.brand {
  font-weight: 700; letter-spacing: .3px; font-size: 18px;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav a { color: var(--muted); margin-left: 14px; font-size: 14px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.hero { padding: 8vh 0 24px; text-align: center; }
.hero h1 { margin: 0 0 10px; font-size: clamp(28px, 5vw, 44px); font-weight: 760; }
.hero p { margin: 0 auto 28px; color: var(--muted); max-width: 620px; line-height: 1.6; }
.search-box {
  background: rgba(22,32,56,.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 10px;
  display: grid;
  gap: 10px;
}
.search-row { display:flex; gap: 8px; }
.search-row input[type=text] {
  flex: 1;
  border: 0; outline: none;
  background: var(--bg2);
  color: var(--text);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid transparent;
}
.search-row input[type=text]:focus { border-color: #3b82f6; }
.search-row button {
  border: 0; cursor: pointer;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white; font-weight: 650;
  border-radius: 12px; padding: 0 18px; min-width: 96px;
}
.filters {
  display:flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; padding: 0 6px 4px;
  color: var(--muted); font-size: 13px; align-items: center;
}
.filters select, .filters input[type=text] {
  background: var(--bg2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 8px;
}
.results { margin: 28px auto 60px; }
.card {
  background: rgba(22,32,56,.88);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 16px; }
.meta { color: var(--muted); font-size: 12px; display:flex; flex-wrap:wrap; gap:8px; margin-bottom: 8px; }
.badge {
  display:inline-block; padding: 2px 8px; border-radius: 999px;
  background: #243457; color: #c7d2fe; font-size: 12px;
}
.badge.ok { background: rgba(52,211,153,.15); color: var(--ok); }
.badge.warn { background: rgba(251,191,36,.12); color: var(--warn); }
.link {
  word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; color: #c7d2fe; background: #0f172a; padding: 8px 10px; border-radius: 8px;
}
.actions { margin-top: 8px; display:flex; gap:8px; }
.actions button, .btn {
  border: 1px solid var(--line); background: var(--bg2); color: var(--text);
  border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 12px;
}
.btn-primary { background: linear-gradient(135deg, #3b82f6, #8b5cf6); border:0; color:#fff; }
.auth-wrap { min-height: 100vh; display:grid; place-items:center; padding: 24px; }
.auth-card {
  width: min(420px, 100%);
  background: rgba(22,32,56,.95);
  border: 1px solid var(--line);
  border-radius: 16px; padding: 24px; box-shadow: var(--shadow);
}
.auth-card h1 { margin: 0 0 8px; font-size: 22px; }
.auth-card p { color: var(--muted); margin: 0 0 18px; }
.auth-card label { display:block; font-size: 13px; color: var(--muted); margin: 10px 0 6px; }
.auth-card input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text);
}
.auth-card button {
  width: 100%; margin-top: 16px; padding: 12px; border:0; border-radius: 10px; cursor:pointer;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6); color:#fff; font-weight: 650;
}
.err { color: var(--danger); font-size: 13px; margin-top: 8px; }
.table { width:100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align:left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.admin-grid { display:grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 960px) {
  .admin-grid { grid-template-columns: 1.1fr .9fr; }
}
.muted { color: var(--muted); }
.status-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; background: var(--warn); }
.status-dot.done { background: var(--ok); }
.status-dot.error { background: var(--danger); }
.status-dot.running { background: #60a5fa; }
.footer { text-align:center; color: var(--muted); font-size: 12px; padding: 20px 0 40px; }


.progress-card { padding: 16px 18px; }
.progress-head {
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  margin-bottom: 10px; font-size: 14px;
}
.progress-bar {
  width:100%; height:10px; border-radius:999px;
  background: rgba(255,255,255,.08); overflow:hidden;
  border: 1px solid var(--line);
}
.progress-fill {
  height:100%; width:0%;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  border-radius:999px;
  transition: width .35s ease;
}

.badge.danger { background: rgba(248,113,113,.15); color: var(--danger); }
.status-dot.cancelled { background: #94a3b8; }
.btn.danger, button.danger {
  background: rgba(248,113,113,.15) !important;
  color: var(--danger) !important;
  border: 1px solid rgba(248,113,113,.35) !important;
}
.btn-link {
  background: transparent; border: 0; color: #93c5fd; cursor: pointer; padding: 0; font-size: 13px;
}
.btn-link.danger { color: var(--danger); }
.row-actions { display:flex; gap:10px; align-items:center; white-space:nowrap; }
.warn { color: var(--warn); font-size: 13px; }

.status-dot.cancelling { background: #f59e0b; }
