:root {
  color-scheme: dark;
  --bg: #0a0e17;
  --bg-2: #0f1420;
  --card: #151a2e;
  --card-hover: #1a2138;
  --text: #e0e6ed;
  --text-secondary: #8b95a8;
  --primary: #6366f1;
  --primary-light: #1e1b4b;
  --primary-dark: #4f46e5;
  --accent: #06b6d4;
  --border: #2a3050;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --glow: 0 0 20px rgba(99,102,241,0.3);
  --navbar-bg: rgba(15,20,32,0.85);
  --footer-bg: rgba(10,14,23,0.9);
  --overlay-bg: rgba(10,14,23,0.8);
  --attr-bg: rgba(10,14,23,0.7);
  --grad-1: var(--grad-1);
  --grad-2: var(--grad-2);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fa;
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-hover: #f0f2f5;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --primary: #6366f1;
  --primary-light: #e0e7ff;
  --primary-dark: #4f46e5;
  --accent: #0891b2;
  --border: #e5e7eb;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --glow: 0 0 20px rgba(99,102,241,0.15);
  --navbar-bg: rgba(255,255,255,0.88);
  --footer-bg: rgba(255,255,255,0.92);
  --overlay-bg: rgba(0,0,0,0.4);
  --attr-bg: rgba(255,255,255,0.8);
  --grad-1: rgba(99,102,241,0.06);
  --grad-2: rgba(6,182,212,0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ========== 导航栏 ========== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
}
.navbar .logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #818cf8, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.by-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(6,182,212,0.2));
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--accent);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.navbar .nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ========== 主题切换按钮 ========== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  padding: 0;
  font-family: inherit;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
}
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle-floating {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 1001;
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(99,102,241,0.5); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--accent); }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.4);
}
.btn-danger:hover { background: rgba(239,68,68,0.1); }
.btn-block {
  width: 100%;
  padding: 14px;
  font-size: 16px;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========== 地图页 ========== */
#map {
  position: fixed;
  top: 56px;
  left: 0; right: 0; bottom: 28px;
  background: var(--bg);
}

/* ========== 底部栏 ========== */
.site-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 28px;
  background: var(--footer-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer a:hover { color: var(--accent); }
.footer-sep { color: var(--border); }

/* Leaflet 弹窗 - 暗黑化 */
.leaflet-popup-content-wrapper {
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 0;
}
.leaflet-popup-tip {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.leaflet-popup-content { margin: 0; width: 240px !important; }
.leaflet-popup-close-button {
  color: var(--text-secondary) !important;
  font-size: 20px !important;
  padding: 6px 8px !important;
}
.leaflet-popup-close-button:hover { color: var(--text) !important; }
.popup-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}
.popup-card .popup-body { padding: 10px 12px; }
.popup-card .popup-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.popup-card .popup-meta {
  font-size: 12px;
  color: var(--text-secondary);
}
.popup-card .popup-note {
  font-size: 13px;
  margin-top: 6px;
  color: var(--text);
}
/* Leaflet 控件暗黑化 */
.leaflet-control-zoom a {
  background: var(--card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover { background: var(--card-hover) !important; }
.leaflet-control-attribution {
  background: var(--attr-bg) !important;
  color: var(--text-secondary) !important;
}
.leaflet-control-attribution a { color: var(--accent) !important; }

/* ========== Record 浮动按钮 ========== */
.record-fab {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: 3px solid rgba(255,255,255,0.1);
  font-size: 24px;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 24px rgba(99,102,241,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.record-fab:active { transform: translateX(-50%) scale(0.92); }
.record-fab:hover { box-shadow: 0 8px 32px rgba(99,102,241,0.7); }

/* ========== 登录页 ========== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 48px;
  background:
    radial-gradient(ellipse at 20% 0%, var(--grad-1), transparent 50%),
    radial-gradient(ellipse at 80% 100%, var(--grad-2), transparent 50%),
    var(--bg);
}
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
}
.login-card h1 {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #818cf8, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 8px;
}
.login-card .subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}

/* ========== 表单 ========== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--bg-2);
  color: var(--text);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-secondary); opacity: 0.6; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-group textarea {
  resize: vertical;
  min-height: 60px;
}
.error-msg {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
}

/* ========== Toast 通知系统 ========== */
.toast-container {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  left: 12px; right: 12px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.toast.toast-out { animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.toast .toast-icon { font-size: 18px; flex-shrink: 0; }
.toast .toast-body { flex: 1; min-width: 0; }
.toast .toast-title { font-weight: 600; margin-bottom: 2px; }
.toast .toast-desc { font-size: 12px; color: var(--text-secondary); }
.toast-success { border-left: 3px solid var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-info { border-left: 3px solid var(--accent); }
.toast-info .toast-icon { color: var(--accent); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-error .toast-icon { color: var(--danger); }
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastSlideOut {
  to { opacity: 0; transform: translateY(-20px) scale(0.95); }
}

/* ========== 上传进度条 ========== */
.upload-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  width: 90%;
  max-width: 320px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.upload-card .upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.upload-card .upload-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}
.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--bg-2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  width: 0%;
  transition: width 0.2s;
  box-shadow: 0 0 12px rgba(99,102,241,0.6);
}
.progress-percent {
  font-size: 13px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ========== Record 页 ========== */
.record-page {
  min-height: 100vh;
  background: var(--bg);
}

/* Record 启动页 */
.record-start {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 20% 30%, var(--grad-1), transparent 50%),
    radial-gradient(ellipse at 80% 70%, var(--grad-2), transparent 50%),
    var(--bg);
  color: var(--text);
}
.record-start-inner {
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.record-icon {
  font-size: 56px;
  margin-bottom: 16px;
}
.record-start h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #818cf8, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.record-hint {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}
.record-start .btn { margin-bottom: 12px; }
.record-start .btn-outline {
  border-color: var(--border);
  color: var(--text);
}
.record-start .btn-outline:hover { border-color: var(--accent); }
.record-cancel {
  display: inline-block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  margin-top: 8px;
}

/* 拍照后的预览页 */
.preview-page {
  min-height: 100vh;
  background: var(--bg);
  padding-top: 56px;
  padding-bottom: 28px;
}
.preview-page .photo-preview {
  width: 100%;
  max-height: 40vh;
  object-fit: cover;
}
.preview-form {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px;
}
.mini-map-container {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}
.mini-map-container #miniMap { height: 220px; }

/* 坐标状态卡片 */
.coord-status-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.3s;
}
.coord-status-card.loading {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(6,182,212,0.15);
}
.coord-status-card.success {
  border-color: var(--success);
  box-shadow: 0 0 12px rgba(16,185,129,0.15);
}
.coord-status-card.warning {
  border-color: var(--warning);
  box-shadow: 0 0 12px rgba(245,158,11,0.15);
}
.coord-status-card.error {
  border-color: var(--danger);
  box-shadow: 0 0 12px rgba(239,68,68,0.15);
}
.coord-status-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.coord-status-card.loading .coord-status-icon { background: rgba(6,182,212,0.15); }
.coord-status-card.success .coord-status-icon { background: rgba(16,185,129,0.15); }
.coord-status-card.warning .coord-status-icon { background: rgba(245,158,11,0.15); }
.coord-status-card.error .coord-status-icon { background: rgba(239,68,68,0.15); }
.coord-status-text { flex: 1; min-width: 0; }
.coord-status-title { font-size: 14px; font-weight: 500; }
.coord-status-desc { font-size: 12px; color: var(--text-secondary); }

.coord-source {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.coord-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.coord-badge.ok {
  background: rgba(16,185,129,0.1);
  color: var(--success);
  border-color: rgba(16,185,129,0.3);
}
.coord-badge.warn {
  background: rgba(245,158,11,0.1);
  color: var(--warning);
  border-color: rgba(245,158,11,0.3);
}
.coord-tip {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* 地点搜索 */
.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.search-box input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: var(--bg-2);
  color: var(--text);
  transition: border-color 0.2s;
}
.search-box input::placeholder { color: var(--text-secondary); opacity: 0.6; }
.search-box input:focus { border-color: var(--primary); }
.search-btn {
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  font-size: 16px;
  color: var(--text);
  transition: border-color 0.2s;
}
.search-btn:hover { border-color: var(--accent); }
.search-results {
  margin-bottom: 12px;
  max-height: 200px;
  overflow-y: auto;
  border-radius: 8px;
}
.search-item {
  padding: 10px 14px;
  font-size: 13px;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom: none;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--text);
}
.search-item:first-child { border-radius: 8px 8px 0 0; }
.search-item:last-child { border-bottom: 1px solid var(--border); border-radius: 0 0 8px 8px; }
.search-item:only-child { border-radius: 8px; }
.search-item:hover { background: var(--card-hover); }
.search-item.empty { color: var(--text-secondary); cursor: default; }
.search-item.empty:hover { background: var(--card); }

/* 加载页 */
.record-loading {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 30%, var(--grad-1), transparent 50%),
    radial-gradient(ellipse at 80% 70%, var(--grad-2), transparent 50%),
    var(--bg);
  color: var(--text);
  z-index: 9999;
}
.record-loading p {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Admin 管理后台 ========== */
.admin-page {
  padding-top: 56px;
  padding-bottom: 28px;
  min-height: 100vh;
}
.admin-tabs {
  display: flex;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 56px;
  z-index: 100;
}
.admin-tabs button {
  flex: 1;
  padding: 14px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-family: inherit;
}
.admin-tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-content {
  display: none;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px;
}
.tab-content.active { display: block; }

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--primary); }
.stat-card .stat-value {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #818cf8, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.stat-section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

/* 表格容器 */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.data-table {
  width: 100%;
  background: var(--card);
  border-collapse: collapse;
  min-width: 480px;
}
.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.data-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--card-hover); }
.data-table img.thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}
.role-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.role-badge.admin {
  background: rgba(99,102,241,0.15);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,0.3);
}
.role-badge.user {
  background: rgba(6,182,212,0.15);
  color: var(--accent);
  border: 1px solid rgba(6,182,212,0.3);
}

/* 添加用户表单 */
.add-user-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.add-user-form .form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.add-user-form .form-group {
  flex: 1;
  min-width: 140px;
  margin-bottom: 0;
}

/* 响应式 */
@media (max-width: 640px) {
  .navbar { padding: 0 12px; height: 52px; }
  .navbar .logo { font-size: 16px; }
  #map { top: 52px; }
  .record-fab { width: 56px; height: 56px; font-size: 22px; bottom: 20px; }
  .admin-page { padding-top: 52px; }
  .admin-tabs { top: 52px; }
  .admin-tabs button { padding: 12px 8px; font-size: 13px; }
  .tab-content { padding: 16px 12px; }
  .data-table { font-size: 13px; min-width: 480px; }
  .data-table th, .data-table td { padding: 10px 12px; white-space: nowrap; }
  .add-user-form .form-row { flex-direction: column; }
  .add-user-form .form-group { min-width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .stat-value { font-size: 26px; }
  .login-card { padding: 28px 22px; }
  .login-card h1 { font-size: 22px; }
  .preview-form { padding: 16px 12px; }
}

@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
  .admin-tabs button { padding: 10px 4px; font-size: 12px; }
}

/* iOS Safari */
input, textarea, select {
  -webkit-appearance: none;
  appearance: none;
}
* { touch-action: manipulation; }

/* 工具类 */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.hidden { display: none !important; }
