/* App font: Figtree (variable, weights 300-900), bundled in assets/fonts from
   @fontsource-variable/figtree 5.3.0 -- SIL Open Font License, see
   assets/fonts/Figtree-OFL.txt. Replaced Inter-from-Google-Fonts at v2.11.0.
   Split by unicode-range like Google serves it: the latin-ext file (accented
   names) only downloads if a page actually uses one of those characters. */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url('assets/fonts/figtree-latin-wght-normal.woff2') format('woff2-variations'),
       url('assets/fonts/figtree-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url('assets/fonts/figtree-latin-ext-wght-normal.woff2') format('woff2-variations'),
       url('assets/fonts/figtree-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  /* ---- Theme color (per-customer brand, set via Settings -- see
     applyAccentColor() in app.js). Use ONLY for: primary buttons, active
     nav/tabs, selected states, links, focus rings, highlights. Never for
     semantic meaning (success/warning/danger/info) -- a customer can pick
     ANY color here, including red, and red must not be assumed to mean
     "danger" anywhere in this file. --primary-rgb is the same color as
     "R, G, B" channels so rgba(var(--primary-rgb), alpha) works for
     translucent glows/rings without hardcoding a color. */
  --primary: #d8232a;
  --primary-hover: #b91c22;
  --primary-tint: #fdf0f0;
  --primary-rgb: 216, 35, 42;

  /* ---- Semantic colors (fixed, never customer-configurable). These carry
     meaning regardless of the theme color: success=positive/complete,
     warning=needs attention, danger=destructive/irreversible, info=neutral
     information. ---- */
  --color-success: #16a34a;
  --color-success-hover: #15803d;
  --color-success-tint: #ecfdf3;
  --color-success-border: #bbf7d0;

  --color-warning: #b45309;
  --color-warning-hover: #92400e;
  --color-warning-tint: #fef3c7;
  --color-warning-border: #fde68a;

  --color-danger: #dc2626;
  --color-danger-hover: #b91c1c;
  --color-danger-tint: #fef2f2;
  --color-danger-border: #fecaca;
  --color-danger-rgb: 220, 38, 38;

  --color-info: #2563eb;
  --color-info-hover: #1d4ed8;
  --color-info-tint: #eff6ff;
  --color-info-border: #bfdbfe;

  --color-neutral: #6b7280;
  --color-neutral-hover: #4b5563;
  --color-neutral-tint: #f3f4f6;
  --color-neutral-border: #e5e7eb;

  /* Not a status like the four above -- marks the DAYCARE service type
     itself (vs. overnight boarding), so it needs to stay visually distinct
     from success/warning/danger/info/neutral, which are all already spoken
     for by arrived/late/health-warning/occupied/checked-out. */
  --color-daycare: #7c3aed;
  --color-daycare-hover: #6d28d9;
  --color-daycare-tint: #f5f3ff;
  --color-daycare-border: #ddd6fe;

  --bg: #fafafa;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #1f2937;
  --text-secondary: #7c8697;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 6px 16px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, 0.14);
  --font: 'Figtree', system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Icon system ----------
   Every icon in the app is an inline SVG (stroke-based line icons, except
   .icon-paw which is filled -- the mascot glyph reads better solid at small
   sizes than as an outline). One rule sizes any SVG inside a known icon
   container so a container never needs its own per-icon width/height --
   drop a new <svg class="icon"> into an existing container class and it's
   already sized correctly. `color` on the container sets the icon's color
   via currentColor, same as the emoji it replaced. */
.icon {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-paw { fill: currentColor; stroke: none; }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 0.85rem 2rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  height: 40px;
  width: auto;
}

header h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-emoji { font-size: 1.15rem; }

.subtitle {
  color: var(--text-secondary);
  margin: 0.2rem 0 0;
  font-size: 0.925rem;
}

/* ---------- Segmented tab nav ---------- */

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  background: #f1f2f4;
  padding: 4px;
  border-radius: 12px;
  gap: 2px;
}

.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  box-shadow: none;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 0.95rem;
  border-radius: 9px;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tabs button:hover:not(.active) {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.tabs button.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

.tab-icon { font-size: 1rem; }

/* ---------- Layout ---------- */

main {
  /* Room for a tab's Quick Actions sidebar (see .tab-with-sidebar below) on
     top of the original 1200px content width, so a tab that has one doesn't
     lose any of its own width to it -- max-width is a ceiling, not a floor,
     so this is a no-op on any viewport too narrow to reach it. */
  max-width: calc(1200px + 268px + 1.25rem);
  margin: 0 auto;
  padding: 2rem 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.hidden { display: none; }

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

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.35s ease both;
}

.card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- Reusable dashboard components ----------
   Shared across every tab, not page-specific -- new tools/tabs should reuse
   these rather than growing their own one-off styles. */

/* Icon + title + description header, used at the top of a tool's .card. */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card-header-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: var(--radius-md);
  background: var(--primary-tint);
  color: var(--primary);
}

.card-header-text { min-width: 0; }
.card-header-text h2 { margin: 0 0 0.3rem; }
.card-header-text .subtitle { margin: 0; }

/* Horizontal row of actions/tools -- a generic layout primitive, not tied to
   any one page. Cards inside wrap naturally as more tools get added, so
   growth never means "add another row of buttons". */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
}

/* A clickable tool launcher: icon + title + short description. Deliberately
   kept as a <button> wherever used (not a styled <div>) so existing IDs and
   click listeners work completely unchanged -- this is a skin over the same
   element, not a new interactive pattern. */
/* Same reasoning as #add-appointment-panel.hidden / .modal-overlay.hidden
   below -- .action-card's own `display: flex` and the plain .hidden rule
   are equal specificity, and .action-card comes later in this file, so it
   would otherwise win the cascade and silently un-hide the element (confirmed
   live: add-client-toggle-btn stayed visible with class="action-card hidden"
   until this was added). */
.action-card.hidden { display: none; }

.action-card {
  flex: 1 1 240px;
  max-width: 320px;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  text-align: left;
  padding: 1.1rem 1.25rem;
  min-height: 0;
  background: var(--card-bg);
  color: var(--text);
  font-weight: 400;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.action-card:hover {
  background: var(--card-bg);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.action-card.active {
  border-color: var(--primary);
  background: var(--primary-tint);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.14);
}

.action-card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: var(--radius-md);
  background: var(--primary-tint);
  color: var(--primary);
}

.action-card-body { min-width: 0; }

.action-card-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.action-card-desc {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* A tab whose primary action(s) live in a narrow sidebar to the left of its
   main content, instead of a full-width .toolbar above it -- Today's
   Schedule and Kennel. Stacks to one column on narrow screens (below, next
   to the other tablet/phone breakpoints). */
.tab-with-sidebar {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.quick-actions {
  width: 268px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.quick-actions-title {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Quick Actions reads as ONE card (.quick-actions is itself a .card) holding
   a plain list of rows, not a stack of cards-inside-a-card -- each row's own
   border/shadow/lift are dropped in favor of a flat hover highlight, and
   .action-card's flex-basis/max-width (sized for the old horizontal
   .toolbar row, unused today but kept for that reuse) are overridden back
   to full-width so rows stack correctly. */
.quick-actions .action-card {
  width: 100%;
  max-width: none;
  flex: none;
  padding: 0.7rem 0.6rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.quick-actions .action-card:hover {
  background: var(--color-neutral-tint);
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.quick-actions .action-card.active {
  background: var(--primary-tint);
  border-color: transparent;
  box-shadow: none;
}

/* The main-content side of a .tab-with-sidebar row -- a <section> on
   Cleanup Tools' individual tool cards (.cleanup-tools-content, holding
   several cards that show one at a time -- see setupToolAccordion's
   emptyStateId), or a .tab-main-stack on Today's Schedule and Kennel, which
   stack a Quick Action's own panel (Add Grooming Appointment, Add Boarding) above the
   schedule/board itself so it opens where staff are already looking instead
   of off the bottom of the page. */
.tab-with-sidebar > section,
.tab-with-sidebar > .cleanup-tools-content,
.tab-with-sidebar > .tab-main-stack {
  flex: 1;
  min-width: 0;
}

.cleanup-tools-content,
.tab-main-stack {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Sits in a .card-header next to the title -- pushed to the far right so
   staff can dismiss a Quick Action's panel without hunting for the sidebar
   button that opened it. A square box around the X (rather than
   .modal-close-btn's borderless, hover-only style) so it reads as a button
   at rest, not just on hover. Fully self-styled (not composed with
   .btn-secondary/.btn-sm) so nothing about its size or color depends on
   which of those classes happens to be defined later in this file. */
.panel-close-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  border-radius: var(--radius-md);
  background: var(--color-neutral-tint);
  border: 1px solid var(--color-neutral-border);
  color: var(--text-secondary);
  box-shadow: none;
}

.panel-close-btn:hover {
  background: var(--card-bg);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: none;
  transform: none;
}

/* Small semantic status labels. Fixed meaning regardless of theme color --
   see the semantic color variables in :root. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: var(--color-success-tint); color: var(--color-success-hover); }
.badge-warning { background: var(--color-warning-tint); color: var(--color-warning-hover); }
.badge-danger { background: var(--color-danger-tint); color: var(--color-danger-hover); }
.badge-info { background: var(--color-info-tint); color: var(--color-info-hover); }
.badge-neutral { background: var(--color-neutral-tint); color: var(--color-neutral-hover); }

.section-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.today-date-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  padding-top: 0.2rem;
}

.card > .subtitle { margin-bottom: 1.5rem; }

.duplicate-contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.duplicate-contact-row:hover {
  box-shadow: var(--shadow-md);
}

.duplicate-contact-col {
  flex: 1 1 220px;
  min-width: 200px;
}

.duplicate-contact-col > strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}

.duplicate-contact-col a { font-size: 0.85rem; }

.duplicate-contact-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0 0.5rem;
}

.duplicate-contact-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  flex: 1 1 220px;
}

.duplicate-contact-edit-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  flex-basis: 100%;
  margin-top: 0.75rem;
}

.duplicate-contact-edit-fields .field { flex: 1 1 200px; }

#add-appointment-panel {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}
#add-appointment-panel.hidden { display: none; }

.search-card {
  max-width: 640px;
  margin: 1rem auto 0;
  padding: 2.5rem 2.75rem;
}

/* ---------- Buttons ---------- */

button {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 44px;
  padding: 0 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

button,
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.25);
}

button:hover,
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 14px rgba(var(--primary-rgb), 0.32);
  transform: translateY(-1px);
}

button:active,
.btn-primary:active { transform: translateY(1px); }

button:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-icon { font-size: 1rem; line-height: 1; }
.btn-sm .btn-icon,
.tab-icon { font-size: 1rem; line-height: 1; }

/* ---------- Search row ---------- */

.search-row {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

.search-row input {
  flex: 1;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
}

.search-row input:focus,
select:focus,
input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

/* ---------- Empty states ---------- */

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.empty-state p { margin: 0; font-size: 0.95rem; }

/* ---------- Results list ---------- */

.results-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.results-list li {
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.results-list li:hover {
  border-color: var(--primary);
  background: var(--primary-tint);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.results-list li.search-truncated-note {
  cursor: default;
  justify-content: center;
  color: var(--text-muted, #6b7280);
  font-size: 0.9rem;
  font-style: italic;
  background: transparent;
}

.results-list li.search-truncated-note:hover {
  border-color: var(--border);
  background: transparent;
  transform: none;
  box-shadow: none;
}

/* ---------- Contact card ---------- */

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 1.4rem;
  background: var(--primary-tint);
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.contact-card:empty { display: none; }

.contact-card .item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.contact-card .item .icon { font-size: 1.05rem; }

.contact-card .item.secondary {
  font-weight: 500;
  color: var(--text-secondary);
}

/* ---------- Pet cards ---------- */

.pets-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.pet-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  animation: fadeInUp 0.3s ease both;
}

.pet-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.pet-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.pet-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.pet-card-header input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.pet-name {
  font-size: 1.05rem;
  font-weight: 700;
}

.pet-card-header .delete-pet-btn {
  margin-left: auto;
}

.pet-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.pet-card-actions .delete-pet-btn {
  margin-left: 0;
}

.delete-pet-preview {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.delete-pet-preview .results-list {
  margin-top: 0.75rem;
}

.delete-pet-preview li {
  cursor: default;
}

.delete-pet-preview li:hover {
  border-color: var(--border);
  background: #fff;
  transform: none;
  box-shadow: none;
}

/* ---------- Duplicate appointments ---------- */

.duplicate-group {
  margin-bottom: 1rem;
}

.duplicate-group .pet-card-header {
  flex-wrap: wrap;
}

.duplicate-list li {
  cursor: default;
}

.duplicate-list li:hover {
  border-color: var(--border);
  background: #fff;
  transform: none;
  box-shadow: none;
}

.duplicate-check-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.duplicate-check-label input[type="checkbox"] {
  accent-color: var(--primary);
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.pet-breed-pill {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: #f3f4f6;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}

.pet-photo-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.pet-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-size: 1.2rem;
}

.pet-photo-thumb-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  vertical-align: middle;
  margin-right: 0.5rem;
}

.pet-photo-input { display: none; }

.pet-photo-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.pet-photo-status.error { color: var(--color-danger); }

.pet-notes-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin-top: 0.75rem;
}

.pet-notes-save-field { flex-shrink: 0; }

.pet-notes-status {
  grid-column: 1 / -1;
  font-size: 0.8rem;
}

.pet-notes-status.error { color: var(--color-danger); }

.pet-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* .field is normally label+input, sized by its parent row/grid -- but a
   handful of spots (Today's Schedule and Kennel's notes/medications panels,
   "Suggest runs", etc.) put a bare <button> straight in a .field instead.
   Flex's default cross-axis stretch then expands that button to fill
   whatever width the .field itself was given, which for a small "Save" is
   way more than the text needs -- most visibly wherever an adjacent .field
   is forced wide (e.g. .today-notes-form .field:has(.dated-list-editor)),
   confirmed live as a huge, long Save button. An explicit width overrides
   stretch without touching any other .field (inputs/selects already fill
   their own width on purpose, via the global width:100% rule above, and
   aren't matched by this selector anyway since it's button-only).  */
.field > button {
  width: fit-content;
}

.field-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

select, input[type="date"], input[type="text"], input[type="password"], input[type="number"], input[type="file"] {
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  width: 100%;
}

/* ---------- Recurring appointments ---------- */

.recurring-toggle-row {
  margin-top: 1rem;
}

.recurring-panel {
  margin-top: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fafafa;
}

.recurring-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: end;
}

.recurring-alternate-field {
  justify-content: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.recurring-mode-toggle {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 1rem;
}

.recurring-mode-toggle .btn-secondary.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.extra-dates {
  margin-top: 1rem;
}

.recurring-mode-toggle + .extra-dates {
  margin-top: 0;
}

.extra-dates-add {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.extra-dates-add .extra-date-input {
  width: auto;
  min-width: 11rem;
}

.extra-date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.extra-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.3rem 0.2rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Undo the global button look (44px min-height, primary fill, shadow). */
.extra-date-remove-btn {
  min-height: 0;
  padding: 0.1rem 0.4rem;
  border: none;
  border-radius: 999px;
  background: none;
  box-shadow: none;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1;
}

.extra-date-remove-btn:hover {
  background: #fde8e8;
  color: var(--color-danger);
  box-shadow: none;
  transform: none;
}

/* Four buttons (Add Pet / Edit Contact / Show Appointments / Delete Contact)
   don't fit one line on a narrower screen -- wrap whole buttons instead of
   squeezing each label onto two lines. */
#add-client-existing-section > .actions-row {
  flex-wrap: wrap;
}

#add-client-existing-section > .actions-row button {
  white-space: nowrap;
}

/* Manage a Client -> Show Appointments (read-only list) */
#add-client-appts-panel {
  margin-top: 1rem;
}

.appts-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.appts-panel-header .field-label {
  margin: 0;
}

.appt-row-past td {
  color: var(--text-secondary);
}

.recurring-summary {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.recurring-actions-row {
  margin-top: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.recurring-status {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.recurring-status.error {
  color: var(--color-danger);
}

.recurring-preview-wrap {
  margin-top: 1.1rem;
}

.recurring-row-flagged {
  background: var(--color-warning-tint);
}

.recurring-reason {
  margin-top: 0.25rem;
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.recurring-edit-row td {
  background: #f9fafb;
  padding: 1rem;
}

.recurring-edit-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 1rem;
  align-items: end;
}

.today-edit-form {
  grid-template-columns: repeat(2, 1fr) auto;
}

.pet-info-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  margin-left: 0.4rem;
  padding: 0.1rem 0.3rem;
  /* Overrides the base <button> rule's color:#fff (meant for solid-red
     buttons) -- left as inherited white here, the .icon SVG's currentColor
     stroke would be invisible against the table's white background. */
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  vertical-align: middle;
  line-height: 1;
}

.pet-info-btn:hover {
  background: #f3f4f6;
}

.pet-info-btn-warning {
  color: var(--color-warning);
  animation: pet-warning-pulse 2s ease-in-out infinite;
}

.pet-info-btn-empty {
  opacity: 0.35;
}

.pet-info-btn-empty:hover {
  opacity: 1;
}

/* <button class="btn-link"> had no dedicated rule of its own anywhere, so
   every use of it (Remove, + Add, change client, this info toggle) fell back
   to the base button style -- a solid red pill sized for "Save"-type CTAs,
   which is wrong for what "link" implies: a small, low-emphasis inline
   action. (Sizing/width is handled separately by the ".field > button" rule
   near .field's own definition, since that turned out to affect more than
   just .btn-link -- see the comment there.) */
.btn-link {
  border: none;
  background: none;
  box-shadow: none;
  cursor: pointer;
  min-height: auto;
  padding: 0.15rem 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  border-radius: var(--radius-sm);
}

.btn-link:hover {
  background: var(--primary-tint);
  box-shadow: none;
  transform: none;
  color: var(--primary-hover);
}

/* Removing a row is the one case where the default link color reads as too
   neutral for what the action does. */
.kennel-remove-pet-btn,
.dated-list-remove-btn {
  color: var(--color-danger);
}

.kennel-remove-pet-btn:hover,
.dated-list-remove-btn:hover {
  background: var(--color-danger-tint);
  color: var(--color-danger-hover);
}

/* Mirrors .pet-info-btn (Today's Schedule's equivalent icon button): a
   single glyph needs tighter, near-square padding rather than .btn-link's
   text-button padding, and no font-weight bump (the emoji doesn't have one). */
.kennel-info-toggle-btn {
  font-size: 0.9rem;
  font-weight: 400;
  margin-left: 0.4rem;
  padding: 0.1rem 0.3rem;
  color: var(--text-secondary);
  vertical-align: middle;
  line-height: 1;
}

.kennel-info-toggle-btn:hover {
  background: #f3f4f6;
  color: var(--text-secondary);
}

@keyframes pet-warning-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.today-notes-row td,
.kennel-pet-info-row td {
  background: #f9fafb;
  padding: 1rem;
}

.today-notes-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr) auto;
  gap: 1rem;
  align-items: end;
}

/* Medications/Shots hold a multi-row editor, not a single input -- let them
   take the full row instead of squeezing into the 2-up grid above. */
.today-notes-form .field:has(.dated-list-editor) {
  grid-column: 1 / -1;
}

.dated-list-editor {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.dated-list-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* The global "input[type=...] { width: 100% }" rule above fights flex
   sizing here (each input tries to claim the whole row) -- width: auto
   hands sizing back to flex-grow/flex-shrink. */
.dated-list-row .dated-list-name {
  flex: 1;
  width: auto;
  min-width: 0;
}

.dated-list-row .dated-list-date {
  flex: 0 0 auto;
  width: auto;
}

.today-photo-input { display: none; }

.today-notes-photo-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.today-photo-status.error { color: var(--color-danger); }

.recurring-replace-btn.active {
  background: var(--primary-tint);
  border-color: var(--primary);
  color: var(--primary-hover);
}

/* ---------- Add Client ---------- */

.contact-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.new-pets-heading {
  margin: 0 0 0.75rem;
}

.pets-grid > .pet-card {
  animation: none;
}

.pet-rows-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.pet-row-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 1rem;
  align-items: end;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fafafa;
}

/* ---------- Actions / status ---------- */

.actions-row {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

#book-status { color: var(--text-secondary); font-size: 0.9rem; }
#book-status.error { color: var(--color-danger); }

/* ---------- Confirmation list ---------- */

.confirmation-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.confirmation-list li {
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
}

.confirmation-list li.failed {
  border-color: var(--color-danger-border);
  background: var(--color-danger-tint);
  color: var(--color-danger-hover);
}

.confirmation-list a { color: var(--primary); font-weight: 600; }

/* ---------- History date range row ---------- */

.date-range-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.date-range-row label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.printed-by-field input { min-width: 180px; }

.history-pet-filter {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.history-pet-filter .field-label { margin-right: 0.25rem; }

.history-pet-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.history-pet-check-all {
  font-weight: 600;
  padding-right: 0.75rem;
  border-right: 1px solid var(--border);
}

.print-tip {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
}

/* ---------- History delete actions ---------- */

.history-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#history-delete-status {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

#history-delete-status.error {
  color: var(--color-danger);
}

.btn-danger {
  background: #fff;
  color: var(--color-danger);
  border: 1px solid var(--color-danger-border);
  box-shadow: none;
}

.btn-danger:hover {
  background: var(--color-danger-tint);
  border-color: var(--color-danger);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-danger:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  border-color: var(--border);
}

.btn-sm {
  min-height: 32px;
  padding: 0 0.75rem;
  font-size: 0.8rem;
}

.col-check,
.col-action {
  width: 1%;
  white-space: nowrap;
  text-align: center;
}

.col-check input {
  cursor: pointer;
}

.col-action button + button {
  margin-left: 0.5rem;
}

/* ---------- Today's Schedule ---------- */

.schedule-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 1.5rem;
}

.schedule-toolbar input[type="date"] {
  width: auto;
  min-width: 170px;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: var(--radius-md);
  background: var(--primary-tint);
  color: var(--primary);
}

.stat-card-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-card-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.today-table-wrap th,
.today-table-wrap td {
  padding: 1rem 1.25rem;
  font-size: 0.925rem;
}

.today-table-wrap tbody tr:nth-child(even) {
  background: #fafbfc;
}

.today-table-wrap tbody tr:hover {
  background: #f3f4f6;
}

.today-table-wrap .empty-state {
  padding: 3rem 1rem 2.5rem;
}

.today-table-wrap .pet-breed-pill {
  margin-left: 0.5rem;
}

/* ---------- History table ---------- */

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }

th, td {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

thead th {
  background: #f9fafb;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border);
}

tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s ease; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f9fafb; }

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--color-success-tint);
  color: var(--color-success-hover);
  text-transform: capitalize;
}

.status-pill.status-ok {
  background: var(--color-success-tint);
  color: var(--color-success-hover);
}

/* "Duplicate" is a warning (needs review), not a use of the theme color --
   a customer's brand color has no business meaning "watch out". */
.status-pill.status-warn,
.status-pill.status-duplicate {
  background: var(--color-warning-tint);
  color: var(--color-warning-hover);
}

.status-pill.status-danger {
  background: var(--color-danger-tint);
  color: var(--color-danger-hover);
}

.status-pill.status-info {
  background: var(--color-info-tint);
  color: var(--color-info-hover);
}

.status-pill.status-neutral {
  background: var(--color-neutral-tint);
  color: var(--color-neutral-hover);
}

/* ---------- Print ---------- */

.print-only { display: none; }

@media print {
  .no-print { display: none !important; }

  body { background: #fff; color: #000; }

  header, .tabs, .card { animation: none; }

  main { max-width: none; padding: 0; }

  .card {
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .print-only { display: block; }

  .print-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
  }

  .print-header img { height: 70px; width: auto; }

  .print-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary);
  }

  .print-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #444;
    margin-bottom: 1.5rem;
  }

  .print-pet-group {
    margin-bottom: 1.25rem;
  }

  .print-pet-group h3 {
    font-size: 1.05rem;
    margin: 0 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #ddd;
    break-after: avoid;
    page-break-after: avoid;
  }

  .print-pet-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .print-pet-group li {
    padding: 0.3rem 0;
    font-size: 0.92rem;
  }

  .print-week-lines li {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.92rem;
    border-bottom: 1px solid #eee;
  }

  .print-week-total-line {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 2px solid var(--primary);
    font-weight: 600;
  }

  .print-week-note {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #888;
  }

  .print-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.78rem;
    color: #888;
    padding-top: 0.5rem;
    border-top: 1px solid #ddd;
  }

  @page {
    margin: 0.6in 0.5in;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  main { padding: 1.5rem 1.25rem 3rem; }
  header { padding: 0.85rem 1.25rem; }
  .pet-fields { grid-template-columns: 1fr 1fr; }
  .recurring-fields { grid-template-columns: 1fr 1fr; }
  .recurring-edit-form { grid-template-columns: 1fr 1fr; }
  .contact-fields { grid-template-columns: 1fr 1fr; }
  .pet-row-fields { grid-template-columns: 1fr 1fr; }
  .today-edit-form { grid-template-columns: 1fr 1fr; }
  .today-notes-form { grid-template-columns: 1fr 1fr; }
  .pet-notes-row { grid-template-columns: 1fr 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .tab-with-sidebar { flex-direction: column; }
  .quick-actions { width: 100%; }
}

@media (max-width: 560px) {
  header { flex-direction: column; align-items: flex-start; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; justify-content: center; }
  .search-card { padding: 1.75rem 1.5rem; }
  .pet-fields { grid-template-columns: 1fr; }
  .date-range-row { flex-direction: column; align-items: stretch; }
  .schedule-toolbar { flex-direction: column; align-items: stretch; }
  .schedule-toolbar input[type="date"] { width: 100%; }
  .recurring-fields { grid-template-columns: 1fr; }
  .recurring-edit-form { grid-template-columns: 1fr; }
  .contact-fields { grid-template-columns: 1fr; }
  .pet-row-fields { grid-template-columns: 1fr; }
  .today-edit-form { grid-template-columns: 1fr; }
  .today-notes-form { grid-template-columns: 1fr; }
  .pet-notes-row { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr; }
  .section-header-row { flex-direction: column; }
  /* Desktop clips .table-wrap to hidden since the table always fits. Below
     this width the table's minimum content width (badges, phone numbers,
     unwrapping action buttons) exceeds the card, so switch to a horizontal
     scroller instead of silently cutting off the right-hand columns. */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ---------- Settings gear + modal ---------- */

.settings-gear-btn {
  background: transparent;
  border: none;
  box-shadow: none;
  font-size: 1.3rem;
  padding: 0.4rem 0.6rem;
  line-height: 1;
  color: var(--text-secondary);
}

.settings-gear-btn:hover {
  background: #f1f2f4;
  color: var(--text);
  box-shadow: none;
  transform: rotate(20deg);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 20, 24, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem 2rem 2rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  box-shadow: none;
  font-size: 1rem;
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
}

.modal-close-btn:hover { background: #f1f2f4; box-shadow: none; }

#settings-modal-body .field,
#setup-wizard-body .field { margin-bottom: 1.1rem; }

.settings-logo-preview {
  height: 40px;
  width: auto;
  align-self: flex-start;
  object-fit: contain;
  margin-top: 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.status-msg.error { color: var(--color-danger); }
.subtitle.error { color: var(--color-danger); }

/* ---------- Setup wizard (first run) ---------- */

.setup-wizard-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.setup-wizard-overlay.hidden { display: none; }

.setup-wizard-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  height: fit-content;
  padding: 2.5rem 2.75rem;
}

.setup-wizard-header { margin-bottom: 1.75rem; }

.setup-wizard-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 800;
}

/* ---------- Restart overlay ---------- */

.restart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 20, 24, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.restart-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem 2.5rem;
  text-align: center;
}

.restart-card p { margin: 1rem 0 0; color: var(--text); }

.spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Time Clock ---------- */

.timeclock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.timeclock-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  background: #fff;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}

.timeclock-tile.clocked-in {
  border-color: var(--color-success-border);
  background: var(--color-success-tint);
}

.timeclock-tile-name {
  font-weight: 700;
  font-size: 1rem;
}

.timeclock-tile-status {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

#timeclock-employee-list li { cursor: default; }

#timeclock-manager-section h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 0.95rem;
}

#timeclock-manager-section h3:first-child { margin-top: 0; }

.quick-range-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: -0.5rem 0 1rem;
}

.quick-range-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.timeclock-totals-heading {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}

.timeclock-week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.timeclock-week-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.timeclock-range-card {
  border-color: var(--primary);
  background: var(--color-success-tint);
}

.timeclock-week-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.timeclock-week-label {
  font-weight: 700;
  font-size: 0.9rem;
}

.timeclock-week-total {
  font-weight: 800;
  font-size: 1rem;
  white-space: nowrap;
}

.timeclock-total-lines {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.timeclock-total-lines li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.2rem 0;
  font-size: 0.875rem;
}

.timeclock-total-name { color: var(--text-secondary); }

.timeclock-total-hours { font-weight: 700; white-space: nowrap; }

/* The h:mm reading rides along quietly beside the decimal hours. */
.timeclock-week-total em,
.timeclock-total-hours em {
  display: block;
  font-style: normal;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: right;
}

.timeclock-total-note {
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ---------- Header icon group ---------- */

.header-icon-group {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

/* ---------- Footer ---------- */
/* Always a light, fixed neutral gray -- deliberately NOT derived from
   --primary or --text, so it stays quiet under every customer theme color
   and never competes with the client's own branding above it. */

#app-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem 2.5rem 2rem;
  text-align: center;
}

.footer-business-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #c1c7d0;
}

.footer-version {
  font-size: 0.75rem;
  color: #c1c7d0;
  margin-top: 0.15rem;
}

.footer-powered-by {
  margin-top: 0.65rem;
  background: transparent;
  border: none;
  box-shadow: none;
  min-height: 0;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 400;
  color: #c1c7d0;
  cursor: pointer;
}

.footer-powered-by:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
  color: #9aa1ac;
}

.footer-brand {
  font-weight: 600;
}

@media (max-width: 560px) {
  #app-footer { padding: 1.5rem 1.25rem 1.75rem; }
}

/* ---------- About modal ---------- */

.about-modal { max-width: 440px; text-align: center; }

.about-modal .modal-header { text-align: left; }

.about-client-logo {
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  margin: 0 auto 0.85rem;
  display: block;
}

.about-client-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.about-version {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

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

/* Bayfront's own mark, shown at its natural colors (not the customer's
   theme color) -- it's the software developer here, not the brand, so it
   should never look like it's competing for the same visual weight as the
   client's logo above. */
.about-platform {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
}

.about-platform-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.about-platform-name {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.about-platform-tagline {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.about-copyright {
  margin: 1.25rem 0 0;
  font-size: 0.75rem;
  color: #c1c7d0;
}

.about-meta {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
}

.about-meta-row .label { color: var(--text-secondary); }
.about-meta-row .value { color: var(--text); font-weight: 600; }

.about-links {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  justify-content: center;
}

.about-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: default;
  opacity: 0.65;
  text-decoration: none;
}

.about-link-active {
  color: var(--primary);
  cursor: pointer;
  opacity: 1;
}

.about-link-active:hover {
  text-decoration: underline;
}

/* ---------- Kennel ---------- */

:root {
  --kennel-bar: rgba(var(--primary-rgb), 0.55);
}

.kennel-view-toggle {
  display: inline-flex;
  gap: 4px;
  margin-right: 8px;
}

.kennel-view-toggle .btn-secondary.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.kennel-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 4px 0 14px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.kennel-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kennel-legend-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-style: italic;
}

.kennel-legend-hint::before { content: '↕'; font-style: normal; }

.kennel-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  display: inline-block;
}

.kennel-swatch-empty { background: var(--card-bg); }
.kennel-swatch-occupied { background: var(--color-info-tint); border-color: var(--color-info-border); }
.kennel-swatch-warning { background: var(--color-danger-tint); border-color: var(--color-danger-border); }
.kennel-swatch-arriving { background: var(--color-success-tint); border-color: var(--color-success-border); }
.kennel-swatch-leaving { background: var(--color-warning-tint); border-color: var(--color-warning-border); }

/* The map mirrors the building: each row of runs is a vertical column,
   in the shop's own order, with an aisle between rows that face each other
   (a narrower gap otherwise). Vertical rather than horizontal so ~15 runs fit
   on screen without horizontal scrolling — a run directly above/below shares
   a wall, a run across the aisle faces it. The column template is set inline
   by renderKennelMap() since the row count varies by shop. A kennel with
   many rows scrolls sideways rather than squeezing every column. */
.kennel-map {
  --kennel-aisle-w: 56px;
  --kennel-gap-w: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  background: var(--bg);
}

.kennel-map-empty {
  padding: 16px;
  margin: 0;
}

.kennel-map-head {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  background: var(--color-neutral-tint);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-align: center;
}

.kennel-aisle-label {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* One shared grid for the whole map body (not one independent grid per row)
   so a double run's cell can span two row tracks via an explicit grid-row --
   that's what makes it render at literally twice the height of a single run,
   matching the real run's floor space, rather than just a differently
   bordered box the same size as everything else. Single runs, and the aisle
   filler, get explicit 1-row/full-height placements alongside it -- see
   renderKennelMap's layoutMapSide() in app.js for the row-index bookkeeping. */
.kennel-map-body {
  display: grid;
  gap: 8px;
  padding: 4px 12px;
  align-items: stretch;
}

.kennel-aisle {
  border-left: 1px dashed var(--border-strong);
  border-right: 1px dashed var(--border-strong);
  background: repeating-linear-gradient(
    45deg, transparent, transparent 5px,
    rgba(0, 0, 0, 0.03) 5px, rgba(0, 0, 0, 0.03) 10px
  );
}

.kennel-run {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  cursor: pointer;
  transition: box-shadow 0.12s, transform 0.12s;
}

.kennel-run:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.kennel-run-none {
  border: 1px dashed var(--border);
  background: transparent;
  cursor: default;
}

.kennel-run-none:hover { box-shadow: none; transform: none; }

.kennel-run-num {
  flex: 0 0 auto;
  min-width: 34px;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  color: var(--text);
}

.kennel-double-badge {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.kennel-run-double { border-width: 2px; }
.kennel-run-empty .kennel-run-num { color: var(--text-secondary); }
.kennel-run-occupied { background: var(--color-info-tint); border-color: var(--color-info-border); }
.kennel-run-warning { background: var(--color-danger-tint); border-color: var(--color-danger); }
.kennel-run-arriving { background: var(--color-success-tint); border-color: var(--color-success-border); }
.kennel-run-leaving { background: var(--color-warning-tint); border-color: var(--color-warning-border); }
/* Daycare is a service TYPE, not a status like the others above -- shown
   with its own color so it reads distinctly from an overnight boarding
   drop-off/pickup day at a glance. */
.kennel-run-daycare { background: var(--color-daycare-tint); border-color: var(--color-daycare-border); }

.kennel-occupant {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  line-height: 1.25;
}

.kennel-occupant-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kennel-occupant-arrived {
  border-left: 3px solid var(--color-success);
  padding-left: 4px;
  margin-left: -7px;
}

/* Checked-out overrides the arrived look (it's the further-along state) --
   greyed out, since the run is effectively free even though the schedule
   still shows the stay through its checkOut date. */
.kennel-occupant-checked-out {
  border-left: 3px solid var(--color-neutral);
  padding-left: 4px;
  margin-left: -7px;
  opacity: 0.6;
}

/* An outline rather than the border-left/margin trick the status classes
   above use, so it composes cleanly no matter which of arrived/checked-out
   is also present -- daycare is an orthogonal thing (type, not status). */
.kennel-occupant-daycare {
  box-shadow: inset 0 0 0 1px var(--color-daycare-border);
  border-radius: var(--radius-sm);
  padding: 1px 3px;
}

.kennel-status-toggles {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kennel-status-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

.kennel-status-toggle .kennel-toggle-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.kennel-arrived-checkbox,
.kennel-checkedout-checkbox {
  width: 13px;
  height: 13px;
  cursor: pointer;
}

.kennel-arrived-checkbox { accent-color: var(--color-success); }
.kennel-checkedout-checkbox { accent-color: var(--color-neutral); }

.kennel-undo-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: underline;
  color: var(--text-secondary);
  cursor: pointer;
  align-self: flex-start;
}
.kennel-undo-link:hover { color: var(--text-primary); }

.kennel-flag-arrived { color: var(--color-success-hover); }
.kennel-flag-checked-out { color: var(--color-neutral-hover); }
.kennel-flag-late { color: var(--color-warning-hover); }
.kennel-flag-daycare { color: var(--color-daycare-hover); font-weight: 700; }

.kennel-pet {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kennel-owner {
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kennel-empty-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-style: italic;
}

.kennel-flag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.kennel-warnings {
  border: 1px solid var(--color-danger-border);
  background: var(--color-danger-tint);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 14px;
}

.kennel-warnings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-danger-hover);
  cursor: pointer;
  text-align: left;
}

/* Overrides the global button:hover (styles.css above), which paints a dark
   red background -- combined with this button's own red text, that made the
   label briefly invisible on hover/focus (red on red). Stays flat like a
   plain toggle instead of picking up the app-wide button hover treatment. */
.kennel-warnings-toggle:hover,
.kennel-warnings-toggle:active {
  background: none;
  box-shadow: none;
  transform: none;
}

.kennel-warnings-chevron {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: underline;
}

.kennel-warnings ul {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 0.86rem;
}

/* ---------- Kennel month grid ---------- */

.kennel-grid-wrap {
  max-height: 70vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.kennel-grid-table {
  font-size: 0.78rem;
  width: max-content;
  min-width: 100%;
}

.kennel-grow {
  display: flex;
  align-items: stretch;
}

/* The run number column stays put while the month scrolls sideways —
   without it, a row 31 columns wide is unreadable. */
.kennel-grow-label {
  position: sticky;
  left: 0;
  z-index: 2;
  flex: 0 0 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: var(--card-bg);
  font-weight: 700;
  border-right: 2px solid var(--border-strong);
  border-bottom: 1px solid var(--border);
}

.kennel-grow-label-double { background: var(--color-neutral-tint); }

.kennel-grow-head {
  position: sticky;
  top: 0;
  z-index: 3;
}

.kennel-grow-head .kennel-grow-label {
  z-index: 4;
  background: var(--color-neutral-tint);
}

.kennel-track {
  position: relative;
  display: flex;
  flex: 0 0 auto;
}

.kennel-day {
  flex: 0 0 34px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.kennel-day[data-run] { cursor: pointer; }
.kennel-day[data-run]:hover { background: var(--primary-tint); }

.kennel-day-head {
  background: var(--color-neutral-tint);
  padding: 4px 0;
  text-align: center;
  font-weight: 600;
  line-height: 1.15;
}

.kennel-dow {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.kennel-weekend { background: var(--color-warning-tint); }

/* A single hairline down today's column, not a boxed-in highlight — it has
   to be findable at a glance without competing with the stay bars. */
.kennel-is-today { box-shadow: inset 2px 0 0 var(--primary); }
.kennel-day-head.kennel-is-today { color: var(--primary); font-weight: 700; }

/* A stay is positioned by date rather than snapped to whole cells, so a
   check-out and the next check-in meet in the middle of the same day
   column — that half-cell is what makes same-day turnover legible. */
.kennel-bar {
  position: absolute;
  height: 20px;
  border-radius: 4px;
  background: var(--color-info-tint);
  border: 1px solid var(--color-info-border);
  border-left: 3px solid var(--color-info);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: filter 0.12s;
}

.kennel-bar:hover { filter: brightness(0.95); }

/* Layered in this order: daycare (purple) is the base type color, arrived
   (green) overrides it once dropped off, checked-out overrides that (grey --
   picked up is a further-along state than merely arrived), late adds an
   outline on top of any of these, and warning always wins outright since a
   health flag is the most urgent thing on the board. */
.kennel-bar-daycare {
  background: var(--color-daycare-tint);
  border-color: var(--color-daycare-border);
  border-left-color: var(--color-daycare);
}

.kennel-bar-arrived {
  background: var(--color-success-tint);
  border-color: var(--color-success-border);
  border-left-color: var(--color-success);
}

.kennel-bar-checked-out {
  background: var(--color-neutral-tint);
  border-color: var(--color-neutral-border);
  border-left-color: var(--color-neutral);
  opacity: 0.7;
}

.kennel-bar-late {
  box-shadow: inset 0 0 0 1px var(--color-warning);
}

.kennel-bar-warning {
  background: var(--color-danger-tint);
  border-color: var(--color-danger-border);
  border-left-color: var(--color-danger);
  opacity: 1;
}

.kennel-bar-label {
  padding: 0 6px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kennel-bar-owner {
  font-weight: 400;
  color: var(--text-secondary);
}

.kennel-side-divider .kennel-track {
  background: var(--color-neutral-tint);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-bottom: 1px solid var(--border);
}

.kennel-side-divider .kennel-grow-label { background: var(--color-neutral-tint); }

/* ---------- Dragging a dog into another run ---------- */

.kennel-bar[draggable='true'],
.kennel-occupant[draggable='true'] { cursor: grab; }

.kennel-dragging {
  opacity: 0.4;
  cursor: grabbing;
}

/* Hover affordances are suppressed mid-drag: a row lighting up because the
   pointer crossed it competes with the free/taken painting, and the two
   together read as noise exactly when precision matters. */
body.kennel-drag-active .kennel-day[data-run]:hover { background: none; }
body.kennel-drag-active .kennel-run:hover { transform: none; box-shadow: none; }

/* Free / taken is carried by colour AND a left rail, so the two states remain
   distinguishable without relying on colour alone. */
.kennel-grow.kennel-drop-ok .kennel-track { background: var(--color-success-tint); }
.kennel-grow.kennel-drop-caution .kennel-track { background: var(--color-warning-tint); }
.kennel-grow.kennel-drop-blocked .kennel-track { opacity: 0.45; }

.kennel-grow.kennel-drop-ok .kennel-grow-label {
  box-shadow: inset 3px 0 0 var(--color-success);
}
.kennel-grow.kennel-drop-caution .kennel-grow-label {
  box-shadow: inset 3px 0 0 var(--color-warning);
}

/* The weekend tint would otherwise punch two coloured holes in the middle of
   a highlighted row and break it up as a single readable band. */
.kennel-grow.kennel-drop-ok .kennel-weekend,
.kennel-grow.kennel-drop-caution .kennel-weekend,
.kennel-grow.kennel-drop-over .kennel-weekend { background: transparent; }

.kennel-grow.kennel-drop-over .kennel-track {
  background: var(--color-success-tint);
  outline: 2px solid var(--color-success);
  outline-offset: -2px;
}

.kennel-run.kennel-drop-ok {
  background: var(--color-success-tint);
  border-color: var(--color-success);
  border-style: dashed;
}
.kennel-run.kennel-drop-caution {
  background: var(--color-warning-tint);
  border-color: var(--color-warning);
  border-style: dashed;
}
.kennel-run.kennel-drop-blocked { opacity: 0.4; }

.kennel-run.kennel-drop-over {
  background: var(--color-success-tint);
  border-color: var(--color-success);
  border-style: solid;
  box-shadow: 0 0 0 3px var(--color-success-border);
}

/* ---------- Kennel booking form ---------- */

.kennel-booking-client {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.kennel-date-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 12px;
}

.kennel-notes-field { flex: 1 1 260px; }

.kennel-pet-warning {
  font-size: 0.74rem;
  color: var(--color-danger-hover);
  font-weight: 600;
}

.kennel-quote {
  margin: 12px 0;
}

.kennel-quote-lines {
  font-size: 0.86rem;
  max-width: 380px;
}

.kennel-quote-lines > div {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}

.kennel-quote-sub {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 4px !important;
  color: var(--text-secondary);
}

.kennel-quote-override { color: var(--color-warning-hover); font-weight: 600; }
.kennel-quote-late { color: var(--color-warning-hover); font-weight: 600; }

.kennel-quote-total {
  margin-top: 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

@media (max-width: 720px) {
  .kennel-map {
    --kennel-aisle-w: 24px;
    --kennel-gap-w: 8px;
  }
  .kennel-map-head,
  .kennel-map-body {
    gap: 4px;
    padding: 3px 6px;
  }
  .kennel-run { padding: 4px 6px; gap: 6px; }
  .kennel-pet { font-size: 0.8rem; }
  .kennel-owner { font-size: 0.7rem; }
}

/* ---- Settings update panel ---------------------------------
   Uses the info palette, not success/warning: an available update is neutral
   news. */

.update-panel {
  padding: 14px;
  margin-bottom: 20px;
  background: var(--color-neutral-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.update-panel-available {
  background: var(--color-info-tint);
  border-color: var(--color-info-border);
}

.update-panel h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.update-panel .subtitle { margin: 0 0 8px; }
.update-panel .actions-row { margin-bottom: 0; }


/* Kennel layout editor (Kennel Rates & Setup): one bordered card per row. */
.kennel-layout-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}

.kennel-layout-row-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.kennel-settings-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}
