/* =============================================
   Raportează Scam Moldova — v3 Responsive
   Mobile-first → Desktop → Ultrawide
   ============================================= */

/* ─── CSS Variables + Fluid Scale ─── */
:root {
  /* Colors */
  --bg: #fff;
  --ink: #171717;
  --ink-secondary: #525252;
  --ink-muted: #a3a3a3;
  --border: #e5e5e5;
  --border-hover: #d4d4d4;
  --surface-hover: #fafafa;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Fluid typography — clamp(min, preferred, max) */
  --text-xs: clamp(11px, 0.65rem + 0.1vw, 12px);
  --text-sm: clamp(12px, 0.7rem + 0.15vw, 14px);
  --text-base: clamp(14px, 0.85rem + 0.2vw, 16px);
  --text-lg: clamp(18px, 1.1rem + 0.4vw, 22px);
  --text-xl: clamp(24px, 1.5rem + 0.8vw, 32px);
  --text-2xl: clamp(30px, 1.8rem + 1.2vw, 44px);
  --text-3xl: clamp(36px, 2.2rem + 1.5vw, 52px);

  /* Fluid spacing */
  --space-1: clamp(4px, 0.25rem + 0.1vw, 6px);
  --space-2: clamp(8px, 0.5rem + 0.2vw, 12px);
  --space-3: clamp(12px, 0.75rem + 0.3vw, 16px);
  --space-4: clamp(16px, 1rem + 0.4vw, 24px);
  --space-5: clamp(20px, 1.25rem + 0.5vw, 32px);
  --space-6: clamp(24px, 1.5rem + 0.6vw, 40px);
  --space-8: clamp(32px, 2rem + 0.8vw, 48px);

  /* Layout — fluid container */
  --content-max: min(92vw, 640px);
  --content-pad: clamp(16px, 0.75rem + 2vw, 32px);
  --nav-h: 56px;

  /* Scam type colors */
  --type-phishing: #7c3aed;
  --type-call: #dc2626;
  --type-sms: #0891b2;
  --type-social: #2563eb;
  --type-shop: #d97706;
  --type-invest: #059669;
  --type-job: #4f46e5;
  --type-lottery: #ca8a04;
  --type-romance: #db2777;
  --type-support: #6366f1;
}

/* ─── Breakpoint reference ───
   Mobile S: 320px  → default (mobile-first)
   Mobile M: 375px  → @media (min-width: 375px)
   Mobile L: 425px  → @media (min-width: 425px)
   Tablet:   640px  → @media (min-width: 640px)
   Tablet L: 768px  → @media (min-width: 768px)
   Desktop:  1024px → @media (min-width: 1024px)
   Desktop W:1280px → @media (min-width: 1280px)
   Ultrawide:1536px → @media (min-width: 1536px)
   ────────────────────────────────────────── */

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: 68px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Typography ─── */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--ink);
}
h1 { font-size: var(--text-2xl); margin-bottom: 6px; }
h2 { font-size: var(--text-xl); margin-bottom: 4px; }
h3 { font-size: var(--text-lg); margin-bottom: 2px; }
h4 { font-size: var(--text-base); margin-bottom: 2px; letter-spacing: -0.02em; }
p { color: var(--ink-secondary); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Layout Container ─── */
.main-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-5) var(--content-pad) 80px;
}

/* ─── Navigation: Mobile Bottom ─── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid var(--border);
  padding: 4px 0 env(safe-area-inset-bottom, 4px);
  z-index: 100;
  transition: transform .3s ease; /* for future hide-on-scroll */
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 0 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.nav-item:active { transform: scale(.95); }
.nav-item.active { color: var(--ink); }
.nav-item.active svg { stroke-width: 2.5; }

/* ─── Navigation: Desktop ─── */
.desktop-nav { display: none; }
.desktop-nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--content-pad);
  height: var(--nav-h);
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.03em;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 6px 12px;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-hover); text-decoration: none; }
.nav-links a.active { color: var(--ink); background: #f5f5f5; }

/* ─── Footer ─── */
.footer {
  display: none;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-5) var(--content-pad) 80px;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  border-top: 1px solid var(--border);
}
.footer p + p { margin-top: 4px; }
.footer strong { color: var(--ink-secondary); }

/* ─── Section Header ─── */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.section-header-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.section-header h2 { margin: 0; font-size: var(--text-lg); }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.section-title h2 { margin: 0; }
.section-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-muted);
  transition: color .2s;
  white-space: nowrap;
}
.section-link:hover { color: var(--ink); text-decoration: none; }

/* ─── Hero ─── */
.hero {
  text-align: center;
  padding: var(--space-6) 0 var(--space-4);
}
.hero-icon {
  width: clamp(48px, 4rem + 1vw, 64px);
  height: clamp(48px, 4rem + 1vw, 64px);
  background: var(--danger-light);
  border-radius: clamp(14px, 1rem + 0.3vw, 18px);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-3);
}
.hero-icon svg { width: clamp(22px, 1.5rem + 0.5vw, 28px); height: clamp(22px, 1.5rem + 0.5vw, 28px); stroke: var(--danger); }
.hero h1 { font-size: var(--text-3xl); letter-spacing: -0.05em; }
.hero p {
  font-size: var(--text-base);
  color: var(--ink-muted);
  max-width: clamp(320px, 60vw, 480px);
  margin: 0 auto;
}

/* ─── Quick Actions ─── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin: var(--space-4) 0;
}
.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--space-4) var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  min-height: 80px;
  justify-content: center;
}
.action-btn:hover {
  border-color: var(--border-hover);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  background: var(--surface-hover);
}
.action-btn:active { transform: scale(.97); }
.action-btn svg { color: var(--ink-muted); transition: color .2s; width: 22px; height: 22px; }
.action-btn:hover svg { color: var(--ink); }

/* ─── Quick Search ─── */
.quick-search {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}
.quick-search input {
  flex: 1;
  padding: clamp(10px, 0.6rem + 0.3vw, 14px) clamp(12px, 0.7rem + 0.3vw, 16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-base);
  transition: border-color .2s, box-shadow .2s;
  min-height: 48px;
}
.quick-search input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(23,23,23,.08);
}
.quick-search input::placeholder { color: var(--ink-muted); }

/* ─── Stats Grid ─── */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}
.stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(14px, 1rem + 0.3vw, 20px);
  text-align: center;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: 0 1px 6px rgba(0,0,0,.04); transform: translateY(-1px); }
.stat-card.accent { background: var(--accent-light); border-color: transparent; }
.stat-card.danger { background: var(--danger-light); border-color: transparent; }
.stat-number {
  font-size: clamp(28px, 1.8rem + 1vw, 40px);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--ink);
  line-height: 1;
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* ─── Cards ─── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(14px, 1rem + 0.3vw, 20px);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover { border-color: var(--border-hover); }

/* ─── Type Distribution ─── */
.type-dist-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 0;
}
.type-name {
  width: clamp(85px, 5rem + 4vw, 120px);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-secondary);
  flex-shrink: 0;
}
.type-bar-track {
  flex: 1;
  height: clamp(6px, 0.35rem + 0.15vw, 8px);
  background: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
  min-width: 40px;
}
.type-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .6s cubic-bezier(.22,1,.36,1);
}
.type-count-label {
  width: clamp(24px, 1.5rem + 0.5vw, 32px);
  text-align: right;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ─── Leaderboard ─── */
.leaderboard { list-style: none; }
.leaderboard li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: clamp(8px, 0.5rem + 0.2vw, 12px) 0;
  border-bottom: 1px solid #f5f5f5;
}
.leaderboard li:last-child { border-bottom: none; }
.lb-rank {
  width: 22px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.lb-rank.top1 { color: var(--warning); font-size: 16px; }
.lb-rank.top2 { color: var(--ink-muted); }
.lb-rank.top3 { color: #a8a29e; }
.lb-phone {
  flex: 1;
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.lb-phone:hover { text-decoration: underline; }
.lb-count {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-muted);
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

/* ─── Report List ─── */
.report-list { display: flex; flex-direction: column; gap: var(--space-2); }
.report-list.grid-view { display: grid; grid-template-columns: 1fr; gap: var(--space-2); }

.report-item {
  display: block;
  padding: clamp(12px, 0.8rem + 0.3vw, 16px);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.report-item:hover {
  border-color: var(--border-hover);
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
  transform: translateY(-1px);
  text-decoration: none;
}
.report-item:active { transform: translateY(0); }
.report-item-top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.report-phone {
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  color: var(--ink);
  word-break: break-all;
}
.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--ink-muted);
  align-items: center;
}
.report-desc {
  font-size: var(--text-sm);
  color: var(--ink-secondary);
  margin-top: 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
}
.badge-type { background: #f5f5f5; color: var(--ink-secondary); }
.badge-type[data-type="phishing"] { background: #ede9fe; color: var(--type-phishing); }
.badge-type[data-type="apel_telefonic"] { background: var(--danger-light); color: var(--danger); }
.badge-type[data-type="sms"] { background: #ecfeff; color: var(--type-sms); }
.badge-type[data-type="social_media"] { background: var(--accent-light); color: var(--accent); }
.badge-type[data-type="magazin_fals"] { background: var(--warning-light); color: var(--warning); }
.badge-type[data-type="investitie_falsa"] { background: #ecfdf5; color: var(--type-invest); }
.badge-type[data-type="oferta_loc_de_munca"] { background: #eef2ff; color: var(--type-job); }
.badge-type[data-type="lotterie_premiu"] { background: #fefce8; color: var(--type-lottery); }
.badge-type[data-type="escrocherie_sentimentala"] { background: #fdf2f8; color: var(--type-romance); }
.badge-type[data-type="suport_tehnic_fals"] { background: #eef2ff; color: var(--type-support); }
.badge-status { background: #f5f5f5; color: var(--ink-secondary); }
.badge-status[data-status="verificat"] { background: var(--success-light); color: var(--success); }
.badge-status[data-status="fals"] { background: var(--danger-light); color: var(--danger); }
.badge-status[data-status="actiune"] { background: var(--accent-light); color: var(--accent); }

/* ─── Forms ─── */
.form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 1.2rem + 0.5vw, 28px);
  margin: var(--space-4) 0;
}
.form-group { margin-bottom: var(--space-4); }
.form-group label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}
.form-group label .required { color: var(--danger); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: clamp(10px, 0.6rem + 0.3vw, 14px) clamp(12px, 0.7rem + 0.3vw, 16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
  min-height: 48px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(23,23,23,.08);
}
.form-group input.error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
.form-group textarea { min-height: clamp(100px, 6rem + 5vw, 140px); resize: vertical; }
.form-group select {
  background: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  padding-right: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.field-hint { font-size: var(--text-xs); color: var(--ink-muted); margin-top: 4px; line-height: 1.4; }
.field-error { font-size: var(--text-xs); color: var(--danger); margin-top: 4px; display: none; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: clamp(10px, 0.6rem + 0.3vw, 14px) clamp(16px, 1rem + 0.5vw, 24px);
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
  min-height: 48px;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--ink);
  color: #fff;
  width: 100%;
}
.btn-primary:hover { background: #404040; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-secondary { background: #f5f5f5; color: var(--ink); }
.btn-secondary:hover { background: #e5e5e5; }
.btn-outline {
  background: transparent;
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--border-hover); background: var(--surface-hover); }
.btn-sm { padding: 6px 14px; font-size: var(--text-sm); min-height: 36px; }
.btn-icon {
  width: 44px; height: 44px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); cursor: pointer; color: var(--ink-muted);
  transition: all .2s;
}
.btn-icon:hover { border-color: var(--border-hover); color: var(--ink); }

/* ─── Search Bar ─── */
.search-bar {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-4) 0;
  flex-wrap: wrap;
}
.search-bar input {
  flex: 1;
  min-width: 160px;
  padding: clamp(10px, 0.6rem + 0.3vw, 14px) clamp(12px, 0.7rem + 0.3vw, 16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-base);
  min-height: 48px;
  transition: border-color .2s, box-shadow .2s;
}
.search-bar input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,23,23,.08); }
.search-bar select {
  padding: clamp(10px, 0.6rem + 0.3vw, 14px) 40px clamp(10px, 0.6rem + 0.3vw, 14px) clamp(12px, 0.7rem + 0.3vw, 16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-base);
  background: var(--bg);
  color: var(--ink-secondary);
  -webkit-appearance: none;
  appearance: none;
  min-height: 48px;
  background: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  transition: border-color .2s;
}
.search-bar select:focus { outline: none; border-color: var(--ink); }

/* ─── Sort Bar ─── */
.sort-bar {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.sort-bar label { font-size: var(--text-sm); color: var(--ink-muted); font-weight: 500; }
.sort-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all .2s;
  min-height: 36px;
}
.sort-btn:hover { border-color: var(--border-hover); color: var(--ink); }
.sort-btn.active { border-color: var(--ink); color: var(--ink); background: var(--surface-hover); }

/* ─── Detail ─── */
.detail-header { margin-bottom: var(--space-5); }
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
  transition: color .2s;
  padding: 4px 0;
}
.detail-back:hover { color: var(--ink); text-decoration: none; }
.detail-phone-large {
  font-size: clamp(22px, 1.4rem + 0.8vw, 30px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.detail-meta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); align-items: center; }
.detail-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}
.detail-section { margin-bottom: var(--space-5); }
.detail-section h3 {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.detail-value { font-size: var(--text-base); color: var(--ink); line-height: 1.7; }
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.detail-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(12px, 0.8rem + 0.3vw, 16px);
}
.detail-card h4 {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.detail-card p, .detail-card a { font-size: var(--text-sm); font-weight: 500; }

/* ─── Phone Banner ─── */
.phone-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: clamp(12px, 0.8rem + 0.3vw, 16px);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
}
.phone-banner.warning { background: var(--warning-light); border: 1px solid #fde68a; }
.phone-banner.danger { background: var(--danger-light); border: 1px solid #fecaca; }
.phone-banner-icon { flex-shrink: 0; padding-top: 2px; }
.phone-banner-text { flex: 1; font-size: var(--text-sm); font-weight: 500; line-height: 1.5; }
.phone-banner-text strong { color: var(--ink); }

/* ─── Similar Reports Section ─── */
.similar-section { margin-top: var(--space-5); }

/* ─── Tips ─── */
.tip-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(16px, 1rem + 0.5vw, 24px);
  margin-bottom: var(--space-3);
  transition: border-color .2s, box-shadow .2s;
}
.tip-card:hover { border-color: var(--border-hover); box-shadow: 0 1px 6px rgba(0,0,0,.03); }
.tip-card h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.tip-num {
  width: clamp(26px, 1.6rem + 0.3vw, 30px);
  height: clamp(26px, 1.6rem + 0.3vw, 30px);
  border-radius: 6px;
  background: var(--ink);
  color: white;
  font-size: var(--text-sm);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tip-card p { font-size: var(--text-sm); color: var(--ink-secondary); line-height: 1.6; }
.tip-card ul { margin-top: var(--space-2); padding-left: 20px; font-size: var(--text-sm); color: var(--ink-secondary); }
.tip-card ul li { margin-bottom: 4px; }

/* ─── Toast ─── */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-120px);
  padding: clamp(10px, 0.6rem + 0.3vw, 16px) clamp(16px, 1rem + 0.5vw, 24px);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  z-index: 200;
  transition: transform .35s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
  max-width: min(90vw, 480px);
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast-success { background: var(--ink); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }

/* ─── Alerts ─── */
.alert { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); font-size: var(--text-sm); display: none; margin-bottom: var(--space-4); }
.alert-success { background: var(--success-light); color: var(--success); display: block; border: 1px solid #bbf7d0; }
.alert-error { background: var(--danger-light); color: var(--danger); display: block; border: 1px solid #fecaca; }
.alert-info { background: var(--accent-light); color: var(--accent); display: block; border: 1px solid #bfdbfe; }

/* ─── Empty State ─── */
.empty-state { text-align: center; padding: var(--space-8) var(--space-4); color: var(--ink-muted); }
.empty-state svg { margin-bottom: var(--space-3); opacity: .4; width: 40px; height: 40px; }
.empty-state p { font-size: var(--text-base); }

/* ─── Loading ─── */
.loading-dots { display: flex; gap: 6px; justify-content: center; padding: var(--space-6); }
.loading-dots span {
  width: clamp(6px, 0.35rem + 0.1vw, 8px);
  height: clamp(6px, 0.35rem + 0.1vw, 8px);
  background: #d4d4d4;
  border-radius: 50%;
  animation: dot-pulse .8s infinite alternate ease-in-out;
}
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dot-pulse {
  from { opacity: .25; transform: scale(1); }
  to { opacity: 1; transform: scale(1.25); }
}

/* ─── Pagination ─── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
}
.page-info { font-size: var(--text-sm); color: var(--ink-muted); padding: 8px 4px; font-variant-numeric: tabular-nums; }

/* ─── Suggestions dropdown ─── */
#search-suggestions {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
#search-suggestions a:last-child { border-bottom: none !important; }

/* ─── Content sections spacing ─── */
.content-section { margin: var(--space-5) 0; }
.content-section:first-of-type { margin-top: var(--space-2); }

/* ─── Stat highlight inline ─── */
.stat-highlight {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 1rem + 2vw, 32px);
  padding: var(--space-3) 0;
  flex-wrap: wrap;
}
.stat-highlight-item { text-align: center; }
.stat-highlight-num { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.04em; color: var(--ink); }
.stat-highlight-label { font-size: var(--text-xs); color: var(--ink-muted); font-weight: 500; }

/* ─── Print styles ─── */
@media print {
  .bottom-nav, .desktop-nav, .footer { display: none !important; }
  body { padding: 0; }
  .main-content { max-width: 100%; padding: 20px; }
  .card { border: 1px solid #ccc; break-inside: avoid; }
  .toast { display: none !important; }
}

/* ─── Page fade-in ─── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.main-content > * {
  animation: fade-up .35s ease both;
}
.main-content > *:nth-child(1) { animation-delay: 0s; }
.main-content > *:nth-child(2) { animation-delay: .04s; }
.main-content > *:nth-child(3) { animation-delay: .08s; }
.main-content > *:nth-child(4) { animation-delay: .12s; }
.main-content > *:nth-child(5) { animation-delay: .16s; }

/* ─── Smooth focus ring ─── */
*:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Better button press ─── */
.btn:not(:disabled):active,
.action-btn:active,
.nav-item:active,
.report-item:active {
  transform: scale(.97);
}

/* ─── Scrollbar styling ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a3a3a3; }

/* ═══════════════════════════════════════════
   TABLET (≥ 640px)
   ═══════════════════════════════════════════ */
@media (min-width: 640px) {
  :root { --content-max: min(88vw, 720px); }

  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .detail-grid { grid-template-columns: repeat(3, 1fr); }
  .report-list.grid-view { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
}

/* ═══════════════════════════════════════════
   TABLET LARGE (≥ 768px) — show desktop nav
   ═══════════════════════════════════════════ */
@media (min-width: 768px) {
  :root { --content-max: min(85vw, 800px); }

  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .desktop-nav { display: block; }
  .footer { display: block; padding-bottom: var(--space-6); }

  .desktop-nav {
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .main-content { padding: var(--space-6) var(--content-pad) var(--space-8); }

  .hero { padding: var(--space-8) 0 var(--space-5); }
  .hero-icon { width: 64px; height: 64px; border-radius: 18px; }
  .hero-icon svg { width: 28px; height: 28px; }

  .stats-row { grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
  .form-row { gap: var(--space-4); }
  .form-card { padding: clamp(20px, 1.5rem + 0.5vw, 32px); }
  .quick-actions { gap: var(--space-3); }
  .report-list.grid-view { grid-template-columns: 1fr 1fr; }

  .search-bar { flex-wrap: nowrap; }
}

/* ═══════════════════════════════════════════
   DESKTOP (≥ 1024px)
   ═══════════════════════════════════════════ */
@media (min-width: 1024px) {
  :root { --content-max: min(80vw, 960px); }

  .main-content { padding: var(--space-8) var(--content-pad) var(--space-10); }

  .report-list.grid-view { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: repeat(4, 1fr); }
  .stats-row { gap: var(--space-4); }

  .hero { padding: var(--space-10) 0 var(--space-6); }

  .desktop-nav-inner { gap: var(--space-5); }
  .nav-links { gap: 4px; }
  .nav-links a {
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
  }

  .quick-search { max-width: 80%; margin-left: auto; margin-right: auto; }
  .quick-actions { max-width: 80%; margin-left: auto; margin-right: auto; }
}

/* ═══════════════════════════════════════════
   DESKTOP WIDE (≥ 1280px)
   ═══════════════════════════════════════════ */
@media (min-width: 1280px) {
  :root { --content-max: min(75vw, 1080px); }

  .report-list.grid-view { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .stats-row { max-width: 80%; margin-left: auto; margin-right: auto; }

  .hero p { max-width: 520px; }
  .quick-search { max-width: 70%; }
  .quick-actions { max-width: 70%; }

  .action-btn { padding: var(--space-5) var(--space-3); min-height: 100px; }
  .action-btn svg { width: 24px; height: 24px; }
  .action-btn span { font-size: var(--text-sm); }

  .desktop-nav-inner { gap: var(--space-6); }
}

/* ═══════════════════════════════════════════
   ULTRAWIDE (≥ 1536px)
   ═══════════════════════════════════════════ */
@media (min-width: 1536px) {
  :root { --content-max: min(70vw, 1200px); }

  .report-list.grid-view { grid-template-columns: repeat(3, 1fr); }
  .stats-row { max-width: 70%; }
  .quick-search { max-width: 60%; }
  .quick-actions { max-width: 60%; }

  .desktop-nav-inner { padding: 0 calc((100vw - var(--content-max)) / 2 + 16px); }
}

/* ═══════════════════════════════════════════
   VERY SMALL SCREENS (< 375px)
   ═══════════════════════════════════════════ */
@media (max-width: 374px) {
  .form-row { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .action-btn { padding: 12px 6px; min-height: 72px; font-size: 10px; }
  .action-btn svg { width: 18px; height: 18px; }
  .stats-row { gap: 6px; }
  .stat-card { padding: 12px 8px; }
  .stat-number { font-size: 24px; }
  .detail-grid { grid-template-columns: 1fr; }
  .search-bar { flex-direction: column; }
  .search-bar select { width: 100%; }
  .sort-bar { gap: 6px; }
  .sort-btn { font-size: 12px; padding: 5px 10px; }
  .nav-item { font-size: 9px; }
  .nav-item svg { width: 18px; height: 18px; }
  .badge { font-size: 10px; padding: 2px 6px; }
  .main-content { padding-left: 12px; padding-right: 12px; }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .main-content > * { animation: none !important; }
}
