/* ============================================================
   LED 工单管理 APP - 样式表
   ============================================================ */

:root {
  --bg: #0b1220;
  --bg-soft: #0f1929;
  --surface: #131f33;
  --surface-2: #1a2942;
  --surface-3: #22344f;
  --border: #24344e;
  --border-soft: #1c2b42;
  --text: #e8eefb;
  --text-2: #b6c4da;
  --muted: #7f90ab;
  --primary: #22d3ee;
  --primary-2: #0ea5e9;
  --primary-ink: #04222b;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --purple: #a78bfa;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --nav-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

[data-theme='light'] {
  --bg: #eef2f8;
  --bg-soft: #e6ecf5;
  --surface: #ffffff;
  --surface-2: #f4f7fc;
  --surface-3: #e8eef7;
  --border: #d6e0ee;
  --border-soft: #e4ebf5;
  --text: #10203a;
  --text-2: #35496b;
  --muted: #7189a8;
  --primary: #0891b2;
  --primary-2: #0e7490;
  --primary-ink: #ffffff;
  --shadow: 0 8px 24px rgba(16, 42, 78, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  /* 不要用 height:100% —— 它会限制滚动容器高度，导致 body 的底部 padding 在移动端失效 */
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior-y: none;
}

body {
  /* 底部留白由 .page 统一处理（见 .page 的 padding-bottom），这里不再重复设置 */
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

/* ---------- 启动画面 ---------- */
.boot-splash {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg);
}
.boot-logo {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, #e31e24, #b91c1c);
  box-shadow: 0 0 40px rgba(227, 30, 36, 0.35);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.85; }
}
.boot-text {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 布局 ---------- */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  /* 底部留白：确保最后一行内容（如"取消/创建工单"按钮）不被固定导航栏遮挡 */
  padding: 14px 14px calc(var(--nav-h) + var(--safe-b) + 28px);
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
  animation: fade-in 0.18s ease;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  /* 兼容旧浏览器：先写不透明的纯色兜底，支持半透明的浏览器会用下面那行 */
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  padding: calc(var(--safe-t) + 10px) 14px 10px;
}
.topbar-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 700;
  flex: 1;
  letter-spacing: 0.3px;
}
.topbar .sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  /* 兼容旧浏览器：纯色兜底在前 */
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.tabbar-item {
  flex: 1;
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  padding: 6px 0 4px;
  position: relative;
  transition: color 0.15s;
  cursor: pointer;
}
.tabbar-item .ico {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.18s;
}
.tabbar-item.active {
  color: var(--primary);
}
.tabbar-item.active .ico {
  transform: translateY(-1px) scale(1.08);
}
.tabbar-item .badge {
  position: absolute;
  top: 4px;
  right: 50%;
  transform: translateX(18px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 600;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.card.tight { padding: 10px 12px; }
.card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .more {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

/* ---------- 概览统计 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.stat {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 13px 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
}
.stat:active { transform: scale(0.98); }
.stat .label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat .num {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stat .foot {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.stat.install .num { color: var(--primary); }
.stat.service .num { color: var(--warn); }
.stat.mine .num { color: var(--success); }
.stat.today .num { color: var(--purple); }
.stat::after {
  content: '';
  position: absolute;
  right: -18px;
  top: -18px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.06;
}

/* ---------- 工单卡片 ---------- */
.order-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px 13px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.12s, background 0.12s;
}
.order-card:active { transform: scale(0.99); background: var(--surface-2); }
.order-card.service { border-left-color: var(--warn); }
.order-card .row1 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.order-card .no {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}
.order-card .title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12px;
  color: var(--text-2);
}
.order-card .meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-card .foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-soft);
  font-size: 11px;
  color: var(--muted);
}
.order-card .foot .right { margin-left: auto; }

/* ---------- 徽标 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.chip.solid { color: #06111d; }
.chip.ghost {
  background: var(--surface-2);
  color: var(--text-2);
  border-color: var(--border);
}
.chip.dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
  color: var(--primary-ink);
  box-shadow: 0 6px 18px rgba(34, 211, 238, 0.22);
}
.btn.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.btn.ghost {
  background: transparent;
}
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.icon { width: 42px; padding: 0; }

.fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--primary-ink);
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.35);
  cursor: pointer;
  z-index: 30;
  transition: transform 0.12s;
}
.fab:active { transform: scale(0.93); }

/* ---------- 表单 ---------- */
.field {
  margin-bottom: 13px;
}
.field > label {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 600;
}
.field > label .req { color: var(--danger); margin-left: 2px; }
.input,
.select,
.textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
.textarea { min-height: 84px; resize: vertical; line-height: 1.55; }
.select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f90ab' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* ---------- 地址联想下拉 ---------- */
.addr-wrap {
  position: relative;
}
.addr-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.addr-input-row .input {
  flex: 1;
  min-width: 0;
}
.addr-drop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 260px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}
.addr-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}
.addr-item:last-child {
  border-bottom: 0;
}
.addr-item:active,
.addr-item:hover {
  background: var(--surface-2);
}
.addr-item .addr-main {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  word-break: break-all;
}
.addr-item .addr-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- 搜索 & 筛选 ---------- */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.search-bar .input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
}
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: none;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.filter-chip.active {
  background: rgba(34, 211, 238, 0.14);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

/* ---------- 列表项 ---------- */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin-bottom: 9px;
  cursor: pointer;
  transition: background 0.12s;
}
.list-item:active { background: var(--surface-2); }
.list-item .avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--surface-2);
  flex: none;
}
.list-item .body { flex: 1; min-width: 0; }
.list-item .body .t {
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-item .body .s {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.list-item .arrow { color: var(--muted); font-size: 16px; flex: none; }

/* ---------- 详情 ---------- */
.detail-head {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 15px;
  margin-bottom: 12px;
}
.detail-head .no {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.detail-head .title {
  font-size: 19px;
  font-weight: 800;
  margin: 4px 0 10px;
  line-height: 1.3;
}
.detail-head .chips { display: flex; flex-wrap: wrap; gap: 6px; }

.kv {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 9px 10px;
  font-size: 14px;
}
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; color: var(--text); word-break: break-all; }
.kv dd a { color: var(--primary); }

.block-text {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-2);
}

/* ---------- 照片墙 ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}
.photo-grid .ph {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}
.photo-grid .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-grid .ph .del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 13px;
  line-height: 20px;
  padding: 0;
  cursor: pointer;
}
/* 照片底部的上传人 + 时间信息 */
.photo-grid .ph .ph-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 5px 3px;
  font-size: 9px;
  line-height: 1.25;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload-tile {
  aspect-ratio: 1;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  background: var(--surface-2);
}
.upload-tile .plus { font-size: 22px; line-height: 1; }

/* ---------- 资料库 ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.cat {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 11px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
}
.cat .emo { font-size: 21px; line-height: 1; }
.cat.active {
  border-color: var(--primary);
  background: rgba(34, 211, 238, 0.1);
  color: var(--primary);
  font-weight: 600;
}

/* ---------- 空状态 ---------- */
.empty {
  text-align: center;
  padding: 44px 16px;
  color: var(--muted);
}
.empty .emo { font-size: 40px; opacity: 0.5; margin-bottom: 8px; }
.empty .t { font-size: 14px; }
.empty .s { font-size: 12px; margin-top: 4px; opacity: 0.8; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 8, 18, 0.66);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: mask-in 0.18s ease;
}
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--border);
  border-bottom: 0;
  display: flex;
  flex-direction: column;
  animation: sheet-up 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
  padding-bottom: var(--safe-b);
}
@keyframes sheet-up { from { transform: translateY(28px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 16px 10px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-head h3 { margin: 0; font-size: 16px; flex: 1; }
.modal-head .x {
  border: 0;
  background: var(--surface-2);
  color: var(--text-2);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.modal-body { padding: 15px 16px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.modal-foot {
  display: flex;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border-soft);
}
.modal-foot .btn { flex: 1; }

@media (min-width: 720px) {
  .modal-mask { align-items: center; }
  .modal { border-radius: 18px; border-bottom: 1px solid var(--border); }
}

/* ---------- 提示 ---------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-b) + 24px);
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: 86vw;
}
.toast {
  background: rgba(20, 32, 52, 0.96);
  color: #fff;
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  box-shadow: var(--shadow);
  animation: toast-in 0.2s ease;
  max-width: 86vw;
  text-align: center;
}
.toast.error { background: rgba(127, 29, 29, 0.96); border-color: #b91c1c; }
.toast.success { background: rgba(6, 78, 59, 0.96); border-color: #059669; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 20px calc(40px + var(--safe-b));
  max-width: 420px;
  margin: 0 auto;
}
.login-logo-img {
  display: block;
  height: 64px;
  width: auto;
  margin: 0 auto 14px;
  filter: drop-shadow(0 4px 18px rgba(227, 30, 36, 0.22));
}
.login-title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
}
.login-sub {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 26px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 20px 18px;
  box-shadow: var(--shadow);
}
.login-tip {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 16px;
  line-height: 1.7;
}

/* ---------- 我的 ---------- */
.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(34, 211, 238, 0.16), var(--surface) 62%);
  border: 1px solid var(--border-soft);
  margin-bottom: 14px;
}
.profile-head .avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  color: #04222b;
  background: linear-gradient(135deg, #22d3ee, #818cf8);
  flex: none;
}
.profile-head .name { font-size: 18px; font-weight: 700; }
.profile-head .role { font-size: 12px; color: var(--muted); margin-top: 3px; }

.menu-group {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  font-size: 14.5px;
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  width: 100%;
  text-align: left;
  color: var(--text);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item:active { background: var(--surface-2); }
.menu-item .emo { font-size: 17px; width: 22px; text-align: center; }
.menu-item .arrow { margin-left: auto; color: var(--muted); font-size: 15px; }
.menu-item .val { margin-left: auto; color: var(--muted); font-size: 12.5px; }

/* ---------- 权限提示 ---------- */
.notice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.55;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--text-2);
  margin-bottom: 12px;
}
.notice .emo { flex: none; }
.notice.warn {
  background: rgba(245, 158, 11, 0.09);
  border-color: rgba(245, 158, 11, 0.3);
}

/* ---------- 工具类 ---------- */
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mb8 { margin-bottom: 8px; }
.mb12 { margin-bottom: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border-soft); margin: 12px 0; }
.loading-line {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  background-size: 200% 100%;
  animation: slide 1s linear infinite;
  border-radius: 2px;
  margin-bottom: 10px;
}
@keyframes slide { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.pull-hint {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
}

/* 平板 / 桌面 */
@media (min-width: 900px) {
  .app-shell { flex-direction: row; }
  /* 桌面端导航在左侧，不需要底部留白 */
  .page { padding-bottom: 28px; }
  .tabbar {
    position: sticky;
    top: 0;
    left: 0;
    height: 100vh;
    width: 208px;
    flex-direction: column;
    border-top: 0;
    border-right: 1px solid var(--border);
    padding: 18px 12px;
    gap: 4px;
    flex: none;
  }
  .tabbar-item {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 14px;
  }
  .tabbar-item.active {
    background: rgba(34, 211, 238, 0.12);
  }
  .tabbar-item .badge { position: static; transform: none; margin-left: auto; }
  .tabbar-item .ico { font-size: 18px; }
  .main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .fab { right: 28px; bottom: 28px; }
  .toast-host { bottom: 32px; }
}
