/* ── 設定：請填入你的 Supabase 資訊 ── */
/* 見 js 區塊頂端 SUPABASE_URL / SUPABASE_ANON_KEY */

:root {
  --bg: #F2F2F7;
  --surface: #FFFFFF;
  --navy: #1C1C1E;
  --navy-light: #2C2C2E;
  --accent: #007AFF;
  --accent-light: #D6EAFF;
  --text: #1C1C1E;
  --text-soft: #8E8E93;
  --border: rgba(0,0,0,0.06);
  --danger: #FF3B30;
  --success: #34C759;
  --warn: #FF9500;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro TC', 'SF Pro Display', 'PingFang TC', 'Helvetica Neue', 'Noto Sans TC', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ── 登入畫面 ── */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
}

.login-box {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 48px 40px;
  width: 380px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.login-logo .logo-icon svg { color: white; }

.login-logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.login-logo p {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 6px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #F2F2F7;
  transition: all 0.2s;
  outline: none;
}

.form-group input:focus { border-color: var(--accent); background: white; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
  text-decoration: none;
}
.btn:active { opacity: 0.7; }

.btn-primary {
  background: var(--accent);
  color: white;
  width: 100%;
  padding: 14px;
}

.btn-accent { background: var(--accent); color: white; }

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1.5px solid rgba(0,0,0,0.1);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger { background: var(--danger); color: white; }

.btn-sm { padding: 8px 16px; font-size: 13px; }

.error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

/* ── 主要版面 ── */
#app { display: none; min-height: 100vh; }

.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100vh;
  background: rgba(249,249,249,0.82);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-header {
  padding: 40px 24px 20px;
}

.sidebar-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.sidebar-brand span { color: var(--accent); }

.sidebar-user {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-soft);
}

.sidebar-user strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

/* ── 側邊欄同仁名單 ── */
.sidebar-team {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-team-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.team-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  color: var(--navy-light);
}
.team-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.team-dot.active { background: var(--success); }
.team-dot.inactive { background: #C7C7CC; }
.team-dot.pending { background: var(--warn); }

.sidebar-nav { flex: 1; padding: 12px 16px; overflow-y: auto; }

.nav-section {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  padding: 16px 12px 8px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--navy-light);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  user-select: none;
}

.nav-item:hover { background: rgba(0,0,0,0.04); }
.nav-item.active { background: var(--accent); color: white; }

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.main-content {
  margin-left: 260px;
  padding: 40px;
  min-height: 100vh;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-soft);
  margin-top: 4px;
}

/* ── 統計列 ── */
.stats-grid {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.stat-card {
  flex: 1;
  padding: 14px 12px;
  text-align: center;
  border-right: 1px solid var(--border);
  min-width: 0;
}
.stat-card:last-child { border-right: none; }

.stat-label {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 600;
  white-space: nowrap;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
  line-height: 1;
  letter-spacing: -0.5px;
}

.stat-card.accent .stat-value { color: var(--accent); }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.danger .stat-value { color: var(--danger); }

/* ── 資料表格 ── */
.card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: var(--bg);
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #F2F2F7; }

/* ── 階段標籤 ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-募集線 { background: #D6EAFF; color: #007AFF; }
.badge-追蹤線 { background: #FFF3CD; color: #FF9500; }
.badge-成功委託 { background: #D4F5DC; color: #34C759; }
.badge-放棄 { background: #F2F2F7; color: #8E8E93; }

/* ── 搜尋列 ── */
.search-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  background: var(--surface);
  padding: 16px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.search-bar select,
.search-bar input {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
}

.search-bar select:focus,
.search-bar input:focus { border-color: var(--accent); }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  display: none;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18);
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.modal-title { font-size: 17px; font-weight: 700; color: var(--text); }

.modal-body { padding: 20px 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: var(--surface);
}

.close-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 16px;
  transition: all 0.15s;
}

.close-btn:hover { background: rgba(0,0,0,0.1); color: var(--text); }

/* ── 表單欄位 ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.form-row.single { grid-template-columns: 1fr; }
.form-row.triple { grid-template-columns: 1fr 1fr 1fr; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 5px;
  letter-spacing: 0.04em;
}

.field label .req { color: var(--danger); margin-left: 2px; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent); background: white; }

.field textarea { resize: vertical; min-height: 72px; }

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ── 空狀態 ── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-soft);
}

.empty-state svg {
  width: 40px;
  height: 40px;
  opacity: 0.3;
  margin-bottom: 12px;
}

.empty-state p { font-size: 14px; }

/* ── 到期警示 ── */
.overdue { color: var(--danger); font-weight: 600; }
.due-soon { color: var(--warn); font-weight: 600; }

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 10px;
  background: rgba(60,60,67,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: white;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 9999;
  transition: opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}

#toast.show { opacity: 1; }

/* ── 載入動畫 ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-soft);
  gap: 10px;
}

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── 頁面切換 ── */
.page { display: none; }
.page.active { display: block; }

/* ── 管理員後台 ── */
.user-grid {
  display: grid;
  gap: 12px;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info { flex: 1; }
.user-name { font-weight: 600; font-size: 14px; }
.user-meta { font-size: 12px; color: var(--text-soft); margin-top: 2px; }

.tag {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.tag-manager { background: var(--accent-light); color: var(--accent); }
.tag-agent { background: #e0f2fe; color: #0369a1; }
.tag-inactive { background: #f1f5f9; color: #94a3b8; }
.tag-pending { background: #fef3c7; color: #92400e; }

/* Toggle switch */
.toggle-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.toggle { position: relative; width: 34px; height: 18px; flex-shrink: 0; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: #ccc; border-radius: 18px; transition: 0.2s;
}
.toggle .slider:before {
  content: ''; position: absolute; height: 14px; width: 14px;
  left: 2px; bottom: 2px; background: white; border-radius: 50%; transition: 0.2s;
}
.toggle input:checked + .slider { background: var(--success); }
.toggle input:checked + .slider:before { transform: translateX(16px); }

.user-actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

.field-edit-btn {
  font-size: 12px; color: var(--accent); cursor: pointer; margin-left: 6px;
  font-weight: 500;
}
.field-edit-btn:hover { text-decoration: underline; }
input.field-locked {
  background: var(--bg) !important; color: var(--text) !important;
  cursor: default; border-color: transparent !important;
}

/* ── 手機版 ── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: rgba(249,249,249,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}
.hamburger {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--text); display: flex; align-items: center;
}
.hamburger svg { width: 22px; height: 22px; }
.mobile-header .mobile-title {
  color: var(--text); font-size: 15px; font-weight: 700; letter-spacing: -0.3px;
}
.mobile-header .mobile-title span { color: var(--accent); }
.sidebar-overlay {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 100;
}
.sidebar-overlay.open { display: block; }

/* 手機卡片式列表 */
.tracking-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.tracking-card:active { box-shadow: var(--shadow); }
.tracking-card-addr {
  font-weight: 600; font-size: 14px; color: var(--text);
  margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.tracking-card-row {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  font-size: 13px; color: var(--text-soft); line-height: 1.8;
}
.tracking-card-row b { color: var(--text); font-weight: 500; }
.tracking-card-actions {
  margin-top: 8px; display: flex; gap: 8px; align-items: center;
}

/* ── 地圖頁面 ── */
.page-map {
  position: relative;
  width: 100%;
  height: 100%;
}

#map-container {
  width: 100%;
  height: calc(100vh - 80px);
}

/* 地圖圖例 */
.map-legend {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: white;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  font-size: 12px;
  z-index: 10;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}

.map-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* 地圖統計覆蓋層 */
.map-stats {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  font-size: 12px;
  z-index: 10;
  display: flex;
  gap: 12px;
}

.map-stat-item {
  text-align: center;
}

.map-stat-value {
  font-size: 18px;
  font-weight: 700;
}

.map-stat-label {
  color: var(--text-soft);
  font-size: 11px;
}

/* 信息窗口 */
.map-info-window {
  max-width: 320px;
  font-size: 13px;
  line-height: 1.6;
}

.map-info-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.map-info-label {
  color: var(--text-soft);
  white-space: nowrap;
  min-width: 70px;
}

.map-info-value {
  color: var(--text);
  font-weight: 500;
}

.map-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

/* 手機底層彈窗 */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 70vh;
  overflow-y: auto;
  padding: 16px 20px;
}

.bottom-sheet.open {
  transform: translateY(0);
}

.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: #D1D1D6;
  border-radius: 2px;
  margin: 0 auto 14px;
}

/* 手機底部導航欄 */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(249,249,249,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 98;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
  transition: color 0.15s;
}

.bottom-nav-item.active {
  color: var(--accent);
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 768px) {
  .mobile-header { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content {
    margin-left: 0;
    padding: 14px;
    padding-top: 62px;
    padding-bottom: 70px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* 所有區塊撐滿 */
  .page-header, .stats-grid, .card, .search-bar {
    width: 100%;
    box-sizing: border-box;
  }

  .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-title { font-size: 24px; }
  .page-header .btn { width: 100%; justify-content: center; }

  /* 統計列 */
  .stats-grid { border-radius: 12px; margin-bottom: 16px; }
  .stat-card { padding: 12px 4px; }
  .stat-label { font-size: 11px; }
  .stat-value { font-size: 20px; }

  /* 卡片 */
  .card { border-radius: 14px; }
  .card-header { padding: 14px; }
  .card-title { font-size: 15px; }

  /* 手機卡片列表字體放大 */
  .tracking-card { padding: 14px; }
  .tracking-card-addr { font-size: 16px; }
  .tracking-card-row { font-size: 14px; gap: 4px 14px; line-height: 2; }

  /* Modal 全螢幕 */
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal { max-width: 100%; max-height: 100vh; border-radius: 0; height: 100%; }

  /* 隱藏桌面版表格，顯示手機卡片 */
  .desktop-table { display: none !important; }
  .mobile-cards { display: block !important; }

  /* 篩選列 */
  .filter-bar { flex-direction: column; }
  .filter-bar select, .filter-bar input { width: 100%; }

  /* 底部導航欄 */
  .bottom-nav { display: flex; }

  /* 地圖移動版樣式 */
  #map-container { height: calc(100vh - 52px - 56px); }
  .map-legend { bottom: 70px; }
}

@media (min-width: 769px) {
  .mobile-cards { display: none !important; }
}

/* ── 補充：從 inline style 抽出的 class ── */
.auth-footer { margin-top:16px; text-align:center; font-size:13px; color:var(--text-soft); }
.auth-toggle { cursor:pointer; color:var(--accent); text-decoration:underline; }
.logout-full { width:100%; }
.card-mt { margin-top:20px; }
.filter-keyword { min-width:200px; }
.match-bar { align-items:flex-end; gap:14px; flex-wrap:wrap; }
.match-count-text { font-size:13px; color:var(--text-soft); }
.user-list-pad { padding:16px; }
.field-full { flex:1; }
.nav-link { cursor:pointer; }
.form-row-bottom { align-items:flex-end; }
.visit-add-offset { margin-bottom:2px; }
.visit-list-area { margin-top:8px; }
.form-row-mt { margin-top:10px; }
.field-readonly { background:var(--bg); color:var(--text-soft); }
.modal-footer-between { justify-content:space-between; }
.btn-delete-hidden { color:var(--danger); display:none; }
.btn-group { display:flex; gap:10px; }
.modal-sm { max-width:520px; }
.log-addr { font-size:14px; font-weight:600; color:var(--text); margin-bottom:16px; }
.row-hidden { display:none; }
.tr-clickable { cursor:pointer; }
.tr-invalid { cursor:pointer; opacity:0.7; }
.card-invalid { opacity:0.7; }
.text-danger-medium { color:var(--danger); font-weight:500; }
.phone-link { color:var(--accent); text-decoration:none; vertical-align:middle; }
.nav-pin { display:inline-flex; align-items:center; margin-left:4px; color:var(--accent); text-decoration:none; vertical-align:middle; cursor:pointer; }
.visit-entry { display:flex; align-items:center; gap:10px; padding:6px 10px; background:var(--bg); border-radius:6px; margin-bottom:4px; font-size:13px; }
.visit-entry-status { font-weight:600; color:var(--text); }
.visit-entry-meta { color:var(--text-soft); }
.visit-entry-note { flex:1; color:var(--text-soft); }
.visit-entry-remove { background:none; border:none; color:var(--danger); cursor:pointer; font-size:15px; }
.pending-section { margin-bottom:20px; }
.pending-title { font-weight:700; font-size:14px; color:var(--warn); margin-bottom:10px; }
.pending-row { border-color:var(--warn); background:#fffbeb; }
.pending-avatar { background:var(--warn); }
.pending-actions { display:flex; gap:6px; }
.text-limit-warn { font-size:11px; color:var(--danger); }
.text-empty { color:var(--text-soft); }
.household-hint { margin-top:4px; padding:6px 10px; background:#fff8e1; border:1px solid #ffe082; border-radius:6px; font-size:13px; color:#6d4c00; }
.household-hint img { margin-top:4px; max-width:100%; height:auto; border:1px solid #ddd; border-radius:4px; }
.btn[disabled], .btn.btn-loading { opacity: 0.5; pointer-events: none; }
