:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --text: #1f2329;
  --muted: #8a919c;
  --line: #ebedf0;
  --line-strong: #dcdee0;
  --primary: #1a49c0;
  --primary-dark: #143a9e;
  --primary-soft: #eef2fd;
  --danger: #d54851;
  --danger-soft: #fdebec;
  --warning: #c77b1a;
  --warning-soft: #fff4e3;
  --success: #1f9d63;
  --success-soft: #e8f7f0;
  --admin: #253553;
  --admin-dark: #17233c;
  --admin-primary: #356fe3;
  --admin-primary-dark: #2859ba;
  --admin-soft: #edf3ff;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 4px rgba(31, 42, 68, .06);
  --shadow: 0 12px 32px rgba(31, 42, 68, .10);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .5rem; font-size: clamp(1.75rem, 4vw, 2.35rem); line-height: 1.16; letter-spacing: -.035em; }
h2 { margin-bottom: .35rem; font-size: 1.3rem; line-height: 1.3; letter-spacing: -.018em; }
h3 { margin-bottom: .35rem; }
p { color: var(--muted); }
small { color: var(--muted); }

/* Shared navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 72px;
  padding: .7rem max(1rem, calc((100vw - 1180px) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .75rem; min-width: max-content; }
.brand span:last-child { display: grid; }
.brand strong { line-height: 1.2; letter-spacing: -.015em; }
.brand small { margin-top: .08rem; font-size: .7rem; letter-spacing: .025em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 5px 12px rgba(11, 122, 114, .18);
}
.brand-mark.large { width: 54px; height: 54px; border-radius: 15px; font-size: 1.35rem; }
.brand-mark.admin { background: var(--admin-primary); box-shadow: 0 5px 14px rgba(53, 111, 227, .24); }
.main-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.main-nav a { position: relative; padding: .62rem .78rem; border-radius: 9px; color: var(--muted); font-size: .9rem; font-weight: 650; }
.main-nav a:hover { background: var(--surface-soft); color: var(--text); }
.main-nav a.active { background: var(--primary-soft); color: var(--primary-dark); }
.topbar-logout { margin-left: .15rem; }
.user-topbar { min-height: 58px; }
.user-topbar .main-nav { margin: 0 auto; }
.mobile-nav, .admin-mobile-menu { display: none; }

/* Page structure */
.page { width: min(1120px, calc(100% - 2rem)); margin: 1.7rem auto 6rem; }
.wide-page { width: min(1380px, calc(100% - 2rem)); }
section { margin-bottom: 1.25rem; padding: 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.narrow-panel { max-width: 680px; margin-left: auto; margin-right: auto; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; }
.section-head p { margin-bottom: 0; }
.eyebrow { display: block; margin-bottom: .3rem; color: var(--primary); font-size: .7rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.dashboard-columns { display: grid; grid-template-columns: 1.18fr .82fr; gap: 1.25rem; }
.dashboard-columns section { min-width: 0; }
.back-link { display: inline-flex; margin-bottom: 1.2rem; color: var(--primary); font-size: .84rem; font-weight: 750; }
.back-link:hover { color: var(--primary-dark); }
.secondary-page { margin-top: 2.2rem; }

/* User dashboard */
.hero-card { display: flex; align-items: center; justify-content: space-between; }
.user-hero { position: relative; min-height: 240px; padding: 2rem; overflow: hidden; background: #123f3d; border: 0; color: #fff; box-shadow: 0 18px 40px rgba(15, 63, 60, .16); }
.user-hero::after { content: "H"; position: absolute; right: 8%; bottom: -5.2rem; color: rgba(255,255,255,.045); font-size: 18rem; font-weight: 900; line-height: 1; pointer-events: none; }
.user-hero .eyebrow { color: #8cd8ce; }
.user-hero h1 { margin-bottom: .6rem; font-size: clamp(2rem, 5vw, 2.8rem); }
.user-hero p { margin-bottom: 1.4rem; color: #c5ddda; }
.hero-copy { position: relative; z-index: 1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.user-hero .button.primary { background: #fff; color: #14534e; }
.user-hero .button.primary:hover { background: #eef9f7; }
.button.hero-secondary { background: transparent; border-color: rgba(255,255,255,.32); color: #fff; }
.button.hero-secondary:hover { background: rgba(255,255,255,.08); }
.hero-status { position: relative; z-index: 1; display: grid; min-width: 150px; padding: 1.2rem; background: #fff; border-radius: 18px; color: var(--text); text-align: center; box-shadow: 0 12px 28px rgba(3, 35, 33, .18); }
.hero-status strong { color: var(--primary-dark); font-size: 2.4rem; line-height: 1.05; }
.hero-status > span:not(.status-dot) { color: var(--muted); font-size: .8rem; }
.hero-status small { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); font-size: .72rem; }
.status-dot { position: absolute; top: .7rem; right: .7rem; width: 8px; height: 8px; border-radius: 50%; background: #27a873; box-shadow: 0 0 0 4px #e5f7ef; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.stat-card { display: grid; gap: .18rem; padding: 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat-card strong { color: var(--primary-dark); font-size: 1.75rem; line-height: 1.2; }
.stat-card span { color: var(--muted); font-size: .84rem; }
.user-stats .stat-card { display: flex; align-items: center; gap: .9rem; }
.user-stats .stat-card > div { display: grid; }
.stat-icon { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-size: 1.1rem; font-weight: 850; }
.stat-icon.blue { background: #edf4ff; color: #336fd5; }
.stat-icon.amber { background: #fff4de; color: #9d6711; }

/* Controls */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .68rem 1.05rem; border: 1px solid transparent; border-radius: 10px; font-weight: 750; transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.button.primary { background: var(--primary); color: #fff; box-shadow: 0 5px 12px rgba(11, 122, 114, .14); }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { background: var(--primary-soft); border-color: #c8e8e3; color: var(--primary-dark); }
.button.secondary:hover { background: #d9efeb; }
.button.ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.button.ghost:hover { border-color: #a9bab8; }
.button.danger { background: var(--danger-soft); border-color: #efc8cb; color: var(--danger); }
.button.compact { min-height: 36px; padding: .42rem .7rem; font-size: .8rem; }

label { display: grid; gap: .42rem; color: #334547; font-size: .86rem; font-weight: 720; }
input, select, textarea { width: 100%; min-height: 46px; padding: .68rem .78rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #98a6a7; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
select:disabled, input:disabled { background: #eef2f2; color: #829092; }
.stack { display: grid; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-grid .full, .form-actions { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: .75rem; }
.form-help { margin: 1rem 0 0; font-size: .8rem; }
.inline-form, .row-actions, .action-grid { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.top-gap { margin-top: .75rem; }
.mini-input { width: 66px; min-height: 36px; padding: .32rem .42rem; }
.divider { height: 1px; margin: 1.3rem 0; background: var(--line); }

/* Feedback and content */
.notice { margin-bottom: 1rem; padding: .85rem 1rem; border: 1px solid; border-radius: 11px; font-size: .9rem; }
.notice.success { background: var(--success-soft); border-color: #b9e4d2; color: var(--success); }
.notice.error { background: var(--danger-soft); border-color: #efc6c6; color: var(--danger); }
.badge { display: inline-flex; align-items: center; width: max-content; padding: .27rem .6rem; border-radius: 99px; background: #edf1f1; color: var(--muted); font-size: .7rem; font-weight: 820; white-space: nowrap; }
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.muted { background: #edf1f1; color: #687678; }
.item-list { display: grid; gap: .7rem; }
.compact-list { gap: .48rem; }
.item-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem 1rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s ease, background-color .15s ease; }
.item-row:hover { background: #fbfdfc; border-color: var(--line-strong); }
.item-row > div:first-child { display: grid; gap: .2rem; min-width: 0; }
.item-row strong { line-height: 1.35; }
.item-row span:not(.badge) { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.empty-state { padding: 2.2rem 1rem; text-align: center; background: var(--surface-soft); border: 1px dashed var(--line-strong); border-radius: 12px; }
.empty-state h3 { margin-bottom: .3rem; }
.empty-state p { margin-bottom: 1rem; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.admin-split { grid-template-columns: 2fr 1fr; }
.plain-list { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.plain-list li { margin-bottom: .58rem; }

/* Authentication */
.auth-page { display: grid; place-items: center; padding: 1.2rem; background: #edf4f3; }
.auth-shell { width: min(460px, 100%); }
.auth-shell-wide { display: grid; grid-template-columns: minmax(0, 1fr) 460px; width: min(980px, 100%); min-height: 590px; overflow: hidden; background: var(--surface); border: 1px solid #d9e5e3; border-radius: 24px; box-shadow: 0 28px 70px rgba(18, 63, 61, .13); }
.auth-intro { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 3.5rem; overflow: hidden; background: #123f3d; color: #fff; }
.auth-intro::after { content: "H"; position: absolute; right: -2.5rem; bottom: -6.5rem; color: rgba(255,255,255,.045); font-size: 22rem; font-weight: 900; line-height: 1; }
.auth-intro > * { position: relative; z-index: 1; }
.auth-product-mark { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 2.2rem; border: 1px solid rgba(255,255,255,.3); border-radius: 13px; font-weight: 850; }
.auth-intro .eyebrow { color: #8cd8ce; }
.auth-intro h1 { margin-bottom: 1rem; font-size: clamp(2.4rem, 5vw, 3.25rem); }
.auth-intro p { max-width: 430px; color: #c9dfdc; }
.auth-intro ul { display: grid; gap: .7rem; margin: 1rem 0 0; padding: 0; list-style: none; color: #dbeae8; font-size: .88rem; }
.auth-intro li::before { content: "✓"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: .6rem; border-radius: 50%; background: rgba(126, 211, 199, .18); color: #95ded5; font-size: .72rem; font-weight: 900; }
.auth-card { padding: 2.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.auth-shell-wide .auth-card { display: flex; flex-direction: column; justify-content: center; padding: 3rem; border: 0; border-radius: 0; box-shadow: none; }
.auth-brand { display: flex; align-items: center; gap: .95rem; margin-bottom: 1.7rem; }
.auth-brand h1 { margin-bottom: .15rem; font-size: 1.55rem; }
.auth-brand p { margin-bottom: 0; }
.auth-submit { width: 100%; margin-top: .2rem; }
.secure-tip { padding-left: 1.25rem; position: relative; }
.secure-tip::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--success); font-weight: 850; }
.captcha-image { display: block; max-width: 100%; margin: 0 auto 1rem; border: 1px solid var(--line); border-radius: 9px; }

/* Reservation and tables */
.reservation-card { display: flex; justify-content: space-between; gap: 1rem; padding: 1.15rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 13px; }
.reservation-card p { margin-bottom: 0; }
.action-grid { margin-top: 1rem; }
.action-grid form { flex: 1; }
.action-grid .button { width: 100%; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm); scrollbar-color: var(--line-strong) transparent; }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .83rem; }
th, td { padding: .82rem .85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f6f8fa; color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; white-space: nowrap; }
td small { display: block; margin-top: .2rem; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfb; }
code { display: block; padding: .46rem .56rem; border-radius: 8px; background: #edf3f3; color: #173c3e; font-family: ui-monospace, Consolas, monospace; }
.generated-box { margin-top: 1rem; padding: 1rem; background: var(--warning-soft); border: 1px solid #eedca6; border-radius: 12px; }
#generatedCards { display: grid; gap: .4rem; }
.review-card { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm); }
.review-main h2 { margin: .5rem 0 .2rem; }
.review-main p { margin-bottom: .4rem; }
.review-actions { display: grid; gap: .5rem; min-width: 270px; }
.review-actions form { display: flex; gap: .4rem; }

/* My space */
.account-hero { display: flex; align-items: center; gap: 1rem; padding: 1.6rem; }
.account-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 62px; height: 62px; border-radius: 18px; background: var(--primary); color: #fff; font-size: 1.45rem; font-weight: 850; box-shadow: 0 8px 18px rgba(11,122,114,.18); }
.account-identity { min-width: 0; }
.account-identity h1 { margin-bottom: .15rem; font-size: 1.6rem; }
.account-identity p { margin-bottom: 0; }
.account-validity { display: inline-flex; align-items: baseline; gap: .22rem; margin-left: auto; padding: .55rem .8rem; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.account-validity strong { font-size: 1.2rem; }
.settings-panel { padding: 0; overflow: hidden; }
.settings-group-title { padding: 1rem 1.15rem .55rem; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.settings-list { border-top: 1px solid var(--line); }
.settings-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .85rem; width: 100%; min-height: 66px; padding: .75rem 1.1rem; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); color: var(--text); text-align: left; }
.settings-row:last-child { border-bottom: 0; }
.settings-row:hover { background: var(--surface-soft); }
.settings-row > span:nth-child(2) { display: grid; min-width: 0; }
.settings-row strong { font-size: .92rem; }
.settings-row small { margin-top: .05rem; font-size: .75rem; }
.settings-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 1rem; font-weight: 850; }
.settings-icon.blue { background: #edf4ff; color: #336fd5; }
.settings-icon.amber { background: #fff4de; color: #9d6711; }
.settings-icon.violet { background: #f2efff; color: #6c55c7; }
.settings-icon.rose { background: #fff0f2; color: #b7495c; }
.settings-icon.muted { background: #f0f2f3; color: #657477; }
.settings-arrow { color: #9ba7a9; font-size: 1.45rem; font-weight: 400; }
.logout-panel { padding: 0; }
.logout-panel form { margin: 0; }
.logout-row { cursor: pointer; }
.session-summary { display: grid; gap: .25rem; padding: 1rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 11px; }
.session-summary span, .session-summary small { color: var(--muted); font-size: .78rem; }
.history-more { margin-top: .75rem; border-top: 1px solid var(--line); }
.history-more summary { display: flex; align-items: center; justify-content: center; gap: .4rem; padding: .85rem .5rem 0; color: var(--primary); cursor: pointer; font-size: .82rem; font-weight: 750; list-style: none; }
.history-more summary::-webkit-details-marker { display: none; }
.history-more summary span { transition: transform .15s ease; }
.history-more[open] summary { padding-bottom: .8rem; }
.history-more[open] summary span { transform: rotate(180deg); }

/* Admin product theme */
.admin-theme { --bg: #f3f5f9; --surface-soft: #f7f8fb; --line: #e1e5ec; --line-strong: #cbd2de; --text: #172238; --muted: #687388; }
.admin-app-shell { min-height: 100vh; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 45; display: flex; flex-direction: column; width: 248px; padding: 1.25rem .9rem 1rem; overflow-y: auto; background: var(--admin-dark); color: #fff; }
.admin-sidebar-brand { display: flex; align-items: center; gap: .75rem; margin: 0 .45rem 1.7rem; }
.admin-sidebar-brand > span:last-child { display: grid; }
.admin-sidebar-brand strong { line-height: 1.2; }
.admin-sidebar-brand small { margin-top: .08rem; color: #91a0ba; font-size: .68rem; }
.admin-nav-label { margin: 0 .65rem .5rem; color: #73819b; font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.admin-side-nav { display: grid; gap: .28rem; }
.admin-side-nav > a { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: .65rem; min-height: 56px; padding: .55rem .65rem; border: 1px solid transparent; border-radius: 11px; color: #aeb9cc; }
.admin-side-nav > a:hover { background: #202e49; color: #fff; }
.admin-side-nav > a.active { background: #2a3d62; border-color: #3d5685; color: #fff; box-shadow: inset 3px 0 0 #6f9cff; }
.admin-side-nav > a > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #202d47; color: #9ab3df; font-size: 1rem; font-weight: 800; }
.admin-side-nav > a.active > span { background: var(--admin-primary); color: #fff; }
.admin-side-nav > a div { display: grid; min-width: 0; }
.admin-side-nav > a strong { font-size: .85rem; }
.admin-side-nav > a small { color: #7f8da6; font-size: .65rem; }
.admin-side-nav > a.active small { color: #b5c5e2; }
.admin-sidebar-footer { display: grid; gap: .75rem; margin-top: auto; padding-top: 1.3rem; }
.admin-online { display: flex; align-items: center; gap: .65rem; padding: .72rem; background: #202e49; border: 1px solid #2e3d5a; border-radius: 11px; }
.admin-online > span { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #38c68b; box-shadow: 0 0 0 4px rgba(56,198,139,.12); }
.admin-online div { display: grid; }
.admin-online strong { font-size: .74rem; }
.admin-online small { color: #8492aa; font-size: .6rem; }
.admin-sidebar-footer form { margin: 0; }
.admin-sidebar-logout { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .62rem .72rem; background: transparent; border: 1px solid #34425d; border-radius: 9px; color: #aeb9cc; font-size: .75rem; font-weight: 700; }
.admin-sidebar-logout:hover { border-color: #52617b; color: #fff; }
.admin-workspace { min-height: 100vh; margin-left: 248px; }
.admin-content { width: min(1480px, calc(100% - 3rem)); margin: 0 auto; padding: 1.6rem 0 3rem; }
.admin-mobile-topbar { display: none; }
.admin-theme .eyebrow { color: var(--admin-primary); }
.admin-theme .button.primary, .button.admin-primary { background: var(--admin-primary); color: #fff; box-shadow: 0 5px 12px rgba(53,111,227,.16); }
.admin-theme .button.primary:hover, .button.admin-primary:hover { background: var(--admin-primary-dark); }
.admin-theme .button.secondary, .button.admin-secondary { background: var(--admin-soft); border-color: #cfddfa; color: #285bbf; }
.admin-theme input:focus, .admin-theme select:focus, .admin-theme textarea:focus { border-color: var(--admin-primary); box-shadow: 0 0 0 3px var(--admin-soft); }
.admin-theme .stat-card strong { color: var(--admin); }
.admin-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; padding: .3rem .15rem; }
.admin-page-header h1 { margin-bottom: .35rem; }
.admin-page-header p { max-width: 680px; margin-bottom: 0; }
.admin-count, .feature-chip { display: inline-flex; align-items: center; width: max-content; padding: .42rem .68rem; border-radius: 9px; background: var(--admin-soft); color: #315eaf; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.admin-welcome { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.75rem 1.8rem; background: var(--admin); border: 0; color: #fff; box-shadow: 0 15px 34px rgba(23,35,60,.13); }
.admin-welcome .eyebrow { color: #8fb5ff; }
.admin-welcome p { margin-bottom: 0; color: #bbc5d8; }
.admin-welcome-actions { display: flex; gap: .65rem; flex-wrap: wrap; }
.admin-welcome .admin-secondary { background: transparent; border-color: #5b6780; color: #fff; }
.admin-stats { grid-template-columns: repeat(6, 1fr); }
.admin-stats .stat-card { min-width: 0; padding: 1.1rem; border-top: 3px solid #d8e2f6; }
.admin-stats .stat-card > span { order: 0; color: var(--muted); }
.admin-stats .stat-card strong { order: 1; margin: .25rem 0; font-size: 1.9rem; }
.admin-stats .stat-card small { order: 2; font-size: .7rem; }
.admin-stats .stat-card.attention { border-top-color: #e5ae3c; }
.admin-dashboard-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(270px,.65fr); gap: 1.25rem; }
.admin-dashboard-grid > section { min-width: 0; }
.admin-quick-list { display: grid; gap: .55rem; }
.admin-quick-list a { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: .7rem; padding: .72rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
.admin-quick-list a:hover { background: var(--admin-soft); border-color: #cbdafa; }
.admin-quick-list a > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--admin-soft); color: var(--admin-primary); font-weight: 850; }
.admin-quick-list a div { display: grid; }
.admin-quick-list a strong { font-size: .82rem; }
.admin-quick-list a small { font-size: .68rem; }
.admin-quick-list a b { color: #9aa5b6; font-size: 1.2rem; }
.admin-quick-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.admin-card-setup { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.55fr); gap: 1.25rem; }
.admin-card-setup > section { min-width: 0; }
.admin-card-form { display: grid; grid-template-columns: .7fr .8fr minmax(220px,1.5fr) auto; align-items: end; gap: .8rem; }
.admin-card-form label small { font-size: .65rem; font-weight: 450; }
.admin-card-form .button { min-width: 118px; }
.admin-guide-card { background: var(--admin); border: 0; color: #fff; }
.admin-guide-card .eyebrow { color: #8fb5ff; }
.lifecycle-list { display: grid; gap: .8rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.lifecycle-list li { display: flex; align-items: center; gap: .7rem; }
.lifecycle-list li > span { display: grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #304361; color: #9fc0ff; font-size: .7rem; font-weight: 850; }
.lifecycle-list li div { display: grid; }
.lifecycle-list strong { font-size: .8rem; }
.lifecycle-list small { color: #9daac0; font-size: .66rem; }
.admin-table-section { padding: 1.25rem; }
.admin-theme .inline-code { display: inline-block; padding: .3rem .45rem; background: #eef2f8; color: #34435d; white-space: nowrap; }
.admin-theme .row-actions form { display: flex; gap: .35rem; }
.admin-theme .muted-text { color: var(--muted); font-size: .75rem; }
.admin-theme .run-message { max-width: 480px; overflow-wrap: anywhere; }
.admin-table-tools { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 .8rem; }
.admin-table-search { display: flex; align-items: center; gap: .5rem; width: min(420px, 100%); min-height: 42px; padding: 0 .8rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: #9ca6b6; }
.admin-table-search input { min-height: 40px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: .8rem; }
.admin-table-search input:focus { box-shadow: none; }
.admin-table-search > span { font-size: 1.15rem; line-height: 1; }
.admin-table-result { flex: 0 0 auto; color: var(--muted); font-size: .72rem; }
.review-list { display: grid; gap: .8rem; }
.review-main blockquote { margin: .75rem 0; padding: .75rem .9rem; background: var(--surface-soft); border-left: 3px solid #b9c9e8; color: var(--text); font-size: .83rem; }
.change-arrow { color: var(--admin-primary); }
.review-meta { display: flex; gap: .8rem; flex-wrap: wrap; color: var(--muted); font-size: .7rem; }
.admin-auth-page { background: var(--admin-dark); }
.admin-auth-shell { width: min(450px, 100%); }
.admin-auth-shell .auth-card { padding: 2.5rem; border-color: #293650; box-shadow: 0 28px 65px rgba(6,13,28,.3); }
.admin-auth-shell .auth-brand { align-items: flex-start; }
.admin-auth-shell .auth-brand .eyebrow { margin-bottom: .15rem; }

@media (max-width: 1100px) {
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
  .admin-dashboard-grid { grid-template-columns: 1fr; }
  .admin-quick-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .admin-card-setup { grid-template-columns: 1fr; }
  .dashboard-columns { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .main-nav { display: none; }
  .topbar { padding-left: 1rem; padding-right: 1rem; }
  .user-topbar { display: none; }
  .admin-sidebar { display: none; }
  .admin-workspace { margin-left: 0; }
  .admin-mobile-topbar { position: sticky; top: 0; z-index: 45; display: flex; align-items: center; min-height: 68px; padding: .7rem 1rem; background: var(--admin-dark); color: #fff; }
  .admin-mobile-topbar .brand small { color: #99a8c2; }
  .admin-content { width: min(100% - 2rem, 1380px); padding-top: 1rem; }
  .two-column, .admin-split { grid-template-columns: 1fr; }
  .form-grid.three { grid-template-columns: 1fr 1fr; }

  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 50; display: grid; grid-template-columns: repeat(4, 1fr); padding: .32rem .25rem max(.34rem, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(21, 35, 68, .06); }
  .mobile-nav a { position: relative; display: grid; place-items: center; gap: .1rem; min-width: 0; padding: .28rem .15rem; border-radius: 9px; color: #9aa1ab; text-align: center; font-size: .66rem; }
  .mobile-nav a.active { color: var(--primary); font-weight: 750; }
  .nav-icon { display: grid; place-items: center; height: 24px; line-height: 1; }
  .nav-icon svg { display: block; }

  .admin-mobile-menu { position: relative; display: block; margin-left: auto; }
  .admin-mobile-menu summary { display: flex; align-items: center; gap: .5rem; min-height: 40px; padding: .5rem .65rem; border: 1px solid #46536d; border-radius: 9px; color: #fff; cursor: pointer; font-size: .8rem; font-weight: 750; list-style: none; }
  .admin-mobile-menu summary::-webkit-details-marker { display: none; }
  .menu-lines, .menu-lines::before, .menu-lines::after { display: block; width: 17px; height: 2px; border-radius: 2px; background: currentColor; }
  .menu-lines { position: relative; }
  .menu-lines::before, .menu-lines::after { content: ""; position: absolute; left: 0; }
  .menu-lines::before { top: -5px; }
  .menu-lines::after { top: 5px; }
  .admin-mobile-menu[open] .menu-lines { background: transparent; }
  .admin-mobile-menu[open] .menu-lines::before { top: 0; transform: rotate(45deg); }
  .admin-mobile-menu[open] .menu-lines::after { top: 0; transform: rotate(-45deg); }
  .admin-mobile-panel { position: fixed; top: 70px; right: 0; left: 0; padding: .9rem 1rem 1rem; background: var(--admin-dark); border-top: 1px solid #2d3b57; box-shadow: 0 16px 28px rgba(9,17,34,.24); }
  .admin-mobile-panel nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
  .admin-mobile-panel nav a { display: grid; gap: .05rem; min-width: 0; padding: .7rem; background: #202e49; border: 1px solid #34425d; border-radius: 10px; color: #dce3ee; }
  .admin-mobile-panel nav a.active { background: var(--admin-primary); border-color: var(--admin-primary); color: #fff; }
  .admin-mobile-panel nav strong { font-size: .82rem; }
  .admin-mobile-panel nav small { color: #9eacc2; font-size: .65rem; }
  .admin-mobile-panel nav a.active small { color: #dbe6ff; }
  .admin-mobile-panel form { margin-top: .65rem; }
  .button.admin-mobile-logout { width: 100%; min-height: 40px; background: transparent; border-color: #46536d; color: #d7deea; }
}

@media (max-width: 760px) {
  .admin-page-header { align-items: flex-start; }
  .admin-page-header p { font-size: .8rem; }
  .admin-card-form { grid-template-columns: 1fr 1fr; }
  .admin-card-form label:nth-of-type(3) { grid-column: 1 / -1; }
  .admin-card-form .button { grid-column: 1 / -1; width: 100%; }
  .admin-theme .responsive-table { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .admin-theme .responsive-table table, .admin-theme .responsive-table tbody { display: block; background: transparent; }
  .admin-theme .responsive-table thead { display: none; }
  .admin-theme .responsive-table tbody { display: grid; gap: .7rem; }
  .admin-theme .responsive-table tr { display: grid; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
  .admin-theme .responsive-table td { display: grid; grid-template-columns: 92px minmax(0,1fr); align-items: start; gap: .65rem; min-height: 42px; padding: .66rem .75rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
  .admin-theme .responsive-table td:last-child { border-bottom: 0; }
  .admin-theme .responsive-table td::before { content: attr(data-label); color: var(--muted); font-size: .7rem; font-weight: 750; }
  .admin-theme .responsive-table td[data-label="操作"] { display: block; }
  .admin-theme .responsive-table td[data-label="操作"]::before { display: block; margin-bottom: .55rem; }
  .admin-theme .responsive-table .table-empty { display: block; }
  .admin-theme .responsive-table .table-empty td { display: block; text-align: center; }
  .admin-theme .responsive-table .table-empty td::before { display: none; }
  .admin-theme .run-message { max-width: none; }
  .admin-theme .row-actions { align-items: stretch; }
  .admin-theme .row-actions form { flex: 1 1 90px; }
  .admin-theme .row-actions form .button { width: 100%; }
  .admin-theme .admin-card-actions form:first-child { flex-basis: 145px; }
  .review-meta { display: grid; gap: .25rem; }
  .admin-table-tools { align-items: stretch; flex-direction: column; gap: .45rem; }
  .admin-table-search { width: 100%; }
  .admin-table-result { padding-left: .15rem; }
}

@media (max-width: 700px) {
  .auth-page { padding: .75rem; }
  .auth-shell-wide { display: block; min-height: 0; border-radius: 20px; }
  .auth-intro { min-height: 190px; padding: 1.7rem; }
  .auth-product-mark { width: 38px; height: 38px; margin-bottom: 1rem; }
  .auth-intro h1 { margin-bottom: .3rem; font-size: 2rem; }
  .auth-intro h1 br { display: none; }
  .auth-intro p { margin-bottom: 0; font-size: .82rem; }
  .auth-intro ul { display: none; }
  .auth-shell-wide .auth-card { padding: 1.7rem; }
}

@media (max-width: 640px) {
  .page, .wide-page { width: min(100% - 1rem, 1120px); margin-top: .75rem; }
  .user-theme .page { padding-bottom: 1rem; }
  section { padding: 1rem; margin-bottom: .75rem; border-radius: 13px; box-shadow: none; }
  .brand small { display: none; }
  .brand-mark { width: 36px; height: 36px; }
  .topbar { min-height: 64px; }
  .topbar .button.compact { min-height: 34px; }
  .section-head { margin-bottom: .9rem; }
  .section-head h1 { font-size: 1.65rem; }
  .section-head .button.compact { flex: 0 0 auto; }

  .user-hero { min-height: 0; padding: 1.3rem; align-items: flex-start; border-radius: 16px; }
  .user-hero h1 { font-size: 1.8rem; }
  .user-hero p { margin-bottom: 1.1rem; }
  .user-hero .hero-actions { padding-right: 88px; }
  .user-hero .button { min-height: 38px; padding: .5rem .7rem; font-size: .76rem; }
  .user-hero .hero-secondary { display: none; }
  .hero-status { position: absolute; right: 1rem; bottom: 1rem; min-width: 76px; padding: .7rem .5rem; border-radius: 13px; }
  .hero-status strong { font-size: 1.75rem; }
  .hero-status small, .hero-status .status-dot { display: none; }
  .stat-grid, .admin-stats { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .stat-card { padding: .75rem; box-shadow: none; }
  .stat-card strong { font-size: 1.35rem; }
  .user-stats .stat-card { display: grid; gap: .35rem; }
  .stat-icon { width: 32px; height: 32px; border-radius: 9px; font-size: .9rem; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .item-row, .job-row { align-items: flex-start; flex-direction: column; }
  .row-actions { width: 100%; }
  .row-actions form { flex: 1; }
  .row-actions form .button { width: 100%; }
  .review-card { grid-template-columns: 1fr; }
  .review-actions { min-width: 0; }
  .review-actions form { flex-direction: column; }
  .table-wrap { border-radius: 11px; }
  th, td { padding: .7rem; }

  .admin-mobile-topbar { min-height: 64px; }
  .admin-mobile-panel { top: 64px; }
  .admin-content { width: min(100% - 1rem, 1380px); padding-top: .75rem; }
  .admin-page-header { margin-bottom: .8rem; padding: .15rem; }
  .admin-page-header h1 { font-size: 1.65rem; }
  .admin-count { padding: .35rem .5rem; font-size: .65rem; }
  .admin-welcome { align-items: flex-start; flex-direction: column; padding: 1.25rem; }
  .admin-welcome p { font-size: .82rem; }
  .admin-welcome-actions { width: 100%; }
  .admin-welcome-actions .button { flex: 1; min-height: 38px; padding: .5rem .65rem; font-size: .78rem; }
  .admin-stats .stat-card { padding: .72rem; }
  .admin-stats .stat-card strong { font-size: 1.45rem; }
  .admin-stats .stat-card small { display: none; }
  .admin-card-form { grid-template-columns: 1fr; }
  .admin-card-form label:nth-of-type(3), .admin-card-form .button { grid-column: auto; }
  .admin-table-section { padding: .85rem; }
  .admin-guide-card { padding: 1rem; }
  .admin-quick-panel { padding: 1rem; }
  .admin-quick-grid { grid-template-columns: 1fr; }
  .admin-auth-page { padding: 1rem; }
  .admin-auth-shell .auth-card { padding: 1.6rem; }
  .secondary-page { margin-top: .75rem; }
  .account-hero { padding: 1.15rem; }
  .account-avatar { width: 50px; height: 50px; border-radius: 14px; font-size: 1.15rem; }
  .account-identity h1 { font-size: 1.3rem; }
  .account-identity p { font-size: .76rem; }
  .account-validity { padding: .4rem .55rem; }
  .account-validity strong { font-size: 1rem; }
  .settings-row { min-height: 62px; padding: .68rem .85rem; }
}

@media (max-width: 390px) {
  .topbar { gap: .6rem; }
  .brand strong { font-size: .88rem; }
  .topbar-logout .button { padding-left: .55rem; padding-right: .55rem; }
  .admin-mobile-panel nav { gap: .4rem; }
  .admin-mobile-panel nav a { padding: .58rem; }
}

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

/* ===== 河南大学图书馆官方预约系统（zwyy.henu.edu.cn）视觉语言 =====
   主色 #1a49c0 深蓝、白色卡片、圆角胶囊按钮、照片卡片，与官方 H5/PC 端一致。 */
:root {
  --focus-blue: #1a49c0;
  --focus-soft: #eef2fd;
}
body.user-theme { background: var(--bg); }
.topbar { background: #1a49c0; border-bottom: 0; box-shadow: 0 2px 8px rgba(20, 45, 120, .18); }
.topbar-inner { display: flex; align-items: center; gap: 1.25rem; width: min(1180px, 100%); margin: 0 auto; }
.user-topbar { min-height: 64px; padding: .6rem 1rem; }
.portal-brand { min-width: 242px; color: #fff; }
.official-mark { border-radius: 8px; background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); font-family: "Microsoft YaHei", sans-serif; }
.brand-mark.large.official-mark { border-radius: 10px; }
.portal-brand strong { font-size: 1rem; letter-spacing: .05em; }
.portal-brand small { color: rgba(255, 255, 255, .62); letter-spacing: .1em; }
.main-nav { gap: .35rem; }
.main-nav a { border-radius: 8px; color: rgba(255, 255, 255, .82); font-weight: 600; }
.main-nav a.active { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }
.main-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.topbar-meta { display: grid; justify-items: end; gap: .12rem; margin-left: auto; min-width: max-content; }
.topbar-kicker { color: rgba(255, 255, 255, .55); font-size: .68rem; }
.topbar-status { color: rgba(255, 255, 255, .82); font-size: .7rem; font-weight: 700; }
.topbar-status i { display: inline-block; width: 6px; height: 6px; margin-right: .3rem; border-radius: 50%; background: #52e09a; vertical-align: 1px; }
.page { margin-top: 1.4rem; }
body.user-theme section { border: 0; border-radius: var(--radius); box-shadow: 0 1px 3px rgba(31, 42, 68, .05), 0 6px 18px rgba(31, 42, 68, .04); }
.eyebrow { color: var(--primary); letter-spacing: .08em; }
.back-link { color: var(--muted); }
.back-link:hover { color: var(--primary); }

/* 官方端操作按钮均为胶囊形 */
body.user-theme .button, .user-theme .button { border-radius: 999px; font-weight: 650; }
body.user-theme .button.primary { background: var(--primary); box-shadow: 0 4px 12px rgba(26, 73, 192, .22); }
body.user-theme .button.primary:hover { background: var(--primary-dark); }
body.user-theme .button.secondary { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
body.user-theme .button.secondary:hover { background: #e0e8fb; }
body.user-theme .button.ghost { background: #fff; border-color: var(--line-strong); }
body.user-theme .button.ghost:hover { border-color: var(--primary); color: var(--primary); }
body.user-theme .button.danger { background: #fff; border-color: #f3c6c9; color: var(--danger); }
body.user-theme .button.danger:hover { border-color: var(--danger); }
body.user-theme input, body.user-theme select, body.user-theme textarea { border-radius: 8px; border-color: #e5e8ee; }
body.user-theme input:focus, body.user-theme select:focus, body.user-theme textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 73, 192, .12); }
body.user-theme .notice { border-radius: 8px; }
body.user-theme .badge { border-radius: 999px; padding: .26rem .66rem; }
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
body.user-theme .item-row { border-radius: 10px; background: #fff; border: 1px solid var(--line); }
body.user-theme .item-row:hover { border-color: #c9d6f4; background: #fbfcff; }
body.user-theme .empty-state { border-radius: 12px; background: var(--surface-soft); border-color: var(--line); }

/* 首页：官方风格图书馆照片横幅 + 状态卡 */
.user-hero { position: relative; min-height: 232px; padding: 2rem; overflow: hidden; background: #16306e center / cover no-repeat url('/static/official/banner.jpg'); border: 0; border-radius: var(--radius-lg); color: #fff; box-shadow: 0 14px 34px rgba(16, 42, 110, .22); }
.user-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(13, 28, 74, .78) 8%, rgba(20, 45, 120, .45) 55%, rgba(20, 45, 120, .18) 100%); }
.user-hero::after { display: none; }
.user-hero .eyebrow { color: #bcd0ff; }
.user-hero h1 { margin-bottom: .6rem; font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: .01em; }
.user-hero p { margin-bottom: 1.4rem; color: rgba(255, 255, 255, .82); }
body.user-theme .user-hero .button.primary { background: #fff; color: var(--primary); box-shadow: 0 6px 16px rgba(9, 20, 55, .25); }
body.user-theme .user-hero .button.primary:hover { background: #eef2fd; }
.button.hero-secondary { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .45); color: #fff; }
.button.hero-secondary:hover { background: rgba(255, 255, 255, .2); }
.hero-status { position: relative; z-index: 1; display: grid; min-width: 150px; padding: 1.15rem; background: rgba(255, 255, 255, .96); border-radius: 14px; color: var(--text); text-align: center; box-shadow: 0 12px 28px rgba(7, 18, 50, .3); }
.hero-status strong { color: var(--primary); font-size: 2.3rem; line-height: 1.05; }
.hero-status > span:not(.status-dot) { color: var(--muted); font-size: .8rem; }
.hero-status small { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); font-size: .72rem; }
.status-dot { position: absolute; top: .7rem; right: .7rem; width: 8px; height: 8px; border-radius: 50%; background: #27a873; box-shadow: 0 0 0 4px #e5f7ef; }

/* 统计卡与列表（官方预约记录行样式） */
.stat-card { border-radius: var(--radius); }
.stat-card strong { color: var(--primary); }
.stat-icon { border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.stat-icon.blue { background: #e8f3ff; color: #2f7fd6; }
.stat-icon.amber { background: #fff4e3; color: #c77b1a; }
.record-icon { display: grid; flex: 0 0 auto; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 1.05rem; }
.record-icon.run-icon.ok { background: var(--success-soft); color: var(--success); }
.record-icon.run-icon.warn { background: var(--warning-soft); color: var(--warning); }
.record-icon.run-icon.danger { background: var(--danger-soft); color: var(--danger); }
.empty-illustration { display: block; width: 150px; height: auto; margin: 0 auto .9rem; }
.history-more summary { color: var(--primary); }

/* 当前预约：官方「已约座位」卡片样式 */.reservation-card { align-items: flex-start; gap: 1rem; padding: 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 3px rgba(31, 42, 68, .05); }
.reservation-main { display: grid; gap: .3rem; min-width: 0; }
.reservation-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.reservation-title strong { font-size: 1.22rem; letter-spacing: .01em; }
.reservation-main p { margin-bottom: 0; color: var(--muted); font-size: .86rem; }
.reservation-time { color: var(--text); }
.action-grid { margin-top: 1rem; }
.action-grid .button { min-width: 108px; }
.action-grid .button.danger { border-color: #f3c6c9; }
.action-grid .button.danger:hover { border-color: var(--danger); }

@media (max-width: 640px) {
  body.user-theme .user-hero { min-height: 0; padding: 1.3rem; border-radius: 14px; }
  body.user-theme .user-hero h1 { font-size: 1.55rem; }
  body.user-theme .user-hero .hero-actions { padding-right: 0; gap: .55rem; }
  body.user-theme .user-hero .button { min-height: 38px; padding: .5rem .75rem; font-size: .78rem; }
  body.user-theme .user-hero .hero-secondary { display: none; }
  body.user-theme .hero-status { position: absolute; right: 1rem; bottom: 1rem; z-index: 1; min-width: 78px; padding: .7rem .55rem; border-radius: 12px; }
  body.user-theme .hero-status strong { font-size: 1.6rem; }
  body.user-theme .hero-status small, body.user-theme .hero-status .status-dot { display: none; }
  body.user-theme .stat-card strong { font-size: 1.3rem; }
  body.user-theme .account-hero { padding: 1.4rem 1.2rem 1.7rem; }
  body.user-theme .account-validity { padding: .4rem .6rem; }
}

/* 我的：官方「我的中心」蓝色渐变头部 + 白色菜单组 */
.account-hero { position: relative; padding: 1.9rem 1.6rem 2.2rem; overflow: hidden; background: linear-gradient(160deg, #2b5bd7 0%, #1a49c0 46%, #143a9e 100%); border-radius: var(--radius-lg); color: #fff; box-shadow: 0 14px 30px rgba(20, 58, 158, .25); }
.account-hero::after { content: ""; position: absolute; right: -40px; top: -60px; width: 210px; height: 210px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.account-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; font-size: 1.4rem; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
.account-identity h1 { margin-bottom: .15rem; font-size: 1.5rem; letter-spacing: .01em; }
.account-identity p { margin-bottom: 0; color: rgba(255, 255, 255, .75); }
.account-identity .eyebrow { color: rgba(255, 255, 255, .6); }
.account-validity { display: inline-flex; align-items: baseline; gap: .22rem; margin-left: auto; padding: .5rem .78rem; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: .76rem; font-weight: 700; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.account-validity strong { font-size: 1.15rem; }
body.user-theme .settings-panel { border-radius: var(--radius); }
.settings-group-title { color: var(--muted); }
.settings-row { border-radius: 0; }
.settings-icon { border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.settings-icon.blue { background: #e8f3ff; color: #2f7fd6; }
.settings-icon.amber { background: #fff4e3; color: #c77b1a; }
.settings-icon.violet { background: #f1efff; color: #6c55c7; }
.settings-icon.rose { background: #fdeef1; color: #c14d63; }
.settings-icon.muted { background: #f2f3f5; color: #7b8794; }
.settings-arrow { color: #c2c8d0; }
.logout-row { color: var(--danger); }
.logout-row .settings-icon { background: var(--danger-soft); color: var(--danger); }
.session-summary { border-radius: 10px; }

/* 登录页：官方预约系统同款——图书馆照片打底 + 居中白色面板 */
.official-auth-page { min-height: 100vh; padding: 1.5rem; background: #16306e url('/static/official/banner.jpg') center / cover no-repeat; }
.official-auth-page::before { content: ""; }
.official-auth-shell { width: min(960px, 100%); min-height: 532px; border: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(10, 24, 66, .35); }
.official-auth-intro { position: relative; display: flex; justify-content: space-between; min-height: 532px; padding: 2.35rem 2.4rem 1.7rem; overflow: hidden; background: linear-gradient(180deg, rgba(13, 28, 74, .18), rgba(10, 24, 66, .5)), url('/static/official/campus.jpg') center / cover no-repeat; }
.official-auth-intro::after { display: none; }
.official-campus-mark { align-self: flex-start; color: #fff; font-family: "Microsoft YaHei", sans-serif; font-size: 1.4rem; font-weight: 700; letter-spacing: .22em; text-shadow: 0 1px 6px rgba(6, 16, 46, .45); }
.official-intro-copy { margin-top: auto; }
.official-auth-intro .eyebrow { color: #bcd0ff; }
.official-auth-intro h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: .01em; text-shadow: 0 1px 6px rgba(6, 16, 46, .35); }
.official-auth-intro p { max-width: 340px; color: rgba(255, 255, 255, .88); text-shadow: 0 1px 4px rgba(6, 16, 46, .3); }
.official-intro-caption { display: block; margin-top: 2rem; color: rgba(255, 255, 255, .78); font-size: .76rem; }
.official-auth-card { display: flex; flex-direction: column; justify-content: center; padding: 2.7rem 2.35rem; background: #fff; border: 0; border-left: 1px solid #eef0f4; border-radius: 0; box-shadow: none; }
.official-auth-card .auth-brand { margin-bottom: 1.55rem; }
.official-auth-card .auth-brand h1 { color: #1f2329; font-size: 1.5rem; letter-spacing: 0; }
.official-auth-card .auth-brand p { color: #8a919c; }
.official-mark { background: var(--primary); box-shadow: 0 6px 14px rgba(26, 73, 192, .25); }
.official-field { color: #252a33; }
.official-field input { min-height: 52px; padding-left: .9rem; border-color: #e0e4ea; font-size: .9rem; }
.official-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 73, 192, .12); }
.official-auth-card .auth-submit { min-height: 50px; margin-top: .45rem; font-size: 1rem; letter-spacing: .1em; }
.official-auth-card .secure-tip { color: #8a919c; }

/* 登录卡片底部的「注册 / 卡密登录」入口：原来的灰色小字太不显眼，改成有边框/底色的框型按钮。
   卡片本身是 flex 列 + min-height:590px，底部 footer 用 margin-top:auto 顶到最下，
   所以这里长高多少都会被弹性空间吸收，整卡尺寸不会变化。 */
/* 并排动作按钮：购买页的「打开闲鱼商品页 / 复制链接」等。
   .row-actions 只对 form 子元素生效，这里需要通用的两列按钮排。 */
.action-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .55rem; }
.action-row .button { width: 100%; }
.official-auth-card .auth-alt-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .55rem; margin-top: .9rem; }
.official-auth-card .auth-alt-actions .button { width: 100%; min-height: 36px; padding: .4rem .6rem; font-size: .85rem; letter-spacing: 0; }
.official-auth-card .auth-alt-actions .button.secondary { border-color: #c7d4f7; }
.auth-footer-note { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: 2.4rem; color: #9aa1aa; font-size: .7rem; }
.auth-footer-note a { color: var(--primary); }
.auth-footer-note a:hover { text-decoration: underline; }

/* 预约流程：官方端「选择馆舍 >> 选择阅览室 >> 选择座位」面包屑与蓝色焦点 */
.reserve-heading { padding-top: .1rem; }
.reserve-heading h1 { letter-spacing: .01em; }
.reserve-progress { display: flex; align-items: center; gap: .55rem; margin: 0; padding: .1rem .1rem .9rem; list-style: none; border-bottom: 0; }
.reserve-progress li { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: 0; color: var(--muted); font-size: .82rem; }
.reserve-progress li + li::before { content: "»"; margin-right: .55rem; color: #c3c9d4; font-size: .9rem; }
.reserve-progress li span { display: none; }
.reserve-progress li b { font-weight: 600; }
.reserve-progress li.current { color: var(--primary); font-weight: 750; }
.reserve-progress li.current b { font-weight: 800; }
.reserve-section { border-radius: var(--radius); }
.reserve-step { display: grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 800; }
.choice span { border-radius: 10px; }
.choice input:checked + span { background: var(--primary-soft); border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); color: var(--primary); }
.seat-select-flow label { border-radius: 10px; }
.seat-option { border-radius: 8px; }
.sticky-submit { border-radius: 999px; }
.jobs-section .section-head h1 { letter-spacing: .01em; }
.job-main { flex: 1; }
.action-panel .action-grid .button { border-radius: 999px; }

@media (max-width: 980px) {
  .topbar-inner { justify-content: space-between; }
  .topbar-meta { display: none; }
}
@media (max-width: 700px) {
  .official-auth-page { padding: .75rem; }
  .official-auth-shell { display: block; min-height: 0; }
  .official-auth-intro { min-height: 220px; padding: 1.35rem 1.4rem; }
  .official-campus-mark { font-size: 1.1rem; }
  .official-auth-intro h1 { margin-bottom: .35rem; font-size: 1.85rem; }
  .official-auth-intro p { margin-bottom: 0; font-size: .8rem; }
  .official-intro-caption { margin-top: 1rem; font-size: .68rem; }
  .official-auth-card { padding: 1.7rem 1.4rem 1.45rem; }
  .auth-footer-note { padding-top: 1.6rem; }
}
@media (max-width: 640px) {
  .user-topbar { display: flex; min-height: 58px; }
  .topbar-inner { width: 100%; }
  .portal-brand { min-width: 0; }
  .portal-brand strong { font-size: .88rem; }
  .portal-brand small { display: none; }
  .portal-brand .brand-mark { width: 34px; height: 34px; }
  .reserve-progress { margin: 0 -.1rem; }
  .reserve-progress li { font-size: .7rem; }
}

/* Keep the operator portal in the same HENU red-and-blue family. */
.admin-theme { --admin: #7d1019; --admin-dark: #241d22; --admin-primary: #af1420; --admin-primary-dark: #8f0f19; --admin-soft: #fff1f2; --primary: #af1420; --primary-dark: #8f0f19; --primary-soft: #fff1f2; --bg: #f4f7fb; --surface-soft: #f8fafc; --line: #e1e5eb; --line-strong: #cfd5dd; --text: #1b1f28; --muted: #707985; }
.admin-sidebar { background: linear-gradient(180deg, #86141d 0%, #651018 100%); }
.admin-sidebar-brand .brand-mark.admin { background: #fff; color: var(--primary); box-shadow: none; }
.admin-sidebar-brand small { color: #f4c9cc; }
.admin-nav-label { color: #e3a8ad; }
.admin-side-nav > a { color: #f4d9db; }
.admin-side-nav > a:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-side-nav > a.active { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.22); box-shadow: inset 3px 0 0 #fff; color: #fff; }
.admin-side-nav > a > span { background: rgba(37, 9, 14, .24); color: #ffd9dc; }
.admin-side-nav > a.active > span { background: #fff; color: var(--primary); }
.admin-side-nav > a small { color: #e6b9bd; }
.admin-side-nav > a.active small { color: #fff0f1; }
.admin-online { background: rgba(37, 9, 14, .2); border-color: rgba(255,255,255,.16); }
.admin-online > span { background: #8ee0a8; box-shadow: 0 0 0 4px rgba(142,224,168,.14); }
.admin-online small { color: #f0c9cc; }
.admin-sidebar-logout { border-color: rgba(255,255,255,.24); color: #f7dfe1; }
.admin-sidebar-logout:hover { border-color: rgba(255,255,255,.55); color: #fff; }
.admin-mobile-topbar { background: #76111a; }
.admin-mobile-topbar .brand-mark.admin { background: #fff; color: var(--primary); }
.admin-mobile-panel { background: #651018; border-top-color: rgba(255,255,255,.16); }
.admin-mobile-panel nav a { background: rgba(37,9,14,.22); border-color: rgba(255,255,255,.17); color: #f6dfe1; }
.admin-mobile-panel nav a.active { background: #fff; border-color: #fff; color: var(--primary); }
.admin-mobile-panel nav small { color: #e8bfc3; }
.admin-mobile-panel nav a.active small { color: #a23a42; }
.admin-theme .button.primary, .button.admin-primary { background: var(--primary); }
.admin-theme .button.primary:hover, .button.admin-primary:hover { background: var(--primary-dark); }
.admin-theme .button.secondary, .button.admin-secondary { background: var(--focus-soft); border-color: #d4e0f8; color: var(--focus-blue); }
.admin-welcome { background: linear-gradient(105deg, #76111a 0%, #af1420 65%, #c44b53 100%); }
.admin-welcome .eyebrow { color: #ffd7d9; }
.admin-welcome p { color: #f5dfe0; }
.admin-welcome .admin-secondary { border-color: rgba(255,255,255,.45); color: #fff; }
.admin-count, .feature-chip { border-radius: 4px; background: var(--primary-soft); color: var(--primary); }
.admin-stats .stat-card { border-top-color: #e6c2c5; }
.admin-stats .stat-card.attention { border-top-color: #d99a3f; }
.admin-quick-list a:hover { background: var(--primary-soft); border-color: #ebc5c8; }
.admin-quick-list a > span { background: var(--primary-soft); color: var(--primary); }
.admin-guide-card { background: #7d1019; }
.admin-guide-card .eyebrow { color: #ffd7d9; }
.admin-theme .inline-code { background: #fff1f2; color: #7d1019; }
.admin-auth-page { background: #241d22 url('/static/official/new_bg.jpg') center / cover no-repeat; }
.admin-auth-shell .auth-card { border-color: rgba(255,255,255,.25); }
.admin-auth-shell .auth-brand .brand-mark.admin { background: var(--primary); color: #fff; }
.admin-auth-shell .auth-brand .eyebrow { color: var(--primary); }

/* Interaction polish: stable focus, loading states, and mobile-safe spacing. */
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid rgba(47, 98, 192, .36);
  outline-offset: 3px;
}
.notice[tabindex="-1"]:focus { outline: 3px solid rgba(47, 98, 192, .2); outline-offset: 2px; }
.notice { overflow-wrap: anywhere; }
.topbar, .admin-mobile-topbar { padding-top: max(.6rem, env(safe-area-inset-top)); }
.mobile-nav { padding-bottom: max(.3rem, env(safe-area-inset-bottom)); }
.admin-side-nav > a[aria-current="page"] { position: relative; }
.reserve-progress li.complete { color: var(--success); }
.reserve-progress li.complete span { border-color: var(--success); background: var(--success-soft); color: var(--success); font-size: 0; }
.reserve-progress li.complete span::after { content: "✓"; font-size: .72rem; }
.seat-select-flow select[aria-busy="true"] { color: var(--muted); background-image: linear-gradient(90deg, transparent, rgba(26, 73, 192, .08), transparent); background-size: 220% 100%; animation: reserve-loading 1.2s ease-in-out infinite; }
#formError[hidden] { display: none; }
#formError:not([hidden]) { animation: notice-in .18s ease-out; }
@keyframes reserve-loading { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes notice-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 640px) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .page { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .reserve-progress { overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .reserve-progress::-webkit-scrollbar { display: none; }
  .reserve-progress li { flex: 0 0 auto; }
}

/* 2026 interface pass: clearer hierarchy, quick actions, and task scanning. */
body.user-theme {
  background:
    radial-gradient(circle at 12% -10%, rgba(45, 93, 215, .09), transparent 30rem),
    linear-gradient(180deg, #f9fbff 0%, #f3f6fb 48%, #eef2f8 100%);
}
body.user-theme .page { width: min(1180px, calc(100% - 2rem)); margin-top: 1.6rem; }
body.user-theme .user-topbar { background: #173574; box-shadow: 0 6px 22px rgba(20, 45, 105, .14); }
.button-icon { display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; margin-right: .35em; border: 1px solid currentColor; border-radius: 50%; font-size: .82em; line-height: 1; }
.button-arrow { margin-left: .45rem; font-size: 1.1em; opacity: .7; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; margin-top: 1.15rem; color: rgba(255,255,255,.72); font-size: .72rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.hero-meta i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #8de0a9; box-shadow: 0 0 0 4px rgba(141,224,169,.13); }
.hero-meta span + span { padding-left: 1rem; border-left: 1px solid rgba(255,255,255,.22); }
.quick-actions-panel { padding: 1.15rem 1.25rem 1.25rem; }
.compact-head { align-items: center; margin-bottom: .85rem; }
.compact-head h2 { margin-bottom: 0; }
.section-caption { color: var(--muted); font-size: .74rem; }
.quick-actions-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .65rem; }
.quick-action { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .62rem; min-height: 70px; padding: .72rem .75rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.quick-action:hover { transform: translateY(-2px); border-color: #cbd7f3; background: #fbfcff; box-shadow: 0 8px 18px rgba(31, 55, 120, .08); }
.quick-action > span:nth-child(2) { display: grid; min-width: 0; }
.quick-action strong { font-size: .82rem; }
.quick-action small { margin-top: .16rem; color: var(--muted); font-size: .68rem; }
.quick-action > b { color: #afb8c8; font-size: 1rem; font-weight: 500; }
.quick-action-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 1.1rem; font-weight: 800; }
.quick-action-icon.blue { background: #e8f2ff; color: #3376d5; }
.quick-action-icon.amber { background: #fff3de; color: #c17a19; }
.primary-action-tile { background: #f6f8ff; border-color: #d9e1fa; }
.primary-action-tile > b { color: var(--primary); }

.jobs-toolbar { display: grid; grid-template-columns: minmax(210px, 1fr) auto; align-items: center; gap: .75rem; margin: -.25rem 0 1rem; }
.jobs-search { display: flex; align-items: center; gap: .45rem; min-height: 40px; padding: 0 .72rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; color: #9aa3b1; }
.jobs-search input { min-height: 38px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: .8rem; }
.jobs-search input:focus { box-shadow: none; }
.jobs-search span { font-size: 1.15rem; line-height: 1; }
.jobs-filters { display: flex; align-items: center; gap: .25rem; padding: .22rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 11px; }
.jobs-filters button { min-height: 32px; padding: .3rem .58rem; border-radius: 8px; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 700; }
.jobs-filters button:hover { color: var(--text); background: #fff; }
.jobs-filters button.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(31, 55, 120, .08); }
.jobs-filters button span { margin-left: .18rem; color: #a2a9b3; font-size: .68rem; font-weight: 600; }
.jobs-filters button.active span { color: var(--primary); }
.job-row { position: relative; }
.job-row::after { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 4px; background: var(--primary); opacity: .75; }
.job-row:has(.badge.muted)::after { background: #b6beca; }
.job-main { display: grid; gap: .18rem; min-width: 0; }
.job-main strong { font-size: .92rem; }
.job-main span { line-height: 1.35; }
.filtered-empty { margin-top: .7rem; }
.empty-mini-icon { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto .65rem; border-radius: 11px; background: var(--primary-soft); color: var(--primary); font-size: 1.35rem; }

.reserve-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: 1rem 1.15rem; background: linear-gradient(120deg, #f7f9ff, #fff); border: 1px solid #dbe3f7; border-radius: 13px; }
.reserve-summary h2 { margin-bottom: .2rem; font-size: 1rem; }
.reserve-summary p { margin-bottom: 0; font-size: .76rem; }
.summary-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.summary-pills span { padding: .35rem .55rem; border-radius: 999px; background: #eef2fd; color: var(--primary-dark); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.summary-pills span:last-child { background: #f1f4f7; color: var(--muted); }
.time-presets { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.time-presets > span { margin-right: .15rem; color: var(--muted); font-size: .7rem; }
.time-presets button { min-height: 30px; padding: .25rem .55rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--text); font-size: .72rem; }
.time-presets button:hover, .time-presets button.active { border-color: #b9c9ee; background: var(--primary-soft); color: var(--primary); }

@media (max-width: 760px) {
  body.user-theme .page { width: min(100% - 1rem, 1180px); margin-top: .8rem; }
  .quick-actions-grid { grid-template-columns: 1fr; gap: .5rem; }
  .quick-action { min-height: 58px; }
  .jobs-toolbar { grid-template-columns: 1fr; gap: .55rem; }
  .jobs-filters { justify-content: space-between; }
  .jobs-filters button { flex: 1; }
  .reserve-summary { display: grid; gap: .7rem; }
  .summary-pills { justify-content: flex-start; }
  .hero-meta span + span { padding-left: .65rem; }
}

@media (max-width: 420px) {
  .user-hero .hero-actions { display: grid; grid-template-columns: 1fr; }
  .user-hero .button { width: 100%; }
  .hero-meta { display: grid; gap: .35rem; }
  .hero-meta span + span { padding-left: 0; border-left: 0; }
  .section-caption { display: none; }
}
/* ---- 当前预约：同时展示「正在使用」与「已预约」的全部座位 ---- */
.reserve-group { display: grid; gap: .85rem; margin-top: 1.15rem; }
.reserve-group + .reserve-group { margin-top: 1.7rem; }
.reserve-group-head { display: flex; align-items: center; gap: .5rem; color: var(--text); }
.reserve-group-head strong { font-size: 1rem; }
.group-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.group-dot.in-use { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.group-dot.reserved { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.reservation-item { padding: .95rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 13px; }
.reservation-card.in-use { border-left: 3px solid var(--success); }
.reservation-card.reserved { border-left: 3px solid var(--primary); }
.record-icon.in-use { background: var(--success-soft); color: var(--success); }
.reservation-area { color: var(--text) !important; font-weight: 700; }
.reservation-item .action-grid { margin: .75rem 0 0; }
.reserve-footnote { margin-top: 1.2rem; color: var(--muted); font-size: .78rem; line-height: 1.6; }
/* ---- 管理端：需要处理 / 调度健康 / 侧栏徽标 ---- */
.admin-generated { display: block; width: 100%; color: var(--muted); font-size: .78rem; }
.admin-needs { margin-bottom: 1.4rem; }
.need-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.need-card { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; }
.need-card:hover { border-top-color: var(--admin-primary); border-right-color: var(--admin-primary); border-bottom-color: var(--admin-primary); }
.need-card > div { display: grid; gap: .12rem; min-width: 0; }
.need-card strong { font-size: .95rem; }
.need-card small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.need-card b { color: var(--admin-primary); font-size: .8rem; white-space: nowrap; }
.need-card.danger { border-left-color: var(--danger); }
.need-card.warn { border-left-color: var(--warning); }
.need-card.info { border-left-color: var(--admin-primary); }
.need-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.need-card.danger .need-dot { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.need-card.warn .need-dot { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.need-card.info .need-dot { background: var(--admin-primary); box-shadow: 0 0 0 4px var(--admin-soft); }
.admin-stats a.stat-card { color: inherit; text-decoration: none; }
.admin-stats a.stat-card:hover { border-color: var(--admin-primary); box-shadow: var(--shadow); }
.health-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.health-item { display: grid; gap: .18rem; padding: .7rem .8rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.health-item span { color: var(--muted); font-size: .76rem; }
.health-item strong { font-size: 1.05rem; }
.admin-side-nav > a { grid-template-columns: 34px minmax(0, 1fr) auto; }
.admin-nav-badge { justify-self: end; min-width: 22px; padding: .1rem .42rem; border-radius: 999px; background: #6f9cff; color: #10203c; font-size: .7rem; font-weight: 800; text-align: center; }
.admin-nav-badge.danger { background: #ff8a97; color: #4a0d16; }
.admin-mobile-badge { margin-left: auto; padding: .06rem .4rem; border-radius: 999px; background: #6f9cff; color: #10203c; font-size: .68rem; font-weight: 800; }
.admin-mobile-badge.danger { background: #ff8a97; color: #4a0d16; }
.session-detail { display: block; margin-top: .2rem; color: var(--muted); font-size: .72rem; }
/* ---- 更新 CAS 密码：一键重新验证 / 同步新密码 两个区块 ---- */
.pwd-block { display: grid; gap: .6rem; }
.pwd-block > h2, .pwd-block-head h2 { font-size: 1.02rem; margin: 0; }
.pwd-block-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.pwd-block .form-help { margin: 0; }
.pwd-block form { margin: 0; }

/* ---- 当前预约：当日取消额度预警 ---- */
.quota-banner { display: grid; gap: .3rem; margin-top: 1rem; padding: .7rem .9rem; background: var(--surface-soft); border: 1px solid var(--line); border-left: 3px solid var(--success); border-radius: var(--radius); }
.quota-banner.warn { background: var(--warning-soft); border-left-color: var(--warning); }
.quota-banner.danger { background: var(--danger-soft); border-left-color: var(--danger); }
.quota-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.quota-banner small { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.quota-banner.warn small { color: var(--warning); }
.quota-banner.danger small { color: var(--danger); }

/* ---- 当前预约：未签到自动取消开关 ---- */
.auto-cancel-card { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; padding: .75rem .9rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.auto-cancel-card.on { border-color: #c8e8e3; background: var(--primary-soft); }
.auto-cancel-card form { flex: 0 0 auto; }
.auto-cancel-main { display: flex; align-items: flex-start; gap: .65rem; min-width: 0; flex: 1 1 auto; }
.auto-cancel-icon { display: inline-flex; flex: 0 0 auto; margin-top: .1rem; color: var(--muted); }
.auto-cancel-card.on .auto-cancel-icon { color: var(--primary-dark); }
.auto-cancel-copy { display: grid; gap: .2rem; min-width: 0; }
.auto-cancel-copy strong { display: flex; align-items: center; gap: .4rem; font-size: .92rem; }
.auto-cancel-copy small { color: var(--muted); font-size: .78rem; line-height: 1.55; }
.auto-cancel-card.on .auto-cancel-copy small { color: var(--primary-dark); }
.auto-cancel-copy small b { color: var(--text); font-weight: 800; }
.auto-cancel-card.on .auto-cancel-copy small b { color: var(--primary-dark); }
.auto-cancel-copy small u { text-decoration: none; border-bottom: 1px dashed currentColor; }


/* ---- 管理端权限拓展（2026-09-25）：凭据面板 / 审计 / 运行失败分类 ---------- */

.cas-panel {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  max-width: 320px;
}

.cas-panel-note {
  margin: 0;
  font-size: 12px;
  color: #9a3412;
}

.cas-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.cas-field > span {
  color: #6b7280;
  min-width: 28px;
}

.cas-secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  color: #b91c1c;
  word-break: break-all;
  user-select: all;
}

.cas-panel-hide {
  font-size: 12px;
  color: #9a3412;
}

.admin-filter-bar {
  margin: 0 0 14px;
}

.admin-run-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
}

.admin-run-filter label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
}

.admin-run-filter select {
  min-width: 160px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.admin-filter-reset {
  font-size: 12px;
  color: #2563eb;
  align-self: center;
}

.run-message {
  max-width: 260px;
}

.run-detail {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.run-detail small {
  color: #64748b;
}

.run-raw summary {
  cursor: pointer;
  font-size: 12px;
  color: #2563eb;
}

.run-raw pre {
  max-height: 240px;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .admin-run-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-run-filter select {
    min-width: 0;
    width: 100%;
  }

  .cas-panel {
    max-width: none;
  }
}


/* ==========================================================================
   管理端手机优先重构（2026-09-25 · N 系列）
   目标：手机上不再「一行一表格、一表格滚三屏」，一屏看清成员状态与动作。
   ========================================================================== */

/* ---- 页头与工具条 ---- */
.admin-page-header-links { display: flex; align-items: center; gap: 10px; }

.admin-header-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-primary);
  white-space: nowrap;
}

.admin-theme .responsive-table td[data-label="操作"] form { display: inline-flex; }

/* ---- 成员卡 ---- */
.member-board { display: grid; gap: 12px; margin-bottom: 16px; }

@media (min-width: 768px) {
  .member-board { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

.member-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.member-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.member-id { display: grid; gap: 6px; min-width: 0; }
.member-email { font-size: 15px; word-break: break-all; }
.member-sub { display: flex; flex-wrap: wrap; gap: 4px; }

.member-days { font-size: 20px; font-weight: 800; color: var(--admin, #253553); white-space: nowrap; line-height: 1.1; }
.member-days small { margin-left: 2px; font-size: 11px; color: #94a3b8; font-weight: 700; }
.member-days.low { color: #b45309; }
.member-days.zero { color: #b91c1c; }

.member-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 12px;
}

@media (min-width: 768px) {
  .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.member-block { display: grid; gap: 4px; min-width: 0; }
.member-label { font-size: 11px; font-weight: 800; color: #94a3b8; letter-spacing: .04em; }
.member-block strong { font-size: 14px; word-break: break-word; }
.member-block small { word-break: break-word; }

.member-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.member-chips form { display: inline-flex; }

.chip-link,
.chip-muted {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #dbe3ff;
  font-size: 12.5px;
  font-weight: 700;
  color: #315eaf;
  white-space: nowrap;
}

.chip-muted { background: #f1f5f9; border-color: #e2e8f0; color: #94a3b8; }

/* ---- 可折叠操作区（默认收起，手机省一大截滚动） ---- */
.member-actions { border: 1px dashed #dbe3ee; border-radius: 12px; padding: 0; }
.member-actions > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  list-style: none;
}
.member-actions > summary::-webkit-details-marker { display: none; }
.member-actions > summary::after { content: "▾"; margin-left: auto; color: #94a3b8; transition: transform .15s ease; }
.member-actions[open] > summary::after { transform: rotate(180deg); }
.member-actions[open] > summary { border-bottom: 1px dashed #dbe3ee; border-radius: 12px 12px 0 0; }

.member-action-grid { display: grid; gap: 8px; padding: 10px 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 520px) { .member-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.member-action-grid form { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.member-action-grid form > button:only-of-type { grid-column: 1 / -1; }
.member-action-grid .mini-input { width: 100%; }
.member-action-grid .button { min-height: 38px; white-space: nowrap; }

.member-action-help { margin: 0; padding: 0 12px 10px; font-size: 11.5px; color: #94a3b8; }
.member-card-foot { font-size: 11.5px; color: #94a3b8; word-break: break-word; }

/* ---- 其余折叠区块（未绑定账号 / 旧卡密） ---- */
.admin-fold { margin: 0 0 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 12px; background: #fff; }
.admin-fold > summary {
  min-height: 46px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  color: #334155;
  list-style: none;
}
.admin-fold > summary::-webkit-details-marker { display: none; }
.admin-fold[open] > summary { border-bottom: 1px solid var(--line, #e2e8f0); }
.admin-fold > .table-wrap { margin: 0; padding: 8px 10px 12px; }

/* ---- 手机端底部快捷栏（与侧栏隐藏同一断点） ---- */
.mobile-quickbar { display: none; }

@media (max-width: 980px) {
  .mobile-quickbar {
    position: sticky;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--line, #e2e8f0);
  }

  .mobile-quickbar a {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 2px;
    min-height: 48px;
    padding: 4px 2px;
    border-radius: 10px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
  }

  .mobile-quickbar a span { font-size: 17px; line-height: 1; }
  .mobile-quickbar a.active { color: var(--admin-primary); background: var(--admin-soft, #edf3ff); }

  .quickbar-dot {
    position: absolute;
    top: 5px;
    right: 50%;
    margin-right: -16px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--admin-primary);
  }

  .quickbar-dot.danger { background: #dc2626; }
  .admin-workspace { padding-bottom: 84px; }
}

/* ---- 运行记录：手机端紧凑两行 + 横滑筛选 ---- */
.filter-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips label { flex: 0 0 auto; }
.filter-chips select { min-width: 132px; }

@media (max-width: 700px) {
  .filter-chips { padding: 8px 10px; }
  .filter-chips select { min-width: 0; font-size: 13px; }

  .admin-table-tools { gap: 6px; }
  .admin-table-search input { min-height: 42px; font-size: 16px; } /* 16px 防 iOS 聚焦缩放 */

  .member-card { padding: 12px; gap: 10px; border-radius: 13px; }
  .member-email { font-size: 14.5px; }
  .member-days { font-size: 18px; }
  .member-chips .button { min-height: 38px; }
  .member-action-grid form { grid-template-columns: minmax(0, 1fr) auto; }
  .member-action-grid .button { min-height: 40px; }

  .run-table .responsive-table tr { padding: 2px 0; }
  .run-table td[data-label="任务"] { display: none; }
  .run-table td[data-label="失败详情"] { grid-template-columns: minmax(0, 1fr); }
  .run-table td[data-label="失败详情"]::before { margin-bottom: 2px; }
  .run-detail { min-width: 0; }
}

@media (max-width: 420px) {
  .admin-page-header { gap: .5rem; }
  .admin-page-header-links { flex-direction: column; align-items: flex-end; gap: 4px; }
  .member-action-grid { grid-template-columns: minmax(0, 1fr); }
}


/* ==========================================================================
   管理端字号与密度统一（2026-09-25 · O 系列）
   全部限定在 .admin-theme：flat.css 与用户端共用，不能影响用户端排版。
   ========================================================================== */

/* ---- 标题层级 ---- */
.admin-theme h1 { margin-bottom: .35rem; font-size: 22px; line-height: 1.25; letter-spacing: -.02em; }
.admin-theme h2 { margin-bottom: .3rem; font-size: 16px; line-height: 1.3; letter-spacing: -.01em; }
.admin-theme h3 { font-size: 14.5px; }
.admin-theme p { font-size: 13px; line-height: 1.55; }
.admin-theme .eyebrow { font-size: 10.5px; letter-spacing: .07em; }

/* ---- 页头与容器 ---- */
.admin-theme .admin-page-header { align-items: flex-start; margin-bottom: .75rem; padding: 0 .1rem; }
.admin-theme .admin-page-header p { font-size: 12.5px; margin-bottom: 0; }
.admin-theme .admin-count { padding: .26rem .5rem; font-size: 11px; }
.admin-theme .admin-content { padding-top: 1rem; }
.admin-theme section { margin-bottom: .75rem; padding: 1rem 1.05rem; border-radius: 11px; }
.admin-theme .section-head { align-items: flex-start; gap: .7rem; margin-bottom: .7rem; }
.admin-theme .section-head p { font-size: 12px; }
.admin-theme .section-caption { font-size: 11px; }
.admin-theme .compact-head { margin-bottom: .6rem; }

/* ---- 表单/按钮/徽标 ---- */
.admin-theme label { font-size: 12.5px; }
.admin-theme input, .admin-theme select, .admin-theme textarea { font-size: 13px; }
.admin-theme .form-help, .admin-theme .admin-generated { font-size: 11px; }
.admin-theme .button.compact { min-height: 32px; padding: .32rem .6rem; font-size: 12.5px; }
.admin-theme .badge { padding: .16rem .44rem; font-size: 10.5px; }
.admin-theme .inline-code { font-size: 11.5px; }
.admin-theme .muted-text { font-size: 11.5px; }
.admin-theme .mini-input { min-height: 32px; font-size: 12.5px; }
.admin-theme .feature-chip { padding: .26rem .5rem; font-size: 11px; }
.admin-theme .row-actions form { gap: .35rem; }

/* ---- 表格 ---- */
.admin-theme th { padding: .5rem .6rem; font-size: 11px; }
.admin-theme td { padding: .55rem .6rem; font-size: 12.5px; }
.admin-theme .table-wrap { border-radius: 11px; }
.admin-theme .admin-table-tools { margin-bottom: .55rem; gap: .6rem; }
.admin-theme .admin-table-search { min-height: 36px; }
.admin-theme .admin-table-search input { min-height: 34px; font-size: 12.5px; }
.admin-theme .admin-table-result { font-size: 11px; }
.admin-theme .run-message { max-width: 420px; font-size: 12px; }

/* ---- 侧栏 ---- */
.admin-sidebar { padding: 1rem .75rem .8rem; }
.admin-side-nav { gap: .22rem; }
.admin-side-nav > a { padding: .45rem .5rem; }
.admin-side-nav > a > span { width: 26px; height: 26px; font-size: .85rem; border-radius: 8px; }
.admin-side-nav strong { font-size: 12.5px; }
.admin-side-nav small { font-size: 10.5px; }
.admin-nav-label { margin: .7rem .35rem .3rem; font-size: 9.5px; }
.admin-sidebar-brand small { font-size: 10.5px; }
.admin-sidebar-footer .admin-online strong { font-size: 11.5px; }
.admin-sidebar-footer .admin-online small { font-size: 10px; }
.admin-sidebar-logout { font-size: 12px; }

/* ---- 概览：状态摘要 + 需要处理 ---- */
.admin-summary-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .55rem; margin: .15rem 0 0 !important; color: #64748b; }
.admin-summary-line strong { color: var(--admin, #253553); font-weight: 800; }
.admin-summary-line .danger-text { color: var(--danger); }

.admin-theme .admin-needs { padding: .6rem .8rem; background: #fff; }
.need-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.need-strip-label { font-size: 11px; font-weight: 800; color: #64748b; margin-right: .15rem; }

.need-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  min-height: 28px;
  padding: .2rem .55rem;
  border: 1px solid var(--line, #e2e8f0);
  border-left: 3px solid var(--muted, #94a3b8);
  border-radius: 999px;
  background: var(--surface-soft, #f7f8fa);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.need-pill:hover { border-color: var(--admin-primary); }
.need-pill b { color: #94a3b8; font-weight: 800; }
.need-pill.danger { border-left-color: var(--danger); }
.need-pill.warn { border-left-color: var(--warning); }
.need-pill.info { border-left-color: var(--admin-primary); }

.need-clear {
  margin: 0 0 .75rem;
  padding: .5rem .75rem;
  background: var(--success-soft, #e8f7f0);
  border-radius: 10px;
  color: var(--success, #1f9d63);
  font-size: 12px;
  font-weight: 650;
}

/* ---- 概览：核心数字（更紧的卡片） ---- */
.admin-theme .admin-quick-panel { padding: .95rem 1rem; }
.admin-theme .admin-stats { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .5rem; }
.admin-theme .admin-stats .stat-card { gap: .05rem; padding: .65rem .7rem; border-top-width: 2px; }
.admin-theme .admin-stats .stat-card span { font-size: 11px; }
.admin-theme .admin-stats .stat-card strong { font-size: 18px; line-height: 1.15; }
.admin-theme .admin-stats .stat-card small { font-size: 10.5px; }
.admin-theme .stat-card { box-shadow: none; }

/* ---- 概览：调度健康一行 ---- */
.health-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: .4rem;
  margin-bottom: .7rem;
}
.health-cell { display: grid; gap: .12rem; padding: .5rem .6rem; background: var(--surface-soft, #f7f8fa); border: 1px solid var(--line, #ebedf0); border-radius: 9px; }
.health-cell span { color: var(--muted); font-size: 10.5px; }
.health-cell strong { font-size: 12.5px; }

.admin-fold-flat { margin: .7rem 0 0; border-style: dashed; }
.admin-fold-flat > summary { min-height: 38px; padding: .5rem .7rem; font-size: 12px; font-weight: 700; }
.admin-theme .lifecycle-list strong { font-size: 12.5px; }
.admin-theme .lifecycle-list small { font-size: 11px; }

/* ---- 表格在手机上：空 data-label 的列不再显示空标签 ---- */
@media (max-width: 760px) {
  .admin-theme .responsive-table td[data-label=""]::before { display: none; }
  .admin-theme .responsive-table td[data-label=""] { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .admin-theme h1 { font-size: 20px; }
  .admin-theme .admin-page-header { flex-direction: column; }
  .admin-theme .admin-page-header-links { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .admin-theme .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-theme section { padding: .85rem .8rem; }
}


/* ==========================================================================
   管理端「单条内容」收纳（2026-09-25 · O 系列）
   次要字段默认收起，点行内的「展开」再看；勾选状态由 common.js 负责在提交后恢复。
   ========================================================================== */

/* 视觉隐藏但仍可键盘聚焦（不能用 display:none，否则无法用键盘展开） */
.row-item input.row-more-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.admin-theme .row-more { display: none; }

.row-item input.row-more-toggle:checked ~ .row-more { display: table-cell; }

/* 切换按钮：文案 + 加减号 */
.row-more-toggle {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-left: .45rem;
  padding: .04rem .4rem;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 999px;
  background: var(--surface-soft, #f7f8fa);
  color: #64748b;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
  white-space: nowrap;
  vertical-align: 1px;
}

.row-more-toggle::after { content: "展开"; }
.row-more-toggle::before { content: "+"; font-weight: 800; }

/* 行首 hidden checkbox 控制整行文案（label 由每个主单元格自带） */
.row-item input.row-more-toggle:checked ~ td .row-more-toggle {
  border-color: #bcd0ff;
  background: var(--admin-soft, #edf3ff);
  color: var(--admin-primary);
}

.admin-theme .row-item input.row-more-toggle:checked ~ td .row-more-toggle::after { content: "收起"; }
.admin-theme .row-item input.row-more-toggle:checked ~ td .row-more-toggle::before { content: "−"; }

/* 键盘可达：勾选框聚焦时高亮同行的开关 */
.row-item input.row-more-toggle:focus-visible ~ td .row-more-toggle {
  outline: 2px solid var(--admin-primary);
  outline-offset: 1px;
}

/* 行首开关单元格不占空间 */
.admin-theme .row-item > td[hidden] { display: none; }

/* 把「展开」按钮贴到主字段文字后面：放在每个主单元格里的 label */
.admin-theme .row-item .row-more-toggle { margin-left: .45rem; }

/* 桌面端：被折叠的列表头淡显，暗示「这列默认不展示」 */
.admin-theme .row-more-th { color: #c2c8d0; }

/* 成员卡里的「邀请与登录明细」 */
.member-more { display: grid; gap: .2rem; }
.member-more > summary {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  width: max-content;
  min-height: 24px;
  padding: 0 .4rem;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 999px;
  background: var(--surface-soft, #f7f8fa);
  color: #64748b;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.member-more > summary::-webkit-details-marker { display: none; }
.member-more > summary::before { content: "+"; font-weight: 800; }
.member-more[open] > summary { border-color: #bcd0ff; background: var(--admin-soft, #edf3ff); color: var(--admin-primary); }
.member-more[open] > summary::before { content: "−"; }
.member-more[open] { margin-top: .1rem; }

/* 手机端：次要字段展开后是整行，给一点区隔 */
@media (max-width: 760px) {
  .row-item input.row-more-toggle:checked ~ .row-more {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: .4rem;
    background: #fbfcfe;
  }
  .row-more-toggle { margin-left: .3rem; font-size: 10px; }
}


/* ==========================================================================
   管理端精简（2026-09-25 · P 系列）
   成员卡只留邮箱与运行状态；说明文案不再出现在界面上。
   ========================================================================== */

/* 说明文案：模板里已删除，这里兜底（避免以后又加回来还看得见） */
.admin-theme .form-help,
.admin-theme .section-caption { display: none; }

/* 成员卡「展开详情」 */
.member-expand { border-top: 1px dashed var(--line, #e2e8f0); padding-top: .55rem; }

.member-expand > summary {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  min-height: 26px;
  padding: 0 .5rem;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 999px;
  background: var(--surface-soft, #f7f8fa);
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.member-expand > summary::-webkit-details-marker { display: none; }
.member-expand > summary::before { content: "+"; font-weight: 800; }
.member-expand[open] > summary { border-color: #bcd0ff; background: var(--admin-soft, #edf3ff); color: var(--admin-primary); }
.member-expand[open] > summary::before { content: "−"; }

.member-expand-body { display: grid; gap: .6rem; padding-top: .6rem; }

/* 展开区里的「管理操作」不再套一层虚线框，减少视觉嵌套 */
.member-expand-body .member-actions { border-style: solid; background: #fff; }
.member-expand-body .member-action-help { display: none; }

/* 审计页：UTC 原文只在展开行时显示 */
.audit-time-more { display: none; margin-left: .35rem; font-size: 10.5px; }
.admin-theme .row-item input.row-more-toggle:checked ~ td .audit-time-more { display: inline; }

/* 成员卡天数与徽标在手机上再紧一点 */
@media (max-width: 640px) {
  .member-expand > summary { min-height: 30px; }
  .member-card-foot { font-size: 11px; }
}


/* ==========================================================================
   用户端精简（2026-09-25 · Q 系列）
   1) 首页上部大卡片压扁；2) 字号适当缩小；3) 去掉不必要的说明文案间距
   全部限定 body.user-theme：管理端有自己的一套（O 系列），互不影响。
   ========================================================================== */

/* ---- 关键字号 ---- */
body.user-theme h1 { font-size: 24px; margin-bottom: .35rem; letter-spacing: -.02em; }
body.user-theme h2 { font-size: 16px; margin-bottom: .25rem; }
body.user-theme h3 { font-size: 15px; }
body.user-theme p { font-size: 13px; line-height: 1.55; }
body.user-theme .section-head p { font-size: 12.5px; }
body.user-theme .eyebrow { font-size: 10.5px; letter-spacing: .07em; }
body.user-theme .badge { padding: .16rem .46rem; font-size: 10.5px; }
body.user-theme .button { font-size: 13.5px; }
body.user-theme .button.compact { min-height: 32px; padding: .3rem .6rem; font-size: 12.5px; }
body.user-theme input, body.user-theme select, body.user-theme textarea { font-size: 13.5px; }
body.user-theme .muted-text { font-size: 11.5px; }
body.user-theme .inline-code { font-size: 11.5px; }

/* ---- 区块与卡片更紧 ---- */
body.user-theme section { padding: 1rem 1.05rem; margin-bottom: .7rem; border-radius: 12px; }
body.user-theme .section-head { align-items: flex-start; gap: .6rem; margin-bottom: .7rem; }
body.user-theme .compact-head { margin-bottom: .55rem; }
body.user-theme .stat-card { padding: .8rem; }
body.user-theme .stat-card strong { font-size: 20px; }
body.user-theme .stat-card span { font-size: 11.5px; }
body.user-theme .record-icon { width: 34px; height: 34px; border-radius: 9px; }
body.user-theme .item-row { padding: .7rem .8rem; }
body.user-theme .item-row strong { font-size: 14px; }
body.user-theme .item-row span { font-size: 12.5px; }
body.user-theme .empty-state { padding: 1.4rem 1rem; }
body.user-theme .empty-state p { font-size: 12.5px; }

/* ---- 首页大卡片：一行式紧凑头部 ---- */
body.user-theme .user-hero {
  min-height: 0;
  padding: 1.1rem 1.15rem;
  border-radius: 13px;
}
body.user-theme .user-hero::before { background: linear-gradient(100deg, rgba(13,28,74,.7) 10%, rgba(20,45,120,.34) 70%, rgba(20,45,120,.14) 100%); }
body.user-theme .user-hero h1 { margin-bottom: .2rem; font-size: 20px; }
body.user-theme .user-hero p { margin-bottom: .7rem; font-size: 12.5px; }
body.user-theme .user-hero .hero-actions { gap: .45rem; padding-right: 84px; }
body.user-theme .user-hero .button { min-height: 36px; padding: .4rem .7rem; font-size: 13px; }

/* 状态方块缩成右上角小胶囊 */
body.user-theme .hero-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  min-width: 0;
  width: auto;
  padding: .3rem .55rem;
  border-radius: 10px;
  gap: .1rem;
  box-shadow: 0 6px 16px rgba(7, 18, 50, .22);
}
body.user-theme .hero-status .status-dot { top: .45rem; right: .45rem; width: 6px; height: 6px; box-shadow: 0 0 0 3px #e5f7ef; }
body.user-theme .hero-status strong { font-size: 19px; line-height: 1; }
body.user-theme .hero-status > span:not(.status-dot) { font-size: 10.5px; }
body.user-theme .hero-status small { display: none; }

/* 快捷入口也收一档 */
body.user-theme .quick-action { min-height: 56px; padding: .65rem .8rem; }
body.user-theme .quick-action strong { font-size: 14px; }
body.user-theme .quick-actions-grid { gap: .5rem; }

/* 手机上再压一档（覆盖前面 640px 段的旧值） */
@media (max-width: 640px) {
  body.user-theme .user-hero { padding: 1rem; }
  body.user-theme .user-hero h1 { font-size: 19px; }
  body.user-theme .user-hero .hero-actions { padding-right: 0; }
  body.user-theme .hero-status { top: auto; right: .8rem; bottom: .8rem; padding: .25rem .5rem; }
  body.user-theme .hero-status strong { font-size: 17px; }
  body.user-theme .stat-grid, body.user-theme .user-stats { gap: .45rem; }
  body.user-theme .section-head h1 { font-size: 21px; }
}


/* ==========================================================================
   用户端交互紧凑化（2026-09-25 · S 系列）
   ========================================================================== */

/* ---- 任务页：统一的按钮组 ---- */
body.user-theme .job-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
body.user-theme .job-actions .button,
body.user-theme .job-actions > form > .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .28rem;
  min-height: 32px;
  padding: .3rem .62rem;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
body.user-theme .job-actions .btn-ico { font-size: 12px; line-height: 1; opacity: .85; }
body.user-theme .job-actions form { display: inline-flex; }
body.user-theme .job-actions .button.danger { border-color: #f3c6c9; }

/* ---- 我的页：去掉小字后的行高重排 ---- */
body.user-theme .account-hero { padding: 1.15rem 1.2rem; gap: .8rem; }
body.user-theme .account-avatar { width: 46px; height: 46px; border-radius: 14px; font-size: 1.15rem; }
body.user-theme .account-identity h1 { margin-bottom: .1rem; font-size: 1.35rem; }
body.user-theme .account-identity p { font-size: 12px; }
body.user-theme .account-validity { padding: .32rem .6rem; font-size: 12px; }
body.user-theme .account-validity strong { font-size: 15px; }

body.user-theme .settings-panel { margin-top: .55rem; }
body.user-theme .settings-group-title { padding: .55rem .95rem .3rem; font-size: 11px; letter-spacing: .06em; }
body.user-theme .settings-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .65rem;
  min-height: 50px;
  padding: .5rem .95rem;
}
body.user-theme .settings-icon { width: 30px; height: 30px; border-radius: 9px; }
body.user-theme .settings-icon svg { width: 16px; height: 16px; }
body.user-theme .settings-row strong { font-size: 14px; }
body.user-theme .settings-row small { display: none; }
body.user-theme .logout-panel { margin-top: .55rem; }
body.user-theme .settings-list + .settings-group-title,
body.user-theme .settings-panel .settings-group-title:not(:first-child) { border-top: 1px solid var(--line, #ebedf0); }
body.user-theme .settings-group-title:first-child { padding-top: .35rem; }

/* ---- 预约页：紧凑按键与间距 ---- */
body.user-theme .reserve-flow { gap: .7rem; }
body.user-theme .reserve-section { padding: .85rem .9rem; }
body.user-theme .reserve-section-head { margin-bottom: .55rem; }
body.user-theme .reserve-option-block { gap: .3rem; }
body.user-theme .choice-row { gap: .4rem; margin-bottom: .55rem; }
body.user-theme .choice span { min-height: 46px; padding: .42rem .5rem; border-radius: 10px; }
body.user-theme .choice strong { font-size: 13px; }
body.user-theme .choice small { font-size: 11px; }
body.user-theme .reserve-schedule .time-presets { margin-top: .35rem; }
body.user-theme .time-presets button { min-height: 24px; padding: .15rem .45rem; font-size: 11.5px; }
body.user-theme .seat-select-flow { gap: .45rem; min-height: 0; }
body.user-theme .seat-select-flow label { padding: .6rem .65rem; }
body.user-theme .seat-select-flow label > span:first-child { min-height: 0; }
body.user-theme .seat-select-flow select { margin-top: .15rem; }
body.user-theme .seat-option { min-height: 34px; padding: .35rem .3rem; font-size: 12.5px; border-radius: 8px; }
body.user-theme .seat-picker { max-height: 240px; gap: .4rem; padding: .55rem; }
body.user-theme .seat-legend { margin-top: .4rem; font-size: 11px; }
body.user-theme .advanced-options summary { padding-top: .5rem; font-size: 12.5px; }
body.user-theme .advanced-options .form-grid { margin-top: .55rem; }

body.user-theme .reserve-summary { margin-top: .55rem; padding: .7rem .85rem; }
body.user-theme .reserve-summary h2 { font-size: 14.5px; }
body.user-theme .reserve-summary p { font-size: 12px; }
body.user-theme .summary-pills { gap: .3rem; }
body.user-theme .summary-pills span { padding: .22rem .45rem; font-size: 11px; }
body.user-theme .sticky-submit { padding: .5rem .7rem; gap: .5rem; }
body.user-theme .sticky-submit .button { min-height: 36px; font-size: 13.5px; }

@media (max-width: 640px) {
  body.user-theme .reserve-section { padding: .75rem; }
  body.user-theme .choice span { min-height: 42px; }
  body.user-theme .seat-option { min-height: 36px; }
  body.user-theme .job-actions { width: 100%; }
  body.user-theme .job-actions form { flex: 1 1 44%; }
  body.user-theme .job-actions .button,
  body.user-theme .job-actions > form > .button { width: 100%; min-height: 36px; }
  body.user-theme .settings-row { min-height: 48px; }
}


/* ---- 当前预约页：会话失效时的一键更新（T 系列） ---- */
body.user-theme .session-fix { margin: 0 0 .7rem; }
body.user-theme .session-fix .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: .45rem .9rem;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
}
@media (max-width: 640px) {
  body.user-theme .session-fix .button { width: 100%; }
}


/* ==========================================================================
   更新日志（2026-09-25 · U 系列）
   ========================================================================== */

/* 正文按换行分段（后台纯文本编辑，不做富文本） */
.log-body {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ---- 用户端 ---- */
body.user-theme .changelog-panel { margin-top: .55rem; }
body.user-theme .changelog-list { display: grid; }
body.user-theme .changelog-item { border-bottom: 1px solid var(--line, #ebedf0); }
body.user-theme .changelog-item:last-child { border-bottom: 0; }

body.user-theme .log-detail > summary {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 46px;
  padding: .55rem .95rem;
  cursor: pointer;
  list-style: none;
}
body.user-theme .log-detail > summary::-webkit-details-marker { display: none; }
body.user-theme .log-detail > summary::after {
  content: "▾";
  margin-left: auto;
  color: #94a3b8;
  font-size: 12px;
  transition: transform .15s ease;
}
body.user-theme .log-detail[open] > summary::after { transform: rotate(180deg); }
body.user-theme .log-detail > summary strong { font-size: 14px; font-weight: 700; }
body.user-theme .log-date { color: var(--muted, #8a919c); font-size: 11.5px; white-space: nowrap; }
body.user-theme .log-detail > summary .inline-code { font-size: 11px; }

body.user-theme .log-detail .log-body {
  margin: 0 .95rem .7rem;
  padding: .6rem .75rem;
  background: var(--surface-soft, #f7f8fa);
  border-radius: 10px;
  color: #334155;
  font-size: 13px;
  line-height: 1.65;
}

body.user-theme .changelog-more {
  display: block;
  padding: .55rem .95rem;
  color: var(--primary, #1a49c0);
  font-size: 12.5px;
  font-weight: 700;
}

/* ---- 管理端 ---- */
.admin-theme .changelog-form { display: grid; gap: .6rem; grid-template-columns: 160px minmax(0, 1fr); margin-bottom: .6rem; }
.admin-theme .changelog-form input { width: 100%; }
.admin-theme .admin-create-card textarea { width: 100%; min-height: 110px; resize: vertical; font-family: inherit; }
.admin-theme .checkbox-line { display: flex; align-items: center; gap: .4rem; margin: .55rem 0 .7rem; font-size: 12.5px; }
.admin-theme .checkbox-line input { width: auto; }
.admin-theme .log-detail > summary { cursor: pointer; font-size: 12.5px; font-weight: 650; list-style: none; }
.admin-theme .log-detail > summary::-webkit-details-marker { display: none; }
.admin-theme .log-detail > summary::after { content: " ▾"; color: #94a3b8; font-size: 11px; }
.admin-theme .log-detail[open] > .log-body {
  margin-top: .4rem;
  padding: .5rem .6rem;
  background: var(--surface-soft, #f7f8fa);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .admin-theme .changelog-form { grid-template-columns: minmax(0, 1fr); }
}

/* 「我的」内容入口上的「新」角标（更新日志 / 作者的话） */
body.user-theme .new-badge {
  flex: 0 0 auto;
  padding: 0 .38rem;
  border-radius: 999px;
  background: var(--danger-soft, #fdebec);
  color: var(--danger, #d54851);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.6;
  white-space: nowrap;
}
body.user-theme .new-badge[hidden] { display: none; }


/* ==========================================================================
   功能预览（未绑定用户的引导页，2026-09-25 · Y 系列）
   ========================================================================== */

body.user-theme .preview-page { display: grid; gap: .7rem; }
body.user-theme .preview-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
body.user-theme .preview-lead { margin: 0; font-size: 13px; }

body.user-theme .preview-cta { display: flex; flex-wrap: wrap; gap: .5rem; }
body.user-theme .preview-cta .button { flex: 1 1 auto; justify-content: center; }
body.user-theme .preview-cta-bottom { margin-top: .2rem; }

body.user-theme .preview-block {
  border: 1px solid var(--line, #ebedf0);
  border-radius: 12px;
  background: var(--surface, #fff);
  overflow: hidden;
}
body.user-theme .preview-block > summary {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-height: 46px;
  padding: .55rem .9rem;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  list-style: none;
}
body.user-theme .preview-block > summary::-webkit-details-marker { display: none; }
body.user-theme .preview-block > summary::after { content: "▾"; margin-left: auto; color: #94a3b8; font-size: 12px; }
body.user-theme .preview-block[open] > summary { border-bottom: 1px solid var(--line, #ebedf0); }
body.user-theme .preview-body { display: grid; gap: .6rem; padding: .7rem .9rem .9rem; }
body.user-theme .preview-note { margin: 0; color: var(--muted, #8a919c); font-size: 12px; line-height: 1.6; }
body.user-theme .preview-steps { display: grid; gap: .5rem; }
body.user-theme .preview-steps label { display: grid; gap: .25rem; font-size: 12.5px; }
body.user-theme .preview-steps select { background: var(--surface-soft, #f7f8fa); }
body.user-theme .preview-block .job-row { flex-wrap: wrap; }

/* 未绑定引导条 */
body.user-theme .preview-notice {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .6rem;
  padding: .6rem .8rem;
  background: var(--warning-soft, #fff4e3);
  border: 1px solid #f0d9b5;
  border-radius: 12px;
}
body.user-theme .preview-notice-inline { margin: .7rem 0 0; }
body.user-theme .preview-notice-icon { font-size: 18px; color: var(--warning, #c77b1a); line-height: 1; }
body.user-theme .preview-notice > div { display: grid; gap: .1rem; min-width: 0; flex: 1; }
body.user-theme .preview-notice strong { font-size: 13.5px; }
body.user-theme .preview-notice small { color: #8a6a3a; font-size: 11.5px; }

@media (max-width: 640px) {
  body.user-theme .preview-cta .button { flex: 1 1 100%; }
  body.user-theme .preview-notice { flex-wrap: wrap; }
  body.user-theme .preview-notice .button { flex: 1 1 100%; }
}


/* ---- 账号注销（危险区，Z 系列） ---- */
body.user-theme .danger-zone { border: 1px solid #f3c6c9; border-radius: 12px; background: #fffafb; }
body.user-theme .danger-zone > summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 50px;
  padding: .5rem .95rem;
  cursor: pointer;
  list-style: none;
}
body.user-theme .danger-zone > summary::-webkit-details-marker { display: none; }
body.user-theme .danger-zone-title { flex: 1; color: var(--danger, #d54851); font-size: 14px; font-weight: 750; }
body.user-theme .danger-zone[open] > summary { border-bottom: 1px solid #f3c6c9; }
body.user-theme .danger-zone-body { display: grid; gap: .6rem; padding: .7rem .95rem .9rem; }
body.user-theme .danger-zone-warn { margin: 0; color: #9a3b44; font-size: 12.5px; line-height: 1.65; }
body.user-theme .danger-zone-body form { display: grid; gap: .5rem; }
body.user-theme .danger-zone-body label { display: grid; gap: .25rem; font-size: 12.5px; }
body.user-theme .danger-zone-body .button { justify-self: start; min-height: 38px; }

@media (max-width: 640px) {
  body.user-theme .danger-zone-body .button { justify-self: stretch; }
}

/* AC1 保底座位开关：占满整行，跟在高级重试设置的三列表单后面 */
body.user-theme .advanced-options .guarantee-line {
  display: flex; align-items: center; gap: .45rem;
  font-size: 12.5px; color: var(--muted);
}
body.user-theme .advanced-options .guarantee-line input { width: auto; min-height: 0; margin: 0; }

/* AD1 用户建议：首页表单 + 管理端卡片 */
body.user-theme .suggest-form textarea { width: 100%; min-height: 64px; resize: vertical; }
body.user-theme .suggest-actions { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .5rem; }
body.user-theme .suggest-actions small { color: var(--muted); font-size: 11.5px; }
body.user-theme .suggest-history { margin-top: .8rem; }
body.user-theme .suggest-history > summary { font-size: 12.5px; color: var(--muted); cursor: pointer; }
body.user-theme .suggest-history-list { display: grid; gap: .45rem; margin-top: .55rem; }
body.user-theme .suggest-history-item { padding: .55rem .7rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
body.user-theme .suggest-history-item span { color: var(--muted); font-size: 11px; }
body.user-theme .suggest-history-item p { margin: .3rem 0 0; color: var(--text); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }

.suggestion-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .7rem; align-items: start; padding: .85rem .95rem; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 12px; }
.suggestion-card.is-new { border-left-color: var(--primary); }
.suggestion-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: 12.5px; }
.suggestion-head strong { font-size: 13px; word-break: break-word; }
.suggestion-head small { color: var(--muted); }
.suggestion-body { margin: .5rem 0 0; padding: .6rem .7rem; background: var(--surface-soft); border-radius: 8px; color: var(--text); font-size: .84rem; white-space: pre-wrap; word-break: break-word; }
.suggestion-card .review-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 640px) {
  .suggestion-card { grid-template-columns: 1fr; }
  .suggestion-card .review-actions { justify-content: flex-start; }
}
