:root {
  --navy: #173f48;
  --teal: #176b73;
  --teal-2: #2f8f83;
  --canvas: #f3f7f7;
  --surface: #fff;
  --ink: #19363c;
  --muted: #6a7f84;
  --line: #dce7e9;
  --danger: #b42318;
  --success: #087443;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
a { color: inherit; }
.hidden { display: none !important; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px; color: #fff; background: linear-gradient(180deg,#173f48,#0e5960); }
.brand { display: flex; gap: 11px; align-items: center; padding: 0 8px 23px; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: linear-gradient(135deg,#44b7a9,#fff); color: #15565c; font-size: 20px; font-weight: 900; }
.brand strong { display: block; font-size: 17px; }
.brand small { color: rgba(255,255,255,.64); }
.nav-label { margin: 18px 10px 7px; color: rgba(255,255,255,.48); font-size: 11px; letter-spacing: .1em; }
.nav-link { display: flex; gap: 10px; align-items: center; margin: 4px 0; padding: 11px 12px; border-radius: 11px; color: rgba(255,255,255,.82); text-decoration: none; font-size: 14px; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.12); }
.nav-link.muted-link { cursor: default; color: rgba(255,255,255,.48); }
.sidebar-foot { position: absolute; right: 16px; bottom: 20px; left: 16px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-user { margin-bottom: 10px; font-size: 13px; }
.sidebar-user span { display: block; margin-top: 3px; color: rgba(255,255,255,.56); font-size: 11px; }
.sidebar-actions { display: flex; gap: 7px; }
.side-button { flex: 1; padding: 8px 9px; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; color: #fff; background: rgba(255,255,255,.08); font-size: 12px; }
.main { min-width: 0; padding: 28px clamp(18px,3vw,42px) 40px; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.topbar h1 { margin: 0 0 7px; font-size: 27px; }
.topbar p { margin: 0; color: var(--muted); font-size: 13px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 8px 24px rgba(28,67,72,.055); }
.toolbar { display: flex; gap: 10px; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.search { width: min(420px,100%); display: flex; }
.search input { min-width: 0; flex: 1; padding: 10px 12px; border: 1px solid #ccdadd; border-radius: 10px 0 0 10px; outline: none; }
.search input:focus { border-color: var(--teal-2); box-shadow: 0 0 0 3px rgba(47,143,131,.12); }
.search button { padding: 10px 16px; border: 0; border-radius: 0 10px 10px 0; color: #fff; background: var(--teal); font-weight: 700; }
.spacer { flex: 1; }
.button { min-height: 40px; padding: 9px 15px; border: 0; border-radius: 10px; font-weight: 700; }
.button-primary { color: #fff; background: linear-gradient(135deg,var(--teal),var(--teal-2)); }
.button-plain { color: var(--teal); background: #eaf4f3; }
.button-danger { color: var(--danger); background: #fff0ee; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 15px; border-bottom: 1px solid #edf2f3; text-align: left; vertical-align: top; font-size: 13px; }
th { color: #5f757a; background: #f8fbfb; white-space: nowrap; font-size: 12px; }
td { line-height: 1.55; }
.feedback-text { min-width: 300px; max-width: 580px; white-space: pre-wrap; word-break: break-word; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #e8f7ef; color: var(--success); font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge.disabled { color: #6a7376; background: #edf0f1; }
.badge.admin { color: #80520b; background: #fff6df; }
.row-actions { display: flex; gap: 6px; white-space: nowrap; }
.link-button { padding: 0; border: 0; color: var(--teal); background: transparent; font-size: 12px; font-weight: 700; }
.link-button.danger { color: var(--danger); }
.audio-link { color: var(--teal); font-size: 12px; font-weight: 700; text-decoration: none; }
.empty { padding: 54px 20px; color: var(--muted); text-align: center; }
.state { margin: 12px 0; padding: 11px 13px; border-radius: 11px; color: #375b62; background: #eaf4f3; font-size: 13px; }
.state.error { color: #86271f; background: #fff0ee; }
.pagination { display: flex; justify-content: flex-end; gap: 9px; align-items: center; padding: 14px 16px; }
.pagination button { padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.pagination span { color: var(--muted); font-size: 12px; }
dialog { width: min(480px,calc(100% - 28px)); padding: 0; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 22px 70px rgba(12,50,56,.25); }
dialog::backdrop { background: rgba(9,34,39,.48); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 19px; }
.dialog-close { width: 34px; height: 34px; border: 0; border-radius: 9px; color: var(--muted); background: #eef3f3; font-size: 20px; }
.dialog-body { padding: 19px 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; color: #425d63; font-size: 13px; font-weight: 700; }
.field input, .field select { width: 100%; padding: 10px 11px; border: 1px solid #ccdadd; border-radius: 9px; outline: none; }
.field input:focus, .field select:focus { border-color: var(--teal-2); box-shadow: 0 0 0 3px rgba(47,143,131,.12); }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.check-field { display: flex; gap: 8px; align-items: center; margin: 15px 0; font-size: 13px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 20%,#e1f2ef,transparent 35%),linear-gradient(135deg,#f7fbfa,#e8f1f2); }
.login-card { width: min(420px,100%); padding: 32px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 24px 70px rgba(28,67,72,.12); }
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand .brand-mark { margin: 0 auto 12px; }
.login-brand h1 { margin: 0 0 7px; font-size: 25px; }
.login-brand p { margin: 0; color: var(--muted); font-size: 13px; }
.login-submit { width: 100%; margin-top: 5px; }
.login-note { margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }

@media (max-width: 760px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 14px; }
  .brand { padding-bottom: 10px; }
  .nav-label, .muted-link { display: none; }
  .sidebar nav { display: flex; gap: 5px; }
  .nav-link { flex: 1; justify-content: center; padding: 9px; }
  .sidebar-foot { position: static; display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 9px; padding-top: 9px; }
  .sidebar-user { margin: 0; }
  .main { padding: 20px 12px 30px; }
  .topbar { align-items: center; }
  .topbar h1 { font-size: 23px; }
  .toolbar { flex-wrap: wrap; }
  .search { width: 100%; }
}
