:root {
  --bg: #10131a;
  --panel: #181d27;
  --panel2: #1f2633;
  --line: #2b3444;
  --text: #e9edf5;
  --muted: #93a0b5;
  --accent: #ff9f43;
  --accent2: #ffbe76;
  --green: #37d67a;
  --red: #ff6b6b;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; }
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent2); text-decoration: none; }
code, .mono { font-family: Consolas, "Courier New", monospace; }
code { background: #0d1016; padding: 2px 6px; border-radius: 5px; color: var(--accent2); }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 28px; background: #141924; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #ffb347, #ff8c42);
  display: flex; align-items: center; justify-content: center; color: #2a1a08; font-weight: 800; font-size: 20px;
}
.brand-name { font-size: 17px; font-weight: 700; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.nav a { color: var(--text); opacity: .85; }
.nav a:hover { color: var(--accent); opacity: 1; }
.who { color: var(--muted); font-size: 12px; }
.inline { display: inline; margin: 0; }
.link-button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0; }
.link-button:hover { color: var(--red); }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 28px auto 40px; flex: 1; }
.footer { text-align: center; color: #5f6b7f; font-size: 12px; padding: 18px; border-top: 1px solid var(--line); }

h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.quota { color: var(--muted); font-size: 13px; background: var(--panel); border: 1px solid var(--line); padding: 8px 12px; border-radius: 9px; }
.quota b { color: var(--accent); font-size: 16px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.grid.two { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: start; }
.side-note { background: #151a23; }
.steps { margin: 10px 0 14px; padding-left: 20px; color: #c8d1e0; line-height: 1.9; font-size: 14px; }
.notice { background: #241d12; border: 1px solid #4a3a1f; color: #e9c38f; border-radius: 9px; padding: 10px 12px; font-size: 13px; line-height: 1.7; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; color: #c8d1e0; margin-bottom: 7px; }
.field input {
  width: 100%; background: #0f131b; border: 1px solid #303b4e; color: var(--text);
  border-radius: 9px; padding: 11px 12px; font-size: 15px; outline: none;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,159,67,.12); }
.field input:disabled { opacity: .5; }
.field small { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.check { display: flex; align-items: center; gap: 8px; margin: 2px 0 18px; font-size: 14px; color: #c8d1e0; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 16px; font-size: 14px; cursor: pointer;
}
.btn:hover { border-color: #46536b; }
.btn.primary { background: linear-gradient(135deg, #ffb347, #ff8c42); border-color: transparent; color: #2a1a08; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.full { width: 100%; margin-top: 10px; }

.flash { border-radius: 9px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.flash.error { background: #2a1719; border: 1px solid #5b2b2f; color: #ffb4b4; }
.flash.success { background: #14251b; border: 1px solid #265239; color: #9be8b7; }

.auth-wrap { min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.auth-card { width: min(380px, 100%); text-align: center; }
.auth-logo { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 17px; background: linear-gradient(135deg, #ffb347, #ff8c42); color: #2a1a08; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; }
.auth-card h1 { margin-bottom: 4px; }
.auth-card form { margin-top: 22px; text-align: left; }
.tip { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 14px 0 0; }

.result-card { max-width: 520px; margin: 0 auto; text-align: center; }
.result-ok { width: 54px; height: 54px; border-radius: 50%; background: #173326; color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 4px auto 12px; }
.kv { display: grid; gap: 8px; margin: 16px 0 8px; text-align: left; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #2b3444; padding: 8px 2px; font-size: 13px; }
.kv span { color: var(--muted); }
.kv b { font-family: Consolas, monospace; font-weight: 600; }

.table-card { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #242d3b; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; background: #151a23; }
tr:hover td { background: #1a202b; }
.small-link { font-size: 12px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.error-card { max-width: 480px; margin: 40px auto; text-align: center; }
.error-card h1 { color: var(--red); }

@media (max-width: 760px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 16px; }
  .nav { flex-wrap: wrap; gap: 12px; }
  .grid.two { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
}
