:root {
  --bg: #f2f5f6;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e5eaee;
  --primary: #0f766e;
  --primary-dark: #0b5a54;
  --primary-soft: #e6f4f1;
  --accent: #f59e0b;
  --danger: #dc2626;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
h1, h2, h3, p { margin: 0; }

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
  padding-bottom: calc(24px + var(--safe-bottom));
}

.screen { display: none; min-height: 100vh; }
.screen.active { display: block; animation: fade-in 0.22s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none;} }

/* ------------------------- 通用组件 ------------------------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s ease, background 0.15s ease, opacity 0.15s ease;
  user-select: none;
}
.btn:active { transform: scale(0.985); }
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--primary); box-shadow: 0 8px 20px rgba(15, 118, 110, 0.24); }
.btn-primary:active { background: var(--primary-dark); }
.btn-secondary { background: #eef2f6; color: var(--text); }
.btn-ghost { background: #fff; color: var(--primary); border: 1.5px dashed #bfd8d4; box-shadow: none; }
.btn-light { background: #fff; color: var(--primary); }
.btn-danger { background: var(--danger); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 18px; font-size: 16px; border-radius: 16px; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

.hint { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 8px; text-align: center; }
.hint.error { color: var(--danger); }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 7px; }
.field input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 14px;
  font-size: 16px;
  background: #fbfcfd;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  color: var(--text);
}
.field input:focus { border-color: var(--primary); background: #fff; }

.icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.icon-btn svg { width: 19px; height: 19px; }

/* ------------------------- 登录 ------------------------- */
.login-wrap {
  min-height: 100vh;
  padding: 54px 22px calc(30px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 60% at 50% 0%, #0f766e 0%, #0b5a54 45%, #093f3a 100%);
}

.login-brand { text-align: center; color: #fff; margin-bottom: 30px; }
.brand-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-mark svg { width: 34px; height: 34px; color: #b7ebe3; }
.login-brand h1 { font-size: 26px; letter-spacing: 2px; }
.login-brand p { margin-top: 8px; font-size: 13px; color: rgba(255, 255, 255, 0.7); letter-spacing: 1px; }

.login-card { padding: 22px; }
.login-foot { margin-top: auto; padding-top: 28px; text-align: center; font-size: 12px; color: rgba(255, 255, 255, 0.55); }

/* ------------------------- 顶部栏 ------------------------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 22px;
  background: linear-gradient(160deg, #0f766e 0%, #0b5a54 100%);
  color: #fff;
  border-radius: 0 0 26px 26px;
}
.appbar-sub { font-size: 12px; color: rgba(255, 255, 255, 0.65); margin-bottom: 5px; letter-spacing: 0.5px; }
.appbar-title { font-size: 21px; font-weight: 700; }

.page { padding: 20px; }

/* ------------------------- 统计 ------------------------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: -38px;
  margin-bottom: 16px;
}
.stat {
  background: #fff;
  border-radius: 16px;
  padding: 14px 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.stat-label { font-size: 11px; color: var(--muted); }
.stat strong {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}
.stat strong small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }

.active-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.active-tag {
  display: inline-block;
  font-size: 11px;
  color: #b45309;
  background: #ffedd5;
  border: 1px solid #fdba74;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.active-title { font-size: 15px; font-weight: 600; }

.start-btn { margin-bottom: 24px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 2px 12px;
}
.section-head h2 { font-size: 15px; font-weight: 700; }
.section-head span { font-size: 12px; color: var(--muted); }

/* ------------------------- 行程列表 ------------------------- */
.trip-list { display: flex; flex-direction: column; gap: 10px; }
.trip-item {
  background: #fff;
  border-radius: 16px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}
.trip-item-title { font-size: 16px; font-weight: 650; margin-bottom: 5px; }
.trip-item-sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trip-item-side {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: 0 0 auto;
}
.trip-item-side strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.trip-item-side span { font-size: 10px; color: var(--muted); margin-top: -3px; }
.trip-item-side em { font-size: 11px; font-style: normal; color: var(--primary); background: var(--primary-soft); padding: 2px 7px; border-radius: 999px; margin-top: 4px; }

.empty { text-align: center; padding: 40px 0 20px; color: var(--muted); }
.empty-icon {
  width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%;
  background: #e9eef1; display: flex; align-items: center; justify-content: center;
}
.empty-icon svg { width: 26px; height: 26px; color: #94a3b8; }
.empty p { font-size: 14px; color: #475569; }
.empty small { font-size: 12px; }

/* ------------------------- 行程中 ------------------------- */
.trip-page { padding-bottom: 110px; }

.timer-card {
  background: linear-gradient(160deg, #0f766e, #0b4f4a);
  color: #fff;
  border-radius: 22px;
  padding: 24px 20px 18px;
  text-align: center;
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.25);
  margin-bottom: 18px;
}
.timer-label { font-size: 12px; color: rgba(255, 255, 255, 0.65); letter-spacing: 2px; }
.timer {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 18px;
  font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
}
.trip-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 14px;
}
.metric { display: flex; flex-direction: column; gap: 4px; }
.metric span { font-size: 11px; color: rgba(255, 255, 255, 0.6); }
.metric strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.metric-divider { width: 1px; height: 28px; background: rgba(255, 255, 255, 0.16); }

.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.photo-grid:empty { display: none; }
.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #e6ebee;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb span {
  position: absolute; left: 4px; bottom: 4px;
  font-size: 10px; color: #fff; background: rgba(0, 0, 0, 0.45);
  padding: 1px 5px; border-radius: 6px; font-variant-numeric: tabular-nums;
}
.photo-busy {
  aspect-ratio: 1; border-radius: 12px; background: #e6ebee;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted);
}

.gps-note {
  margin-top: 16px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
  background: #fff; border-radius: 12px; padding: 11px 14px;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
  flex: 0 0 auto;
}
.dot.warn { background: var(--accent); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16); }
.dot.bad { background: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14); }

.bottom-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 18px calc(12px + var(--safe-bottom));
  background: rgba(242, 245, 246, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  z-index: 15;
}

/* ------------------------- 完成页 ------------------------- */
.done-wrap {
  min-height: 100vh;
  padding: 60px 22px calc(30px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, #ecfdf5 0%, #f2f5f6 42%);
}
.done-icon {
  width: 74px; height: 74px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.3);
  margin-bottom: 18px;
}
.done-icon svg { width: 36px; height: 36px; }
.done-wrap h2 { font-size: 22px; }
.done-sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.done-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 26px 0 14px;
}
.done-item {
  background: #fff; border-radius: 16px; padding: 16px 8px;
  text-align: center; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 6px;
}
.done-item span { font-size: 11px; color: var(--muted); }
.done-item strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.done-range { font-size: 12px; color: var(--muted); margin-bottom: 30px; text-align: center; line-height: 1.7; }
.done-wrap .btn { margin-top: auto; }

/* ------------------------- 底部弹层 ------------------------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45); animation: fade-in 0.2s ease; }
.sheet-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 22px 20px calc(22px + var(--safe-bottom));
  animation: slide-up 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-overflow-scrolling: touch;
}
@keyframes slide-up { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-head h3 { font-size: 18px; }
.sheet-head p { font-size: 12px; color: var(--muted); margin-top: 5px; }
.sheet-head .icon-btn { background: #f1f5f9; color: #475569; }

.point-list { display: flex; flex-direction: column; gap: 10px; }
.point-btn {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
}
.point-btn:active { border-color: var(--primary); background: var(--primary-soft); }
.point-btn svg { width: 18px; height: 18px; color: var(--primary); }
.point-btn small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 3px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips:empty { display: none; }
.chip {
  border: 1.5px solid var(--line);
  background: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: #334155;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

.geo-line {
  display: flex; align-items: center; gap: 8px;
  background: #f1f5f9; color: #475569;
  border-radius: 12px; padding: 11px 14px;
  font-size: 12px; margin-bottom: 14px;
}

.reader-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 1;
  max-height: 46vh;
  margin: 0 auto 14px;
  width: 100%;
}
#reader { width: 100%; height: 100%; }
#reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
#reader__scan_region { background: transparent !important; }
#reader__dashboard { display: none !important; }
.reader-mask {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.scan-frame { position: relative; width: 62%; aspect-ratio: 1; }
.corner { position: absolute; width: 26px; height: 26px; border: 3px solid #34d399; }
.corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }

.manual-row { display: flex; gap: 8px; }
.manual-row input {
  flex: 1; min-width: 0;
  border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
  font-size: 15px; outline: none; background: #fbfcfd;
  text-transform: uppercase;
}
.manual-row input:focus { border-color: var(--primary); background: #fff; }
.manual-row .btn { flex: 0 0 auto; padding-left: 20px; padding-right: 20px; }

/* ------------------------- 图片预览 / Toast ------------------------- */
.viewer {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.viewer[hidden] { display: none; }
.viewer img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.viewer-close {
  position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.16); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.viewer-close svg { width: 20px; height: 20px; }

.toast {
  position: fixed;
  left: 50%; bottom: 96px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 13px;
  padding: 11px 18px;
  border-radius: 12px;
  z-index: 100;
  max-width: 86vw;
  text-align: center;
  line-height: 1.5;
}
.toast[hidden] { display: none; }

/* ==================================================================== */
/* 后台端                                                                */
/* ==================================================================== */
.admin-body { background: #eef2f5; }
.admin-shell { display: flex; min-height: 100vh; }

.admin-side {
  width: 224px;
  flex: 0 0 224px;
  background: #0c2f2c;
  color: #fff;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.admin-logo { display: flex; align-items: center; gap: 10px; padding: 0 6px 20px; }
.admin-logo .mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: rgba(52, 211, 153, 0.16);
  display: flex; align-items: center; justify-content: center;
  color: #6ee7b7;
}
.admin-logo .mark svg { width: 21px; height: 21px; }
.admin-logo b { font-size: 15px; letter-spacing: 0.5px; }
.admin-logo small { display: block; font-size: 10px; color: rgba(255, 255, 255, 0.45); margin-top: 2px; letter-spacing: 1px; }

.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 11px;
  padding: 12px 14px;
  text-align: left;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-nav button svg { width: 18px; height: 18px; }
.admin-nav button.active { background: rgba(52, 211, 153, 0.14); color: #fff; font-weight: 600; }
.admin-nav button:hover { background: rgba(255, 255, 255, 0.06); }

.admin-side-foot { margin-top: auto; padding: 0 6px; font-size: 11px; color: rgba(255, 255, 255, 0.35); line-height: 1.8; }
.admin-side-foot button {
  border: 0; background: transparent; color: rgba(255, 255, 255, 0.6);
  font-size: 12px; padding: 6px 0; text-align: left;
}

.admin-main { flex: 1; min-width: 0; padding: 26px 30px 50px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-topbar h1 { font-size: 21px; }
.admin-topbar p { font-size: 12px; color: var(--muted); margin-top: 5px; }
.admin-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.date-field {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 12px; padding: 8px 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  font-size: 13px; color: var(--muted);
}
.date-field input { border: 0; outline: none; font-size: 14px; color: var(--text); background: transparent; }

.admin-tab { display: none; }
.admin-tab.active { display: block; animation: fade-in 0.2s ease; }

.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi {
  background: #fff; border-radius: 16px; padding: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.045);
  display: flex; flex-direction: column; gap: 8px;
}
.kpi span { font-size: 12px; color: var(--muted); }
.kpi strong { font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.kpi strong small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 2px; }

.panel {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  margin-bottom: 18px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 15px; }
.panel-head span { font-size: 12px; color: var(--muted); }
.panel-body { padding: 4px 0; overflow-x: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
table.data th {
  text-align: left; font-size: 11px; font-weight: 600; color: var(--muted);
  padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: #fafbfc;
}
table.data td { padding: 12px 16px; border-bottom: 1px solid #f1f4f6; vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { font-variant-numeric: tabular-nums; }
table.data .strong { font-weight: 600; }
.tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-weight: 600;
}
.tag.gray { background: #f1f5f9; color: #64748b; }
.tag.orange { background: #fff7ed; color: #c2410c; }
.link-btn { border: 0; background: transparent; color: var(--primary); font-size: 12px; padding: 0; font-weight: 600; }
.link-btn.muted { color: var(--muted); font-weight: 400; }

.table-empty { text-align: center; padding: 42px 0; color: var(--muted); font-size: 13px; }

.point-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.point-card {
  background: #fff; border-radius: 16px; padding: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  display: flex; flex-direction: column; gap: 12px;
}
.point-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.point-card-head h3 { font-size: 16px; }
.point-card-head small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.coord { font-size: 12px; color: #475569; background: #f8fafc; border-radius: 10px; padding: 9px 12px; line-height: 1.6; }
.coord b { font-weight: 600; font-variant-numeric: tabular-nums; }
.coord .unset { color: #c2410c; font-weight: 600; }
.radius-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.radius-row input {
  width: 76px; border: 1.5px solid var(--line); border-radius: 9px;
  padding: 7px 9px; font-size: 13px; outline: none; color: var(--text);
}
.radius-row input:focus { border-color: var(--primary); }
.point-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.point-actions .btn { padding: 9px 12px; font-size: 12px; border-radius: 10px; }

.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.5); }
.modal-card {
  position: relative; background: #fff; border-radius: 20px;
  width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
  padding: 22px; animation: fade-in 0.2s ease;
}
.modal-card h3 { font-size: 17px; margin-bottom: 4px; }
.modal-card .sub { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.modal-card .field input { font-size: 15px; padding: 12px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; padding: 12px; font-size: 14px; }
.qr-card { text-align: center; }
.qr-card img { width: 240px; height: 240px; display: block; margin: 8px auto 12px; border-radius: 8px; }
.qr-code-text { font-size: 20px; font-weight: 700; letter-spacing: 4px; font-variant-numeric: tabular-nums; color: #0f172a; }
.qr-tip { font-size: 12px; color: var(--muted); margin: 10px 0 4px; line-height: 1.7; }

.photo-grid-admin { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.photo-grid-admin img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: pointer; }

.admin-login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: radial-gradient(120% 70% at 50% 0%, #0f766e 0%, #0a4742 50%, #072e2b 100%);
}
.admin-login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 22px; padding: 28px 24px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25); }
.admin-login-card h1 { font-size: 20px; text-align: center; }
.admin-login-card .sub { text-align: center; font-size: 12px; color: var(--muted); margin: 8px 0 22px; }

@media (max-width: 1080px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .admin-shell { flex-direction: column; }
  .admin-side {
    width: 100%; flex: none; height: auto; position: static;
    padding: 14px 14px 10px; border-radius: 0 0 18px 18px;
  }
  .admin-logo { padding: 0 4px 12px; }
  .admin-nav { flex-direction: row; overflow-x: auto; gap: 6px; }
  .admin-nav button { white-space: nowrap; padding: 9px 12px; font-size: 13px; }
  .admin-side-foot { display: none; }
  .admin-main { padding: 18px 14px 40px; }
  .admin-topbar h1 { font-size: 18px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .qr-card img { width: 200px; height: 200px; }
}
@media (max-width: 420px) {
  .stat strong { font-size: 19px; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

#qr-holder { display: flex; justify-content: center; margin: 8px 0 10px; }
#qr-holder canvas, #qr-holder img { width: 240px; height: 240px; }