/* ============================================================
   算悦时显 · 现代玻璃风格 (Modern Glassmorphism)
   暗色基底 · 毛玻璃卡片 · 圆润舒适 · 内容优先
   ============================================================ */

/* ========== 变量 ========== */
:root {
  --bg-page: #0e0e10;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-hover: rgba(255, 255, 255, 0.1);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-elevated: rgba(30, 30, 32, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.06);
  --text-primary: #f5f5f7;
  --text-secondary: rgba(245, 245, 247, 0.65);
  --text-tertiary: rgba(245, 245, 247, 0.35);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-dim: rgba(0, 113, 227, 0.15);
  --green: #30d158;
  --red: #ff453a;
  --orange: #ff9f0a;
  --blue: #0a84ff;
  --purple: #bf5af2;
  --font: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.5);
  --nav-height: 52px;
  --tab-height: 64px;
}

/* ========== Reset ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#app {
  max-width: 750px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

/* ========== 顶部导航 ========== */
.nav-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  max-width: 750px;
  margin: 0 auto;
  height: var(--nav-height);
  background: rgba(14, 14, 16, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.nav-back {
  cursor: pointer;
  font-size: 16px;
  min-width: 70px;
  padding: 10px 0;
  color: var(--accent);
  font-weight: 500;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-back:active { opacity: 0.6; }
.nav-back::before { content: '←'; font-size: 18px; }
.nav-title {
  position: absolute;
  left: 80px;
  right: 80px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-right { margin-left: auto; min-width: 60px; text-align: right; font-size: 13px; color: var(--text-tertiary); }

/* ========== 页面容器 ========== */
.page-container {
  padding-top: var(--nav-height);
  padding-bottom: 20px;
  min-height: 100vh;
}
.page-view { display: none; padding: 16px 16px 80px; }
.page-view.active { display: block; animation: fadeUp 0.35s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 64px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--bg-elevated);
  backdrop-filter: blur(30px);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  max-width: 85%;
  text-align: center;
  animation: toastAnim 2.5s ease forwards;
  box-shadow: var(--shadow-elevated);
}
.toast.error { border-color: rgba(255, 69, 58, 0.3); }
.toast.success { border-color: rgba(48, 209, 88, 0.3); }
.toast.warning { border-color: rgba(255, 159, 10, 0.3); }
@keyframes toastAnim {
  0% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  12% { opacity: 1; transform: translateX(-50%) translateY(0); }
  80% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-default {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.btn-default:hover { background: var(--bg-card); color: var(--text-primary); }
.btn-plain {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.btn-plain:hover { background: var(--bg-glass); color: var(--text-primary); }
.btn-block { width: 100%; display: flex; }
.btn-mini { padding: 6px 14px; font-size: 13px; border-radius: 6px; }
.btn-small { padding: 6px 14px; font-size: 13px; border-radius: 6px; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ========== 卡片 ========== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========== 表单 ========== */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--font);
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-tertiary); }

/* ========== Loading ========== */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(14, 14, 16, 0.8);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  flex-direction: column;
  gap: 12px;
}
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2.5px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Tabs ========== */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--border-subtle);
}
.tab-item {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.25s;
}
.tab-item.active {
  color: var(--text-primary);
  background: var(--bg-card);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.tab-item:not(.active):hover { color: var(--text-secondary); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeUp 0.3s ease; }

/* ========== 设备卡片 ========== */
.device-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
  position: relative;
  cursor: pointer;
  transition: all 0.25s;
  overflow: hidden;
}
.device-card:active { transform: scale(0.98); }
.device-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  opacity: 0.6;
}
.device-card.offline::after { background: linear-gradient(90deg, #555, #333); }
.device-card.offline { opacity: 0.55; }
.device-card.disable::after { background: linear-gradient(90deg, var(--orange), #ff6b35); }

.device-name { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.device-info-row { font-size: 13px; margin-bottom: 2px; color: var(--text-secondary); }
.device-time { font-size: 12px; margin-top: 8px; color: var(--text-tertiary); }

.device-brightness {
  position: absolute;
  right: 20px;
  top: 20px;
  text-align: center;
}
.brightness-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  background: var(--accent-dim);
  color: var(--accent);
  border: 3px solid rgba(0, 113, 227, 0.25);
  box-shadow: 0 2px 8px rgba(0,113,227,0.12);
  transition: transform 0.2s;
}
.brightness-ring:hover {
  transform: scale(1.05);
}

/* ========== 列表项 ========== */
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.list-item:last-child { border-bottom: none; }
.list-item-label { font-size: 15px; color: var(--text-primary); }
.list-item-value { font-size: 14px; color: var(--text-tertiary); font-weight: 400; }

/* ========== Grid ========== */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.grid-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.grid-item:active { transform: scale(0.95); }
.grid-item:hover { background: var(--bg-card-hover); }
.grid-item.selected {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.grid-item .icon { font-size: 22px; margin-bottom: 6px; display: block; }
.grid-item .text { font-size: 12px; color: var(--text-secondary); }
.grid-item.selected .text { color: var(--accent); font-weight: 500; }

/* ========== 滑动列表项 ========== */
.slide-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.slide-item:last-child { border-bottom: none; }
.slide-left { flex: 1; display: flex; align-items: center; justify-content: space-between; }
.slide-right { display: flex; gap: 0; }
.slide-btn {
  padding: 6px 14px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
}
.slide-btn:active { opacity: 0.7; }
.slide-btn.up { background: var(--blue); border-radius: 6px 0 0 6px; }
.slide-btn.down { background: var(--purple); border-radius: 0 6px 6px 0; }

.left-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

/* ========== 弹窗 ========== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 300px;
  max-width: 85%;
  padding: 24px;
  box-shadow: var(--shadow-elevated);
}
.modal-title { font-size: 17px; font-weight: 600; text-align: center; margin-bottom: 8px; }
.modal-body { font-size: 14px; text-align: center; margin-bottom: 20px; color: var(--text-secondary); }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

/* ========== Action Sheet ========== */
.action-sheet-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  z-index: 9000;
}
.action-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 750px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 9001;
  animation: sheetUp 0.3s ease;
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.action-sheet-title {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.action-sheet-item {
  padding: 16px;
  text-align: center;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.15s;
}
.action-sheet-item:active { background: var(--bg-card); }
.action-sheet-cancel {
  padding: 16px;
  text-align: center;
  font-size: 16px;
  color: var(--text-tertiary);
  border-top: 6px solid var(--bg-page);
  cursor: pointer;
}
.action-sheet-cancel:active { background: var(--bg-card); }

/* ========== Radio/Checkbox ========== */
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.radio-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s;
  font-size: 14px;
  color: var(--text-secondary);
}
.radio-item.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
.radio-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.radio-item.active .radio-dot { border-color: var(--accent); }
.radio-item.active .radio-dot::after {
  content: '';
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

/* Checkbox 风格（替代原生丑陋复选框） */
.check-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s;
  font-size: 14px;
  color: var(--text-secondary);
  user-select: none;
}
.check-item.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
.check-box {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 2px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.check-item.active .check-box {
  border-color: var(--accent);
  background: var(--accent);
}
.check-item.active .check-box::after {
  content: '✓';
  font-size: 11px;
  color: #fff;
  font-weight: 700;
}

/* ========== 进度条 ========== */
.progress-bar {
  height: 24px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  margin: 10px 0;
  border: 1px solid var(--border-subtle);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  border-radius: 12px;
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  min-width: 44px;
  padding: 0 8px;
  box-sizing: border-box;
}

/* ========== Tag ========== */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 500;
}

/* ========== Switch ========== */
.switch {
  width: 46px; height: 26px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.25s;
}
.switch.on { background: var(--green); }
.switch::after {
  content: '';
  width: 22px; height: 22px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px; left: 2px;
  transition: transform 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.switch.on::after { transform: translateX(20px); }

/* ========== Search ========== */
.search-bar {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  color: var(--text-primary);
  font-family: var(--font);
}
.search-bar input::placeholder { color: var(--text-tertiary); }
.search-bar .search-icon { color: var(--text-tertiary); margin-right: 8px; }
.search-bar .search-btn {
  margin-left: 8px;
  padding: 6px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font);
}

/* ========== Empty State ========== */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .icon { font-size: 40px; margin-bottom: 10px; opacity: 0.4; }
.empty-state .text { font-size: 15px; color: var(--text-tertiary); }

/* ========== Album ========== */
.album-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.album-item {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  display: block;
}

/* ========== Collapse ========== */
.collapse-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.collapse-header {
  padding: 14px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  background: rgba(255,255,255,0.02);
}
.collapse-body { padding: 12px 14px; display: none; }
.collapse-item.open .collapse-body { display: block; }

/* ========== Popup ========== */
.popup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  z-index: 9000;
}
.popup-panel {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 750px;
  margin: 0 auto;
  max-height: 80vh;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 9001;
  overflow-y: auto;
  animation: sheetUp 0.3s ease;
}
.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
}
.popup-content { padding: 20px; }
.popup-footer { padding: 16px 20px; border-top: 1px solid var(--border-subtle); }

/* ========== Picker ========== */
.picker-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 15px;
}
.picker-arrow { color: var(--text-tertiary); font-size: 10px; }

/* ========== Slider ========== */
.slider-container { display: flex; align-items: center; gap: 10px; }
.slider-label { font-size: 12px; color: var(--text-tertiary); min-width: 30px; }
.range-slider { flex: 1; -webkit-appearance: none; height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; outline: none; }
.range-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); cursor: pointer; }
.percent-display { text-align: center; font-size: 28px; font-weight: 700; color: var(--text-primary); margin: 10px 0; }

/* ========== Frequency ========== */
.frequency-buttons { display: flex; gap: 10px; }
.freq-btn {
  flex: 1;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.freq-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

/* ========== Textarea ========== */
.textarea-field {
  width: 100%;
  min-height: 200px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-primary);
  resize: vertical;
  outline: none;
  font-family: var(--font);
  line-height: 1.6;
}
.textarea-field:focus { border-color: var(--accent); }
.textarea-count { text-align: right; font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }

/* ========== Rules ========== */
.rule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.rule-item:last-child { border-bottom: none; }
.rule-del { padding: 6px 16px; color: #fff; cursor: pointer; background: var(--red); border-radius: 6px; font-size: 13px; }
.c-green { color: var(--green); }
.c-red { color: var(--red); }

/* ========== City ========== */
.city-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  font-size: 15px;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.city-item:active { background: var(--bg-glass); }
.city-item.selected { color: var(--accent); font-weight: 500; }
.sidebar {
  position: fixed;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.sidebar-item {
  padding: 2px 4px;
  font-size: 10px;
  color: var(--text-tertiary);
  cursor: pointer;
  font-weight: 500;
}

/* ========== Setting Section ========== */
.setting-section {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  padding: 20px;
  margin-bottom: 14px;
}
.setting-section .section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

/* ========== Login ========== */
.login-container {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 32px 48px;
  box-sizing: border-box;
}
.login-container.login-form { margin-top: -10vh; }
.login-container.register-form { margin-top: -8vh; }
#loginPage.page-view { padding: 0; overflow: hidden; height: 100dvh; }
#loginPage.page-view.active { padding: 0; overflow: hidden; height: 100dvh; }
body:has(#loginPage.active) { overflow: hidden; position: fixed; width: 100%; }
.login-logo {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.login-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 44px;
  font-weight: 400;
}

/* ========== Section Header ========== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.section-header .title {
  font-size: 15px;
  font-weight: 600;
}
.section-header .action {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
}

/* ========== 设备信息行 ========== */
.info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.info-row .label { color: var(--text-tertiary); min-width: 80px; }

/* ========== 统计标签 ========== */
.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.stat-badge.online { background: rgba(48, 209, 88, 0.12); color: var(--green); }
.stat-badge.offline { background: rgba(255, 255, 255, 0.05); color: var(--text-tertiary); }

/* ========== Scrollbar ========== */
::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* ========== Responsive ========== */
@media (min-width: 750px) {
  #app { border-left: 1px solid var(--border-subtle); border-right: 1px solid var(--border-subtle); }
}

/* ========== ���ɨ�� ========== */
#bindCamera {
  display: block;
}
