/* ============================================================
   白玉兰 · Grand Concierge 设计系统 v2
   ------------------------------------------------------------
   Direction : Quiet-Luxury Operations
              深墨蓝侧栏锚定 + 暖象牙纸面 + 香槟金点睛
   Type      : Playfair Display / Noto Serif SC (Display)
               Inter / Noto Sans SC (UI)
   Structure : 固定侧栏 + 顶栏 + 纸面内容区
   ============================================================ */

:root {
  /* ---- Ink scale ---- */
  --ink-900: #0b1322;      /* 侧栏 / 最深底 */
  --ink-850: #0e1830;
  --ink-800: #16213a;
  --ink-700: #26324a;      /* 次级标题 */
  --ink-600: #3d4759;
  --ink-500: #5b6678;      /* 正文辅助 */
  --ink-400: #8a93a3;
  --ink-300: #b6bdc8;
  --ink-200: #d4d9e0;
  --ink-100: #eef0f3;

  /* ---- Champagne gold ---- */
  --gold-700: #9a7a33;
  --gold-600: #b08d3f;
  --gold-500: #c6a15b;
  --gold-300: #e3cfa2;
  --gold-200: #efe2c6;
  --gold-100: #f3ead8;
  --gold-50:  #faf5ea;

  /* ---- Paper & surface ---- */
  --cream:  #f6f3ec;       /* 暖象牙纸面 */
  --cream-2: #f1ece1;
  --cream-3: #eae3d4;
  --surface: #ffffff;
  --line:   #e7e0d1;
  --line-soft: #f0ebe0;

  /* ---- Semantic status ---- */
  --ok:      #3e7c5b;   --ok-bg:   #e9f3ec;   --ok-line: #cfe5d6;
  --warn:    #a4772f;   --warn-bg: #faf3e2;   --warn-line: #ecd9ac;
  --danger:  #b04a3a;   --danger-bg:#f9ece8;  --danger-line:#ecd0c7;
  --info:    #3f6f8c;   --info-bg: #e8f0f5;   --info-line: #cddce8;
  --violet:  #5b5d8f;   --violet-bg:#efeff6;  --violet-line:#dcdcea;

  --muted: var(--ink-500);

  /* ---- Type ---- */
  --font-serif: "Playfair Display", "Noto Serif SC", Georgia, "Songti SC", serif;
  --font-sans:  "Inter", "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;

  /* ---- Shape / elevation ---- */
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 50, .04), 0 1px 4px rgba(20, 30, 50, .05);
  --shadow-md: 0 6px 24px -10px rgba(20, 30, 50, .16), 0 2px 8px rgba(20, 30, 50, .05);
  --shadow-lg: 0 24px 60px -18px rgba(11, 19, 34, .32);
  --shadow-gold: 0 6px 16px -6px rgba(176, 141, 63, .5);

  /* ---- Layout ---- */
  --side-w: 246px;
  --topbar-h: 58px;
}

/* ============================================================
   Reset & base
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

[x-cloak] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink-700);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(198, 161, 91, .28); color: var(--ink-900); }

* { scrollbar-width: thin; scrollbar-color: #d8d0bd transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d8d0bd; border-radius: 999px; border: 2px solid var(--cream); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-500); }

a { color: var(--gold-700); text-decoration: none; }
a:hover { color: var(--gold-600); }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; letter-spacing: .01em; color: var(--ink-900); }

input, select, textarea, button { font-family: inherit; }

button, [role="button"], a.btn, a.menu-item { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============================================================
   App shell : sidebar + main column
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.side {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
  width: var(--side-w); display: flex; flex-direction: column;
  background:
    radial-gradient(560px 300px at -20% -8%, rgba(198,161,91,.13), transparent 60%),
    radial-gradient(400px 500px at 120% 108%, rgba(38,58,102,.35), transparent 60%),
    linear-gradient(178deg, #0d1728 0%, #0b1322 52%, #0a101d 100%);
  border-right: 1px solid rgba(198,161,91,.14);
  transition: transform .28s cubic-bezier(.22,.68,.36,1);
}
.side__brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 22px 18px; flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 4px 14px -4px rgba(198,161,91,.55), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .2s ease;
}
.side__brand:hover .brand__mark { transform: translateY(-1px); }
.brand__name {
  color: #fdfaf3; font-family: var(--font-serif); font-size: 19px;
  letter-spacing: .08em; line-height: 1.2;
}
.brand__tag {
  color: rgba(198,161,91,.8); font-size: 9px; letter-spacing: .3em;
  text-transform: uppercase; margin-top: 2px;
}

.side__nav {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 14px 14px 18px;
  scrollbar-width: thin; scrollbar-color: rgba(198,161,91,.25) transparent;
}
.side__nav::-webkit-scrollbar { width: 5px; }
.side__nav::-webkit-scrollbar-thumb { background: rgba(198,161,91,.25); border: none; }
.side__nav::-webkit-scrollbar-track { background: transparent; }

.menu-group { margin-top: 18px; }
.menu-group:first-child { margin-top: 4px; }
.menu-group__label {
  display: flex; align-items: center; gap: 10px;
  padding: 0 10px 8px; color: rgba(235,231,220,.34);
  font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  white-space: nowrap;
}
.menu-group__label::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(235,231,220,.14), transparent);
}

.menu-item {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; margin-bottom: 2px; border-radius: 9px;
  color: rgba(240,237,229,.66); font-size: 13.5px; font-weight: 500;
  white-space: nowrap; transition: color .16s ease, background .16s ease;
}
.menu-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.menu-item svg {
  width: 17px; height: 17px; flex-shrink: 0; opacity: .8;
  transition: opacity .16s ease, color .16s ease;
}
.menu-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(198,161,91,.22), rgba(198,161,91,.07));
  box-shadow: inset 0 0 0 1px rgba(198,161,91,.28);
}
.menu-item.active svg { color: var(--gold-500); opacity: 1; }
.menu-item.active::before {
  content: ""; position: absolute; left: -14px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-700));
}

/* Sidebar foot : user card */
.side__foot {
  flex-shrink: 0; padding: 14px 16px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
}
.side-user { display: flex; align-items: center; gap: 11px; }
.side-user__avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #22314f, #131d33);
  border: 1px solid rgba(198,161,91,.5);
  display: grid; place-items: center;
  color: var(--gold-300); font-size: 14px; font-weight: 600;
}
.side-user__name {
  color: #fdfaf3; font-size: 13.5px; font-weight: 600; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px;
}
.side-user__role {
  color: rgba(198,161,91,.85); font-size: 11px; letter-spacing: .04em;
}
.side-user__exit {
  display: flex; align-items: center; gap: 6px; margin-top: 12px; width: 100%;
  background: transparent; color: rgba(240,237,229,.6);
  border: 1px solid rgba(198,161,91,.32); border-radius: 9px;
  padding: 8px 12px; font-size: 12.5px; cursor: pointer;
  transition: all .18s ease; justify-content: center;
}
.side-user__exit:hover { color: #fff; background: rgba(198,161,91,.14); border-color: rgba(198,161,91,.55); }
.side-user__exit svg { width: 14px; height: 14px; }

/* Mobile backdrop */
.side-mask {
  position: fixed; inset: 0; z-index: 55; background: rgba(8,13,24,.5);
  backdrop-filter: blur(2px); opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
body.side-open .side-mask { opacity: 1; pointer-events: auto; }

/* ---------- Main column ---------- */
.side-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  margin-left: var(--side-w);
}

/* ---------- Topbar ---------- */
/* 顶栏仅保留移动端汉堡按钮（桌面端隐藏以省出顶部空间） */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px;
  background: rgba(250,248,243,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
@media (min-width: 901px) {
  .topbar { display: none; }
}
.burger {
  display: none; width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-600); place-items: center; cursor: pointer; flex-shrink: 0;
}
.burger svg { width: 18px; height: 18px; }
.ctx-chip {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px 6px 10px;
  font-size: 13px; color: var(--ink-700); font-weight: 600;
  box-shadow: var(--shadow-sm); min-width: 0; max-width: 60vw;
}
.ctx-chip .dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  box-shadow: 0 0 0 3px var(--gold-100);
}
.ctx-chip .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__spacer { flex: 1; }
.date-chip {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-500); font-size: 12.5px; letter-spacing: .02em;
  white-space: nowrap;
}
.date-chip .d { color: var(--ink-800); font-weight: 600; }
.date-chip .sep { width: 1px; height: 12px; background: var(--line); }

/* ---------- Content area ---------- */
.app-main {
  flex: 1; width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 32px 60px;
  animation: pageIn .4s cubic-bezier(.22,.68,.36,1) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.app-main.narrow { max-width: 760px; }
.app-main.small  { max-width: 620px; }
.app-main.wide   { max-width: 1560px; }

/* Page heading */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.page-head > div:first-child {
  display: flex; align-items: baseline; flex-wrap: wrap; min-width: 0;
}
.page-title {
  font-size: 22px; line-height: 1.2; position: relative;
  padding-bottom: 8px; letter-spacing: .01em;
}
.page-title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 34px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-300));
}
.page-sub {
  color: var(--ink-400); font-size: 12.5px; letter-spacing: .02em;
  margin: 0 0 4px 14px; padding-left: 14px;
  border-left: 1px solid var(--line);
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card--pad { padding: 24px; }
.card--pad-lg { padding: 28px; }
.card__head {
  padding: 16px 22px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.card__title {
  font-family: var(--font-serif); font-size: 16.5px; color: var(--ink-900);
  display: inline-flex; align-items: center; gap: 9px;
}
.card__title::before {
  content: ""; width: 3.5px; height: 16px; border-radius: 3px;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-700));
}
.card__body { padding: 18px 22px; }
.card__body--flush { padding: 0; }
.card-body { padding: 18px 22px; }
.card + .card, .grid > .card { margin-top: 0; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 20px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold-300); }
.stat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-300));
  opacity: .9;
}
.stat__label { color: var(--ink-500); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.stat__label .ico {
  width: 25px; height: 25px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-100); color: var(--gold-700);
}
.stat__label .ico svg { width: 13px; height: 13px; }
/* 大数字用无衬线 + 等高等宽数字，避免花体字 3/5/7/9 高低不一导致看花眼 */
.stat__value {
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink-900);
  margin-top: 8px;
  line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.stat__value.accent-gold { color: var(--gold-600); }
.stat__value.accent-ok    { color: var(--ok); }
.stat__value.accent-warn  { color: var(--warn); }
.stat__value.accent-danger{ color: var(--danger); }
.stat__value.accent-info  { color: var(--info); }

/* 独立方形图标位（快捷入口等） */
.ico-sq {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-100); color: var(--gold-700);
}
.ico-sq svg { width: 16px; height: 16px; }

/* 快捷入口卡片行 */
.quick-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px;
  color: inherit; text-decoration: none; transition: all .16s ease;
}
.quick-row:hover { border-color: var(--gold-500); background: var(--gold-50); transform: translateX(2px); }
.quick-row .arrow { width: 16px; height: 16px; flex-shrink: 0; color: var(--gold-600); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 10px; font-size: 13.5px; font-weight: 600; line-height: 1;
  padding: 11px 18px; cursor: pointer; border: 1px solid transparent;
  transition: all .18s ease; text-decoration: none; white-space: nowrap;
}
.btn svg { flex-shrink: 0; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #fff; box-shadow: var(--shadow-gold);
}
.btn-gold:hover { background: linear-gradient(135deg, var(--gold-600), var(--gold-700)); color: #fff; transform: translateY(-1px); }
.btn-gold:active { transform: translateY(0); }

.btn-dark { background: var(--ink-800); color: #fff; }
.btn-dark:hover { background: var(--ink-900); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-700); }
.btn-ghost:hover { border-color: var(--gold-500); color: var(--gold-700); background: var(--gold-50); }

.btn-outline-gold { background: transparent; border-color: var(--gold-500); color: var(--gold-700); }
.btn-outline-gold:hover { background: var(--gold-100); }

.btn-sm { padding: 8px 13px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }

.btn-ok    { background: var(--ok); color: #fff; }
.btn-ok:hover { filter: brightness(.94); color: #fff; }
.btn-danger{ background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); color: #fff; }
.btn-danger-outline { background: transparent; border-color: var(--danger-line); color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger-bg); color: var(--danger); filter: none; }
.btn-info  { background: var(--info); color: #fff; }
.btn-info:hover { filter: brightness(.94); color: #fff; }
.btn-warn  { background: var(--warn); color: #fff; }
.btn-warn:hover { filter: brightness(.94); color: #fff; }

/* 图标型小按钮 */
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-600);
  border-radius: 8px; padding: 6px 11px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: all .16s ease;
}
.btn-icon:hover { border-color: var(--gold-500); color: var(--gold-700); background: var(--gold-50); }

/* ============================================================
   Forms
   ============================================================ */
.form-label { display: block; font-size: 12.5px; color: var(--ink-600); font-weight: 600; margin-bottom: 7px; }
.form-label .req { color: var(--danger); }

.input, .select, .textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 13px; font-size: 14px; color: var(--ink-800);
  transition: border-color .15s ease, box-shadow .15s ease; outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(198,161,91,.15);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-300); }
.field { margin-bottom: 18px; }
.form-hint { font-size: 12px; color: var(--ink-400); margin-top: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

.form-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline { display: inline; }
.block-label { display: block; }
.text-sm { font-size: 13px; }

.check-line { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-600); cursor: pointer; }
.check-line input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--gold-600); cursor: pointer; }
.checkbox-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; color: var(--ink-600); }
.checkbox-line input[type=checkbox] { accent-color: var(--gold-600); cursor: pointer; width: 15px; height: 15px; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--cream-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--ink-600);
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrap {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.table-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl thead th {
  text-align: left; padding: 12px 18px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  color: var(--ink-400); text-transform: uppercase;
  background: #faf8f2; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl tbody td { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); color: var(--ink-700); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .15s ease; }
.tbl tbody tr:hover { background: var(--gold-50); }
.tbl a.link { color: var(--gold-700); font-weight: 600; }
.tbl a.link:hover { color: var(--gold-600); text-decoration: underline; }

.tbl-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* 单元格内的双行主信息 */
.cell-main { font-weight: 600; color: var(--ink-900); }
.cell-sub { font-size: 12px; color: var(--ink-400); margin-top: 2px; }

/* ============================================================
   Badges / status
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge--plain::before { display: none; }
.badge-ok    { color: var(--ok);    background: var(--ok-bg);    border-color: var(--ok-line); }
.badge-warn  { color: var(--warn);  background: var(--warn-bg);  border-color: var(--warn-line); }
.badge-danger{ color: var(--danger); background: var(--danger-bg);border-color: var(--danger-line); }
.badge-info  { color: var(--info);  background: var(--info-bg);  border-color: var(--info-line); }
.badge-violet{ color: var(--violet); background: var(--violet-bg);border-color: var(--violet-line); }
.badge-neutral{ color: var(--ink-500); background: var(--cream-2); border-color: var(--line); }
.badge-gold  { color: var(--gold-700); background: var(--gold-100); border-color: var(--gold-300); }

/* ============================================================
   Alerts
   ============================================================ */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 18px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.alert-ok    { background: var(--ok-bg);    color: var(--ok);    border-color: var(--ok-line); }
.alert-danger{ background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.alert-warn  { background: var(--warn-bg);  color: var(--warn);  border-color: var(--warn-line); }
.alert-info  { background: var(--info-bg);  color: var(--info);  border-color: var(--info-line); }

/* ============================================================
   Filter / toolbar
   ============================================================ */
.toolbar {
  display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; }
.seg { display: inline-flex; gap: 3px; padding: 4px; background: var(--cream-2); border: 1px solid var(--line-soft); border-radius: 11px; flex-wrap: wrap; }
.seg a, .seg button {
  padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-500);
  background: transparent; border: none; cursor: pointer; transition: all .15s ease;
}
.seg a:hover, .seg button:hover { color: var(--ink-800); }
.seg a.active, .seg button.active {
  background: var(--surface); color: var(--ink-900); box-shadow: var(--shadow-sm);
}

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-500); margin-bottom: 16px; align-items: center; }
.legend .lg { display: inline-flex; align-items: center; gap: 7px; }
.legend .sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--line); }

/* ============================================================
   Misc utilities
   ============================================================ */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-2-fixed { grid-template-columns: 1fr 1fr; }
.muted { color: var(--ink-500); }
.faint { color: var(--ink-400); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95em; }
.mt-1{margin-top:6px}.mt-2{margin-top:12px}.mt-3{margin-top:18px}.mt-4{margin-top:26px}
.mt-5{margin-top:34px}.mt-6{margin-top:44px}
.mb-1{margin-bottom:6px}.mb-2{margin-bottom:12px}.mb-3{margin-bottom:18px}.mb-4{margin-bottom:26px}
.mb-5{margin-bottom:34px}.mb-6{margin-bottom:44px}
.space-y > * + * { margin-top: 18px; }
.flex{display:flex}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}
.justify-between{justify-content:space-between}.gap-2{gap:12px}.gap-3{gap:18px}.gap-4{gap:24px}
.flex-wrap{flex-wrap:wrap}.text-right{text-align:right}.text-center{text-align:center}
.w-full{width:100%}.hidden{display:none}
.divider { height: 1px; background: var(--line-soft); margin: 20px 0; }

/* Order fee ledger */
.ledger {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.ledger__head {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-700);
  background: #fbf9f4;
  border-bottom: 1px solid var(--line-soft);
}
.ledger__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.ledger__row:last-child { border-bottom: none; }
.ledger__k { color: var(--ink-500); }
.ledger__v { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.ledger__v--ok { color: #15803d; }
.ledger__v--warn { color: #b45309; }
.ledger__row--total { background: #fbf9f4; }
.ledger__row--total .ledger__k,
.ledger__row--total .ledger__v {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-700);
}
.ledger__note {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-400);
  font-weight: 400;
}
.order-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 8px;
}
@media (max-width: 860px) {
  .order-grid { grid-template-columns: 1fr; }
}

/* Key-value list */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 28px; }
.kv__item .k { font-size: 12.5px; color: var(--ink-400); letter-spacing: .02em; margin-bottom: 4px; }
.kv__item .v { font-size: 15px; color: var(--ink-800); font-weight: 600; }
.kv__item .v.lg {
  font-size: 22px;
  font-family: var(--font-sans);
  color: var(--gold-700);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

/* ============================================================
   Modal（统一弹框）
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(9,15,27,.52);
  backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center;
  padding: 44px 24px 40px; overflow-y: auto;
  animation: fadeMask .18s ease;
}
@keyframes fadeMask { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; background: var(--surface); border-radius: 18px; width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: modalIn .22s ease;
  border: 1px solid var(--line);
  max-height: calc(100vh - 96px); display: flex; flex-direction: column;
}
/* 顶部香槟金高光条 */
.modal::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-300) 60%, transparent);
  z-index: 1; pointer-events: none;
}
.modal--sm { max-width: 400px; }
.modal--lg { max-width: 660px; }
.modal--xl { max-width: 780px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal__head {
  padding: 18px 22px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  flex-shrink: 0;
}
/* 表单直接作为 modal 子元素时，接续 flex 纵向布局，保证 body 滚动、foot 固定底部 */
.modal > form {
  display: flex; flex-direction: column; flex: 1 1 0%; min-height: 0; overflow: hidden;
}
.modal__head h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.modal__head h3::before { content: ""; width: 4px; height: 16px; border-radius: 3px; background: linear-gradient(180deg, var(--gold-500), var(--gold-700)); }
.modal__sub { padding: 6px 22px 0; font-size: 12.5px; color: var(--ink-500); line-height: 1.7; }
.modal__body { padding: 16px 22px 18px; overflow-y: auto; flex: 1 1 0%; min-height: 0; }
.modal__body .field { margin-bottom: 14px; }
.modal__body .field:last-child { margin-bottom: 0; }
.modal__foot {
  padding: 14px 22px; border-top: 1px solid var(--line-soft); display: flex; gap: 10px;
  justify-content: flex-end; background: linear-gradient(180deg, #fdfbf6, #fbf9f4); flex-shrink: 0;
}
.modal__close {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--ink-400); cursor: pointer; flex-shrink: 0;
  display: grid; place-items: center; transition: all .16s ease;
}
.modal__close:hover { background: var(--cream-2); color: var(--ink-800); transform: rotate(90deg); }
.modal__close:active { transform: rotate(90deg) scale(.94); }

/* ============================================================
   全局对话框系统（Lux Dialog）：确认 / 输入 / 轻提示
   ------------------------------------------------------------
   统一替代浏览器原生 confirm / prompt / alert，与设计系统同源。
   ============================================================ */
#lux-dialogs { position: relative; z-index: 300; }
#lux-dialogs[hidden] { display: none !important; }

.lux-mask { align-items: center; padding: 24px; z-index: 300; }
.lux-dialog { text-align: center; max-width: 404px; border-radius: 20px; }
.lux-dialog .modal__head { justify-content: flex-end; padding: 12px 12px 0; }
.lux-dialog__icon {
  width: 58px; height: 58px; margin: 10px auto 14px; border-radius: 50%;
  display: grid; place-items: center;
  animation: luxIconIn .28s cubic-bezier(.22,.68,.36,1);
}
@keyframes luxIconIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.lux-dialog__icon svg { width: 27px; height: 27px; }
.lux-dialog__title { font-size: 19px; color: var(--ink-900); margin-bottom: 8px; }
.lux-dialog__msg {
  font-size: 14px; color: var(--ink-600); line-height: 1.75; margin: 0 auto;
  max-width: 300px; word-break: break-word;
}
.lux-dialog__detail {
  margin: 14px auto 0; max-width: 300px; padding: 11px 14px; border-radius: 10px;
  background: var(--cream); border: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--ink-600); text-align: left; line-height: 1.7;
}
.lux-dialog__input-wrap { margin: 16px auto 0; max-width: 300px; text-align: left; }
.lux-dialog__input-wrap .input { text-align: left; }
.lux-dialog__err {
  margin-top: 7px; font-size: 12.5px; color: var(--danger); line-height: 1.5;
  display: flex; align-items: flex-start; gap: 6px;
}
.lux-dialog .modal__foot {
  justify-content: center; padding: 14px 24px 18px;
  background: transparent; border-top: 1px solid var(--line-soft);
}
.lux-dialog .modal__foot .btn { min-width: 108px; justify-content: center; }

/* 语气（tone）着色 */
.lux-dialog--danger .lux-dialog__icon { background: var(--danger-bg);  color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger-line); }
.lux-dialog--ok     .lux-dialog__icon { background: var(--ok-bg);      color: var(--ok);     box-shadow: inset 0 0 0 1px var(--ok-line); }
.lux-dialog--warn   .lux-dialog__icon { background: var(--warn-bg);    color: var(--warn);   box-shadow: inset 0 0 0 1px var(--warn-line); }
.lux-dialog--info   .lux-dialog__icon { background: var(--info-bg);    color: var(--info);   box-shadow: inset 0 0 0 1px var(--info-line); }
.lux-dialog--gold   .lux-dialog__icon { background: var(--gold-100);   color: var(--gold-700); box-shadow: inset 0 0 0 1px var(--gold-200); }
.lux-dialog--danger .lux-dialog__ok   { background: var(--danger); }
.lux-dialog--ok     .lux-dialog__ok   { background: var(--ok); }
.lux-dialog--warn   .lux-dialog__ok   { background: var(--warn); }
.lux-dialog--info   .lux-dialog__ok   { background: var(--info); }
.lux-dialog--gold   .lux-dialog__ok   { background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); box-shadow: var(--shadow-gold); }
.lux-dialog--danger .lux-dialog__ok:hover,
.lux-dialog--ok     .lux-dialog__ok:hover,
.lux-dialog--warn   .lux-dialog__ok:hover,
.lux-dialog--info   .lux-dialog__ok:hover { filter: brightness(.94); }
.lux-dialog--gold   .lux-dialog__ok:hover { background: linear-gradient(135deg, var(--gold-600), var(--gold-700)); }

/* 轻提示（toast） */
.lux-toast-wrap {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none; width: min(440px, calc(100vw - 32px));
}
.lux-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 11px 16px; font-size: 13.5px; color: var(--ink-700);
  animation: toastIn .25s cubic-bezier(.22,.68,.36,1); cursor: pointer;
}
.lux-toast.leaving { opacity: 0; transform: translateY(-10px); transition: all .22s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.lux-toast__ico {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; color: #fff;
  display: grid; place-items: center;
}
.lux-toast__ico svg { width: 13px; height: 13px; }
.lux-toast--ok     .lux-toast__ico { background: var(--ok); }
.lux-toast--info   .lux-toast__ico { background: var(--info); }
.lux-toast--danger .lux-toast__ico { background: var(--danger); }
.lux-toast--warn   .lux-toast__ico { background: var(--warn); }
.lux-toast--gold   .lux-toast__ico { background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); }

/* ============================================================
   Drawer（平台酒店管理右侧抽屉）
   ============================================================ */
.drawer-mask {
  position: fixed; inset: 0; z-index: 95; background: rgba(9,15,27,.45);
  backdrop-filter: blur(2px); opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 96;
  width: min(480px, 94vw); background: var(--surface);
  box-shadow: -18px 0 50px -20px rgba(11,19,34,.35);
  transform: translateX(105%); transition: transform .3s cubic-bezier(.22,.68,.36,1);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--line);
}
.drawer.open { transform: translateX(0); }
.drawer__head {
  padding: 20px 24px 16px; border-bottom: 1px solid var(--line-soft); flex-shrink: 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.drawer__title { font-family: var(--font-serif); font-size: 19px; color: var(--ink-900); display: flex; align-items: center; gap: 10px; }
.drawer__title::before { content: ""; width: 4px; height: 17px; border-radius: 3px; background: linear-gradient(180deg, var(--gold-500), var(--gold-700)); }
.drawer__sub { font-size: 12.5px; color: var(--ink-500); margin-top: 5px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px 24px 28px; }
.drawer__foot { padding: 14px 24px; border-top: 1px solid var(--line-soft); background: #fbf9f4; flex-shrink: 0; display: flex; gap: 10px; justify-content: flex-end; }

/* 抽屉内的小节 */
.dsection { margin-bottom: 22px; }
.dsection__title {
  font-size: 11.5px; font-weight: 700; color: var(--ink-400);
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.dsection__title::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

/* ============================================================
   Row links & empty states
   ============================================================ */
.tbl-row-link { display: block; }
.tbl-row-link:hover { background: var(--gold-50); }

.empty { text-align: center; padding: 46px 20px; color: var(--ink-400); }
.empty .glyph {
  font-size: 34px; margin-bottom: 10px; opacity: .5;
  display: grid; place-items: center;
}
.empty .glyph svg { width: 40px; height: 40px; }

/* Calendar cells */
.cal-cell { display: block; text-align: center; padding: 10px 4px; transition: opacity .15s ease; min-height: 40px; }
.cal-cell:hover { opacity: .8; }
.cal-avail   { background: var(--ok-bg); color: var(--ok); }
.cal-full    { background: var(--cream-2); color: var(--ink-400); }
.cal-occ     { background: var(--info-bg); color: var(--info); }
.cal-closed  { background: var(--danger-bg); color: var(--danger); }
.cal-th-sticky { position: sticky; left: 0; z-index: 2; }
.cal-weekend { color: var(--danger); font-weight: 600; }

/* ============================================================
   Pagination
   ============================================================ */
.pagination-lux { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.pagination-lux .page-link {
  display: inline-flex; align-items: center; justify-content: center; min-width: 33px; height: 33px;
  padding: 0 10px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-600); font-size: 13px; font-weight: 600;
  transition: all .15s ease; text-decoration: none;
}
.pagination-lux .page-link:hover { border-color: var(--gold-500); color: var(--gold-700); background: var(--gold-50); }
.pagination-lux .page-item.active .page-link {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); border-color: var(--gold-600);
  color: #fff; box-shadow: var(--shadow-gold);
}
.pagination-lux .page-item.disabled .page-link { opacity: .45; pointer-events: none; }
.pagination-lux .page-info { margin-right: auto; font-size: 13px; color: var(--ink-400); }
.pagination-lux .page-item { list-style: none; }
.pagination-lux ul, .pagination-lux ol { list-style: none; display: contents; }

.admin-pager { margin-top: 18px; display: flex; justify-content: center; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .app-main { padding: 20px 22px 44px; }
}
@media (max-width: 900px) {
  .side { transform: translateX(-102%); box-shadow: none; }
  body.side-open .side { transform: translateX(0); box-shadow: 24px 0 60px -20px rgba(8,13,24,.5); }
  .side-main { margin-left: 0; }
  .burger { display: grid; }
  .app-main { padding: 22px 16px 40px; }
  .page-title { font-size: 20px; }
  .grid-2-fixed { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .stat__value { font-size: 26px; }
  .modal-mask { padding: 84px 16px 32px; }
  .modal { max-height: calc(100vh - 116px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
