@charset "UTF-8";
/* ==========================================================================
   星耀体育中心 · 场馆运营管理系统 — 基础样式层
   设计基调：深墨绿侧栏 + 雾白画布 + 青绿品牌色 + 琥珀数据强调
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC",
    "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5,p,figure,ul,ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- tokens */
:root {
  --ink-900:#0A1113; --ink-850:#0E171A; --ink-800:#13211F; --ink-700:#1B2C2A; --ink-600:#253A37;
  --bg:#F1F4F3;
  --surface:#FFFFFF;
  --surface-2:#F7FAFA;
  --surface-3:#EEF3F2;
  --line:#E1E8E6;
  --line-soft:#EBF1EF;
  --line-strong:#CBD7D4;
  --text:#14201E;
  --text-2:#556764;
  --text-3:#879895;
  --text-4:#A9B7B4;
  --on-ink:#E6F0EE;
  --on-ink-2:#93A9A5;

  --brand:#0E7C7B;
  --brand-700:#0A6362;
  --brand-600:#0C6F6E;
  --brand-300:#63B4B1;
  --brand-100:#CFE7E5;
  --brand-50:#E8F4F3;

  --accent:#E07C2E;
  --accent-50:#FBF0E4;
  --accent-100:#F6DCC3;

  --ok:#2B8F55; --ok-50:#E6F4EC; --ok-100:#C8E7D6;
  --warn:#B98213; --warn-50:#FAF0DC; --warn-100:#F0DFB8;
  --danger:#CC4239; --danger-50:#FBEAE8; --danger-100:#F2CFCB;
  --info:#2A67C4; --info-50:#EAF1FC; --info-100:#C9DCF7;
  --violet:#6B4FBB; --violet-50:#F0ECFA; --violet-100:#DCD2F4;
  --pink:#C0487E; --pink-50:#FBEAF2;

  --r-xs:6px; --r-sm:8px; --r:12px; --r-lg:16px; --r-xl:22px; --r-pill:999px;

  --sh-xs:0 1px 1px rgba(14,32,30,.04);
  --sh-1:0 1px 2px rgba(14,32,30,.05), 0 1px 3px rgba(14,32,30,.04);
  --sh-2:0 2px 4px rgba(14,32,30,.04), 0 10px 26px rgba(14,32,30,.08);
  --sh-3:0 6px 16px rgba(14,32,30,.08), 0 28px 60px rgba(14,32,30,.16);
  --sh-pop:0 12px 32px rgba(14,32,30,.14), 0 2px 8px rgba(14,32,30,.08);

  --sidebar-w:246px;
  --sidebar-w-collapsed:70px;
  --topbar-h:60px;

  --fs-11:11px; --fs-12:12px; --fs-13:13px; --fs-14:14px; --fs-16:16px;
  --fs-18:18px; --fs-22:22px; --fs-28:28px; --fs-34:34px;
  --z-drawer:60; --z-modal:80; --z-toast:120; --z-palette:140;
}

/* ------------------------------------------------------------- app shell */
.app { display: flex; height: 100vh; overflow: hidden; background: var(--bg); }

/* --------------------------------------------------------------- sidebar */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, var(--ink-850) 0%, var(--ink-900) 100%);
  color: var(--on-ink);
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.05);
  position: relative; z-index: 20;
  transition: width .22s cubic-bezier(.4,0,.2,1), flex-basis .22s cubic-bezier(.4,0,.2,1);
}
.app.collapsed .sidebar { width: var(--sidebar-w-collapsed); flex-basis: var(--sidebar-w-collapsed); }

.brand {
  height: var(--topbar-h); display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.06); flex: 0 0 auto;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 32px;
  background: linear-gradient(135deg, var(--brand-300), var(--brand) 55%, #0A5E5D);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 3px 10px rgba(14,124,123,.45), inset 0 1px 0 rgba(255,255,255,.28);
}
.brand-txt { min-width: 0; overflow: hidden; }
.brand-name { font-size: 14px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
.brand-sub { font-size: 10.5px; color: var(--on-ink-2); white-space: nowrap; letter-spacing: .4px; }
.app.collapsed .brand-txt { display: none; }
.app.collapsed .brand { padding: 0 19px; }

.nav { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 12px 10px 16px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }
.nav-group + .nav-group { margin-top: 4px; }
.nav-label {
  font-size: 10.5px; letter-spacing: 1.2px; color: #617775; text-transform: uppercase;
  padding: 14px 10px 6px; font-weight: 600;
}
.app.collapsed .nav-label { text-align: center; padding: 12px 0 5px; font-size: 9px; letter-spacing: 0; }
.app.collapsed .nav-label span { display: none; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: var(--r-sm); color: #A9BEBA;
  font-size: 13.5px; position: relative; margin-bottom: 1px;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #E6F0EE; }
.nav-item.active { background: rgba(14,124,123,.22); color: #fff; font-weight: 600; }
.nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--brand-300);
}
.nav-item .ic { flex: 0 0 18px; opacity: .85; }
.nav-item.active .ic { opacity: 1; color: var(--brand-300); }
.nav-item .lbl { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app.collapsed .nav-item { justify-content: center; padding: 9px 0; }
.app.collapsed .nav-item .lbl, .app.collapsed .nav-item .pill { display: none; }
.nav-pill {
  font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill);
  background: var(--danger); color: #fff; min-width: 18px; text-align: center;
}
.nav-pill.soft { background: rgba(255,255,255,.12); color: #C6D8D5; }

.side-foot { flex: 0 0 auto; border-top: 1px solid rgba(255,255,255,.06); padding: 10px; }
.side-user {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm);
  cursor: pointer; transition: background .15s;
}
.side-user:hover { background: rgba(255,255,255,.06); }
.side-user .meta { min-width: 0; flex: 1 1 auto; }
.side-user .nm { font-size: 13px; font-weight: 600; color: #E6F0EE; white-space: nowrap; }
.side-user .rl { font-size: 11px; color: var(--on-ink-2); white-space: nowrap; }
.app.collapsed .side-user .meta, .app.collapsed .side-user .chev { display: none; }
.app.collapsed .side-user { justify-content: center; padding: 7px 0; }

/* ---------------------------------------------------------------- main */
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); flex: 0 0 var(--topbar-h);
  background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px;
  padding: 0 22px; position: sticky; top: 0; z-index: 30;
}
.crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); }
.crumb b { color: var(--text); font-weight: 600; font-size: 13.5px; }
.crumb .sep { color: var(--line-strong); }
.spacer { flex: 1 1 auto; }

.searchbox {
  position: relative; width: 268px; height: 34px;
  display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: var(--surface-3); border: 1px solid transparent; border-radius: var(--r-sm);
  transition: all .16s; cursor: pointer; color: var(--text-3);
}
.searchbox:hover { background: #E6EDEB; }
.searchbox input {
  border: none; background: none; outline: none; width: 100%; font-size: 13px; color: var(--text);
}
.searchbox input::placeholder { color: var(--text-4); }
.kbd {
  font-size: 10.5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 5px; color: var(--text-3); background: var(--surface); white-space: nowrap;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center;
  color: var(--text-2); position: relative; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .dot {
  position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); border: 1.5px solid #fff;
}
.topbar-divider { width: 1px; height: 24px; background: var(--line); }
.topbar-user { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px; border-radius: var(--r-pill); cursor: pointer; }
.topbar-user:hover { background: var(--surface-3); }
.topbar-user .nm { font-size: 13px; font-weight: 600; }

.page { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 20px 22px 48px; scroll-behavior: smooth; }
.page-inner { max-width: 1660px; margin: 0 auto; }

/* ------------------------------------------------------------ typography */
.h1 { font-size: var(--fs-22); font-weight: 700; letter-spacing: -.2px; }
.h2 { font-size: var(--fs-16); font-weight: 650; letter-spacing: -.1px; }
.h3 { font-size: var(--fs-14); font-weight: 650; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.tiny { font-size: var(--fs-11); }
.small { font-size: var(--fs-12); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace; }
.eyebrow { font-size: var(--fs-11); letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.strong { font-weight: 650; }
.up { color: var(--ok); } .down { color: var(--danger); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* ------------------------------------------------------------ page header */
.page-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.page-head .txt { min-width: 0; }
.page-head h1 { display: flex; align-items: center; gap: 10px; }
.page-head .sub { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.page-head .actions { display: flex; align-items: center; gap: 9px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--r-sm); font-size: 13px; font-weight: 550;
  border: 1px solid transparent; white-space: nowrap; transition: all .15s;
  user-select: none;
}
.btn:active { transform: translateY(.5px); }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(10,80,79,.28); }
.btn.primary:hover { background: var(--brand-700); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { filter: brightness(.94); }
.btn.default { background: var(--surface); border-color: var(--line-strong); color: var(--text); box-shadow: var(--sh-xs); }
.btn.default:hover { border-color: var(--text-4); background: var(--surface-2); }
.btn.ghost { color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { filter: brightness(.94); }
.btn.danger-ghost { color: var(--danger); background: var(--danger-50); }
.btn.danger-ghost:hover { background: var(--danger-100); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: var(--r-xs); }
.btn.lg { height: 40px; padding: 0 18px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------------ forms */
.field { display: block; margin-bottom: 14px; }
.field > label, .flabel {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px;
}
.field .hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.field .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 11px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface); font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s; outline: none; color: var(--text);
}
.textarea { height: auto; padding: 9px 11px; resize: vertical; min-height: 76px; line-height: 1.6; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-4); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:disabled, .select:disabled { background: var(--surface-3); color: var(--text-3); cursor: not-allowed; }
.select {
  appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23879895' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input.sm, .select.sm { height: 30px; font-size: 12.5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 0 14px; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track {
  width: 38px; height: 22px; border-radius: var(--r-pill); background: #CDD7D5; position: relative;
  transition: background .18s; flex: 0 0 38px;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s;
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch .sw-label { font-size: 13px; }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.check input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

.segmented {
  display: inline-flex; background: var(--surface-3); border-radius: var(--r-sm); padding: 3px; gap: 2px;
  border: 1px solid var(--line-soft);
}
.segmented button {
  padding: 5px 12px; border-radius: var(--r-xs); font-size: 12.5px; color: var(--text-2);
  transition: all .15s; white-space: nowrap; font-weight: 500;
}
.segmented button:hover { color: var(--text); }
.segmented button.on { background: var(--surface); color: var(--brand-700); font-weight: 650; box-shadow: var(--sh-xs); }

/* ----------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px;
  border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); border: 1px solid transparent;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-50); color: var(--ok); }
.badge.warn { background: var(--warn-50); color: var(--warn); }
.badge.danger { background: var(--danger-50); color: var(--danger); }
.badge.info { background: var(--info-50); color: var(--info); }
.badge.brand { background: var(--brand-50); color: var(--brand-700); }
.badge.accent { background: var(--accent-50); color: var(--accent); }
.badge.violet { background: var(--violet-50); color: var(--violet); }
.badge.pink { background: var(--pink-50); color: var(--pink); }
.badge.gray { background: var(--surface-3); color: var(--text-2); }
.badge.line { background: transparent; border-color: currentColor; }

.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--r-xs);
  font-size: 11px; font-weight: 500; background: var(--surface-3); color: var(--text-2);
}
.tag.brand { background: var(--brand-50); color: var(--brand-700); }
.tag.accent { background: var(--accent-50); color: var(--accent); }
.tag.violet { background: var(--violet-50); color: var(--violet); }
.tag.pink { background: var(--pink-50); color: var(--pink); }
.tag.line { background: transparent; border: 1px dashed var(--line-strong); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 650; color: #fff; flex: 0 0 32px; letter-spacing: .3px;
  background: var(--brand); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}
.avatar.sq { border-radius: 9px; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; flex-basis: 52px; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; flex-basis: 26px; }
.avatar.xl { width: 68px; height: 68px; font-size: 23px; flex-basis: 68px; border-radius: 20px; }

/* ----------------------------------------------------------------- cards */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); overflow: hidden;
}
.card.pad { padding: 18px; }
.card-hd {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft); min-height: 52px;
}
.card-hd .h { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-hd .sub { font-size: 12px; color: var(--text-3); font-weight: 400; }
.card-hd .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-bd { padding: 18px; }
.card-bd.tight { padding: 0; }
.card-ft { padding: 12px 18px; border-top: 1px solid var(--line-soft); background: var(--surface-2); }

.grid { display: grid; gap: 16px; }
.row { display: flex; gap: 16px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 16px; }

/* ------------------------------------------------------------------ table */
.tbl-wrap { overflow: auto; }
.tbl { font-size: 13px; min-width: 100%; }
.tbl thead th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2);
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-3);
  letter-spacing: .4px; padding: 10px 14px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.tbl thead th.sortable { cursor: pointer; user-select: none; }
.tbl thead th.sortable:hover { color: var(--text); }
.tbl tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.sel { background: var(--brand-50); }
.tbl .col-act { width: 1%; white-space: nowrap; text-align: right; }
.tbl .num-cell { font-variant-numeric: tabular-nums; }
.tbl .id-cell { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--text-2); }
.tbl-compact tbody td { padding: 8px 12px; }
.tbl-compact thead th { padding: 8px 12px; }

.pager {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--text-2);
}
.pager .pages { display: flex; gap: 4px; margin-left: auto; }
.pager .pg {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: var(--r-xs);
  display: grid; place-items: center; font-size: 12.5px; color: var(--text-2); border: 1px solid transparent;
}
.pager .pg:hover { background: var(--surface-3); }
.pager .pg.on { background: var(--brand); color: #fff; font-weight: 600; }
.pager .pg[disabled] { opacity: .35; pointer-events: none; }

/* ------------------------------------------------------------------ misc */
.divider { height: 1px; background: var(--line-soft); margin: 14px 0; }
.empty { padding: 46px 20px; text-align: center; color: var(--text-3); }
.empty .ic { margin: 0 auto 12px; width: 44px; height: 44px; border-radius: 14px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-4); }
.empty .t { font-size: 14px; color: var(--text-2); font-weight: 600; margin-bottom: 4px; }
.empty .d { font-size: 12.5px; max-width: 320px; margin: 0 auto 14px; }
.skel { background: linear-gradient(90deg, #EDF2F1 25%, #F5F8F7 50%, #EDF2F1 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* 只做位移淡入，不改变不透明度，避免在低性能/后台标签页下出现内容发虚 */
.fade-in { animation: fadeIn .26s cubic-bezier(.4,0,.2,1); }
@keyframes fadeIn { from { transform: translateY(8px); } to { transform: none; } }
.pop-in { animation: popIn .2s cubic-bezier(.2,1.2,.4,1); }
@keyframes popIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

@media (max-width: 1180px) {
  .page { padding: 16px 16px 40px; }
  .topbar { padding: 0 16px; }
  .searchbox { width: 200px; }
}
