/* MAJR Care design system.
   Plain CSS component classes on top of the Tailwind CDN utilities. Brand values mirror
   the palette on majrcare.com. Component classes work even before Tailwind loads. */

@font-face {
    font-family: 'Chelsea Market';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/chelsea-market-latin.efc4fa5d1436.woff2") format('woff2');
}

:root {
    --brand-50: #eef8fc;
    --brand-100: #ddf0f8;
    --brand-200: #c5e8f4;
    --brand-300: #8fd3e8;
    --brand-400: #6bb9d2;
    --brand-500: #6b9eae;
    --brand-550: #5a8797;
    --brand-600: #486a74;
    --brand-700: #3b5861;
    --brand-800: #2e454c;
    --brand-900: #22343a;
    --peach-100: #fde8e0;
    --peach-200: #f9c5b4;
    --peach-300: #f3a78f;
    --peach-900: #4f1d0e;
    --ink: #172a31;
    --ink-muted: #495f6b;
    --page: #e3f2f8;
    --surface: #ffffff;
    --line: #cfe3ec;
    --radius: 1.25rem;
    --shadow: 0 1px 2px rgb(38 56 63 / 0.06), 0 4px 14px rgb(72 106 116 / 0.09);
    --font-display: 'Chelsea Market', ui-rounded, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; }
img { max-width: 100%; }

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
.font-display, .page-title, .section-title { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.005em; }
.page-title { font-size: 1.75rem; line-height: 1.2; color: var(--brand-800); margin: 0; }
.section-title { font-size: 1.375rem; line-height: 1.25; color: var(--brand-800); margin: 0; }
@media (min-width: 640px) { .page-title { font-size: 2.125rem; } }
.eyebrow { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-600); margin: 0 0 0.25rem; }
.lead { font-size: 1.0625rem; color: var(--ink-muted); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .wrap { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .wrap { padding-inline: 2rem; } }
.wrap-narrow { max-width: 48rem; }
.wrap-form { max-width: 56rem; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.75rem; }
.grid-cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-cards.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .grid-cards.cols-4 { gap: 1.25rem; } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem 1rem; margin-bottom: 1.25rem; }
.back-link { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; color: var(--brand-700); text-decoration: none; }
.back-link:hover { color: var(--brand-800); text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 3rem; padding: 0.625rem 1.25rem; border-radius: 0.875rem; border: 2px solid transparent;
    font-weight: 700; font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 1px 2px rgb(38 56 63 / 0.2); }
.btn-primary:hover { background: var(--brand-700); }
.btn-accent { background: var(--peach-300); color: var(--peach-900); }
.btn-accent:hover { background: var(--peach-200); }
.btn-soft { background: var(--brand-200); color: var(--brand-800); }
.btn-soft:hover { background: var(--brand-300); }
.btn-outline { background: var(--surface); color: var(--brand-700); border-color: var(--brand-300); }
.btn-outline:hover { background: var(--brand-50); border-color: var(--brand-500); }
.btn-danger { background: #b42318; color: #fff; }
.btn-danger:hover { background: #912018; }
.btn-danger-outline { background: var(--surface); color: #b42318; border-color: #f1b3ad; }
.btn-danger-outline:hover { background: #fef3f2; }
.btn-ghost { background: transparent; color: var(--brand-700); }
.btn-ghost:hover { background: var(--brand-100); }
.btn-sm { min-height: 2.75rem; padding: 0.375rem 0.875rem; font-size: 0.9375rem; border-radius: 0.75rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.625rem; }
@media (max-width: 479px) { .btn-row > .btn, .btn-row > form { flex: 1 1 100%; } .btn-row > form .btn { width: 100%; } }

/* ---------- Cards, badges ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.card-tint { background: var(--brand-50); border-color: var(--brand-200); box-shadow: none; }
.card-warn { background: #fff8e6; border-color: #f3d58a; box-shadow: none; }
.card-alert { background: #fef3f2; border: 2px solid #f1b3ad; box-shadow: none; }
.card-flat { box-shadow: none; }
.card-title { font-size: 1.0625rem; font-weight: 800; color: var(--brand-800); margin: 0 0 0.75rem; }
.card-link { display: block; text-decoration: none; color: inherit; transition: box-shadow 0.15s, transform 0.15s; }
.card-link:hover { box-shadow: 0 2px 4px rgb(38 56 63 / 0.08), 0 10px 24px rgb(72 106 116 / 0.16); transform: translateY(-1px); }
.empty-state { border: 2px dashed var(--brand-300); border-radius: var(--radius); padding: 1.5rem; text-align: center; color: var(--ink-muted); background: rgb(255 255 255 / 0.55); }

.badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.1875rem 0.625rem; border-radius: 999px; font-size: 0.75rem; font-weight: 800; line-height: 1.3; white-space: nowrap; }
.badge-brand { background: var(--brand-200); color: var(--brand-800); }
.badge-ok { background: #dcf3e4; color: #1f5a37; }
.badge-warn { background: #fdefc3; color: #7a4b00; }
.badge-danger { background: #fde0dc; color: #912018; }
.badge-muted { background: #e6edf0; color: #495f6b; }
.badge-peach { background: var(--peach-100); color: #8a3416; }
.badge-lg { font-size: 0.875rem; padding: 0.3125rem 0.875rem; }

.notice { border-radius: 0.875rem; padding: 0.75rem 1rem; font-weight: 600; font-size: 0.9375rem; border: 1px solid var(--brand-300); background: var(--brand-100); color: var(--brand-800); }
.notice-warn { background: #fff8e6; border-color: #f3d58a; color: #6b4200; }
.notice-error { background: #fef3f2; border-color: #f1b3ad; color: #912018; }

.kv { display: grid; gap: 0.75rem 1rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); margin: 0; }
.kv dt { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-muted); }
.kv dd { margin: 0.125rem 0 0; font-weight: 600; }
.prose-pre { white-space: pre-line; }

/* ---------- Dog avatar / photo ---------- */
.dog-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(var(--radius) - 0.25rem); background: var(--brand-100); }
.dog-avatar { display: inline-grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: 999px; overflow: hidden; background: var(--brand-200); color: var(--brand-700); font-family: var(--font-display); font-size: 1.25rem; }
.dog-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dog-avatar-lg { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: calc(var(--radius) - 0.25rem); font-size: 3.5rem; }
.dog-avatar-sm { width: 2.25rem; height: 2.25rem; font-size: 1rem; }

/* ---------- Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-section { padding: 1.25rem; border: 0; margin: 0; min-width: 0; }
.form-section + .form-section { border-top: 1px solid var(--line); }
@media (min-width: 640px) { .form-section { padding: 1.5rem 1.75rem; } }
.form-section > legend, .form-section-head { padding: 0; float: left; width: 100%; margin: 0 0 0.25rem; font-family: var(--font-display); font-size: 1.25rem; color: var(--brand-800); }
.form-section > legend + * { clear: both; }
.form-section-desc { margin: 0 0 1rem; color: var(--ink-muted); font-size: 0.9375rem; clear: both; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.125rem 1.25rem; } }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; flex-direction: column-reverse; gap: 0.625rem; padding: 1.25rem; border-top: 1px solid var(--line); background: var(--brand-50); border-radius: 0 0 var(--radius) var(--radius); }
@media (min-width: 640px) { .form-actions { flex-direction: row; justify-content: flex-end; padding: 1.25rem 1.75rem; } }
.subhead { font-weight: 800; color: var(--brand-700); margin: 0.5rem 0 0; font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.04em; }

.field-label { display: block; font-size: 0.9375rem; font-weight: 700; color: var(--ink); margin-bottom: 0.25rem; }
.req { color: #b42318; margin-left: 0.125rem; }
.field-help { margin: 0.25rem 0 0; font-size: 0.8125rem; color: var(--ink-muted); }
.field-error { margin: 0.25rem 0 0; font-size: 0.875rem; font-weight: 700; color: #b42318; }
.form-input {
    display: block; width: 100%; min-height: 3rem; padding: 0.625rem 0.875rem; border-radius: 0.875rem;
    border: 1.5px solid var(--brand-300); background: #fff; color: var(--ink); font-size: 1rem;
}
.form-input::placeholder { color: #86a4b2; }
.form-input:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgb(107 158 174 / 0.35); }
textarea.form-input { min-height: 4.5rem; resize: vertical; }
select.form-input { appearance: auto; }
.field-invalid .form-input { border-color: #d92d20; }
.form-check { width: 1.375rem; height: 1.375rem; accent-color: var(--brand-600); flex: none; }
.form-file { display: block; width: 100%; padding: 0.5rem; border-radius: 0.875rem; border: 1.5px dashed var(--brand-400); background: var(--brand-50); font-size: 0.9375rem; }
.form-file::file-selector-button { margin-right: 0.75rem; min-height: 2.5rem; padding: 0 1rem; border: 0; border-radius: 0.625rem; background: var(--brand-600); color: #fff; font-weight: 700; cursor: pointer; }

.choice-group { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.choice-pill { position: relative; display: inline-flex; }
.choice-pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice-pill span { display: inline-flex; align-items: center; min-height: 3rem; padding: 0.5rem 1.125rem; border-radius: 999px; border: 1.5px solid var(--brand-300); background: #fff; font-weight: 700; color: var(--brand-800); }
.choice-pill input:checked + span { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.choice-pill input:focus-visible + span { outline: 3px solid var(--brand-500); outline-offset: 2px; }
.choice-cards { display: grid; gap: 0.625rem; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 480px) { .choice-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice-card { position: relative; display: flex; align-items: center; gap: 0.75rem; min-height: 4rem; padding: 0.625rem 0.875rem; border-radius: 1rem; border: 1.5px solid var(--brand-300); background: #fff; cursor: pointer; }
.choice-card:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); box-shadow: 0 0 0 2px var(--brand-600) inset; }
.choice-card:has(input:focus-visible) { outline: 3px solid var(--brand-500); outline-offset: 2px; }
.choice-card input { flex: none; width: 1.375rem; height: 1.375rem; accent-color: var(--brand-600); }
.choice-card .choice-title { font-weight: 800; }
.choice-card .choice-sub { display: block; font-size: 0.8125rem; color: var(--ink-muted); }
.check-row { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.875rem 1rem; border: 1.5px solid var(--brand-300); border-radius: 1rem; background: var(--brand-50); font-weight: 600; cursor: pointer; }
.check-row .form-check { margin-top: 0.125rem; }
.conditional { padding: 1rem; border-radius: 1rem; background: var(--brand-50); border: 1px solid var(--brand-200); }

.walk-row { display: grid; gap: 0.75rem; grid-template-columns: 1fr; padding: 1rem; border-radius: 1rem; background: var(--brand-50); border: 1px solid var(--brand-200); }
@media (min-width: 640px) { .walk-row { grid-template-columns: 1fr 1fr auto; align-items: end; } }
.walk-full { grid-column: 1 / -1; }

/* ---------- Progress steps (evaluation workflow) ---------- */
.steps { display: grid; gap: 0.75rem; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.875rem 1rem; border-radius: 1rem; background: #fff; border: 1.5px solid var(--line); }
.step-num { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 999px; background: var(--brand-100); color: var(--brand-700); font-weight: 800; }
.step-title { display: block; font-weight: 800; color: var(--brand-800); }
.step-note { display: block; font-size: 0.8125rem; color: var(--ink-muted); }
.step.is-done .step-num { background: var(--brand-600); color: #fff; }
.step.is-current { border-color: var(--peach-300); background: #fff8f5; }
.step.is-current .step-num { background: var(--peach-300); color: var(--peach-900); }

/* ---------- Public site ---------- */
.site-topbar { background: transparent; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-block: 0.875rem; }
.wordmark { display: inline-flex; flex-direction: column; text-decoration: none; color: var(--brand-800); line-height: 1.1; min-height: 2.75rem; justify-content: center; }
.wordmark-name { font-family: var(--font-display); font-size: 1.5rem; color: var(--brand-800); white-space: nowrap; }
@media (min-width: 640px) { .wordmark-name { font-size: 1.75rem; } }
.wordmark-tag { white-space: nowrap; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-600); }
.wordmark-light .wordmark-name { color: #fff; }
.wordmark-light .wordmark-tag { color: var(--brand-200); }
.header-actions { display: flex; align-items: center; gap: 0.375rem; flex: none; }
.menu-toggle { display: inline-flex; }
@media (max-width: 479px) { .header-actions .btn-sm { padding-inline: 0.75rem; } }
@media (min-width: 768px) { .menu-toggle { display: none; } }

.site-nav-bar { background: var(--brand-300); border-radius: 1rem; }
.site-nav { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.5rem; margin: 0; list-style: none; }
.site-nav a { display: flex; align-items: center; min-height: 3rem; padding: 0.5rem 1rem; border-radius: 0.75rem; font-weight: 800; color: var(--brand-800); text-decoration: none; }
.site-nav a:hover { background: rgb(255 255 255 / 0.45); }
.site-nav a[aria-current='page'] { background: #fff; color: var(--brand-700); box-shadow: 0 1px 2px rgb(38 56 63 / 0.12); }
@media (min-width: 768px) {
    .site-nav { flex-direction: row; justify-content: space-around; gap: 0.25rem; padding: 0.375rem 1rem; }
    .site-nav a { justify-content: center; padding-inline: 1.75rem; }
    .nav-collapsible { display: block !important; }
}

.xs-only { display: list-item; }
.hide-xs { display: none; }
@media (min-width: 640px) { .xs-only { display: none; } .hide-xs { display: inline-flex; } }

.hero { position: relative; overflow: hidden; border-radius: 1.5rem; background: var(--brand-200); box-shadow: var(--shadow); }
.hero img { display: block; width: 100%; height: 14rem; object-fit: cover; object-position: 30% 55%; }
@media (min-width: 640px) { .hero img { height: 22rem; } }
@media (min-width: 1024px) { .hero img { height: 28rem; } }
@media (min-width: 1536px) { .hero img { height: 32rem; } }
/* Short banner on service request forms (was an inline style). */
.hero.hero-compact { border-radius: 1.25rem; }
.hero.hero-compact img { height: 8rem; object-position: center 40%; }

.intro { text-align: center; max-width: 48rem; margin-inline: auto; }
.intro-we { display: block; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; color: var(--brand-800); }
.intro-name { display: block; font-family: var(--font-display); font-size: 3.5rem; line-height: 1.05; color: var(--brand-550); }
.intro-sub { display: block; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.3; color: var(--brand-550); margin-top: 0.375rem; }
@media (min-width: 640px) { .intro-we { font-size: 1.5rem; } .intro-name { font-size: 5rem; } .intro-sub { font-size: 1.625rem; } }
.intro-body { margin: 1.25rem 0 0; font-size: 1.0625rem; font-weight: 600; color: var(--ink); }

.section { padding-block: 2rem; }
@media (min-width: 768px) { .section { padding-block: 3rem; } }
.section-band { background: var(--brand-100); }
.section-head { text-align: center; margin-bottom: 1.5rem; }
.section-pill { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.25rem 2.5rem; border: 1.5px solid var(--brand-500); border-radius: 0.875rem; background: #fff; font-family: var(--font-display); font-size: 1.25rem; color: var(--brand-800); margin: 0; }

.service-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.service-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.service-card-body { display: flex; flex-direction: column; flex: 1; align-items: center; text-align: center; gap: 0.5rem; padding: 1.125rem 1.25rem 1.25rem; }
.service-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.375rem; line-height: 1.2; color: var(--brand-550); margin: 0; }
.service-card p { margin: 0; color: var(--ink-muted); font-size: 0.9375rem; flex: 1; }
.service-card .btn-row { margin-top: 0.5rem; justify-content: center; }
.service-row { display: grid; gap: 0; overflow: hidden; padding: 0; scroll-margin-top: 1rem; }
.service-row img { display: block; width: 100%; height: 100%; min-height: 11rem; object-fit: cover; }
.service-row-body { padding: 1.25rem 1.5rem 1.5rem; }
@media (min-width: 768px) {
    .service-row { grid-template-columns: 5fr 6fr; }
    .service-row.flip { grid-template-columns: 6fr 5fr; }
    .service-row.flip img { order: 2; }
    .service-row-body { padding: 1.75rem 2rem; align-self: center; }
}

.how-panel { background: var(--brand-100); border: 1px solid var(--brand-200); border-radius: 1.5rem; padding: 1.25rem; }
@media (min-width: 768px) { .how-panel { padding: 2rem 2.25rem 2.25rem; } }
.how-panel .eyebrow { color: var(--brand-600); margin-bottom: 0.125rem; }
.how-list { display: grid; gap: 0.875rem; grid-template-columns: 1fr; margin: 1.25rem 0 0; padding: 0; list-style: none; }
@media (min-width: 1024px) { .how-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
.how-step { background: #fff; border: 1px solid var(--brand-200); border-radius: 1rem; padding: 1.125rem 1.25rem 1.25rem; }
.how-num { display: grid; place-items: center; margin: 0 0 0.75rem; width: 2.25rem; height: 2.25rem; border-radius: 999px; background: var(--brand-600); color: #fff; font-family: var(--font-display); font-size: 1.0625rem; }
.how-step h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.1875rem; color: var(--brand-800); margin: 0; }
.how-step p { margin: 0.375rem 0 0; color: var(--ink-muted); font-size: 0.9375rem; }
.how-review { border: 2px solid var(--peach-300); background: #fff8f5; }

.site-footer { margin-top: 3rem; background: var(--brand-300); color: var(--brand-800); }
.site-footer a { color: var(--brand-800); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--ink); }
.footer-grid { display: grid; gap: 1.5rem; padding-block: 2.25rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; padding-block: 2.75rem; } }
.footer-title { font-weight: 800; color: var(--ink); margin: 0 0 0.5rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.125rem; }
.footer-links a, .footer-links button { display: inline-flex; align-items: center; min-height: 2.5rem; }
.footer-bottom { border-top: 1px solid rgb(46 69 76 / 0.25); padding-block: 1rem; font-size: 0.875rem; color: var(--brand-700); }
.link-button { background: none; border: 0; padding: 0; color: var(--brand-800); cursor: pointer; text-decoration: underline; font: inherit; }

.auth-wrap { max-width: 28rem; margin-inline: auto; }
.announcement { background: var(--peach-100); color: var(--peach-900); border-radius: 1rem; padding: 0.625rem 1rem; font-weight: 600; text-align: center; }

/* ---------- Client portal ---------- */
.portal-header { background: var(--brand-300); }
.portal-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-block: 0.625rem; }
.portal-nav { display: none; gap: 0.25rem; padding-bottom: 0.625rem; }
@media (min-width: 768px) { .portal-nav { display: flex; } }
.portal-nav a, .side-nav a { display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.25rem 1rem; border-radius: 0.75rem; font-weight: 800; color: var(--brand-800); text-decoration: none; }
.portal-nav a:hover { background: rgb(255 255 255 / 0.5); }
.portal-nav a[aria-current='page'] { background: #fff; color: var(--brand-700); }
.bottom-nav { position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgb(38 56 63 / 0.08); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.125rem; min-height: 4rem; font-size: 0.75rem; font-weight: 800; color: var(--ink-muted); text-decoration: none; }
.bottom-nav a[aria-current='page'] { color: var(--brand-700); background: var(--brand-50); }
.bottom-nav svg { width: 1.375rem; height: 1.375rem; }
@media (min-width: 768px) { .bottom-nav { display: none; } .bottom-nav.staff-bottom { display: grid; } }
@media (min-width: 1024px) { .bottom-nav.staff-bottom { display: none; } }
/* Column counts formerly set with inline styles (CSP forbids inline style attributes). */
.bottom-nav.bottom-nav-3 { grid-template-columns: repeat(3, 1fr); }
.bottom-nav.bottom-nav-4 { grid-template-columns: repeat(4, 1fr); }
.bottom-nav.bottom-nav-5 { grid-template-columns: repeat(5, 1fr); }
.has-bottom-nav { padding-bottom: 5.5rem; }
@media (min-width: 768px) { .has-bottom-nav { padding-bottom: 0; } }

.welcome { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; background: linear-gradient(135deg, var(--brand-300), var(--brand-200)); border-radius: 1.5rem; padding: 1.25rem 1.5rem; }
.dog-tile { display: block; padding: 0.75rem; text-decoration: none; color: inherit; }
.dog-tile-name { font-family: var(--font-display); font-size: 1.25rem; color: var(--brand-800); margin: 0.625rem 0 0; }
.dog-tile-meta { margin: 0; font-size: 0.875rem; color: var(--ink-muted); }

/* ---------- Staff workspace ---------- */
.staff-shell { display: block; }
@media (min-width: 1024px) { .staff-shell { display: flex; min-height: 100vh; } }
.staff-side { display: none; background: var(--brand-600); color: #e5f2f7; }
@media (min-width: 1024px) { .staff-side { display: block; width: 15.5rem; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.side-nav { display: flex; flex-direction: column; gap: 0.125rem; }
.side-nav a { color: #e5f2f7; }
.side-nav a:hover { background: rgb(255 255 255 / 0.14); color: #fff; }
.side-nav a[aria-current='page'] { background: var(--brand-300); color: var(--brand-900); }
.side-group { margin: 1rem 0.75rem 0.25rem; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #a9d0de; }
.staff-topbar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.375rem 1rem; background: var(--brand-600); position: sticky; top: 0; z-index: 30; }
@media (min-width: 1024px) { .staff-topbar { display: none; } }
.staff-menu { background: var(--brand-600); padding: 0.5rem 1rem 1rem; }
@media (min-width: 1024px) { .staff-menu { display: none !important; } }
.staff-menu .side-nav { display: grid; grid-template-columns: 1fr; }
@media (min-width: 640px) { .staff-menu .side-nav { grid-template-columns: repeat(3, 1fr); column-gap: 0.5rem; } .staff-menu .side-group { grid-column: 1 / -1; } }
.staff-main { flex: 1; min-width: 0; padding: 1.25rem 1rem 6rem; }
@media (min-width: 640px) { .staff-main { padding-inline: 1.5rem; } }
@media (min-width: 768px) { .staff-main { padding: 1.5rem 2rem 6rem; } }
@media (min-width: 1024px) { .staff-main { padding: 2rem 2rem 2.5rem; } }
@media (min-width: 1024px) { .staff-main { padding-inline: 2.5rem; } }
.staff-inner { max-width: 80rem; margin-inline: auto; }

.tabs { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.25rem; background: #fff; border: 1px solid var(--line); border-radius: 1rem; }
.tabs a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; border-radius: 0.75rem; font-weight: 800; color: var(--ink-muted); text-decoration: none; }
.tabs a[aria-current='page'] { background: var(--brand-600); color: #fff; }
.stat { padding: 1rem; }
.stat-num { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--brand-800); margin: 0.375rem 0 0; }
.stat-label { margin: 0; font-size: 0.8125rem; font-weight: 800; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.care-grid { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .care-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .care-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.care-item { border-radius: 1rem; border: 1px solid var(--line); background: #fff; padding: 0.875rem 1rem; }
.care-item h3 { margin: 0 0 0.25rem; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); }
.care-item p { margin: 0; white-space: pre-line; }
.care-item.flag { border: 2px solid #f3d58a; background: #fff8e6; }
.care-item.danger { border: 2px solid #f1b3ad; background: #fef3f2; }
.care-item.flag h3, .care-item.danger h3 { color: #6b4200; }
.care-item.danger h3 { color: #912018; }

/* Let grid/flex children shrink instead of stretching the page (long emails, badges). */
.grid > *, .grid-cards > *, .form-grid > *, .care-grid > * { min-width: 0; }
.staff-main .badge { white-space: normal; text-align: left; }

/* Tables (reports) */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Server error page and two-step sign-in (no inline styles under the CSP). */
.card-center { text-align: center; }
.mfa-qr { display: inline-block; width: 232px; height: 232px; background: #fff; border-radius: 0.75rem; padding: 0.5rem; }
.mfa-key { font-size: 0.95rem; letter-spacing: 0.08em; word-break: break-all; }
