:root {
  --ink: #18201e;
  --muted: #68736f;
  --line: #dfe5e2;
  --surface: #ffffff;
  --canvas: #f3f6f4;
  --sidebar: #111b19;
  --sidebar-muted: #91a09b;
  --teal: #168978;
  --teal-dark: #0c6a5d;
  --teal-soft: #e5f5f1;
  --amber: #b8750b;
  --amber-soft: #fff3d8;
  --red: #b43b3b;
  --red-soft: #fdeaea;
  --blue: #2f6ea3;
  --blue-soft: #e8f1f8;
  --shadow: 0 8px 24px rgba(23, 39, 34, 0.07);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--canvas); font-size: 14px; letter-spacing: 0; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.boot-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.boot-mark,
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: var(--teal);
  color: white;
  font-weight: 800;
  font-size: 13px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 42%) 1fr;
  background: var(--surface);
}

.auth-side {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 48px;
  color: white;
  background: #13201d;
}

.auth-side::after {
  content: "";
  position: absolute;
  inset: auto -80px -90px auto;
  width: 310px;
  height: 310px;
  border: 70px solid rgba(47, 171, 150, 0.14);
  border-radius: 50%;
}

.auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.auth-brand strong { display: block; font-size: 18px; }
.auth-brand span { color: #9eada8; font-size: 12px; }
.auth-copy { position: relative; z-index: 1; max-width: 430px; }
.auth-copy h1 { margin: 0 0 16px; font-size: 40px; line-height: 1.16; letter-spacing: 0; }
.auth-copy p { margin: 0; color: #b3c0bc; line-height: 1.8; font-size: 15px; }
.public-stats { display: flex; gap: 28px; margin-top: 28px; }
.public-stats div { display: grid; gap: 4px; }
.public-stats strong { color: #fff; font-size: 24px; }
.public-stats span { color: #9eb0a9; font-size: 12px; }
.auth-foot { position: relative; z-index: 1; color: #758680; font-size: 12px; }

.auth-main { display: grid; place-items: center; padding: 36px; }
.auth-box { width: min(410px, 100%); }
.language-toggle { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 6px; padding: 7px 11px; font-weight: 700; cursor: pointer; }
.auth-box > .language-toggle { float: right; margin-bottom: 18px; }
.language-toggle.compact { background: transparent; padding: 5px 9px; font-size: 12px; }
.auth-box h2 { margin: 0 0 8px; font-size: 27px; }
.auth-box > p { margin: 0 0 28px; color: var(--muted); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 24px; background: #edf1ef; border-radius: 7px; }
.auth-tab { border: 0; padding: 9px; background: transparent; color: var(--muted); border-radius: 5px; font-weight: 650; }
.auth-tab.active { background: white; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-weight: 650; font-size: 13px; }
.field-hint { color: var(--muted); font-size: 12px; font-weight: 400; }
input, textarea, select {
  width: 100%;
  border: 1px solid #ced7d3;
  border-radius: 6px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,137,120,.11); }
textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 14px;
  font-weight: 700;
  white-space: nowrap;
}
.btn-primary { background: var(--teal); color: white; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-dark { background: var(--ink); color: white; }
.btn-dark:hover { background: #050a09; }
.btn-secondary { border-color: var(--line); background: white; color: var(--ink); }
.btn-secondary:hover { background: #f7f9f8; }
.btn-danger { border-color: #efb7b7; background: var(--red-soft); color: var(--red); }
.btn-block { width: 100%; }
.btn-small { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.btn-icon { width: 40px; padding: 0; font-size: 19px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 236px;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  color: white;
  background: var(--sidebar);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 20px; border-bottom: 1px solid rgba(255,255,255,.10); }
.brand strong { display: block; font-size: 15px; }
.brand span { display: block; margin-top: 2px; color: var(--sidebar-muted); font-size: 11px; }
.nav { display: grid; gap: 5px; padding: 22px 0; }
.nav-label { padding: 7px 10px 3px; color: #64746e; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.nav-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  padding: 9px 11px;
  background: transparent;
  color: #aebbb7;
  text-align: left;
}
.nav-button:hover { color: white; background: rgba(255,255,255,.06); }
.nav-button.active { color: white; background: #263631; }
.nav-icon { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 5px; color: #8fa09a; background: rgba(255,255,255,.06); font-size: 11px; font-weight: 800; }
.nav-button.active .nav-icon { color: white; background: var(--teal); }
.sidebar-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 8px 4px; border-top: 1px solid rgba(255,255,255,.10); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #31443e; color: white; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.user-meta { min-width: 0; flex: 1; }
.user-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.user-meta span { color: var(--sidebar-muted); font-size: 10px; }
.logout-button { border: 0; background: transparent; color: #87968f; font-size: 18px; }
.logout-button:hover { color: white; }

.main-shell { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-tools { display: flex; align-items: center; gap: 16px; }
.staff-sound-toggle { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-size: 17px; cursor: pointer; }
.staff-sound-toggle:hover { border-color: #148d79; background: var(--teal-soft); }
.staff-sound-toggle.muted { color: var(--muted); background: #f5f7f6; }
.staff-duty { border: 1px solid #148d79; background: #fff; color: #148d79; border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.staff-duty.active { background: #148d79; color: #fff; }
.staff-duty.blocked { border-color: #c5cbc8; background: #eef1ef; color: #626b67; cursor: not-allowed; }
.btn-small { padding: 6px 9px; font-size: 12px; }
.topbar h1 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; }
.mobile-menu { display: none; }
.sync-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.content { width: min(1460px, 100%); margin: 0 auto; padding: 30px 34px 56px; }
.page-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 24px; }
.page-head h2 { margin: 0 0 6px; font-size: 23px; }
.page-head p { margin: 0; color: var(--muted); line-height: 1.55; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}
.stat.emphasis { color: white; background: #14201d; border-color: #14201d; }
.stat span { color: var(--muted); font-size: 12px; }
.stat.emphasis span { color: #9eb0aa; }
.stat strong { font-size: 28px; line-height: 1; }
.stat small { color: var(--muted); }
.stat.emphasis small { color: #83958f; }

.panel { border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0 0 4px; font-size: 16px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 12px; }
.panel-body { padding: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(270px, .6fr); gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.action-row { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 18px; }
.action-row.between { justify-content: space-between; }
.quiet { color: var(--muted); }
.mono { font-family: Consolas, "SFMono-Regular", monospace; }

.notice { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid #efd19a; border-radius: 6px; color: #745016; background: var(--amber-soft); line-height: 1.55; }
.notice-mark { font-weight: 900; }
.notice strong { display: block; margin-bottom: 2px; }
.notice p { margin: 0; font-size: 12px; }
.notice.info { border-color: #bcd5e7; color: #245a82; background: var(--blue-soft); }

.dropzone {
  min-height: 190px;
  display: grid;
  place-items: center;
  border: 1px dashed #9fb0aa;
  border-radius: 6px;
  padding: 24px;
  background: #fafcfb;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.dropzone.dragging { border-color: var(--teal); background: var(--teal-soft); }
.drop-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 7px; background: #e9efec; color: var(--teal-dark); font-size: 24px; }
.dropzone strong { display: block; margin-bottom: 5px; }
.dropzone p { margin: 0 0 15px; color: var(--muted); font-size: 12px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; }
.preview-item { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #eef2f0; }
.preview-item img { width: 100%; height: 100%; object-fit: contain; }
.preview-remove { position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; border: 0; border-radius: 50%; color: white; background: rgba(17,27,25,.82); }

.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 14px; }
.task-card { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: white; }
.task-qr { aspect-ratio: 1.35; display: grid; place-items: center; overflow: hidden; background: #eef2f0; border-bottom: 1px solid var(--line); cursor: zoom-in; }
.task-qr img { width: 100%; height: 100%; object-fit: contain; }
.task-info { padding: 15px; }
.task-title { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 11px; }
.task-title strong { font-family: Consolas, monospace; font-size: 12px; }
.task-meta { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.task-meta-row { display: flex; justify-content: space-between; gap: 12px; }
.task-note { min-height: 35px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); color: #3f4d48; line-height: 1.45; }
.task-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.task-actions.one { grid-template-columns: 1fr; }
.compact-task-list { display: grid; gap: 10px; }
.task-card.compact-task { display: grid; grid-template-columns: 84px minmax(0, 1fr); min-height: 84px; }
.compact-task .task-qr { width: 84px; height: 100%; aspect-ratio: auto; border: 0; border-right: 1px solid var(--line); }
.compact-task .compact-qr-action { display: flex; flex-direction: column; gap: 6px; padding: 10px 6px; color: var(--teal-dark); background: #f1f7f5; cursor: pointer; font-size: 11px; font-weight: 750; }
.compact-task .compact-qr-action:hover { background: var(--teal-soft); }
.task-qr-symbol { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #9fc8bf; border-radius: 5px; background: white; font-size: 10px; font-weight: 850; }
.compact-task .task-info { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(210px, 1fr) minmax(120px, .55fr) minmax(210px, .75fr); align-items: center; gap: 16px; padding: 12px 14px; }
.compact-task.no-actions .task-info { grid-template-columns: minmax(150px, .6fr) minmax(230px, 1fr) minmax(160px, 1.2fr); }
.compact-task .task-title { margin: 0; }
.compact-task .task-meta { gap: 4px; }
.compact-task .task-note { min-height: 0; margin: 0; padding: 0; border: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-task .task-actions { margin: 0; }
.modal-head > div { min-width: 0; }
.modal-subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.assigned-notice { margin-top: 12px; padding: 10px 12px; border-radius: 6px; color: var(--teal-dark); background: var(--teal-soft); text-align: center; font-size: 12px; font-weight: 750; }
.modal-actions.three { grid-template-columns: 1fr 1fr 1fr; }
.modal-actions a { display: inline-flex; align-items: center; justify-content: center; }

.status { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pending { color: var(--amber); background: var(--amber-soft); }
.status-claimed { color: var(--blue); background: var(--blue-soft); }
.status-completed, .status-available, .status-active { color: var(--teal-dark); background: var(--teal-soft); }
.status-failed, .status-disabled { color: var(--red); background: var(--red-soft); }
.status-redeemed, .status-cancelled { color: #59655f; background: #e9eeeb; }
.api-key-meta { display: grid; gap: 5px; min-width: 145px; }
.api-key-meta .status { width: max-content; }
.api-key-meta code { color: var(--teal-dark); font-size: 11px; }
.api-key-meta small { color: var(--muted); white-space: nowrap; }
.staff-row-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 150px; }
.toggle-control { position: relative; display: inline-flex; width: 42px; height: 24px; vertical-align: middle; }
.toggle-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-control span { width: 100%; height: 100%; border-radius: 12px; background: #cfd7d3; transition: background .15s ease; cursor: pointer; }
.toggle-control span::after { content: ""; display: block; width: 18px; height: 18px; margin: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.22); transition: transform .15s ease; }
.toggle-control input:checked + span { background: var(--teal); }
.toggle-control input:checked + span::after { transform: translateX(18px); }
.toggle-control input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.toggle-control input:disabled + span { cursor: wait; opacity: .6; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.range-tabs { display: inline-grid; grid-template-columns: repeat(3, 64px); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #edf1ef; }
.range-tab { min-height: 34px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.range-tab.active { color: var(--ink); background: white; box-shadow: 0 1px 3px rgba(20,32,29,.1); }
.daily-memory { display: grid; gap: 10px; max-height: 470px; overflow-y: auto; padding: 18px 20px; }
.daily-row { display: grid; grid-template-columns: 92px minmax(120px, 1fr) 38px; align-items: center; gap: 12px; min-height: 24px; font-size: 12px; }
.daily-row time { color: var(--muted); font-variant-numeric: tabular-nums; }
.daily-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.daily-track { width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 4px; background: #edf1ef; appearance: none; }
.daily-track::-webkit-progress-bar { border-radius: inherit; background: #edf1ef; }
.daily-track::-webkit-progress-value { border-radius: inherit; background: var(--teal-dark); }
.daily-track::-moz-progress-bar { border-radius: inherit; background: var(--teal-dark); }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
th { color: var(--muted); font-size: 11px; font-weight: 750; background: #fafcfb; }
tbody tr:hover { background: #fafcfb; }
tbody tr:last-child td { border-bottom: 0; }
.amount-positive { color: var(--teal-dark); font-weight: 800; }
.amount-negative { color: var(--red); font-weight: 800; }

.voucher-output { margin-top: 16px; }
.voucher-output textarea { min-height: 170px; font-family: Consolas, monospace; }
.segmented { display: inline-flex; padding: 3px; background: #e9eeeb; border-radius: 6px; }
.segment { border: 0; border-radius: 4px; padding: 7px 11px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.segment.active { color: var(--ink); background: white; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.empty { min-height: 220px; display: grid; place-items: center; padding: 30px; color: var(--muted); text-align: center; }
.empty-mark { width: 46px; height: 46px; display: grid; place-items: center; margin: 0 auto 10px; border-radius: 7px; background: #edf2ef; font-weight: 800; color: #73817c; }
.empty strong { display: block; margin-bottom: 4px; color: var(--ink); }
.empty p { margin: 0; font-size: 12px; }
.skeleton { min-height: 180px; border-radius: 7px; background: #e9eeeb; animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .5; } }

.toast-root { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 9px; width: min(360px, calc(100vw - 40px)); }
.toast { padding: 13px 15px; border-radius: 6px; color: white; background: #18201e; box-shadow: 0 12px 30px rgba(0,0,0,.22); animation: toast-in .18s ease-out; }
.toast.error { background: #9c3131; }
.toast.success { background: #0f7566; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(8,15,13,.75); }
.modal { width: min(560px, 100%); max-height: calc(100vh - 48px); overflow: auto; border-radius: 7px; background: white; box-shadow: 0 24px 70px rgba(0,0,0,.32); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.modal-head strong { font-size: 14px; }
.modal-close { width: 34px; height: 34px; border: 0; border-radius: 5px; background: #edf1ef; font-size: 20px; }
.modal-body { padding: 18px; }
.modal-qr { width: 100%; aspect-ratio: 1; object-fit: contain; background: #eef2f0; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.modal-actions a { text-decoration: none; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .compact-task .task-info { grid-template-columns: minmax(150px, .7fr) minmax(210px, 1fr); }
  .compact-task.no-actions .task-info { grid-template-columns: minmax(150px, .7fr) minmax(210px, 1fr); }
}

@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { padding: 28px 20px; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(calc(-100% - 32px)); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  .main-shell { min-height: 100vh; }
  .topbar { height: 60px; padding: 0 16px; }
  .topbar-tools { gap: 8px; }
  .mobile-menu { display: inline-flex; }
  .sync-state span:last-child { display: none; }
  .content { padding: 20px 14px 42px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { min-height: 99px; padding: 14px; }
  .stat strong { font-size: 23px; }
  .panel-head, .panel-body { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
  .range-tabs { grid-template-columns: repeat(3, 58px); }
  .daily-row { grid-template-columns: 82px minmax(90px, 1fr) 30px; gap: 8px; }
  .action-row.between { align-items: stretch; flex-direction: column; }
  .action-row.between .btn { width: 100%; }
  .task-grid { grid-template-columns: 1fr; }
  .task-card.compact-task { grid-template-columns: 72px minmax(0, 1fr); }
  .compact-task .task-qr { width: 72px; }
  .compact-task .task-info { grid-template-columns: 1fr; gap: 8px; }
  .compact-task.no-actions .task-info { grid-template-columns: 1fr; }
  .compact-task .task-actions { grid-template-columns: 1fr 1fr; }
  .modal-actions.three { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-backdrop { padding: 12px; }
  .modal-actions { position: sticky; bottom: 0; padding-top: 10px; background: white; }
}

@media (max-width: 390px) {
  .stats-grid { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: 1fr 1fr; }
}
