/* ============================================================
   TaxSnap – styles.css
   Dark navy/teal theme, mobile-first
   ============================================================ */

/* ----------------------------------------------------------
   0. Custom properties
   ---------------------------------------------------------- */
:root {
  --navy:       #0f172a;
  --navy-mid:   #162032;
  --card:       #1e293b;
  --card-hover: #263348;
  --teal:       #0d9488;
  --teal-light: #14b8a6;
  --teal-dim:   #0d948820;
  --text:       #f8fafc;
  --muted:      #94a3b8;
  --border:     #334155;
  --success:    #22c55e;
  --warning:    #f59e0b;
  --danger:     #ef4444;
  --info:       #3b82f6;

  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  20px;

  --shadow:     0 4px 24px rgba(0,0,0,.4);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.3);

  --font:       'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  --header-h:   60px;
  --nav-h:      64px;
}

/* ----------------------------------------------------------
   1. Reset & base
   ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--navy);
}

img { display: block; max-width: 100%; }

button { cursor: pointer; font-family: inherit; border: none; background: none; }

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  width: 100%;
  outline: none;
  transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); }

a { color: var(--teal-light); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 600; }
h3 { font-size: 1rem;   font-weight: 600; }

p { line-height: 1.6; color: var(--muted); }

/* ----------------------------------------------------------
   2. Layout scaffolding
   ---------------------------------------------------------- */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-top: var(--header-h);
  padding-bottom: var(--nav-h);
}

/* ----------------------------------------------------------
   3. Header
   ---------------------------------------------------------- */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--navy-mid);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--teal);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.logo span { color: var(--teal-light); }

.header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.usage-badge {
  font-size: .75rem;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .2rem .6rem;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.usage-badge.warning { border-color: var(--warning); color: var(--warning); }
.usage-badge.danger  { border-color: var(--danger);  color: var(--danger);  }

/* ----------------------------------------------------------
   4. Bottom navigation (mobile) / Top tabs (desktop)
   ---------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--navy-mid);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  font-size: .7rem;
  color: var(--muted);
  padding: .4rem 0;
  transition: color .2s;
  border: none;
  background: none;
}
.nav-item svg { width: 22px; height: 22px; stroke-width: 1.8; }
.nav-item.active { color: var(--teal-light); }
.nav-item.active svg { stroke: var(--teal-light); }
.nav-item:hover { color: var(--text); }

/* Scan button in nav - highlighted */
.nav-item.scan-btn {
  color: var(--text);
}
.nav-item.scan-btn .nav-icon-wrap {
  background: var(--teal);
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -14px;
  box-shadow: 0 4px 16px rgba(13,148,136,.5);
}
.nav-item.scan-btn.active .nav-icon-wrap { background: var(--teal-light); }

/* ----------------------------------------------------------
   5. Tab panels
   ---------------------------------------------------------- */
.tab-panel {
  display: none;
  padding: 1rem;
  animation: fadeIn .2s ease;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}
.tab-panel.active { display: block; }

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

/* ----------------------------------------------------------
   6. Scan tab
   ---------------------------------------------------------- */
.scan-area {
  background: var(--card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1rem;
  text-align: center;
  transition: border-color .2s, background .2s;
  cursor: pointer;
  position: relative;
}
.scan-area.drag-over {
  border-color: var(--teal);
  background: var(--teal-dim);
}
.scan-area-icon {
  width: 56px; height: 56px;
  background: var(--teal-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--teal-light);
}
.scan-area-icon svg { width: 28px; height: 28px; }
.scan-area h3 { margin-bottom: .4rem; }
.scan-area p  { font-size: .85rem; }

.scan-buttons {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.scan-buttons button { flex: 1; min-width: 120px; }

/* Camera preview */
.camera-container {
  display: none;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin-bottom: 1rem;
}
.camera-container.active { display: block; }
#cameraVideo {
  width: 100%;
  display: block;
  max-height: 360px;
  object-fit: cover;
}
.camera-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.camera-frame {
  width: 80%;
  aspect-ratio: 3/2;
  border: 2px solid rgba(20,184,166,.7);
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.4);
}
.camera-controls {
  display: none;
  gap: .75rem;
  margin-top: .75rem;
}
.camera-controls.active { display: flex; justify-content: center; }

/* Queue */
.batch-queue {
  margin-top: 1.25rem;
}
.batch-queue h3 { margin-bottom: .5rem; font-size: .9rem; color: var(--muted); }
.queue-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: .6rem .75rem;
  margin-bottom: .4rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .85rem;
}
.queue-item-thumb {
  width: 40px; height: 40px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--navy);
  flex-shrink: 0;
}
.queue-item-name { flex: 1; truncate: ellipsis; white-space: nowrap; overflow: hidden; }
.queue-item-status {
  font-size: .75rem;
  padding: .2rem .5rem;
  border-radius: 20px;
  flex-shrink: 0;
}
.status-pending  { background: rgba(148,163,184,.15); color: var(--muted); }
.status-scanning { background: rgba(59,130,246,.15);  color: var(--info); }
.status-done     { background: rgba(34,197,94,.15);   color: var(--success); }
.status-error    { background: rgba(239,68,68,.15);   color: var(--danger); }

/* ----------------------------------------------------------
   7. Cards
   ---------------------------------------------------------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
  transition: background .2s, border-color .2s;
}
.card:hover { background: var(--card-hover); border-color: var(--teal); }

.receipt-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .6rem;
  cursor: pointer;
}
.receipt-thumb {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: var(--navy);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.3rem;
}
.receipt-info { flex: 1; min-width: 0; }
.receipt-merchant { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.receipt-meta { font-size: .75rem; color: var(--muted); margin-top: .1rem; }
.receipt-amount {
  text-align: right;
  flex-shrink: 0;
}
.receipt-amount .amount { font-weight: 700; font-size: 1rem; color: var(--text); }
.receipt-amount .vat   { font-size: .7rem; color: var(--muted); }

/* Category badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .5rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-cost_of_goods   { background: rgba(139,92,246,.2); color: #a78bfa; }
.badge-car_travel      { background: rgba(59,130,246,.2); color: #60a5fa; }
.badge-wages           { background: rgba(249,115,22,.2); color: #fb923c; }
.badge-rent_rates      { background: rgba(236,72,153,.2); color: #f472b6; }
.badge-repairs         { background: rgba(234,179,8,.2);  color: #fbbf24; }
.badge-phone_internet  { background: rgba(20,184,166,.2); color: #2dd4bf; }
.badge-office_costs    { background: rgba(99,102,241,.2); color: #818cf8; }
.badge-advertising     { background: rgba(239,68,68,.2);  color: #f87171; }
.badge-professional_fees { background: rgba(16,185,129,.2); color: #34d399; }
.badge-bank_interest   { background: rgba(107,114,128,.2); color: #9ca3af; }
.badge-entertainment   { background: rgba(239,68,68,.2);  color: #f87171; }
.badge-other           { background: rgba(148,163,184,.2); color: #94a3b8; }

/* Disallowed flag */
.disallowed-tag {
  font-size: .65rem;
  color: var(--danger);
  margin-left: .25rem;
}

/* ----------------------------------------------------------
   8. Dashboard
   ---------------------------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem;
  text-align: center;
}
.stat-label { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 1.4rem; font-weight: 700; margin-top: .25rem; }
.stat-value.teal  { color: var(--teal-light); }
.stat-value.green { color: var(--success); }
.stat-value.amber { color: var(--warning); }

/* Category breakdown bars */
.category-list { margin-bottom: 1rem; }
.category-row { margin-bottom: .75rem; }
.category-row-header {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  margin-bottom: .3rem;
}
.category-row-label { color: var(--text); }
.category-row-amount { color: var(--muted); font-family: var(--font-mono); }

.progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--teal);
  transition: width .6s ease;
}

/* Tax set-aside dial */
.tax-dial-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}
.tax-dial {
  position: relative;
  width: 160px;
  height: 90px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.tax-dial-track {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--border) 0deg, var(--border) 180deg, transparent 180deg);
  position: absolute;
  top: 0; left: 0;
}
.tax-dial-fill {
  width: 160px; height: 160px;
  border-radius: 50%;
  position: absolute;
  top: 0; left: 0;
  background: conic-gradient(var(--teal) 0deg, var(--teal) var(--dial-deg, 0deg), transparent var(--dial-deg, 0deg), transparent 180deg, transparent 180deg);
  transition: --dial-deg .6s ease;
}
.tax-dial-center {
  position: absolute;
  width: 100px; height: 100px;
  background: var(--card);
  border-radius: 50%;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 8px;
}
.tax-dial-pct  { font-size: 1.2rem; font-weight: 700; color: var(--teal-light); }
.tax-dial-sub  { font-size: .6rem; color: var(--muted); }

.income-input-row {
  display: flex;
  gap: .5rem;
  align-items: flex-end;
  margin-top: .5rem;
  width: 100%;
}
.income-input-row label { font-size: .75rem; color: var(--muted); display: block; margin-bottom: .3rem; }
.income-input-row input { max-width: 140px; }

.tax-breakdown {
  font-size: .8rem;
  width: 100%;
  margin-top: .75rem;
}
.tax-breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: .3rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.tax-breakdown-row:last-child { border-bottom: none; font-weight: 600; color: var(--text); }

/* ----------------------------------------------------------
   9. Export tab
   ---------------------------------------------------------- */
.export-options { display: flex; flex-direction: column; gap: .75rem; }

.date-range-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.date-range-row label { font-size: .75rem; color: var(--muted); display: block; margin-bottom: .25rem; }

.export-summary {
  background: var(--teal-dim);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  font-size: .85rem;
}
.export-summary strong { color: var(--teal-light); }

/* ----------------------------------------------------------
   10. Buttons
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  transition: all .2s;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--teal);
  color: white;
}
.btn-primary:hover { background: var(--teal-light); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--teal); color: var(--teal-light); }

.btn-danger {
  background: rgba(239,68,68,.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,.3);
}
.btn-danger:hover { background: var(--danger); color: white; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover { color: var(--text); }

.btn-sm { padding: .35rem .7rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.5rem; font-size: 1rem; }
.btn-full { width: 100%; }

.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ----------------------------------------------------------
   11. Progress bar (usage limit)
   ---------------------------------------------------------- */
.usage-bar-wrap {
  margin-bottom: 1rem;
}
.usage-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: .3rem;
}
.usage-bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.usage-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--teal);
  transition: width .4s ease, background .3s;
}
.usage-bar-fill.near-limit { background: var(--warning); }
.usage-bar-fill.at-limit   { background: var(--danger);  }

/* ----------------------------------------------------------
   12. Modals
   ---------------------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }

/* Mobile: bottom sheet; desktop: centered */
.modal {
  background: var(--card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.25rem;
  width: 100%;
  max-height: 92dvh;
  overflow-y: auto;
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.modal-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: -0.5rem auto .75rem;
}

.modal-section { margin-bottom: 1rem; }
.modal-section label {
  display: block;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: .3rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-bottom: .75rem;
}
.form-group { margin-bottom: .75rem; }

[hidden] { display: none !important; }

.account-modal { max-width: 440px; }
.account-help,
.account-status {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.5;
}
.account-help { margin-bottom: 1rem; }
.account-status { margin-top: .75rem; }
.account-status.error { color: var(--danger); }
.account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}

@media (max-width: 520px) {
  .header-actions { gap: .3rem; }
  .header-actions .usage-badge { display: none; }
  .account-actions { grid-template-columns: 1fr; }
}

.ocr-confidence {
  font-size: .75rem;
  color: var(--muted);
  margin-top: .5rem;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.confidence-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.confidence-high   { background: var(--success); }
.confidence-medium { background: var(--warning); }
.confidence-low    { background: var(--danger);  }

/* ----------------------------------------------------------
   13. Upgrade modal / pricing cards
   ---------------------------------------------------------- */
.upgrade-modal .modal {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.pricing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin: 1rem 0;
}
.pricing-card {
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  position: relative;
}
.pricing-card.recommended {
  border-color: var(--teal);
  background: var(--teal-dim);
}
.pricing-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal);
  color: white;
  font-size: .65rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}
.pricing-name  { font-size: .8rem; color: var(--muted); margin-bottom: .3rem; }
.pricing-price { font-size: 1.6rem; font-weight: 800; margin-bottom: .1rem; }
.pricing-period { font-size: .7rem; color: var(--muted); margin-bottom: .75rem; }
.pricing-features { text-align: left; font-size: .75rem; list-style: none; }
.pricing-features li { padding: .2rem 0; color: var(--muted); display: flex; gap: .3rem; }
.pricing-features li::before { content: '✓'; color: var(--teal-light); flex-shrink: 0; }

/* ----------------------------------------------------------
   14. Toast notifications
   ---------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  pointer-events: none;
}
.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem 1rem;
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  box-shadow: var(--shadow);
  animation: toastIn .25s ease, toastOut .25s ease 2.5s forwards;
  pointer-events: all;
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
}
.toast-success { border-color: var(--success); color: var(--success); }
.toast-error   { border-color: var(--danger);  color: var(--danger);  }
.toast-info    { border-color: var(--info);    color: var(--info);    }
.toast-warning { border-color: var(--warning); color: var(--warning); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateY(10px); }
}

/* ----------------------------------------------------------
   15. Loading spinner
   ---------------------------------------------------------- */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
.spinner-sm {
  width: 16px; height: 16px;
  border-width: 2px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.8);
  z-index: 400;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  backdrop-filter: blur(4px);
}
.loading-overlay.active { display: flex; }
.loading-text { color: var(--muted); font-size: .9rem; }

/* ----------------------------------------------------------
   16. Section titles & dividers
   ---------------------------------------------------------- */
.section-title {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .6rem;
  margin-top: 1.25rem;
}
.section-title:first-child { margin-top: 0; }

.divider {
  height: 1px;
  background: var(--border);
  margin: .75rem 0;
}

/* ----------------------------------------------------------
   17. Empty states
   ---------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: .75rem;
  opacity: .4;
}
.empty-state h3 { color: var(--text); margin-bottom: .5rem; }

/* ----------------------------------------------------------
   18. Filter bar (receipts)
   ---------------------------------------------------------- */
.filter-bar {
  display: flex;
  gap: .5rem;
  margin-bottom: .75rem;
  overflow-x: auto;
  padding-bottom: .2rem;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .7rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
  transition: all .2s;
  flex-shrink: 0;
}
.filter-chip.active {
  background: var(--teal-dim);
  border-color: var(--teal);
  color: var(--teal-light);
}

/* ----------------------------------------------------------
   19. OCR progress
   ---------------------------------------------------------- */
.ocr-progress {
  margin-top: .5rem;
}
.ocr-progress-label {
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: .25rem;
  display: flex;
  justify-content: space-between;
}
.ocr-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.ocr-progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  transition: width .2s;
}

/* ----------------------------------------------------------
   20. Desktop overrides
   ---------------------------------------------------------- */
@media (min-width: 640px) {
  :root { --nav-h: 0px; }

  #app {
    padding-bottom: 0;
    padding-top: calc(var(--header-h) + 56px); /* header + tab bar */
  }

  .bottom-nav {
    top: var(--header-h);
    bottom: auto;
    height: 48px;
    border-top: none;
    border-bottom: 1px solid var(--border);
    background: var(--navy-mid);
  }

  .nav-item {
    flex-direction: row;
    gap: .4rem;
    font-size: .85rem;
  }
  .nav-item.scan-btn .nav-icon-wrap {
    width: 28px; height: 28px;
    margin-top: 0;
    border-radius: 6px;
  }

  .tab-panel { padding: 1.5rem; }

  .modal-overlay { align-items: center; }
  .modal {
    border-radius: var(--radius-lg);
    max-width: 560px;
    max-height: 85dvh;
  }

  .pricing-cards { grid-template-columns: 1fr 1fr; }
}
