/* ============================================================
   Cheddar — Design System
   Warm golden-retriever palette, clean cards, mobile-first
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --cream:        #FFFBF5;
  --cream-soft:   #FEF9F0;
  --cream-border: #FDE8C0;
  --gold-100:     #FEF3C7;
  --gold-300:     #FCD34D;
  --gold-400:     #FBBF24;
  --gold-500:     #F59E0B;
  --gold-600:     #D97706;
  --gold-700:     #B45309;
  --gold-800:     #92400E;
  --brown-900:    #451A03;

  --green-500:    #10B981;
  --green-100:    #D1FAE5;
  --red-500:      #EF4444;
  --red-100:      #FEE2E2;
  --blue-500:     #3B82F6;
  --blue-100:     #DBEAFE;
  --purple-500:   #8B5CF6;
  --purple-100:   #EDE9FE;
  --pink-500:     #EC4899;
  --pink-100:     #FCE7F3;

  --text:         #1C1917;
  --text-soft:    #57534E;
  --text-muted:   #A8A29E;
  --surface:      #FFFFFF;
  --border:       #F5E6D0;

  --shadow-sm:    0 1px 3px rgba(146,64,14,0.07), 0 1px 2px rgba(146,64,14,0.04);
  --shadow-md:    0 4px 12px rgba(146,64,14,0.08), 0 2px 4px rgba(146,64,14,0.05);
  --shadow-lg:    0 12px 32px rgba(146,64,14,0.10), 0 4px 8px rgba(146,64,14,0.06);

  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-xl:    28px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ── Typography ──────────────────────────────────────────── */
h1 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.1rem, 3vw, 1.35rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1rem; font-weight: 700; line-height: 1.4; }
h4 { font-size: 0.875rem; font-weight: 600; }
p  { line-height: 1.65; }

.label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px)  { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 20px; }
}

.grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* ── NAV ─────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,251,245,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--gold-700);
}

.nav-brand-paw {
  width: 34px;
  height: 34px;
  background: var(--gold-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex-wrap: wrap;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-link:hover { background: var(--gold-100); color: var(--gold-700); }
.nav-link.active { background: var(--gold-500); color: #fff; }
.nav-link .icon { font-size: 0.9rem; }

@media (max-width: 540px) {
  .nav-link span.text { display: none; }
  .nav-link { padding: 7px 9px; }
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-soft);
}

.card-title .icon { font-size: 1rem; }

.card-body { padding: 16px 20px 20px; }

.card-body-flush { padding: 0; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 600;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--gold-500);
  color: #fff;
}
.btn-primary:hover { background: var(--gold-600); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary:active { transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--gold-100); color: var(--gold-700); border-color: var(--gold-300); }

.btn-danger {
  background: transparent;
  color: var(--red-500);
  border: 1px solid #FECACA;
}
.btn-danger:hover { background: var(--red-100); }

.btn-sm { padding: 5px 10px; font-size: 0.76rem; border-radius: 6px; }
.btn-lg { padding: 11px 22px; font-size: 0.9rem; }
.btn-icon { padding: 7px; border-radius: var(--radius-sm); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Form elements ───────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--cream-soft);
  border: 1.5px solid var(--cream-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.15);
  background: #fff;
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ── Badges / Pills ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-food       { background: #FEF3C7; color: #92400E; }
.badge-vet        { background: #DBEAFE; color: #1E40AF; }
.badge-grooming   { background: #EDE9FE; color: #5B21B6; }
.badge-toys       { background: #FCE7F3; color: #9D174D; }
.badge-accessories{ background: #D1FAE5; color: #065F46; }
.badge-medication { background: #FEE2E2; color: #991B1B; }
.badge-training   { background: #E0F2FE; color: #0369A1; }
.badge-other      { background: #F5F5F4; color: #44403C; }

/* ── Category icons ──────────────────────────────────────── */
.cat-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.cat-food       { background: #FEF3C7; }
.cat-vet        { background: #DBEAFE; }
.cat-grooming   { background: #EDE9FE; }
.cat-toys       { background: #FCE7F3; }
.cat-accessories{ background: #D1FAE5; }
.cat-medication { background: #FEE2E2; }
.cat-training   { background: #E0F2FE; }
.cat-other      { background: #F5F5F4; }

/* ── Amount display ──────────────────────────────────────── */
.amount {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.amount-positive { color: var(--green-500); }
.amount-neutral  { color: var(--text); }

/* ── Empty states ────────────────────────────────────────── */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  text-align: center;
  gap: 8px;
}
.empty-icon { font-size: 2.5rem; opacity: 0.4; }
.empty-text { font-size: 0.85rem; color: var(--text-muted); }

/* ── Loading spinner ─────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--gold-100);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.spinner-sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

/* ── Toast notifications ──────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.83rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s ease;
  min-width: 220px;
  max-width: 320px;
}
.toast.success { background: #064E3B; }
.toast.error   { background: #7F1D1D; }
.toast.fade-out { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn  { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }
@keyframes toastOut { to   { opacity:0; transform: translateY(8px); } }

/* ── Modal ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(28,25,23,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}
@media (min-width: 480px) {
  .modal-backdrop { align-items: center; }
}
.modal-backdrop.hidden { display: none; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-md) var(--radius-md);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}
@media (min-width: 480px) {
  .modal { border-radius: var(--radius-xl); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 0;
}

.modal-title { font-size: 1.05rem; font-weight: 800; }

.modal-close {
  width: 30px; height: 30px;
  background: var(--cream);
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
}
.modal-close:hover { background: var(--gold-100); color: var(--text); }

.modal-body { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer { padding: 0 22px 22px; display: flex; gap: 8px; justify-content: flex-end; }

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

/* ── Page header ─────────────────────────────────────────── */
.page-header {
  padding: 28px 0 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-left { display: flex; flex-direction: column; gap: 2px; }
.page-eyebrow { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-600); }
.page-title { font-size: clamp(1.3rem, 4vw, 1.75rem); font-weight: 800; }

/* ── List rows ───────────────────────────────────────────── */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--cream-soft); }
.list-row-main { flex: 1; min-width: 0; }
.list-row-title { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row-sub   { font-size: 0.75rem; color: var(--text-muted); margin-top: 1px; }
.list-row-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* ── Timeline (schedule) ─────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }

.timeline-item {
  display: grid;
  grid-template-columns: 52px 1px 1fr;
  gap: 0 12px;
  padding: 0 20px 0 20px;
}

.timeline-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-top: 14px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.timeline-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.timeline-dot {
  width: 10px; height: 10px;
  background: var(--gold-400);
  border: 2px solid var(--surface);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 17px;
  box-shadow: 0 0 0 2px var(--gold-300);
}

.timeline-connector {
  width: 2px;
  flex: 1;
  background: var(--gold-100);
  min-height: 12px;
}

.timeline-item:last-child .timeline-connector { display: none; }

.timeline-content {
  padding: 10px 0 14px;
}

.timeline-title { font-size: 0.875rem; font-weight: 700; }
.timeline-desc  { font-size: 0.77rem; color: var(--text-muted); margin-top: 1px; }
.timeline-icon  { font-size: 1rem; margin-bottom: 2px; }

/* ── Photo grid ──────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
@media (min-width: 640px) { .photo-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }

.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--cream-soft);
  border: 1px solid var(--border);
}

.photo-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.photo-thumb:hover img { transform: scale(1.04); }

.photo-thumb-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  padding: 20px 10px 8px;
  opacity: 0;
  transition: opacity 0.2s;
}
.photo-thumb:hover .photo-thumb-overlay { opacity: 1; }
.photo-thumb-date {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}
.photo-thumb-caption {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Drop zone ───────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--gold-300);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--gold-100);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.drop-zone:hover, .drop-zone.dragging {
  border-color: var(--gold-500);
  background: #FEF8E3;
}
.drop-zone-icon { font-size: 2rem; }
.drop-zone-text { font-size: 0.83rem; font-weight: 600; color: var(--gold-700); }
.drop-zone-sub  { font-size: 0.74rem; color: var(--text-muted); }

/* ── Stats chips ─────────────────────────────────────────── */
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; }

.stat-chip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 14px;
  background: var(--cream-soft);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-sm);
  min-width: 80px;
}
.stat-chip-label { font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.stat-chip-value { font-size: 1rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.stat-chip-sub   { font-size: 0.68rem; color: var(--text-muted); }

/* ── Hero card ───────────────────────────────────────────── */
.hero-card {
  background: linear-gradient(135deg, var(--gold-600) 0%, var(--gold-500) 60%, var(--gold-400) 100%);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-card::after {
  content: '🐾';
  position: absolute;
  right: -8px;
  bottom: -16px;
  font-size: 7rem;
  opacity: 0.1;
  transform: rotate(-15deg);
  pointer-events: none;
}

.hero-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.2);
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  overflow: hidden;
}

.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }

.hero-info { flex: 1; min-width: 0; }
.hero-name { font-size: 1.6rem; font-weight: 900; line-height: 1; margin-bottom: 2px; }
.hero-breed { font-size: 0.82rem; font-weight: 600; opacity: 0.85; }
.hero-meta { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.hero-chip {
  background: rgba(255,255,255,0.2);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-hero {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  backdrop-filter: blur(4px);
}
.btn-hero:hover { background: rgba(255,255,255,0.35); }

/* ── Dashboard grid ──────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-areas:
    "photo"
    "appointments"
    "expenses"
    "schedule";
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "photo appointments"
      "expenses expenses"
      "schedule schedule";
    gap: 20px;
  }
}

@media (min-width: 960px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas:
      "photo appointments appointments"
      "expenses expenses schedule";
    gap: 24px;
  }
}

.widget-photo       { grid-area: photo; }
.widget-appts       { grid-area: appointments; }
.widget-expenses    { grid-area: expenses; }
.widget-schedule    { grid-area: schedule; }

/* ── Appointment item ────────────────────────────────────── */
.appt-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.appt-item:last-child { border-bottom: none; padding-bottom: 0; }
.appt-item:first-child { padding-top: 0; }

.appt-date-box {
  width: 44px;
  background: var(--gold-100);
  border: 1px solid var(--gold-300);
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 5px 3px;
  flex-shrink: 0;
}
.appt-month { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-700); }
.appt-day   { font-size: 1.15rem; font-weight: 900; color: var(--text); line-height: 1.1; }

.appt-info { flex: 1; min-width: 0; }
.appt-title { font-size: 0.85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-meta  { font-size: 0.73rem; color: var(--text-muted); margin-top: 1px; }

/* ── Upcoming chip ───────────────────────────────────────── */
.days-away {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}
.days-away.soon   { background: var(--red-100); color: var(--red-500); }
.days-away.medium { background: var(--gold-100); color: var(--gold-700); }
.days-away.far    { background: var(--green-100); color: var(--green-500); }

/* ── Chart wrapper ───────────────────────────────────────── */
.chart-wrap {
  position: relative;
  height: 180px;
}

/* ── Photo preview ───────────────────────────────────────── */
.today-photo-preview {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}

/* ── Lightbox ────────────────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  flex-direction: column;
  gap: 12px;
}
#lightbox.open { display: flex; }
#lightbox img  { max-width: 100%; max-height: 80vh; border-radius: var(--radius-md); object-fit: contain; }
#lightbox-caption { color: rgba(255,255,255,0.7); font-size: 0.85rem; text-align: center; }
#lightbox-close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* ── Confirm dialog ──────────────────────────────────────── */
.confirm-dialog {
  position: fixed;
  inset: 0;
  background: rgba(28,25,23,0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm-dialog.hidden { display: none; }
.confirm-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 340px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.confirm-icon { font-size: 2.5rem; margin-bottom: 8px; }
.confirm-title { font-weight: 800; margin-bottom: 6px; }
.confirm-msg   { font-size: 0.85rem; color: var(--text-soft); margin-bottom: 20px; }
.confirm-actions { display: flex; gap: 8px; justify-content: center; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--cream-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-300); }

/* ── Utilities ───────────────────────────────────────────── */
.hidden         { display: none !important; }
.flex           { display: flex; }
.flex-col       { display: flex; flex-direction: column; }
.items-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.gap-2          { gap: 8px; }
.gap-3          { gap: 12px; }
.gap-4          { gap: 16px; }
.mt-1           { margin-top: 4px; }
.mt-2           { margin-top: 8px; }
.mt-3           { margin-top: 12px; }
.mt-4           { margin-top: 16px; }
.mb-4           { margin-bottom: 16px; }
.w-full         { width: 100%; }
.text-muted     { color: var(--text-muted); }
.text-sm        { font-size: 0.875rem; }
.font-bold      { font-weight: 700; }
.text-center    { text-align: center; }
.truncate       { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cursor-pointer { cursor: pointer; }
.line-through   { text-decoration: line-through; opacity: 0.5; }

/* ── Responsive page spacing ─────────────────────────────── */
.main-content { padding-top: 20px; padding-bottom: 48px; }

/* ── Completed state ─────────────────────────────────────── */
.completed-row { opacity: 0.5; }
.completed-row .list-row-title { text-decoration: line-through; }
