:root {
  --bg: #080b0f;
  --surface: #10151b;
  --surface-2: #151b22;
  --surface-3: #1a212a;
  --line: #27313b;
  --line-strong: #3a4855;
  --text: #edf2f5;
  --muted: #8f9ba5;
  --accent: #37c8b0;
  --accent-2: #65dfca;
  --blue: #4da3ff;
  --red: #ff5c67;
  --yellow: #f1cd4c;
  --orange: #ff9e49;
  --purple: #b48cff;
  --shadow: 0 18px 60px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
button, input, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
a { color: var(--accent-2); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.bad { color: var(--red); }
.ok { color: var(--accent-2); }
.warn { color: var(--yellow); }

.form-input, .form-select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0c1117;
  color: var(--text);
  padding: 9px 11px;
  outline: none;
}
.form-input:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(55, 200, 176, .13);
}
.form-label { display: grid; gap: 7px; color: #cbd3d9; font-size: 13px; }
.btn {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text);
  padding: 8px 14px;
}
.btn:hover { border-color: #61717e; background: #202a34; }
.btn-primary { color: #03110e; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-danger { color: #ffb5bb; border-color: #713039; background: #271216; }
.btn-warning { color: #ffe69c; border-color: #66551d; background: #231f10; }
.btn-icon { width: 38px; padding: 0; display: inline-grid; place-items: center; }
.icon { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #111820;
  font-size: 12px;
  white-space: nowrap;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: 420px;
  padding: 12px 14px;
  background: #171f27;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.toast.error { border-left-color: var(--red); }

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 43%) 1fr;
  background: #080b0f;
}
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 5vw, 74px);
  background-image: linear-gradient(180deg, rgba(4, 11, 14, .15), rgba(4, 11, 14, .93)), url("maps/lhdb.jpg");
  background-position: center;
  background-size: cover;
  border-right: 1px solid var(--line);
}
.brand-mark { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; }
.brand-symbol {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--accent-2);
  background: rgba(11, 24, 25, .8);
  border: 1px solid rgba(101, 223, 202, .4);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  padding-top: 10px;
}
.auth-brand h1 { margin: 0 0 14px; max-width: 600px; font-size: clamp(34px, 4.4vw, 64px); line-height: 1.04; }
.auth-brand p { margin: 0; max-width: 550px; color: #c1ccd1; line-height: 1.8; }
.auth-stage { display: grid; place-items: center; padding: 30px; }
.auth-form { width: min(430px, 100%); }
.auth-form h2 { margin: 0 0 8px; font-size: 28px; }
.auth-form > p { margin: 0 0 28px; color: var(--muted); }
.auth-fields { display: grid; gap: 17px; }
.auth-submit { width: 100%; margin-top: 6px; min-height: 46px; }
.auth-switch { text-align: center; margin-top: 22px; color: var(--muted); }
.admin-auth-brand { background: #101820; border-right-color: #31404a; }
.admin-auth-brand .brand-symbol { background: #e6b94a; color: #17130a; }
.admin-login-badge { display: inline-flex; margin-bottom: 18px; padding: 6px 9px; border: 1px solid #705e2b; color: #e6b94a; background: #211d12; font: 700 11px/1 "Consolas", monospace; }
.form-error { min-height: 20px; color: #ff8992; font-size: 13px; }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.admin-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #0c1015;
}
.admin-nav .brand-mark { padding: 22px 18px; border-bottom: 1px solid var(--line); }
.nav-list { display: grid; gap: 4px; padding: 16px 10px; }
.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 43px;
  padding: 9px 12px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 4px;
  color: #a7b1ba;
  background: transparent;
  text-align: left;
}
.nav-button:hover { color: var(--text); background: #141a21; }
.nav-button.active { color: var(--accent-2); background: #14221f; border-left-color: var(--accent); }
.admin-nav-footer { margin-top: auto; padding: 14px 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.admin-main { min-width: 0; padding: 24px clamp(18px, 3vw, 44px) 50px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-topbar h1 { margin: 0; font-size: 24px; }
.admin-user { color: var(--muted); font-size: 13px; }
.admin-view { display: none; }
.admin-view.active { display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 12px; }
.stat-card { padding: 18px; border-top: 2px solid var(--line-strong); }
.stat-card strong { display: block; font-size: 28px; margin-bottom: 5px; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card.accent { border-top-color: var(--accent); }
.content-panel { margin-top: 16px; padding: 18px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-title h2 { margin: 0; font-size: 17px; }
.toolbar-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.toolbar-row .form-input, .toolbar-row .form-select { width: auto; min-width: 140px; }
.data-wrap { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--line); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.data-table th { position: sticky; top: 0; z-index: 1; background: #171e26; color: #9daab4; font-weight: 600; }
.data-table tr:hover td { background: #121920; }
.badge { display: inline-flex; padding: 3px 7px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 11px; }
.badge.green { color: #78e3c5; background: #10241f; border-color: #235b4c; }
.badge.red { color: #ff9aa2; background: #271417; border-color: #653038; }
.badge.blue { color: #8ac2ff; background: #111f2e; border-color: #284f75; }
.badge.yellow { color: #ffe69c; background: #231f10; border-color: #66551d; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 16px; }
.setting-group { padding: 17px; border: 1px solid var(--line); border-radius: 6px; background: #0d1218; }
.setting-group h3 { margin: 0 0 14px; font-size: 15px; }
.setting-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.checkbox-line { display: flex; align-items: center; gap: 9px; color: #cbd3d9; font-size: 13px; }
.checkbox-line input { accent-color: var(--accent); }
.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .72); }
.modal { width: min(480px, 100%); padding: 20px; }
.modal h2 { margin: 0 0 18px; font-size: 19px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }

@media (max-width: 1000px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand { min-height: 220px; padding: 26px; }
  .auth-brand h1 { font-size: 34px; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { position: static; height: auto; }
  .nav-list { display: flex; overflow-x: auto; }
  .nav-button { white-space: nowrap; }
  .admin-nav-footer { display: none; }
  .admin-main { padding: 18px 12px 40px; }
  .settings-grid, .setting-fields { grid-template-columns: 1fr; }
}

/* Version 2 — amber command-deck visual system. */
:root {
  --bg: #090703;
  --surface: #141009;
  --surface-2: #1b150c;
  --surface-3: #251b0d;
  --line: #4d3b20;
  --line-strong: #7b5b27;
  --text: #fff5df;
  --muted: #aa9676;
  --accent: #ffb000;
  --accent-2: #ffd66b;
  --blue: #37d8ff;
  --red: #ff3b62;
  --yellow: #ffbc38;
  --orange: #ff8b32;
  --purple: #a889ff;
  --shadow: 0 22px 70px rgba(0, 0, 0, .52);
}
body {
  background:
    linear-gradient(rgba(255,176,0,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,176,0,.035) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  font-family: "Bahnschrift", "Arial Narrow", "Microsoft YaHei", sans-serif;
  letter-spacing: .025em;
}
a { color: var(--accent-2); }
.form-input, .form-select {
  border-radius: 0;
  border-color: var(--line-strong);
  background: #0d0a05;
}
.form-input:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 3px 3px 0 rgba(255,176,0,.22);
}
.btn {
  border-radius: 0;
  border-color: var(--line-strong);
  background: #1d1509;
  text-transform: uppercase;
}
.btn:hover { color: #140c00; border-color: var(--accent-2); background: var(--accent-2); }
.btn-primary { color: #160e00; background: var(--accent); border-color: var(--accent); }
.pill, .badge { border-radius: 2px; background: #171006; }
.panel, .setting-group, .modal {
  border-radius: 0;
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.auth-page {
  grid-template-columns: 1fr;
  grid-template-rows: 190px minmax(0, 1fr);
  background: transparent;
}
.auth-brand {
  padding: 28px clamp(26px, 7vw, 100px);
  flex-direction: row;
  align-items: flex-end;
  gap: 40px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background-image:
    linear-gradient(90deg, rgba(9,7,3,.94), rgba(9,7,3,.38)),
    url("maps/htjd.jpg");
}
.auth-brand h1 { max-width: 760px; margin: 0; font-size: clamp(27px, 4vw, 52px); text-transform: uppercase; }
.auth-brand p { max-width: 520px; color: #e2cfa7; line-height: 1.55; }
.auth-login-page { grid-template-rows: 224px minmax(0, 1fr); }
.auth-login-brand {
  display: grid;
  grid-template-columns: minmax(190px, .68fr) minmax(440px, 1.45fr) minmax(190px, .62fr);
  align-items: center;
  gap: clamp(28px, 4vw, 66px);
  padding-block: 30px;
  background-image:
    linear-gradient(90deg, rgba(9,7,3,.97) 0%, rgba(9,7,3,.76) 42%, rgba(9,7,3,.46) 100%),
    url("maps/htjd.jpg");
}
.auth-brand-mark { align-self: center; gap: 14px; }
.auth-login-brand .brand-symbol { width: 44px; height: 44px; font-size: 19px; }
.auth-brand-name { display: grid; gap: 3px; line-height: 1; }
.auth-brand-name strong { color: var(--text); font-size: 21px; letter-spacing: .16em; }
.auth-brand-name small { color: var(--accent-2); font-size: 11px; font-weight: 600; letter-spacing: .18em; }
.auth-brand-copy { padding-left: clamp(24px, 3vw, 46px); border-left: 2px solid var(--accent); }
.auth-eyebrow { display: block; margin-bottom: 10px; color: var(--accent); font: 700 10px/1.2 "Consolas", monospace; letter-spacing: .25em; }
.auth-login-brand h1 { margin: 0 0 10px; font-size: clamp(32px, 3.15vw, 46px); line-height: 1.08; letter-spacing: .055em; white-space: nowrap; }
.auth-login-brand p { max-width: 660px; margin: 0; color: #ead9b7; font-size: clamp(13px, 1.05vw, 15px); line-height: 1.75; }
.auth-brand-meta { justify-self: end; display: grid; gap: 10px; min-width: 184px; padding: 15px 0; text-align: right; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.auth-brand-meta small { color: var(--muted); font: 600 10px/1.2 "Consolas", monospace; letter-spacing: .16em; }
.auth-status { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--accent-2); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.auth-status i { width: 7px; height: 7px; background: var(--accent); box-shadow: 0 0 12px rgba(255,176,0,.8); transform: rotate(45deg); }
.brand-symbol {
  color: #160e00;
  background: var(--accent);
  border: 0;
  clip-path: none;
  padding: 0;
}
.auth-stage { place-items: start center; padding: 52px 30px; }
.auth-form { width: min(520px, 100%); padding: 28px; border: 1px solid var(--line); background: rgba(17,12,5,.9); box-shadow: var(--shadow); }
.admin-auth-brand { background: #151005; }

.admin-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
.admin-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  height: auto;
  flex-direction: row;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(10,7,3,.96);
}
.admin-nav .brand-mark { padding: 12px 20px; border: 0; border-right: 1px solid var(--line); }
.nav-list { display: flex; gap: 0; padding: 0; overflow-x: auto; }
.nav-button { min-height: 58px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 16px; }
.nav-button.active { color: var(--accent-2); background: #241908; border: 0; border-bottom: 3px solid var(--accent); }
.admin-nav-footer { margin: 0 12px 0 auto; padding: 0; border: 0; display: flex; }
.admin-main { padding-top: 30px; }
.stat-grid { grid-template-columns: repeat(5, minmax(140px, 1fr)); }
.stat-card { background: #120d06; border: 1px solid var(--line); border-left: 4px solid var(--line-strong); }
.stat-card.accent { border-top-color: var(--line); border-left-color: var(--accent); }
.data-table th { background: #241a0d; color: var(--accent-2); }
.data-table tr:hover td { background: #1c1409; }

@media (max-width: 760px) {
  .auth-page { grid-template-rows: auto minmax(0, 1fr); }
  .auth-brand { min-height: 210px; flex-direction: column; align-items: flex-start; padding: 26px; }
  .auth-login-brand { display: grid; grid-template-columns: 1fr; gap: 19px; min-height: 0; padding: 24px; }
  .auth-brand-copy { padding: 17px 0 0; border-top: 1px solid var(--line-strong); border-left: 0; }
  .auth-login-brand h1 { font-size: 30px; white-space: normal; }
  .auth-brand-meta { display: none; }
  .auth-stage { padding: 24px 14px; }
  .admin-nav { position: static; flex-wrap: wrap; }
  .admin-nav .brand-mark { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-nav-footer { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 761px) and (max-width: 1050px) {
  .auth-login-page { grid-template-rows: 210px minmax(0, 1fr); }
  .auth-login-brand { grid-template-columns: minmax(170px, .55fr) minmax(430px, 1.45fr); gap: 30px; }
  .auth-brand-meta { display: none; }
}
