:root {
  --primary: #07c160;
  --primary-dark: #06ad56;
  --primary-light: #e8f8ef;
  --primary-gradient: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
  --red: #fa5151;
  --red-light: #fef0f0;
  --orange: #ff976a;
  --orange-light: #fff5ef;
  --blue: #10aeff;
  --blue-light: #e8f7ff;
  --teal: #06c5b8;
  --teal-light: #e0f7f5;
  --purple: #6467ff;
  --purple-light: #eeedff;
  --yellow: #ffc300;
  --yellow-light: #fffbe6;
  --gray: #888;
  --gray-light: #f7f8fa;
  --border: #ebedf0;
  --text: #323233;
  --text-secondary: #646566;
  --text-light: #969799;
  --bg: #f2f3f5;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 2px 16px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.1);
  --shadow-primary: 0 6px 20px rgba(7,193,96,0.28);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: -apple-system, 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  height: 100%;
  overflow: hidden;
}

#app {
  max-width: 500px;
  margin: 0 auto;
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  background: var(--bg);
}

/* ===== Login ===== */
.login-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #07c160 0%, #06ad56 50%, #048f48 100%);
  padding: 40px 28px;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.login-page::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.login-logo {
  width: 100px; height: 100px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  margin-bottom: 24px;
  border: 1.5px solid rgba(255,255,255,0.25);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  z-index: 1;
}
.login-title {
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 1.5px;
  z-index: 1;
}
.login-subtitle {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  margin-bottom: 40px;
  z-index: 1;
  letter-spacing: 0.5px;
}
.login-card {
  width: 100%;
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
  z-index: 1;
}
.login-card input {
  width: 100%;
  height: 52px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font-size: 16px;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--gray-light);
}
.login-card input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(7,193,96,0.1);
}
.login-btn {
  width: 100%;
  height: 52px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 4px;
  letter-spacing: 2px;
}
.login-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(7,193,96,0.2);
}
.login-quick {
  margin-top: 24px;
  z-index: 1;
  width: 100%;
}
.login-quick-label {
  text-align: center;
  color: rgba(255,255,255,0.65);
  font-size: 12px;
  margin-bottom: 14px;
}
.login-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.login-role-tag {
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.95);
  cursor: pointer;
  transition: background 0.2s, transform 0.12s;
  border: 1.5px solid rgba(255,255,255,0.15);
  font-weight: 500;
}
.login-role-tag:active {
  background: rgba(255,255,255,0.3);
  transform: scale(0.95);
}

/* ===== Layout ===== */
.page {
  min-height: 100vh;
  padding-bottom: 68px;
}
.page-header {
  background: var(--primary-gradient);
  color: #fff;
  padding: 52px 20px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 16px rgba(7,193,96,0.18);
}
.page-header h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.page-header .sub {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 4px;
}
.page-body {
  padding: 16px;
}

/* ===== Tab Bar ===== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
  height: calc(64px + var(--safe-bottom));
  background: #fff;
  border-top: none;
  display: flex;
  z-index: 100;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -2px 20px rgba(0,0,0,0.08);
}
.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-light);
  cursor: pointer;
  font-size: 11px;
  transition: color 0.2s;
  font-weight: 500;
}
.tabbar-item.active {
  color: var(--primary);
  font-weight: 600;
}
.tabbar-item .icon {
  font-size: 26px;
  line-height: 1;
}

/* ===== Cards ===== */
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title .more {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 400;
}

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.stat-item {
  text-align: center;
  padding: 16px 6px;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  transition: transform 0.15s;
}
.stat-item:active {
  transform: scale(0.96);
}
.stat-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}
.stat-num.red { color: var(--red); }
.stat-num.orange { color: var(--orange); }
.stat-num.blue { color: var(--blue); }
.stat-num.yellow { color: #d4a900; }
.stat-label {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ===== List ===== */
.list-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  box-shadow: var(--shadow-card);
}
.list-item:active {
  transform: scale(0.98);
  background: var(--gray-light);
}
.list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.list-item-title {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}
.list-item-meta {
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.list-item-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-purple { background: var(--purple-light); color: var(--purple); }
.badge-yellow { background: var(--yellow-light); color: #d4a900; }
.badge-gray { background: var(--gray-light); color: var(--gray); }

/* ===== Forms ===== */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 600;
  display: block;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  height: 50px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 16px;
  outline: none;
  background: var(--gray-light);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.form-textarea {
  height: auto;
  padding: 12px 14px;
  min-height: 90px;
  resize: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(7,193,96,0.1);
}
.btn {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.12s, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary-gradient); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:active { box-shadow: 0 2px 8px rgba(7,193,96,0.2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-outline { background: #fff; color: var(--primary); border: 2px solid var(--primary); }
.btn-gray { background: var(--gray-light); color: var(--text); }
.btn:disabled { opacity: 0.4; }

/* ===== Detail ===== */
.detail-section {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.detail-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 9px 0;
  font-size: 15px;
}
.detail-label {
  color: var(--text-light);
  flex-shrink: 0;
  width: 85px;
}
.detail-value {
  color: var(--text);
  flex: 1;
  text-align: right;
  word-break: break-all;
  font-weight: 500;
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 18px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.timeline-item.pending::before { background: var(--orange); }
.timeline-item.done::before { background: var(--primary); }
.timeline-time {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 3px;
}
.timeline-content {
  font-size: 15px;
  color: var(--text);
}

/* ===== Progress ===== */
.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--gray-light);
  border-radius: 5px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 5px;
  transition: width 0.4s ease;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal {
  width: 100%;
  max-width: 500px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 24px 20px 20px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
}
.modal-close {
  font-size: 22px;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 8px;
}

/* ===== Search ===== */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.search-input {
  flex: 1;
  height: 42px;
  border: none;
  border-radius: 21px;
  padding: 0 18px;
  font-size: 15px;
  background: #fff;
  outline: none;
  box-shadow: var(--shadow-sm);
}
.search-btn {
  height: 42px;
  padding: 0 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 21px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== Filter Tabs ===== */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 7px 18px;
  border-radius: 22px;
  font-size: 14px;
  white-space: nowrap;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  border: 1.5px solid var(--border);
  transition: all 0.2s;
  font-weight: 500;
}
.filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}

/* ===== Empty ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
}
.empty-state .icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}
.empty-state .text {
  font-size: 15px;
}

/* ===== Role Header ===== */
.role-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 52px 20px 20px;
  background: var(--primary-gradient);
  color: #fff;
}
.role-avatar {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 1.5px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.role-name {
  font-size: 20px;
  font-weight: 700;
}
.role-tag {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 3px;
}

/* ===== FAB ===== */
.fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  font-size: 28px;
  box-shadow: var(--shadow-primary);
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.fab:active { transform: scale(0.92); }

/* ===== Alert item ===== */
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border-radius: var(--radius);
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}
.alert-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}
.alert-dot.red { background: var(--red); box-shadow: 0 0 0 5px var(--red-light); }
.alert-dot.yellow { background: var(--yellow); box-shadow: 0 0 0 5px var(--yellow-light); }
.alert-content {
  flex: 1;
}
.alert-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.alert-msg {
  font-size: 13px;
  color: var(--text-light);
}
.alert-time {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 6px;
}

/* ===== Payment periods ===== */
.period-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.period-cell {
  text-align: center;
  padding: 10px 4px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 500;
}
.period-cell.paid { background: var(--primary-light); color: var(--primary); }
.period-cell.pending { background: var(--gray-light); color: var(--gray); }
.period-cell.overdue { background: var(--red-light); color: var(--red); }
.period-cell.failed { background: var(--red-light); color: var(--red); }
.period-cell.current { background: var(--blue-light); color: var(--blue); border: 2px solid var(--blue); }

/* ===== Utility ===== */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.text-sm { font-size: 13px; }
.text-light { color: var(--text-light); }
.text-red { color: var(--red); }
.text-green { color: var(--primary); }
.text-orange { color: var(--orange); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.pd-16 { padding: 16px; }
.rounded { border-radius: var(--radius); }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ===== Action buttons in detail ===== */
.action-bar {
  display: flex;
  gap: 10px;
  padding: 14px 0;
}
.action-bar .btn { flex: 1; }

/* ===== Checkbox list ===== */
.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.check-item {
  padding: 8px 16px;
  border-radius: 22px;
  background: var(--gray-light);
  font-size: 14px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s;
}
.check-item.selected {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* ===== Loading ===== */
.loading {
  text-align: center;
  padding: 60px;
  color: var(--text-light);
  font-size: 15px;
}
.loading::before {
  content: '';
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.82);
  color: #fff;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 15px;
  z-index: 999;
  max-width: 80%;
  text-align: center;
  animation: toastIn 0.25s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -40%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ===== Dashboard hero ===== */
.dash-hero {
  background: var(--primary-gradient);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 16px;
  color: #fff;
  box-shadow: var(--shadow-primary);
  position: relative;
  overflow: hidden;
}
.dash-hero::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.dash-hero-title {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.dash-hero-num {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}
.dash-hero-sub {
  font-size: 13px;
  opacity: 0.75;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

/* ===== Quick action grid ===== */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.quick-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s;
}
.quick-item:active { transform: scale(0.92); }
.quick-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 8px;
  box-shadow: var(--shadow-sm);
}
.quick-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== Collection page ===== */
.coll-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.coll-sum-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.coll-sum-num {
  font-size: 28px;
  font-weight: 800;
}
.coll-sum-label {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ===== Import Modal ===== */
.import-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 4px;
}
.import-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.import-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}
.import-section {
  padding: 4px 0;
}
.import-hint {
  background: var(--blue-light);
  border-radius: var(--radius-xs);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--blue);
}
.import-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--text-secondary);
  font-size: 14px;
}
.import-upload-zone:hover, .import-upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.import-upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
/* Import Preview */
.import-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.import-preview-stats {
  display: flex;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}
.import-field-mapping {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
}
.import-mapping-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
}
.import-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  max-height: 320px;
  overflow-y: auto;
}
.import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 500px;
}
.import-table th {
  background: var(--gray-light);
  padding: 10px 6px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  position: sticky;
  top: 0;
  z-index: 1;
}
.import-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.import-table tr.row-invalid {
  background: var(--red-light);
}
.text-ellipsis {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Photo Import */
.photo-actions {
  padding: 20px;
}
.photo-preview-img {
  max-width: 100%;
  max-height: 240px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}
.photo-ocr-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.85);
  border-radius: var(--radius-xs);
}
/* Small buttons */
.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  border-radius: var(--radius-xs);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--gray-light);
}

/* ===== Smart Paste ===== */
.smart-paste-section {
  background: #f0faf5;
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.smart-paste-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(5, 150, 105, 0.06);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}
.smart-paste-area {
  padding: 12px 16px 16px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  max-height: 400px;
  overflow: hidden;
}
.smart-paste-area.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.smart-paste-input {
  width: 100%;
  min-height: 80px;
  max-height: 160px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  background: #fff;
  transition: border-color 0.2s;
}
.smart-paste-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}
.smart-paste-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 4px;
}
.smart-paste-hint {
  flex: 1;
  min-width: 150px;
}
.smart-paste-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}
