/* ==========================================================================
   小书屋 · 视觉样式
   ========================================================================== */

:root {
  --bg: #f4efe4;
  --bg-deep: #ebe1d1;
  --card: #fffdf8;
  --ink: #1f2b25;
  --ink-2: #3d4b43;
  --muted: #6f7c73;
  --line: #e2d6c1;
  --line-strong: #d2c2a8;
  --accent: #2f6b4f;
  --accent-dark: #24533d;
  --accent-soft: #e4efe8;
  --terracotta: #b85c3e;
  --terracotta-soft: #f7e7df;
  --gold: #c99a4c;
  --danger: #a93b3b;
  --danger-soft: #f8e8e5;
  --radius: 20px;
  --shadow-sm: 0 8px 20px -14px rgba(50, 45, 30, 0.35);
  --shadow: 0 24px 55px -32px rgba(50, 45, 30, 0.4);
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 540px at 88% -10%, rgba(201, 154, 76, 0.17), transparent 62%),
    radial-gradient(820px 500px at -12% 6%, rgba(47, 107, 79, 0.1), transparent 58%);
  background-attachment: fixed;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.01em;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  display: block;
}

::selection {
  background: rgba(47, 107, 79, 0.22);
}

:focus-visible {
  outline: 3px solid rgba(47, 107, 79, 0.32);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.shell {
  width: min(1160px, 100% - 56px);
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   顶栏
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(210, 194, 168, 0.55);
  background: rgba(244, 239, 228, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(145deg, #357a5a, #24533d);
  color: #f4ecdb;
  box-shadow: 0 10px 22px -12px rgba(36, 83, 61, 0.7);
}

.brand-mark svg {
  width: 26px;
  height: 26px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  max-width: 9em;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, #357a5a 0%, #24533d 100%);
  color: #fff;
  box-shadow: 0 12px 24px -13px rgba(36, 83, 61, 0.7);
}

.btn-primary:hover {
  box-shadow: 0 16px 28px -13px rgba(36, 83, 61, 0.75);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.55);
  color: var(--ink-2);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  background: var(--card);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #922f2f;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.84rem;
}

.btn-lg {
  padding: 14px 27px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 28px;
  padding: 34px 0 18px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow-line {
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.hero h1 {
  margin-top: 14px;
  font-size: clamp(2.35rem, 4.1vw, 3.3rem);
  line-height: 1.21;
  letter-spacing: 0.015em;
}

.hero h1 .mark {
  position: relative;
  display: inline-block;
  color: var(--accent);
}

.hero h1 .mark::after {
  content: "";
  position: absolute;
  left: 0.02em;
  right: 0.02em;
  bottom: 0.02em;
  height: 0.28em;
  border-radius: 999px;
  background: rgba(201, 154, 76, 0.32);
  z-index: -1;
}

.hero-sub {
  max-width: 34em;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  min-height: 38px;
  margin-top: 17px;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink-2);
  font-size: 0.86rem;
}

.stat-chip b {
  color: var(--accent-dark);
  font-family: var(--font-serif);
  font-size: 1.12rem;
  line-height: 1;
}

.stat-chip.muted-chip {
  color: var(--muted);
  border-style: dashed;
}

.hero-art {
  justify-self: end;
  width: min(100%, 430px);
  margin-right: -6px;
  animation: float-in 0.8s ease both;
}

.hero-art svg {
  width: 100%;
  height: auto;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   公告
   -------------------------------------------------------------------------- */

.notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px 18px;
  border: 1px solid rgba(201, 154, 76, 0.35);
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(250, 242, 222, 0.9), rgba(255, 253, 248, 0.75));
  color: #6b5426;
  font-size: 0.92rem;
}

.notice-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border-radius: 9px;
  background: rgba(201, 154, 76, 0.18);
  color: #9a6f21;
}

.notice-banner p {
  line-height: 1.7;
  white-space: pre-line;
}

/* --------------------------------------------------------------------------
   预约表单
   -------------------------------------------------------------------------- */

.reserve-card {
  position: relative;
  margin-top: 10px;
  padding: 32px 38px 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(252, 248, 240, 0.96));
  box-shadow: var(--shadow);
}

.reserve-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: 26px 26px 0 0;
  background: linear-gradient(90deg, var(--accent), #6f9a79 38%, var(--gold) 72%, var(--terracotta));
  opacity: 0.8;
}

.card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line);
}

.card-head h2 {
  margin-top: 8px;
  font-size: 1.85rem;
  line-height: 1.3;
}

.card-hint {
  padding-bottom: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.closed-banner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid rgba(184, 92, 62, 0.3);
  border-radius: 14px;
  background: var(--terracotta-soft);
  color: #7d3f2a;
  font-size: 0.9rem;
}

.closed-banner strong {
  font-size: 0.95rem;
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 22px 0 6px;
  border: 0;
}

.form-section + .form-section {
  border-top: 1px dashed var(--line);
}

.form-section legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.optional {
  margin-left: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.section-note {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field-label {
  color: var(--ink-2);
  font-size: 0.87rem;
  font-weight: 600;
}

.field-label i {
  color: var(--terracotta);
  font-style: normal;
}

input[type="text"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffefb;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.5;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
  resize: vertical;
  min-height: 64px;
}

input::placeholder,
textarea::placeholder {
  color: #a8a294;
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--line-strong);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 107, 79, 0.11);
  background: #fff;
}

input.invalid,
textarea.invalid {
  border-color: #c45b4c;
  box-shadow: 0 0 0 4px rgba(196, 91, 76, 0.1);
}

.field-error {
  min-height: 0;
  color: var(--danger);
  font-size: 0.78rem;
  line-height: 1.4;
}

.field-error:empty {
  display: none;
}

/* 书单 */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 14px;
}

.book-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 196px;
  padding: 18px 18px 15px 23px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(155deg, #fffdf8 0%, #fbf5e9 100%);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.book-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--spine, var(--accent));
}

.book-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.book-card.selected {
  border-color: rgba(47, 107, 79, 0.65);
  background: linear-gradient(155deg, #fffefb 0%, #f1f8f3 100%);
  box-shadow: 0 18px 30px -24px rgba(47, 107, 79, 0.6);
}

.book-glyph {
  position: absolute;
  top: -8px;
  right: 10px;
  color: var(--spine, var(--accent));
  font-family: var(--font-serif);
  font-size: 4.2rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.09;
  pointer-events: none;
  user-select: none;
}

.book-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
}

.book-no {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.book-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.book-card.selected .book-check {
  opacity: 1;
  transform: scale(1);
}

.book-card h3 {
  position: relative;
  margin-top: 2px;
  font-size: 1.12rem;
  line-height: 1.4;
  word-break: break-word;
}

.book-author {
  color: var(--muted);
  font-size: 0.78rem;
}

.book-note {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 1px;
  color: #8b8576;
  font-size: 0.78rem;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.stepper {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0;
  margin-top: auto;
  padding-top: 10px;
}

.stepper button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: #fffefb;
  color: var(--ink-2);
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.stepper button:first-child {
  border-radius: 10px 0 0 10px;
}

.stepper button:last-child {
  border-radius: 0 10px 10px 0;
}

.stepper button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.stepper button:active {
  background: #d8e8dd;
}

.qty-input {
  width: 48px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-inline: 0;
  border-radius: 0;
  background: #fffefb;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty-input:focus {
  box-shadow: inset 0 0 0 2px rgba(47, 107, 79, 0.18);
  border-color: var(--line);
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.book-card.selected .qty-input {
  color: var(--accent-dark);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 46px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.6);
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  font-size: 2rem;
  line-height: 1;
  opacity: 0.8;
}

.empty-state strong {
  color: var(--ink-2);
  font-size: 1rem;
}

.empty-state p {
  font-size: 0.86rem;
}

.form-alert {
  margin-top: 20px;
  padding: 12px 16px;
  border: 1px solid rgba(169, 59, 59, 0.24);
  border-radius: 12px;
  background: var(--danger-soft);
  color: #8a3030;
  font-size: 0.88rem;
  line-height: 1.6;
}

.submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
}

.selection-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.selection-summary b {
  color: var(--accent-dark);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1;
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* --------------------------------------------------------------------------
   流程 & 页脚
   -------------------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0 0;
}

.step-card {
  position: relative;
  padding: 22px 24px 20px;
  border: 1px solid rgba(226, 214, 193, 0.8);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.45);
}

.step-index {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
}

.step-card h3 {
  font-size: 1.08rem;
}

.step-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 46px;
  padding: 26px 0 34px;
  border-top: 1px solid rgba(210, 194, 168, 0.5);
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer strong {
  color: var(--ink-2);
  font-family: var(--font-serif);
  letter-spacing: 0.06em;
}

.footer-muted {
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   管理员登录
   -------------------------------------------------------------------------- */

.admin-shell {
  padding-top: 42px;
  padding-bottom: 60px;
}

.login-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 210px);
  padding: 24px 0 50px;
}

.login-card {
  width: min(430px, 100%);
  padding: 42px 42px 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, #fffdf8, #fbf6ec);
  box-shadow: var(--shadow);
  animation: modal-in 0.35s ease both;
}

.lock-badge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, #357a5a, #24533d);
  color: #f4ecdb;
  box-shadow: 0 14px 26px -14px rgba(36, 83, 61, 0.65);
}

.login-card h1 {
  margin-top: 10px;
  font-size: 2rem;
  line-height: 1.3;
}

.login-sub {
  margin: 10px 0 26px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 62px;
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 5px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
}

.pw-toggle:hover {
  background: var(--bg-deep);
  color: var(--ink-2);
}

.login-card .btn-block {
  margin-top: 20px;
}

.login-foot {
  margin-top: 18px;
  color: #8a8475;
  font-size: 0.76rem;
  line-height: 1.6;
  text-align: center;
}

/* --------------------------------------------------------------------------
   后台整体
   -------------------------------------------------------------------------- */

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
}

.admin-head h1 {
  margin-top: 7px;
  font-size: 2rem;
  line-height: 1.3;
}

.admin-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 3px;
}

.default-pw-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(201, 154, 76, 0.4);
  border-radius: 13px;
  background: rgba(250, 242, 222, 0.85);
  color: #76571e;
  font-size: 0.85rem;
}

.default-pw-banner svg {
  flex: none;
}

.default-pw-banner span {
  flex: 1;
}

.default-pw-banner button {
  flex: none;
  padding: 4px 10px;
  border: 1px solid rgba(118, 87, 30, 0.3);
  border-radius: 999px;
  background: transparent;
  color: #76571e;
  font-size: 0.78rem;
  font-weight: 600;
}

.default-pw-banner button:hover {
  background: rgba(201, 154, 76, 0.16);
}

.admin-tabs {
  position: sticky;
  top: 73px;
  z-index: 25;
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(210, 194, 168, 0.55);
  background: rgba(244, 239, 228, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tabs button {
  flex: none;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.admin-tabs button:hover {
  background: rgba(255, 253, 248, 0.75);
  color: var(--ink-2);
}

.admin-tabs button.active {
  background: var(--ink);
  color: #f7f2e7;
  box-shadow: 0 8px 18px -12px rgba(31, 43, 37, 0.7);
}

.admin-panel {
  animation: panel-in 0.28s ease both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   总览
   -------------------------------------------------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  position: relative;
  padding: 20px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  top: -34px;
  right: -26px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--tint, rgba(47, 107, 79, 0.09));
}

.stat-card:nth-child(1) {
  --tint: rgba(47, 107, 79, 0.1);
  --bar: #2f6b4f;
}

.stat-card:nth-child(2) {
  --tint: rgba(201, 154, 76, 0.14);
  --bar: #c99a4c;
}

.stat-card:nth-child(3) {
  --tint: rgba(184, 92, 62, 0.11);
  --bar: #b85c3e;
}

.stat-card:nth-child(4) {
  --tint: rgba(63, 108, 138, 0.1);
  --bar: #3f6c8a;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--bar, var(--accent));
  opacity: 0.75;
}

.stat-label {
  position: relative;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.stat-value {
  position: relative;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.stat-value small {
  margin-left: 4px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
}

.stat-foot {
  position: relative;
  margin-top: 2px;
  color: #918b7d;
  font-size: 0.72rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}

.admin-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 18px 40px -38px rgba(50, 45, 30, 0.5);
}

.admin-card + .admin-card,
.panel-grid + .admin-card {
  margin-top: 16px;
}

.panel-grid .admin-card + .admin-card {
  margin-top: 0;
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-card-head h2 {
  font-size: 1.16rem;
  line-height: 1.4;
}

.admin-card-head span {
  color: var(--muted);
  font-size: 0.76rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.data-table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(226, 214, 193, 0.55);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: rgba(244, 239, 228, 0.45);
}

.data-table .num {
  font-variant-numeric: tabular-nums;
}

.data-table .strong {
  color: var(--ink);
  font-weight: 600;
}

.data-table .muted {
  color: var(--muted);
}

.bar-col {
  width: 24%;
}

.bar {
  width: 100%;
  min-width: 60px;
  height: 7px;
  border-radius: 999px;
  background: #efe7d8;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3f7f5f, #6f9a79);
}

.empty-row td {
  padding: 30px 10px;
  color: var(--muted);
  text-align: center;
}

.tag {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.66rem;
  font-weight: 500;
  vertical-align: 2px;
}

.tag.green {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.recent-list {
  display: flex;
  flex-direction: column;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(226, 214, 193, 0.8);
}

.recent-item:last-child {
  border-bottom: 0;
}

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(145deg, #e7f0e9, #d8e8dd);
  color: var(--accent-dark);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
}

.recent-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.45;
}

.recent-main strong {
  font-size: 0.88rem;
  font-weight: 600;
}

.recent-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-item time {
  flex: none;
  color: #9a9486;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   预约明细
   -------------------------------------------------------------------------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.search-box {
  position: relative;
  flex: 1 1 260px;
  min-width: 210px;
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 13px;
  transform: translateY(-50%);
  color: #9a9486;
  pointer-events: none;
}

.search-box input {
  padding-left: 38px;
}

.toolbar select {
  width: auto;
  min-width: 132px;
}

.result-meta {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
}

.pagination button {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffefb;
  color: var(--ink-2);
  font-size: 0.78rem;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination span {
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bg-deep);
  color: var(--ink-2);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78em;
  letter-spacing: 0.02em;
}

.link-btn {
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.link-btn:hover {
  text-decoration: underline;
}

.link-danger {
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
}

.link-danger:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   书籍管理
   -------------------------------------------------------------------------- */

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.inline-form .field {
  flex: 1 1 180px;
}

.inline-form .field.grow {
  flex: 2 1 260px;
}

.inline-form .btn {
  flex: none;
  margin-bottom: 1px;
}

.book-list {
  display: flex;
  flex-direction: column;
}

.book-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(226, 214, 193, 0.8);
}

.book-row:last-child {
  border-bottom: 0;
}

.book-row.off {
  opacity: 0.62;
}

.book-row-main {
  display: flex;
  align-items: flex-start;
  flex: 1;
  gap: 12px;
  min-width: 0;
}

.book-dot {
  flex: none;
  width: 7px;
  height: 38px;
  margin-top: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.book-row.off .book-dot {
  background: #b9b2a3;
}

.book-row-main h3 {
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-row-main p {
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-row-stats {
  flex: none;
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.book-row-stats b {
  color: var(--ink-2);
  font-family: var(--font-serif);
  font-size: 1rem;
}

.book-row-actions {
  display: flex;
  flex: none;
  gap: 2px;
}

.book-row-actions button {
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
}

.book-row-actions button:hover:not(:disabled) {
  text-decoration: underline;
}

.book-row-actions button[data-del-book] {
  color: var(--danger);
}

.book-row-actions button:disabled {
  color: #b4ada0;
  cursor: not-allowed;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   设置
   -------------------------------------------------------------------------- */

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  align-items: start;
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffefb;
}

.switch-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-copy strong {
  font-size: 0.88rem;
  font-weight: 600;
}

.switch-copy span {
  color: var(--muted);
  font-size: 0.75rem;
}

.switch {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  display: block;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #d6cbb7;
  transition: background 0.2s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(50, 45, 30, 0.25);
  transition: transform 0.2s ease;
}

.switch input:checked + .switch-track {
  background: var(--accent);
}

.switch input:checked + .switch-track::after {
  transform: translateX(20px);
}

.switch input:focus-visible + .switch-track {
  outline: 3px solid rgba(47, 107, 79, 0.3);
  outline-offset: 2px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-hint {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.7;
}

.danger-zone {
  border-color: rgba(169, 59, 59, 0.22);
  background: linear-gradient(180deg, #fffdf8, #fdf6f4);
}

.danger-zone .admin-card-head h2 {
  color: #8a3030;
}

.danger-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.danger-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 14px;
  border: 1px solid rgba(169, 59, 59, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}

.danger-item strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
}

.danger-item span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.74rem;
}

.btn-outline-danger {
  border-color: rgba(169, 59, 59, 0.35);
  background: transparent;
  color: var(--danger);
}

.btn-outline-danger:hover {
  background: var(--danger-soft);
}

/* --------------------------------------------------------------------------
   加载 / 提示 / 弹窗
   -------------------------------------------------------------------------- */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
  color: var(--muted);
  font-size: 0.86rem;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner.in-btn {
  width: 15px;
  height: 15px;
  border-color: rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
}

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 120;
  max-width: min(440px, calc(100vw - 32px));
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #f7f2e7;
  box-shadow: 0 16px 34px -18px rgba(31, 43, 37, 0.8);
  font-size: 0.86rem;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.success {
  background: #24533d;
}

.toast.error {
  background: #8a3030;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(31, 43, 37, 0.42);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: fade-in 0.2s ease both;
}

.modal {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: 88vh;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 40px 90px -40px rgba(31, 43, 37, 0.65);
  animation: modal-in 0.25s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.modal.wide {
  width: min(680px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  font-size: 1.2rem;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
}

.icon-btn:hover {
  background: var(--bg-deep);
  color: var(--ink);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--line);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.confirm-msg {
  color: var(--ink-2);
  font-size: 0.92rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.success {
  padding: 4px 0 0;
  text-align: center;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.7rem;
  font-weight: 700;
  animation: pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes pop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success h3 {
  font-size: 1.35rem;
}

.success > p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.86rem;
}

.success > p code {
  margin-left: 2px;
  font-size: 0.85em;
}

.success-list {
  margin: 18px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  text-align: left;
}

.success-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px dashed var(--line);
  font-size: 0.88rem;
  list-style: none;
}

.success-list li:last-child {
  border-bottom: 0;
}

.success-list b {
  color: var(--accent-dark);
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.success-total {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 0.88rem;
}

.success-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: #98917f;
  font-size: 0.74rem;
}

.summary {
  color: var(--ink-2);
  font-size: 0.88rem;
  line-height: 1.9;
}

.summary-head {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.summary-head strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

.summary-head span {
  color: var(--muted);
  font-size: 0.76rem;
}

.summary h4 {
  margin: 16px 0 6px;
  color: var(--accent-dark);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}

.summary-row span:last-child {
  flex: none;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.summary-empty {
  padding: 8px 0;
  color: var(--muted);
}

.summary-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: #98917f;
  font-size: 0.72rem;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr 0.8fr;
  }

  .hero-art {
    margin-right: 0;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 36px, 1160px);
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }

  .hero-art {
    justify-self: center;
    width: min(84%, 380px);
    margin-top: 4px;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 8.6vw, 3.1rem);
  }

  .reserve-card {
    padding: 28px 24px 24px;
  }

  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .grid-3 .field:last-child {
    grid-column: 1 / -1;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .step-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    align-items: center;
    padding: 16px 20px;
  }

  .step-index {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .step-card p {
    grid-column: 2;
  }

  .admin-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .admin-tabs {
    top: 73px;
  }

  .book-row {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .book-row-main {
    flex-basis: 100%;
  }

  .book-row-stats {
    margin-left: 19px;
  }

  .book-row-actions {
    margin-left: auto;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 28px, 1160px);
  }

  .topbar-inner {
    min-height: 66px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-text strong {
    font-size: 1.08rem;
  }

  .brand-text small {
    display: none;
  }

  .admin-entry {
    padding: 8px 12px;
  }

  .hero {
    padding: 24px 0 14px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 8.8vw, 2.6rem);
  }

  .hero-sub {
    margin-top: 14px;
    font-size: 0.92rem;
  }

  .hero-art {
    display: none;
  }

  .hero-stats {
    margin-top: 16px;
  }

  .admin-tabs {
    top: 66px;
  }

  .stat-chip {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .reserve-card {
    padding: 24px 18px 20px;
    border-radius: 20px;
  }

  .card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .card-hint {
    padding-bottom: 0;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .book-card {
    min-height: 170px;
  }

  .submit-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .selection-summary {
    justify-content: center;
  }

  .submit-bar .btn {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  .login-card {
    padding: 30px 22px 26px;
  }

  .admin-shell {
    padding-top: 26px;
  }

  .admin-head h1 {
    font-size: 1.55rem;
  }

  .stat-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 16px 16px 14px;
  }

  .stat-value {
    font-size: 1.9rem;
  }

  .admin-card {
    padding: 18px 16px;
  }

  .admin-card-head {
    flex-wrap: wrap;
    gap: 8px;
  }

  .toolbar {
    gap: 7px;
  }

  .toolbar select {
    flex: 1 1 132px;
  }

  .toolbar .btn {
    flex: 1 1 auto;
  }

  .pagination {
    justify-content: center;
  }

  .inline-form .field,
  .inline-form .field.grow {
    flex-basis: 100%;
  }

  .inline-form .btn {
    width: 100%;
  }

  .danger-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .modal-backdrop {
    padding: 12px;
    align-items: flex-end;
  }

  .modal {
    max-height: 90vh;
    border-radius: 20px;
  }

  .modal-head,
  .modal-body {
    padding-inline: 18px;
  }

  .modal-foot {
    padding-inline: 18px;
  }
}

/* 小屏把明细表变成卡片 */
@media (max-width: 720px) {
  .data-table.responsive-table thead {
    display: none;
  }

  .data-table.responsive-table,
  .data-table.responsive-table tbody {
    display: block;
  }

  .data-table.responsive-table tr {
    display: block;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fffefb;
  }

  .data-table.responsive-table tr:hover {
    background: #fffefb;
  }

  .data-table.responsive-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 0;
    border: 0;
    text-align: right;
  }

  .data-table.responsive-table td::before {
    content: attr(data-label);
    flex: none;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: left;
  }

  .data-table.responsive-table .empty-row {
    display: block;
    padding: 24px;
    text-align: center;
  }

  .data-table.responsive-table .empty-row td {
    display: block;
    text-align: center;
  }

  .data-table.responsive-table .empty-row td::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   打印
   -------------------------------------------------------------------------- */

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .admin-head-actions,
  .admin-tabs,
  .default-pw-banner,
  .toolbar,
  .pagination,
  .site-footer,
  .toast,
  .modal-backdrop,
  .card-actions,
  .book-row-actions,
  .link-danger {
    display: none !important;
  }

  .shell {
    width: 100%;
  }

  .admin-shell {
    padding: 0;
  }

  .admin-card,
  .stat-card {
    border-color: #ddd;
    box-shadow: none;
    break-inside: avoid;
  }

  .data-table {
    font-size: 11px;
  }

  .data-table th,
  .data-table td {
    padding: 5px 7px;
  }
}
