/* -----------------------------------------------------------------------------
   FNF Inbox — light + professional theme
   ----------------------------------------------------------------------------- */

:root {
  /* Surfaces */
  --bg:            #f7f8fa;
  --surface:       #ffffff;
  --surface-alt:   #fafbfc;
  --surface-sunk:  #f3f4f6;

  /* Text */
  --text:          #111827;
  --text-muted:    #4b5563;
  --text-dim:      #6b7280;
  --text-faint:    #9ca3af;

  /* Borders */
  --border:        #e5e7eb;
  --border-strong: #d1d5db;

  /* Brand */
  --brand:         #7c3aed;   /* FNF purple */
  --brand-hover:   #6d28d9;
  --brand-soft:    #f5f3ff;
  --brand-softer:  #ede9fe;

  /* Semantic */
  --ok:            #059669;
  --ok-soft:       #ecfdf5;
  --warn:          #d97706;
  --warn-soft:     #fffbeb;
  --danger:        #dc2626;
  --danger-soft:   #fef2f2;
  --info:          #0284c7;
  --info-soft:     #f0f9ff;

  /* Motion / geometry */
  --radius-sm:     6px;
  --radius:        8px;
  --radius-lg:     12px;
  --radius-xl:     16px;
  --shadow-sm:     0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow:        0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg:     0 10px 25px -5px rgba(16, 24, 40, 0.08), 0 8px 10px -6px rgba(16, 24, 40, 0.04);

  /* Layout */
  --sidebar-w:     260px;
  --topbar-h:      60px;

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01';
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* -----------------------------------------------------------------------------
   Auth gate (shown until Firebase Auth resolves)
   ----------------------------------------------------------------------------- */

.auth-gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 90%, rgba(124, 58, 237, 0.06) 0%, transparent 45%),
    var(--bg);
  z-index: 300;
  padding: 24px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 44px 36px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 40px -12px rgba(16, 24, 40, 0.12);
}
.auth-logo {
  height: 32px;
  width: auto;
  margin-bottom: 20px;
}
.auth-sub {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 28px;
}
.auth-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.auth-hint {
  font-size: 11px;
  color: var(--text-faint);
  max-width: 260px;
  line-height: 1.5;
}
.btn-lg {
  padding: 10px 20px;
  font-size: 14px;
  min-width: 220px;
}

/* -----------------------------------------------------------------------------
   Shell
   ----------------------------------------------------------------------------- */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 12px 12px;
  gap: 8px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.brand-logo {
  height: 22px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.brand-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}
.brand-text { line-height: 1.15; }
.brand-name { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; color: var(--text); }
.brand-tag { font-size: 11px; color: var(--text-faint); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: background 120ms, color 120ms;
  user-select: none;
}
.nav-item:hover { background: var(--surface-sunk); color: var(--text); }
.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand);
}
.nav-item.active .nav-icon { filter: none; }
.nav-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  filter: grayscale(0.15);
}
.nav-label { flex: 1; }
.nav-badge {
  font-size: 11px;
  color: var(--text-faint);
  background: var(--surface-sunk);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}
.nav-item.active .nav-badge {
  color: var(--brand);
  background: white;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sync-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.sync-dot {
  width: 8px; height: 8px;
  background: var(--ok);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--ok-soft);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.sync-title { font-size: 12px; font-weight: 600; color: var(--text); }
.sync-sub { font-size: 11px; color: var(--text-faint); }

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.user-menu:hover { background: var(--surface-sunk); }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 13px;
}
.user-meta { line-height: 1.2; flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; }
.user-email { font-size: 11px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Main + topbar */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.topbar {
  height: var(--topbar-h);
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: baseline; gap: 12px; }
.page-title { font-size: 18px; font-weight: 600; }
.page-sub { font-size: 13px; color: var(--text-faint); }

.topbar-right { display: flex; align-items: center; gap: 8px; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-sunk);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 10px;
  width: 340px;
  transition: border-color 120ms, background 120ms;
}
.search:focus-within { background: white; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
}
.search-icon { font-size: 13px; opacity: 0.5; }
.kbd {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
}

/* Views */
.views { flex: 1; overflow: hidden; min-height: 0; position: relative; }
.view { position: absolute; inset: 0; overflow: auto; }

/* -----------------------------------------------------------------------------
   Buttons
   ----------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms, border-color 120ms, transform 60ms;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-sunk); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  box-shadow: 0 1px 2px rgba(124, 58, 237, 0.2);
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }

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

.btn-icon { padding: 6px 8px; }
.btn-sm { padding: 4px 8px; font-size: 12px; }
.btn-danger {
  color: var(--danger);
  border-color: var(--border);
}
.btn-danger:hover { background: var(--danger-soft); border-color: #fecaca; }

.btn-group { display: inline-flex; gap: 6px; }

/* -----------------------------------------------------------------------------
   Common shared
   ----------------------------------------------------------------------------- */

.filter-bar {
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select, .input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  color: var(--text);
  font-size: 13px;
  outline: none;
  min-width: 140px;
}
.select:focus, .input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-sunk);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--surface-sunk);
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 500;
}

.muted { color: var(--text-faint); }
.hidden, [hidden] { display: none !important; }

.empty {
  padding: 60px 40px;
  text-align: center;
  color: var(--text-faint);
}
.empty-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.4; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.empty-body { font-size: 13px; max-width: 400px; margin: 0 auto; }

/* -----------------------------------------------------------------------------
   Inbox view
   ----------------------------------------------------------------------------- */

.inbox-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  height: 100%;
  min-height: 0;
}

.mail-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: var(--surface);
}
.mail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 100ms;
}
.mail-item:hover { background: var(--surface-alt); }
.mail-item.active { background: var(--brand-soft); border-left: 3px solid var(--brand); padding-left: 13px; }
.mail-item.unread .mail-subject { font-weight: 600; color: var(--text); }
.mail-item.unread .mail-from { color: var(--text); }
.mail-row { display: flex; align-items: baseline; gap: 8px; }
.mail-from { font-size: 13px; font-weight: 500; color: var(--text-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-time { font-size: 11px; color: var(--text-faint); flex-shrink: 0; }
.mail-subject { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-snippet { font-size: 12px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-tags { display: flex; gap: 4px; margin-top: 4px; }
.mail-account-badge {
  font-size: 10px;
  color: var(--text-dim);
  background: var(--surface-sunk);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--mono);
}
.mail-fired { color: var(--brand); background: var(--brand-soft); }

.mail-detail {
  overflow-y: auto;
  background: var(--surface-alt);
  padding: 0;
  display: flex;
  flex-direction: column;
}
.mail-detail-head {
  padding: 20px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mail-detail-subject { font-size: 20px; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.01em; }
.mail-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.mail-meta-label { color: var(--text-faint); min-width: 55px; font-size: 12px; }
.mail-actions {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}
.mail-body {
  padding: 24px 28px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  flex: 1;
  overflow-y: auto;
}
.mail-body p { margin: 0 0 12px; }
.mail-body a { color: var(--brand); text-decoration: underline; }

/* -----------------------------------------------------------------------------
   Accounts view
   ----------------------------------------------------------------------------- */

.page-body { padding: 20px 24px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); font-weight: 600; }
.stat-value { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; }
.stat-delta { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.stat-delta.ok { color: var(--ok); }
.stat-delta.warn { color: var(--warn); }

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-alt); }
.table .col-tight { width: 1%; white-space: nowrap; }

.email-cell { display: flex; align-items: center; gap: 10px; }
.email-avatar {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--surface-sunk);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  flex-shrink: 0;
}
.email-avatar.outlook { background: #dbeafe; color: #1e40af; }
.email-avatar.gmail   { background: #fee2e2; color: #991b1b; }
.email-avatar.icloud  { background: #f3e8ff; color: #7e22ce; }
.email-avatar.imap    { background: #dcfce7; color: #166534; }
.email-info { line-height: 1.3; min-width: 0; }
.email-name { font-weight: 500; color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.email-note { font-size: 11px; color: var(--text-faint); }

/* -----------------------------------------------------------------------------
   Scrapers view
   ----------------------------------------------------------------------------- */

.scraper-cat {
  margin-bottom: 24px;
}
.scraper-cat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.scraper-cat-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.scraper-cat-count {
  font-size: 11px;
  color: var(--text-faint);
  background: var(--surface-sunk);
  padding: 1px 8px;
  border-radius: 999px;
}

.scraper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.scraper-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 120ms, box-shadow 120ms, transform 120ms;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scraper-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.scraper-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.scraper-name { font-weight: 600; font-size: 14px; color: var(--text); }
.scraper-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.scraper-filters {
  font-size: 12px;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.scraper-filters code {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--surface-sunk);
  padding: 1px 4px;
  border-radius: 3px;
}
.scraper-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-faint);
}
.scraper-card-foot-l { display: flex; gap: 10px; }
.scraper-elements {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* -----------------------------------------------------------------------------
   Webhook log
   ----------------------------------------------------------------------------- */

.status-code {
  font-family: var(--mono);
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}
.status-code.s2 { background: var(--ok-soft); color: var(--ok); }
.status-code.s4, .status-code.s5 { background: var(--danger-soft); color: var(--danger); }
.status-code.s3 { background: var(--info-soft); color: var(--info); }

/* -----------------------------------------------------------------------------
   Settings
   ----------------------------------------------------------------------------- */

.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 24px; max-width: 900px; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav-item {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.settings-nav-item:hover { background: var(--surface-sunk); }
.settings-nav-item.active { background: var(--brand-soft); color: var(--brand); }

.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.settings-section h3 { font-size: 15px; margin-bottom: 4px; }
.settings-section p.desc { font-size: 12px; color: var(--text-faint); margin: 0 0 16px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.field label { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.field .help { font-size: 11px; color: var(--text-faint); }
.field input, .field textarea, .field select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  font-size: 13px;
  outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.switch input { display: none; }
.switch-track {
  width: 34px; height: 20px;
  background: var(--border-strong);
  border-radius: 999px;
  position: relative;
  transition: background 150ms;
}
.switch-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: transform 150ms;
}
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(14px); }

/* -----------------------------------------------------------------------------
   Modal
   ----------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h2 { font-size: 15px; font-weight: 600; }
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--surface-alt);
}

/* Editor field groups inside modal */
.editor-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--surface-alt);
}
.editor-section h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-row, .element-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 8px;
  padding: 6px 0;
}
.element-row { grid-template-columns: 140px 100px 1fr auto; }
.small-input {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  background: white;
  outline: none;
  font-family: var(--mono);
}
.small-input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }

/* -----------------------------------------------------------------------------
   Toasts
   ----------------------------------------------------------------------------- */

.toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  z-index: 200;
}
.toast {
  background: var(--text);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 200ms ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -----------------------------------------------------------------------------
   Small helpers
   ----------------------------------------------------------------------------- */

.spacer { flex: 1; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
