/* 匠心聚合风格 · 浅色蓝紫物流 App 视觉 · 微信式底部输入 */

:root {
  --bg: #eef2ff;
  --bg-mid: #f5f7fc;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --line: rgba(59, 108, 255, 0.12);
  --line-strong: rgba(59, 108, 255, 0.22);
  --text: #1a2744;
  --text-title: #152a5c;
  --muted: #7a879f;
  --brand: #3b6cff;
  --brand-soft: #5b8cff;
  --brand-deep: #2a56e0;
  --driver: #3b6cff;
  --shipper: #3b6cff;
  --accent: var(--brand);
  --danger: #ff5a6a;
  --ok: #22c55e;
  --hot: #ff6a3d;
  --warn: #f59e0b;
  --shadow: 0 8px 28px rgba(59, 108, 255, 0.10);
  --shadow-sm: 0 4px 14px rgba(26, 39, 68, 0.06);
  --radius: 18px;
  --radius-sm: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden; /* 整页不滚；仅中间聊天区滚动 */
  background: var(--bg);
  color: var(--text);
  font-family: "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
/* 门户首页仍可整页滚动 */
body:has(.portal) {
  overflow: auto;
  height: auto;
  min-height: 100%;
  min-height: 100dvh;
}
body.role-driver { --accent: var(--driver); }
body.role-shipper { --accent: var(--shipper); }

.app {
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  max-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(91, 140, 255, 0.28), transparent 55%),
    linear-gradient(180deg, #e8eeff 0%, #f3f6ff 32%, #f7f9ff 100%);
}

/* ===== 顶栏（固定不随消息挤走） ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(12px + var(--safe-t)) 16px 12px;
  flex-shrink: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  background: linear-gradient(145deg, #4d7cff 0%, #3b6cff 45%, #6b8fff 100%);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(59, 108, 255, 0.35);
  position: relative;
}
/* 仿 logo 小橙点 */
.avatar::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9a4d, var(--hot));
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(255, 106, 61, 0.4);
}
.brand h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-title);
  letter-spacing: 0.01em;
}
.brand p {
  margin: 3px 0 0;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4a5d7a;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, color .15s, background .15s;
  padding: 0;
}
.icon-btn .ico {
  width: 22px;
  height: 22px;
  display: block;
}
/* 喇叭：默认显示开；静音时显示 mute */
.icon-btn .ico-speaker-mute { display: none; }
.icon-btn.muted .ico-speaker { display: none; }
.icon-btn.muted .ico-speaker-mute { display: block; }
.icon-btn:active { transform: scale(0.96); }
.icon-btn.active {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(59, 108, 255, 0.12);
}
.icon-btn.muted {
  opacity: 1;
  color: #9aa8bf;
  background: #f5f7fc;
}

.status-bar {
  padding: 10px 16px 8px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; margin-right: 6px;
  background: #c5cddc;
  vertical-align: middle;
}
.status-dot.online { background: var(--ok); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.status-dot.busy { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2); }
.status-dot.off { background: var(--danger); box-shadow: 0 0 0 3px rgba(255, 90, 106, 0.18); }

/* ===== 聊天区（唯一滚动区域） ===== */
.chat {
  flex: 1 1 auto;
  min-height: 0; /* 关键：flex 子项才能内部滚动，否则会把底部挤出视口 */
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
/* 消息行：气泡 + 时间 */
.msg-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 88%;
  animation: msgIn 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.msg-row.user { align-self: flex-end; align-items: flex-end; }
.msg-row.agent { align-self: flex-start; align-items: flex-start; }
.msg-row.system {
  align-self: center;
  align-items: center;
  max-width: 96%;
}
.msg-row.panel {
  align-self: stretch;
  max-width: 100%;
  align-items: stretch;
}
.msg-time {
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: 0.02em;
  padding: 0 4px;
  user-select: none;
}
.msg-row.user .msg-time { text-align: right; }
.msg-row.agent .msg-time { text-align: left; }
.msg-row.system .msg-time { text-align: center; opacity: 0.85; }
.msg-row.panel .msg-time { text-align: left; margin-bottom: 2px; }
/* 历史回放：跨天时间可能较长，允许换行；无入场动画，避免重进时「刷一遍」 */
.msg-row.history .msg-time {
  max-width: 100%;
  white-space: normal;
  opacity: 0.9;
}
.msg-row.history {
  opacity: 0.96;
  animation: none;
}

.msg {
  max-width: 100%;
  padding: 11px 13px;
  border-radius: 16px;
  line-height: 1.55;
  font-size: 14.5px;
  white-space: pre-wrap;
  word-break: break-word;
  letter-spacing: 0.01em;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.msg.streaming::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  color: var(--accent);
  animation: blink 1s step-end infinite;
  opacity: 0.7;
}
@keyframes blink {
  50% { opacity: 0; }
}
.msg.typing {
  padding: 12px 16px;
  min-width: 56px;
}
.msg.typing .dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  height: 14px;
}
.msg.typing .dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-soft);
  animation: bounce 1.1s infinite ease-in-out;
}
.msg.typing .dots i:nth-child(2) { animation-delay: 0.15s; }
.msg.typing .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-4px); opacity: 1; }
}
.msg.user {
  background: linear-gradient(135deg, #4d7cff 0%, var(--brand) 55%, #5b8cff 100%);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 6px 16px rgba(59, 108, 255, 0.28);
}
.msg.agent {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-sm);
}
.msg.system {
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 8px;
  box-shadow: none;
  border: none;
}
.msg .meta {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.65;
}

/* ===== 业务面板 ===== */
.panel-card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.panel-card.appear {
  animation: msgIn 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.panel-summary {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.45;
}
.panel-route {
  margin-top: 8px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}
.panel-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-title);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.panel-card h3 span {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  padding: 2px 8px;
  border-radius: 999px;
}
.panel-fields {
  display: grid;
  gap: 6px;
}
.panel-fields .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(59, 108, 255, 0.1);
}
.panel-fields .row:last-child { border-bottom: none; }
.panel-fields .row b { color: var(--muted); font-weight: 500; }
.panel-fields .row i { font-style: normal; text-align: right; color: var(--text); font-weight: 600; }
.panel-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}
.panel-list .item {
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f5f8ff;
  border: 1px solid var(--line);
  color: var(--text);
}
.panel-list .item-btn {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.panel-list .item-btn:hover,
.panel-list .item-btn:active {
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 4px 12px rgba(59, 108, 255, 0.12);
}
.panel-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.panel-btn {
  flex: 1;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.panel-btn-ok {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #4d7cff, var(--brand));
  box-shadow: 0 6px 16px rgba(59, 108, 255, 0.28);
}
.panel-btn-ok:active { transform: scale(0.98); }
.panel-btn-cancel {
  background: #fff;
  color: var(--muted);
}
.panel-btn-cancel:active { background: #f5f7fb; }

/* ===== 输入区（底部固定） ===== */
.composer {
  flex-shrink: 0;
  padding: 10px 12px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 -6px 24px rgba(59, 108, 255, 0.06);
  z-index: 20;
}
.quick {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.quick::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-title);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, color .15s;
}
.chip:active {
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent);
}
/* 微信式：左 话筒/键盘 · 中 输入或按住说话 · 右 电话（实时通话） */
.input-row {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 8px;
  align-items: end;
}
.tool-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4a5d7a;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  padding: 0;
  user-select: none;
  transition: color .15s, background .15s, border-color .15s, box-shadow .15s;
}
.tool-btn .ico {
  width: 22px;
  height: 22px;
  display: block;
}
/* 话筒 / 键盘互斥 */
.tool-btn .ico-keyboard { display: none; }
.input-row[data-mode="voice"] .tool-btn .ico-mic { display: none; }
.input-row[data-mode="voice"] .tool-btn .ico-keyboard { display: block; }
.tool-btn:active { transform: scale(0.96); }
.tool-btn-call {
  color: #fff;
  border: none;
  background: linear-gradient(145deg, #5d8dff, var(--brand));
  box-shadow: 0 6px 16px rgba(59, 108, 255, 0.32);
}
.tool-btn-call:active { transform: scale(0.96); }
.tool-btn-call.on {
  background: linear-gradient(145deg, #ff7a88, var(--danger));
  box-shadow: 0 6px 16px rgba(255, 90, 106, 0.35);
}
.input-main {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: stretch;
}
.input-main textarea,
.input-main .hold-bar {
  width: 100%;
}
textarea {
  width: 100%;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #f7f9ff;
  color: var(--text);
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  display: block;
}
textarea::placeholder { color: #a8b3c7; }
textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 3px rgba(59, 108, 255, 0.12);
  background: #fff;
}
.btn {
  height: 40px;
  min-width: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #4d7cff, var(--brand));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 0 14px;
  box-shadow: 0 6px 16px rgba(59, 108, 255, 0.32);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn.hangup {
  background: linear-gradient(135deg, #ff7a88, var(--danger));
  box-shadow: 0 6px 16px rgba(255, 90, 106, 0.3);
  min-width: 120px;
  height: 44px;
}
/* 默认文本模式：隐藏按住说话 */
.input-row[data-mode="text"] .hold-bar { display: none; }
.input-row[data-mode="text"] textarea { display: block; }
/* 语音模式：隐藏输入框，显示按住说话 */
.input-row[data-mode="voice"] textarea { display: none; }
.input-row[data-mode="voice"] .hold-bar { display: flex; }
.btn.hold,
.btn.hold-bar {
  background: #fff;
  color: var(--text-title);
  border: 1px solid var(--line);
  min-width: 0;
  height: 40px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 12px;
}
.btn.hold.recording,
.btn.hold-bar.recording {
  background: color-mix(in srgb, var(--danger) 12%, #fff);
  border-color: var(--danger);
  color: var(--danger);
  animation: pulse 1s infinite;
  box-shadow: 0 4px 14px rgba(255, 90, 106, 0.2);
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* ===== 通话中悬浮条（不遮挡对话文字/面板） ===== */
.call-float {
  display: none;
  position: fixed;
  left: 50%;
  /* 浮在输入栏上方，不挡底部操作；对话文字/面板仍可滚动查看 */
  bottom: calc(118px + var(--safe-b));
  transform: translateX(-50%) translateY(10px);
  z-index: 40;
  width: min(440px, calc(100% - 20px));
  max-width: 480px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, transform .22s ease;
}
.call-float.show {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: none;
}
.call-float-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 14px;
  border-radius: 999px;
  background: rgba(22, 32, 58, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 36px rgba(22, 32, 58, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #fff;
}
.call-float-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.call-float-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: call-pulse 1.6s ease-out infinite;
  flex-shrink: 0;
}
.call-float.listening .call-float-pulse {
  background: #60a5fa;
  box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.55);
}
.call-float.thinking .call-float-pulse {
  background: #fbbf24;
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5);
}
@keyframes call-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.call-float-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.call-float-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.call-float-status {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.25;
  min-height: 15px;
}
.call-float-hangup {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 40px;
  min-width: 40px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  background: linear-gradient(145deg, #ff7a88, var(--danger));
  box-shadow: 0 6px 16px rgba(255, 90, 106, 0.4);
}
.call-float-hangup:active { transform: scale(0.96); }
.call-float-hangup .ico {
  width: 16px;
  height: 16px;
  display: block;
}
/* 通话中：对话区多留底边距，避免末条被悬浮条挡住 */
body.in-call .chat {
  padding-bottom: 72px;
}
body.in-call .composer {
  box-shadow: 0 -8px 28px rgba(59, 108, 255, 0.08);
}
/* 兼容旧类名（若缓存未刷新） */
.call-overlay { display: none !important; }

/* ===== 入口门户 ===== */
.portal {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(91, 140, 255, 0.32), transparent 60%),
    linear-gradient(180deg, #e8eeff 0%, #f5f7fc 50%, #ffffff 100%);
}
.portal-box { width: min(420px, 100%); }
.portal-box h1 {
  margin: 0 0 8px;
  font-size: 26px;
  text-align: center;
  color: var(--text-title);
  font-weight: 800;
}
.portal-box .sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.5;
}
.role-cards { display: grid; gap: 12px; }
.role-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.role-card:active { transform: scale(0.98); }
.role-card.driver,
.role-card.shipper {
  border-color: color-mix(in srgb, var(--brand) 22%, transparent);
}
.role-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--text-title);
  font-weight: 800;
}
.role-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.role-card .tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 12%, #fff);
  color: var(--brand);
}

.asr-hint {
  font-size: 12px;
  color: var(--accent);
  min-height: 16px;
  margin: 0 0 6px;
  padding: 0 4px;
  font-weight: 600;
}

/* ===== 手机号门禁 ===== */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px 16px;
  background: rgba(26, 39, 68, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.auth-gate.hidden { display: none; }
.auth-card {
  width: min(380px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 20px 18px;
  box-shadow: 0 20px 50px rgba(59, 108, 255, 0.16);
}
.auth-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--text-title);
  font-weight: 800;
}
.auth-card .auth-desc {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.auth-card label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.auth-card input[type="tel"] {
  width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #f7f9ff;
  color: var(--text);
  font-size: 17px;
  letter-spacing: 0.06em;
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-card input:focus {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 0 0 3px rgba(59, 108, 255, 0.12);
  background: #fff;
}
.auth-card .auth-err {
  min-height: 18px;
  margin: 8px 0 12px;
  font-size: 12px;
  color: var(--danger);
}
.auth-card .auth-actions {
  display: flex;
  gap: 10px;
}
.auth-card .auth-actions button {
  flex: 1;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #4d7cff, var(--brand));
  color: #fff;
  box-shadow: 0 8px 20px rgba(59, 108, 255, 0.32);
}
.auth-card .auth-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}
.auth-card .auth-tip {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}
.identity-chip {
  font-size: 11px;
  color: var(--muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  box-shadow: var(--shadow-sm);
}
