:root {
  --bg: #f4efe8;
  --bg-soft: #fbf7f1;
  --surface: rgba(255, 252, 248, 0.78);
  --surface-strong: #fffdf9;
  --surface-muted: #f7f0e7;
  --line: rgba(122, 94, 67, 0.16);
  --line-strong: rgba(95, 70, 48, 0.24);
  --text: #201914;
  --text-soft: #6d6258;
  --text-faint: #93867a;
  --accent: #7d5c43;
  --accent-strong: #624530;
  --accent-soft: #ede2d5;
  --success: #2d6b4f;
  --warn: #9a6a23;
  --danger: #9a3d34;
  --shadow-lg: 0 24px 80px rgba(43, 27, 14, 0.12);
  --shadow-md: 0 18px 48px rgba(52, 35, 22, 0.1);
  --shadow-sm: 0 8px 24px rgba(60, 42, 29, 0.08);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(214, 189, 166, 0.46), transparent 30%),
    radial-gradient(circle at top right, rgba(236, 223, 209, 0.72), transparent 26%),
    linear-gradient(180deg, #f7f1ea 0%, #f2ece4 48%, #efe7dd 100%);
  color: var(--text);
}

.login-shell {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
}

.login-card {
  width: min(100%, 560px);
  max-width: 560px;
  padding: 42px;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted, #666);
  cursor: pointer;
  user-select: none;
}

.remember-row input[type="checkbox"] {
  accent-color: var(--accent, #4f46e5);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.saved-accounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.saved-account-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 8px;
  background: var(--surface, #f9f9fb);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}

.saved-account-chip:hover {
  background: var(--accent-light, #eef2ff);
  border-color: var(--accent, #4f46e5);
}

.saved-account-name {
  color: var(--text, #222);
}

.saved-account-remove {
  color: var(--text-muted, #999);
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}

.saved-account-remove:hover {
  color: #e53e3e;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.page-glow {
  position: absolute;
  width: 38rem;
  height: 38rem;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.4;
  pointer-events: none;
}

.page-glow-left {
  top: -12rem;
  left: -10rem;
  background: rgba(217, 198, 180, 0.85);
}

.page-glow-right {
  top: 10rem;
  right: -12rem;
  background: rgba(235, 219, 201, 0.8);
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

section + section,
.section-group + .section-card,
.section-group + .workflow-grid,
.section-card + .workflow-grid,
.hero-card + .dashboard-quick-nav,
.dashboard-quick-nav + .section-group {
  margin-top: 14px;
}

.dashboard-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-quick-nav-sidebar {
  display: grid;
  gap: 8px;
}

.dashboard-quick-nav-sidebar .quick-nav-chip {
  width: 100%;
  justify-content: flex-start;
}

.quick-nav-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(122, 94, 67, 0.12);
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.quick-nav-chip:hover {
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-1px);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.03em;
}

h1 {
  margin-bottom: 10px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.1rem, 3.6vw, 3.4rem);
  line-height: 0.98;
  font-weight: 600;
}

h2 {
  margin-bottom: 8px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.75rem, 2.4vw, 2.35rem);
  line-height: 1.02;
  font-weight: 600;
}

h3 {
  margin-bottom: 8px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  line-height: 1.08;
  font-weight: 600;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 18px;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 34%);
  pointer-events: none;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.dashboard-sidebar-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 20px;
}

.dashboard-sidebar {
  padding: 18px;
}

.dashboard-sidebar-wrap .info-card {
  padding: 18px;
}

.sidebar-switcher-card {
  padding: 18px;
}

.sidebar-switcher-card h2 {
  margin-bottom: 10px;
}

.sidebar-account-list {
  display: grid;
  gap: 6px;
}

.sidebar-account-list .account-switcher-item {
  width: 100%;
}

.sidebar-account-list .account-switcher-empty {
  font-size: 0.82rem;
  color: var(--text-faint);
}

.announcement-content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.announcement-edit-box textarea {
  width: 100%;
  resize: vertical;
}

.dashboard-sidebar-head {
  margin-bottom: 14px;
}

.dashboard-sidebar-head h2 {
  margin-bottom: 8px;
  font-size: 2rem;
}

.dashboard-main {
  min-width: 0;
  overflow: hidden;
}

.hero-card {
  padding: 20px;
  z-index: 2;
}

.hero-copy {
  max-width: none;
}

.hero-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-title-row h1 {
  margin-bottom: 0;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-kicker::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

.hero-lead {
  max-width: 36rem;
  margin-bottom: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.hero-action-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.account-switcher-anchor {
  position: relative;
}

.account-switcher-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}

.account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(125, 92, 67, 0.12);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
}

.account-switcher-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  margin-top: 8px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(122, 94, 67, 0.12);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  width: min(320px, 100vw - 32px);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(122, 94, 67, 0.10);
}

.account-switcher-item {
  border: 1px solid rgba(122, 94, 67, 0.12);
  background: rgba(255,255,255,0.72);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  text-align: left;
}

.account-switcher-item.active {
  border-color: rgba(125, 92, 67, 0.28);
  background: rgba(237, 226, 213, 0.72);
}

.account-switcher-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.account-switcher-meta strong,
.account-switcher-meta span,
#current-account-short-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-switcher-meta span {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.account-switcher-empty {
  color: var(--text-soft);
  padding: 10px 6px;
}

/* Sidebar compact account list */
.account-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 4px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.account-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-ok { background: #4caf50; }
.dot-expired { background: #ef5350; }

.account-sidebar-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.student-no-badge {
  color: var(--text-faint);
  font-size: 0.78rem;
  margin-left: 2px;
}

/* Accounts management page — chip grid */
.account-page-head {
  align-items: flex-start;
}

.account-search-input {
  width: 100%;
  max-width: 360px;
  flex: 0 0 360px;
}

.account-batch-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.account-batch-bar .secondary-btn,
.account-batch-bar .text-input {
  min-height: 52px;
}

.account-batch-bar .secondary-btn {
  padding: 0 22px;
  font-size: 0.95rem;
}

.account-batch-bar .muted {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
}

.account-expire-input {
  max-width: 140px;
  flex: 0 0 140px;
}

.account-expire-datetime-input {
  max-width: 220px;
  flex: 0 0 220px;
}

.account-filter-input {
  max-width: 140px;
  flex: 0 0 140px;
}

.accounts-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.account-chip {
  border: 1px solid rgba(122, 94, 67, 0.12);
  background: rgba(255,255,255,0.72);
  border-radius: 12px;
  padding: 8px 10px;
  width: 196px;
  min-width: 196px;
  max-width: 196px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.account-chip-soon {
  border-color: rgba(194, 148, 73, 0.45);
  background: rgba(194, 148, 73, 0.08);
}

.account-chip-expiring {
  border-color: rgba(198, 96, 80, 0.45);
  background: rgba(198, 96, 80, 0.08);
}

.temp-user-row-soon {
  background: rgba(194, 148, 73, 0.08);
}

.temp-user-row-expiring {
  background: rgba(198, 96, 80, 0.08);
}

.account-chip-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.account-chip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.account-chip-top strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.84rem;
}

.account-image-panel {
  margin-top: 8px;
  border-top: 1px solid rgba(122, 94, 67, 0.10);
  padding-top: 8px;
}

.account-image-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.7rem;
  cursor: pointer;
  list-style: none;
}

.account-image-summary::-webkit-details-marker {
  display: none;
}

.account-image-panel-body {
  margin-top: 8px;
  width: 100%;
  max-width: 100%;
}

.account-image-thumb-name {
  font-size: 0.56rem;
  line-height: 1.1;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-image-uploader {
  position: relative;
  width: 100%;
  min-height: 48px;
  padding: 6px 6px;
  border: 1px dashed rgba(122, 94, 67, 0.28);
  border-radius: 10px;
  background: rgba(255,255,255,0.54);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.account-image-uploader:hover,
.account-image-uploader.dragover {
  border-color: rgba(125, 92, 67, 0.55);
  background: rgba(255,255,255,0.82);
}

.account-image-uploader-title {
  font-size: 0.68rem;
  font-weight: 700;
}

.account-image-uploader-tip {
  margin-top: 2px;
  font-size: 0.58rem;
  color: var(--text-faint);
}

.account-image-input-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.account-image-strip-wrap {
  margin-top: 5px;
  max-height: 108px;
  overflow-y: auto;
  padding-right: 2px;
}

.account-image-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.account-image-thumb {
  position: relative;
  min-height: 78px;
  border: 1px solid rgba(122, 94, 67, 0.14);
  background: rgba(255,255,255,0.78);
  border-radius: 9px;
  padding: 16px 4px 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.account-image-thumb-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(122, 94, 67, 0.12);
  background: rgba(255,255,255,0.7);
}

.account-image-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  border-color: rgba(184, 24, 24, 0.82);
  background: rgba(255, 244, 244, 0.98);
  color: #a31212;
  font-weight: 900;
}

.chip-close-btn {
  background: none;
  border: 1px solid rgba(200,80,80,0.25);
  color: #c05050;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s;
}
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s;
}

.chip-close-btn:hover {
  background: rgba(200,80,80,0.10);
}

.account-chip-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.account-chip-bottom .account-student-no {
  font-size: 0.78rem;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chip-bottom .default-tag {
  font-size: 0.72rem;
  padding: 1px 7px;
  flex-shrink: 0;
  white-space: nowrap;
}

.account-manage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 用 .default-tag.tag-* 提高特异性(0,2,0),压过下方 line ~2073 的基础 .default-tag(0,1,0)绿色,
   否则状态标签会被基础规则按源码顺序染成绿色,过期/禁用/失败都显示不出红色。 */
.default-tag.tag-ok {
  background: rgba(76, 175, 80, 0.15);
  color: #2e7d32;
}

.default-tag.tag-expired {
  background: rgba(244, 67, 54, 0.12);
  color: #c62828;
}

.course-group {
  margin-bottom: 12px;
}

.course-group-header {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(122, 94, 67, 0.10);
  margin-bottom: 4px;
  font-size: 0.85rem;
}

.batch-result-group {
  margin-bottom: 12px;
}

.batch-result-account {
  padding: 4px 0;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(122, 94, 67, 0.10);
}

.muted,
.coord-display,
.result-msg,
.logs-table td,
.qr-placeholder,
.empty-state,
.map-search-result {
  color: var(--text-faint);
  font-size: 0.82rem;
}

.primary-btn,
.secondary-btn,
.text-input,
.checkbox-label,
.count-badge,
.default-tag,
.result-status {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.primary-btn,
.secondary-btn {
  min-height: 52px;
  border-radius: 999px;
  padding: 0 22px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn {
  border: 1px solid rgba(97, 69, 47, 0.12);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fffaf6;
  box-shadow: 0 14px 34px rgba(98, 69, 48, 0.22);
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(98, 69, 48, 0.28);
}

.primary-btn:disabled {
  cursor: not-allowed;
  background: linear-gradient(135deg, #ccb8a7 0%, #b99f8b 100%);
  box-shadow: none;
}

.secondary-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.54);
  color: var(--text);
}

.compact-btn {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.84rem;
  border-radius: 999px;
}

.table-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 720px;
  border: 1px solid rgba(122, 94, 67, 0.10);
  border-radius: 16px;
}

.admin-compact-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 0.74rem;
}

.temp-users-table {
  min-width: 1040px;
}

.admin-compact-table th,
.admin-compact-table td {
  padding: 6px 8px;
  border-top: 1px solid rgba(122, 94, 67, 0.08);
  text-align: left;
  vertical-align: middle;
}

.admin-compact-table th {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
  color: var(--text-soft);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.admin-compact-table .compact-btn {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.72rem;
}

.admin-compact-table .default-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
}

.admin-strong-cell {
  font-weight: 600;
}

.admin-mono-cell {
  font-family: monospace;
  font-size: 0.72rem;
}

.compact-actions {
  justify-content: flex-start;
}

.secondary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 26px rgba(72, 49, 30, 0.08);
}

.secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.intro-grid,
.workflow-grid {
  display: grid;
  gap: 14px;
}

.intro-grid {
  grid-template-columns: 1fr;
}

.workflow-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: start;
}

.workflow-stack {
  display: grid;
  gap: 14px;
}

/* 卡片间距由网格统一管理，避免叠加 section + section 的上边距。 */
.workflow-stack > .section-card {
  margin-top: 0;
}

.feature-card,
.section-card,
.action-card,
.logs-card {
  min-height: 100%;
  overflow: hidden;
}

.agent-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.agent-stat-card,
.agent-share-card {
  background: rgba(255, 252, 248, 0.72);
  border: 1px solid rgba(122, 94, 67, 0.12);
}

.agent-share-card {
  display: grid;
  gap: 12px;
}

.agent-share-card-sidebar {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.agent-share-card-sidebar h2 {
  font-size: 1.3rem;
  margin-bottom: 0;
}

.agent-share-card-sidebar .form-label {
  font-size: 0.82rem;
}

.agent-share-card-sidebar label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.agent-share-card-sidebar .text-input {
  font-size: 0.88rem;
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 100%;
}

.agent-share-card-sidebar textarea.text-input {
  resize: vertical;
}

/* ── Referral Stats Page ── */
.referral-dashboard {
  display: grid;
  gap: 14px;
  align-items: start;
}

.referral-stats-card {
  padding: 32px;
}

.referral-stats-head {
  margin-bottom: 20px;
}

.referral-stats-head h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.login-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.account-countdown-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #b54848;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.account-countdown-badge.is-warning {
  background: #c89d2a;
}

.account-countdown-badge.is-danger,
.account-countdown-badge.is-expired {
  background: #b54848;
}

.account-countdown-badge.is-expired {
  min-width: 26px;
}

.account-expiry-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(122, 94, 67, 0.12);
  background: rgba(255, 255, 255, 0.48);
}

.account-expiry-panel strong {
  display: block;
  margin-top: 4px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  line-height: 1.1;
}

.account-expiry-label {
  display: block;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}


.agent-metric-grid.referral-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.referral-metric-grid .agent-metric {
  padding: 20px 16px;
}

.referral-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.referral-actions .primary-btn,
.referral-actions .secondary-btn {
  padding: 12px 28px;
  font-size: 0.95rem;
  border-radius: 18px;
}

.referral-info-card {
  padding: 28px;
}

.referral-info-card h2 {
  font-size: 1.55rem;
  margin-bottom: 18px;
}

.referral-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.referral-info-block {
  border: 1px solid #EAEAEA;
  border-radius: 12px;
  background: #fff;
  padding: 18px;
}

.referral-info-wide {
  grid-column: 1 / -1;
}

.referral-info-block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.referral-info-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border-radius: 999px;
  background: #FBF3DB;
  color: #956400;
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.referral-info-block h3 {
  font-size: 1rem;
  margin: 0;
}

.referral-flow-table,
.referral-reward-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.referral-flow-table > div,
.referral-reward-item {
  min-height: 88px;
  border: 1px solid #EAEAEA;
  border-radius: 10px;
  background: #F9F9F8;
  padding: 14px;
}

.referral-flow-table span,
.referral-reward-item span {
  display: block;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.referral-flow-table strong,
.referral-reward-item strong {
  display: block;
  margin-top: 8px;
  color: var(--text-main);
  font-size: 0.98rem;
  line-height: 1.35;
}

.referral-reward-item em {
  display: block;
  margin-top: 8px;
  color: #346538;
  font-style: normal;
  font-size: 0.86rem;
  font-weight: 700;
}

.referral-tier-grid .referral-reward-item:nth-child(2n) em {
  color: #1F6C9F;
}

@media (max-width: 860px) {
  .referral-dashboard {
    grid-template-columns: 1fr;
  }

  .referral-info-grid {
    grid-template-columns: 1fr;
  }

  .referral-info-wide {
    grid-column: auto;
  }

  .referral-flow-table,
  .referral-reward-grid {
    grid-template-columns: 1fr;
  }

  .agent-metric-grid.referral-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .referral-metric-grid .agent-metric {
    padding: 14px 12px;
  }

  .referral-stats-card {
    padding: 20px;
  }

  .referral-stats-head h2 {
    font-size: 1.5rem;
  }

  .account-expiry-panel {
    grid-template-columns: 1fr;
  }

  .account-expiry-panel strong {
    font-size: 1.2rem;
  }

  .referral-actions {
    flex-direction: column;
  }

  .referral-actions .primary-btn,
  .referral-actions .secondary-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .agent-metric-grid.referral-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .referral-metric-grid .agent-metric {
    padding: 12px 10px;
  }

  .agent-metric-value {
    font-size: 1.4rem;
  }
}

.agent-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.agent-metric {
  border: 1px solid rgba(122, 94, 67, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
  padding: 12px;
}

.agent-metric-label {
  display: block;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.agent-metric-value {
  display: block;
  margin-top: 4px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  line-height: 1;
}

.agent-link-row,
.agent-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.agent-quota-tip {
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.6;
}

.agent-review-layout {
  gap: 16px;
}

.agent-toolbar {
  margin: 12px 0 16px;
}

.agent-table-wrap {
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.agent-review-scroll-panel {
  max-height: 520px;
  overflow-y: auto;
}

.agent-table {  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  table-layout: fixed;
}

.agent-table th,
.agent-table td {
  padding: 6px 12px;
  border-bottom: 1px solid rgba(122, 94, 67, 0.10);
  text-align: left;
  vertical-align: top;
  font-size: 0.74rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.agent-table th {
  color: var(--text-soft);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.agent-table .compact-btn {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.72rem;
}

.agent-table .table-action-row {
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 4px;
}

.agent-status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(147, 134, 122, 0.14);
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.agent-status-pending,
.agent-status-available {
  background: rgba(154, 106, 35, 0.13);
  color: var(--warn);
}

.agent-status-contacted,
.agent-status-claimed {
  background: rgba(77, 116, 153, 0.13);
  color: #456b92;
}

.agent-status-converted,
.agent-status-activated {
  background: rgba(45, 107, 79, 0.13);
  color: var(--success);
}

.agent-status-rejected,
.agent-status-disabled,
.agent-status-expired {
  background: rgba(154, 61, 52, 0.12);
  color: var(--danger);
}

.agent-secret-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.lead-review-table th:nth-child(1),
.lead-review-table td:nth-child(1) { width: 40px; text-align: center; }
.lead-review-table th:nth-child(2),
.lead-review-table td:nth-child(2) { width: 132px; white-space: nowrap; }
.lead-review-table th:nth-child(3),
.lead-review-table td:nth-child(3) { width: 100px; }
.lead-review-table th:nth-child(4),
.lead-review-table td:nth-child(4) { width: 120px; }
.lead-review-table th:nth-child(5),
.lead-review-table td:nth-child(5) { width: 100px; }
.lead-review-table th:nth-child(6),
.lead-review-table td:nth-child(6) { width: 100px; white-space: nowrap; }
.lead-review-table th:nth-child(7),
.lead-review-table td:nth-child(7) { width: 140px; }
.lead-review-table th:nth-child(8),
.lead-review-table td:nth-child(8) { width: 92px; white-space: nowrap; }
.lead-review-table th:nth-child(9),
.lead-review-table td:nth-child(9) { width: 100px; }
.lead-review-table th:nth-child(10),
.lead-review-table td:nth-child(10) { width: 280px; }

.lead-review-table .table-action-row.compact-actions {
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 4px;
}

.lead-review-table .text-ellipsis {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

.lead-review-table .text-ellipsis:hover {
  overflow: visible;
  white-space: normal;
  word-break: break-word;
  background: var(--surface-strong);
  position: relative;
  z-index: 10;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.trial-batch-input {
  width: 100%;
  max-width: none;
  display: block;
  resize: vertical;
}

.share-owner-card {
  max-width: 560px;
  margin: 14px auto 0;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow-sm);
}

.share-owner-contact {
  display: inline-flex;
  margin: 6px 0 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(125, 92, 67, 0.10);
  color: var(--accent-strong);
  font-weight: 800;
}

.share-owner-note {
  line-height: 1.7;
}

.status-text {
  margin-bottom: 18px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-idle {
  color: var(--text-soft);
}

.status-pending {
  color: var(--warn);
}

.status-success {
  color: var(--success);
}

.status-error,
.error-inline {
  color: var(--danger);
}

.qr-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.qr-card-header h2 {
  margin-bottom: 0;
}

.qr-wrapper {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(244,236,226,0.7));
  border: 1px solid rgba(122, 94, 67, 0.12);
  margin-bottom: 18px;
  padding: 24px;
}

.qr-placeholder {
  text-align: center;
  font-size: 0.96rem;
  line-height: 1.8;
}

.qr-image {
  width: min(100%, 280px);
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.meta-list,
.detail-list,
.course-item dl {
  margin: 0;
}

.meta-list div,
.detail-list div,
.course-item dl div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(122, 94, 67, 0.1);
}

.meta-list dt,
.detail-list dt,
.course-item dt {
  color: var(--text-faint);
  font-weight: 600;
}

.meta-list dd,
.detail-list dd,
.course-item dd {
  margin: 0;
  word-break: break-word;
  color: var(--text);
}

.error-text,
.result-error,
#save-result,
#checkin-result {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(122, 94, 67, 0.12);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.error-text,
.result-error {
  background: rgba(208, 103, 89, 0.12);
  border-color: rgba(154, 61, 52, 0.16);
  color: var(--danger);
}

.empty-state {
  border: 1px dashed rgba(125, 92, 67, 0.22);
  border-radius: 22px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.32);
  line-height: 1.8;
}

.result-msg,
.result-error {
  word-break: break-word;
  overflow-wrap: break-word;
}

.cookie-tip,
.checkin-summary,
.save-profile-form {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(122, 94, 67, 0.12);
}

.cookie-tip {
  margin-top: 16px;
  color: var(--accent-strong);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.count-badge {
  min-width: 52px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-align: center;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(125, 92, 67, 0.08);
}

.course-toolbar,
.geocode-form,
.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.course-toolbar {
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.weekday-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.weekday-cb {
  font-weight: 500;
  padding: 6px 0;
}

.course-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.course-item,
.profile-item {
  border: 1px solid rgba(122, 94, 67, 0.12);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28);
}

.course-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.course-item:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 92, 67, 0.22);
  box-shadow: var(--shadow-sm);
}

.course-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

/* Match the saved-location list's native scrollbar on both axes. */
#profile-list,
.compact-course-list,
.logs-list {
  scrollbar-width: auto;
  scrollbar-color: auto;
}

.compact-course-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
  align-content: start;
  align-items: start;
}

@media (max-width: 860px) {
  .compact-course-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .compact-course-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.compact-course-list .course-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin-bottom: 0;
}

.compact-course-list .course-group-header {
  padding: 2px 2px 5px;
  margin-bottom: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.compact-course-list .course-item {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
}

.compact-course-list .course-check-label {
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.compact-course-list .course-check-label input {
  flex-shrink: 0;
  margin-top: 3px;
}

.compact-course-list .course-check-label span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.compact-course-list .course-item dl div {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 6px;
  padding: 4px 0;
}

.compact-course-list .course-item dl div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.compact-course-list .course-item dt,
.compact-course-list .course-item dd {
  font-size: 0.8rem;
  line-height: 1.45;
}

/* Keep description text slightly smaller than the identifying fields. */
.compact-course-list .course-item .course-description dd {
  font-size: 0.75rem;
  line-height: 1.45;
}

.text-input {
  min-width: 0;
  flex: 1;
  min-height: 52px;
  border: 1px solid rgba(122, 94, 67, 0.15);
  border-radius: 18px;
  padding: 0 16px;
  background: rgba(255,255,255,0.66);
  color: var(--text);
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.text-input::placeholder {
  color: #9a8e82;
}

.text-input:focus {
  outline: none;
  border-color: rgba(125, 92, 67, 0.42);
  box-shadow: 0 0 0 4px rgba(125, 92, 67, 0.12);
}

.task-select-row .compact-select-field,
.leave-select-row .compact-select-field {
  flex: 0 1 180px;
}

.task-select-row .address-select-field,
.leave-select-row .address-select-field {
  flex: 2 1 360px;
}

.leave-attachment-row > .text-input,
.leave-attachment-row > .leave-file-dropzone {
  flex: 1 1 0;
  width: auto;
  max-width: none;
}

.small-tip {
  margin-bottom: 14px;
}

.geocode-form {
  margin-bottom: 18px;
}

.address-input-wrap {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.address-input-wrap > .text-input {
  width: 100%;
  display: block;
  flex: none;
}

.address-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 280px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(122, 94, 67, 0.18);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(60, 40, 20, 0.12);
  padding: 6px;
}

.address-suggestion-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.address-suggestion-item:hover,
.address-suggestion-item.active {
  background: rgba(125, 92, 67, 0.08);
}

.address-suggestion-item .suggestion-name {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.address-suggestion-item .suggestion-name .default-tag {
  margin-left: 6px;
  font-size: 0.72rem;
  padding: 1px 6px;
}

.address-suggestion-item .suggestion-address {
  font-size: 0.8rem;
  color: #8b7d6f;
  word-break: break-all;
}

.geocode-result,
.result-ok,
.result-warn,
.result-fail {
  padding: 16px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.geocode-result,
.result-ok {
  background: rgba(90, 140, 110, 0.1);
  border: 1px solid rgba(45, 107, 79, 0.14);
}

.geocode-result {
  padding: 12px 16px;
}

.result-warn {
  background: rgba(194, 148, 73, 0.1);
  border: 1px solid rgba(154, 106, 35, 0.15);
}

.result-fail {
  background: rgba(198, 96, 80, 0.1);
  border: 1px solid rgba(154, 61, 52, 0.14);
}

.geocode-detail {
  margin-bottom: 2px;
  line-height: 1.45;
}

.geocode-detail:last-child {
  margin-bottom: 0;
}

.geocode-detail .label {
  color: var(--text-faint);
  font-weight: 700;
}

.save-profile-form {
  margin-bottom: 22px;
}

.form-row {
  margin-bottom: 12px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.coord-display {
  font-size: 0.86rem;
}

.sub-heading {
  margin-top: 24px;
  margin-bottom: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.profile-item.selected {
  border-color: rgba(125, 92, 67, 0.32);
  background: rgba(237, 226, 213, 0.72);
}

.profile-radio-label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
  width: 100%;
  cursor: pointer;
}

.profile-radio-label input[type="radio"] {
  margin: 4px 0 0;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.profile-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.profile-info strong {
  display: block;
  min-width: 0;
  font-size: 0.98rem;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.profile-address {
  display: block;
  max-width: 100%;
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.coord-small {
  display: block;
  max-width: 100%;
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.default-tag {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(90, 140, 110, 0.12);
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.delete-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid rgba(154, 61, 52, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--danger);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-btn:hover {
  background: rgba(255, 240, 238, 0.92);
}

.checkin-summary {
  margin-bottom: 18px;
  color: var(--text);
  font-size: 0.95rem;
}

.checkin-btn {
  width: 100%;
}

#checkin-result {
  margin-top: 16px;
}

#save-result.hidden,
#checkin-result.hidden {
  display: none !important;
}

.result-item {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.result-status {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.result-ok .result-status {
  background: rgba(90, 140, 110, 0.16);
  color: var(--success);
}

.result-warn .result-status {
  background: rgba(194, 148, 73, 0.18);
  color: var(--warn);
}

.result-fail .result-status {
  background: rgba(198, 96, 80, 0.16);
  color: var(--danger);
}

.map-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.map-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 24, 16, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.embedded-map-section {
  min-width: 0;
  padding: 0;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface-strong);
  box-shadow: 0 8px 24px rgba(43, 27, 14, 0.045);
}

.embedded-map-section > .map-search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: linear-gradient(110deg, #faf7f2, #fffdf9);
}

.map-hint-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.map-hint-icon svg {
  width: 22px;
  height: 22px;
}

.map-hint-copy {
  flex: 1;
  min-width: 0;
}

.map-hint-title {
  display: block;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.4;
}

.map-hint-description {
  display: block;
  margin: 3px 0 0;
  color: var(--text-faint);
  font-size: 0.8rem;
  line-height: 1.5;
}

.map-toggle {
  width: 100%;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.map-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

@media (hover: hover) {
  .embedded-map-section > .map-toggle:hover {
    background: var(--surface-muted);
  }
}

.map-toggle-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 5px 10px;
  border: 1px solid rgba(45, 107, 79, 0.12);
  border-radius: 999px;
  background: rgba(90, 140, 110, 0.07);
  color: var(--success);
  font-size: 0.73rem;
  line-height: 1.4;
}

.map-toggle-action svg {
  width: 16px;
  height: 16px;
}

.map-toggle[aria-expanded="false"] .map-toggle-action svg {
  transform: rotate(180deg);
}

.embedded-map-section.is-collapsed > .map-toggle {
  border-bottom-color: transparent;
}

.map-container[hidden] {
  display: none !important;
}

.map-modal-panel {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: rgba(255, 251, 247, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

.map-modal-head,
.map-footer {
  justify-content: space-between;
}

.map-search-row {
  margin: 16px 0;
}

.map-container {
  width: 100%;
  height: clamp(380px, 38vw, 480px);
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background: #f2f1ec;
}

.map-footer {
  margin-top: 16px;
}

.logs-list {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 508px;
  padding-bottom: 8px;
}

.logs-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 0.88rem;
}

.logs-table th {
  text-align: left;
  padding: 10px 10px 14px;
  border-bottom: 1px solid rgba(122, 94, 67, 0.16);
  color: var(--text-faint);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.logs-table td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(122, 94, 67, 0.08);
  vertical-align: top;
}

.log-time {
  min-width: 132px;
  white-space: nowrap;
}

.log-course {
  min-width: 220px;
}

.log-status {
  min-width: 110px;
  white-space: nowrap;
}

.log-message {
  min-width: 520px;
  max-width: 720px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

.log-proxy {
  min-width: 80px;
  white-space: nowrap;
}

.log-type {
  min-width: 96px;
  white-space: nowrap;
}

.logs-table tr.log-ok td:nth-child(3) {
  color: var(--success);
  font-weight: 700;
}

.logs-table tr.log-warn td:nth-child(3) {
  color: var(--warn);
  font-weight: 700;
}

.logs-table tr.log-fail td:nth-child(3) {
  color: var(--danger);
  font-weight: 700;
}

.hidden {
  display: none !important;
}
.task-create-box {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(122, 94, 67, 0.12);
  margin-bottom: 18px;
}

.task-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.task-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(122, 94, 67, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28);
}

.task-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.task-meta {
  line-height: 1.7;
}

.task-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
@media (max-width: 980px) {
  .dashboard-layout,
  .hero,
  .intro-grid,
  .workflow-grid,
  .agent-overview-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar-wrap {
    position: static;
  }

  .dashboard-sidebar {
    padding: 20px;
  }

  .dashboard-quick-nav-sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .task-list {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .card {
    padding: 28px;
  }

  .hero-actions {
    align-items: flex-start;
  }

  .hero-btn {
    width: auto;
  }
}

@media (min-width: 1100px) {
  .container {
    max-width: 1320px;
  }

  .secondary-btn,
  .primary-btn {
    white-space: nowrap;
  }

  .admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .embedded-map-section {
    margin-bottom: 8px;
    border-radius: 16px;
  }

  .embedded-map-section > .map-search-result {
    gap: 9px;
    padding: 12px;
  }

  .map-hint-icon {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .map-hint-icon svg {
    width: 19px;
    height: 19px;
  }

  .map-hint-title {
    font-size: 0.84rem;
  }

  .map-hint-description {
    font-size: 0.75rem;
  }

  .map-toggle-action {
    gap: 2px;
    padding: 4px 6px;
    font-size: 0.68rem;
  }

  .map-toggle-action svg {
    width: 14px;
    height: 14px;
  }

  .map-container {
    height: clamp(320px, 52vh, 440px);
    height: clamp(320px, 52svh, 440px);
  }

  .container {
    padding: 18px 14px 42px;
  }

  .card,
  .hero-card,
  .map-modal-panel {
    border-radius: 24px;
    padding: 22px;
  }

  .login-shell {
    min-height: calc(100vh - 80px);
    min-height: calc(100dvh - 80px);
    padding-top: 0;
    align-items: center;
  }

  .login-card {
    width: 100%;
    padding: 26px;
    flex-shrink: 0;
  }

  .hero {
    gap: 22px;
  }

  .hero-meta,
  .course-toolbar,
  .geocode-form,
  .form-row,
  .section-head,
  .hero-action-row,
  .hero-title-row,
  .qr-card-header,
  .section-head-actions {
    flex-direction: column;
    align-items: stretch;
  }

  #toggle-proxy-btn,
  #toggle-trace-btn,
  .mobile-hidden-agent-review {
    display: none !important;
  }

  /* 临时账户管理按钮移动端恢复显示（与"账号管理"同类按钮写法一致，内联样式已带对齐） */
  #toggle-temp-users-btn {
    display: inline-flex !important;
  }

  .primary-btn,
  .secondary-btn,
  .text-input {
    width: 100%;
  }

  /* 顶部按钮区：按钮保持自适应宽度 flex 排列，不占满整行 */
  .admin-actions .primary-btn,
  .admin-actions .secondary-btn {
    width: auto;
    min-width: 96px;
  }

  /* 移动端顶部卡片：用户信息整行在上，按钮组占满下方整行多列换行 */
  .card > .admin-actions {
    justify-content: flex-start !important;
    flex: 1 1 100% !important;
  }

  /* 按钮等宽多列换行，避免最后一行只挂一个靠左 */
  .card > .admin-actions .primary-btn,
  .card > .admin-actions .secondary-btn {
    flex: 1 1 auto;
    min-width: 96px;
    max-width: none;
  }

  .agent-metric-grid:not(.referral-metric-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .account-search-input {
    max-width: none;
    flex: 1 1 auto;
  }

  .account-page-head > div:last-child {
    width: 100%;
    min-width: 0 !important;
  }

  .account-page-head > div:last-child > div:last-child {
    width: 100%;
  }

  .result-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .logs-table {
    min-width: 620px;
  }

  .account-switcher-panel {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    margin-top: 10px;
    max-height: none;
    width: auto;
    gap: 6px;
    padding: 6px;
  }

  .account-switcher-panel.hidden {
    display: none;
  }

  .account-switcher-item {
    flex: 1 0 0;
    min-width: 120px;
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .admin-actions {
    width: 100%;
  }

  .dashboard-quick-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-quick-nav-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-nav-chip {
    justify-content: center;
    width: 100%;
  }

  /* 移动端仅隐藏代理池；签到日志保留展开、刷新和表格滚动。 */
  #proxy-panel {
    display: none;
  }

  /* 批量生成表单：全部状态下拉与上下按钮等宽（覆盖内联 max-width） */
  #temp-users-panel .form-row .text-input,
  #temp-users-panel .form-row select.text-input {
    max-width: none !important;
    width: 100%;
    flex: 1 1 auto;
  }

  /* 代理池面板移动端：覆盖内联 max-width */
  #proxy-panel .form-row .text-input {
    max-width: none !important;
    width: 100%;
  }

  /* ── 临时账户管理移动端：紧凑单行卡片 ── */
  /* 隐藏表头（含全选框，移动端每行自带复选框） */
  .temp-users-table thead {
    display: none;
  }

  /* 表格容器去掉横向滚动，改为纵向卡片流 */
  .admin-table-wrap {
    overflow-x: visible;
  }

  .temp-users-table,
  .temp-users-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  /* 紧凑卡片：复选框+用户名+状态灯一行，可点击展开详情 */
  .temp-users-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 6px;
    border: 1px solid var(--line-strong, rgba(255,255,255,.12));
    border-radius: 12px;
    background: var(--surface, rgba(255,255,255,.03));
    cursor: pointer;
  }

  .temp-users-table td {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    padding: 0;
    border: none;
    min-width: 0;
  }

  /* 复选框 + 用户名同行，撑满剩余宽度 */
  .temp-users-table td:nth-child(1),
  .temp-users-table td:nth-child(2) {
    flex: 1;
    min-width: 0;
  }

  .temp-users-table td:nth-child(2)::before { content: none; }

  .temp-users-table .admin-strong-cell {
    font-weight: 600;
    overflow-wrap: anywhere;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 状态改为小圆点灯：隐藏文字胶囊，只留圆点 */
  .temp-users-table td:nth-child(3) {
    flex: 0 0 auto;
  }

  .temp-users-table td:nth-child(3)::before { content: none; }

  .temp-users-table td:nth-child(3) .default-tag {
    font-size: 0;
    background: none;
    padding: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    line-height: 0;
  }

  /* 绿色=正常；tag-ok 底色本身就是绿，红色 tag-expired 同理 */
  .temp-users-table td:nth-child(3) .default-tag.tag-ok {
    background: #4caf50;
  }

  .temp-users-table td:nth-child(3) .default-tag.tag-expired {
    background: #ef4444;
  }

  /* 无标签类（已停用等）默认灰点，用文字色兜底 */
  .temp-users-table td:nth-child(3) .default-tag:not(.tag-ok):not(.tag-expired) {
    background: #9e9e9e;
  }

  /* 详情列（激活/BJMF/到期/最近登录）：默认隐藏，点卡片展开后显示在灰色区域 */
  .temp-users-table td:nth-child(4),
  .temp-users-table td:nth-child(5),
  .temp-users-table td:nth-child(6),
  .temp-users-table td:nth-child(7) {
    display: none;
    flex-basis: 100%;
    font-size: 0.74rem;
    color: var(--muted, #999);
  }

  .temp-users-table td:nth-child(4)::before { content: '激活'; margin-right: 4px; color: var(--muted, #999); flex-shrink: 0; }
  .temp-users-table td:nth-child(5)::before { content: 'BJMF账户'; margin-right: 4px; color: var(--muted, #999); flex-shrink: 0; }
  .temp-users-table td:nth-child(6)::before { content: '到期'; margin-right: 4px; color: var(--muted, #999); flex-shrink: 0; }
  .temp-users-table td:nth-child(7)::before { content: '最近登录'; margin-right: 4px; color: var(--muted, #999); flex-shrink: 0; }

  /* 展开 .expanded：详情显示为灰色圆角区域 */
  .temp-users-table tr.expanded td:nth-child(4),
  .temp-users-table tr.expanded td:nth-child(5),
  .temp-users-table tr.expanded td:nth-child(6),
  .temp-users-table tr.expanded td:nth-child(7) {
    display: flex;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 6px 10px;
    margin-top: 2px;
  }

  /* 数量解禁状态在移动端常显，其他单用户操作仍在桌面端提供。 */
  .temp-users-table td:nth-child(8) {
    display: flex;
    flex: 0 0 auto;
    order: 1;
  }
  .temp-users-table td:nth-child(8) .table-action-row > :not(.account-limit-toggle) { display: none; }
  .temp-users-table td:nth-child(8) .table-action-row { min-height: 44px; align-items: center; }
  .temp-users-table td:nth-child(8) .account-limit-toggle {
    position: relative;
    min-height: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
  }
  /* 外观更扁，透明点击区域仍保留44px高度。 */
  .temp-users-table td:nth-child(8) .account-limit-toggle::after {
    content: '';
    position: absolute;
    inset: -6px 0;
    border-radius: inherit;
  }
  .temp-users-table td:nth-child(4),
  .temp-users-table td:nth-child(5),
  .temp-users-table td:nth-child(6),
  .temp-users-table td:nth-child(7) { order: 2; }

  /* 账号管理 — 批量操作栏移动端 */
  .account-batch-bar {
    gap: 8px;
  }

  .account-batch-bar .text-input {
    max-width: none !important;
    flex: 1 1 auto;
    min-width: 120px;
  }

  /* 账号卡片移动端：撑满宽度 */
  .account-chip {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  /* 账号卡片图片缩略图移动端适配 */
  .account-image-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 代理池表格移动端：缩小小字体 */
  .proxy-table th {
    font-size: 0.7rem;
    padding: 6px 8px;
  }

  .proxy-table td {
    font-size: 0.72rem;
    padding: 6px 8px;
  }

  .proxy-table .compact-btn {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.7rem;
  }

  .proxy-table .default-tag {
    line-height: 1;
    padding: 3px 7px;
    font-size: 0.64rem;
  }
}

/* ── Custom Dialog Modal ── */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(34, 24, 16, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.dialog-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}
.dialog-box {
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px 30px 22px;
  width: min(90vw, 360px);
  transform: translateY(10px) scale(0.97);
  transition: transform 0.18s ease, opacity 0.18s ease;
  opacity: 0;
}
.dialog-backdrop.visible .dialog-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.dialog-message {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 22px;
  overflow-wrap: break-word;
  word-break: break-word;
  max-height: 60vh;
  overflow-y: auto;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.dialog-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.dialog-btn-cancel {
  background: var(--accent-soft);
  color: var(--accent);
}
.dialog-btn-cancel:hover {
  background: #e2d4c4;
}
.dialog-btn-ok {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(100, 65, 35, 0.22);
}
.dialog-btn-ok:hover {
  background: var(--accent-strong);
}
.dialog-btn-group {
  display: flex;
  gap: 10px;
}
.dialog-actions.with-checkbox {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dialog-check {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--accent);
  user-select: none;
}
.dialog-check input {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--accent);
}

.dialog-box.form {
  width: min(90vw, 420px);
}

.dialog-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 18px;
}

.dialog-form-group {
  margin-bottom: 14px;
}

.dialog-form-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 4px;
}

.dialog-form-input {
  width: 100%;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.dialog-form-input:focus {
  border-color: var(--accent);
}

textarea.dialog-form-input {
  resize: vertical;
  min-height: 60px;
}

/* Manual signin — compact local image dropzone */
.manual-local-image-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  max-width: 320px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px dashed rgba(122, 94, 67, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  overflow: hidden;
  outline: none;
}
.manual-local-image-dropzone:hover,
.manual-local-image-dropzone:focus-visible,
.manual-local-image-dropzone.dragover {
  border-color: rgba(125, 92, 67, 0.6);
  background: rgba(255, 255, 255, 0.85);
}
.manual-local-image-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  left: -9999px;
}
.manual-local-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1px;
  pointer-events: none;
}
.manual-local-image-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-strong, #3f2d1d);
}
.manual-local-image-tip {
  font-size: 0.6rem;
  color: var(--text-faint);
}
.manual-local-image-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding-right: 22px;
}
.manual-local-image-preview img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(122, 94, 67, 0.25);
  flex-shrink: 0;
}
.manual-local-image-filename {
  font-size: 0.72rem;
  color: var(--text-strong, #3f2d1d);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.manual-local-image-clear {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-strong, #3f2d1d);
  font-size: 0.85rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background .15s ease;
}
.manual-local-image-clear:hover {
  background: rgba(0, 0, 0, 0.18);
}

.leave-file-dropzone {
  min-height: 52px;
}

.leave-file-dropzone .manual-local-image-tip {
  display: none;
}

@media (max-width: 720px) {
  .manual-local-image-dropzone {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  /* 移动端 form-row 变成 column 后，flex-basis 会被当成高度，
     导致 .compact-select-field / .address-select-field 的下拉框被撑到 180px / 360px 高。
     这里强制恢复成内容高度。 */
  .task-select-row .compact-select-field,
  .leave-select-row .compact-select-field,
  .task-select-row .address-select-field,
  .leave-select-row .address-select-field,
  .leave-attachment-row > .text-input,
  .leave-attachment-row > .leave-file-dropzone {
    flex: 0 0 auto;
    width: 100%;
  }
}

.partner-apply-card .login-form label {
  display: block;
  min-width: 0;
}

.partner-apply-card .text-input {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.partner-apply-card textarea.text-input {
  resize: vertical;
  min-height: 96px;
  padding: 12px 16px;
  line-height: 1.5;
}

.partner-apply-card select.text-input {
  appearance: none;
  -webkit-appearance: none;
}

.cf-turnstile-container {
  margin-top: 8px;
  margin-bottom: 8px;
}

.cf-turnstile-container.hidden {
  display: none;
}

.cf-turnstile {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 65px;
  overflow: visible;
}

.cf-turnstile iframe {
  max-width: 100% !important;
  box-sizing: border-box;
}

/* PC 端：已保存位置配置卡片紧凑化 + 列表限高（约 10 条后滚动） */
@media (min-width: 861px) {
  .profile-list {
    --profile-item-h: 78px;
    gap: 6px;
    max-height: calc(var(--profile-item-h) * 10 + 6px * 9);
    overflow-y: auto;
    padding-right: 4px;
  }

  .profile-list .profile-item {
    padding: 10px 14px;
    border-radius: 16px;
    gap: 10px;
    align-items: center;
  }

  .profile-list .profile-radio-label {
    gap: 10px;
  }

  .profile-list .profile-radio-label input[type="radio"] {
    margin-top: 3px;
  }

  .profile-list .profile-info {
    gap: 1px;
  }

  .profile-list .profile-info strong {
    font-size: 0.94rem;
    line-height: 1.35;
  }

  .profile-list .profile-address {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .profile-list .coord-small {
    font-size: 0.78rem;
    line-height: 1.35;
  }
}

/* 手机端：已保存位置配置列表限高（约 5 条后滚动） */
@media (max-width: 860px) {
  .profile-list {
    gap: 6px;
    max-height: calc(92px * 5 + 6px * 4);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
  }

  .profile-list .profile-item {
    padding: 10px 12px;
    border-radius: 14px;
    gap: 8px;
    align-items: center;
  }

  .profile-list .profile-radio-label {
    gap: 8px;
  }

  .profile-list .profile-radio-label input[type="radio"] {
    margin-top: 3px;
  }

  .profile-list .profile-info {
    gap: 1px;
  }

  .profile-list .profile-info strong {
    font-size: 0.92rem;
    line-height: 1.35;
  }

  .profile-list .profile-address {
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .profile-list .coord-small {
    font-size: 0.76rem;
    line-height: 1.3;
  }
}
.account-limit-toggle { display: inline-flex; align-items: center; gap: 6px; }
.account-limit-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger-red, #dc2626); flex: 0 0 auto; }
.account-limit-dot.is-exempt { background: var(--success, #16a34a); }
@media (max-width: 768px) {
  #export-json-btn { display: none; }
}
