/* ============================================================
 * Smile Solutions CRM v1 — Design Tokens
 * Ported from playbooks/proposal-pricing-playbook.html + v1/index.html
 * Single source of truth for colors, type, spacing, motion.
 * ============================================================ */

:root {
  /* Brand palette — Smile Solutions */
  --lime:        #65920A;
  --lime-bright: #97C811;
  --lime-deep:   #7BA80C;
  --lime-dark:   #4D7000;
  --lime-tint:   #ECFDF5;

  /* Ink scale */
  --ink:        #0A0A0A;
  --ink-2:      #1F1F1A;
  --muted:      #6B6B62;

  /* Surface */
  --canvas:        #FAFAF7;
  --card:          #FFFFFF;
  --card-alt:      #F2F2EC;
  --paper:         #F5F5F0;
  --hairline:      #E5E3D9;
  --hairline-bold: #C9C7BD;

  /* Semantic — callouts */
  --tip-bg: #ECFDF5;   --tip-fg: #065F46;   --tip-border: #10B981;
  --warn-bg: #FFFBEB;  --warn-fg: #92400E;  --warn-border: #F59E0B;
  --info-bg: #F0F9FF;  --info-fg: #075985;  --info-border: #0EA5E9;
  --danger-bg: #FFF1F2; --danger-fg: #9F1239; --danger-border: #F43F5E;

  /* Type */
  --font-serif: 'Lora', Georgia, serif;
  --font-display: 'Instrument Serif', 'Lora', Georgia, serif;
  --font-sans:  'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --t-fast: 150ms;
  --t-base: 240ms;
  --t-slow: 360ms;

  /* Elevation */
  --shadow-1: 0 1px 2px rgba(10,10,10,0.05);
  --shadow-2: 0 4px 12px rgba(10,10,10,0.08);
  --shadow-3: 0 12px 32px rgba(10,10,10,0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); line-height: 1.1; }
h3 { font-size: 1.25rem; line-height: 1.2; }

a { color: var(--lime-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
 * SHARED COMPONENTS
 * ============================================================ */

/* App shell */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.app-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.app-header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 12px 20px;
  display: flex; align-items: center; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600; color: var(--ink);
}
.brand-dot {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--lime-bright);
  display: inline-grid; place-items: center;
  color: white; font-weight: 700; font-size: 13px;
}
.role-pill {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--card-alt);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.role-pill:hover { background: var(--hairline); }

/* Side nav (desktop) + bottom nav (mobile) */
.app-body { display: grid; grid-template-columns: 220px 1fr; max-width: 1280px; margin: 0 auto; width: 100%; flex: 1; }
.side-nav { padding: 16px 12px; border-right: 1px solid var(--hairline); position: sticky; top: 64px; align-self: flex-start; height: calc(100vh - 64px); overflow-y: auto; }
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--ink-2);
}
.side-nav a:hover { background: var(--card-alt); text-decoration: none; }
.side-nav a.active { background: var(--lime-tint); color: var(--lime-dark); font-weight: 600; }
.side-nav .nav-emoji { font-size: 18px; }
.side-nav-section { margin-top: 18px; padding: 0 12px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); }

.app-main { padding: 24px 20px 96px; min-width: 0; }

@media (max-width: 900px) {
  .app-body { grid-template-columns: 1fr; }
  .side-nav { display: none; }
  .app-main { padding: 16px 16px 80px; }
}

/* Bottom nav for mobile */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid var(--hairline);
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-inner { display: grid; grid-template-columns: repeat(5, 1fr); }
.bottom-nav a {
  padding: 10px 4px; text-align: center;
  font-size: 10.5px; font-weight: 600;
  color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.bottom-nav a.active { color: var(--lime-dark); }
.bottom-nav .nav-emoji { font-size: 20px; }

@media (max-width: 900px) {
  .bottom-nav { display: block; }
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px;
}
.card-tight { padding: 12px; }
.card-flush { padding: 0; overflow: hidden; }
.card-hover { transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.card-hover:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }

/* Stat tile */
.stat-tile {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px;
}
.stat-num {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1;
  color: var(--ink-2); letter-spacing: -0.02em;
}
.stat-num .pct { color: var(--lime); }
.stat-label {
  margin-top: 8px;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted);
}
.stat-delta { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 600; }
.stat-delta.up { color: var(--lime-dark); }
.stat-delta.down { color: var(--danger-fg); }

/* Pills / chips */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--hairline);
  background: white; color: var(--ink-2);
  white-space: nowrap;
}
.pill.lime { background: var(--lime-tint); color: var(--lime-dark); border-color: rgba(101,146,10,0.25); }
.pill.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: rgba(245,158,11,0.3); }
.pill.danger { background: var(--danger-bg); color: var(--danger-fg); border-color: rgba(244,63,94,0.3); }
.pill.info { background: var(--info-bg); color: var(--info-fg); border-color: rgba(14,165,233,0.3); }
.pill.muted { background: var(--card-alt); color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--lime); color: white; }
.btn-primary:hover { background: var(--lime-dark); }
.btn-secondary { background: var(--card); color: var(--ink-2); border-color: var(--hairline-bold); }
.btn-secondary:hover { background: var(--card-alt); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--card-alt); }
.btn-danger { background: var(--danger-fg); color: white; }
.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }

/* Form controls */
.input, .textarea, .select {
  display: block; width: 100%;
  padding: 10px 12px;
  font-family: inherit; font-size: 14px;
  background: white; border: 1px solid var(--hairline-bold); border-radius: 8px;
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(101,146,10,0.12);
}
.label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 6px; }

/* Callouts */
.callout { border-left: 3px solid; padding: 14px 18px; margin: 18px 0; border-radius: 0 10px 10px 0; }
.callout-tip { background: var(--tip-bg); color: var(--tip-fg); border-color: var(--tip-border); }
.callout-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-border); }
.callout-info { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-border); }
.callout-danger { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-border); }
.callout-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; font-weight: 700; margin-bottom: 4px; opacity: 0.85; }

/* Tables */
.crm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.crm-table th { text-align: left; padding: 10px 12px; background: var(--card-alt); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-2); border-bottom: 2px solid var(--hairline-bold); }
.crm-table td { padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; line-height: 1.5; }
.crm-table tr:hover td { background: var(--canvas); }

/* Avatar circle (initials) */
.avatar {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--lime-tint);
  color: var(--lime-dark);
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: white;
  padding: 12px 18px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-3);
  z-index: 100;
  transition: transform var(--t-base) var(--ease);
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--lime-dark); }
.toast.danger { background: var(--danger-fg); }
@media (max-width: 900px) {
  .toast { bottom: 80px; }
}

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,10,10,0.55);
  z-index: 80;
  display: none;
  align-items: center; justify-content: center;
  padding: 16px;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
  max-width: 480px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-3);
  animation: modalIn var(--t-base) var(--ease);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-title { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; margin: 0; }
.modal-close { background: transparent; border: 0; cursor: pointer; padding: 4px; color: var(--muted); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

/* Lightbox */
.lightbox-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,10,10,0.92);
  z-index: 90;
  display: none;
  align-items: center; justify-content: center;
}
.lightbox-backdrop.show { display: flex; }
.lightbox-img { max-width: 95vw; max-height: 90vh; border-radius: 8px; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 0; color: white;
  font-size: 24px; cursor: pointer;
  display: grid; place-items: center;
}
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }
.lightbox-close { position: absolute; top: 16px; right: 16px; background: transparent; border: 0; color: white; font-size: 28px; cursor: pointer; padding: 8px; }
.lightbox-counter { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: white; font-size: 13px; font-weight: 600; background: rgba(0,0,0,0.4); padding: 6px 12px; border-radius: 999px; }
.lightbox-label { position: absolute; bottom: 56px; left: 50%; transform: translateX(-50%); color: white; font-size: 14px; max-width: 90vw; text-align: center; opacity: 0.9; }

/* Photo grid */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-tile {
  position: relative; aspect-ratio: 1/1;
  border-radius: 10px; overflow: hidden;
  cursor: pointer; background: var(--card-alt);
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--t-base) var(--ease); }
.photo-tile:hover img { transform: scale(1.04); }
.photo-tile-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white; padding: 16px 10px 8px;
  font-size: 11.5px; font-weight: 600;
}

/* Before/After slider */
.ba-slider {
  position: relative; width: 100%; aspect-ratio: 4/3;
  border-radius: 12px; overflow: hidden; cursor: ew-resize;
  user-select: none; touch-action: none;
  background: var(--ink);
}
.ba-slider .ba-after,
.ba-slider .ba-before { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-slider .ba-before { clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0); transition: none; }
.ba-slider .ba-handle {
  position: absolute; top: 0; bottom: 0; width: 3px;
  background: white; box-shadow: 0 0 12px rgba(0,0,0,0.4);
  left: var(--split, 50%); transform: translateX(-50%);
  pointer-events: none;
}
.ba-slider .ba-handle::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 36px; height: 36px;
  background: white; border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.ba-slider .ba-handle::before {
  content: '⇆'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  color: var(--ink); font-size: 14px; font-weight: 700;
}
.ba-slider .ba-label {
  position: absolute; top: 12px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  background: rgba(0,0,0,0.6); color: white;
  padding: 5px 10px; border-radius: 999px;
}
.ba-slider .ba-label.before { left: 12px; }
.ba-slider .ba-label.after  { right: 12px; }

/* Photo timeline (horizontal strip) */
.timeline-strip {
  display: flex; gap: 12px;
  overflow-x: auto; overflow-y: hidden;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.timeline-card {
  flex: 0 0 160px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.timeline-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.timeline-card img { width: 100%; height: 120px; object-fit: cover; display: block; }
.timeline-card .tc-meta { padding: 8px 10px; font-size: 11.5px; }
.timeline-card .tc-month { font-weight: 700; color: var(--ink-2); }
.timeline-card .tc-tag { color: var(--muted); margin-top: 2px; }
.timeline-card.before { border-color: var(--lime); }
.timeline-card.before .tc-month { color: var(--lime-dark); }
.timeline-card.now { border-color: var(--lime-bright); box-shadow: 0 0 0 2px rgba(151,200,17,0.2); }

/* Visit log card */
.visit-card {
  display: flex; gap: 14px;
  padding: 14px; margin-bottom: 10px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}
.visit-card .vc-bullet {
  flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--lime-bright); margin-top: 6px;
}
.visit-card .vc-body { flex: 1; min-width: 0; }
.visit-card .vc-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.visit-card .vc-date { font-weight: 700; color: var(--ink-2); font-size: 13.5px; }
.visit-card .vc-type { color: var(--lime-dark); font-size: 12px; font-weight: 600; }
.visit-card .vc-notes { color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.visit-card .vc-footer { margin-top: 6px; display: flex; gap: 10px; font-size: 11.5px; color: var(--muted); }

/* Treatment plan stages */
.stage-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px; border-radius: 10px;
  border: 1px solid var(--hairline);
  margin-bottom: 8px;
  background: var(--card);
  cursor: pointer; user-select: none;
}
.stage-card.done { background: var(--lime-tint); border-color: rgba(101,146,10,0.25); }
.stage-card.done .stage-title { text-decoration: line-through; color: var(--muted); }
.stage-card.active { border-color: var(--lime); box-shadow: 0 0 0 2px rgba(101,146,10,0.12); }
.stage-checkbox { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--hairline-bold); display: grid; place-items: center; margin-top: 1px; }
.stage-card.done .stage-checkbox { background: var(--lime); border-color: var(--lime); color: white; }
.stage-card.active .stage-checkbox { border-color: var(--lime); }
.stage-card.active .stage-checkbox::after { content: ''; width: 10px; height: 10px; background: var(--lime); border-radius: 2px; }
.stage-body { flex: 1; min-width: 0; }
.stage-title { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.stage-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stage-progress { color: var(--lime-dark); font-weight: 600; }

/* Ledger row */
.ledger-row { display: grid; grid-template-columns: 1fr auto; padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: 13.5px; }
.ledger-row .lr-date { color: var(--muted); font-size: 12px; }
.ledger-row .lr-method { font-size: 11.5px; color: var(--muted); }
.ledger-row .lr-amount { font-weight: 700; color: var(--ink-2); }
.ledger-summary { margin-top: 12px; padding: 12px; background: var(--card-alt); border-radius: 10px; font-size: 13.5px; }
.ledger-summary .ls-row { display: flex; justify-content: space-between; padding: 4px 0; }
.ledger-summary .ls-row.bold { font-weight: 700; padding-top: 8px; border-top: 1px solid var(--hairline); margin-top: 4px; }
.ledger-summary .ls-row.due { color: var(--warn-fg); }

/* Search */
.search-bar {
  position: relative;
  width: 100%; max-width: 360px;
}
.search-bar input {
  padding-left: 36px;
  background: var(--card-alt);
  border-color: transparent;
}
.search-bar input:focus { background: white; }
.search-bar::before {
  content: '🔍'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 14px; opacity: 0.6;
}

/* Chip filter row */
.chip-row { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.chip {
  padding: 7px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  background: var(--card); border: 1px solid var(--hairline);
  color: var(--ink-2); cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.chip:hover { background: var(--card-alt); }
.chip.active { background: var(--lime); color: white; border-color: var(--lime); }

/* Calendar */
.cal-day-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.cal-day-chip {
  flex: 0 0 64px; padding: 10px 8px;
  text-align: center;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: 10px; cursor: pointer;
}
.cal-day-chip.today { background: var(--lime); color: white; border-color: var(--lime); }
.cal-day-chip .cal-dow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.8; }
.cal-day-chip .cal-dom { font-family: var(--font-serif); font-size: 22px; font-weight: 600; }

.cal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .cal-grid { grid-template-columns: 1fr; } }
.cal-col { background: var(--card); border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; }
.cal-col-head { padding: 10px 14px; background: var(--card-alt); font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--hairline); }
.cal-slot {
  padding: 10px 14px; border-bottom: 1px solid var(--hairline);
  display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center;
  font-size: 13.5px;
}
.cal-slot:last-child { border-bottom: 0; }
.cal-slot .cal-time { color: var(--muted); font-weight: 600; font-size: 12px; }
.cal-slot.filled { background: var(--lime-tint); }
.cal-slot.filled .cal-time { color: var(--lime-dark); }
.cal-slot.empty { color: var(--muted); font-style: italic; cursor: pointer; }
.cal-slot.empty:hover { background: var(--card-alt); }

/* Section spacing */
.section { margin-bottom: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.section-title { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; margin: 0; }
.section-sub { color: var(--muted); font-size: 13.5px; }

/* Animations */
@keyframes slideInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.slide-in-up { animation: slideInUp var(--t-base) var(--ease); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeIn var(--t-base) var(--ease); }

/* Print */
@media print {
  body { background: white; }
  .app-header, .side-nav, .bottom-nav, .no-print { display: none !important; }
  .app-body { display: block; }
  .app-main { padding: 0; }
  .card { break-inside: avoid; }
}

/* Utility */
.text-muted { color: var(--muted); }
.text-lime { color: var(--lime-dark); }
.text-warn { color: var(--warn-fg); }
.text-danger { color: var(--danger-fg); }
.font-serif { font-family: var(--font-serif); }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11.5px; }
.text-lg { font-size: 17px; }
.text-xl { font-size: 22px; }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.flex { display: flex; } .flex-col { flex-direction: column; } .gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.items-center { align-items: center; } .items-start { align-items: flex-start; } .items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; }
.grid { display: grid; }
.grid-2 { grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.w-full { width: 100%; }
.flex-1 { flex: 1; }
.hidden { display: none; }
@media (max-width: 720px) { .hidden-mobile { display: none; } }
@media (min-width: 721px) { .hidden-desktop { display: none; } }
