:root {
  --bg: #eef2f7;
  --bg-2: #e4eaf2;
  --paper: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #2563eb;
  --accent-ink: #fff;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn: #a16207;
  --warn-bg: #fef3c7;
  --bad: #dc2626;
  --bad-bg: #fee2e2;
  --teal: #0f766e;
  --side: #1a2030;
  --side-2: #232b3d;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; }

.wordmark, .brand {
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wordmark span, .brand span { color: var(--accent); }
.wordmark:hover, .brand:hover { text-decoration: none; }
.brand i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  display: inline-block;
  position: relative;
}
.brand i::after {
  content: "";
  position: absolute;
  inset: 7px 6px 8px;
  border-radius: 10px 10px 4px 4px;
  background: rgba(255,255,255,.9);
}
.brand.light { color: #fff; }
.brand.light span { color: #93c5fd; }

.page-center {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px 80px;
}
.shell { width: min(760px, 100%); }
.hero { text-align: center; margin-bottom: 28px; }
.hero h1 { margin: 18px 0 6px; font-size: 22px; }
.hero p { margin: 0; color: var(--muted); font-size: 14px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-hd { padding: 16px 22px 0; }
.card-hd h2 { margin: 0; font-size: 16px; }
.card-bd { padding: 16px 22px 22px; }

.alert {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}
.alert-muted { background: #f1f5f9; color: var(--ink); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-bad { background: var(--bad-bg); color: var(--bad); }

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.list li:last-child { border-bottom: 0; }
.list .hint { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 8px; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-ok { background: var(--ok); color: #fff; }
.badge-warn { background: #d97706; color: #fff; }
.badge-bad { background: var(--bad); color: #fff; }
.badge-mute { background: #e2e8f0; color: var(--muted); }

.row-split {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 8px 0 4px;
}
.row-split .help { color: var(--muted); font-size: 13px; margin: 0; }
@media (max-width: 720px) {
  .row-split { grid-template-columns: 1fr; gap: 8px; }
}

label { display: block; font-size: 13px; margin-bottom: 6px; }
input[type=text], input[type=password], input[type=number], input[type=time], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid #bfdbfe;
  border-color: var(--accent);
}
.field { margin-bottom: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; color: var(--accent-ink); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { color: var(--ink); background: #f8fafc; }
.btn-teal { background: var(--teal); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 22px; font-size: 15px; font-weight: 600; }
.btn-light {
  background: #fff;
  color: var(--ink);
}
.btn-light:hover { color: var(--ink); }
.actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.auth-card { width: min(420px, 100%); }
.auth-card .card-bd { padding: 28px; }

/* Console / admin */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.side {
  background: linear-gradient(180deg, var(--side) 0%, #121722 100%);
  color: #e2e8f0;
  padding: 0 0 24px;
  display: flex;
  flex-direction: column;
}
.side-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 8px;
}
.side-close {
  display: none;
  background: none;
  border: 0;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
}
.side-user {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 8px 14px 16px;
  padding: 10px;
  background: rgba(255,255,255,.06);
  border-radius: 10px;
}
.side-user strong { display: block; font-size: 14px; }
.side-user small { color: #94a3b8; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar.lg { width: 52px; height: 52px; font-size: 20px; }
.side nav { padding: 0 10px; flex: 1; }
.nav-hd {
  margin: 14px 10px 4px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}
.side a { color: #cbd5e1; }
.side nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
}
.side nav a:hover, .side nav a.active {
  background: rgba(37, 99, 235, .35);
  color: #fff;
}
.side-meta, .side .meta {
  margin: 16px 14px 0;
  padding: 10px;
  font-size: 12px;
  color: #94a3b8;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
}
.main { min-width: 0; background: var(--bg); }
.main-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav-toggle {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
.main-body { padding: 28px 32px 60px; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.topbar h1 { margin: 0; font-size: 22px; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 14px 16px;
  border-radius: 12px;
}
.stat b { display: block; font-size: 22px; }
.stat span { color: var(--muted); font-size: 12px; }

.dash-hero {
  background: linear-gradient(120deg, #1d4ed8 0%, #7c3aed 55%, #0ea5e9 100%);
  color: #fff;
  border-radius: 16px;
  padding: 28px 28px 32px;
  margin-bottom: 18px;
}
.dash-hero h1 { margin: 0 0 6px; font-size: 26px; }
.dash-hero p { margin: 0; opacity: .9; }
.shortcuts {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.shortcuts a {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 10px;
  text-align: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  box-shadow: var(--shadow);
}
.shortcuts a:hover { border-color: #93c5fd; }
.sc-ico {
  display: flex;
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--accent);
  font-weight: 700;
}
.dash-grid {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 16px;
}
.user-panel { overflow: hidden; }
.user-panel-top {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 20px 22px 8px;
}
.user-panel-top p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.user-kv { list-style: none; margin: 0; padding: 8px 22px 0; }
.user-kv li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.user-kv span { color: var(--muted); }
.user-panel .alert { margin: 14px 22px 22px; }

@media (max-width: 1100px) {
  .shortcuts { grid-template-columns: repeat(3, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    z-index: 30;
    transform: translateX(-100%);
    transition: transform .2s;
  }
  .app.nav-open .side { transform: none; }
  .side-close { display: block; }
  .main-bar { display: flex; }
  .main-body { padding: 18px 16px 48px; }
  .stats { grid-template-columns: 1fr 1fr; }
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}
table.data th, table.data td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
table.data th { font-size: 12px; color: var(--muted); font-weight: 600; }
.account {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.account-hd {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.account-hd strong { display: block; }
.account-hd small { color: var(--muted); }
.jobs { margin-top: 12px; display: grid; gap: 8px; }
.job {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 13px;
}
.job .ops { display: flex; gap: 6px; flex-wrap: wrap; }

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}
.modal-bg.show { display: flex; }
.modal {
  background: var(--paper);
  width: min(420px, 100%);
  border-radius: 12px;
  padding: 22px;
}
.modal h3 { margin: 0 0 8px; }
.qrbox {
  width: 200px;
  height: 200px;
  margin: 16px auto;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qrbox img, .qrbox canvas, .qrbox table { max-width: 200px; }
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 40;
  display: none;
}
.log-item {
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.log-item time { color: var(--muted); margin-right: 8px; }
.inline { display: flex; gap: 8px; align-items: center; }
.tiny { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.auth-links { margin-top: 16px; text-align: center; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* Public homepage (OneTool-like structure) */
.ot-home { background: #f8fafc; }
.ot-wrap { max-width: 1120px; margin: 0 auto; padding: 16px 20px 0; }
.ot-top {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.ot-top nav { display: flex; align-items: center; gap: 16px; }
.ot-top nav a { color: var(--ink); text-decoration: none; font-size: 14px; }
.ot-top nav a.is-on { color: var(--accent); font-weight: 600; }
.ot-hero {
  margin: 18px 0 0;
  border-radius: 20px;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(15,23,42,.55), rgba(15,23,42,.72)),
    radial-gradient(circle at 20% 20%, #60a5fa, transparent 40%),
    radial-gradient(circle at 80% 0%, #7c3aed, transparent 42%),
    linear-gradient(135deg, #0f172a, #1e3a8a);
  overflow: hidden;
}
.ot-hero-inner { padding: 56px 24px; }
.ot-hero h1 { margin: 0 0 10px; font-size: clamp(32px, 6vw, 56px); letter-spacing: -.03em; }
.ot-hero p { margin: 0 0 22px; opacity: .92; font-size: 16px; }
.ot-hero .btn { margin: 0 6px; }
.ot-notice {
  margin: 18px 0 0;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
}
.ot-sec { padding: 56px 8px 8px; }
.ot-sec-alt { }
.ot-sec-hd { text-align: center; margin-bottom: 28px; }
.ot-sec-hd span {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: .2em;
  font-weight: 700;
}
.ot-sec-hd h2 { margin: 8px 0 6px; font-size: 28px; }
.ot-sec-hd em { font-style: normal; color: var(--accent); }
.ot-sec-hd p { margin: 0; color: var(--muted); }
.ot-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ot-3 article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.ot-3 h3 { margin: 0 0 8px; }
.ot-3 p { margin: 0; color: var(--muted); font-size: 14px; }
.ot-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}
.ot-ico-a { background: #2563eb; }
.ot-ico-b { background: #7c3aed; }
.ot-ico-c { background: #0f766e; }
.ot-plain article { background: transparent; box-shadow: none; border: 0; padding: 8px; }
.ot-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 40px 0;
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  border: 1px solid var(--line);
}
.ot-stats div { text-align: center; }
.ot-stats b { display: block; font-size: 28px; }
.ot-stats span { color: var(--muted); font-size: 13px; }
.ot-cta {
  text-align: center;
  padding: 40px 16px 24px;
}
.ot-cta h2 { margin: 0 0 8px; }
.ot-cta p { margin: 0 0 16px; color: var(--muted); }
.ot-foot {
  display: flex;
  justify-content: space-between;
  padding: 28px 8px 40px;
  color: var(--muted);
  font-size: 13px;
}

/* Split login */
.split-auth { background: #fff; }
.split { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.split-art {
  background:
    linear-gradient(160deg, rgba(15,23,42,.55), rgba(15,23,42,.75)),
    radial-gradient(circle at 30% 20%, #60a5fa, transparent 45%),
    #0f172a;
  color: #fff;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.split-quote { font-size: 28px; line-height: 1.4; font-weight: 600; }
.split-copy { opacity: .7; font-size: 13px; }
.split-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}
.split-box { width: min(380px, 100%); }
.split-box h1 { margin: 18px 0 4px; font-size: 26px; }

@media (max-width: 860px) {
  .ot-3, .ot-stats { grid-template-columns: 1fr; }
  .ot-top { position: static; }
  .split { grid-template-columns: 1fr; }
  .split-art { min-height: 180px; }
  .split-quote { font-size: 20px; }
}
