:root {
  --bg: #ddecfd;
  --bg-elevated: #ffffff;
  --card: #ffffff;
  --text: #2c2420;
  --muted: #7a6f68;
  --primary: #e8956a;
  --primary-hover: #d87a4e;
  --secondary: #8fb9a8;
  --danger: #c45c5c;
  --ok: #5a9e7c;
  --focus-ring: #d4a574;
  --border: #ddecfd;
  --sidebar-w: 260px;
  --topbar-h: 56px;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(44, 36, 32, 0.08);
  /* 层级：主内容 < 顶栏 < 底栏 < 移动端遮罩 < 侧栏 < 弹窗 */
  --z-main: 0;
  --z-sticky-topbar: 10;
  --z-bottom-nav: 20;
  --z-sidebar-backdrop: 25;
  --z-sidebar-mobile: 30;
  --z-modal: 200;
  --z-worker-call: 400;
  --z-user-call: 400;
}

* {
  box-sizing: border-box;
}

html {
  /* 避免部分浏览器在跳转后把根字号压到约 90%，并统一布局缩放为 100% */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  zoom: 1;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
}

/* 各端登录/注册页：与帮帮员登录一致的全屏背景图 */
body:has(.auth-wrap),
body:has(.helper-auth-wrap),
body:has(#app > .auth-wrap) {
  background: url("../images/背景图片.png") center/cover no-repeat fixed;
}

a {
  color: var(--primary-hover);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  min-height: 0;
  overflow-x: visible;
  overflow-y: visible;
}

.sidebar__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: visible;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sidebar__brand,
.sidebar__account-wrap {
  flex-shrink: 0;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px;
  margin-bottom: 8px;
}

.sidebar__logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--primary), #f0b090);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 14px;
}

.sidebar__title {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
}

.sidebar__subtitle {
  font-size: 11px;
  color: var(--muted);
}

.sidebar__group {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 12px 10px 6px;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: rgba(232, 149, 106, 0.12);
}

.nav-item.active {
  background: rgba(232, 149, 106, 0.2);
  border-color: rgba(232, 149, 106, 0.35);
}

.nav-item .icon {
  width: 22px;
  text-align: center;
  opacity: 0.9;
}

.sidebar__footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  padding-left: 10px;
}

.sidebar__account-wrap {
  position: relative;
  z-index: 2;
  margin-bottom: 12px;
  padding: 0 4px;
}

.sidebar__account-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.sidebar__account-btn:hover {
  background: rgba(232, 149, 106, 0.1);
}

.sidebar__avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--primary), #f0b090);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
}

.sidebar__avatar--worker {
  background: linear-gradient(145deg, #8fb9a8, #6a9e8c);
}

.sidebar__avatar--admin {
  background: linear-gradient(145deg, #5c4a3d, #8b7355);
  font-size: 12px;
}

.sidebar__account-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__account-name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}

.sidebar__account-meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.25;
}

.profile-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1;
  max-height: min(72vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 4px 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.profile-menu__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 12px 10px 6px;
  margin: 0;
}

.profile-menu__field {
  padding: 0 8px 8px;
}

.profile-menu__field input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font: inherit;
}

.profile-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 8px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.profile-menu__item:hover {
  background: rgba(232, 149, 106, 0.12);
}

.profile-menu__item.is-active {
  background: rgba(232, 149, 106, 0.18);
}

.profile-menu__avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--primary), #f0b090);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 13px;
  flex-shrink: 0;
}

.profile-menu__lines {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-menu__name {
  font-weight: 600;
  font-size: 13px;
}

.profile-menu__sub {
  font-size: 11px;
  color: var(--muted);
}

.sidebar__account-wrap--admin .sidebar__account-btn--admin {
  border-color: #4a4038;
  background: rgba(255, 255, 255, 0.06);
  color: #f6f0e8;
}

.sidebar__account-wrap--admin .sidebar__account-btn--admin:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar--admin .sidebar__account-meta {
  color: #b8a99a !important;
}

.profile-menu--admin {
  background: #3a322e;
  border-color: #4a4038;
  color: #f6f0e8;
}

.profile-menu--admin .profile-menu__title {
  color: #b8a99a;
}

.profile-menu--admin .profile-menu__field input {
  background: #2c2420;
  border-color: #4a4038;
  color: #f6f0e8;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: var(--z-main);
}

.topbar {
  min-height: var(--topbar-h);
  height: auto;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky-topbar);
  flex-shrink: 0;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar__left > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
}

.breadcrumbs {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.page-heading {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.25;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.content {
  padding: 20px;
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: stretch;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card--flat {
  box-shadow: none;
}

.card--task-actions {
  margin-top: 16px;
}

.card h2,
.card h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-card {
  border-radius: var(--radius);
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.stat-card__label {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 6px;
}

.stat-card__value {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.status-dot.ok {
  background: var(--ok);
}

.status-dot.offline {
  background: #999;
}

.btn {
  display: inline-block;
  vertical-align: middle;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 12px 18px;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.btn:hover {
  background: var(--primary-hover);
}

.btn.secondary {
  background: #e8e4e0;
  color: var(--text);
}

.btn.secondary:hover {
  background: #ddd8d3;
}

.btn.outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.btn.block {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
}

/* 话务端：配送码大字展示 */
.worker-verify-code {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}
.worker-verify-code--panel {
  font-size: clamp(1.35rem, 3.8vw, 1.95rem);
  line-height: 1.35;
}
.worker-verify-code--detail {
  font-size: clamp(1.65rem, 4.2vw, 2.35rem);
  line-height: 1.35;
}

.attitude-star-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.attitude-star-btn.is-selected {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.attitude-star-btn.is-selected:hover {
  background: var(--primary-hover, #347a61);
}

.btn-xxl {
  min-height: 72px;
  font-size: 20px;
}

.btn-lg {
  min-height: 44px;
  padding: 16px 12px;
}

.task-list {
  display: grid;
  gap: 14px;
}

.task-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #fffdf9;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 1;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-warning {
  background: #fff3e0;
  color: #b45309;
}

.badge-danger {
  background: #fde8e8;
  color: #b45309;
}

.badge-ok {
  background: #e8f5ef;
  color: #1a6b4a;
}

.badge-muted {
  background: #f0ebe8;
  color: var(--muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
}

.table tr:hover td {
  background: rgba(232, 149, 106, 0.06);
}

.empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
}

.device-ring-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  justify-content: flex-start;
}

.device-info-panel {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.device-info-panel p {
  margin: 0;
}

.device-ring {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--battery-color, var(--primary)) calc(var(--pct, 0) * 1%),
    #e8dfd4 0
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.device-ring-inner {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  box-shadow: inset 0 0 0 1px var(--border);
  gap: 2px;
}

.device-ring__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.device-ring__pct {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--battery-color, var(--primary-hover));
}

/* 离线或未同步时不展示具体百分比，用占位符 */
.device-ring__pct--na {
  font-size: 32px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.device-ring__status {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  max-width: 11em;
  line-height: 1.35;
}

.device-ring__status--online {
  color: var(--ok);
  font-weight: 600;
}

.device-ring__status--offline {
  color: var(--danger);
  font-weight: 700;
}

.device-detail-status--offline {
  color: var(--danger);
  font-weight: 700;
  font-size: 12px;
}

.verify-code {
  font-size: 48px;
  letter-spacing: 10px;
  font-weight: 900;
  color: var(--primary-hover);
  text-align: center;
  margin: 12px 0;
}

/* 登录/注册页顶栏：返回上一级 + 入口 */
.auth-backbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.auth-backbar__spacer {
  flex: 1;
  min-width: 8px;
}

/* 侧栏当前用户：仅展示，不提供换号入口 */
.sidebar__account-static {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  text-align: left;
}

.sidebar__account-static .sidebar__account-meta {
  cursor: default;
}

.auth-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: url("../images/背景图片.png") center/cover no-repeat fixed;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 28px;
  padding: 32px 28px 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 16px;
  background: #fff;
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

/* 表单下方说明（短 placeholder + 此处补全，避免窄屏占位符溢出） */
.input-hint {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin: 6px 0 0;
}

.auth-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
  border: 1px solid #fecaca;
}
.auth-error.show { display: block; }

.pwd-strength {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-hint__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(44, 36, 32, 0.06);
  color: var(--text);
  word-break: break-all;
}

/* 统一图形验证码（用户注册 / 帮帮员申请等） */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.captcha-img-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 48px;
  padding: 4px 8px;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  font: inherit;
}

.captcha-img-btn:hover {
  border-color: var(--primary, #e8956a);
  box-shadow: 0 4px 12px rgba(232, 149, 106, 0.15);
}

.captcha-img-btn img {
  display: block;
  height: 44px;
  width: auto;
  border-radius: 6px;
  pointer-events: none;
}

.captcha-fallback {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  color: #334155;
  user-select: none;
}

.captcha-loading {
  font-size: 13px;
  color: var(--muted, #888);
}

/* ---------- 总控台登录（admin-app.js · adminAuthHtml） ---------- */
.auth-wrap--admin {
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(28px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: url("../images/背景图片.png") center/cover no-repeat fixed;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-card--admin {
  max-width: min(100%, 460px);
  width: 100%;
  margin: auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.auth-card--admin h1 {
  font-size: clamp(1.15rem, 4vw, 1.35rem);
  line-height: 1.3;
}

.admin-auth-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.admin-auth-header__mark {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(145deg, #6b5b8c, #4a3d62);
  box-shadow: 0 4px 14px rgba(75, 61, 98, 0.35);
}

.admin-auth-header__titles {
  min-width: 0;
  flex: 1;
}

.admin-auth-header__sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.admin-auth-intro {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}

.admin-auth-intro strong {
  color: var(--primary-hover);
  font-weight: 700;
}

.admin-login-mode {
  border: none;
  margin: 14px 0 6px;
  padding: 0;
}

.admin-login-mode__legend {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.admin-login-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: rgba(221, 236, 253, 0.35);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.admin-login-option:last-of-type {
  margin-bottom: 0;
}

.admin-login-option:hover {
  border-color: rgba(232, 149, 106, 0.45);
  background: rgba(232, 149, 106, 0.08);
}

.admin-login-option:has(.admin-login-option__input:checked) {
  border-color: rgba(232, 149, 106, 0.65);
  background: rgba(232, 149, 106, 0.14);
  box-shadow: 0 0 0 1px rgba(232, 149, 106, 0.2);
}

.admin-login-option__input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-hover);
  cursor: pointer;
}

.admin-login-option__box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.admin-login-option__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.admin-login-option__desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.auth-card--admin .field input {
  font-size: 16px; /* 避免 iOS 聚焦时整页缩放 */
}

.admin-auth-footnote {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 380px) {
  .auth-card--admin {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .admin-login-option {
    padding: 10px 12px;
  }
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.tab {
  padding: 10px 14px;
  border: none;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.tab.active {
  color: var(--primary-hover);
  border-bottom-color: var(--primary);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.category-card {
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  background: #fffdf9;
  cursor: pointer;
  text-align: left;
  font: inherit;
  min-height: 108px;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s, background 0.2s;
}

.category-card:hover,
.category-card:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 149, 106, 0.25);
  transform: translateY(-2px);
}

.category-card:active {
  transform: translateY(0);
}

.category-card.other {
  border-color: rgba(232, 149, 106, 0.55);
}

.category-card.selected {
  border-color: var(--primary);
  background: #fef7f2;
  box-shadow: 0 0 0 3px rgba(232, 149, 106, 0.25);
}

.category-card__icon {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}

.category-card__title {
  font-weight: 800;
  font-size: 16px;
  margin: 0 0 6px;
}

.category-card__desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* 选中勾选标记 */
.category-card__check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

.category-card.selected .category-card__check {
  display: flex;
}

.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0;
  list-style: none;
}

.steps li {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 10px;
  background: #f0ebe8;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.steps li.on {
  background: rgba(232, 149, 106, 0.25);
  color: var(--text);
}

/* ===== 动态进度条（一键帮步骤指示） ===== */
.help-progress {
  margin-bottom: 20px;
}

.help-progress__track {
  height: 8px;
  background: #efe8e2;
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.help-progress__fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary) 0%, #f0b28c 100%);
  transition: width 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  position: relative;
}

/* 流动光效 */
.help-progress__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: progressShine 1.6s linear infinite;
}

@keyframes progressShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.help-progress__steps {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.help-progress__step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  transition: color 0.3s;
}

.help-progress__step .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #efe8e2;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  transition: background 0.3s, color 0.3s;
}

.help-progress__step.done {
  color: var(--text);
}

.help-progress__step.done .dot {
  background: var(--primary);
  color: #fff;
}

.help-progress__step.current {
  color: var(--primary-hover);
}

.help-progress__step.current .dot {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(232, 149, 106, 0.25);
}

.help-progress__pct {
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
}

.banner {
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(232, 149, 106, 0.18);
  border: 1px solid rgba(232, 149, 106, 0.35);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  z-index: var(--z-bottom-nav);
  justify-content: space-around;
}

.bottom-nav a {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.bottom-nav a.active {
  color: var(--primary-hover);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: var(--z-sidebar-backdrop);
}

.sidebar-backdrop.show {
  display: block;
}

body.sidebar-open .sidebar-backdrop {
  display: block;
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: var(--z-sidebar-mobile);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .bottom-nav {
    z-index: calc(var(--z-sidebar-backdrop) - 1);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .burger {
    display: inline-flex;
  }

  .app-shell {
    padding-bottom: 64px;
  }

  .bottom-nav {
    display: flex;
  }

  .content {
    padding: 14px;
  }
}

.focusable:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus,
.nav-item:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .split-layout {
    grid-template-columns: 1fr;
  }
}

.map-amap-host {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #e8f0e8;
  min-height: 200px;
}

.map-amap-host__hint {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 120;
  pointer-events: none;
  max-width: calc(100% - 16px);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(30, 30, 30, 0.85);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.map-placeholder {
  height: 280px;
  border-radius: 14px;
  background: repeating-linear-gradient(
      45deg,
      #f0ebe8,
      #f0ebe8 10px,
      #e8dfd4 10px,
      #e8dfd4 20px
    ),
    linear-gradient(135deg, #d4e8e0, #e8dfd4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
  border: 1px dashed var(--border);
}

.mask-lock {
  position: relative;
  min-height: 120px;
  border-radius: 12px;
  background: #f0ebe8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.user-list-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
}

.user-list-card:hover {
  border-color: var(--primary);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--secondary), #b8d4c8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
}

.sidebar--admin {
  background: #2c2420 !important;
  color: #f6f0e8;
  border-color: #4a4038 !important;
}

.sidebar--admin .sidebar__title {
  color: #f6f0e8 !important;
}

.sidebar--admin .sidebar__subtitle,
.sidebar--admin .sidebar__group {
  color: #b8a99a !important;
}

.sidebar--admin .nav-item {
  color: #f6f0e8;
}

.sidebar--admin .nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar--admin .nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.sidebar--admin .sidebar__footer {
  border-color: #4a4038 !important;
  color: #b8a99a !important;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 13px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 36, 32, 0.5);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.show {
  display: flex;
}

.modal-dialog {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  max-width: 560px;
  width: 100%;
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.65;
}

.modal-body dl {
  margin: 0;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px 12px;
}

.modal-body dt {
  color: var(--muted);
  margin: 0;
  font-weight: 600;
}

.modal-body dd {
  margin: 0;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-footer.modal-footer--nav {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.modal-footer.modal-footer--nav .modal-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.modal-footer .modal-nav-hint {
  margin: 0;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.filter-bar .field {
  margin-bottom: 0;
  min-width: 140px;
}

.filter-bar label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.filter-bar input,
.filter-bar select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--primary-hover);
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}

.btn-ghost:hover {
  background: rgba(232, 149, 106, 0.15);
}

/* —— 页面层次：主次、间距、重点区域 —— */
.content--page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.section-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.page-lead {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}

.page-section {
  margin-top: 22px;
}

.grid-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 14px;
}

.stat-card--lead {
  border: 2px solid rgba(232, 149, 106, 0.42);
  background: linear-gradient(165deg, #fffefb 0%, #fff8f2 100%);
  box-shadow: 0 10px 28px rgba(232, 149, 106, 0.12);
}

.stat-card__unit {
  font-size: 0.55em;
  font-weight: 700;
  color: var(--muted);
  margin-left: 2px;
}

.stat-card__hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.4;
}

.stat-card__value--accent {
  color: var(--primary-hover);
  font-size: 26px;
}

/* 首页 KPI 等可点击数据卡（链接或按钮均需一致） */
a.stat-card--link,
button.stat-card--link {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  text-align: inherit;
  font: inherit;
  cursor: pointer;
  appearance: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

a.stat-card--link:hover,
button.stat-card--link:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(44, 36, 32, 0.12);
  border-color: rgba(232, 149, 106, 0.45);
}

a.stat-card--link:active,
button.stat-card--link:active {
  transform: translateY(-1px);
}

a.stat-card--link:focus-visible,
button.stat-card--link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.stat-card--link .stat-card__hint {
  color: var(--primary-hover);
  font-weight: 600;
}

/* 顶栏消息铃铛未读角标 */
.topbar-notify {
  position: relative;
  text-decoration: none;
}

.topbar-notify__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  background: var(--danger);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* 帮助与反馈 · 分段标签 */
.support-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.support-tab {
  border: 2px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.support-tab:hover {
  border-color: rgba(232, 149, 106, 0.45);
  color: var(--text);
}

.support-tab.active {
  border-color: rgba(232, 149, 106, 0.65);
  background: rgba(232, 149, 106, 0.14);
  color: var(--primary-hover);
}

.support-callout {
  font-size: 13px;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(221, 236, 253, 0.55);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.support-callout--warn {
  background: rgba(196, 92, 92, 0.08);
  border-color: rgba(196, 92, 92, 0.25);
}

/* 消息列表 */
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 12px;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.notification-item--unread {
  border-color: rgba(232, 149, 106, 0.45);
  box-shadow: 0 0 0 1px rgba(232, 149, 106, 0.12);
}

.notification-item__main {
  flex: 1 1 200px;
  min-width: 0;
}

.notification-item__title {
  font-weight: 700;
  margin: 0 0 4px;
  font-size: 15px;
}

.notification-item__body {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.notification-item__time {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

.notification-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.feedback-kind-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  margin-right: 6px;
}

.feedback-kind-pill--suggestion {
  background: rgba(143, 185, 168, 0.35);
  color: #2d5a45;
}

.feedback-kind-pill--complaint {
  background: rgba(196, 92, 92, 0.2);
  color: #8b2c2c;
}

.card-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.card-title__meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 8px;
  background: #f0ebe8;
}

.card--emphasis {
  border-color: rgba(232, 149, 106, 0.28);
  box-shadow: 0 10px 32px rgba(44, 36, 32, 0.07);
}

.card--cta {
  border-color: rgba(232, 149, 106, 0.35);
  display: flex;
  flex-direction: column;
}

.card--cta .page-lead {
  flex-shrink: 0;
}

.card-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.card-cta-actions .btn {
  flex-shrink: 0;
}

.card--cta .btn-xxl {
  box-shadow: 0 6px 20px rgba(232, 149, 106, 0.25);
}

.card--muted {
  opacity: 0.96;
  background: #fffdf9;
}

.topbar {
  box-shadow: 0 1px 0 rgba(44, 36, 32, 0.06);
}

.topbar--offline {
  box-shadow: inset 0 -3px 0 rgba(196, 92, 92, 0.35);
}

.topbar--online {
  box-shadow: inset 0 -3px 0 rgba(90, 158, 124, 0.4);
}

.presence-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
}

.presence-bar.is-on {
  border-color: rgba(90, 158, 124, 0.45);
  background: rgba(90, 158, 124, 0.08);
}

.presence-bar.is-off {
  border-color: rgba(196, 92, 92, 0.35);
  background: rgba(196, 92, 92, 0.06);
}

.presence-bar__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #bbb;
}

.presence-bar.is-on .presence-bar__dot {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(90, 158, 124, 0.25);
}

.presence-bar.is-off .presence-bar__dot {
  background: #999;
}

.presence-bar__text {
  font-size: 13px;
  font-weight: 700;
  min-width: 3em;
}

.presence-bar__switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
}

.presence-bar__switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--ok);
}

.alert-banner {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.5;
}

.alert-banner--warn {
  background: rgba(196, 92, 92, 0.09);
  border: 1px solid rgba(196, 92, 92, 0.28);
  color: var(--text);
}

@media (max-width: 720px) {
  .presence-bar__text {
    display: none;
  }
  .content--page {
    padding: 16px 14px 32px;
  }
}

/* ===== 话务中心 · 语音通话（全屏 + 右下角悬浮，挂载在 body） ===== */
#workerCallDock {
  position: static;
  pointer-events: none;
}

#workerCallDock > * {
  pointer-events: auto;
}

.worker-call-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-worker-call);
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  max-height: 100vh;
  overflow: hidden;
}

.worker-call-overlay__bg {
  position: absolute;
  inset: 0;
  background: rgba(18, 24, 32, 0.92);
  background: linear-gradient(165deg, #1a2a1f 0%, #0f1419 45%, #1a1510 100%);
}

.worker-call-overlay__top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 0;
}

.worker-call-fab-txt {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.worker-call-fab-txt:hover {
  background: rgba(255, 255, 255, 0.14);
}

.worker-call-overlay__body {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.worker-call-peer {
  text-align: center;
  color: rgba(255, 255, 255, 0.95);
  max-width: 360px;
}

.worker-call-peer__avatar {
  width: 112px;
  height: 112px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #5a9e7c, #3d6b52);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.worker-call-peer__name {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.worker-call-peer__phone {
  margin: 0 0 12px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
}

.worker-call-peer__task {
  margin: 0 0 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.worker-call-peer__hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.worker-call-peer__time {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.worker-call-loc {
  width: 100%;
  max-width: 420px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 14px;
}

.worker-call-loc__hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.worker-call-loc__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.worker-call-loc__tab {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.worker-call-loc__tab.is-active {
  background: rgba(90, 158, 124, 0.35);
  border-color: rgba(90, 158, 124, 0.55);
  color: #fff;
}

.worker-call-loc__panel {
  color: rgba(255, 255, 255, 0.88);
}

.worker-call-loc__panel .small {
  color: rgba(255, 255, 255, 0.5);
}

.worker-call-loc__addr {
  margin: 0 0 8px;
  font-size: 14px;
}

.worker-call-loc__refresh {
  margin-top: 8px;
  margin-bottom: 10px;
}

.worker-call-map-ph {
  margin-top: 12px;
  height: 120px;
  border-radius: 12px;
  background: #0a0e12;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
}

.worker-call-overlay__toolbar {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 8px 12px calc(24px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.35) 100%);
}

.worker-call-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  max-width: 420px;
  margin: 0 auto;
}

.worker-call-tbtn {
  width: 76px;
  min-height: 76px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.worker-call-tbtn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.worker-call-tbtn.is-on {
  background: rgba(90, 158, 124, 0.35);
  border-color: rgba(90, 158, 124, 0.5);
}

.worker-call-tbtn--muted {
  opacity: 0.45;
  cursor: not-allowed;
}

.worker-call-tbtn--muted:hover {
  background: rgba(255, 255, 255, 0.08);
}

.worker-call-loc__tab--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.worker-call-loc__tab--disabled.is-active {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.18);
}

.worker-call-tbtn--danger {
  background: rgba(196, 92, 92, 0.45);
  border-color: rgba(255, 255, 255, 0.2);
}

.worker-call-tbtn--danger:hover {
  background: rgba(196, 92, 92, 0.6);
}

.worker-call-tbtn__icon {
  font-size: 22px;
  line-height: 1;
}

.worker-call-tbtn__lbl {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.95;
}

.worker-call-mini {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: calc(var(--z-worker-call) - 1);
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  max-width: min(92vw, 320px);
}

@media (max-width: 900px) {
  .worker-call-mini {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }
}

.worker-call-mini__main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: rgba(26, 42, 31, 0.96);
  color: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  min-width: 0;
}

.worker-call-mini__main:hover {
  background: rgba(35, 55, 42, 0.98);
}

.worker-call-mini__avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #5a9e7c, #3d6b52);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex-shrink: 0;
}

.worker-call-mini__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.worker-call-mini__name {
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worker-call-mini__sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
}

.worker-call-mini__hang {
  width: 44px;
  border: none;
  background: rgba(196, 92, 92, 0.85);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.worker-call-mini__hang:hover {
  background: rgba(196, 92, 92, 1);
}

.worker-call-overlay--ringing .worker-call-dialing,
.worker-call-overlay--ringing .worker-call-incoming {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.95);
}

.worker-call-dialing__title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 12px;
}

.worker-call-dialing__sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 20px;
  max-width: 280px;
  line-height: 1.5;
}

.worker-call-dialing__cancel {
  margin-top: 8px;
}

.worker-call-peer__avatar--lg {
  width: 96px;
  height: 96px;
  font-size: 36px;
  margin-bottom: 12px;
}

.worker-call-peer__device-tag {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: #ffb4a8;
  letter-spacing: 0.04em;
}

.worker-call-incoming__actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.worker-call-incoming__ok {
  min-width: 120px;
}

/* VIP用户 · 通话握手层 */
#userCallDock {
  position: static;
  pointer-events: none;
}

#userCallDock > * {
  pointer-events: auto;
}

.user-call-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-user-call);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.user-call-overlay__bg {
  position: absolute;
  inset: 0;
  background: rgba(44, 36, 32, 0.88);
}

.user-call-dialing,
.user-call-incoming,
.user-call-active {
  position: relative;
  z-index: 2;
  max-width: 360px;
  width: 100%;
  text-align: center;
  color: var(--text);
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.user-call-dialing__pulse {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--primary-hover);
}

.user-call-incoming__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 16px;
}

.user-call-peer__avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--secondary), #6a9e8c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
}

.user-call-peer__avatar--lg {
  width: 96px;
  height: 96px;
  font-size: 36px;
}

.user-call-peer__name {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px;
}

.user-call-peer__tag {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--danger);
}

.user-call-incoming__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.user-call-overlay--active {
  background: transparent;
}

.user-call-overlay--active .user-call-overlay__bg {
  background: rgba(18, 24, 32, 0.9);
}

.user-call-overlay--active .user-call-active {
  background: rgba(255, 254, 251, 0.98);
  color: var(--text);
}

.user-call-fab-txt {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.user-call-active__time {
  font-size: 16px;
  font-weight: 700;
  margin: 12px 0 20px;
}

.user-call-active__hang {
  width: 100%;
  max-width: 240px;
}

.user-call-active--scroll {
  max-height: min(78vh, 560px);
  overflow-y: auto;
}

.user-call-worker-card {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(232, 149, 106, 0.1);
  border: 1px solid rgba(232, 149, 106, 0.25);
  text-align: left;
}

.user-call-worker-card__title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

.user-call-worker-card__name {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
}

.user-call-worker-card__id {
  font-weight: 700;
  color: var(--muted);
  font-size: 14px;
}

.user-call-worker-card__row {
  margin: 0;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.user-call-supervise-hint {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.user-page-worker-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(90, 158, 124, 0.08);
  border: 1px solid rgba(90, 158, 124, 0.25);
}

.user-call-mini {
  position: fixed;
  right: 16px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: var(--z-user-call);
  display: flex;
  align-items: stretch;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  max-width: min(92vw, 300px);
}

@media (min-width: 901px) {
  .user-call-mini {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

.user-call-mini__main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: var(--card);
  cursor: pointer;
  text-align: left;
  font: inherit;
  min-width: 0;
}

.user-call-mini__avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--secondary), #6a9e8c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.user-call-mini__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-call-mini__name {
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-call-mini__sub {
  font-size: 11px;
  color: var(--muted);
}

.user-call-mini__hang {
  width: 44px;
  border: none;
  background: var(--danger);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.worker-call-overlay--ringing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.worker-call-map-unauth {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 16px;
  margin-top: 8px;
  text-align: center;
}

.loc-share-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.45;
}

.loc-share-row input {
  margin-top: 3px;
  flex-shrink: 0;
}

.assist-global-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(16px);
  z-index: 99999;
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(20, 24, 28, 0.92);
  color: #f5f5f5;
  font-size: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  pointer-events: none;
  max-width: min(92vw, 360px);
  text-align: center;
}

.assist-global-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.admin-live-map {
  width: 100%;
  height: 360px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #e8f0e8;
}

.admin-live-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.admin-live-legend__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.admin-live-legend__dot--worker {
  background: #2fbf71;
  box-shadow: 0 0 10px rgba(47, 191, 113, 0.9);
}

.admin-live-legend__dot--user {
  background: #ff8e4a;
  box-shadow: 0 0 10px rgba(255, 142, 74, 0.9);
}

.admin-live-dot {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.admin-live-dot--worker {
  background: #2fbf71;
  box-shadow: 0 0 14px rgba(47, 191, 113, 0.95);
}

.admin-live-dot--user {
  background: #ff8e4a;
  box-shadow: 0 0 14px rgba(255, 142, 74, 0.95);
}

.admin-live-dot__pulse {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.6;
  animation: adminDotPulse 1.6s ease-out infinite;
}

.admin-live-dot--worker .admin-live-dot__pulse {
  color: rgba(47, 191, 113, 0.9);
}

.admin-live-dot--user .admin-live-dot__pulse {
  color: rgba(255, 142, 74, 0.9);
}

.admin-live-label {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.admin-live-label--worker {
  color: #1c7a47;
}

.admin-live-label--user {
  color: #b15a24;
}

@keyframes adminDotPulse {
  0% {
    transform: scale(0.7);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

.home-quick-head {
  flex-wrap: wrap;
  gap: 10px;
}

.home-title-reset {
  margin: 0;
}

.home-quick-actions {
  margin-top: 12px;
  flex-wrap: wrap;
}

.home-recent-head {
  align-items: center;
}

.home-recent-list {
  margin-top: 12px;
}

.home-task-link {
  margin-top: 8px;
}

/* ===== 设备独立详情页（大版面展示） ===== */
.dev-hero {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  align-items: center;
}
.dev-hero__img {
  flex: 0 0 260px;
  max-width: 100%;
  background: #fff;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(44, 36, 32, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dev-hero__img img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.dev-hero__main {
  flex: 1;
  min-width: 260px;
}
.dev-hero__title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
}
.dev-hero__sub {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}
.dev-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.dev-stat {
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: #fff;
}
.dev-stat__label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.8rem;
}
.dev-stat__value {
  margin: 0;
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--text);
}
.dev-stat__hint {
  margin: 4px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}
.dev-stat--ok {
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  border-color: #cde8d0;
}
.dev-stat--ok .dev-stat__value { color: #2e7d32; }
.dev-stat--warn {
  background: linear-gradient(135deg, #fff3e0, #fff8e1);
  border-color: #ffe0b2;
}
.dev-stat--warn .dev-stat__value { color: #e65100; }
.dev-stat--info {
  background: linear-gradient(135deg, #e3f2fd, #e8eaf6);
  border-color: #c5cae9;
}
.dev-stat--info .dev-stat__value { color: #1565c0; }
.dev-stat--accent {
  background: linear-gradient(135deg, #f3e5f5, #ede7f6);
  border-color: #e1d5f0;
}
.dev-stat--accent .dev-stat__value { color: #6a1b9a; }

.med-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 760px) {
  .med-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .med-grid {
    grid-template-columns: 1fr;
  }
}
.med-cell {
  border-radius: 18px;
  padding: 18px;
  border: 2px solid #e0e0e0;
  background: #fff;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.med-cell:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(44, 36, 32, 0.1);
}
.med-cell__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.med-cell__badge {
  font-size: 0.84rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}
.med-cell__name {
  margin: 0 0 12px;
  font-size: 1.06rem;
  font-weight: 700;
}
.med-cell__meta {
  margin: 0 0 4px;
  font-size: 0.86rem;
  color: var(--muted);
}
.med-cell--ok {
  background: linear-gradient(160deg, #f4fbf6, #e8f5e9);
  border-color: #a5d6a7;
}
.med-cell--low {
  background: linear-gradient(160deg, #fff9f0, #fff3e0);
  border-color: #ffb74d;
  box-shadow: 0 6px 18px rgba(230, 126, 34, 0.14);
}
.med-cell--empty {
  background: #fafafa;
  border-color: #ececec;
}
.med-cell--empty .med-cell__name,
.med-cell--empty .med-cell__meta {
  color: #b3b3b3;
}

.med-cell__user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.med-cell__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary), #f0b090);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.med-cell--empty .med-cell__avatar {
  background: #d5d5d5;
}
.med-cell__username {
  font-weight: 700;
  font-size: 0.95rem;
}
.med-cell--empty .med-cell__username {
  color: #b3b3b3;
}

.med-item {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.med-item:last-child {
  margin-bottom: 0;
}
.med-item__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.med-item__name {
  font-weight: 600;
  font-size: 0.92rem;
}
.med-item__remain {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.med-item__bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.07);
  border-radius: 4px;
  overflow: hidden;
}
.med-item__bar-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #9e9e9e;
}
.med-item__bar-fill--ok { background: #5a9e7c; }
.med-item__bar-fill--warn { background: #e0a13c; }
.med-item__bar-fill--low { background: #d97a4a; }
.med-item__bar-fill--out { background: #c45c5c; }
.med-item__meta {
  margin: 6px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.med-item__actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}
.med-cell__userbtn {
  margin-left: auto;
  flex: none;
}
.btn-ghost.danger {
  color: var(--danger);
  border-color: rgba(196, 92, 92, 0.35);
}
.btn-ghost.danger:hover {
  background: rgba(196, 92, 92, 0.1);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.info-tile {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
}
.info-tile .muted {
  font-size: 0.8rem;
}
.info-tile strong {
  font-size: 0.94rem;
}

.dev-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

/* ===== 我的设备列表卡片 ===== */
.device-card__inner {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.device-card__img {
  flex: 0 0 120px;
  max-width: 100%;
  background: #fff;
  padding: 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.device-card__img img {
  width: 100%;
  max-height: 100px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.device-card__info {
  flex: 1;
  min-width: 180px;
}
.device-card__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.device-card__name {
  margin: 0;
  font-size: 1.05rem;
}
.device-card__meta {
  margin: 0 0 14px;
  font-size: 0.9rem;
}
.device-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
