/* =========================================================
   BABYJOY TRACKER - FINTECH / UTILITY MOBILE DESIGN
   (PERSIS DENGAN REFERENSI GAMBAR USER)
   ========================================================= */

:root {
  --primary-teal: #0e5346;
  --primary-teal-dark: #093c32;
  --primary-teal-light: #166e5e;
  --teal-accent: #10b981;
  
  --bg-app: #f2f6f5;
  --bg-card: #ffffff;
  --border-subtle: #e6eded;
  
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px rgba(14, 83, 70, 0.06);
  --shadow-floating: 0 12px 36px rgba(14, 83, 70, 0.12);

  --font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: #1a2228; /* Desktop backdrop */
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

/* Mobile App Shell Container */
.mobile-app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--bg-app);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(0,0,0,0.3);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-dark);
}

.text-emerald { color: #10b981; }
.cursor-pointer { cursor: pointer; }

/* Highlight in search */
mark.highlight {
  background-color: #fef08a;
  color: #854d0e;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 700;
}

/* =========================================================
   1. TOP CURVED TEAL HEADER
   ========================================================= */

.app-top-header {
  background: linear-gradient(170deg, var(--primary-teal) 0%, var(--primary-teal-dark) 100%);
  padding: 20px 20px 75px 20px;
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
  position: relative;
  z-index: 10;
}

.header-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.brand-name {
  font-size: 1.15rem;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.brand-name span {
  color: #fb923c;
  font-size: 0.9rem;
}

.brand-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-tagline {
  font-size: 0.72rem;
  color: #cbd5e1;
}

.sync-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  color: #ffffff;
  font-weight: 600;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
  animation: pulseDot 2s infinite;
}

.sync-dot.syncing {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.sync-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: none;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.header-right-tools {
  position: relative;
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: none;
  color: #f59e0b;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

/* Two Top Mini Cards */
.top-mini-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mini-info-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: var(--transition);
}

.mini-info-card:active {
  transform: scale(0.97);
}

.mini-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.bg-cyan { background: #e0f2fe; color: #0284c7; }
.bg-green { background: #dcfce7; color: #16a34a; }
.bg-purple { background: #f3e8ff; color: #9333ea; }
.bg-teal { background: #ccfbf1; color: #0d9488; }
.bg-blue { background: #dbeafe; color: #2563eb; }
.bg-amber { background: #fef3c7; color: #d97706; }
.bg-red { background: #fee2e2; color: #dc2626; }
.bg-pink { background: #fce7f3; color: #db2777; }

.mini-card-text small {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.mini-card-text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   2. MAIN BODY & FLOATING HERO CARD
   ========================================================= */

.app-main-body {
  flex: 1;
  padding: 0 16px 90px 16px;
  margin-top: -55px; /* Floats over the header */
  position: relative;
  z-index: 20;
}

.tab-view {
  animation: fadeIn 0.22s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 1. FLOATING HERO CARD (BALANCE CARD) */
.floating-hero-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-floating);
  border: 1px solid rgba(255,255,255,0.8);
  margin-bottom: 16px;
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.hero-card-title {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.hero-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #dc2626;
  background: #fee2e2;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.hero-amount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.hero-amount-val {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
}

.hero-chevron {
  font-size: 1.1rem;
  color: var(--text-light);
}

.hero-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  margin-bottom: 0;
}

/* =========================================================
   3. QUICK ACTION FEATURE CARD (GRID ICON)
   ========================================================= */

.quick-feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px 16px 12px 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  overflow: hidden;
}

.feature-icons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 8px;
  margin-bottom: 16px;
}

.feature-item {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-family: inherit;
}

.feature-item:active {
  transform: scale(0.92);
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: var(--transition);
}

.feature-item span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  line-height: 1.2;
}

.feature-card-footer-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary-teal);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  transition: var(--transition);
}

.feature-card-footer-btn:active {
  background: var(--primary-teal-dark);
}

/* =========================================================
   4. HOME SEARCH SPOTLIGHT & DONOR CARDS
   ========================================================= */

.home-search-spotlight, .section-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.spotlight-header, .section-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.spotlight-header h3, .section-card-header h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spotlight-count, .badge-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: #e6f4f1;
  color: var(--primary-teal);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.search-input-wrap {
  position: relative;
  margin-bottom: 12px;
}

.search-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-teal);
  font-size: 1rem;
}

.search-input-wrap input {
  width: 100%;
  padding: 12px 38px 12px 42px;
  background: var(--bg-app);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.search-input-wrap input:focus {
  border-color: var(--primary-teal);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(14, 83, 70, 0.15);
}

.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
}

/* Chips Bar */
.chips-scroll-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.chips-scroll-bar::-webkit-scrollbar {
  display: none;
}

.chip-pill {
  padding: 5px 12px;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
}

.chip-pill.active {
  background: var(--primary-teal);
  color: #ffffff;
  border-color: var(--primary-teal);
}

/* Donor Cards Feed */
.donor-cards-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-empty-prompt {
  text-align: center;
  padding: 22px 16px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.search-prompt-icon {
  font-size: 1.6rem;
  margin-bottom: 2px;
}

.search-prompt-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

.search-prompt-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  max-width: 270px;
  line-height: 1.4;
}

.donor-feed-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  transition: var(--transition);
  position: relative;
}

.donor-feed-card:hover {
  border-color: var(--primary-teal);
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.card-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-dark);
}

.card-cat-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.card-address {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-value-strip {
  background: #e6f4f1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.card-wishes {
  font-size: 0.78rem;
  color: var(--text-dark);
  font-style: italic;
  line-height: 1.35;
  background: var(--bg-app);
  padding: 6px 10px;
  border-radius: 6px;
}

.card-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.card-actions-group {
  display: flex;
  gap: 6px;
}

.btn-card-action {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.btn-card-action:hover {
  background: var(--bg-app);
  color: var(--primary-teal);
}

.btn-card-action.del:hover {
  color: #ef4444;
}

/* =========================================================
   5. FORMULIR & TABS
   ========================================================= */

.filter-row-grid, .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.app-select, .app-form input, .app-form textarea {
  width: 100%;
  padding: 11px 12px;
  background: var(--bg-app);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-dark);
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.app-form .form-group {
  margin-bottom: 12px;
}

.app-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.req { color: #ef4444; }
.hint { font-weight: normal; color: var(--text-muted); font-size: 0.7rem; }

/* Segmented Control */
.type-segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg-app);
  padding: 4px;
  border-radius: var(--radius-md);
}

.seg-btn {
  cursor: pointer;
}

.seg-btn input {
  display: none;
}

.seg-btn span {
  display: block;
  padding: 8px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

.seg-btn input:checked + span {
  background: var(--primary-teal);
  color: #ffffff;
}

.sub-form-panel {
  background: #e6f4f1;
  border: 1px dashed var(--primary-teal);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.btn-cancel {
  flex: 1;
  padding: 11px;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-submit {
  flex: 2;
  padding: 11px;
  background: var(--primary-teal);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
}

/* =========================================================
   6. PROFIL STRIP & ACTION LIST
   ========================================================= */

.profile-header-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.profile-avatar-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #e6f4f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 2px solid var(--primary-teal);
}

.profile-meta-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-app);
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.meta-item span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.meta-item strong {
  font-size: 0.85rem;
}

.action-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
  color: inherit;
}

.action-menu-item:hover {
  background: #ffffff;
  border-color: var(--primary-teal);
}

.action-item-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.action-item-text {
  flex: 1;
}

.action-item-text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dark);
}

.action-item-text small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* =========================================================
   7. NATIVE BOTTOM APP BAR (5 MENU PERSIS GAMBAR)
   ========================================================= */

.app-bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)) 12px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
  z-index: 100;
}

.nav-tab-item {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-family: inherit;
}

.nav-icon-wrap {
  width: 38px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: var(--transition);
}

.nav-icon-wrap.add-center {
  width: 36px;
  height: 36px;
  background: var(--primary-teal);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 83, 70, 0.3);
  margin-top: -6px;
}

.nav-tab-item span {
  font-size: 0.72rem;
  font-weight: 700;
}

.nav-tab-item.active {
  color: var(--primary-teal);
}

.nav-tab-item.active .nav-icon-wrap:not(.add-center) {
  background: #e6f4f1;
  color: var(--primary-teal);
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #ffffff;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: var(--shadow-floating);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 2000;
  white-space: nowrap;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

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

.modal-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-floating);
  overflow: hidden;
  max-height: 90vh;
}

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

.modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
}

.modal-form {
  padding: 18px 20px;
  overflow-y: auto;
}

.avatar-chooser {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.avatar-opt {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  background: var(--bg-app);
  font-size: 1.3rem;
  cursor: pointer;
}

.avatar-opt.active {
  border-color: var(--primary-teal);
  background: #e6f4f1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.modal-body-content {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

/* Template Download Banner Box */
.template-download-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.template-box-icon {
  font-size: 1.4rem;
  color: #16a34a;
  flex-shrink: 0;
}

.template-box-text {
  flex: 1;
}

.template-box-text strong {
  font-size: 0.82rem;
  color: #15803d;
  display: block;
}

.template-box-text p {
  font-size: 0.72rem;
  color: #4b5563;
  line-height: 1.3;
}

.template-btn-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.btn-template-download {
  background: #16a34a;
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-template-download.bg-slate {
  background: #475569;
}

.btn-template-download:active {
  transform: scale(0.96);
  opacity: 0.9;
}

/* Template Table Accordion Preview */
.template-table-details {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.template-table-summary {
  padding: 10px 14px;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dark);
  user-select: none;
  list-style: none;
}

.template-table-summary::-webkit-details-marker {
  display: none;
}

.summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-table-details[open] .chevron-icon {
  transform: rotate(180deg);
}

.chevron-icon {
  transition: transform 0.2s ease;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.template-table-scroll {
  overflow-x: auto;
  padding: 10px 12px;
  max-height: 220px;
}

.template-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  white-space: nowrap;
}

.template-preview-table th {
  background: #f1f5f9;
  color: var(--text-dark);
  font-weight: 700;
  padding: 6px 10px;
  text-align: left;
  border: 1px solid #e2e8f0;
}

.template-preview-table td {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.template-preview-table tr:hover {
  background: #f8fafc;
}

/* Dropzone */
.upload-dropzone {
  border: 2px dashed #94a3b8;
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary-teal);
  background: #e6f4f1;
}

.dropzone-icon {
  font-size: 2rem;
  color: var(--primary-teal);
  margin-bottom: 2px;
}

.dropzone-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-dark);
}

.dropzone-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Import Preview Card */
.import-preview-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
}

.preview-header strong {
  font-size: 0.86rem;
  color: var(--text-dark);
  display: block;
}

.preview-header small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.preview-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 8px;
  background: var(--bg-app);
  padding: 10px;
  border-radius: var(--radius-sm);
}

.preview-stat-box {
  text-align: center;
}

.preview-stat-box span {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.preview-stat-box strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

.import-mode-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.mode-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.mode-opt input {
  margin-top: 3px;
  accent-color: var(--primary-teal);
}

.mode-info strong {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dark);
}

.mode-info small {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Print */
@media print {
  body { background: #fff !important; }
  .mobile-app-shell { max-width: 100% !important; box-shadow: none !important; }
  .app-top-header, .quick-feature-card, .app-bottom-nav { display: none !important; }
}
