@layer reset, tokens, base, layout, components, views, utils;

@layer reset {
  * { box-sizing: border-box; }
  body { margin: 0; min-height: 100vh; }
  button, input, select, textarea { font: inherit; }
  button { cursor: pointer; }
}

/* Automations & Customer Communication Core v1 */
@layer views {
.automation-v1 {
  display: grid;
  gap: var(--space-5);
  min-width: 0;
}

.automation-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-6);
  background: linear-gradient(135deg, var(--surface) 0%, #f1faf6 100%);
}

.automation-hero h2,
.automation-detail-intro h2,
.automation-section-header h2,
.automation-preview-copy h2,
.automation-test-card h2 {
  margin: 4px 0 6px;
}

.automation-hero p,
.automation-detail-intro p,
.automation-section-header p,
.automation-preview-copy > p,
.automation-test-card > p {
  margin: 0;
  color: var(--text-secondary);
}

.automation-today {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}

.automation-today span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 44px;
  padding: 11px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.automation-today strong { color: var(--text-primary); }
.automation-today .needs-attention { background: #fff7e8; color: #8a5a10; }

.automation-safe-mode {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 18px;
  border: 1px solid #cde1ef;
  border-radius: var(--radius-lg);
  background: #f2f8fc;
  color: var(--text-secondary);
}

.automation-safe-mode strong { color: var(--text-primary); white-space: nowrap; }

.automation-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.automation-card {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-5);
  border-color: color-mix(in srgb, var(--border) 72%, #c5eadc);
  background: var(--surface-raised);
}

.automation-card.is-disabled { background: color-mix(in srgb, var(--surface) 92%, white); }

.automation-card > header,
.automation-detail-intro,
.automation-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.automation-card h3 { margin: 4px 0 0; font-size: var(--font-size-lg); }
.automation-description { margin: 0; color: var(--text-secondary); max-width: 58ch; }

.automation-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0;
}

.automation-facts > div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.automation-facts dt {
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.automation-facts dd { margin: 0; color: var(--text-primary); font-weight: 650; }

.automation-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}

.automation-card-actions .button { min-height: 44px; }

.status-pill.status-sent,
.status-pill.is-success { background: #e8f7ef; color: #176444; }
.status-pill.status-failed { background: #fff0ed; color: #9c3327; }
.status-pill.status-queued,
.status-pill.status-processing { background: #edf5fb; color: #275f84; }
.status-pill.status-suppressed,
.status-pill.is-muted { background: #f0f2f4; color: #5f6d78; }

.automation-history { min-width: 0; padding: var(--space-5); }
.automation-history-list { display: grid; margin-top: var(--space-3); }

.automation-history-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.automation-history-row:last-child { border-bottom: 0; }
.automation-history-row time,
.automation-history-row > div { display: grid; gap: 2px; min-width: 0; }
.automation-history-row span,
.automation-history-row small { color: var(--text-secondary); }
.automation-history-row > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.automation-detail-header { display: grid; gap: var(--space-3); }
.automation-detail-intro { padding: var(--space-5); }
.back-link { color: var(--text-secondary); font-weight: 650; text-decoration: none; }
.back-link:hover { color: var(--primary); }
.automation-detail-grid,
.automation-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr);
  gap: var(--space-4);
  align-items: start;
}

.automation-edit-card,
.automation-test-card,
.automation-preview-copy { padding: var(--space-5); }
.automation-edit-form { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
.automation-edit-form select { min-height: 46px; }
.automation-edit-form > .button { justify-self: start; }

.automation-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 58px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #f1faf6;
  cursor: pointer;
}

.automation-switch-row span { display: grid; gap: 2px; }
.automation-switch-row small { color: var(--text-secondary); }
.automation-switch-row input { width: 22px; height: 22px; accent-color: var(--primary); }

.automation-test-card { display: grid; gap: var(--space-3); background: #fffaf1; }
.automation-test-card form { margin: 0; }
.automation-test-card .button { width: 100%; min-height: 44px; }
.safe-note { color: var(--text-secondary); }

.automation-email-preview {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.automation-email-preview > header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: #edf8f3;
}

.automation-email-preview > header > div { display: grid; }
.automation-email-preview > header small { color: var(--text-secondary); }
.automation-brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  font-weight: 800;
}

.automation-email-meta {
  display: grid;
  gap: 3px;
  padding: 14px var(--space-5);
  border-bottom: 1px solid var(--border);
}

.automation-email-meta span { color: var(--text-secondary); font-size: var(--font-size-xs); }
.automation-email-body { min-height: 240px; padding: var(--space-6) var(--space-5); line-height: 1.7; }
.automation-email-preview footer { padding: 14px var(--space-5); background: var(--surface); color: var(--text-secondary); font-size: var(--font-size-sm); }

.today-automation-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 64px;
  padding: 12px 16px;
  color: inherit;
  text-decoration: none;
  background: #f1faf6;
}

.today-automation-summary > span:nth-child(2) { display: grid; }
.today-automation-summary small { color: var(--text-secondary); }
.today-automation-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: #d9f1e7; color: #176444; font-weight: 800; }
.today-automation-counts { color: var(--text-secondary); }
.today-automation-counts b { color: #9c3327; }

@media (max-width: 1024px) {
  .automation-hero { align-items: flex-start; }
  .automation-detail-grid,
  .automation-preview-grid { grid-template-columns: minmax(0, 1fr); }
  .automation-test-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .automation-test-card .eyebrow,
  .automation-test-card h2,
  .automation-test-card > p,
  .automation-test-card .safe-note { grid-column: 1; }
  .automation-test-card > a,
  .automation-test-card > form { grid-column: 2; }
}

@media (max-width: 700px) {
  .automation-v1 { gap: var(--space-3); }
  .automation-hero,
  .automation-card,
  .automation-history,
  .automation-detail-intro,
  .automation-edit-card,
  .automation-test-card,
  .automation-preview-copy { padding: var(--space-4); }
  .automation-hero,
  .automation-safe-mode,
  .automation-card > header,
  .automation-detail-intro,
  .automation-section-header { align-items: flex-start; flex-direction: column; }
  .automation-today { justify-content: flex-start; width: 100%; }
  .automation-today span { flex: 1 1 140px; }
  .automation-card-grid { grid-template-columns: minmax(0, 1fr); }
  .automation-facts { grid-template-columns: minmax(0, 1fr); }
  .automation-card-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .automation-card-actions .button { width: 100%; }
  .automation-history-row { grid-template-columns: 78px minmax(0, 1fr); gap: var(--space-3); }
  .automation-history-row > .status-pill { grid-column: 2; justify-self: start; }
  .automation-history-row > div > span { white-space: normal; }
  .automation-test-card { display: grid; grid-template-columns: minmax(0, 1fr); }
  .automation-test-card > a,
  .automation-test-card > form { grid-column: 1; }
  .automation-edit-form > .button { width: 100%; }
  .automation-email-body { min-height: 200px; padding: var(--space-5) var(--space-4); }
  .automation-email-preview > header,
  .automation-email-meta,
  .automation-email-preview footer { padding-left: var(--space-4); padding-right: var(--space-4); }
  .today-automation-summary { grid-template-columns: auto minmax(0, 1fr) auto; }
  .today-automation-counts { grid-column: 2; }
}
}

@layer tokens {
  :root {
    --bg: #eef5fb;
    --bg2: #e2edf7;
    --paper: #ffffff;
    --soft: #f7fbff;
    --side: #ddeaf6;
    --text: #18212d;
    --muted: #5f7388;
    --line: #c6d8e7;
    --brand: #315d88;
    --brand2: #d8e9f7;
    --accent: #d77f22;
    --clay: #c76a2a;
    --amber: #efb356;
    --ok: #4f7fa9;
    --bad: #b95d53;
    --shadow: 0 22px 55px rgb(72 52 34 / 12%);
    --soft-shadow: 0 10px 24px rgb(72 52 34 / 8%);
  }

  html[data-palette="natural"] {
    --bg: #eef5fb;
    --bg2: #e2edf7;
    --paper: #ffffff;
    --soft: #f7fbff;
    --side: #ddeaf6;
    --text: #18212d;
    --muted: #5f7388;
    --line: #c6d8e7;
    --brand: #315d88;
    --brand2: #d8e9f7;
    --accent: #d77f22;
    --clay: #c76a2a;
    --amber: #efb356;
    --ok: #4f7fa9;
    --bad: #b95d53;
  }

  html[data-palette="sage"] {
    --bg: #f2f3ea; --bg2: #e7ebdd; --paper: #fffdf5; --soft: #eef2e5;
    --side: #dde5d0; --text: #202719; --muted: #78816c; --line: #d6ddc9;
    --brand: #526541; --brand2: #e0e8d6; --accent: #716047; --clay: #a87955;
  }

  html[data-palette="sepia"] {
    --bg: #efe4d7; --bg2: #e1d0bc; --paper: #fff8ec; --soft: #f4e7d6;
    --side: #d7c0a6; --text: #261b12; --muted: #806d5a; --line: #d5bfa5;
    --brand: #5b4b36; --brand2: #e7d8c7; --accent: #735537; --clay: #a86e4d;
  }

  html[data-palette="mineral"] {
    --bg: #eef1ef; --bg2: #dce4df; --paper: #fbfcf7; --soft: #e9efea;
    --side: #d4dfd6; --text: #1e2924; --muted: #66746d; --line: #c9d4cc;
    --brand: #3f5c4d; --brand2: #dde9e0; --accent: #665844; --clay: #98725b;
  }

  html[data-palette="rosewood"] {
    --bg: #f5ece7; --bg2: #ebdad1; --paper: #fff9f5; --soft: #f4e6de;
    --side: #dfc8bc; --text: #2b1e1a; --muted: #826b61; --line: #d9c3b7;
    --brand: #604338; --brand2: #eaddd5; --accent: #7b5544; --clay: #a4644f;
  }

  html[data-palette="espresso"] {
    color-scheme: dark;
    --bg: #16120e; --bg2: #211a13; --paper: #2a2118; --soft: #33281f;
    --side: #211a13; --text: #fff9f0; --muted: #b9a892; --line: #4a3a2c;
    --brand: #afc091; --brand2: #394730; --accent: #d8c1a5; --clay: #d69a72;
    --shadow: 0 22px 55px rgb(0 0 0 / 32%);
    --soft-shadow: 0 10px 24px rgb(0 0 0 / 25%);
  }
}

@layer base {
  body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
    background:
      radial-gradient(circle at 80% 12%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 34%),
      radial-gradient(circle at 14% 20%, color-mix(in srgb, var(--clay) 15%, transparent), transparent 30%),
      linear-gradient(135deg, var(--bg), var(--bg2));
  }
  html { scroll-behavior: smooth; }

  body.auth-body { display: grid; place-items: center; padding: 24px; }
  a { color: inherit; text-decoration: none; }
  svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.9;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  h1 { margin: 0; font-size: clamp(1.45rem, 2vw, 2.1rem); letter-spacing: 0; }
  h2 { margin: 0; font-size: 1.08rem; letter-spacing: 0; }
  p { margin: 0; }
  .customer-portal [id],
  .booking-flow [id],
  .pet-portal [id] {
    scroll-margin-top: 92px;
  }
}

@layer layout {
  .app { display: grid; grid-template-columns: 304px minmax(0, 1fr); min-height: 100vh; }
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: linear-gradient(180deg, var(--side), color-mix(in srgb, var(--side) 75%, var(--paper)));
    border-right: 1px solid var(--line);
  }
  .content { padding: 28px; min-width: 0; }
  .content .customer-portal,
  .content .booking-flow,
  .content .pet-portal {
    max-width: 1400px;
  }
  .customer-page-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin: 0 0 16px;
    position: sticky;
    top: 12px;
    z-index: 8;
    padding: 10px 0 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 96%, transparent), transparent);
    backdrop-filter: blur(8px);
  }
  .customer-page-nav::-webkit-scrollbar { display: none; }
  .customer-page-nav { scrollbar-width: none; }
  .customer-page-nav .button {
    padding: 9px 12px;
    border-radius: 13px;
    font-size: 13px;
    box-shadow: none;
  }
  .customer-page-nav .button.ghost {
    background: color-mix(in srgb, var(--paper) 86%, transparent);
  }
  .topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
  }
  .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .inline-actions { margin-top: 10px; }
  .actions form { margin: 0; }
  .grid { display: grid; gap: 16px; margin-bottom: 16px; }
  .stats { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
  .two { grid-template-columns: minmax(0, 1.22fr) minmax(330px, .78fr); }
  .mobilebar { display: none; }
}

@layer components {
  .brand { display: flex; align-items: center; gap: 12px; font-weight: 950; letter-spacing: .02em; }
  .brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    background: transparent;
    border: 0;
    box-shadow: none;
    flex: 0 0 auto;
  }
  .brand-mark svg {
    width: 100%;
    height: 100%;
    display: block;
  }
  .brand small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    margin-top: 2px;
  }
  .palette-box {
    padding: 12px;
    background: color-mix(in srgb, var(--paper) 52%, transparent);
    border: 1px solid var(--line);
    border-radius: 20px;
  }
  .palette-box label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
  }
  .nav { display: flex; flex-direction: column; gap: 7px; }
  .nav-item {
    min-height: 44px;
    padding: 12px 13px;
    border-radius: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    text-align: left;
  }
  .nav-item:hover { background: color-mix(in srgb, var(--paper) 55%, transparent); }
  .nav-item.active {
    background: var(--brand);
    color: var(--paper);
    box-shadow: 0 14px 28px color-mix(in srgb, var(--brand) 24%, transparent);
  }
  .nav-item.active .nav-icon { color: var(--paper); }
  .nav-icon {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: var(--brand);
    flex: 0 0 auto;
  }
  .sidebar-footer { margin-top: auto; color: var(--muted); font-size: 13px; }
  .eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 850; }
  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 15px;
    background: var(--brand);
    color: var(--paper);
    font-weight: 850;
    border: 1px solid var(--brand);
    box-shadow: 0 12px 25px color-mix(in srgb, var(--brand) 20%, transparent);
  }
  .button.ghost {
    background: var(--paper);
    color: var(--text);
    border-color: var(--line);
    box-shadow: none;
  }
  .button.quiet {
    padding: 8px 11px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
  }
  .card, .panel, .customer-shell, .auth-panel {
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    padding: 18px;
  }
  .card small { color: var(--muted); font-weight: 850; }
  .card strong { display: block; font-size: 28px; margin: 8px 0 2px; }
  .card span { color: var(--brand); font-size: 13px; font-weight: 850; }
  .section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
  }
  .section-description {
    color: var(--muted);
    font-size: 13px;
    margin-top: 5px;
    max-width: 720px;
  }
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--brand2);
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }
  .badge.ok { background: color-mix(in srgb, var(--ok) 18%, var(--paper)); color: var(--ok); }
  .badge.subtle { background: color-mix(in srgb, var(--soft) 72%, var(--paper)); color: var(--muted); }
  .badge.warn {
    background: color-mix(in srgb, var(--amber) 18%, var(--paper));
    color: #8c6538;
  }
  .notice {
    border: 1px dashed color-mix(in srgb, var(--brand) 42%, var(--line));
    background: color-mix(in srgb, var(--brand2) 62%, var(--paper));
    border-radius: 20px;
    padding: 14px;
    margin-bottom: 16px;
  }
  .notice p { color: var(--muted); margin-top: 4px; }
  table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
  th { text-align: left; color: var(--muted); font-size: 13px; padding: 0 10px; }
  td {
    background: color-mix(in srgb, var(--soft) 78%, var(--paper));
    padding: 14px 10px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  td:first-child { border-left: 1px solid var(--line); border-radius: 15px 0 0 15px; }
  td:last-child { border-right: 1px solid var(--line); border-radius: 0 15px 15px 0; }
  .row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: color-mix(in srgb, var(--soft) 76%, var(--paper));
    margin-bottom: 10px;
  }
  .row p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
  .premium-list { display: grid; gap: 10px; }
  .record-list {
    display: grid;
    gap: 12px;
  }
  .record-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
      linear-gradient(145deg, color-mix(in srgb, var(--soft) 80%, var(--paper)), var(--paper));
    box-shadow: var(--soft-shadow);
  }
  .record-title {
    display: inline-block;
    font-weight: 900;
    text-decoration: none;
    color: var(--text);
  }
  .record-main {
    display: grid;
    gap: 7px;
    min-width: 0;
  }
  .record-main p {
    color: var(--muted);
    font-size: 13px;
  }
  .record-with-icon {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }
  .record-meta {
    display: grid;
    justify-items: end;
    gap: 10px;
  }
  .record-actions {
    justify-content: flex-end;
    margin-top: 0;
  }
  .table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }
  .table-actions .button,
  .record-actions .button {
    white-space: nowrap;
  }
  .quiet-action-form { margin: 0; }
  .soft-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: color-mix(in srgb, var(--soft) 76%, var(--paper));
  }
  .soft-row p,
  .soft-row span {
    color: var(--muted);
    font-size: 13px;
  }
  .soft-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 21px;
    background: color-mix(in srgb, var(--soft) 78%, var(--paper));
  }
  .soft-card h3 { margin: 0; font-size: .96rem; }
  .soft-card strong {
    display: block;
    margin-top: 10px;
    font-size: 22px;
  }
  .soft-card p { color: var(--muted); font-size: 13px; margin-top: 4px; }
  select, input, textarea {
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--paper);
    color: var(--text);
    padding: 11px 12px;
    outline: 0;
  }
  textarea { min-height: 96px; resize: vertical; }
  .toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
  .toolbar input, .toolbar select, .stack-form input, .stack-form select, .stack-form textarea {
    width: 100%;
  }
  .stack-form { display: grid; gap: 10px; }
  .stack-form p {
    display: grid;
    gap: 6px;
    margin: 0;
    color: var(--muted);
    font-weight: 750;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-radius: 17px;
    background: color-mix(in srgb, var(--soft) 52%, transparent);
  }
  .stack-form label { color: var(--text); font-size: 13px; }
  .stack-form .helptext { color: var(--muted); font-size: 12px; font-weight: 500; }
  .action-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
  .action-link { margin-top: 16px; width: 100%; }
  .customer-shell { min-height: 360px; display: grid; align-items: center; }
  .customer-shell p { color: var(--muted); max-width: 680px; }
  .quick-action-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
  }
  .empty-state {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px dashed color-mix(in srgb, var(--brand) 42%, var(--line));
    border-radius: 20px;
    background: color-mix(in srgb, var(--brand2) 42%, var(--paper));
  }
  .empty-state.compact { padding: 12px; }
  .empty-state p { color: var(--muted); font-size: 13px; }
  .pet-inline-icon,
  .tile-pet-icon {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--soft-shadow);
    font-size: 18px;
  }
  .auth-shell { width: min(420px, 100%); }
  .auth-panel { display: grid; gap: 22px; }
  .error-body {
    background:
      radial-gradient(circle at 82% 8%, color-mix(in srgb, var(--clay) 20%, transparent), transparent 32%),
      linear-gradient(135deg, var(--bg), var(--bg2));
  }
  .error-panel {
    text-align: left;
  }
  .error-panel p:not(.eyebrow) {
    color: var(--muted);
    margin-top: 8px;
  }
  .error-code {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 26px;
    background: var(--brand);
    color: var(--paper);
    font-size: 24px;
    font-weight: 950;
    box-shadow: var(--soft-shadow);
  }
}

@layer views {
  .stat-card {
    background:
      radial-gradient(circle at 82% 12%, color-mix(in srgb, var(--clay) 18%, transparent), transparent 34%),
      color-mix(in srgb, var(--paper) 88%, transparent);
  }
  .stat-card small { color: var(--muted); }
  .stat-card strong { font-size: 30px; }
  .stat-card span { color: var(--brand); }
  .calendar-filter { grid-template-columns: 120px repeat(3, minmax(130px, 1fr)) auto; }
  .calendar-list { display: grid; gap: 10px; }
  .calendar-timeline {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    margin: 16px 0;
  }
  .calendar-dnd-status {
    min-height: 42px;
    display: grid;
    align-items: center;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: color-mix(in srgb, var(--soft) 62%, var(--paper));
    font-size: 13px;
    font-weight: 850;
  }
  .calendar-dnd-status:empty {
    display: none;
  }
  .calendar-dnd-status.success {
    color: var(--ok);
    border-color: color-mix(in srgb, var(--ok) 36%, var(--line));
    background: color-mix(in srgb, var(--ok) 12%, var(--paper));
  }
  .calendar-dnd-status.error {
    color: var(--bad);
    border-color: color-mix(in srgb, var(--bad) 36%, var(--line));
    background: color-mix(in srgb, var(--bad) 12%, var(--paper));
  }
  .timeline-hours {
    display: grid;
    grid-template-rows: repeat(8, minmax(58px, auto));
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    padding-top: 10px;
  }
  .timeline-board {
    min-height: 540px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-content: start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
      repeating-linear-gradient(
        to bottom,
        color-mix(in srgb, var(--soft) 54%, transparent) 0,
        color-mix(in srgb, var(--soft) 54%, transparent) 57px,
        color-mix(in srgb, var(--line) 54%, transparent) 58px,
        color-mix(in srgb, var(--line) 54%, transparent) 59px
      ),
      color-mix(in srgb, var(--paper) 72%, transparent);
  }
  .calendar-drop-slot {
    min-height: 128px;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 10px;
    border: 1px dashed color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 18px;
    background: color-mix(in srgb, var(--paper) 58%, transparent);
  }
  .calendar-drop-slot.drop-target {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand2) 58%, var(--paper));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent);
  }
  .slot-label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
  }
  .slot-label strong {
    color: var(--text);
  }
  .calendar-empty {
    grid-column: 1 / -1;
  }
  .appointment-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin: 14px 0;
  }
  .calendar-appointment-tile {
    display: grid;
    gap: 5px;
    min-height: 168px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
    background:
      radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--clay) 20%, transparent), transparent 36%),
      var(--paper);
    box-shadow: var(--soft-shadow);
  }
  .calendar-appointment-tile.is-cancelled {
    opacity: .58;
    filter: grayscale(.35);
    border-style: dashed;
  }
  .calendar-appointment-tile small { color: var(--muted); }
  .calendar-appointment-tile .badge { justify-self: start; }
  .tile-time {
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
  }
  .dnd-ready { cursor: grab; }
  .drag-preview {
    opacity: .74;
    outline: 2px dashed var(--brand);
  }
  .appointment-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: color-mix(in srgb, var(--soft) 76%, var(--paper));
  }
  .appointment-row p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
  .timebox {
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 8px;
  }
  .timebox span { color: var(--muted); font-size: 12px; }
  .calendar-panel { overflow: hidden; }
  .demo-calendar {
    display: grid;
    grid-template-columns: 72px repeat(5, minmax(128px, 1fr));
    gap: 8px;
    overflow: auto;
    padding-bottom: 6px;
  }
  .time-column {
    display: grid;
    grid-template-rows: repeat(8, 56px);
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    padding-top: 66px;
  }
  .day-column {
    display: grid;
    grid-template-rows: 48px repeat(8, 56px);
    gap: 6px;
    min-width: 130px;
    position: relative;
  }
  .day-head {
    padding: 11px 12px;
    border-radius: 16px;
    background: var(--soft);
    border: 1px solid var(--line);
  }
  .day-head small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
  }
  .slot {
    border: 1px dashed color-mix(in srgb, var(--line) 70%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--soft) 46%, transparent);
  }
  .visit-tile {
    position: absolute;
    left: 4px;
    right: 4px;
    display: grid;
    gap: 2px;
    align-content: start;
    border-radius: 18px;
    padding: 10px 10px 10px 14px;
    background: var(--paper);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
    box-shadow: var(--soft-shadow);
    overflow: hidden;
  }
  .visit-tile::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--brand);
    border-radius: 18px 0 0 18px;
  }
  .visit-tile.clay::before { background: var(--clay); }
  .visit-tile.warn::before { background: var(--amber); }
  .visit-tile small { color: var(--muted); font-size: 12px; }
  .visit-aside { display: grid; gap: 16px; align-content: start; }
  .live-appointments { margin-top: 18px; }
  .pet-card {
    display: grid;
    gap: 14px;
    min-height: 170px;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
      radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--clay) 25%, transparent), transparent 35%),
      linear-gradient(145deg, color-mix(in srgb, var(--brand) 16%, var(--paper)), var(--soft));
  }
  .pet-card.large { min-height: 210px; align-content: start; }
  .pet-card p { color: var(--muted); }
  .pet-icon {
    width: 62px;
    height: 62px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--soft-shadow);
    font-size: 34px;
  }
  .customer-portal {
    display: grid;
    gap: 16px;
  }
  .customer-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
    gap: 18px;
    min-height: 260px;
    align-items: center;
    background:
      radial-gradient(circle at 82% 12%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 34%),
      radial-gradient(circle at 18% 86%, color-mix(in srgb, var(--clay) 14%, transparent), transparent 30%),
      color-mix(in srgb, var(--paper) 88%, transparent);
  }
  .customer-hero h2 {
    font-size: clamp(1.65rem, 3vw, 2.55rem);
  }
  .customer-primary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
  }
  .customer-hero-copy {
    display: grid;
    gap: 10px;
    min-width: 0;
  }
  .customer-hero-copy p:not(.eyebrow) {
    color: var(--muted);
    max-width: 62ch;
  }
  .next-step-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    background: color-mix(in srgb, var(--paper) 74%, var(--brand2));
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
  }
  .next-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 26%, transparent);
    animation: next-step-pulse 1.8s ease-in-out infinite;
  }
  .customer-hero-aside {
    display: grid;
    gap: 10px;
    min-width: 0;
  }
  .summary-tile,
  .detail-item,
  .product-highlight,
  .recommended-item {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--soft) 78%, var(--paper));
  }
  .summary-tile {
    display: grid;
    gap: 4px;
    padding: 14px 15px;
  }
  .summary-tile span,
  .detail-item span,
  .recommended-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
  }
  .summary-tile strong {
    font-size: 1.05rem;
    line-height: 1.2;
  }
  .summary-tile p {
    color: var(--muted);
    font-size: 13px;
  }
  .portal-grid {
    min-height: 0;
    align-items: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .portal-grid-focus {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal-grid-low {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  }
  .customer-step-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.24fr) minmax(300px, .76fr);
    gap: 16px;
  }
  .booking-progress {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .booking-choice-grid,
  .booking-slot-grid {
    display: grid;
    gap: 10px;
  }
  .booking-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .booking-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .booking-choice,
  .booking-slot {
    width: 100%;
    min-height: 108px;
    padding: 14px 15px;
    text-align: left;
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--paper) 92%, var(--soft)), var(--soft));
    box-shadow: var(--soft-shadow);
    color: var(--text);
  }
  .booking-choice strong,
  .booking-slot strong {
    font-size: 1rem;
    line-height: 1.2;
  }
  .booking-choice span,
  .booking-slot span,
  .booking-choice small,
  .booking-slot small {
    color: var(--muted);
    font-size: 12px;
  }
  .booking-choice.active,
  .booking-slot.active {
    border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
    background: color-mix(in srgb, var(--brand2) 68%, var(--paper));
    box-shadow:
      inset 0 0 0 1px color-mix(in srgb, var(--brand) 18%, transparent),
      var(--soft-shadow);
  }
  .booking-confirm-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
  }
  .booking-confirm-actions .button {
    flex: 1 1 220px;
  }
  .pet-switcher {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .pet-switch {
    display: grid;
    gap: 3px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--paper) 88%, var(--soft));
    min-width: 140px;
  }
  .pet-switch strong {
    font-size: .95rem;
  }
  .pet-switch span {
    color: var(--muted);
    font-size: 12px;
  }
  .pet-switch.active {
    color: var(--brand);
    background: color-mix(in srgb, var(--brand2) 68%, var(--paper));
    border-color: color-mix(in srgb, var(--brand) 24%, var(--line));
  }
  .customer-bottom-nav {
    display: none;
  }
  .step-chip {
    display: grid;
    gap: 6px;
    padding: 14px 15px;
  }
  .step-chip span {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--brand2);
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
  }
  .step-chip strong {
    font-size: .98rem;
    line-height: 1.2;
  }
  .step-chip p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
  }
  .customer-dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
    gap: 16px;
    align-items: start;
  }
  .customer-dashboard-main,
  .customer-dashboard-rail {
    display: grid;
    gap: 16px;
    align-content: start;
  }
  .customer-dashboard-main .portal-card,
  .customer-dashboard-rail .portal-card {
    min-height: 0;
  }
  .customer-dashboard-rail {
    position: sticky;
    top: 76px;
  }
  .report-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(300px, .72fr);
    gap: 16px;
    align-items: start;
  }
  .shop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(300px, .72fr);
    gap: 16px;
    align-items: start;
  }
  .shop-main,
  .shop-rail {
    display: grid;
    gap: 16px;
    align-content: start;
  }
  .shop-rail {
    position: sticky;
    top: 76px;
  }
  .report-main,
  .report-rail {
    display: grid;
    gap: 16px;
    align-content: start;
  }
  .report-rail {
    position: sticky;
    top: 76px;
  }
  .portal-card { box-shadow: var(--soft-shadow); }
  .tile-surface {
    box-shadow:
      0 1px 0 color-mix(in srgb, var(--paper) 72%, transparent) inset,
      0 14px 28px rgb(54 52 44 / 8%),
      0 3px 8px rgb(54 52 44 / 6%);
    transform: translateY(0);
    animation: tile-rise .55s ease both;
    animation-delay: var(--tile-delay, 0s);
  }
  .tile-surface:hover {
    transform: translateY(-2px);
    box-shadow:
      0 1px 0 color-mix(in srgb, var(--paper) 72%, transparent) inset,
      0 18px 34px rgb(54 52 44 / 10%),
      0 4px 10px rgb(54 52 44 / 7%);
  }
  .detail-list,
  .history-list {
    display: grid;
    gap: 10px;
  }
  .detail-item {
    padding: 13px 14px;
    display: grid;
    gap: 4px;
  }
  .detail-item strong {
    display: block;
    font-size: 14px;
    line-height: 1.35;
  }
  .product-highlight {
    display: grid;
    gap: 14px;
    padding: 16px;
    margin-bottom: 12px;
  }
  .product-highlight strong {
    display: block;
    font-size: 1.02rem;
    margin: 4px 0;
  }
  .product-highlight p {
    color: var(--muted);
    font-size: 13px;
  }
  .recommended-strip {
    display: grid;
    gap: 8px;
  }
  .recommended-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
  }
  .shop-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
    gap: 14px;
    align-items: start;
  }
  .shop-feature .product-highlight {
    margin-bottom: 0;
  }
  .shop-feature-actions {
    display: grid;
    gap: 10px;
  }
  .shop-request-form {
    margin: 0;
  }
  .shop-request-form .button {
    width: 100%;
  }
  .shop-product-item {
    align-items: center;
  }
  .shop-product-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
  }
  .shop-product-copy strong {
    font-size: .98rem;
    line-height: 1.2;
  }
  .shop-product-copy span {
    color: var(--muted);
    font-size: 12px;
  }
  .shop-recommended-strip {
    gap: 10px;
  }
  .careplan-cards { display: grid; gap: 12px; }
  .care-metrics { display: flex; gap: 8px; flex-wrap: wrap; }
  .mini-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-preview { align-content: start; }
  .integration-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .integration-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: color-mix(in srgb, var(--soft) 78%, var(--paper));
  }
  .integration-card p { color: var(--muted); font-size: 13px; }
  .section-title.compact { margin-top: 4px; margin-bottom: 0; }
}

@layer utils {
  @media (max-width: 1180px) {
    .stats { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .two { grid-template-columns: 1fr; }
    .integration-grid, .mini-metrics, .portal-grid, .portal-grid-focus, .portal-grid-low, .customer-hero, .customer-step-strip {
      grid-template-columns: 1fr;
    }
    .customer-dashboard-layout {
      grid-template-columns: 1fr;
    }
    .report-layout {
      grid-template-columns: 1fr;
    }
    .shop-layout {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 920px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .content {
      padding: 16px 16px calc(16px + env(safe-area-inset-bottom) + 84px);
    }
    .topbar { display: block; margin-bottom: 16px; }
    .topbar h1 { font-size: 1.55rem; }
    .mobilebar {
      display: flex;
      gap: 8px;
      overflow: auto;
      position: sticky;
      top: 0;
      z-index: 20;
      padding: 10px;
      background: var(--paper);
      border-bottom: 1px solid var(--line);
    }
    .customer-actions {
      display: flex;
      flex-wrap: nowrap;
      overflow-x: auto;
      padding-bottom: 2px;
      scrollbar-width: none;
      -ms-overflow-style: none;
      max-width: 100%;
    }
    .customer-actions::-webkit-scrollbar {
      display: none;
    }
    .customer-actions .button {
      flex: 0 0 auto;
      padding: 9px 11px;
      border-radius: 13px;
      font-size: 13px;
      white-space: nowrap;
    }
    .customer-page-nav {
      display: none;
    }
    .customer-dashboard-rail {
      position: static;
    }
    .report-rail {
      position: static;
    }
    .shop-rail {
      position: static;
    }
    .toolbar, .appointment-row, .record-card, .calendar-timeline, .customer-step-strip, .customer-hero {
      display: grid;
      grid-template-columns: 1fr;
    }
    .booking-layout,
    .booking-choice-grid,
    .booking-slot-grid {
      grid-template-columns: 1fr;
    }
    .pet-switcher {
      flex-direction: column;
    }
    .pet-switch {
      width: 100%;
    }
    .customer-hero {
      min-height: 0;
      gap: 12px;
    }
    .booking-flow .customer-hero-aside,
    .booking-flow .customer-step-strip {
      display: none;
    }
    .booking-flow .customer-hero-copy .next-step-hint {
      display: none;
    }
    .booking-flow .booking-layout {
      gap: 10px;
    }
    .customer-hero h2 {
      font-size: 1.75rem;
    }
    .customer-dashboard-layout {
      gap: 12px;
    }
    .customer-dashboard-main,
    .customer-dashboard-rail {
      gap: 12px;
    }
    .customer-primary-actions {
      margin-top: 12px;
    }
    .customer-primary-actions .button {
      width: 100%;
    }
    .customer-step-strip {
      gap: 8px;
    }
    .step-chip {
      padding: 12px 13px;
    }
    .section-description {
      display: none;
    }
    .portal-card,
    .summary-tile,
    .detail-item,
    .product-highlight,
    .step-chip {
      border-radius: 16px;
    }
    .detail-list,
    .history-list,
    .customer-hero-aside {
      gap: 8px;
    }
    .summary-tile {
      padding: 12px 13px;
    }
    .summary-tile strong {
      font-size: .98rem;
    }
    .detail-item,
    .product-highlight,
    .empty-state.compact {
      padding: 12px 13px;
    }
    .customer-dashboard-rail .portal-card {
      min-height: 0;
    }
    .customer-dashboard-rail #shop,
    .customer-dashboard-rail #account {
      display: none;
    }
    .customer-dashboard-main #history {
      display: none;
    }
    .customer-dashboard-main #last-visit {
      order: 2;
    }
    .customer-dashboard-main #next-step {
      order: 1;
    }
    .customer-dashboard-main #pet-plan {
      order: 3;
    }
    .pet-portal .customer-hero-aside .summary-tile:nth-child(3),
    .pet-portal #pet-history .quick-action-grid {
      display: none;
    }
    .pet-portal .customer-hero-copy .next-step-hint {
      display: none;
    }
    .report-rail #history {
      display: none;
    }
    .shop-rail #shop-history {
      display: none;
    }
    .shop-feature {
      grid-template-columns: 1fr;
    }
    .shop-feature .product-highlight {
      margin-bottom: 0;
    }
    .report-main #details {
      order: 2;
    }
    .report-main #recommendations {
      order: 3;
    }
    .record-meta { justify-items: start; }
    .record-actions { justify-content: flex-start; }
    .booking-confirm-actions .button {
      flex: 1 1 100%;
    }
    .customer-bottom-nav {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 4px;
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 30;
      padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
      background: color-mix(in srgb, var(--paper) 92%, transparent);
      border-top: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
      backdrop-filter: blur(14px);
      box-shadow: 0 -10px 24px rgb(54 52 44 / 8%);
    }
    .customer-tab {
      display: grid;
      justify-items: center;
      gap: 4px;
      padding: 9px 4px 7px;
      border-radius: 16px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
      min-width: 0;
    }
    .customer-tab svg {
      width: 18px;
      height: 18px;
    }
    .customer-tab span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 100%;
    }
    .customer-tab.active {
      color: var(--brand);
      background: color-mix(in srgb, var(--brand2) 72%, var(--paper));
      box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 16%, transparent);
    }
  }

  @media (max-width: 560px) {
    .stats { grid-template-columns: 1fr; }
    .summary-tile p,
    .step-chip p,
    .detail-item strong {
      font-size: 12px;
    }
    .recommended-item,
    .customer-step-strip {
      grid-template-columns: 1fr;
      align-items: start;
    }
    .recommended-item {
      padding: 12px 13px;
    }
    .customer-bottom-nav {
      grid-template-columns: repeat(5, minmax(0, 1fr));
      padding-inline: 8px;
    }
    .customer-tab {
      font-size: 10px;
      padding-inline: 2px;
    }
    .booking-choice,
    .booking-slot {
      min-height: 96px;
      padding: 12px 13px;
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    .button, .nav-item, .appointment-row, .row {
      transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
    }
    .button:hover, .appointment-row:hover { transform: translateY(-1px); }
  }
}

@keyframes tile-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes next-step-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 30%, transparent);
  }
  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 10px color-mix(in srgb, var(--brand) 0%, transparent);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 0%, transparent);
  }
}

/* HappyGroomy operational salon workspace */
.salon-today { display: grid; gap: 18px; }
.salon-today-hero { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(220px, .7fr); gap: 18px; }
.today-focus { min-height: 240px; display: grid; align-content: space-between; gap: 18px; }
.today-focus-main { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.today-time { display: block; font-size: clamp(26px, 4vw, 46px); font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.today-focus h3 { margin: 10px 0 4px; font-size: clamp(24px, 3vw, 36px); }
.today-focus p { margin: 0; color: var(--muted); }
.today-focus-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.today-note, .appointment-note { padding: 12px 14px; border-radius: 14px; background: var(--soft); color: var(--muted); }
.today-metrics { display: grid; gap: 12px; }
.metric-card { display: grid; align-content: center; min-height: 0; }
.metric-card span, .metric-card small { color: var(--muted); }
.metric-card strong { font-size: 34px; line-height: 1.15; }
.today-agenda { display: grid; gap: 8px; }
.today-agenda-row { display: grid; grid-template-columns: 58px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; text-decoration: none; color: inherit; background: var(--soft); border: 1px solid transparent; }
.today-agenda-row.is-current { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.today-agenda-row time { font-weight: 800; }
.today-agenda-row div { display: grid; gap: 2px; min-width: 0; }
.today-agenda-row span:not(.badge) { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-button { padding: 8px 11px; min-height: 0; }
.appointment-workspace { display: grid; gap: 18px; }
.appointment-hero { display: grid; gap: 16px; }
.appointment-primary-actions, .appointment-action-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.appointment-action-stack { flex-direction: column; }
.appointment-action-stack .button, .appointment-action-stack form, .appointment-action-stack form .button { width: 100%; }
.appointment-detail-main, .appointment-actions-panel { display: grid; gap: 16px; align-content: start; }
.action-disclosure summary { cursor: pointer; font-weight: 700; }
.action-disclosure[open] summary { margin-bottom: 14px; }
.appointment-note span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.appointment-note p { margin: 6px 0 0; color: inherit; white-space: pre-wrap; }
.visit-card-list { display: grid; gap: 9px; }
.visit-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; background: var(--soft); }
.visit-card.is-next { outline: 1px solid var(--accent); }
.visit-card > div { display: grid; gap: 3px; }
.visit-card small, .visit-time { color: var(--muted); }
.visit-time { font-size: 13px; font-weight: 700; }

@media (max-width: 900px) {
  .salon-today-hero, .salon-day-layout, .appointment-detail-grid { grid-template-columns: 1fr; }
  .today-metrics { grid-template-columns: repeat(3, 1fr); }
  .metric-card { min-height: 105px; }
}
@media (max-width: 640px) {
  .salon-today-hero { gap: 12px; }
  .today-focus { min-height: 0; }
  .today-focus-main { align-items: stretch; flex-direction: column; }
  .today-focus-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .today-focus-actions .button { width: 100%; }
  .today-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
  .metric-card { padding: 12px; min-height: 88px; }
  .metric-card strong { font-size: 28px; }
  .metric-card small { font-size: 11px; }
  .today-agenda-row { grid-template-columns: 46px minmax(0,1fr) auto; padding: 10px; }
  .today-agenda-row .badge { max-width: 78px; overflow: hidden; text-overflow: ellipsis; }
  .appointment-primary-actions { display: grid; grid-template-columns: 1fr; }
  .appointment-primary-actions .button { width: 100%; }
}

/* HappyGroomy B2B marketplace */
.marketplace-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
.marketplace-grid .portal-card { display: flex; flex-direction: column; gap: 14px; }
.inline-order-form { display: flex; align-items: end; gap: 10px; margin-top: auto; }
.inline-order-form label { display: grid; gap: 5px; font-size: .82rem; }
.inline-order-form input[type="number"] { width: 72px; }
.toolbar-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.toolbar-form input[type="search"] { flex: 1 1 280px; }

/* HappyGroomy salon UX refresh */
@layer components {
  .nav { overflow-y: auto; padding-right: 3px; }
  .nav-group { display: grid; gap: 5px; }
  .nav-group + .nav-group { margin-top: 8px; }
  .nav-group-label { padding: 7px 13px 2px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
  .nav-group .nav-item { padding: 10px 13px; }
  .chevron { color: var(--muted); font-weight: 900; font-size: 18px; }
  .record-link { transition: transform .15s ease, border-color .15s ease; }
  .record-link:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); }
  .chip { display: inline-flex; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 13px; font-weight: 800; }
  .chip.active { background: var(--brand); color: var(--paper); border-color: var(--brand); }
}

@layer views {
  .customer-hub-head { margin-bottom: 16px; }
  .customer-search { margin: 14px 0 0; }
  .customer-search input { flex: 1; }
  .customer-hub-grid { grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); }
  .add-record-grid { margin-top: 16px; }
  .pet-profile-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 16px; margin-bottom: 16px; }
  .pet-profile-hero { display: grid; gap: 18px; }
  .pet-profile-title { display: flex; gap: 16px; align-items: center; }
  .pet-profile-title h2 { font-size: 28px; }
  .pet-profile-title p { color: var(--muted); margin-top: 4px; }
  .pet-profile-icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 24px; background: var(--brand2); font-size: 38px; border: 1px solid var(--line); }
  .attention-note { padding: 14px 16px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--amber) 62%, var(--line)); background: color-mix(in srgb, var(--amber) 14%, var(--paper)); }
  .attention-note p { margin-top: 5px; color: var(--muted); }
  .owner-contact-card { display: grid; gap: 8px; align-content: start; }
  .owner-contact-card h3 { margin: 0; font-size: 20px; }
  .owner-contact-card p { color: var(--muted); }
  .timeline-list { display: grid; gap: 9px; }
  .timeline-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 17px; background: color-mix(in srgb, var(--soft) 70%, var(--paper)); }
  .timeline-item time { font-weight: 900; color: var(--brand); }
  .timeline-item time small { display: block; color: var(--muted); font-weight: 700; margin-top: 2px; }
  .timeline-item p { color: var(--muted); font-size: 13px; margin: 3px 0 6px; }
  .service-list { display: grid; gap: 10px; }
  .service-card { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 14px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 19px; background: var(--paper); }
  .service-card.is-muted { opacity: .55; }
  .service-card h3 { margin: 3px 0 0; font-size: 16px; }
  .service-card p { color: var(--muted); font-size: 13px; margin-top: 4px; }
  .service-category { color: var(--muted); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
  .service-price { display: grid; text-align: right; }
  .service-price strong { font-size: 18px; }
  .service-price span { color: var(--muted); font-size: 12px; }
  .narrow-panel { max-width: 760px; }
  .marketplace-shell { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 16px; align-items: start; }
  .marketplace-main { min-width: 0; }
  .marketplace-hero { margin-bottom: 16px; }
  .toolbar-form { display: flex; gap: 8px; margin-top: 16px; }
  .toolbar-form input { flex: 1; }
  .category-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
  .product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 12px; }
  .product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--soft-shadow); }
  .product-visual { height: 112px; display: grid; place-items: center; position: relative; background: linear-gradient(135deg, var(--brand2), color-mix(in srgb,var(--clay) 12%,var(--paper))); }
  .product-visual > span { width: 52px; height: 52px; display: grid; place-items:center; border-radius: 18px; background: var(--paper); color: var(--brand); font-weight: 950; font-size: 24px; }
  .product-visual small { position:absolute; bottom: 9px; left: 12px; color: var(--muted); font-weight: 800; }
  .product-body { padding: 14px; display: grid; gap: 10px; }
  .product-body h3 { margin: 0; font-size: 15px; min-height: 38px; }
  .product-sku { color: var(--muted); font-size: 11px; font-weight: 800; }
  .product-meta { display:flex; justify-content:space-between; gap:8px; align-items:end; }
  .product-meta strong { font-size: 19px; }
  .product-meta span { color:var(--muted); font-size:12px; text-align:right; }
  .product-buy { display:grid; grid-template-columns: 70px 1fr; gap:8px; }
  .product-buy input { width:100%; }
  .marketplace-cart { position: sticky; top: 18px; }
  .cart-list { display:grid; gap:9px; margin:12px 0; }
  .cart-item { display:flex; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
  .cart-item div { display:grid; gap:2px; }
  .cart-item span { color:var(--muted); font-size:12px; }
  .cart-total { display:flex; justify-content:space-between; align-items:center; padding:14px 0; font-size:17px; }
  .cart-total strong { font-size:22px; }
  .cart-checkout { width:100%; justify-content:center; margin-top:8px; }
  .cart-history { margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
}

@media (max-width: 1100px) {
  .marketplace-shell { grid-template-columns: 1fr; }
  .marketplace-cart { position: static; }
  .customer-hub-grid, .pet-profile-grid { grid-template-columns: 1fr; }
}
@layer views {
  .team-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:12px; }
  .team-card { display:grid; grid-template-columns:52px 1fr; gap:12px; padding:14px; border:1px solid var(--line); border-radius:19px; background:var(--paper); }
  .team-avatar { width:52px; height:52px; display:grid; place-items:center; border-radius:18px; background:var(--brand2); color:var(--brand); font-weight:950; }
  .team-card h3 { margin:0 0 3px; font-size:15px; }
  .team-card p { color:var(--muted); font-size:12px; }
  .settings-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:14px; }
  .settings-card { display:grid; grid-template-columns:48px 1fr auto; gap:14px; align-items:center; transition:transform .15s ease; }
  .settings-card:hover { transform:translateY(-2px); }
  .settings-card h2 { margin-bottom:5px; }
  .settings-card p { color:var(--muted); font-size:13px; }
  .settings-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:17px; background:var(--brand2); font-size:22px; }
}

/* Real appointment calendar (Outlook-like). No demo/mock appointments. */
@layer views {
  .outlook-calendar {
    --slot-height: 54px;
    display: grid;
    grid-template-columns: 72px repeat(var(--calendar-days), minmax(150px, 1fr));
    grid-auto-rows: var(--slot-height);
    position: relative;
    margin: 16px 0 22px;
    min-width: calc(72px + var(--calendar-days) * 150px);
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: auto;
    background: color-mix(in srgb, var(--paper) 84%, transparent);
  }
  .outlook-corner,
  .outlook-day-head {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--soft) 94%, var(--paper));
    border-bottom: 1px solid var(--line);
  }
  .outlook-corner { left: 0; z-index: 30; }
  .outlook-day-head {
    display: grid;
    align-content: center;
    justify-items: start;
    padding: 6px 12px;
    border-left: 1px solid var(--line);
  }
  .outlook-day-head strong { font-size: 13px; }
  .outlook-day-head span { color: var(--muted); font-size: 12px; }
  .outlook-day-head.is-selected {
    background: color-mix(in srgb, var(--brand2) 72%, var(--paper));
  }
  .outlook-time {
    position: sticky;
    left: 0;
    z-index: 12;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 5px 10px 0 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    border-top: 1px dashed color-mix(in srgb, var(--line) 58%, transparent);
  }
  .outlook-time.major {
    color: var(--text);
    border-top-style: solid;
  }
  .outlook-slot {
    position: relative;
    min-height: var(--slot-height);
    overflow: visible;
    border-left: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
    border-top: 1px dashed color-mix(in srgb, var(--line) 56%, transparent);
    background: color-mix(in srgb, var(--paper) 72%, transparent);
  }
  .outlook-slot.major { border-top-style: solid; }
  .outlook-slot:hover,
  .outlook-slot.drop-target {
    background: color-mix(in srgb, var(--brand2) 55%, var(--paper));
  }
  .outlook-slot.drop-target {
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 55%, transparent);
  }
  .outlook-empty {
    position: absolute;
    left: 92px;
    right: 20px;
    top: 105px;
    z-index: 8;
    display: grid;
    justify-items: start;
    gap: 8px;
    padding: 20px;
    border-radius: 18px;
    border: 1px dashed var(--line);
    background: color-mix(in srgb, var(--soft) 88%, var(--paper));
    color: var(--muted);
    pointer-events: auto;
  }
  .outlook-empty strong { color: var(--text); }
  .appointment-source[hidden] { display: none !important; }
  .outlook-slot .calendar-appointment-tile {
    --appointment-slots: 2;
    position: absolute;
    top: 3px;
    left: 4px;
    right: 4px;
    z-index: 10;
    min-height: 0;
    height: calc((var(--appointment-slots) * var(--slot-height)) - 6px);
    padding: 8px 10px;
    border-radius: 12px;
    gap: 2px;
    overflow: hidden;
    box-shadow: 0 7px 18px color-mix(in srgb, var(--brand) 12%, transparent);
    background: color-mix(in srgb, var(--paper) 96%, var(--brand2));
    border-left: 4px solid var(--brand);
  }
  .outlook-slot .calendar-appointment-tile strong { font-size: 13px; line-height: 1.1; }
  .outlook-slot .calendar-appointment-tile small { font-size: 10.5px; line-height: 1.15; }
  .outlook-slot .calendar-appointment-tile .tile-time { font-size: 10.5px; }
  .outlook-slot .calendar-appointment-tile .tile-note { opacity: .86; }
}

@media (max-width: 900px) {
  .outlook-calendar { --slot-height: 58px; }
}

/* Unified HappyGroomy modal pattern: create/edit actions do not occupy page layout. */
@layer components {
  body.modal-open { overflow: hidden; }
  .groomly-modal {
    width: min(680px, calc(100vw - 32px));
    max-width: none;
    max-height: min(88vh, 920px);
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: transparent;
    color: var(--text);
    overflow: visible;
  }
  .groomly-modal.groomly-modal-large { width: min(900px, calc(100vw - 32px)); }
  .groomly-modal::backdrop { background: rgba(20, 18, 16, .48); backdrop-filter: blur(3px); }
  .groomly-modal-card {
    overflow: hidden;
    max-height: min(88vh, 920px);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--paper);
    box-shadow: 0 28px 80px rgba(0,0,0,.24);
  }
  .groomly-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--soft) 72%, var(--paper));
  }
  .groomly-modal-head h2 { margin: 2px 0 4px; font-size: 22px; }
  .modal-close {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    color: var(--muted);
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
  }
  .modal-close:hover { color: var(--text); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
  .groomly-modal-form { padding: 20px 24px 24px; overflow: auto; }
  .modal-actions {
    position: sticky;
    bottom: -24px;
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin: 20px -24px -24px;
    padding: 14px 24px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper) 96%, transparent);
  }
  .modal-inline-info {
    display: grid;
    gap: 6px;
    margin: 0 0 16px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--soft) 72%, var(--paper));
  }
  .modal-inline-info strong { font-size: 13px; }
  .modal-inline-info span { color: var(--muted); font-size: 13px; }
  .modal-inline-info.is-warning { border-color: color-mix(in srgb, var(--amber) 58%, var(--line)); }
  .modal-inline-info[hidden] { display: none !important; }
}
@media (max-width: 700px) {
  .groomly-modal, .groomly-modal.groomly-modal-large { width: calc(100vw - 18px); max-height: 94vh; }
  .groomly-modal-card { max-height: 94vh; border-radius: 20px; }
  .groomly-modal-head, .groomly-modal-form { padding-left: 16px; padding-right: 16px; }
  .modal-actions { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}


.button.danger {
  border-color: #d55b68;
  color: #a92838;
  background: #fff5f6;
}
.button.danger:hover {
  background: #ffe9ec;
}


.permission-groups{display:grid;gap:18px;margin:14px 0 22px}.permission-group{border:1px solid rgba(49,98,140,.2);border-radius:18px;padding:18px;background:rgba(255,255,255,.58)}.permission-group h3{margin:0 0 12px}.permission-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px}.permission-choice{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid rgba(49,98,140,.14);border-radius:14px;background:white;cursor:pointer}.permission-choice input{margin-top:4px}.permission-choice span{display:grid;gap:3px}.permission-choice small{color:#65778b;font-size:.78rem}.attention-note{margin-top:16px;padding:14px 16px;border-radius:14px;background:rgba(49,98,140,.08)}

/* v4.7 - isolated mandatory password change */
.auth-password-panel { width:min(720px, calc(100vw - 32px)); }
.auth-password-topline { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:28px; }
.auth-password-copy { margin-bottom:18px; }
.auth-password-copy h1 { margin:4px 0 6px; }
@media (max-width:640px) {
  .auth-password-topline { align-items:flex-start; }
  .auth-password-topline .brand span small { display:none; }
}

/* v4.8 subscription plans */
.plan-editor .grid.two{grid-template-columns:minmax(0,1fr) minmax(280px,.55fr);gap:18px}.plan-editor .card{padding:20px}.plan-editor .permission-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px}.permission-option{display:flex;gap:12px;align-items:flex-start;padding:13px;border:1px solid var(--line,#d5e0eb);border-radius:14px;background:rgba(255,255,255,.65)}.permission-option input{margin-top:4px;transform:scale(1.15)}.plan-limit-summary{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:150px}.plan-limit-summary strong{font-size:3rem}.plan-limit-summary span{color:var(--muted,#60758d)}@media(max-width:900px){.plan-editor .grid.two{grid-template-columns:1fr}}

/* v4.15 Salon Groomer Workspace */
.pet-command-card{display:grid;grid-template-columns:auto 1fr auto;gap:22px;align-items:center;background:linear-gradient(135deg,var(--panel),color-mix(in srgb,var(--brand2) 24%,var(--panel)));}
.pet-avatar-breed{width:92px;height:92px;border-radius:28px;display:grid;place-items:center;background:#f4f8ff;border:1px solid var(--line);overflow:hidden}.pet-avatar-breed img{width:100%;height:100%;object-fit:cover}.pet-avatar-breed span{font-size:44px}.pet-command-main h1{font-size:36px;line-height:1;margin:4px 0 8px}.pet-meta{color:var(--muted);font-weight:700}.pet-owner-mini{min-width:190px;padding:16px 18px;border-radius:18px;background:var(--panel);border:1px solid var(--line);display:grid;gap:3px}.pet-owner-mini span,.pet-owner-mini small{color:var(--muted)}.grooming-insight-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0}.warning-card{border-left:5px solid #e7a137}.next-card{border-left:5px solid var(--brand)}.grooming-insight-grid h3{font-size:20px;margin:4px 0 10px}.grooming-insight-grid p{line-height:1.55}.grooming-workspace{display:grid;grid-template-columns:minmax(280px,.7fr) minmax(0,1.3fr);gap:18px}.grooming-pet-context{align-self:start;position:sticky;top:18px}.grooming-pet-context h2{font-size:32px;margin:4px 0}.muted{color:var(--muted)}.next-visit-card{margin-top:18px;padding:18px;border-radius:18px;background:var(--brand2);border:1px solid var(--line)}.next-visit-card span{font-size:12px;color:var(--muted);font-weight:800}.hint-box{margin-top:12px;padding:12px;border-radius:12px;background:var(--panel)}.breed-search-input{width:100%;margin-bottom:8px;padding:11px 13px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text)}
@media(max-width:900px){.pet-command-card{grid-template-columns:auto 1fr}.pet-owner-mini{grid-column:1/-1}.grooming-insight-grid,.grooming-workspace{grid-template-columns:1fr}.grooming-pet-context{position:static}}
.visit-photo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-top:16px}.visit-photo-grid figure{margin:0}.visit-photo-grid img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:16px;border:1px solid var(--line)}.visit-photo-grid figcaption{font-size:12px;color:var(--muted);padding-top:5px}
.breed-price-reference{margin-top:16px}.breed-price-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.breed-price-grid>div{padding:18px;border-radius:18px;background:var(--brand2);border:1px solid var(--line)}.breed-price-grid h3{margin:0 0 10px}.breed-price-grid span{display:block;padding:4px 0;color:var(--muted);font-size:13px}@media(max-width:900px){.breed-price-grid{grid-template-columns:1fr}}

/* v4.15.2 salon branding + breed avatars */
.breed-avatar{width:46px;height:46px;border-radius:16px;overflow:hidden;display:inline-grid;place-items:center;background:#f2f6fa;flex:0 0 46px}.breed-avatar img,.pet-avatar-breed img,.customer-pet-avatar img{width:100%;height:100%;object-fit:cover}.customer-pet-avatar{width:96px;height:96px;border-radius:30px;overflow:hidden;background:#f2f6fa;box-shadow:0 14px 36px rgba(35,69,96,.15);margin-bottom:16px}.salon-brand-preview{display:flex;align-items:center;gap:16px;padding:14px 0}.salon-brand-preview img{width:96px;height:64px;object-fit:contain;border-radius:14px;background:#fff;border:1px solid #dde7ef;padding:8px}.salon-public-logo{max-width:150px;max-height:72px;object-fit:contain;margin-bottom:18px}.pet-avatar-breed{overflow:hidden}.pet-avatar-breed img{object-fit:cover}

.customer-report-brand{display:flex;align-items:center;gap:12px;margin:0 0 16px}.customer-report-brand img{width:72px;height:48px;object-fit:contain;border-radius:12px;background:#fff;padding:6px;border:1px solid #dfe8ef}.customer-report-brand span{font-weight:800}

.pet-mini-avatar{width:28px;height:28px;border-radius:9px;object-fit:cover;vertical-align:middle;margin-right:6px;background:#eef4f8}.pet-heading{display:flex;align-items:center;gap:8px}.pet-heading .pet-mini-avatar{width:42px;height:42px;border-radius:13px}.pet-option-title{display:flex;align-items:center;gap:8px}

/* v4.16 — unified UI system + mobile salon */
@layer tokens {
  :root {
    --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --control-h: 44px;
    --content-max: 1440px;
  }
}
@layer base {
  body { font-family: var(--font-ui); font-size: 15px; line-height: 1.5; }
  h1,h2,h3,h4 { line-height: 1.15; }
  h3 { margin: 0; }
  input, select, textarea, button { min-font-size: 16px; }
  ::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }
}
@layer layout {
  .content { width: 100%; }
  .content > * { max-width: var(--content-max); margin-left: auto; margin-right: auto; }
  .page-stack { display: grid; gap: var(--space-4); }
}
@layer components {
  .panel, .card, .customer-shell, .auth-panel { border-radius: var(--radius-xl); padding: var(--space-5); }
  .button { min-height: var(--control-h); padding: 10px 16px; border-radius: var(--radius-md); }
  .button.quiet, .button.compact-button { min-height: 38px; padding: 8px 12px; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    width: 100%; min-height: var(--control-h); border-radius: var(--radius-md); padding: 10px 12px;
  }
  textarea { min-height: 104px; }
  input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); }
  .stack-form { gap: var(--space-3); }
  .stack-form p { padding: 0; border: 0; background: transparent; border-radius: 0; gap: 7px; }
  .stack-form label { font-size: 13px; font-weight: 850; }
  .stack-form .helptext { line-height: 1.4; }
  .errorlist { list-style: none; margin: 0 0 6px; padding: 10px 12px; border-radius: var(--radius-md); background: color-mix(in srgb,var(--bad) 10%,var(--paper)); color: var(--bad); font-size: 13px; font-weight: 750; }
  .form-section { display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: color-mix(in srgb,var(--soft) 64%,var(--paper)); }
  .form-section-title { display:flex; justify-content:space-between; gap:12px; align-items:center; }
  .form-grid-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-3); }
  .form-field { display:grid; gap:7px; min-width:0; }
  .form-field label { font-size:13px; font-weight:850; }
  .field-help { color:var(--muted); font-size:12px; }
  .optional-disclosure { border:1px solid var(--line); border-radius:var(--radius-lg); background:color-mix(in srgb,var(--soft) 48%,var(--paper)); overflow:hidden; }
  .optional-disclosure summary { cursor:pointer; padding:14px 16px; font-weight:850; }
  .optional-disclosure-content { display:grid; gap:12px; padding:0 16px 16px; }
  .choice-pills { display:flex; flex-wrap:wrap; gap:8px; }
  .choice-pill { min-height:44px; padding:8px 12px; border:1px solid var(--line); border-radius:999px; background:var(--paper); color:var(--text); font-weight:800; cursor:pointer; }
  .choice-pill:hover,.choice-pill.is-selected { border-color:var(--brand); background:var(--brand2); color:var(--brand); }
  .dictation-wrap { position:relative; }
  .dictation-wrap input,.dictation-wrap textarea { padding-right:48px; }
  .dictation-button { position:absolute; right:6px; top:6px; width:44px; height:44px; min-height:44px; border:0; border-radius:13px; background:var(--brand2); color:var(--brand); display:grid; place-items:center; box-shadow:none; }
  .dictation-button.is-listening { background:var(--brand); color:var(--paper); animation:groomly-pulse 1.2s infinite; }
  @keyframes groomly-pulse { 50% { transform:scale(.92); opacity:.78; } }
  .voice-note { color:var(--muted); font-size:11px; margin-top:3px; }
  .responsive-table { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .responsive-table table { min-width:720px; }
  .salon-mobile-nav { display:none; }
  .mobile-fab { display:none; }
}
@media (max-width: 760px) {
  body { padding-bottom: 82px; }
  .app { display:block; min-height:100vh; }
  .sidebar { display:none; }
  .content { padding:16px 14px 20px; }
  .topbar { align-items:center; margin-bottom:16px; }
  .topbar .eyebrow { display:none; }
  .topbar h1 { font-size:1.35rem; }
  .topbar > .actions { display:none; }
  .panel,.card,.customer-shell,.auth-panel { border-radius:20px; padding:16px; }
  .grid.two,.two,.stats,.form-grid-2 { grid-template-columns:1fr !important; }
  .section-title { align-items:flex-start; }
  .section-title > .actions { width:100%; }
  .section-title > .actions .button { flex:1; }
  .toolbar { display:grid; grid-template-columns:1fr auto; }
  .toolbar .button.ghost { grid-column:1/-1; }
  .record-card { grid-template-columns:1fr; gap:10px; }
  .record-meta { justify-items:start; }
  .record-actions { justify-content:flex-start; width:100%; }
  .record-actions .button { flex:1; }
  .groomly-modal { width:100vw !important; max-height:100dvh !important; margin:0; }
  .groomly-modal-card { min-height:100dvh; max-height:100dvh; border-radius:0; border:0; }
  .groomly-modal-head { padding-top:max(16px,env(safe-area-inset-top)); }
  .groomly-modal-form { padding-bottom:calc(90px + env(safe-area-inset-bottom)); }
  .modal-actions { bottom:calc(-24px - env(safe-area-inset-bottom)); padding-bottom:calc(14px + env(safe-area-inset-bottom)); }
  .salon-mobile-nav { position:fixed; left:0; right:0; bottom:0; z-index:90; display:grid; grid-template-columns:repeat(5,1fr); gap:2px; padding:8px 8px calc(8px + env(safe-area-inset-bottom)); background:color-mix(in srgb,var(--paper) 96%,transparent); border-top:1px solid var(--line); box-shadow:0 -12px 34px rgb(30 45 60 / 10%); backdrop-filter:blur(18px); }
  .salon-mobile-nav a { min-height:54px; display:grid; place-items:center; align-content:center; gap:3px; border-radius:14px; color:var(--muted); font-size:10px; font-weight:850; }
  .salon-mobile-nav a svg { width:21px; height:21px; }
  .salon-mobile-nav a.active { color:var(--brand); background:var(--brand2); }
  .salon-mobile-nav .nav-create { transform:translateY(-13px); width:56px; height:56px; min-height:56px; justify-self:center; border-radius:18px; background:var(--brand); color:var(--paper); box-shadow:0 12px 26px color-mix(in srgb,var(--brand) 28%,transparent); }
  .salon-mobile-nav .nav-create span { display:none; }
  .pet-command-card { grid-template-columns:72px minmax(0,1fr); gap:14px; }
  .pet-avatar-breed { width:72px; height:72px; border-radius:22px; }
  .pet-command-main h1 { font-size:28px; }
  .grooming-report-panel .stack-form { gap:16px; }
  table { font-size:13px; }
}

/* v4.17 — mobile salon flow and client invitations */
.portal-access-card{
  display:flex;align-items:flex-start;gap:12px;padding:14px 15px;margin-top:4px;
  border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.7);
  cursor:pointer;transition:.18s ease;
}
.portal-access-card:hover{border-color:color-mix(in srgb,var(--brand) 45%,var(--line));background:#fff}
.portal-access-card input{width:22px!important;height:22px!important;min-height:22px!important;margin:1px 0 0;accent-color:var(--brand)}
.portal-access-card strong{display:block;font-size:14px;line-height:1.25}
.portal-access-card small{display:block;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.45;font-weight:600}
.form-field.is-required>label::after{content:" *";color:#b64747}
.activation-person{display:grid;gap:2px;padding:13px 14px;margin:16px 0;border:1px solid var(--line);border-radius:16px;background:var(--brand2)}
.activation-person span{color:var(--muted);font-size:13px}
.customer-activation-card{max-width:520px}

@media(max-width:760px){
  /* phone = task-oriented app, not a shrunk desktop */
  .main{padding:14px 12px calc(92px + env(safe-area-inset-bottom))!important}
  .panel{border-radius:18px!important;padding:15px!important}
  .section-title{gap:10px!important;align-items:flex-start!important}
  .section-title h2{font-size:20px!important;line-height:1.15}
  .section-description{font-size:13px!important;line-height:1.45}
  .actions{gap:8px!important;flex-wrap:wrap}
  .button{min-height:46px;padding:11px 16px;border-radius:14px;font-size:14px}
  .button.quiet{min-height:40px}
  input,select,textarea{font-size:16px!important} /* avoid iOS zoom */
  .form-grid-2{grid-template-columns:1fr!important;gap:10px!important}
  .form-section{padding:14px!important;border-radius:16px!important}
  .form-section-title{margin-bottom:10px}
  .optional-disclosure{border-radius:16px!important}
  .optional-disclosure summary{min-height:48px;display:flex;align-items:center;padding:12px 14px!important}
  .record-card{padding:13px!important;border-radius:16px!important}
  .record-actions{width:100%;margin-top:8px}
  .record-actions .button{flex:1}
  .customer-hub-grid{display:flex!important;flex-direction:column}
  .customer-hub-grid .list-panel:first-child{order:1}
  .customer-hub-grid .list-panel:last-child{order:2}
  .customer-search{display:grid!important;grid-template-columns:1fr auto;gap:8px}
  .customer-search input{grid-column:1/-1}
  .portal-access-card{padding:14px;margin-top:6px}
  .groomly-modal-head{position:sticky;top:0;z-index:2;background:var(--surface);border-bottom:1px solid var(--line)}
  .modal-actions{position:sticky;bottom:0;z-index:2;margin:10px -16px -16px;padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(10px);border-top:1px solid var(--line)}
  .modal-actions .button{flex:1}
  .auth-shell{padding:18px 12px!important;align-items:center}
  .auth-card{border-radius:22px!important;padding:20px!important;width:100%}
}
.appointment-time-grid{display:grid;grid-template-columns:1.15fr .9fr .9fr;gap:10px}
.appointment-end-hint{display:flex;align-items:center;justify-content:space-between;margin-top:8px;padding:11px 13px;border-radius:14px;background:var(--brand2);border:1px solid var(--line)}
.appointment-end-hint span{font-size:12px;color:var(--muted);font-weight:750}.appointment-end-hint strong{font-size:16px}
.choice-cards ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:10px}.choice-cards li{margin:0}.choice-cards label{display:flex!important;align-items:center;gap:10px;min-height:54px;padding:12px 13px;border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.72);cursor:pointer}.choice-cards input{width:20px!important;height:20px!important;min-height:20px!important;accent-color:var(--brand)}
@media(max-width:760px){.appointment-time-grid{grid-template-columns:1fr 1fr}.appointment-time-grid .form-field:last-child{grid-column:1/-1}.choice-cards ul{grid-template-columns:1fr}.choice-cards label{min-height:58px}.appointment-quick-form .form-section{margin:0}}


/* v4.18 calendar resize */
.calendar-appointment-tile{position:relative}
.appointment-resize-handle{position:absolute;left:8px;right:8px;bottom:2px;height:9px;border-radius:999px;cursor:ns-resize;touch-action:none;opacity:.42}
.appointment-resize-handle:after{content:"";display:block;width:34px;height:3px;margin:3px auto;background:currentColor;border-radius:999px}
.calendar-appointment-tile:hover .appointment-resize-handle,.calendar-appointment-tile.is-resizing .appointment-resize-handle{opacity:.9}
.calendar-appointment-tile.is-resizing{z-index:30;box-shadow:0 14px 32px rgba(13,39,75,.22)}
@media(max-width:800px){.appointment-resize-handle{display:none}.calendar-panel .section-description{max-width:36ch}}

/* v4.22 — Outlook-like multi-groomer day view. */
@layer views {
  .outlook-team-calendar { --slot-height: 58px; }
  .outlook-staff-head {
    display:flex;
    align-items:center;
    gap:10px;
    padding:8px 12px;
  }
  .staff-head-avatar {
    width:34px;
    height:34px;
    flex:0 0 34px;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:var(--brand2);
    color:var(--brand);
    font-weight:950;
  }
  .staff-head-copy { display:grid; min-width:0; }
  .staff-head-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .staff-head-copy small { color:var(--muted); font-size:10px; font-weight:800; }
  .outlook-team-calendar .outlook-slot { min-width:190px; }
  .outlook-team-calendar .calendar-appointment-tile { border-left-width:5px; }
  .outlook-team-calendar .tile-groomer { font-weight:850; color:var(--brand); }
}

@media (max-width: 900px) {
  .outlook-team-calendar {
    min-width: calc(72px + var(--calendar-days) * 210px);
  }
  .outlook-staff-head { min-width:210px; }
}
.address-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.address-card{border:1px solid var(--border,#dfe6eb);border-radius:16px;padding:16px;display:flex;justify-content:space-between;gap:14px;background:var(--surface,#fff)}.address-card p{margin:.35rem 0}.address-tags{display:flex;flex-wrap:wrap;gap:6px;align-content:flex-start;justify-content:flex-end}.address-purpose-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.address-search-wrap{position:relative}.address-suggestions{position:absolute;left:0;right:0;top:100%;z-index:30;background:#fff;border:1px solid #dbe2e8;border-radius:12px;box-shadow:0 14px 34px rgba(24,39,52,.14);max-height:280px;overflow:auto}.address-suggestion{display:block;width:100%;text-align:left;border:0;background:#fff;padding:11px 12px;cursor:pointer}.address-suggestion:hover{background:#f3f6f8}.booking-address-select{width:100%;min-height:46px;margin:.4rem 0;border-radius:10px}@media(max-width:700px){.address-purpose-grid{grid-template-columns:1fr}.address-card{flex-direction:column}.address-tags{justify-content:flex-start}}

/* v4.27 AddressBook completeness */
.compact-actions{display:flex;align-items:center;gap:8px;margin-top:12px;flex-wrap:wrap}.compact-actions form{margin:0}.compact-actions .button{min-height:36px;padding:7px 11px;font-size:.9rem}.address-card{flex-wrap:wrap}.address-card>div:first-child{min-width:180px;flex:1}.address-card .compact-actions{width:100%;justify-content:flex-end;border-top:1px solid var(--border,#e4e9ed);padding-top:10px}.address-card-grid{align-items:start}@media(max-width:700px){.address-card .compact-actions{justify-content:stretch}.address-card .compact-actions .button,.address-card .compact-actions form{flex:1}.address-card .compact-actions button{width:100%}}


/* v4.27.2 — pet card UI polish */
.pet-detail-page{
  width:min(1180px,100%);
  margin:0 auto;
  display:grid;
  gap:18px;
}
.pet-detail-page .pet-command-grid,
.pet-detail-page .grooming-insight-grid,
.pet-detail-page .pet-detail-lower{margin:0;}
.pet-detail-page .pet-command-card{
  min-height:148px;
  padding:24px 26px;
  gap:24px;
  border-radius:26px;
  box-shadow:0 16px 44px rgba(40,72,100,.08);
}
.pet-detail-page .pet-avatar-breed{
  width:104px;height:104px;border-radius:30px;
  box-shadow:0 10px 28px rgba(34,67,96,.10);
}
.pet-detail-page .pet-command-main h1{font-size:34px;margin:5px 0 7px;letter-spacing:-.025em;}
.pet-detail-page .pet-meta{display:flex;flex-wrap:wrap;gap:7px 14px;margin:0 0 15px;color:var(--muted);}
.pet-detail-page .pet-meta span{display:inline-flex;align-items:center;gap:6px;}
.pet-detail-page .actions{display:flex;flex-wrap:wrap;gap:9px;}
.pet-detail-page .actions .button{min-height:40px;padding:8px 14px;}
.pet-detail-page .pet-owner-mini{
  min-width:210px;padding:16px 18px;border-radius:18px;background:rgba(255,255,255,.72);
}
.pet-detail-page .pet-owner-mini span{font-size:11px;text-transform:uppercase;letter-spacing:.06em;font-weight:800;}
.pet-detail-page .pet-owner-mini strong{font-size:15px;}
.pet-detail-page .grooming-insight-grid{grid-template-columns:1fr 1fr;gap:18px;}
.pet-detail-page .grooming-insight-grid .panel{min-height:150px;padding:22px 24px;border-radius:24px;}
.pet-detail-page .grooming-insight-grid h3{font-size:19px;margin:5px 0 9px;}
.pet-detail-page .grooming-insight-grid p{font-size:14px;line-height:1.58;color:color-mix(in srgb,var(--text) 88%,var(--muted));}
.pet-detail-page .eyebrow{font-size:10px;letter-spacing:.08em;}
.pet-detail-page .pet-detail-lower{grid-template-columns:minmax(0,1.45fr) minmax(300px,.55fr);gap:18px;align-items:start;}
.pet-detail-page .pet-detail-lower>.panel{padding:22px 24px;border-radius:24px;min-height:190px;}
.pet-detail-page .section-title{margin-bottom:14px;}
.pet-detail-page .section-title h2{font-size:18px;}
.pet-detail-page .section-description{font-size:12px;margin-top:4px;}
.pet-detail-page .timeline-list{gap:10px;}
.pet-detail-page .timeline-item{
  grid-template-columns:92px minmax(0,1fr) 22px;
  gap:14px;padding:14px 16px;border-radius:16px;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.pet-detail-page .timeline-item:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--brand) 35%,var(--line));box-shadow:0 8px 22px rgba(40,72,100,.07);}
.pet-detail-page .timeline-item time{display:grid;gap:2px;line-height:1.1;}
.pet-detail-page .timeline-item time span{white-space:nowrap;}
.pet-detail-page .timeline-item time small{font-size:12px;margin:0;}
.pet-detail-page .timeline-copy{min-width:0;display:grid;gap:4px;}
.pet-detail-page .timeline-copy strong{font-size:14px;white-space:normal;}
.pet-detail-page .timeline-item p{margin:0;font-size:12px;}
.pet-detail-page .empty-state{min-height:105px;display:flex;flex-direction:column;justify-content:center;padding:18px;border-radius:16px;}
@media (min-width:1450px){.pet-detail-page{width:min(1240px,100%);}}
@media (max-width:900px){
  .pet-detail-page{gap:14px;}
  .pet-detail-page .pet-command-card{grid-template-columns:84px minmax(0,1fr);padding:18px;gap:14px;}
  .pet-detail-page .pet-avatar-breed{width:84px;height:84px;border-radius:24px;}
  .pet-detail-page .pet-command-main h1{font-size:28px;}
  .pet-detail-page .pet-owner-mini{grid-column:1/-1;min-width:0;}
  .pet-detail-page .grooming-insight-grid,.pet-detail-page .pet-detail-lower{grid-template-columns:1fr;}
}
@media (max-width:560px){
  .pet-detail-page .pet-command-card{grid-template-columns:68px minmax(0,1fr);padding:15px;}
  .pet-detail-page .pet-avatar-breed{width:68px;height:68px;border-radius:20px;}
  .pet-detail-page .actions{grid-column:1/-1;}
  .pet-detail-page .actions .button{flex:1 1 auto;justify-content:center;}
  .pet-detail-page .grooming-insight-grid .panel,.pet-detail-page .pet-detail-lower>.panel{padding:18px;}
  .pet-detail-page .timeline-item{grid-template-columns:76px minmax(0,1fr) 16px;padding:12px;gap:10px;}
}

/* v4.27.3 - actionable validation and address autocomplete */
.form-error-summary{display:flex;flex-direction:column;gap:4px;padding:12px 14px;margin-bottom:12px;border:1px solid rgba(176,71,71,.28);background:rgba(176,71,71,.07);border-radius:14px}.form-error-summary strong{color:#8b3434}.form-error-summary ul{margin:4px 0 0 18px}.address-suggestion-message{padding:12px 14px;color:var(--muted,#64748b);font-size:.9rem}.address-suggestion-message.error{color:#8b3434;background:rgba(176,71,71,.05)}.address-suggestion{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left}.address-suggestion small{color:var(--muted,#64748b);font-weight:500}

/* v4.27.4 — one-field address autocomplete */
.address-search-primary{position:relative;display:block}.address-search-primary>input[type="search"]{width:100%;min-height:50px;padding:0 14px;border:1px solid var(--border,#d7e0e7);border-radius:13px;background:#fff;font:inherit}.address-search-primary>input[type="search"]:focus{outline:2px solid rgba(48,104,151,.18);border-color:#5f91b8}.address-selected-state{margin-top:8px;padding:8px 10px;border-radius:10px;background:#eef8f2;color:#28653f;font-size:.85rem;font-weight:700}.address-suggestion strong,.address-suggestion small{display:block}.address-suggestion small{margin-top:2px;color:#637589}.address-suggestion-message{padding:12px}.address-suggestion-message.error{color:#8b3c35;background:#fff4f2}.address-suggestion-message.loading{color:#42627e}.address-smart-section{padding:14px;border:1px solid var(--border,#dfe6eb);border-radius:16px;background:rgba(255,255,255,.55)}.client-edit-layout{align-items:start}.client-edit-help{position:sticky;top:20px}.client-edit-form .form-section{margin-bottom:14px}@media(max-width:900px){.client-edit-help{position:static}.client-edit-layout{grid-template-columns:1fr}}


/* v4.27.5 — compact working calendar */
@layer views {
  .calendar-panel .outlook-calendar { --slot-height: 34px; margin-top: 10px; }
  .calendar-panel .outlook-time { padding-top: 3px; font-size: 10px; }
  .calendar-panel .outlook-day-head { padding: 4px 10px; }
  .calendar-panel .outlook-day-head strong { font-size: 12px; }
  .calendar-panel .outlook-day-head span { font-size: 10.5px; }
  .calendar-panel .outlook-empty {
    left: 84px; right: 14px; top: 54px; padding: 10px 12px; gap: 3px;
    border-radius: 13px; display:flex; align-items:center; flex-wrap:wrap;
  }
  .calendar-panel .outlook-empty strong { font-size: 13px; }
  .calendar-panel .outlook-empty span { font-size: 11px; flex:1 1 320px; }
  .calendar-panel .outlook-empty .button { min-height: 34px; padding: 6px 10px; font-size: 11px; }
  .calendar-panel .calendar-helper {
    display:flex; align-items:center; gap:8px; padding:7px 10px; margin:8px 0 0;
    border:1px dashed var(--line); border-radius:12px; background:color-mix(in srgb,var(--soft) 70%,var(--paper));
  }
  .calendar-panel .calendar-helper strong { font-size:11px; white-space:nowrap; }
  .calendar-panel .calendar-helper p { margin:0; font-size:10.5px; color:var(--muted); }
  .calendar-panel .outlook-slot .calendar-appointment-tile { padding:5px 8px; border-radius:9px; }
  .calendar-panel .outlook-slot .calendar-appointment-tile strong { font-size:11.5px; }
  .calendar-panel .outlook-slot .calendar-appointment-tile small,
  .calendar-panel .outlook-slot .calendar-appointment-tile .tile-time { font-size:9.5px; }
}
@media (max-width: 900px) {
  .calendar-panel .outlook-calendar { --slot-height: 44px; }
}

/* v4.28 — business-first UI */
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.client-edit-layout{max-width:860px;margin-inline:auto}
.appointment-party-search{position:relative}
.appointment-party-results{position:absolute;z-index:30;left:0;right:0;top:100%;margin-top:6px;background:var(--panel,#fff);border:1px solid var(--line,#d8e3ed);border-radius:14px;box-shadow:0 16px 38px rgba(28,55,83,.14);max-height:320px;overflow:auto;padding:6px}
.appointment-party-result{width:100%;display:grid;grid-template-columns:1fr auto;gap:2px 12px;text-align:left;border:0;background:transparent;padding:10px 12px;border-radius:10px;cursor:pointer;color:inherit}
.appointment-party-result:hover{background:var(--soft,#eef5fb)}
.appointment-party-result strong{font-size:14px}.appointment-party-result span{font-size:12px;color:var(--muted)}.appointment-party-result small{grid-column:1/-1;color:var(--muted)}
.appointment-party-selected{margin-top:8px;padding:9px 11px;border-radius:11px;background:var(--soft,#eef5fb);display:flex;justify-content:space-between;gap:12px;font-size:12px}.appointment-party-selected strong{font-size:13px}.appointment-party-selected span{color:var(--muted)}
.service-quote{display:flex;gap:10px;align-items:center;margin-top:7px;font-size:12px}.service-quote strong{font-size:15px}.service-quote span{color:var(--muted)}
.address-selected-state{font-size:12px;color:var(--muted);margin-top:6px}
@media(max-width:720px){.appointment-party-selected{align-items:flex-start;flex-direction:column}.client-edit-layout{max-width:none}}

/* HappyGroomy Enterprise Product UI v1 — operational APP shell */
.product-area-salon {
  color: var(--color-text-primary);
  background: var(--color-background);
  font-family: var(--font-family-ui);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

.product-area-salon :focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-focus) 72%, transparent);
  outline-offset: 2px;
}

.product-area-salon .app-shell-salon {
  grid-template-columns: 260px minmax(0, 1fr);
  background: var(--color-background);
}

.product-area-salon .app-sidebar {
  z-index: 80;
  padding: var(--space-5) var(--space-4);
  gap: var(--space-5);
  overflow-y: auto;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  box-shadow: none;
}

.product-area-salon .app-sidebar .brand {
  min-height: 48px;
  padding: 0 var(--space-2);
  gap: var(--space-3);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
}

.product-area-salon .app-sidebar .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
}

.product-area-salon .app-sidebar .brand small {
  max-width: 150px;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-area-salon .app-sidebar .nav {
  gap: var(--space-5);
}

.product-area-salon .app-sidebar .nav-group {
  display: grid;
  gap: var(--space-1);
}

.product-area-salon .app-sidebar .nav-group-label {
  padding: 0 var(--space-3) var(--space-1);
  color: var(--color-text-secondary);
  font-size: .6875rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: .08em;
}

.product-area-salon .app-sidebar .nav-item {
  min-height: 40px;
  padding: 8px 10px;
  gap: 10px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--font-size-body-small);
  font-weight: var(--font-weight-medium);
}

.product-area-salon .app-sidebar .nav-item:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-subtle);
}

.product-area-salon .app-sidebar .nav-item.active {
  color: var(--color-primary);
  background: var(--color-primary-soft);
  box-shadow: inset 3px 0 0 var(--color-primary);
  font-weight: var(--font-weight-semibold);
}

.product-area-salon .app-sidebar .nav-item.active .nav-icon,
.product-area-salon .app-sidebar .nav-icon {
  color: currentColor;
}

.product-area-salon .app-sidebar .nav-icon,
.product-area-salon .app-sidebar .nav-icon svg {
  width: 19px;
  height: 19px;
}

.product-area-salon .app-sidebar .sidebar-close {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
}

.sidebar-account {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-subtle);
}

.sidebar-account > span:last-child,
.user-menu-copy,
.user-menu-identity {
  display: grid;
  min-width: 0;
}

.sidebar-account strong,
.sidebar-account small,
.user-menu-copy strong,
.user-menu-copy small,
.user-menu-identity strong,
.user-menu-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account strong,
.user-menu-copy strong,
.user-menu-identity strong {
  font-size: var(--font-size-body-small);
  font-weight: var(--font-weight-semibold);
}

.sidebar-account small,
.user-menu-copy small,
.user-menu-identity small {
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
}

.user-avatar {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: var(--font-size-body-small);
  font-weight: var(--font-weight-bold);
}

.product-area-salon .app-workspace {
  width: 100%;
  padding: 0 var(--page-gutter) var(--space-8);
}

.product-area-salon .app-workspace > * {
  max-width: 1500px;
}

.app-topbar {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(170px, auto) minmax(280px, 620px) auto;
  align-items: center;
  gap: var(--space-5);
  position: sticky;
  top: 0;
  z-index: 50;
  margin-bottom: var(--space-6);
  padding: var(--space-3) 0;
  background: color-mix(in srgb, var(--color-background) 92%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  backdrop-filter: blur(16px);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.topbar-title .eyebrow {
  margin-bottom: 1px;
  color: var(--color-text-secondary);
  font-size: .625rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: .08em;
}

.topbar-title h1 {
  overflow: hidden;
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-area-salon .app-topbar .sidebar-trigger {
  display: none;
}

.icon-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  box-shadow: var(--shadow-sm);
}

.icon-button:hover {
  color: var(--color-primary);
  border-color: var(--color-border-strong);
}

.app-global-search {
  position: relative;
  width: 100%;
}

.app-global-search > svg {
  position: absolute;
  z-index: 2;
  left: 13px;
  top: 11px;
  width: 18px;
  height: 18px;
  color: var(--color-text-secondary);
  pointer-events: none;
}

.product-area-salon .app-global-search input {
  width: 100%;
  min-height: 42px;
  padding: 9px 62px 9px 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
  font-size: var(--font-size-body-small);
}

.app-global-search kbd {
  position: absolute;
  right: 10px;
  top: 9px;
  padding: 3px 7px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface-subtle);
  color: var(--color-text-secondary);
  font: 500 .6875rem/1.2 var(--font-family-ui);
}

.global-search-results {
  position: absolute;
  z-index: 100;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(460px, 70vh);
  overflow-y: auto;
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-raised);
  box-shadow: var(--shadow-lg);
}

.global-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  border-radius: var(--radius-md);
}

.global-search-result:hover,
.global-search-result[aria-selected="true"] {
  background: var(--color-primary-soft);
}

.global-search-identity {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.global-search-identity > span:last-child {
  display: grid;
  min-width: 0;
}

.global-search-identity strong {
  font-size: var(--font-size-body-small);
  font-weight: var(--font-weight-semibold);
}

.global-search-identity small {
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

.global-search-actions {
  display: flex;
  gap: var(--space-1);
}

.search-action {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: .6875rem;
  font-weight: var(--font-weight-semibold);
}

.search-action.primary {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.global-search-empty {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  color: var(--color-text-primary);
  font-size: var(--font-size-body-small);
  font-weight: var(--font-weight-semibold);
}

.global-search-empty small {
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-regular);
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-2);
}

.product-area-salon .button {
  min-height: var(--control-height);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
  font-size: var(--font-size-body-small);
  font-weight: var(--font-weight-semibold);
}

.product-area-salon .button:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.product-area-salon .button.ghost {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

.product-area-salon .button.ghost:hover {
  background: var(--color-surface-subtle);
  border-color: var(--color-border-strong);
}

.user-menu {
  position: relative;
}

.user-menu summary {
  min-height: 42px;
  max-width: 230px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: var(--space-2);
  padding: 3px 7px 3px 3px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  list-style: none;
}

.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { border-color: var(--color-border); background: var(--color-surface); }
.user-menu summary > svg { width: 16px; height: 16px; color: var(--color-text-secondary); }
.user-menu .user-avatar { width: 34px; height: 34px; min-width: 34px; }

.user-menu-popover {
  position: absolute;
  z-index: 100;
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-raised);
  box-shadow: var(--shadow-lg);
}

.user-menu-identity { padding: var(--space-2); border-bottom: 1px solid var(--color-border); }
.user-menu-popover a,
.user-menu-popover button {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-primary);
  text-align: left;
  font-size: var(--font-size-body-small);
}
.user-menu-popover a:hover,
.user-menu-popover button:hover { background: var(--color-surface-subtle); }

.sidebar-backdrop { display: none; }

/* Today */
.app-today { display: grid; gap: var(--space-4); }
.today-page-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-1);
}
.today-page-intro p:last-child { color: var(--color-text-secondary); font-size: var(--font-size-body-small); }
.today-page-intro .eyebrow { margin: 0 0 2px; font-size: .6875rem; }

.product-area-salon .panel {
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: none;
}

.app-today .salon-today-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, .55fr);
  gap: var(--space-4);
}

.app-today .today-focus {
  min-height: 220px;
  display: grid;
  align-content: space-between;
  background: linear-gradient(135deg, var(--color-surface), color-mix(in srgb, var(--color-primary-soft) 62%, white));
  border-color: color-mix(in srgb, var(--color-primary) 26%, var(--color-border));
}

.app-today .today-focus .section-title { align-items: flex-start; }
.app-today .today-focus h2 { font-size: var(--font-size-h3); line-height: var(--line-height-h3); }
.app-today .today-focus-main { align-items: end; }
.app-today .today-time { color: var(--color-primary); font-size: var(--font-size-body-small); font-weight: var(--font-weight-bold); }
.app-today .today-focus-main h3 { margin: 7px 0 4px; font-size: 1.5rem; font-weight: var(--font-weight-bold); }
.app-today .today-focus-main p { color: var(--color-text-secondary); font-size: var(--font-size-body-small); }
.app-today .today-note { border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-warning-soft) 65%, white); color: var(--color-text-secondary); }

.app-today .today-metrics { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
.app-today .metric-card {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 var(--space-3);
  min-height: 0;
  padding: var(--space-4) var(--space-5);
}
.app-today .metric-card span { color: var(--color-text-primary); font-size: var(--font-size-body-small); font-weight: var(--font-weight-semibold); }
.app-today .metric-card strong { grid-column: 2; grid-row: 1 / span 2; font-size: 1.75rem; font-weight: var(--font-weight-bold); }
.app-today .metric-card small { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.app-today .salon-day-layout { grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: var(--space-4); }
.app-today .today-agenda { gap: var(--space-2); }
.app-today .today-agenda-row {
  min-height: var(--row-height);
  padding: 10px var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--color-surface-subtle);
}
.app-today a.today-agenda-row:hover { border-color: var(--color-border-strong); background: var(--color-surface); }
.app-today .today-agenda-row.is-current { border-color: color-mix(in srgb, var(--color-primary) 38%, var(--color-border)); background: var(--color-primary-soft); }
.app-today .today-agenda-row strong { font-size: var(--font-size-body-small); font-weight: var(--font-weight-semibold); }
.app-today .today-agenda-row span { font-size: var(--font-size-caption); }
.status-badge[data-status="confirmed"], .status-badge[data-status="completed"] { background: var(--color-success-soft); color: var(--color-success); }
.status-badge[data-status="scheduled"] { background: var(--color-info-soft); color: var(--color-info); }
.status-badge[data-status="cancelled"], .status-badge[data-status="no_show"] { background: var(--color-danger-soft); color: var(--color-danger); }

/* Calendar */
.calendar-workspace { padding: var(--space-5); }
.calendar-workspace > .section-title { align-items: flex-start; }
.calendar-workspace > .section-title h2 { font-size: var(--font-size-h2); line-height: var(--line-height-h2); font-weight: var(--font-weight-bold); }
.calendar-workspace > .section-title .eyebrow { margin-bottom: 2px; font-size: .6875rem; letter-spacing: .06em; }
.calendar-filter {
  display: grid;
  grid-template-columns: 110px minmax(150px, 1fr) 150px 150px 150px 145px auto;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-subtle);
}
.calendar-filter select,
.calendar-filter input { min-height: 38px; padding: 7px 10px; border-radius: var(--radius-sm); font-size: var(--font-size-body-small); }
.calendar-helper { color: var(--color-text-secondary); }
.calendar-workspace .outlook-calendar {
  max-height: calc(100vh - 260px);
  min-height: 520px;
  border-color: var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.calendar-workspace .outlook-day-head,
.calendar-workspace .outlook-corner { background: var(--color-surface-subtle); }
.calendar-workspace .outlook-slot { background: var(--color-surface); }
.calendar-workspace .outlook-slot .calendar-appointment-tile {
  background: var(--color-primary-soft);
  border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
  border-left-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.calendar-workspace .outlook-slot .calendar-appointment-tile:hover { z-index: 25; box-shadow: var(--shadow-md); }
.calendar-mobile-list { display: none; }

/* New appointment */
.product-area-salon .groomly-modal.groomly-modal-large { width: min(980px, calc(100vw - 32px)); }
.appointment-quick-form { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: var(--space-3); }
.appointment-quick-form > .form-section:first-of-type,
.appointment-quick-form > .form-error-summary,
.appointment-quick-form > .optional-disclosure,
.appointment-quick-form > .smart-slot-suggestions,
.appointment-quick-form > .modal-inline-info,
.appointment-quick-form > .modal-actions { grid-column: 1 / -1; }
.appointment-confirmation-section .choice-cards ul { grid-template-columns: 1fr; }
.appointment-quick-form .form-section {
  padding: var(--space-4);
  gap: var(--space-3);
  border-color: var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.appointment-quick-form .form-section-title > span { display: grid; gap: 1px; }
.appointment-quick-form .form-section-title small { color: var(--color-primary); font-size: .625rem; font-weight: var(--font-weight-semibold); letter-spacing: .08em; }
.appointment-quick-form .form-section-title strong { font-size: var(--font-size-body); font-weight: var(--font-weight-semibold); }
.appointment-party-search > input { padding-left: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235d6d82' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 13px center; }
.appointment-party-results { border-color: var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.appointment-party-result { min-height: 52px; }
.appointment-party-result:hover,
.appointment-party-result:focus-visible { background: var(--color-primary-soft); }
.search-empty-message { padding: var(--space-3); color: var(--color-text-secondary); font-size: var(--font-size-body-small); }
.appointment-party-selected {
  min-height: 54px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--color-success) 24%, var(--color-border));
  border-radius: var(--radius-md);
  background: var(--color-success-soft);
}
.appointment-party-selected > span:first-child { display: grid; }
.appointment-party-selected[hidden],
.service-quote[hidden],
.smart-slot-suggestions[hidden],
.mobile-service-address[hidden] { display: none !important; }
.appointment-party-selected small { color: var(--color-success); font-size: .625rem; font-weight: var(--font-weight-semibold); letter-spacing: .08em; }
.appointment-party-selected strong { color: var(--color-text-primary); font-weight: var(--font-weight-semibold); }
.appointment-service-grid { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: var(--space-3); }
.price-input-wrap { position: relative; }
.price-input-wrap input { padding-right: 38px; }
.price-input-wrap > span { position: absolute; right: 12px; top: 11px; color: var(--color-text-secondary); font-size: var(--font-size-body-small); }
.service-quote {
  min-height: 50px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--color-success) 22%, var(--color-border));
  border-radius: var(--radius-md);
  background: var(--color-success-soft);
}
.service-quote > svg { width: 20px; height: 20px; color: var(--color-success); }
.service-quote > span { display: grid; }
.service-quote strong { color: var(--color-success); font-size: var(--font-size-caption); font-weight: var(--font-weight-semibold); }
.service-quote small { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.smart-slot-suggestions { margin: 0; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-info-soft); }
.smart-slot-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: var(--space-2); }
.smart-slot-head small { color: var(--color-text-secondary); }
.smart-slot-list { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.smart-slot-chip { min-height: 48px; display: flex; flex-direction: column; gap: 2px; padding: 8px 11px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text-primary); text-align: left; }
.smart-slot-chip.recommended { border-color: var(--color-primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 10%, transparent); }
.smart-slot-chip small { color: var(--color-text-secondary); }
.appointment-end-hint { border-color: var(--color-border); border-radius: var(--radius-md); background: var(--color-primary-soft); }
.choice-cards label { border-color: var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); font-size: var(--font-size-body-small); font-weight: var(--font-weight-medium); }
.choice-cards label:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-primary); }

@media (max-width: 1199px) {
  .product-area-salon .app-shell-salon { grid-template-columns: 1fr; }
  .product-area-salon .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    width: min(320px, calc(100vw - 42px));
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: var(--shadow-lg);
  }
  .product-area-salon.sidebar-is-open .app-sidebar { transform: translateX(0); }
  .product-area-salon .app-sidebar .sidebar-close { display: inline-grid; }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    border: 0;
    background: rgb(15 23 42 / 42%);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
  }
  .product-area-salon.sidebar-is-open .sidebar-backdrop { opacity: 1; visibility: visible; }
  .product-area-salon .app-topbar .sidebar-trigger { display: inline-grid; }
  .app-topbar { grid-template-columns: minmax(180px, auto) minmax(280px, 1fr) auto; }
  .user-menu-copy { display: none; }
  .user-menu summary { grid-template-columns: 34px 16px; }
  .calendar-filter { grid-template-columns: 105px minmax(150px, 1fr) 145px auto; }
  .calendar-filter .calendar-advanced-filter { display: none; }
}

@media (max-width: 767px) {
  .product-area-salon { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .product-area-salon .app-workspace { padding: 0 var(--page-gutter) var(--space-5) !important; }
  .app-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2);
    min-height: 66px;
    margin: 0 calc(var(--page-gutter) * -1) var(--space-4);
    padding: 9px var(--page-gutter);
  }
  .topbar-title .eyebrow { display: none; }
  .topbar-title h1 { font-size: 1.125rem; }
  .app-global-search { grid-column: 1 / -1; grid-row: 2; }
  .app-global-search kbd { display: none; }
  .product-area-salon .app-global-search input { min-height: 44px; padding-right: 12px; font-size: 1rem; }
  .topbar-actions { grid-column: 2; grid-row: 1; }
  .topbar-actions > .icon-button,
  .topbar-actions .user-menu { display: none; }
  .app-primary-action { width: 44px; min-width: 44px; padding: 0 !important; }
  .app-primary-action span { display: none; }
  .global-search-results { position: fixed; top: 118px; left: var(--page-gutter); right: var(--page-gutter); max-height: calc(100dvh - 210px); }
  .global-search-result { grid-template-columns: 1fr; }
  .global-search-actions { padding-left: 50px; }
  .search-action { min-height: 38px; }
  .today-page-intro { align-items: flex-end; }
  .today-page-intro .button { display: none; }
  .app-today .salon-today-hero,
  .app-today .salon-day-layout { grid-template-columns: 1fr; }
  .app-today .today-focus { min-height: 0; padding: var(--space-4); }
  .app-today .today-focus-main { align-items: flex-start; }
  .app-today .today-focus-main h3 { font-size: 1.25rem; }
  .app-today .today-focus-actions { width: 100%; }
  .app-today .today-focus-actions .button { flex: 1; }
  .app-today .today-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
  .app-today .metric-card { display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto auto; justify-items: start; padding: var(--space-3); }
  .app-today .metric-card strong { grid-column: 1; grid-row: 2; font-size: 1.375rem; }
  .app-today .metric-card span,
  .app-today .metric-card small { font-size: .6875rem; }
  .app-today .today-agenda-row { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .calendar-workspace { padding: var(--space-4) !important; }
  .calendar-workspace > .section-title { display: grid; }
  .calendar-workspace > .section-title .actions { display: grid; grid-template-columns: 1fr; }
  .calendar-workspace > .section-title .actions .button { width: 100%; }
  .calendar-filter { grid-template-columns: 1fr 1fr; padding: var(--space-2); }
  .calendar-filter select[name="groomer"] { grid-column: 1 / -1; }
  .calendar-filter .calendar-advanced-filter { display: none !important; }
  .calendar-filter .button { grid-column: 1 / -1; }
  .calendar-helper,
  .calendar-workspace .outlook-calendar { display: none !important; }
  .calendar-mobile-list { display: block; margin-top: var(--space-4); }
  .calendar-mobile-list .section-title { margin-bottom: var(--space-3); }
  .calendar-mobile-list .appointment-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-3); }
  .calendar-mobile-list .appointment-row > .badge { grid-column: 2; justify-self: start; }
  .calendar-mobile-list .appointment-row p { font-size: var(--font-size-caption); }
  .product-area-salon .groomly-modal { width: 100vw !important; max-height: 100dvh !important; margin: 0; }
  .product-area-salon .groomly-modal-card { min-height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .product-area-salon .groomly-modal-head { position: sticky; top: 0; z-index: 5; padding: max(var(--space-4), env(safe-area-inset-top)) var(--space-4) var(--space-3); background: var(--color-surface); }
  .product-area-salon .groomly-modal-head .section-description { display: block; font-size: var(--font-size-body-small) !important; }
  .product-area-salon .groomly-modal-form { padding: var(--space-3) var(--space-4) calc(84px + env(safe-area-inset-bottom)); }
  .appointment-quick-form { grid-template-columns: 1fr; }
  .appointment-quick-form > * { grid-column: 1 !important; }
  .appointment-service-grid { grid-template-columns: minmax(0, 1fr) 120px; }
  .appointment-time-grid { grid-template-columns: 1fr 1fr; }
  .appointment-time-grid .form-field:last-child { grid-column: 1 / -1; }
  .smart-slot-list { display: grid; grid-template-columns: 1fr 1fr; }
  .smart-slot-chip { min-height: 58px; }
  .product-area-salon .modal-actions { position: sticky; bottom: calc(-84px - env(safe-area-inset-bottom)); z-index: 6; margin: var(--space-3) calc(var(--space-4) * -1) calc(-84px - env(safe-area-inset-bottom)); padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--color-surface) 96%, transparent); }
  .product-area-salon .modal-actions .button { flex: 1; min-height: 46px; }
  .product-area-salon .salon-mobile-nav {
    z-index: 60;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 68px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-color: var(--color-border);
    background: color-mix(in srgb, var(--color-surface) 96%, transparent);
    box-shadow: 0 -8px 24px rgb(23 32 51 / 8%);
  }
  .product-area-salon .salon-mobile-nav a,
  .product-area-salon .salon-mobile-nav button {
    min-width: 0;
    min-height: 52px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 2px;
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-text-secondary);
    font-size: .625rem;
    font-weight: var(--font-weight-semibold);
  }
  .product-area-salon .salon-mobile-nav .nav-icon,
  .product-area-salon .salon-mobile-nav .nav-icon svg { width: 20px; height: 20px; }
  .product-area-salon .salon-mobile-nav a.active { color: var(--color-primary); background: var(--color-primary-soft); }
  .product-area-salon .salon-mobile-nav .nav-create { width: 52px; height: 52px; min-height: 52px; transform: translateY(-10px); border-radius: var(--radius-lg); background: var(--color-primary); color: white; box-shadow: var(--shadow-md); }
}

@media (max-width: 420px) {
  .appointment-service-grid { grid-template-columns: 1fr; }
  .global-search-actions { padding-left: 0; }
  .app-today .today-agenda-row { grid-template-columns: 44px minmax(0, 1fr); }
  .app-today .today-agenda-row > .badge,
  .app-today .today-agenda-row > .button { grid-column: 2; justify-self: start; }
  .app-today .today-agenda-row > .badge {
    grid-column: 2;
    justify-self: start;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }
}

/* Wholesale, Orders & Commerce Core v1 */
@layer views {
  .sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
  .commerce-page { width:100%; min-width:0; max-width:100%; display:grid; grid-template-columns:minmax(0,1fr); gap:var(--space-5); color:var(--color-text-primary); }
  .commerce-page > * { min-width:0; max-width:100%; }
  .commerce-heading { display:flex; justify-content:space-between; align-items:center; gap:var(--space-5); padding:var(--space-6); border:1px solid color-mix(in srgb,var(--color-border) 72%,transparent); border-radius:var(--radius-xl); background:color-mix(in srgb,var(--color-surface) 93%,var(--color-primary) 7%); box-shadow:var(--shadow-sm); }
  .commerce-heading--mint { background:linear-gradient(135deg,color-mix(in srgb,var(--color-primary) 10%,var(--color-surface)),color-mix(in srgb,#d9f1e8 62%,var(--color-surface))); }
  .commerce-heading--warm { background:linear-gradient(135deg,color-mix(in srgb,#f8e8d9 58%,var(--color-surface)),var(--color-surface)); }
  .commerce-heading h2 { margin:2px 0 var(--space-2); font-size:var(--font-size-h1); line-height:1.12; }
  .commerce-heading p:last-child { max-width:680px; color:var(--color-text-secondary); }
  .commerce-cart-link { min-width:104px; min-height:52px; display:inline-flex; align-items:center; justify-content:center; gap:var(--space-2); padding:0 var(--space-4); border:1px solid color-mix(in srgb,var(--color-primary) 30%,var(--color-border)); border-radius:999px; background:var(--color-surface); color:var(--color-text-primary); font-weight:var(--font-weight-semibold); box-shadow:var(--shadow-sm); }
  .commerce-cart-link strong { min-width:26px; height:26px; display:grid; place-items:center; padding:0 6px; border-radius:999px; background:var(--color-primary); color:#fff; font-size:var(--font-size-caption); }
  .commerce-filter-panel { padding:var(--space-4); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-sm); }
  .commerce-search-form { display:grid; grid-template-columns:minmax(240px,1fr) 160px 112px 112px auto auto; gap:var(--space-3); align-items:end; }
  .commerce-search-form label { display:grid; gap:var(--space-1); color:var(--color-text-secondary); font-size:var(--font-size-caption); font-weight:var(--font-weight-semibold); }
  .commerce-search-form input,.commerce-search-form select { width:100%; min-height:44px; }
  .commerce-product-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-4); }
  .commerce-product-card { min-width:0; overflow:hidden; display:flex; flex-direction:column; border:1px solid color-mix(in srgb,var(--color-border) 78%,transparent); border-radius:var(--radius-xl); background:var(--color-surface); box-shadow:var(--shadow-sm); transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
  .commerce-product-card:hover { transform:translateY(-2px); border-color:color-mix(in srgb,var(--color-primary) 30%,var(--color-border)); box-shadow:var(--shadow-md); }
  .commerce-product-card:focus-within { outline:3px solid color-mix(in srgb,var(--color-primary) 34%,transparent); outline-offset:2px; }
  .commerce-product-visual { min-height:132px; display:grid; place-items:center; position:relative; background:linear-gradient(145deg,color-mix(in srgb,#dcefe7 78%,var(--color-surface)),color-mix(in srgb,#faeadf 68%,var(--color-surface))); color:var(--color-text-primary); }
  .commerce-product-visual > span,.commerce-product-detail-visual > span { width:58px; height:58px; display:grid; place-items:center; border-radius:20px; background:color-mix(in srgb,var(--color-surface) 86%,transparent); color:var(--color-primary); font-size:var(--font-size-h2); font-weight:var(--font-weight-bold); box-shadow:var(--shadow-sm); }
  .commerce-product-visual small { position:absolute; left:var(--space-4); bottom:var(--space-3); color:var(--color-text-secondary); font-weight:var(--font-weight-semibold); }
  .commerce-product-body { min-width:0; flex:1; display:flex; flex-direction:column; gap:var(--space-3); padding:var(--space-5); }
  .commerce-product-code,.commerce-detail-code { color:var(--color-text-secondary); font-size:var(--font-size-caption); letter-spacing:.04em; }
  .commerce-product-body h3 { margin:0; min-height:44px; font-size:var(--font-size-h3); line-height:1.35; }
  .commerce-product-body h3 a { min-height:44px; display:flex; align-items:center; color:inherit; }
  .commerce-product-price,.commerce-detail-price { display:grid; gap:2px; }
  .commerce-product-price strong { font-size:var(--font-size-h3); }
  .commerce-product-price span,.commerce-detail-price span { color:var(--color-text-secondary); font-size:var(--font-size-caption); }
  .commerce-stock { width:max-content; max-width:100%; padding:6px 10px; border-radius:999px; background:color-mix(in srgb,var(--color-success) 12%,var(--color-surface)); color:color-mix(in srgb,var(--color-success) 72%,#18392d); font-size:var(--font-size-caption); font-weight:var(--font-weight-semibold); }
  .commerce-stock.is-out { background:color-mix(in srgb,var(--color-warning) 13%,var(--color-surface)); color:#7c5415; }
  .commerce-add-form { margin-top:auto; display:grid; grid-template-columns:72px minmax(0,1fr); gap:var(--space-2); }
  .commerce-add-form input { width:100%; min-height:44px; }
  .commerce-add-form .button { width:100%; min-height:44px; }
  .commerce-empty { grid-column:1/-1; display:grid; justify-items:center; gap:var(--space-3); padding:var(--space-8); border:1px dashed var(--color-border); border-radius:var(--radius-xl); background:color-mix(in srgb,var(--color-surface) 88%,var(--color-background)); text-align:center; }
  .commerce-empty p { color:var(--color-text-secondary); }
  .commerce-recent { display:flex; justify-content:space-between; align-items:center; gap:var(--space-4); padding:var(--space-5); border-radius:var(--radius-lg); background:color-mix(in srgb,var(--color-info) 7%,var(--color-surface)); }
  .commerce-breadcrumb { display:flex; align-items:center; gap:var(--space-2); min-height:44px; color:var(--color-text-secondary); font-size:var(--font-size-body-small); }
  .commerce-breadcrumb a { min-height:44px; display:inline-flex; align-items:center; color:var(--color-primary); font-weight:var(--font-weight-semibold); }
  .commerce-product-detail { display:grid; grid-template-columns:minmax(320px,.9fr) minmax(0,1.1fr); overflow:hidden; border:1px solid var(--color-border); border-radius:var(--radius-xl); background:var(--color-surface); box-shadow:var(--shadow-sm); }
  .commerce-product-detail-visual { min-height:430px; display:grid; place-items:center; position:relative; background:linear-gradient(145deg,color-mix(in srgb,#dcefe7 78%,var(--color-surface)),color-mix(in srgb,#faeadf 68%,var(--color-surface))); }
  .commerce-product-detail-visual > span { width:92px; height:92px; border-radius:30px; font-size:var(--font-size-display); }
  .commerce-product-detail-visual small { position:absolute; left:var(--space-6); bottom:var(--space-6); color:var(--color-text-secondary); font-weight:var(--font-weight-semibold); }
  .commerce-product-detail-copy { display:grid; align-content:center; gap:var(--space-4); padding:var(--space-8); }
  .commerce-product-detail-copy h2 { margin:0; font-size:var(--font-size-h1); }
  .commerce-detail-price strong { font-size:var(--font-size-display); line-height:1.1; }
  .commerce-detail-buy { display:flex; align-items:end; gap:var(--space-3); }
  .commerce-detail-buy label { display:grid; gap:var(--space-1); color:var(--color-text-secondary); font-size:var(--font-size-caption); font-weight:var(--font-weight-semibold); }
  .commerce-detail-buy input { width:88px; min-height:44px; }
  .commerce-detail-actions { display:flex; flex-wrap:wrap; gap:var(--space-2); }
  .commerce-cart-layout,.commerce-checkout-layout,.commerce-order-detail-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:var(--space-5); align-items:start; }
  .commerce-cart-lines,.commerce-order-items,.commerce-checkout-sections { display:grid; gap:var(--space-3); }
  .commerce-cart-row { display:grid; grid-template-columns:48px minmax(150px,1fr) auto auto auto; align-items:center; gap:var(--space-4); padding:var(--space-4); border:1px solid color-mix(in srgb,var(--color-border) 76%,transparent); border-radius:var(--radius-lg); background:var(--color-surface); }
  .commerce-cart-thumb { width:48px; height:48px; display:grid; place-items:center; border-radius:16px; background:color-mix(in srgb,var(--color-primary) 10%,var(--color-surface)); color:var(--color-primary); font-weight:var(--font-weight-bold); }
  .commerce-cart-copy { min-width:0; display:grid; gap:3px; }
  .commerce-cart-copy a { overflow:hidden; color:var(--color-text-primary); font-weight:var(--font-weight-semibold); text-overflow:ellipsis; white-space:nowrap; }
  .commerce-cart-copy span { color:var(--color-text-secondary); font-size:var(--font-size-caption); }
  .commerce-quantity-form { display:flex; align-items:center; gap:var(--space-2); }
  .commerce-quantity-form input { width:72px; min-height:44px; }
  .commerce-line-total { white-space:nowrap; }
  .commerce-remove { min-width:44px; min-height:44px; border:0; background:transparent; color:var(--color-danger); font-weight:var(--font-weight-semibold); cursor:pointer; }
  .commerce-summary { position:sticky; top:var(--space-5); display:grid; gap:var(--space-4); padding:var(--space-5); border:1px solid var(--color-border); border-radius:var(--radius-xl); background:var(--color-surface); box-shadow:var(--shadow-sm); }
  .commerce-summary > div { display:flex; justify-content:space-between; gap:var(--space-3); }
  .commerce-summary > p:not(.eyebrow) { color:var(--color-text-secondary); font-size:var(--font-size-caption); line-height:1.5; }
  .commerce-summary .button { width:100%; min-height:44px; justify-content:center; }
  .commerce-summary-total { padding-top:var(--space-4); border-top:1px solid var(--color-border); font-size:var(--font-size-h3); }
  .commerce-checkout-card { display:grid; grid-template-columns:40px minmax(0,1fr); gap:var(--space-4); padding:var(--space-5); border:1px solid color-mix(in srgb,var(--color-border) 76%,transparent); border-radius:var(--radius-xl); background:var(--color-surface); }
  .commerce-checkout-card h3 { margin:0 0 var(--space-3); }
  .commerce-checkout-card select { width:100%; min-height:48px; }
  .commerce-step { width:40px; height:40px; display:grid; place-items:center; border-radius:14px; background:color-mix(in srgb,var(--color-primary) 12%,var(--color-surface)); color:var(--color-primary); font-weight:var(--font-weight-bold); }
  .commerce-help { margin-top:var(--space-2); color:var(--color-text-secondary); font-size:var(--font-size-caption); }
  .commerce-address-warning { display:grid; gap:var(--space-3); padding:var(--space-4); border-radius:var(--radius-md); background:color-mix(in srgb,var(--color-warning) 10%,var(--color-surface)); }
  .commerce-checkout-items { display:grid; gap:var(--space-2); }
  .commerce-checkout-items p { display:flex; justify-content:space-between; gap:var(--space-3); color:var(--color-text-secondary); }
  .commerce-checkout-items strong { color:var(--color-text-primary); white-space:nowrap; }
  .commerce-order-list { display:grid; gap:var(--space-3); }
  .commerce-order-row { display:grid; grid-template-columns:110px 1fr 1fr 1fr 28px; align-items:center; gap:var(--space-4); min-height:78px; padding:var(--space-4) var(--space-5); border:1px solid color-mix(in srgb,var(--color-border) 76%,transparent); border-radius:var(--radius-lg); background:var(--color-surface); color:var(--color-text-primary); transition:transform .15s ease,border-color .15s ease; }
  .commerce-order-row:hover { transform:translateY(-1px); border-color:color-mix(in srgb,var(--color-primary) 28%,var(--color-border)); }
  .commerce-order-row > div { display:grid; gap:3px; }
  .commerce-order-row > div > span { color:var(--color-text-secondary); font-size:var(--font-size-caption); }
  .commerce-order-arrow { color:var(--color-primary); font-size:var(--font-size-h3); }
  .commerce-status { width:max-content; display:inline-flex; align-items:center; min-height:30px; padding:5px 10px; border-radius:999px; background:color-mix(in srgb,var(--color-info) 10%,var(--color-surface)); color:var(--color-text-primary); font-size:var(--font-size-caption); font-weight:var(--font-weight-semibold); text-transform:none; }
  .commerce-status--cancelled { background:color-mix(in srgb,var(--color-danger) 10%,var(--color-surface)); color:var(--color-danger); }
  .commerce-status--shipped,.commerce-status--paid { background:color-mix(in srgb,var(--color-success) 12%,var(--color-surface)); color:color-mix(in srgb,var(--color-success) 72%,#173d2d); }
  .commerce-order-items { padding:var(--space-5); border:1px solid var(--color-border); border-radius:var(--radius-xl); background:var(--color-surface); }
  .commerce-section-head,.commerce-order-items article,.commerce-order-grand-total { display:flex; justify-content:space-between; align-items:center; gap:var(--space-4); }
  .commerce-section-head { padding-bottom:var(--space-3); }
  .commerce-section-head h3 { margin:0; }
  .commerce-section-head span,.commerce-order-items article span { color:var(--color-text-secondary); font-size:var(--font-size-caption); }
  .commerce-order-items article { padding:var(--space-4) 0; border-top:1px solid var(--color-border); }
  .commerce-order-items article > div { display:grid; gap:3px; }
  .commerce-order-grand-total { padding-top:var(--space-5); border-top:1px solid var(--color-border); font-size:var(--font-size-h3); }
  .commerce-order-side { display:grid; gap:var(--space-3); }
  .commerce-order-side > section { display:grid; gap:var(--space-2); padding:var(--space-5); border-radius:var(--radius-lg); background:color-mix(in srgb,var(--color-surface) 92%,var(--color-background)); }
  .commerce-order-side p:not(.eyebrow) { color:var(--color-text-secondary); }
  .commerce-order-actions .button { width:100%; min-height:44px; justify-content:center; }
}

@media (max-width: 1100px) {
  .commerce-search-form { grid-template-columns:minmax(220px,1fr) 160px 110px 110px; }
  .commerce-search-form .button { width:100%; }
  .commerce-product-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .commerce-cart-layout,.commerce-checkout-layout,.commerce-order-detail-layout { grid-template-columns:minmax(0,1fr) 286px; }
  .commerce-cart-row { grid-template-columns:48px minmax(0,1fr) auto; }
  .commerce-quantity-form { grid-column:2; }
  .commerce-line-total { grid-column:3; grid-row:1; }
}

@media (max-width: 767px) {
  .commerce-page { gap:var(--space-3); }
  .commerce-heading { align-items:flex-start; padding:var(--space-4); flex-direction:column; }
  .commerce-heading h2 { font-size:var(--font-size-h2); }
  .commerce-heading > .button,.commerce-cart-link { width:100%; }
  .commerce-search-form { grid-template-columns:1fr 1fr; }
  .commerce-search-field { grid-column:1/-1; }
  .commerce-filter-panel { padding:var(--space-3); }
  .category-chips { overflow-x:auto; flex-wrap:nowrap; padding-bottom:2px; }
  .category-chips .chip { min-height:44px; align-items:center; white-space:nowrap; }
  .commerce-product-grid { min-width:0; grid-template-columns:minmax(0,1fr); }
  .commerce-product-card { min-width:0; display:grid; grid-template-columns:88px minmax(0,1fr); }
  .commerce-product-visual { min-height:100%; }
  .commerce-product-visual > span { width:48px; height:48px; border-radius:16px; font-size:var(--font-size-h3); }
  .commerce-product-visual small { display:none; }
  .commerce-product-body { padding:var(--space-4); }
  .commerce-product-body h3 { min-height:0; }
  .commerce-add-form { min-width:0; grid-template-columns:56px minmax(0,1fr); }
  .commerce-add-form .button { min-width:0; padding-inline:var(--space-2); white-space:normal; }
  .commerce-product-detail { grid-template-columns:1fr; }
  .commerce-product-detail-visual { min-height:220px; }
  .commerce-product-detail-copy { padding:var(--space-5); }
  .commerce-detail-price strong { font-size:var(--font-size-h1); }
  .commerce-detail-buy { align-items:stretch; flex-direction:column; }
  .commerce-detail-buy input,.commerce-detail-buy .button,.commerce-detail-actions .button { width:100%; min-height:44px; }
  .commerce-cart-layout,.commerce-checkout-layout,.commerce-order-detail-layout { grid-template-columns:1fr; }
  .commerce-cart-row { grid-template-columns:44px minmax(0,1fr) auto; gap:var(--space-3); padding:var(--space-3); }
  .commerce-cart-thumb { width:44px; height:44px; }
  .commerce-cart-copy { grid-column:2/-1; }
  .commerce-quantity-form { grid-column:2; display:grid; grid-template-columns:72px minmax(0,1fr); }
  .commerce-quantity-form .button { min-height:44px; }
  .commerce-line-total { grid-column:3; grid-row:2; align-self:center; }
  .commerce-cart-row > form:last-child { grid-column:2/-1; }
  .commerce-remove { width:100%; text-align:left; }
  .commerce-summary { position:static; }
  .commerce-checkout-card { grid-template-columns:36px minmax(0,1fr); padding:var(--space-4); }
  .commerce-step { width:36px; height:36px; }
  .commerce-order-row { grid-template-columns:1fr 1fr; gap:var(--space-3); min-height:0; padding:var(--space-4); }
  .commerce-order-row > div:nth-child(3),.commerce-order-row > div:nth-child(4) { padding-top:var(--space-3); border-top:1px solid var(--color-border); }
  .commerce-order-arrow { display:none; }
  .commerce-order-items { padding:var(--space-4); }
  .commerce-order-items article { align-items:flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .commerce-product-card,.commerce-order-row { transition:none; }
}

/* Reporting & Analytics Core v1 */
.analytics-v1 {
  --analytics-mint: color-mix(in srgb, var(--color-success-soft) 72%, white);
  --analytics-sky: color-mix(in srgb, var(--color-info-soft) 68%, white);
  --analytics-warm: color-mix(in srgb, var(--color-warning-soft) 70%, white);
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.analytics-hero,
.analytics-filter-heading,
.analytics-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.analytics-hero {
  align-items: center;
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(125deg, var(--color-surface) 52%, var(--analytics-mint));
}

.analytics-hero h2,
.analytics-section-header h2,
.analytics-filter-heading h3 { margin: var(--space-1) 0 0; }

.analytics-hero .section-description,
.analytics-section-header p,
.analytics-period {
  margin: var(--space-1) 0 0;
  color: var(--color-text-secondary);
}

.analytics-filter-panel { display: grid; gap: var(--space-4); padding: var(--space-5); }
.analytics-range-chips, .analytics-size-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.analytics-range-chips a,
.analytics-size-pills span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-semibold);
}

.analytics-range-chips a:hover,
.analytics-range-chips a.active {
  border-color: color-mix(in srgb, var(--color-primary) 38%, var(--color-border));
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
}

.analytics-filter-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(128px, 1fr)) repeat(3, minmax(150px, 1.25fr)) auto;
  align-items: end;
  gap: var(--space-3);
}

.analytics-filter-form .form-field { min-width: 0; }
.analytics-filter-form select, .analytics-filter-form input { width: 100%; min-height: 44px; }
.analytics-filter-form .button { min-height: 44px; white-space: nowrap; }

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-3);
}

.analytics-kpi {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding: var(--space-5);
  border: 1px solid color-mix(in srgb, var(--color-border) 78%, transparent);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.analytics-kpi.is-primary { background: var(--analytics-mint); }
.analytics-kpi.is-soft { background: var(--analytics-sky); }
.analytics-kpi.is-warm { background: var(--analytics-warm); }

.analytics-kpi > span, .analytics-kpi > small { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.analytics-kpi > span { font-weight: var(--font-weight-semibold); }
.analytics-kpi > strong { overflow-wrap: anywhere; font-size: clamp(1.35rem, 2vw, 1.85rem); line-height: 1.08; letter-spacing: -.035em; }

.analytics-grid { display: grid; gap: var(--space-4); min-width: 0; }
.analytics-grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(280px, .65fr); }
.analytics-grid-bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analytics-grid > *, .analytics-chart-card { min-width: 0; }

.analytics-chart-card,
.analytics-retention-card,
.analytics-ranking-panel,
.analytics-grid-bottom > .panel { padding: var(--space-5); }

.analytics-section-header > div { min-width: 0; }
.analytics-section-header h2 { font-size: var(--font-size-h2); }
.analytics-section-header p { max-width: 68ch; font-size: var(--font-size-body-small); }

.analytics-chart-scroll {
  min-width: 0;
  margin-top: var(--space-4);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--analytics-sky), color-mix(in srgb, var(--color-surface) 92%, transparent));
}

.analytics-line-chart { width: 100%; max-width: 100%; height: 210px; display: block; padding: var(--space-2); overflow: visible; }
.chart-axis { stroke: color-mix(in srgb, var(--color-border) 82%, transparent); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--color-primary); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { fill: var(--color-surface); stroke: var(--color-primary); stroke-width: 4; }
.chart-point:focus { outline: none; stroke: var(--color-focus); stroke-width: 6; }

.analytics-trend-list {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.analytics-trend-list > div {
  min-width: 94px;
  display: grid;
  gap: 2px;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-surface-subtle);
}

.analytics-trend-list span, .analytics-trend-list small { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.analytics-trend-list strong { font-size: var(--font-size-body-small); }

.analytics-retention-card {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  background: linear-gradient(155deg, var(--color-surface) 48%, var(--analytics-warm));
}

.analytics-retention-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.analytics-retention-metrics > div { display: grid; gap: var(--space-1); padding: var(--space-4); border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-surface) 78%, transparent); }
.analytics-retention-metrics > div:last-child { grid-column: 1 / -1; }
.analytics-retention-metrics span { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.analytics-retention-metrics strong { font-size: var(--font-size-h2); }

.analytics-definition { padding: var(--space-4); border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-surface) 76%, transparent); }
.analytics-definition p { margin: var(--space-1) 0 0; color: var(--color-text-secondary); font-size: var(--font-size-caption); }

.analytics-ranking { display: grid; gap: 0; margin-top: var(--space-3); }
.analytics-ranking > article { display: grid; grid-template-columns: minmax(220px, 1.1fr) minmax(0, 2fr); align-items: center; gap: var(--space-5); padding: var(--space-4) 0; border-bottom: 1px solid var(--color-border); }
.analytics-ranking > article:last-child { border-bottom: 0; }
.analytics-rank { min-width: 0; display: flex; align-items: center; gap: var(--space-3); }
.analytics-rank > span { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--color-primary-soft); color: var(--color-primary-hover); font-weight: var(--font-weight-bold); }
.analytics-rank > div { min-width: 0; display: grid; gap: 2px; }
.analytics-rank strong { overflow-wrap: anywhere; }
.analytics-rank small { color: var(--color-text-secondary); }

.analytics-ranking dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); margin: 0; }
.analytics-ranking dl > div { min-width: 0; display: grid; gap: 2px; padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-subtle); }
.analytics-ranking dt { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.analytics-ranking dd { margin: 0; overflow-wrap: anywhere; font-size: var(--font-size-body-small); font-weight: var(--font-weight-semibold); }

.analytics-cancellation-summary { display: flex; align-items: baseline; gap: var(--space-2); margin: var(--space-5) 0 var(--space-2); }
.analytics-cancellation-summary strong { font-size: var(--font-size-display); }
.analytics-cancellation-summary span, .analytics-grid-bottom > .panel > p { color: var(--color-text-secondary); }

.analytics-breed-list { display: grid; gap: 0; margin-top: var(--space-3); }
.analytics-breed-list > div { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 48px; padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border); }
.analytics-breed-list > div:last-child { border-bottom: 0; }
.analytics-breed-list span { display: grid; gap: 1px; }
.analytics-breed-list small { color: var(--color-text-secondary); }
.analytics-size-pills { margin-top: var(--space-4); }

@media (max-width: 1180px) {
  .analytics-filter-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analytics-filter-form .button { width: 100%; }
  .analytics-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analytics-grid-main { grid-template-columns: minmax(0, 1.35fr) minmax(260px, .75fr); }
}

@media (max-width: 860px) {
  .analytics-grid-main, .analytics-grid-bottom { grid-template-columns: 1fr; }
  .analytics-ranking > article { grid-template-columns: 1fr; gap: var(--space-3); }
  .analytics-ranking dl { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .analytics-v1 { gap: var(--space-3); }
  .analytics-hero, .analytics-filter-heading, .analytics-section-header { display: grid; }
  .analytics-hero, .analytics-filter-panel, .analytics-chart-card, .analytics-retention-card, .analytics-ranking-panel, .analytics-grid-bottom > .panel { padding: var(--space-4); }
  .analytics-hero .button { width: 100%; min-height: 46px; }
  .analytics-range-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analytics-range-chips a { justify-content: center; min-height: 44px; padding-inline: var(--space-2); }
  .analytics-filter-form { grid-template-columns: 1fr; }
  .analytics-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-kpi { padding: var(--space-4); }
  .analytics-kpi > strong { font-size: 1.35rem; }
  .analytics-line-chart { height: 172px; padding: 0; }
  .analytics-ranking dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-retention-metrics { grid-template-columns: 1fr; }
  .analytics-retention-metrics > div:last-child { grid-column: auto; }
}

@media (max-width: 390px) {
  .analytics-kpis { grid-template-columns: 1fr 1fr; gap: var(--space-2); }
  .analytics-kpi { padding: var(--space-3); }
  .analytics-range-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Enterprise Client Portal v1 — intentionally separate from the salon shell. */
.customer-v1 {
  --cp-mint: #2f7a64;
  --cp-mint-hover: #286853;
  --cp-mint-soft: #e7f4ee;
  --cp-warm: #fbf5ed;
  --cp-lilac: #f2effb;
  --cp-sky: #edf6fa;
  --cp-text: #1c2b27;
  --cp-muted: #64746e;
  --cp-border: #dbe7e1;
  min-height: 100vh;
  color: var(--cp-text);
  background: linear-gradient(180deg, #f7fbf9 0, #f3f8f6 55%, #fbfaf7 100%);
}
.customer-v1 * { box-sizing: border-box; }
.customer-v1 a { color: inherit; }
.customer-v1 :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cp-mint) 35%, white);
  outline-offset: 3px;
}
.customer-v1 .skip-link { position: fixed; top: -60px; left: var(--space-4); z-index: 100; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--cp-text); color: white; }
.customer-v1 .skip-link:focus { top: var(--space-3); }
.customer-shell-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid rgb(219 231 225 / 82%); background: rgb(255 255 255 / 88%); backdrop-filter: blur(18px); }
.customer-shell-bar { width: min(1180px, calc(100% - 40px)); min-height: 72px; margin: 0 auto; display: grid; grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr); align-items: center; gap: var(--space-6); }
.customer-brand { display: inline-flex; align-items: center; gap: var(--space-3); justify-self: start; min-height: 48px; }
.customer-brand > svg, .customer-brand > img, .customer-brand .brand-mark { width: 42px; height: 42px; }
.customer-brand > span { display: grid; gap: 1px; }
.customer-brand strong { font-size: 1rem; letter-spacing: -.02em; }
.customer-brand small { color: var(--cp-muted); font-size: var(--font-size-caption); }
.customer-desktop-nav { display: flex; align-items: center; gap: var(--space-1); padding: var(--space-1); border-radius: var(--radius-lg); background: #f3f7f5; }
.customer-desktop-nav a { min-height: 42px; display: inline-flex; align-items: center; padding: 0 var(--space-4); border-radius: var(--radius-md); color: var(--cp-muted); font-size: var(--font-size-body-small); font-weight: var(--font-weight-semibold); }
.customer-desktop-nav a:hover { color: var(--cp-text); background: rgb(255 255 255 / 75%); }
.customer-desktop-nav a.active { color: var(--cp-mint-hover); background: white; box-shadow: var(--shadow-sm); }
.customer-account-menu { position: relative; justify-self: end; }
.customer-account-menu summary { min-width: 44px; min-height: 48px; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-1) var(--space-2); border-radius: var(--radius-lg); cursor: pointer; list-style: none; }
.customer-account-menu summary::-webkit-details-marker { display: none; }
.customer-account-menu summary > span:first-child { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--cp-mint-soft); color: var(--cp-mint-hover); font-weight: var(--font-weight-bold); }
.customer-account-copy { display: grid; text-align: left; }
.customer-account-copy strong { max-width: 165px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--font-size-body-small); }
.customer-account-copy small { max-width: 165px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cp-muted); font-size: var(--font-size-caption); }
.customer-account-menu > div { position: absolute; top: calc(100% + 8px); right: 0; width: 230px; display: grid; padding: var(--space-2); border: 1px solid var(--cp-border); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-md); }
.customer-account-menu > div a, .customer-account-menu > div button { width: 100%; min-height: 44px; display: flex; align-items: center; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-md); background: transparent; color: var(--cp-text); text-align: left; font-size: var(--font-size-body-small); }
.customer-account-menu > div a:hover, .customer-account-menu > div button:hover { background: var(--cp-mint-soft); }
.customer-shell-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: var(--space-10) 0 var(--space-16); }
.customer-messages { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.customer-mobile-nav { display: none; }

.cp-page { display: grid; gap: var(--space-8); }
.cp-page-heading { display: grid; gap: var(--space-2); max-width: 760px; }
.cp-page-heading h1 { color: var(--cp-text); font-size: clamp(1.85rem, 3.2vw, 2.65rem); line-height: 1.12; letter-spacing: -.04em; }
.cp-page-heading > p:last-child { max-width: 620px; color: var(--cp-muted); font-size: 1rem; line-height: 1.6; }
.cp-eyebrow, .cp-label { display: block; color: var(--cp-mint); font-size: var(--font-size-caption); font-weight: var(--font-weight-bold); letter-spacing: .08em; text-transform: uppercase; }
.cp-heading-actions { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-6); }
.cp-heading-actions > div { display: grid; gap: var(--space-2); }
.cp-back-link { width: max-content; min-height: 44px; display: inline-flex; align-items: center; color: var(--cp-muted); font-weight: var(--font-weight-semibold); }
.cp-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 0 var(--space-5); border: 1px solid transparent; border-radius: var(--radius-lg); font-weight: var(--font-weight-semibold); line-height: 1; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.cp-button:hover { transform: translateY(-1px); }
.cp-button-primary { background: var(--cp-mint); color: white !important; box-shadow: 0 8px 20px rgb(47 122 100 / 18%); }
.cp-button-primary:hover { background: var(--cp-mint-hover); }
.cp-button-secondary { border-color: var(--cp-border); background: white; color: var(--cp-mint-hover) !important; }
.cp-button-secondary:hover, .cp-button-ghost:hover { border-color: #b8d1c6; background: var(--cp-mint-soft); }
.cp-button-ghost { border-color: transparent; background: transparent; color: var(--cp-muted) !important; }
.cp-button-wide { width: 100%; }
.cp-card, .cp-empty-card { min-width: 0; padding: var(--space-6); border: 1px solid rgb(219 231 225 / 86%); border-radius: var(--radius-xl); background: rgb(255 255 255 / 92%); box-shadow: 0 10px 30px rgb(31 74 60 / 5%); }
.cp-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.cp-card > header > div { display: grid; gap: var(--space-1); }
.cp-card h2, .cp-section h2 { color: var(--cp-text); font-size: var(--font-size-h2); line-height: var(--line-height-h2); letter-spacing: -.025em; }
.cp-card > header > a { min-height: 44px; display: inline-flex; align-items: center; color: var(--cp-mint-hover); font-size: var(--font-size-body-small); font-weight: var(--font-weight-semibold); }
.cp-empty-card { display: grid; justify-items: start; gap: var(--space-3); background: var(--cp-warm); }
.cp-empty-card p, .cp-empty-inline p { color: var(--cp-muted); line-height: 1.5; }
.cp-empty-inline { display: grid; gap: var(--space-2); padding: var(--space-4) 0; }
.cp-count { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 99px; background: var(--cp-mint-soft); color: var(--cp-mint-hover); font-weight: var(--font-weight-bold); }

.cp-pet-switcher { display: flex; gap: var(--space-2); overflow-x: auto; padding: var(--space-1); scrollbar-width: none; }
.cp-pet-switcher::-webkit-scrollbar { display: none; }
.cp-pet-switcher a { flex: 0 0 auto; min-height: 52px; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1); border: 1px solid var(--cp-border); border-radius: 99px; background: white; color: var(--cp-muted); font-weight: var(--font-weight-semibold); }
.cp-pet-switcher a.active { border-color: #9fc8b8; background: var(--cp-mint-soft); color: var(--cp-mint-hover); }
.cp-pet-switcher img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: white; }
.cp-hero-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); gap: var(--space-8); align-items: center; padding: clamp(24px, 4vw, 44px); overflow: hidden; border: 1px solid #d7e9e1; border-radius: 30px; background: linear-gradient(125deg, #e7f5ee 0%, #f3f8f1 54%, #fbf3e9 100%); }
.cp-hero-card::after { content: ""; position: absolute; right: -75px; bottom: -95px; width: 250px; height: 250px; border-radius: 50%; background: rgb(255 255 255 / 38%); }
.cp-pet-intro { display: flex; align-items: center; gap: var(--space-6); min-width: 0; }
.cp-pet-intro img { width: clamp(88px, 11vw, 126px); height: clamp(88px, 11vw, 126px); flex: 0 0 auto; border: 6px solid rgb(255 255 255 / 70%); border-radius: 32px; object-fit: cover; background: white; box-shadow: var(--shadow-md); }
.cp-pet-intro > div { display: grid; gap: var(--space-1); }
.cp-pet-intro span { color: var(--cp-mint); font-size: var(--font-size-body-small); font-weight: var(--font-weight-semibold); }
.cp-pet-intro h2 { font-size: clamp(2.15rem, 4vw, 3.35rem); line-height: 1; letter-spacing: -.055em; }
.cp-pet-intro p { color: var(--cp-muted); font-size: 1.05rem; }
.cp-next-visit { z-index: 1; display: grid; justify-items: start; gap: var(--space-2); padding: var(--space-5); border: 1px solid rgb(255 255 255 / 75%); border-radius: var(--radius-xl); background: rgb(255 255 255 / 76%); box-shadow: var(--shadow-sm); }
.cp-next-visit > strong { font-size: var(--font-size-h1); letter-spacing: -.035em; }
.cp-next-visit > p { color: var(--cp-muted); }
.cp-next-visit .cp-button { margin-top: var(--space-2); }
.cp-hero-action { z-index: 1; grid-column: 1 / -1; justify-self: start; }
.cp-dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-4); }
.cp-dashboard-grid > .cp-card { grid-column: span 6; }
.cp-dashboard-grid > .cp-salon-card { grid-column: span 4; }
.cp-list-row, .cp-visit-row { min-height: 72px; display: grid; align-items: center; gap: var(--space-4); border-radius: var(--radius-lg); }
.cp-list-row { grid-template-columns: 52px minmax(0, 1fr) auto; }
.cp-list-row > span:nth-child(2), .cp-visit-main { min-width: 0; display: grid; gap: 3px; }
.cp-list-row small, .cp-visit-main small { color: var(--cp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-date-tile { width: 52px; height: 58px; display: grid; place-content: center; text-align: center; border-radius: var(--radius-md); background: var(--cp-mint-soft); color: var(--cp-mint-hover); }
.cp-date-tile strong { font-size: 1.25rem; line-height: 1; }
.cp-date-tile small { margin-top: 3px; font-size: .66rem; font-weight: var(--font-weight-bold); letter-spacing: .05em; text-transform: uppercase; }
.cp-date-tile.quiet { background: #f2f5f3; color: var(--cp-muted); }
.cp-recommendation-card { background: linear-gradient(145deg, white, #f5f1fb); }
.cp-quote { max-width: 60ch; color: #374940; font-size: 1.04rem; line-height: 1.65; }
.cp-recommendation-card > a { min-height: 44px; display: inline-flex; align-items: center; margin-top: var(--space-3); color: var(--cp-mint-hover); font-weight: var(--font-weight-semibold); }
.cp-photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.cp-photo-strip img { width: 100%; aspect-ratio: 1; border-radius: var(--radius-lg); object-fit: cover; }
.cp-salon-card { background: var(--cp-sky); }
.cp-salon-card p { color: var(--cp-muted); line-height: 1.5; }
.cp-salon-card > a { min-height: 44px; display: inline-flex; align-items: center; margin-top: var(--space-2); color: var(--cp-mint-hover); font-weight: var(--font-weight-semibold); }
.cp-quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.cp-quick-actions > a { min-height: 92px; display: grid; align-content: center; gap: var(--space-1); padding: var(--space-5); border-radius: var(--radius-xl); background: white; box-shadow: var(--shadow-sm); }
.cp-quick-actions > a:hover { background: var(--cp-mint-soft); }
.cp-quick-actions span { color: var(--cp-muted); font-size: var(--font-size-body-small); }

.cp-section { display: grid; gap: var(--space-4); }
.cp-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.cp-section-heading > div { display: grid; gap: var(--space-1); }
.cp-visit-list { display: grid; gap: var(--space-2); }
.cp-visit-row { grid-template-columns: 52px minmax(0, 1fr) auto 24px; padding: var(--space-3) var(--space-4); border: 1px solid var(--cp-border); background: white; }
.cp-visit-row:hover { border-color: #abcbbf; box-shadow: var(--shadow-sm); }
.cp-row-arrow { color: var(--cp-mint); font-size: 1.2rem; }
.cp-link-label { color: var(--cp-mint-hover); font-size: var(--font-size-body-small); font-weight: var(--font-weight-semibold); }
.cp-status { min-height: 28px; display: inline-flex; align-items: center; width: max-content; padding: 0 var(--space-3); border-radius: 99px; background: #eef2f0; color: #5d6d67; font-size: var(--font-size-caption); font-weight: var(--font-weight-bold); }
.cp-status-confirmed, .cp-status-completed { background: var(--cp-mint-soft); color: var(--cp-mint-hover); }
.cp-status-scheduled { background: #edf3fb; color: #3b6894; }
.cp-status-cancelled { background: var(--color-danger-soft); color: var(--color-danger); }
.cp-status-warning { background: var(--color-warning-soft); color: var(--color-warning); }

.cp-pet-profile-hero, .cp-visit-hero, .cp-report-hero { display: flex; align-items: center; gap: var(--space-6); padding: var(--space-6); border: 1px solid var(--cp-border); border-radius: var(--radius-xl); background: linear-gradient(120deg, var(--cp-mint-soft), white 72%); }
.cp-pet-profile-hero > img { width: 104px; height: 104px; flex: 0 0 auto; border: 5px solid white; border-radius: 28px; object-fit: cover; background: white; box-shadow: var(--shadow-sm); }
.cp-pet-profile-hero > div { min-width: 0; display: grid; gap: var(--space-1); }
.cp-pet-profile-hero h2 { font-size: var(--font-size-display); line-height: var(--line-height-display); letter-spacing: -.04em; }
.cp-pet-profile-hero p, .cp-pet-profile-hero small { color: var(--cp-muted); }
.cp-next-mini { min-width: 210px; display: grid; gap: var(--space-1); margin-left: auto; padding: var(--space-4); border-radius: var(--radius-lg); background: white; }
.cp-next-mini span { color: var(--cp-muted); font-size: var(--font-size-caption); text-transform: uppercase; }
.cp-pet-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .75fr); align-items: start; gap: var(--space-5); }
.cp-pet-rail { display: grid; gap: var(--space-4); }
.cp-timeline { display: grid; }
.cp-timeline article { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-4); padding: var(--space-2) 0 var(--space-6) var(--space-7, 28px); border-left: 1px solid var(--cp-border); }
.cp-timeline-dot { position: absolute; top: 9px; left: -6px; width: 11px; height: 11px; border: 3px solid white; border-radius: 50%; background: var(--cp-mint); box-shadow: 0 0 0 1px var(--cp-mint); }
.cp-timeline article > div { display: grid; gap: var(--space-1); }
.cp-timeline time, .cp-timeline p { color: var(--cp-muted); font-size: var(--font-size-body-small); }
.cp-timeline article > a, .cp-compact-link { min-height: 44px; color: var(--cp-mint-hover); font-weight: var(--font-weight-semibold); }
.cp-compact-link { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--cp-border); }
.cp-compact-link > span:first-child { min-width: 0; display: grid; gap: 2px; }
.cp-compact-link small { color: var(--cp-muted); font-weight: var(--font-weight-regular); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.cp-photo-grid a { position: relative; min-width: 0; overflow: hidden; border-radius: var(--radius-lg); background: #eef3f0; }
.cp-photo-grid img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; }
.cp-photo-grid a > span { position: absolute; left: var(--space-2); bottom: var(--space-2); padding: 5px 9px; border-radius: 99px; background: rgb(28 43 39 / 76%); color: white; font-size: var(--font-size-caption); }

.cp-visit-hero { justify-content: space-between; }
.cp-visit-pet { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
.cp-visit-pet img { width: 76px; height: 76px; border: 4px solid white; border-radius: 22px; object-fit: cover; background: white; }
.cp-visit-pet > div { display: grid; gap: 2px; }
.cp-visit-pet h1, .cp-report-hero h1 { font-size: var(--font-size-display); line-height: 1.1; letter-spacing: -.045em; }
.cp-visit-pet p, .cp-report-hero p { color: var(--cp-muted); }
.cp-visit-time-block { display: grid; gap: 2px; text-align: right; }
.cp-visit-time-block > strong { font-size: var(--font-size-h3); }
.cp-visit-time-block > span { color: var(--cp-mint-hover); font-size: var(--font-size-h1); font-weight: var(--font-weight-bold); }
.cp-visit-time-block > small { color: var(--cp-muted); }
.cp-detail-grid, .cp-profile-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); align-items: start; gap: var(--space-5); }
.cp-definition-list { display: grid; margin: 0; }
.cp-definition-list > div { display: grid; grid-template-columns: minmax(120px, .45fr) minmax(0, 1fr); gap: var(--space-4); padding: var(--space-3) 0; border-top: 1px solid var(--cp-border); }
.cp-definition-list > div:first-child { border-top: 0; }
.cp-definition-list dt { color: var(--cp-muted); }
.cp-definition-list dd { margin: 0; font-weight: var(--font-weight-semibold); overflow-wrap: anywhere; }
.cp-definition-list.compact { margin-top: var(--space-4); }
.cp-completed-card { background: linear-gradient(145deg, white, var(--cp-warm)); }
.cp-completed-card > p { color: var(--cp-muted); line-height: 1.6; }
.cp-completed-card form { margin-top: var(--space-3); }
.cp-recommendation { display: grid; gap: var(--space-1); margin: var(--space-4) 0; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--cp-mint-soft); }
.cp-recommendation span { color: var(--cp-mint); font-size: var(--font-size-caption); font-weight: var(--font-weight-bold); text-transform: uppercase; }
.cp-sticky-action { display: flex; justify-content: flex-end; }

.cp-report-hero { justify-content: space-between; }
.cp-report-hero > div { display: grid; gap: var(--space-2); }
.cp-report-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .65fr); align-items: start; gap: var(--space-5); }
.cp-report-layout > main, .cp-report-layout > aside { display: grid; gap: var(--space-4); }
.cp-report-summary { background: linear-gradient(145deg, white, var(--cp-sky)); }
.cp-report-summary > h2 { margin-top: var(--space-1); font-size: var(--font-size-h1); }
.cp-report-summary > p { margin-top: var(--space-3); color: var(--cp-muted); font-size: 1rem; line-height: 1.65; }
.cp-return-hint, .cp-quote-note { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); background: rgb(255 255 255 / 72%); color: var(--cp-muted); }
.cp-rebook-card { background: var(--cp-warm); }
.cp-rebook-card h2 { margin-top: var(--space-1); }
.cp-rebook-card p { margin: var(--space-2) 0 var(--space-4); color: var(--cp-muted); line-height: 1.5; }

.cp-booking-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: var(--space-5); }
.cp-booking-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.cp-booking-steps li { min-width: 0; display: flex; align-items: center; gap: var(--space-2); color: var(--cp-muted); font-size: var(--font-size-caption); font-weight: var(--font-weight-semibold); }
.cp-booking-steps li span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--cp-border); border-radius: 50%; background: white; }
.cp-booking-steps li.active { color: var(--cp-mint-hover); }
.cp-booking-steps li.active span, .cp-booking-steps li.done span { border-color: var(--cp-mint); background: var(--cp-mint); color: white; }
.cp-booking-card { min-height: 360px; }
.cp-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.cp-choice-grid form { min-width: 0; }
.cp-choice-card { width: 100%; min-height: 86px; display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); border: 1px solid var(--cp-border); border-radius: var(--radius-lg); background: #fbfdfc; color: var(--cp-text); text-align: left; }
.cp-choice-card:hover { border-color: #9bc5b5; background: var(--cp-mint-soft); }
.cp-choice-card > img { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 16px; object-fit: cover; background: white; }
.cp-choice-card > span { min-width: 0; display: grid; gap: 3px; }
.cp-choice-card > span:last-child { margin-left: auto; }
.cp-choice-card small { color: var(--cp-muted); font-weight: var(--font-weight-regular); line-height: 1.35; }
.cp-service-choice { align-items: flex-start; min-height: 110px; }
.cp-service-price { flex: 0 0 auto; text-align: right; }
.cp-service-price strong { color: var(--cp-mint-hover); }
.cp-mobile-location { display: grid; }
.cp-mobile-location label { display: grid; gap: var(--space-2); color: var(--cp-muted); font-size: var(--font-size-body-small); }
.cp-mobile-location select { width: 100%; min-height: 48px; padding: 0 var(--space-3); border: 1px solid var(--cp-border); border-radius: var(--radius-md); background: white; }
.cp-avatar-initial { width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--cp-lilac); color: #695a8c; font-size: var(--font-size-h3); font-weight: var(--font-weight-bold); }
.cp-slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.cp-slot-grid button { width: 100%; min-height: 78px; display: grid; place-content: center; gap: var(--space-1); border: 1px solid var(--cp-border); border-radius: var(--radius-lg); background: white; color: var(--cp-text); }
.cp-slot-grid button:hover { border-color: #9bc5b5; background: var(--cp-mint-soft); }
.cp-slot-grid button span { color: var(--cp-mint-hover); font-size: var(--font-size-h3); font-weight: var(--font-weight-bold); }
.cp-confirmation { display: grid; gap: var(--space-4); }
.cp-booking-summary { position: sticky; top: 96px; }
.cp-booking-summary dl { display: grid; gap: var(--space-3); margin: var(--space-4) 0; }
.cp-booking-summary dl div { display: grid; gap: 2px; }
.cp-booking-summary dt { color: var(--cp-muted); font-size: var(--font-size-caption); }
.cp-booking-summary dd { margin: 0; font-weight: var(--font-weight-semibold); }
.cp-booking-summary > p { padding-top: var(--space-3); border-top: 1px solid var(--cp-border); }

.cp-profile-links { display: grid; gap: var(--space-3); }
.cp-profile-link { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.cp-profile-link > span:first-child { display: grid; gap: var(--space-1); }
.cp-profile-link small { color: var(--cp-muted); line-height: 1.4; }
.cp-form { display: grid; gap: var(--space-4); }
.cp-form label { min-width: 0; display: grid; gap: var(--space-2); color: var(--cp-text); font-size: var(--font-size-body-small); font-weight: var(--font-weight-semibold); }
.cp-form label > small { color: var(--cp-muted); font-weight: var(--font-weight-regular); line-height: 1.4; }
.cp-form input:not([type="checkbox"]), .cp-form select, .cp-form textarea { width: 100%; min-height: 48px; padding: var(--space-3) var(--space-4); border: 1px solid var(--cp-border); border-radius: var(--radius-md); background: #fbfdfc; color: var(--cp-text); }
.cp-form input[readonly] { background: #f1f4f2; color: var(--cp-muted); }
.cp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.cp-address-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.cp-address-card { display: grid; align-content: start; gap: var(--space-3); }
.cp-address-card > header { margin-bottom: 0; }
.cp-address-card h2 { overflow-wrap: anywhere; font-size: var(--font-size-h3); }
.cp-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cp-tags span { padding: 5px 9px; border-radius: 99px; background: var(--cp-mint-soft); color: var(--cp-mint-hover); font-size: var(--font-size-caption); font-weight: var(--font-weight-semibold); }
.cp-inline-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: auto; }
.cp-inline-actions .cp-button { min-height: 44px; }
.cp-address-forms { margin-top: var(--space-2); }
.cp-disclosure { border-top: 1px solid var(--cp-border); }
.cp-disclosure summary { min-height: 48px; display: flex; align-items: center; color: var(--cp-mint-hover); cursor: pointer; font-weight: var(--font-weight-semibold); }
.cp-disclosure-content { display: grid; gap: var(--space-3); padding-bottom: var(--space-3); }
.cp-checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin: 0; padding: 0; border: 0; }
.cp-checkbox-grid legend { grid-column: 1 / -1; margin-bottom: var(--space-2); font-weight: var(--font-weight-semibold); }
.cp-checkbox-grid label { min-height: 48px; display: flex; grid-template-columns: auto 1fr; align-items: center; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--cp-border); border-radius: var(--radius-md); background: #fbfdfc; }
.cp-checkbox-grid input { width: 20px; height: 20px; accent-color: var(--cp-mint); }
.cp-consents-card { padding: 0 var(--space-6); }
.cp-consent-row { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding: var(--space-4) 0; border-bottom: 1px solid var(--cp-border); }
.cp-consent-row:last-child { border-bottom: 0; }
.cp-consent-row > span { display: grid; gap: var(--space-1); }
.cp-consent-row small, .cp-privacy-note { color: var(--cp-muted); line-height: 1.5; }
.cp-switch { width: 54px; height: 32px; flex: 0 0 auto; padding: 3px; border: 0; border-radius: 99px; background: #d8dfdc; }
.cp-switch span { width: 26px; height: 26px; display: block; border-radius: 50%; background: white; box-shadow: var(--shadow-sm); transition: transform .16s ease; }
.cp-switch.active { background: var(--cp-mint); }
.cp-switch.active span { transform: translateX(22px); }
.cp-privacy-note { max-width: 760px; }
.cp-privacy-note a { color: var(--cp-mint-hover); text-decoration: underline; }

@media (max-width: 1023px) {
  .customer-shell-bar { grid-template-columns: minmax(190px, 1fr) auto; }
  .customer-desktop-nav { order: 3; grid-column: 1 / -1; justify-self: center; margin: -8px 0 8px; }
  .cp-dashboard-grid > .cp-card { grid-column: span 6; }
  .cp-quick-actions { grid-template-columns: 1fr 1fr; }
  .cp-pet-layout, .cp-report-layout, .cp-detail-grid, .cp-profile-grid { grid-template-columns: 1fr; }
  .cp-pet-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-booking-layout { grid-template-columns: minmax(0, 1fr) 240px; }
  .cp-address-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .customer-v1 { background: #f7faf8; }
  .customer-shell-header { position: static; }
  .customer-shell-bar { width: calc(100% - 28px); min-height: 64px; grid-template-columns: 1fr auto; gap: var(--space-3); }
  .customer-brand > svg, .customer-brand > img, .customer-brand .brand-mark { width: 38px; height: 38px; }
  .customer-brand small { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .customer-desktop-nav, .customer-account-copy { display: none; }
  .customer-account-menu summary { padding: 0; }
  .customer-account-menu, .customer-account-menu summary { width: 44px; min-width: 44px; }
  .customer-account-menu summary > span:first-child { width: 44px; height: 44px; }
  .customer-account-menu > div { position: fixed; top: 60px; right: 14px; }
  .customer-shell-main { width: calc(100% - 28px); padding: var(--space-6) 0 104px; }
  .customer-mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 40; min-height: 76px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 7px max(8px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); border-top: 1px solid var(--cp-border); background: rgb(255 255 255 / 94%); box-shadow: 0 -8px 30px rgb(28 43 39 / 8%); backdrop-filter: blur(18px); }
  .customer-mobile-nav a { min-width: 0; min-height: 58px; display: grid; place-content: center; justify-items: center; gap: 4px; border-radius: var(--radius-md); color: var(--cp-muted); font-size: .66rem; font-weight: var(--font-weight-semibold); }
  .customer-mobile-nav svg { width: 21px; height: 21px; }
  .customer-mobile-nav a.active { color: var(--cp-mint-hover); background: var(--cp-mint-soft); }
  .customer-mobile-nav .customer-mobile-book { position: relative; color: var(--cp-mint-hover); }
  .customer-mobile-nav .customer-mobile-book svg { width: 46px; height: 46px; margin-top: -24px; padding: 12px; border-radius: 50%; background: var(--cp-mint); color: white; box-shadow: 0 8px 20px rgb(47 122 100 / 25%); }
  .cp-page { gap: var(--space-5); }
  .cp-page-heading h1 { font-size: 1.85rem; }
  .cp-page-heading > p:last-child { font-size: var(--font-size-body); }
  .cp-heading-actions { display: grid; align-items: start; }
  .cp-heading-actions .cp-button { width: 100%; }
  .cp-card, .cp-empty-card { padding: var(--space-5); border-radius: var(--radius-lg); }
  .cp-hero-card { grid-template-columns: 1fr; gap: var(--space-5); padding: var(--space-5); border-radius: var(--radius-xl); }
  .cp-pet-intro { gap: var(--space-4); }
  .cp-pet-intro img { width: 84px; height: 84px; border-radius: 24px; }
  .cp-pet-intro h2 { font-size: 2.25rem; }
  .cp-next-visit { padding: var(--space-4); }
  .cp-next-visit .cp-button, .cp-hero-action { width: 100%; }
  .cp-dashboard-grid { grid-template-columns: 1fr; }
  .cp-dashboard-grid > .cp-card, .cp-dashboard-grid > .cp-salon-card { grid-column: auto; }
  .cp-quick-actions { grid-template-columns: 1fr; }
  .cp-quick-actions > a { min-height: 78px; }
  .cp-card > header { margin-bottom: var(--space-4); }
  .cp-visit-row { grid-template-columns: 48px minmax(0, 1fr) auto; padding: var(--space-3); gap: var(--space-3); }
  .cp-visit-row .cp-status { grid-column: 2; }
  .cp-visit-row .cp-link-label { grid-column: 2; }
  .cp-visit-row .cp-row-arrow { grid-column: 3; grid-row: 1 / 3; }
  .cp-date-tile { width: 48px; height: 54px; }
  .cp-pet-profile-hero, .cp-visit-hero, .cp-report-hero { display: grid; gap: var(--space-4); padding: var(--space-5); }
  .cp-pet-profile-hero { grid-template-columns: 76px minmax(0, 1fr); }
  .cp-pet-profile-hero > img { width: 76px; height: 76px; border-radius: 22px; }
  .cp-pet-profile-hero h2 { font-size: var(--font-size-h1); }
  .cp-next-mini { grid-column: 1 / -1; min-width: 0; width: 100%; margin: 0; }
  .cp-pet-rail { grid-template-columns: 1fr; }
  .cp-timeline article { grid-template-columns: 1fr; }
  .cp-timeline article > a { min-height: 44px; display: inline-flex; align-items: center; }
  .cp-visit-hero { grid-template-columns: 1fr auto; }
  .cp-visit-pet { grid-column: 1 / -1; }
  .cp-visit-time-block { text-align: left; }
  .cp-visit-hero > .cp-status { align-self: end; }
  .cp-definition-list > div { grid-template-columns: 1fr; gap: 3px; }
  .cp-sticky-action { position: sticky; bottom: 88px; z-index: 20; padding: var(--space-2); border-radius: var(--radius-lg); background: rgb(247 250 248 / 92%); backdrop-filter: blur(12px); }
  .cp-sticky-action .cp-button { width: 100%; }
  .cp-report-hero { grid-template-columns: 1fr auto; }
  .cp-before-after { grid-template-columns: 1fr 1fr; gap: var(--space-2); }
  .cp-before-after img { aspect-ratio: 3 / 4; }
  .cp-booking-layout { grid-template-columns: 1fr; }
  .cp-booking-card { min-height: 0; }
  .cp-booking-summary { position: static; order: -1; padding: var(--space-4); }
  .cp-booking-summary dl { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin: var(--space-3) 0 0; }
  .cp-booking-summary > p { display: none; }
  .cp-booking-steps { grid-template-columns: repeat(6, 34px); gap: var(--space-2); overflow-x: auto; }
  .cp-booking-steps li { width: 34px; display: grid; justify-items: center; gap: 3px; white-space: nowrap; overflow: visible; font-size: .6rem; }
  .cp-booking-steps li span { width: 30px; height: 30px; }
  .cp-choice-grid, .cp-service-choice-grid { grid-template-columns: 1fr; }
  .cp-choice-card { min-height: 76px; }
  .cp-service-choice { min-height: 96px; }
  .cp-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-address-grid, .cp-form-grid { grid-template-columns: 1fr; }
  .cp-checkbox-grid { grid-template-columns: 1fr; }
  .cp-consents-card { padding: 0 var(--space-5); }
  .cp-inline-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cp-inline-actions .cp-button { width: 100%; }
}

@media (max-width: 420px) {
  .cp-booking-summary dl { grid-template-columns: 1fr 1fr; }
  .cp-booking-summary dl div:last-child { grid-column: 1 / -1; }
  .cp-photo-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .customer-v1 *, .customer-v1 *::before, .customer-v1 *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Visit Experience & Grooming Report Core v1 */
.button.secondary {
  border-color: color-mix(in srgb, var(--color-primary) 24%, var(--color-border));
  background: var(--color-primary-soft);
  color: var(--color-primary);
  box-shadow: none;
}
.button.secondary:hover { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary-soft) 82%, white); }
.visit-experience { width: min(1180px, 100%); display: grid; gap: var(--space-4); margin: 0 auto; color: var(--color-text-primary); }
.visit-experience .panel { border-color: var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.visit-detail-hero {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background: linear-gradient(135deg, var(--color-surface) 58%, var(--color-primary-soft));
}
.visit-pet-avatar img { width: 76px; height: 76px; display: block; object-fit: cover; border-radius: var(--radius-lg); background: var(--color-primary-soft); }
.visit-identity { min-width: 0; }
.visit-identity h1 { margin: 2px 0; font-size: var(--font-size-display); line-height: var(--line-height-display); }
.visit-identity > p:last-of-type { margin: 0; color: var(--color-text-secondary); }
.visit-client-line { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-top: var(--space-2); font-size: var(--font-size-body-small); }
.visit-client-line a { color: var(--color-primary); font-weight: var(--font-weight-medium); }
.visit-status-block { display: grid; justify-items: end; gap: var(--space-2); }
.visit-status-block > strong { font-size: var(--font-size-h3); }
.visit-status[data-status="in_progress"] { border-color: color-mix(in srgb, var(--color-info) 30%, var(--color-border)); background: var(--color-info-soft); color: var(--color-info); }
.status-badge[data-status="in_progress"] { border-color: color-mix(in srgb, var(--color-info) 30%, var(--color-border)); background: var(--color-info-soft); color: var(--color-info); }
.visit-hero-facts { grid-column: 1 / -1; display: grid; grid-template-columns: 1.5fr 1fr .7fr .8fr; gap: var(--space-2); }
.visit-hero-facts > div,
.report-visit-summary > div,
.report-fact-grid > div,
.visit-report-highlights > div { display: grid; gap: 2px; min-width: 0; padding: var(--space-3); border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-surface-subtle) 76%, white); }
.visit-hero-facts span,
.report-visit-summary span,
.report-fact-grid span,
.visit-report-highlights span { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.visit-hero-facts strong,
.report-visit-summary strong,
.report-fact-grid strong,
.visit-report-highlights strong { overflow-wrap: anywhere; font-size: var(--font-size-body-small); }
.visit-primary-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.visit-primary-actions form { margin: 0; }
.visit-detail-layout,
.report-detail-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); align-items: start; gap: var(--space-4); }
.visit-detail-main,
.visit-action-rail,
.report-detail-main,
.report-detail-rail { display: grid; align-content: start; gap: var(--space-4); }
.visit-action-rail,
.report-detail-rail { position: sticky; top: var(--space-4); }
.visit-detail-list,
.report-observation-list { display: grid; gap: 0; margin: 0; }
.visit-detail-list > div,
.report-observation-list > div { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.visit-detail-list > div:last-child,
.report-observation-list > div:last-child { border-bottom: 0; }
.visit-detail-list dt,
.report-observation-list dt { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.visit-detail-list dd,
.report-observation-list dd { margin: 0; overflow-wrap: anywhere; font-size: var(--font-size-body-small); font-weight: var(--font-weight-medium); }
.visit-note,
.report-product-note { display: grid; gap: var(--space-1); margin-top: var(--space-4); padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-subtle); }
.visit-note span,
.report-product-note span { color: var(--color-text-secondary); font-size: var(--font-size-caption); font-weight: var(--font-weight-semibold); }
.visit-note p { margin: 0; white-space: pre-wrap; }
.visit-report-preview { background: color-mix(in srgb, var(--color-success-soft) 42%, var(--color-surface)); }
.visit-report-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin: var(--space-3) 0; }
.visit-report-missing { border-color: color-mix(in srgb, var(--color-warning) 24%, var(--color-border)) !important; background: var(--color-warning-soft); }
.visit-report-missing p { color: var(--color-text-secondary); }
.previous-visit-card { display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: center; gap: var(--space-4); }
.previous-visit-card h2 { margin: 2px 0 var(--space-2); font-size: var(--font-size-h3); }
.previous-visit-card p:last-child { margin: 0; color: var(--color-text-secondary); }
.previous-visit-card img { width: 180px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-md); }
.visit-next-step h2,
.report-next-visit-card > strong { margin: var(--space-1) 0; font-size: var(--font-size-h2); }
.visit-next-step > p:last-of-type,
.report-next-visit-card p,
.report-publish-card p { color: var(--color-text-secondary); font-size: var(--font-size-body-small); }
.visit-next-step form,
.visit-next-step .button,
.report-next-visit-card .button,
.report-publish-card form,
.report-publish-card .button,
.visit-no-show { width: 100%; }
.visit-mobile-primary { display: none; }

.report-editor-header,
.report-detail-hero { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); padding: var(--space-6); background: linear-gradient(135deg, var(--color-surface) 58%, var(--color-primary-soft)); }
.report-editor-header h1,
.report-detail-hero h1 { margin: 2px 0; font-size: var(--font-size-display); }
.report-editor-header > div:first-child > p:last-child,
.report-detail-hero > div:first-child > p:last-child { margin: 0; color: var(--color-text-secondary); }
.report-visit-summary { flex: 1 1 520px; display: grid; grid-template-columns: 1.5fr 1fr .8fr; gap: var(--space-2); }
.report-editor-layout { display: grid; grid-template-columns: minmax(240px, .45fr) minmax(0, 1.4fr); align-items: start; gap: var(--space-4); }
.report-pet-context { position: sticky; top: var(--space-4); display: grid; gap: var(--space-4); }
.previous-report-context > strong { display: block; margin: var(--space-2) 0; }
.previous-report-context > p:last-child { color: var(--color-text-secondary); }
.report-form-panel form { gap: var(--space-4); }
.report-form-section { display: grid; gap: var(--space-3); padding: var(--space-5); border-radius: var(--radius-lg); background: var(--color-surface-subtle); }
.report-recommendations-section { background: color-mix(in srgb, var(--color-success-soft) 50%, var(--color-surface)); }
.report-section-heading { display: flex; gap: var(--space-3); align-items: flex-start; }
.report-section-heading > span { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: var(--color-primary); color: white; font-size: var(--font-size-caption); font-weight: var(--font-weight-bold); }
.report-section-heading h2 { margin: 1px 0; font-size: var(--font-size-h3); }
.report-section-heading p { margin: 0; color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.report-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.report-internal-note { background: var(--color-warning-soft); }

.report-visibility { display: grid; justify-items: end; gap: var(--space-2); }
.report-visibility small { color: var(--color-text-secondary); }
.report-detail-actions { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.report-fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-3); }
.report-observation-list:empty { display: none; }
.report-recommendation-copy { margin: 0; font-size: var(--font-size-body); line-height: var(--line-height-body); }
.report-internal-card { border-color: color-mix(in srgb, var(--color-warning) 22%, var(--color-border)) !important; background: var(--color-warning-soft); }
.report-internal-card h2 { margin: var(--space-1) 0; font-size: var(--font-size-h3); }
.report-internal-card p:last-child { margin-bottom: 0; color: var(--color-text-secondary); }
.report-photo-gallery figure { overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.report-photo-gallery img { border: 0; border-radius: 0; }
.report-photo-gallery figcaption { display: grid; gap: var(--space-1); padding: var(--space-3); }
.report-photo-gallery figcaption strong { color: var(--color-text-primary); }
.report-photo-gallery figcaption form { margin-top: var(--space-2); }
.report-photo-form { display: grid; gap: var(--space-3); margin-top: var(--space-4); padding: var(--space-4); border-radius: var(--radius-lg); background: var(--color-primary-soft); }
.report-photo-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.report-photo-form-grid > :last-child { grid-column: 1 / -1; }
.photo-type-field ul { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.photo-type-field label { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; }

@media (max-width: 1023px) {
  .visit-detail-layout,
  .report-detail-layout { grid-template-columns: minmax(0, 1.2fr) minmax(250px, .65fr); }
  .visit-hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-editor-layout { grid-template-columns: 1fr; }
  .report-pet-context { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .visit-experience { gap: var(--space-3); }
  .visit-detail { padding-bottom: 74px; }
  .visit-detail-hero { grid-template-columns: 62px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4); }
  .visit-pet-avatar img { width: 62px; height: 62px; border-radius: var(--radius-md); }
  .visit-identity h1 { font-size: var(--font-size-h2); }
  .visit-client-line { display: grid; gap: 2px; }
  .visit-client-line a { display: inline-flex; align-items: center; min-height: 44px; }
  .visit-status-block { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
  .visit-status-block > strong { font-size: var(--font-size-h3); }
  .visit-hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .visit-primary-actions { display: none; }
  .visit-detail-layout,
  .report-detail-layout { grid-template-columns: 1fr; }
  .visit-action-rail,
  .report-detail-rail { position: static; }
  .visit-detail-list > div,
  .report-observation-list > div { grid-template-columns: 86px minmax(0, 1fr); gap: var(--space-3); }
  .visit-report-highlights,
  .report-fact-grid { grid-template-columns: 1fr 1fr; }
  .previous-visit-card { grid-template-columns: 1fr; }
  .previous-visit-card img { width: 100%; max-height: 220px; }
  .visit-mobile-primary { position: fixed; z-index: 70; left: var(--page-gutter); right: var(--page-gutter); bottom: calc(76px + env(safe-area-inset-bottom)); display: block; }
  .visit-mobile-primary form,
  .visit-mobile-primary .button { width: 100%; }
  .visit-mobile-primary .button { min-height: 50px; box-shadow: var(--shadow-lg); }
  .report-editor-header,
  .report-detail-hero { display: grid; padding: var(--space-4); }
  .report-editor-header h1,
  .report-detail-hero h1 { font-size: var(--font-size-h2); }
  .report-visit-summary { grid-template-columns: 1fr 1fr; }
  .report-visit-summary > div:first-child { grid-column: 1 / -1; }
  .report-pet-context { grid-template-columns: 1fr; }
  .report-form-panel { padding: var(--space-3) !important; }
  .report-form-section { padding: var(--space-4); }
  .report-form-actions,
  .report-detail-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .report-form-actions .button,
  .report-detail-actions .button { width: 100%; min-height: 46px; }
  .report-visibility { justify-items: start; }
  .report-photo-form-grid { grid-template-columns: 1fr; }
  .report-photo-form-grid > :last-child { grid-column: auto; }
  .report-photo-form .button { width: 100%; min-height: 48px; }
}

@media (max-width: 420px) {
  .visit-hero-facts,
  .visit-report-highlights,
  .report-fact-grid,
  .report-visit-summary { grid-template-columns: 1fr; }
  .report-visit-summary > div:first-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .product-area-salon *,
  .product-area-salon *::before,
  .product-area-salon *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Customer & Pet Core UX v1 — uses Enterprise Product UI System tokens. */
.global-search-group-label {
  padding: var(--space-2) var(--space-2) var(--space-1);
  color: var(--color-text-secondary);
  font-size: .625rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: .08em;
}
.global-search-group-label:not(:first-child) { margin-top: var(--space-1); border-top: 1px solid var(--color-border); }
.global-search-avatar.client { border-radius: 50%; background: var(--color-surface-subtle); color: var(--color-text-primary); }
.global-search-empty.is-loading { color: var(--color-primary); }
.global-search-empty.is-error { color: var(--color-danger); }

.customer-pet-core {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  gap: var(--space-4);
  color: var(--color-text-primary);
}
.customer-pet-core .panel { border-color: var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.profile-hero {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-6);
}
.profile-avatar {
  width: 88px;
  height: 88px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-primary-soft);
  object-fit: cover;
}
.profile-avatar-client {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--color-primary);
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
}
.profile-identity { min-width: 0; }
.profile-identity h1 { margin: 2px 0 var(--space-1); font-size: var(--font-size-display); line-height: var(--line-height-display); letter-spacing: -.025em; }
.profile-subtitle { margin: 0 0 var(--space-2); color: var(--color-text-secondary); font-size: var(--font-size-body); }
.profile-contact { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); color: var(--color-text-secondary); font-size: var(--font-size-body-small); }
.profile-contact a { color: var(--color-primary); font-weight: var(--font-weight-medium); }
.profile-actions { display: flex; justify-content: flex-end; gap: var(--space-2); }

.profile-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.profile-summary-card {
  min-height: 142px;
  display: grid;
  align-content: start;
  gap: var(--space-1);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.profile-summary-card-primary { border-color: color-mix(in srgb, var(--color-primary) 28%, var(--color-border)); background: var(--color-primary-soft); }
.profile-summary-card > strong { margin-top: var(--space-2); font-size: var(--font-size-h3); line-height: var(--line-height-h3); }
.profile-summary-card > span { color: var(--color-text-primary); font-size: var(--font-size-body-small); }
.profile-summary-card > small,
.summary-empty { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.summary-empty { margin-top: var(--space-4); }

.pet-alert-strip {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-4) var(--space-5);
  border: 1px solid color-mix(in srgb, var(--color-warning) 30%, var(--color-border));
  border-radius: var(--radius-lg);
  background: var(--color-warning-soft);
}
.pet-alert-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--color-warning); color: #fff; font-weight: var(--font-weight-bold); }
.pet-alert-strip strong { display: block; margin: 1px 0 var(--space-1); }
.pet-alert-strip p:last-child { margin: 0; color: var(--color-text-secondary); font-size: var(--font-size-body-small); }

.profile-tabs { min-width: 0; padding: 0; overflow: hidden; }
.profile-tab-list { display: flex; gap: var(--space-1); overflow-x: auto; padding: var(--space-3) var(--space-4) 0; border-bottom: 1px solid var(--color-border); scrollbar-width: thin; }
.profile-tab-list button {
  min-width: max-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--color-text-secondary);
  font: var(--font-weight-medium) var(--font-size-body-small)/1 var(--font-family-ui);
}
.profile-tab-list button:hover { color: var(--color-text-primary); background: var(--color-surface-subtle); }
.profile-tab-list button[aria-selected="true"] { border-bottom-color: var(--color-primary); color: var(--color-primary); font-weight: var(--font-weight-semibold); }
.profile-tab-list button span { min-width: 20px; padding: 2px 5px; border-radius: 999px; background: var(--color-surface-subtle); font-size: .625rem; }
.profile-tab-panel { padding: var(--space-5); }
.profile-tab-panel[hidden] { display: none; }

.visit-timeline { display: grid; }
.visit-timeline-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  min-height: 68px;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}
.visit-timeline-row:last-child { border-bottom: 0; }
.visit-timeline-row time,
.visit-timeline-copy { display: grid; gap: 2px; }
.visit-timeline-row time strong,
.visit-timeline-copy strong { font-size: var(--font-size-body-small); }
.visit-timeline-row time span,
.visit-timeline-copy span { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.visit-timeline-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-1); }
.visit-timeline-actions .button { min-height: 36px; }

.pet-photo-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.pet-photo-gallery figure { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.pet-photo-gallery img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; }
.pet-photo-gallery figcaption { display: grid; gap: 2px; padding: var(--space-3); }
.pet-photo-gallery figcaption strong { font-size: var(--font-size-body-small); }
.pet-photo-gallery figcaption span { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.report-list,
.care-recommendations,
.compact-record-list { display: grid; gap: var(--space-2); }
.report-list article,
.care-recommendations article,
.compact-record-list > div { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.report-list p,
.care-recommendations p { margin: 3px 0 0; color: var(--color-text-secondary); font-size: var(--font-size-body-small); }
.care-recommendations article { display: block; }
.care-recommendations article > span { color: var(--color-primary); font-size: var(--font-size-caption); font-weight: var(--font-weight-semibold); }
.compact-record-list > div { display: grid; gap: 2px; }
.compact-record-list span { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.compact-empty { min-height: 120px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--space-1); padding: var(--space-5); }
.compact-empty p { margin: 0; color: var(--color-text-secondary); font-size: var(--font-size-body-small); }

.profile-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); align-items: start; gap: var(--space-4); }
.profile-main,
.profile-aside { display: grid; gap: var(--space-4); }
.profile-section { padding: var(--space-5); }
.profile-section .section-title.compact { margin-bottom: var(--space-3); }
.profile-section .section-title h2 { margin: 2px 0 0; font-size: var(--font-size-h3); }
.entity-card-list,
.address-summary-list { display: grid; gap: var(--space-2); }
.entity-card { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); min-height: 72px; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.entity-avatar { width: 50px; height: 50px; border-radius: var(--radius-md); object-fit: cover; background: var(--color-primary-soft); }
.entity-copy { min-width: 0; display: grid; gap: 1px; }
.entity-copy strong { font-size: var(--font-size-body); }
.entity-copy span,
.entity-copy small { overflow: hidden; color: var(--color-text-secondary); font-size: var(--font-size-caption); text-overflow: ellipsis; white-space: nowrap; }
.address-summary-card { position: relative; display: grid; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.address-summary-card p { margin: 3px 0 0; color: var(--color-text-secondary); font-size: var(--font-size-body-small); }
.address-purpose-line { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.address-purpose-line span { padding: 3px 7px; border-radius: 999px; background: var(--color-primary-soft); color: var(--color-primary); font-size: .6875rem; font-weight: var(--font-weight-medium); }
.status-inline.warning { color: var(--color-warning); font-size: var(--font-size-caption); font-weight: var(--font-weight-semibold); }
.profile-detail-list { display: grid; gap: var(--space-2); margin: 0; }
.profile-detail-list > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: var(--space-3); }
.profile-detail-list dt { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.profile-detail-list dd { margin: 0; font-size: var(--font-size-body-small); font-weight: var(--font-weight-medium); }
.pet-sticky-action { display: none !important; }

.address-suggestion[aria-selected="true"] { background: var(--color-primary-soft); color: var(--color-primary); }

@media (max-width: 1023px) {
  .profile-layout { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); }
  .pet-photo-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .customer-pet-core { gap: var(--space-3); }
  .profile-hero { grid-template-columns: 68px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4); }
  .profile-avatar { width: 68px; height: 68px; border-radius: var(--radius-lg); }
  .profile-avatar-client { border-radius: 50%; }
  .profile-identity h1 { font-size: var(--font-size-h2); line-height: var(--line-height-h2); }
  .profile-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .profile-actions .button { min-height: 44px; }
  .profile-summary-grid { grid-template-columns: 1fr 1fr; }
  .profile-summary-card { min-height: 126px; padding: var(--space-4); }
  .profile-summary-card:last-child { grid-column: 1 / -1; min-height: 0; }
  .profile-layout { grid-template-columns: 1fr; }
  .client-profile .profile-main,
  .client-profile .profile-aside { display: contents; }
  .client-profile [data-profile-section="pets"] { order: 1; }
  .client-profile [data-profile-section="addresses"] { order: 2; }
  .client-profile [data-profile-section="billing"] { order: 3; }
  .client-profile [data-profile-section="documents"] { order: 4; }
  .client-profile [data-profile-section="history"] { order: 5; }
  .profile-section { padding: var(--space-4); }
  .profile-tab-list { padding-inline: var(--space-2); }
  .profile-tab-panel { padding: var(--space-4); }
  .visit-timeline-row { grid-template-columns: 76px minmax(0, 1fr); gap: var(--space-3); }
  .visit-timeline-actions { grid-column: 2; justify-content: flex-start; }
  .visit-timeline-actions .button { min-height: 44px; }
  .pet-photo-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-list article { align-items: flex-start; }
  .entity-card { grid-template-columns: 48px minmax(0, 1fr); }
  .entity-card .button { grid-column: 2; justify-self: start; min-height: 44px; }
  .pet-profile { padding-bottom: 62px; }
  .pet-profile .profile-actions .button:first-child { display: none; }
  .pet-profile .profile-actions { grid-template-columns: 1fr; }
  .pet-sticky-action { position: fixed; z-index: 55; left: var(--page-gutter); right: var(--page-gutter); bottom: calc(76px + env(safe-area-inset-bottom)); display: inline-flex !important; min-height: 48px !important; box-shadow: var(--shadow-lg) !important; }
}

@media (max-width: 420px) {
  .profile-summary-grid { grid-template-columns: 1fr; }
  .profile-summary-card:last-child { grid-column: auto; }
  .pet-photo-gallery { grid-template-columns: 1fr; }
  .profile-actions { grid-template-columns: 1fr; }
}

/* Services, Pricing & Team Core UX v1 */
.management-core {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  color: var(--color-text-primary);
}
.management-core .panel {
  border-color: var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.management-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-6);
}
.management-hero h2 { margin: 2px 0 var(--space-1); font-size: var(--font-size-h2); line-height: var(--line-height-h2); }
.management-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.management-metrics article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.management-metrics span { color: var(--color-text-secondary); font-size: var(--font-size-body-small); }
.management-metrics strong { font-size: var(--font-size-h2); line-height: 1; }
.management-list-panel,
.management-form-panel { padding: var(--space-5); }
.management-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, auto) minmax(190px, auto) auto;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.management-filters input,
.management-filters select { width: 100%; min-height: var(--control-height); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text-primary); padding: 0 var(--space-3); }
.management-filters input:focus,
.management-filters select:focus { border-color: var(--color-focus); outline: 3px solid color-mix(in srgb, var(--color-focus) 20%, transparent); outline-offset: 1px; }
.enterprise-service-list { gap: var(--space-2); }
.enterprise-service-row {
  grid-template-columns: minmax(240px, 1fr) 120px 90px minmax(220px, auto);
  min-height: 88px;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border-color: var(--color-border);
}
.enterprise-service-row.is-muted,
.enterprise-team-card.is-muted,
.pricing-rule-row.is-muted { opacity: .68; }
.service-main { min-width: 0; }
.service-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.service-rule-summary { display: grid; justify-items: end; gap: 1px; }
.service-rule-summary span,
.service-rule-summary small { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.service-rule-summary strong { font-size: var(--font-size-body); }
.management-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.management-row-actions form { margin: 0; }
.management-row-actions .button { min-height: 36px; white-space: nowrap; }
.status-dot,
.status-pill,
.account-state {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--color-surface-subtle);
  color: var(--color-text-secondary);
  font-size: .6875rem;
  font-weight: var(--font-weight-semibold);
}
.status-dot::before { width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status-dot.is-active,
.status-pill.is-active,
.account-state.is-ready { background: var(--color-success-soft); color: var(--color-success); }
.back-link { width: max-content; color: var(--color-primary); font-size: var(--font-size-body-small); font-weight: var(--font-weight-semibold); }
.back-link:hover { color: var(--color-primary-hover); text-decoration: underline; }
.service-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: var(--space-4); }
.structured-form { gap: var(--space-4); }
.form-row-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.structured-form .form-field { gap: var(--space-2); }
.structured-form .form-field > label,
.structured-form legend { color: var(--color-text-primary); font-size: var(--font-size-body-small); font-weight: var(--font-weight-semibold); }
.structured-form .form-field > small { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.structured-form .errorlist { margin: 0; padding: 0; list-style: none; color: var(--color-danger); font-size: var(--font-size-caption); }
.service-base-card { display: grid; gap: var(--space-1); padding: var(--space-5); background: var(--color-primary-soft); }
.service-base-card > strong { margin-top: var(--space-3); font-size: var(--font-size-display); line-height: var(--line-height-display); }
.service-base-card > span { color: var(--color-primary); font-weight: var(--font-weight-semibold); }
.service-base-card > p:last-child { margin-top: var(--space-4); color: var(--color-text-secondary); font-size: var(--font-size-body-small); }
.pricing-rule-list { display: grid; gap: var(--space-2); }
.pricing-rule-row { display: grid; grid-template-columns: minmax(180px, 1fr) 110px 110px auto auto; align-items: center; gap: var(--space-3); min-height: 66px; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.pricing-rule-row > div { display: grid; gap: 2px; }
.pricing-rule-row > div > span,
.pricing-rule-kind { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.pricing-rule-row > div > strong { font-size: var(--font-size-body-small); }
.management-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-5); }
.management-danger-zone p { margin-top: 2px; color: var(--color-text-secondary); font-size: var(--font-size-body-small); }
.narrow-management-panel { width: min(720px, 100%); margin: 0 auto; }
.filter-tabs { display: flex; gap: var(--space-1); padding: 3px; border-radius: var(--radius-md); background: var(--color-surface-subtle); }
.filter-tabs a { min-height: 34px; display: inline-flex; align-items: center; padding: 0 var(--space-3); border-radius: 9px; color: var(--color-text-secondary); font-size: var(--font-size-caption); font-weight: var(--font-weight-semibold); }
.filter-tabs a:hover { color: var(--color-primary); }
.filter-tabs a.active { background: var(--color-surface); color: var(--color-primary); box-shadow: var(--shadow-sm); }
.enterprise-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.enterprise-team-card { grid-template-columns: 48px minmax(0, 1fr) auto; align-items: start; min-height: 172px; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); border-color: var(--color-border); }
.team-card-actions { width: 108px; align-content: start; }
.team-card-actions .button { width: 100%; justify-content: center; }
.team-card-main { min-width: 0; }
.team-name-line { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); }
.team-details { display: grid; gap: var(--space-2); margin: var(--space-3) 0; }
.team-details > div { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: var(--space-2); }
.team-details dt { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.team-details dd { margin: 0; overflow-wrap: anywhere; color: var(--color-text-primary); font-size: var(--font-size-caption); }
.access-section { margin-top: 0; }
.access-account-list { display: grid; }
.access-account-list article { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 58px; padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.access-account-list article:last-child { border-bottom: 0; }
.access-account-list article > div { display: grid; gap: 2px; min-width: 0; }
.access-account-list article > div span,
.access-account-list article > span { overflow-wrap: anywhere; color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.work-days-field { margin: 0; padding: 0; border: 0; }
.work-days-field ul,
.groomly-modal-form #id_working_days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
.work-days-field label,
.groomly-modal-form #id_working_days label { min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); font-size: var(--font-size-caption); cursor: pointer; }
.work-days-field input,
.groomly-modal-form #id_working_days input { width: 16px; height: 16px; margin: 0; }
.form-checkbox { display: flex !important; align-items: center; grid-template-columns: auto 1fr; }
.form-checkbox input { width: 18px; height: 18px; }
.groomly-modal-form p[hidden],
.structured-form p[hidden] { display: none; }
.employee-profile-hero {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
}
.team-avatar-large { width: 64px; height: 64px; font-size: var(--font-size-h3); }
.employee-profile-heading { min-width: 0; }
.employee-profile-heading h2 { margin: 2px 0; font-size: var(--font-size-h2); }
.employee-profile-heading > p:last-child { color: var(--color-text-secondary); }
.employee-profile-actions { grid-column: 2 / -1; justify-content: flex-start; }
.employee-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.employee-profile-details { display: grid; gap: var(--space-3); margin: 0; }
.employee-profile-details > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: var(--space-3); }
.employee-profile-details dt { color: var(--color-text-secondary); font-size: var(--font-size-caption); }
.employee-profile-details dd { margin: 0; overflow-wrap: anywhere; font-size: var(--font-size-body-small); font-weight: var(--font-weight-medium); }

@media (max-width: 1023px) {
  .enterprise-service-row { grid-template-columns: minmax(220px, 1fr) 110px 80px; }
  .enterprise-service-row .management-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .service-editor-grid { grid-template-columns: minmax(0, 1fr) 240px; }
  .enterprise-team-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .management-core { gap: var(--space-3); }
  .management-hero { align-items: flex-start; padding: var(--space-4); }
  .management-hero .button { width: 100%; }
  .management-hero { display: grid; }
  .management-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
  .management-metrics article { min-height: 68px; display: grid; align-content: center; justify-content: start; gap: var(--space-1); padding: var(--space-3); }
  .management-metrics strong { font-size: var(--font-size-h3); }
  .management-list-panel,
  .management-form-panel { padding: var(--space-4); }
  .management-core .form-actions { position: static; padding: 0; background: transparent; }
  .management-filters { grid-template-columns: 1fr 1fr; }
  .management-search-field { grid-column: 1 / -1; }
  .management-filters .button { width: 100%; }
  .enterprise-service-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; }
  .enterprise-service-row .service-main { grid-column: 1 / -1; }
  .service-rule-summary { justify-items: start; }
  .enterprise-service-row .management-row-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; width: 100%; }
  .enterprise-service-row .management-row-actions .button { width: 100%; min-height: 44px; }
  .service-editor-grid { grid-template-columns: 1fr; }
  .service-base-card { grid-template-columns: 1fr auto; align-items: center; }
  .service-base-card .eyebrow,
  .service-base-card h2,
  .service-base-card p { grid-column: 1 / -1; }
  .service-base-card > strong { margin-top: 0; font-size: var(--font-size-h2); }
  .service-base-card > span { justify-self: end; }
  .pricing-rule-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pricing-rule-row > div:first-child { grid-column: 1 / -1; }
  .pricing-rule-row .status-dot { justify-self: start; }
  .pricing-rule-row .button { min-height: 44px; }
  .management-danger-zone { align-items: stretch; flex-direction: column; }
  .management-danger-zone .button { width: 100%; min-height: 44px; }
  .form-row-two { grid-template-columns: 1fr; }
  .management-list-panel > .section-title { align-items: flex-start; }
  .filter-tabs { width: 100%; overflow-x: auto; }
  .filter-tabs a { flex: 1; justify-content: center; min-width: max-content; min-height: 44px; }
  .enterprise-team-card { grid-template-columns: 48px minmax(0, 1fr); }
  .team-card-actions { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; width: 100%; justify-content: start; }
  .team-card-actions .button { min-height: 44px; }
  .access-account-list article { align-items: flex-start; flex-direction: column; gap: var(--space-1); }
  .work-days-field ul,
  .groomly-modal-form #id_working_days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .employee-profile-hero { grid-template-columns: 56px minmax(0, 1fr); padding: var(--space-4); }
  .team-avatar-large { width: 56px; height: 56px; }
  .employee-profile-hero > .status-pill { grid-column: 2; }
  .employee-profile-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .employee-profile-actions .button { min-height: 44px; }
  .employee-profile-grid { grid-template-columns: 1fr; gap: var(--space-3); }
}

@media (max-width: 420px) {
  .management-metrics { grid-template-columns: 1fr; }
  .management-metrics article { display: flex; justify-content: space-between; min-height: 54px; }
  .management-filters { grid-template-columns: 1fr; }
  .management-search-field { grid-column: auto; }
  .work-days-field ul,
  .groomly-modal-form #id_working_days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
