/* ==============================================
   地球盾客户录入 — Apple Design Style
   ============================================== */
:root {
  --blue: #007aff;
  --blue-hover: #0062cc;
  --blue-light: #e8f2ff;
  --blue-dark: #0051a8;
  --accent: #5e5ce6;
  --red: #ff3b30;
  --red-hover: #d42f26;
  --green: #34c759;
  --orange: #ff9500;
  --yellow: #ffcc00;

  --bg: #f2f2f7;
  --bg-card: rgba(255,255,255,0.82);
  --bg-input: #f5f5fa;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --separator: rgba(60,60,67,0.12);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);

  --blur: saturate(180%) blur(20px);
  --blur-light: saturate(180%) blur(10px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --transition: 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

body {
  font-family: var(--font);
  background: #f2f2f7;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }

/* ====== 按钮 Apple Style ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 20px; border: none; border-radius: 50px;
  font-size: 14px; font-weight: 590; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
  user-select: none; font-family: var(--font); letter-spacing: -0.01em;
}
.btn:active { transform: scale(0.96); opacity: 0.8; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 2px 8px rgba(0,122,255,0.3);
}
.btn-primary:hover:not(:disabled) {
  background: var(--blue-hover);
  box-shadow: 0 4px 16px rgba(0,122,255,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(0,0,0,0.04); color: var(--text);
  backdrop-filter: var(--blur-light);
}
.btn-secondary:hover:not(:disabled) { background: rgba(0,0,0,0.08); }

.btn-outline {
  background: transparent; color: var(--blue);
  border: 1.5px solid rgba(0,122,255,0.3);
}
.btn-outline:hover:not(:disabled) {
  background: var(--blue-light); border-color: var(--blue);
}

.btn-danger {
  background: var(--red); color: #fff;
  box-shadow: 0 2px 8px rgba(255,59,48,0.3);
}
.btn-danger:hover:not(:disabled) {
  background: var(--red-hover);
  box-shadow: 0 4px 16px rgba(255,59,48,0.4);
}

.btn-record {
  background: var(--red); color: #fff; font-weight: 620;
  box-shadow: 0 2px 12px rgba(255,59,48,0.35); padding: 12px 28px; font-size: 15px;
}
.btn-record:hover:not(:disabled) {
  box-shadow: 0 4px 20px rgba(255,59,48,0.5); transform: translateY(-1px);
}

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 8px; gap: 2px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* ====== 登录页 ====== */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, #f2f2f7 0%, #e8e8ed 100%);
  position: relative;
}
.login-page::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 10%, rgba(0,122,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 70% 90%, rgba(94,92,230,0.06) 0%, transparent 60%);
}
.login-card {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  background: var(--bg-card); backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: var(--radius-xl); padding: 44px 36px 36px;
  box-shadow: 0 4px 40px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,0.6) inset;
  border: 1px solid rgba(255,255,255,0.5);
}
.login-logo { font-size: 56px; text-align: center; margin-bottom: 12px; }
.login-card h2 {
  text-align: center; font-size: 26px; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 4px;
}
.login-sub {
  text-align: center; color: var(--text-secondary); font-size: 14px;
  margin: 6px 0 30px; font-weight: 400;
}
.login-error { color: var(--red); font-size: 13px; text-align: center; min-height: 20px; margin-top: 12px; }
.login-links { text-align: center; margin-top: 20px; }
.login-links a { color: var(--blue); font-size: 14px; text-decoration: none; font-weight: 500; }
.login-links a:hover { text-decoration: underline; }

.bio-login-section { margin-bottom: 8px; }
.bio-divider { display: flex; align-items: center; color: var(--text-tertiary); font-size: 12px; margin: 18px 0; }
.bio-divider::before, .bio-divider::after { content: ""; flex: 1; height: 1px; background: var(--separator); }
.bio-divider span { padding: 0 12px; }
.bio-users { display: flex; flex-direction: column; gap: 8px; }
.btn-bio-login {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 18px;
  background: rgba(0,122,255,0.04); border: 1px solid rgba(0,122,255,0.12);
  border-radius: var(--radius); cursor: pointer; font-family: var(--font);
  transition: all var(--transition);
}
.btn-bio-login:hover {
  background: rgba(0,122,255,0.08); border-color: rgba(0,122,255,0.25);
  transform: scale(1.01);
}
.bio-icon { font-size: 24px; }
.bio-user-name { font-weight: 600; flex: 1; text-align: left; color: var(--text); font-size: 15px; }
.bio-hint { font-size: 12px; color: var(--text-secondary); }

/* ====== 顶部导航 ====== */
.app-header {
  background: rgba(255,255,255,0.72); backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--text); padding: 0 12px;
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--separator);
}
.header-left { display: flex; align-items: center; flex-shrink: 0; }
.header-left h1 { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.user-badge {
  font-size: 11px; color: var(--text-secondary);
  background: rgba(0,0,0,0.04); padding: 3px 8px; border-radius: 50px; font-weight: 500;
  max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.role-badge {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 50px;
  background: rgba(0,122,255,0.1); color: var(--blue);
}
.role-badge.admin { background: rgba(255,149,0,0.12); color: #c46c00; }
.net-status { font-size: 11px; padding: 3px 8px; border-radius: 50px; font-weight: 500; }
.net-status.online { background: rgba(52,199,89,0.1); color: #1b8a3b; }
.net-status.offline { background: rgba(255,59,48,0.1); color: #c42f26; }

/* ====== 标签导航 Apple Segmented Control ====== */
.tab-bar {
  display: flex; gap: 4px; padding: 6px;
  background: rgba(0,0,0,0.04); margin: 12px 16px;
  border-radius: 12px; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab-bar::-webkit-scrollbar { height: 0; }
.tab {
  flex: 1; min-width: 72px; padding: 8px 14px;
  background: none; border: none; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  border-radius: 8px; transition: all var(--transition);
  white-space: nowrap; font-family: var(--font);
}
.tab.active {
  background: rgba(255,255,255,0.9); color: var(--text);
  font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 0 rgba(0,0,0,0.04);
}

/* ====== 主内容区 ====== */
.main-content { max-width: 800px; margin: 0 auto; padding: 16px 16px 80px; }

/* ====== 表单卡片 ====== */
.form-container { display: flex; flex-direction: column; gap: 14px; }
.form-section {
  background: var(--bg-card); backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
  border: 1px solid rgba(255,255,255,0.4);
}
.form-section h3 {
  font-size: 16px; font-weight: 640; color: var(--text);
  margin-bottom: 20px; letter-spacing: -0.01em;
}
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.form-group label {
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  text-transform: none; letter-spacing: 0;
}
.hint-label { font-size: 11px; font-weight: 400; color: var(--text-tertiary); }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid transparent; border-radius: 12px;
  font-size: 15px; color: var(--text); background: var(--bg-input);
  font-family: var(--font); transition: all var(--transition);
  outline: none; -webkit-appearance: none; appearance: none;
}
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { background: #ececf2; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: #fff; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0,122,255,0.12);
}
.required { color: var(--red); margin-left: 1px; }

.email-row { display: flex; align-items: center; gap: 4px; }
.email-row input, .email-row select { flex: 1; }
.email-at { font-weight: 500; color: var(--text-tertiary); padding: 0 2px; font-size: 16px; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 8px 0; flex-wrap: wrap; }

/* ====== 标签输入 ====== */
.tag-input-wrap {
  border: 1.5px solid transparent; border-radius: 12px; padding: 10px 12px;
  min-height: 52px; background: var(--bg-input);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  transition: all var(--transition);
}
.tag-input-wrap:focus-within {
  background: #fff; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0,122,255,0.12);
}
.tags-display { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-item {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(0,122,255,0.08); color: var(--blue);
  padding: 3px 12px; border-radius: 50px; font-size: 13px; font-weight: 500;
}
.tag-remove { background: none; border: none; cursor: pointer; color: var(--blue); font-size: 14px; line-height: 1; }
.tag-input-field { border: none; outline: none; font-size: 15px; flex: 1; min-width: 120px; font-family: var(--font); background: transparent; }
.product-tag {
  display: inline-block; background: rgba(52,199,89,0.08);
  color: #1b8a3b; padding: 3px 12px; border-radius: 50px;
  font-size: 12px; font-weight: 500;
}

/* ====== 照片区域 ====== */
.photo-area {
  border: 2px dashed rgba(0,122,255,0.15); border-radius: var(--radius);
  background: rgba(0,122,255,0.02); transition: all var(--transition);
}
.photo-area:hover { border-color: rgba(0,122,255,0.35); background: rgba(0,122,255,0.04); }
.photo-empty { padding: 32px 20px; text-align: center; }
.photo-placeholder { font-size: 44px; margin-bottom: 10px; }
.photo-empty p { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }
.photo-btns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.photo-hint { font-size: 12px; color: var(--text-tertiary); padding: 6px 14px 14px; text-align: center; }
.photo-preview { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; }
.photo-card { position: relative; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); }
.photo-card img { width: 90px; height: 90px; object-fit: cover; display: block; border-radius: var(--radius-sm); }
.photo-remove {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.55); color: #fff; border: none;
  border-radius: 50%; width: 22px; height: 22px; cursor: pointer;
  font-size: 11px; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.photo-label { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.35); color: #fff; font-size: 10px; text-align: center; padding: 3px; }

/* ====== 录音 / 备注 ====== */
.notes-area { display: flex; flex-direction: column; gap: 14px; }
.notes-input-wrapper { display: flex; flex-direction: column; gap: 8px; }
.record-area {
  background: rgba(0,0,0,0.02); border-radius: var(--radius);
  padding: 16px; border: 1px solid var(--separator);
}
.record-controls { display: flex; align-items: center; gap: 12px; }
.record-timer {
  font-size: 20px; font-weight: 500; color: var(--red);
  letter-spacing: 0.5px; font-variant-numeric: tabular-nums;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
}
.record-playback { margin-top: 12px; padding: 14px; background: #fff; border-radius: var(--radius); border: 1px solid var(--separator); }
.recording-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-summary-area {
  background: rgba(0,122,255,0.03); border-radius: var(--radius);
  padding: 16px; border: 1px solid rgba(0,122,255,0.12);
}
.ai-summary-area h4 { font-size: 14px; margin-bottom: 10px; color: var(--blue); font-weight: 600; }
.ai-summary-content { font-size: 14px; }
.ai-summary-editor {
  width: 100%; min-height: 100px; padding: 12px;
  border: 1.5px solid transparent; border-radius: 12px;
  font-family: var(--font); font-size: 14px; resize: vertical;
  background: var(--bg-input); outline: none; line-height: 1.6;
  transition: all var(--transition);
}
.ai-summary-editor:focus { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,122,255,0.12); }
.ai-summary-warn { font-size: 12px; color: var(--orange); margin-bottom: 8px; }

/* ====== 客户列表 ====== */
.list-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 10px; flex-wrap: wrap; }
.list-header span { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.search-input {
  flex: 1; max-width: 280px; padding: 10px 16px;
  border: none; border-radius: 12px;
  font-size: 15px; outline: none; font-family: var(--font);
  background: var(--bg-input); transition: all var(--transition);
}
.search-input:focus { background: #fff; box-shadow: 0 0 0 4px rgba(0,122,255,0.12); }

.customer-list { display: flex; flex-direction: column; gap: 8px; }
.customer-card {
  background: var(--bg-card); backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: var(--radius); padding: 16px;
  border: 1px solid rgba(255,255,255,0.4);
  display: flex; gap: 14px; align-items: flex-start;
  transition: all var(--transition);
}
.customer-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.card-photo, .card-photo-placeholder { width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.card-photo-placeholder { background: rgba(0,0,0,0.04); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.card-info { flex: 1; min-width: 0; }
.card-name { font-size: 16px; font-weight: 640; color: var(--text); letter-spacing: -0.01em; }
.card-company { font-size: 13px; font-weight: 400; color: var(--text-secondary); margin-left: 6px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; font-size: 12px; color: var(--text-secondary); }
.card-products { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.card-footer { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.card-time { font-size: 11px; color: var(--text-tertiary); }
.card-sync { font-size: 11px; font-weight: 500; }
.card-sync.synced { color: var(--green); }
.card-sync.unsynced { color: var(--orange); }
.card-has-recording { font-size: 12px; }
.card-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

/* ====== 详情弹窗 ====== */
.detail-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,0.3); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.detail-modal {
  background: #fff; border-radius: var(--radius-xl);
  width: 100%; max-width: 540px; max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18);
  overflow: hidden;
}
.detail-header {
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--separator); flex-shrink: 0;
}
.detail-header h3 { font-size: 17px; font-weight: 640; letter-spacing: -0.01em; }
.detail-close {
  background: rgba(0,0,0,0.04); border: none; cursor: pointer;
  font-size: 16px; color: var(--text-secondary);
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.detail-close:hover { background: rgba(0,0,0,0.1); color: var(--text); }
.detail-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.detail-section { margin-bottom: 16px; }
.detail-section h4 { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.detail-row { display: flex; gap: 8px; padding: 6px 0; }
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 13px; color: var(--text-secondary); width: 52px; flex-shrink: 0; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-time { font-size: 12px; color: var(--text-tertiary); }
.detail-footer {
  padding: 14px 20px; border-top: 1px solid var(--separator);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.detail-no-photo {
  width: 80px; height: 80px; background: rgba(0,0,0,0.04);
  border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; font-size: 24px; color: var(--text-tertiary);
}
.detail-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-photo { width: 100px; height: 100px; object-fit: cover; border-radius: var(--radius-sm); }
.detail-notes {
  font-family: var(--font); font-size: 14px; line-height: 1.6;
  white-space: pre-wrap; background: rgba(0,0,0,0.02);
  padding: 12px; border-radius: var(--radius-sm);
}

/* ====== 管理面板 ====== */
.admin-panel { display: flex; flex-direction: column; gap: 14px; }
.admin-panel h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.admin-section {
  background: var(--bg-card); backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: var(--radius-lg); padding: 20px;
  border: 1px solid rgba(255,255,255,0.4);
}
.admin-section h4 { font-size: 15px; font-weight: 640; margin-bottom: 14px; color: var(--text); }
.admin-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 10px; }

/* ====== 统计卡片 ====== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px,1fr)); gap: 10px; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 20px 16px;
  text-align: center; border: 1px solid var(--separator);
  transition: all var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card.stat-high { background: #fff8f6; border-color: rgba(255,59,48,0.15); }
.stat-card.stat-medium { background: #f4faf5; border-color: rgba(52,199,89,0.15); }
.stat-card.stat-assigned { background: #f5f3ff; border-color: rgba(94,92,230,0.15); }
.stat-num { font-size: 32px; font-weight: 700; color: var(--text); line-height: 1; letter-spacing: -0.03em; }
.stat-high .stat-num { color: var(--red); }
.stat-medium .stat-num { color: var(--green); }
.stat-assigned .stat-num { color: var(--accent); }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 5px; font-weight: 500; }

/* ====== 国家分布 ====== */
.country-bars { display: flex; flex-direction: column; gap: 8px; }
.country-bar { display: flex; align-items: center; gap: 10px; }
.country-name { font-size: 13px; color: var(--text); width: 60px; flex-shrink: 0; font-weight: 500; }
.bar-track { flex: 1; height: 6px; background: rgba(0,0,0,0.06); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--blue); border-radius: 3px; transition: width 0.5s var(--transition); }
.country-count { font-size: 12px; color: var(--text-secondary); width: 24px; text-align: right; font-weight: 500; }

/* ====== 导出工具栏 ====== */
.export-bar { display: flex; gap: 8px; flex-wrap: wrap; }

/* ====== 客户分配 ====== */
.assign-tabs { display: flex; gap: 4px; margin-bottom: 14px; background: rgba(0,0,0,0.04); border-radius: 12px; padding: 4px; }
.assign-tab {
  flex: 1; padding: 7px 14px; background: none; border: none; border-radius: 8px;
  cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-secondary);
  font-family: var(--font); transition: all var(--transition);
}
.assign-tab.active {
  background: rgba(255,255,255,0.9); color: var(--text);
  font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ====== 管理员客户行 ====== */
.admin-customer-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: rgba(0,0,0,0.02); border-radius: var(--radius-sm);
  margin-bottom: 6px; flex-wrap: wrap;
}
.admin-row-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1; min-width: 200px; }
.admin-row-name { font-weight: 600; font-size: 14px; }
.admin-row-company { font-size: 13px; color: var(--text-secondary); }
.admin-row-country { font-size: 13px; color: var(--text-secondary); }
.admin-row-intent { font-size: 12px; }
.admin-row-assigned { font-size: 12px; color: var(--green); font-weight: 500; }
.admin-row-recorder { font-size: 12px; color: var(--text-secondary); }
.admin-row-time { font-size: 11px; color: var(--text-tertiary); }
.admin-row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.assign-select {
  padding: 7px 10px; border: 1.5px solid transparent; border-radius: 10px;
  font-size: 13px; font-family: var(--font); outline: none; background: var(--bg-input);
  transition: all var(--transition);
}
.assign-select:focus { background: #fff; border-color: var(--blue); }

/* ====== 用户管理 ====== */
.user-mgmt { display: flex; flex-direction: column; gap: 6px; }
.user-mgmt-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; background: rgba(0,0,0,0.02); border-radius: var(--radius-sm);
}
.user-mgmt-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-mgmt-name { font-weight: 600; font-size: 14px; }
.user-mgmt-username { font-size: 13px; color: var(--text-secondary); }
.user-mgmt-actions { display: flex; gap: 6px; }
.builtin-tag { font-size: 11px; background: rgba(255,204,0,0.15); color: #92600e; padding: 2px 10px; border-radius: 50px; font-weight: 500; }

/* ====== 备注大屏弹窗 ====== */
.notes-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,0.3); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.notes-modal {
  background: #fff; border-radius: var(--radius-xl);
  width: 100%; max-width: 600px; max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18);
  overflow: hidden;
}
.notes-modal-header {
  padding: 16px 20px; border-bottom: 1px solid var(--separator);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.notes-modal-header h3 { font-size: 16px; font-weight: 640; }
.notes-modal-close {
  background: rgba(0,0,0,0.04); border: none; cursor: pointer;
  font-size: 16px; color: var(--text-secondary);
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.notes-modal-close:hover { background: rgba(0,0,0,0.1); }
.notes-modal-body { flex: 1; padding: 16px 20px; overflow: hidden; display: flex; }
.notes-modal-body textarea {
  width: 100%; height: 100%; min-height: 200px;
  border: none; border-radius: 12px; background: var(--bg-input);
  font-family: var(--font); font-size: 15px; line-height: 1.7;
  padding: 14px 16px; resize: none; outline: none;
  transition: all var(--transition);
}
.notes-modal-body textarea:focus { background: #fff; box-shadow: 0 0 0 4px rgba(0,122,255,0.12); }
.notes-modal-footer {
  padding: 14px 20px; border-top: 1px solid var(--separator);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.notes-modal-hint { font-size: 12px; color: var(--text-tertiary); }

/* ====== Toast ====== */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  padding: 12px 24px; border-radius: 50px;
  font-size: 14px; font-weight: 500; color: #fff; z-index: 9999;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: toastIn 0.3s cubic-bezier(0.25,0.1,0.25,1);
  white-space: nowrap;
}
.toast-success { background: rgba(52,199,89,0.92); }
.toast-error { background: rgba(255,59,48,0.92); }
.toast-info { background: rgba(0,122,255,0.92); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* ====== 录入页内置同步 ====== */
.sync-section-inline {
  background: rgba(0,0,0,0.02); border-radius: var(--radius);
  padding: 18px; border: 1px solid var(--separator); margin-top: 4px;
}
.sync-inline-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.sync-inline-header h4 { font-size: 14px; font-weight: 640; }
.sync-inline-header span { font-size: 12px; color: var(--text-secondary); }

/* ====== 同步面板 ====== */
.sync-panel { display: flex; flex-direction: column; gap: 14px; }
.sync-panel h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.sync-section {
  background: var(--bg-card); backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: var(--radius-lg); padding: 20px;
  border: 1px solid rgba(255,255,255,0.4);
}
.sync-section h4 { font-size: 15px; font-weight: 640; margin-bottom: 8px; }
.sync-section p { font-size: 14px; color: var(--text-secondary); margin-bottom: 14px; }
.sync-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sync-result, .sync-success {
  margin-top: 12px; padding: 12px 14px; background: rgba(52,199,89,0.06);
  border-radius: var(--radius-sm); border: 1px solid rgba(52,199,89,0.2);
  font-size: 14px; color: #1b8a3b;
}
.backup-ok { color: var(--green); font-size: 13px; margin-top: 8px; }
.backup-warn { color: var(--red); font-size: 13px; margin-top: 8px; }

/* ====== 空状态 ====== */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 18px; font-weight: 640; color: var(--text); margin-bottom: 6px; }
.empty-text, .empty-state p { font-size: 14px; color: var(--text-secondary); }

/* ====== 加载 ====== */
.loading { text-align: center; padding: 40px 20px; color: var(--text-tertiary); font-size: 14px; }

/* ====== 表单 group label 中文 ====== */
.form-group label::after { content: none; }
label[for="cust-social"] { letter-spacing: normal; }

/* ====== 响应式 ====== */
@media (max-width: 600px) {
  .app-header { padding: 0 8px; height: 40px; }
  .header-left h1 { font-size: 14px; }
  .header-right { gap: 2px; }
  .user-badge { max-width: 50px; font-size: 10px; padding: 2px 6px; }
  .role-badge { font-size: 10px; padding: 2px 6px; }
  .net-status { font-size: 10px; padding: 2px 6px; }
  .btn-xs { padding: 3px 6px; font-size: 10px; }
  .main-content { padding: 12px 10px 80px; }
  .tab-bar { margin: 8px 10px; }
  .form-section { padding: 18px 16px; }
  .form-row { flex-direction: column; gap: 10px; }
  .form-group { min-width: 0; }
  .login-card { padding: 32px 22px 28px; border-radius: var(--radius-lg); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .customer-card { flex-wrap: wrap; }
  .card-actions { flex-direction: row; align-self: flex-end; }
  .detail-modal { max-height: 95vh; border-radius: var(--radius); }
  .tab { min-width: 60px; padding: 7px 10px; font-size: 12px; }
  .admin-customer-row { flex-direction: column; align-items: flex-start; }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { flex: 1; }
  .toast { white-space: normal; width: 90%; text-align: center; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
