:root {
    --primary: #c4818f;
    --primary-dark: #a96a78;
    --secondary: #6f9ab8;
    --accent: #b8934f;
    --bg: #faf5ef;
    --card-bg: #ffffff;
    --text: #33282b;
    --muted: #8a7d78;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(51, 40, 43, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

h1, h2, h3, h4, .logo-text {
    font-family: 'Fraunces', serif;
    line-height: 1.2;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}
.container--wide {
    max-width: 1480px;
}

/* Header */
.site-header {
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #efe5db;
    view-transition-name: site-header;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.logo-bubble {
    font-size: 1.6rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

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

.nav-links a:not(.btn) {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    padding: 6px 2px;
    border-bottom: 3px solid transparent;
}

.nav-links a:not(.btn):hover,
.nav-links a:not(.btn).active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}

/* Logout is a POST form (Django 5 rejects GET logout); style the button to
   match the other nav links. */
.nav-links .logout-form {
    margin: 0;
}

.nav-links .nav-link-button {
    font: inherit;
    font-weight: 600;
    color: var(--text);
    background: none;
    border: none;
    padding: 6px 2px;
    border-bottom: 3px solid transparent;
    cursor: pointer;
}

.nav-links .nav-link-button:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text);
}

/* Staff right-hand sidebar: brand header and the mobile-only slide-out toggle. */
.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid #efe5db;
    text-decoration: none;
    color: var(--text);
}

.admin-sidebar-toggle {
    display: none;
}

.admin-nav-name {
    padding: 8px 12px;
    font-weight: 600;
    color: var(--muted, #8a7a6d);
}

/* Each rail entry carries an icon and a label. Expanded shows the words;
   collapsed shows the icons (the labels stay available to screen readers). */
.admin-nav-icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.admin-nav-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

.admin-nav-label {
    white-space: normal;
}

.admin-dropdown-nav > a:not(.admin-sidebar-brand),
.admin-nav-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Specific enough to beat the later `.admin-dropdown-nav .admin-dropdown-toggle`
   rule (which uses space-between for the old text-only layout). */
.admin-dropdown-nav .admin-dropdown-group--settings > .admin-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.admin-dropdown-nav .admin-dropdown-group--settings > .admin-dropdown-toggle .admin-dropdown-caret {
    margin-left: auto;
}

/* Collapsed rail: icons only. Labels are visually hidden but remain in the
   accessibility tree, and each entry exposes a title for hover tooltips. */
body.admin-rail-collapsed .admin-dropdown-heading,
body.admin-rail-collapsed .admin-dropdown-nav .chat-badge,
body.admin-rail-collapsed .nav-pending-badge {
    display: none;
}

body.admin-rail-collapsed .admin-nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

body.admin-rail-collapsed .admin-dropdown-nav > a:not(.admin-sidebar-brand),
body.admin-rail-collapsed .admin-dropdown-group--settings > .admin-dropdown-toggle,
body.admin-rail-collapsed .admin-nav-name {
    justify-content: center;
    gap: 0;
    padding-left: 0;
    padding-right: 0;
}

body.admin-rail-collapsed .admin-nav-icon {
    display: inline-flex;
    margin: 0 auto;
}

body.admin-rail-collapsed .admin-dropdown-group--settings > .admin-dropdown-toggle .admin-dropdown-caret {
    display: none;
}

.admin-dropdown {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 240px;
    z-index: 120;
    background: var(--card-bg, #fff);
    border-left: 1px solid #efe5db;
    box-shadow: -12px 0 24px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
}

/* On desktop the staff sidebar is always present; reserve room for it so it
   never covers page content. Customers have no sidebar, so nothing changes. */
@media (min-width: 861px) {
    body.is-staff #content,
    body.is-staff .page-footer {
        padding-right: 240px;
        transition: padding-right 0.2s ease;
    }
    body.is-staff.admin-rail-collapsed #content,
    body.is-staff.admin-rail-collapsed .page-footer {
        padding-right: 68px;
    }
}

.admin-dropdown-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    padding: 16px 12px;
    max-width: none;
    margin: 0;
}

.admin-dropdown-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-bottom: none;
    border-radius: 6px;
    white-space: normal;
}

.admin-dropdown-nav a:hover,
.admin-dropdown-nav a.active {
    color: var(--primary-dark);
    background: #fbf6f0;
    border-bottom-color: transparent;
}

/* Logout is a POST form (Django 5 rejects GET logout); style the button to
   match the other rail entries, including in the collapsed rail. */
.admin-dropdown-nav .logout-form {
    margin: 0;
}

.admin-dropdown-nav .logout-form button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    background: none;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    text-align: left;
    white-space: normal;
}

.admin-dropdown-nav .logout-form button:hover,
.admin-dropdown-nav .logout-form button:focus-visible {
    color: var(--primary-dark);
    background: #fbf6f0;
}

.admin-dropdown-nav .chat-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 6px;
    background: #e34d67;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    vertical-align: middle;
}

.admin-dropdown-heading {
    margin: 12px 12px 2px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ff69b4;
}

.admin-dropdown-heading:first-child {
    margin-top: 4px;
}

.admin-dropdown-group {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.admin-dropdown-nav .admin-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    width: 100%;
    background: none;
    border: none;
    border-bottom: none;
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 12px;
    white-space: normal;
    cursor: pointer;
    text-align: left;
}

.admin-dropdown-nav .admin-dropdown-toggle:hover,
.admin-dropdown-nav .admin-dropdown-toggle.active {
    color: var(--primary-dark);
    background: #fbf6f0;
    border-bottom-color: transparent;
}

.admin-dropdown-caret {
    width: 12px;
    height: 12px;
    transform: rotate(0deg);
}

.admin-dropdown-nav .admin-dropdown-toggle.active .admin-dropdown-caret {
    transform: rotate(180deg);
}

/* Submenus are collapsed by default. On small screens they expand inline
   within the rail (an accordion); on desktop the Settings menu uses a
   floating flyout instead (see the min-width: 861px rule below). */
.admin-dropdown-submenu {
    display: none;
    flex-direction: column;
    padding: 2px 0 2px 10px;
}

.admin-dropdown-group > .admin-dropdown-submenu.open,
.admin-dropdown-group--nested > .admin-dropdown-submenu.open {
    display: flex;
}

.admin-dropdown-group--nested {
    display: flex;
    width: 100%;
}

.admin-dropdown-group--nested > .admin-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-bottom: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.95rem;
}

.admin-dropdown-group--nested > .admin-dropdown-toggle:hover,
.admin-dropdown-group--nested > .admin-dropdown-toggle.active {
    color: var(--primary-dark);
    background: #fbf6f0;
    border-bottom-color: transparent;
}

.admin-dropdown-nav .admin-dropdown-submenu a {
    border-bottom: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    white-space: normal;
}

.admin-dropdown-nav .admin-dropdown-submenu a:hover,
.admin-dropdown-nav .admin-dropdown-submenu a.active {
    color: var(--primary-dark);
    background: #fbf6f0;
    border-bottom: none;
}

.admin-dropdown-nav .admin-dropdown-submenu button {
    appearance: none;
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    border-bottom: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    white-space: normal;
}

.admin-dropdown-nav .admin-dropdown-submenu button:hover,
.admin-dropdown-nav .admin-dropdown-submenu button.active {
    color: var(--primary-dark);
    background: #fbf6f0;
}

/* Desktop: the Settings submenu pops out to the left of the rail as a
   floating panel, overlaying the page instead of pushing nav items around.
   `position: fixed` keeps it clear of the rail's own scroll clipping; its
   vertical position is set by JS to line up with the Settings toggle. */
@media (min-width: 861px) {
    .admin-dropdown {
        transition: width 0.2s ease;
    }
    body.admin-rail-collapsed .admin-dropdown {
        width: 68px;
    }
    body.admin-rail-collapsed .admin-dropdown-nav {
        padding-left: 8px;
        padding-right: 8px;
    }
    .admin-dropdown-group--settings > .admin-dropdown-submenu {
        position: fixed;
        top: 88px;
        right: 252px;
        left: auto;
        width: 300px;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        padding: 10px;
        background: var(--card-bg, #fff);
        border: 1px solid #efe5db;
        border-radius: 12px;
        box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.14);
        z-index: 130;
    }
    body.admin-rail-collapsed .admin-dropdown-group--settings > .admin-dropdown-submenu {
        right: 80px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-dropdown,
    body.is-staff #content,
    body.is-staff .page-footer {
        transition: none;
    }
}

@media (max-width: 860px) {
    .admin-sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 12px;
        right: 12px;
        z-index: 130;
        width: 44px;
        height: 44px;
        padding: 0;
        border: none;
        border-radius: 10px;
        background: var(--primary);
        color: #fff;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    .admin-sidebar-toggle-icon {
        width: 22px;
        height: 22px;
    }
    .admin-sidebar-toggle-close {
        display: none;
    }
    body.admin-sidebar-open .admin-sidebar-toggle-open {
        display: none;
    }
    body.admin-sidebar-open .admin-sidebar-toggle-close {
        display: block;
    }
    .admin-dropdown {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.2s ease, visibility 0s linear 0.2s;
        box-shadow: -12px 0 24px rgba(0, 0, 0, 0.08);
    }
    body.admin-sidebar-open .admin-dropdown {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        transition: transform 0.2s ease;
    }
    .admin-dropdown-nav {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 2px;
        padding: 16px 12px;
        max-height: none;
        overflow-y: visible;
    }
    .admin-dropdown-nav a {
        white-space: normal;
    }
    .admin-dropdown-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    .admin-dropdown-submenu,
    .admin-dropdown-group--nested > .admin-dropdown-submenu {
        position: static;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        width: 100%;
        min-width: 0;
        margin-right: 0;
        padding: 4px 0 4px 10px;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    .admin-dropdown-submenu::before {
        content: none;
    }
    .admin-dropdown-group:hover > .admin-dropdown-submenu,
    .admin-dropdown-group:focus-within > .admin-dropdown-submenu,
    .admin-dropdown-group > .admin-dropdown-submenu.open,
    .admin-dropdown-group--nested:hover > .admin-dropdown-submenu,
    .admin-dropdown-group--nested:focus-within > .admin-dropdown-submenu,
    .admin-dropdown-group--nested > .admin-dropdown-submenu.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .admin-dropdown-group--nested {
        width: 100%;
    }
    .admin-dropdown-group--nested > .admin-dropdown-toggle {
        padding: 6px 10px;
    }
    .admin-dropdown-group--nested .admin-dropdown-caret {
        transform: rotate(0deg);
    }
    .admin-dropdown-group--nested > .admin-dropdown-toggle.active .admin-dropdown-caret {
        transform: rotate(180deg);
    }
    .admin-dropdown-nav .admin-dropdown-submenu a {
        padding: 6px 10px;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary-dark);
    color: #fff;
    box-shadow: 0 2px 8px rgba(196, 129, 143, 0.35);
}

.btn-primary:hover {
    background: #8e5260;
    box-shadow: 0 2px 8px rgba(169, 106, 120, 0.4);
}

.btn-outline {
    background: var(--card-bg);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.btn-outline:hover {
    background: var(--primary-dark);
    color: #fff;
}

.btn-small {
    padding: 8px 18px;
    font-size: 0.85rem;
}

/* Hero */
.hero {
    background: #f7e7d6;
    padding: 72px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}

.accent {
    color: var(--primary-dark);
}

.hero-text p {
    font-size: 1.15rem;
    color: var(--muted);
    margin-bottom: 28px;
    max-width: 480px;
}

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

.hero-art {
    text-align: center;
}

.emoji-paw {
    font-size: 9rem;
    display: inline-block;
    animation: bounce 2.5s infinite ease-in-out;
    filter: drop-shadow(0 12px 20px rgba(51, 40, 43, 0.15));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}

/* Sections */
.section {
    padding: 64px 0;
}

.section-tint {
    background: #fff;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.center {
    text-align: center;
    margin-top: 32px;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card-icon {
    font-size: 2.4rem;
    display: inline-block;
    margin-bottom: 12px;
}

.card-dog-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.card p {
    color: var(--muted);
    font-size: 0.95rem;
}

.price {
    font-weight: 700;
    color: var(--primary-dark) !important;
    font-size: 1.1rem !important;
    margin-top: 12px;
}

/* Page hero */
.page-hero {
    background: linear-gradient(135deg, #f7e7d6 0%, #e0eef2 100%);
    padding: 56px 0;
    text-align: center;
}

.page-hero-plain {
    background: none;
}

.page-hero h1 {
    font-size: 2.4rem;
    margin-bottom: 8px;
}

.page-hero p {
    color: var(--muted);
    font-size: 1.05rem;
}

.page-hero-actions {
    margin-top: 20px;
    margin-bottom: -100px;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.about-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.about-card h2 {
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.testimonial-content {
    font-style: italic;
    line-height: 1.6;
}

.testimonial-author {
    margin-top: 12px;
    font-weight: 700;
    color: var(--primary-dark);
}

.values-list {
    list-style: none;
}

.values-list li {
    padding: 6px 0;
    border-bottom: 1px dashed #efe5db;
}

.about-subhead {
    margin-top: 18px;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    font-family: 'Manrope', sans-serif;
}

.about-story {
    position: relative;
    overflow: hidden;
}

.about-story::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.value-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.value-chips li {
    background: #f7ece6;
    border: 1px solid #eeddd2;
    color: var(--primary-dark);
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.92rem;
}

/* Forms */
.form {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    max-width: 620px;
}

.form-wide {
    max-width: 760px;
    margin: 0 auto;
}

.form h2 {
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.form label {
    display: block;
    font-weight: 700;
    margin: 14px 0 6px;
    font-size: 0.9rem;
}

.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #efe5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--text);
    transition: border-color 0.15s ease;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form input:focus-visible,
.form select:focus-visible,
.form textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

a:focus-visible,
.btn:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.form .btn {
    margin-top: 22px;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 78px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: #f4ece4;
}

.vouch-code-form {
    margin-top: 18px;
}

.vouch-code-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.vouch-code-form input {
    max-width: 200px;
    letter-spacing: 0.15em;
}

.vouch-code {
    font-size: 1.35rem;
    letter-spacing: 0.18em;
    font-variant-numeric: tabular-nums;
}

/* Staff Security panel: passkey nicknames and remembered devices. */
.passkey-list,
.device-list {
    list-style: none;
    margin: 6px 0 18px;
    padding: 0;
}

.passkey-list li,
.device-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px dashed #efe5db;
}

.passkey-list li:last-child,
.device-list li:last-child {
    border-bottom: none;
}

.passkey-list .btn,
.passkey-rename .btn {
    margin-top: 0;
}

.passkey-rename {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 320px;
}

.passkey-rename input {
    max-width: 240px;
}

.passkey-meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.passkey-meta small {
    display: block;
}

.device-list small {
    display: block;
    color: var(--muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.svc-tier-list {
    display: grid;
    gap: 10px;
}

.svc-tier-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.svc-tier-cell label {
    width: 32px;
    flex-shrink: 0;
    font-weight: 700;
}

.svc-tier-inputs {
    display: flex;
    gap: 8px;
    flex: 1;
}

.svc-tier-inputs input {
    flex: 1;
    min-width: 0;
    padding-left: 8px;
    padding-right: 4px;
}

.form-status {
    margin-top: 14px;
    font-weight: 700;
}

.form-status.success { color: #2e9e5b; }
.form-status.error { color: #d64545; }
.form-status.info { color: #5b7a99; }

.form input.field-error,
.form select.field-error,
.form textarea.field-error {
    border-color: #d64545;
    box-shadow: 0 0 0 2px rgba(214, 69, 69, 0.18);
}

#bkCalendar.field-error,
#bkTimeList.field-error {
    outline: 2px solid #d64545;
    outline-offset: 3px;
    border-radius: var(--radius);
}

.field-error-msg {
    display: block;
    margin-top: 4px;
    color: #d64545;
    font-size: 0.85em;
    font-weight: 600;
}

/* Ghost placeholder overlay: required fields get a red * on their placeholder */
.ghost-field {
    position: relative;
    display: block;
    font-size: 0.95rem;
    line-height: normal;
}

.ghost-field input,
.ghost-field textarea {
    font: inherit;
}

.ghost-field input::placeholder,
.ghost-field textarea::placeholder {
    color: transparent;
}

.ghost-field .ghost-overlay {
    display: none;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--muted);
    font: inherit;
    white-space: pre;
}

.ghost-field textarea ~ .ghost-overlay {
    top: 14px;
    transform: none;
}

.ghost-field:has(input:placeholder-shown) .ghost-overlay,
.ghost-field:has(textarea:placeholder-shown) .ghost-overlay {
    display: block;
}

.chat-input .ghost-field {
    flex: 1;
    min-width: 0;
}

.ghost-star {
    color: #d64545;
}

/* Booking page layout */
.book-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.book-layout .form {
    max-width: none;
    margin: 0;
}

.book-toggle-col {
    display: flex;
    align-items: flex-end;
}

.book-toggle-col .btn {
    width: 100%;
    margin-top: 0;
    white-space: nowrap;
}

.book-summary {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    position: sticky;
    top: 90px;
}

.book-summary h3 {
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.summary-rows {
    margin: 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px dashed #efe5db;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row dt {
    font-weight: 700;
    font-size: 0.9rem;
}

.summary-row dd {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
    text-align: right;
}

.summary-note {
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ===== Booking confirmation ===== */
.confirm-success {
    text-align: center;
    padding: 18px 0 6px;
}

.confirm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 10px 24px rgba(196, 129, 143, 0.35);
    margin-bottom: 14px;
}

.confirm-badge svg {
    width: 34px;
    height: 34px;
}

.confirm-headline {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.confirm-sub {
    color: var(--muted);
    margin: 0;
}

.confirm-next {
    margin-top: 18px;
    padding: 14px 16px;
    background: #f7ece6;
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    color: var(--text);
    font-weight: 600;
}

.confirm-card {
    background: var(--card-bg);
    border: 1px solid #efe5db;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin: 20px 0;
}

.confirm-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.confirm-dog-thumb {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f7ece6;
    flex-shrink: 0;
}

.confirm-card-title h3 {
    color: var(--primary-dark);
    margin: 0;
}

.confirm-card-title p {
    margin: 0;
    font-size: 0.9rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
    margin: 0;
}

.summary-grid-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.summary-grid-item dt {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.summary-grid-item dd {
    margin: 0;
    font-weight: 700;
    color: var(--text);
}

.summary-grid-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.status-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: capitalize;
    background: #f7ece6;
    color: var(--primary-dark);
    border: 1px solid #e8d5c8;
}

/* Logged-in step 1 read-only confirmation */
.book-confirm-card {
    background: #fbf6f0;
    border: 2px dashed #efe5db;
    border-radius: 8px;
    padding: 16px 20px;
}

.book-confirm-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.book-confirm-phone {
    color: var(--muted);
    margin-top: 2px;
}

.book-confirm-card p {
    margin: 8px 0 0;
    font-size: 0.85rem;
}

/* Staff price-review card (online requests) */
.confirm-card.review-card {
    border-color: #ecd9cd;
    border-top: 4px solid var(--primary);
    background: linear-gradient(180deg, #fffcf9 0%, var(--card-bg) 120px);
}

.review-card > h3 {
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.review-card > p.admin-muted {
    margin-bottom: 18px;
}

.review-card .form-row {
    grid-template-columns: 1fr;
    margin-bottom: 18px;
}

.review-card label:not(.review-radio):not(.review-remember) {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--muted);
}

.review-card input[type="number"],
.review-card textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #efe5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--text);
    transition: border-color 0.15s ease;
}

.review-card input[type="number"]:focus,
.review-card textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.review-card input[type="number"]:focus-visible,
.review-card textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.review-card textarea {
    resize: vertical;
}

.review-price-field {
    display: flex;
    align-items: stretch;
    max-width: 220px;
}

.review-price-currency {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #f7ece6;
    border: 2px solid #efe5db;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-weight: 700;
    color: var(--primary-dark);
}

.review-price-field input[type="number"] {
    border-radius: 0 6px 6px 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.review-template-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.review-template-chip {
    margin: 0;
}

.review-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
    padding: 10px 12px;
    border: 2px solid #efe5db;
    border-radius: 6px;
    background: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.review-radio:hover {
    border-color: var(--primary);
}

.review-radio:has(input:checked) {
    border-color: var(--primary);
    background: #fdf4f1;
}

.review-radio input {
    width: auto;
    margin: 0;
    accent-color: var(--primary-dark);
}

.review-remember {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.review-remember input {
    width: auto;
    margin-top: 4px;
    accent-color: var(--primary-dark);
}

.review-card form > .btn-primary {
    margin-top: 4px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn:disabled:hover {
    transform: none;
}

/* Admin */
.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.admin-link-right {
    margin-left: auto;
}

.admin-table-wrap {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.admin-table th {
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    padding: 14px 16px;
    border-bottom: 2px solid #efe5db;
    white-space: nowrap;
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1e9e1;
    font-size: 0.92rem;
    vertical-align: top;
}

.admin-table tbody tr:hover {
    background: #fbf6f0;
}

/* Log tables in the History modal: the default 760px min-width forces a
   horizontal scrollbar on tablet-width modals, so let the columns wrap. */
.admin-table--logs { min-width: 0; }
.admin-table--logs th,
.admin-table--logs td { padding: 10px 12px; }
.admin-table--logs td { overflow-wrap: anywhere; }
.admin-table--logs code { white-space: normal; overflow-wrap: anywhere; }
.admin-table--logs .log-time { white-space: nowrap; }
.admin-table--logs .log-status { white-space: nowrap; }
.admin-table--logs td .admin-muted { margin: 2px 0 0; font-size: 0.78rem; }

/* Phones: stack each row so nothing needs sideways scrolling. */
@media (max-width: 640px) {
    .admin-table--logs { display: block; }
    .admin-table--logs thead { display: none; }
    .admin-table--logs tbody,
    .admin-table--logs tr,
    .admin-table--logs td { display: block; width: auto; }
    .admin-table--logs tr {
        padding: 8px 0;
        border-bottom: 1px solid #f1e9e1;
    }
    .admin-table--logs td {
        border-bottom: none;
        padding: 2px 12px;
    }
    .admin-table--logs td::before {
        content: attr(data-label);
        display: inline-block;
        min-width: 62px;
        color: var(--muted);
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
    .admin-table--logs td.admin-empty { text-align: left; padding: 12px; }
    .admin-table--logs td.admin-empty::before { content: none; }
}

/* History modal — the email log is rendered as stacked entries (time + status
   header, then template/to/subject) instead of a wide table. */
.log-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.log-entry {
    background: var(--card-bg);
    border: 1px solid #f1e9e1;
    border-radius: var(--radius);
    padding: 10px 14px;
}
.log-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.log-entry-head .log-time {
    font-weight: 600;
    font-size: 0.82rem;
}
.log-entry-fields {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}
.log-field {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.log-field dt {
    flex: 0 0 66px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.log-field dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}
.log-field code {
    white-space: normal;
    overflow-wrap: anywhere;
}
.log-error {
    margin: 6px 0 0;
    font-size: 0.78rem;
}
@media (max-width: 480px) {
    .log-field { flex-direction: column; gap: 1px; }
    .log-field dt { flex: none; }
}

.admin-muted {
    color: var(--muted);
}

.admin-empty {
    text-align: center;
    color: var(--muted);
    padding: 32px !important;
}

.admin-actions {
    white-space: nowrap;
}

.admin-actions .btn {
    margin-right: 6px;
    margin-bottom: 4px;
}

.btn-danger {
    background: transparent;
    border-color: #d64545;
    color: #d64545;
}

.btn-danger:hover {
    background: #d64545;
    color: #fff;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-pending { background: #fff3d6; color: #a87a00; }
.status-confirmed { background: #e0f4e8; color: #2e9e5b; }
.status-cancelled { background: #fbe1e1; color: #d64545; }
.status-completed { background: #e3e9ff; color: #4f46e5; }
.status-reserved { background: #eef0f4; color: #5b6472; }

/* Admin zone */
.admin-content {
    min-width: 0;
}

.deposit-paid { color: #2e9e5b; font-weight: 700; }
.deposit-unpaid { color: #d64545; font-weight: 700; }
.deposit-refunded { color: var(--muted); font-weight: 700; }
.pay-due { color: #a87a00; font-weight: 700; }

.new-customer-mark {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    background: #fff3d6;
    color: #a87a00;
    vertical-align: middle;
}

/* ===== Bookings admin table ===== */
.bk-page {
    margin-bottom: 8px;
}

.bk-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 20px;
}

.bk-title {
    font-size: 1.9rem;
    color: var(--primary-dark);
    margin: 0;
}

.bk-head-sub {
    color: var(--muted);
    font-size: 0.88rem;
    margin: 4px 0 0;
}

.bk-head-sub strong {
    color: var(--primary-dark);
}

.bk-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.bk-filters .btn {
    border-radius: 999px;
    margin: 0;
    white-space: nowrap;
}

.bk-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 16px;
}

.bk-search {
    display: flex;
    flex: 1 1 300px;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
}

.bk-search-input {
    flex: 1;
    min-width: 140px;
    padding: 10px 14px;
    border: 2px solid #efe5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.15s ease;
}

.bk-search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.bk-search-input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.bk-tools .btn {
    margin: 0;
}

.bk-tools-side {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.bookings-wrap {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.bookings-table {
    width: 100%;
    min-width: 940px;
    border-collapse: collapse;
}

.bookings-table th {
    text-align: left;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    padding: 12px 14px;
    border-bottom: 2px solid #efe5db;
    white-space: nowrap;
}

.bookings-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1e9e1;
    font-size: 0.9rem;
    line-height: 1.4;
    vertical-align: middle;
}

.bookings-table tbody tr:hover {
    background: #fbf6f0;
}

.bookings-table tr[hidden] {
    display: none;
}

.bookings-table tbody tr:last-child td {
    border-bottom: 0;
}

.bookings-table .admin-muted {
    font-size: 0.85rem;
}

.bookings-table .bookings-empty td {
    text-align: center;
    padding: 28px 14px;
}

.bk-when-date {
    display: block;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.bk-when-time {
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
}

.bk-sub {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 1px;
}

.bk-dog-name {
    font-weight: 600;
}

.bk-tags {
    margin-top: 5px;
}

.bk-tags .status-badge,
.bk-tags .new-customer-mark {
    margin: 2px 8px 2px 0;
}

.bk-deposit {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.bk-deposit-paid {
    background: #e0f4e8;
    color: #2e9e5b;
}

.bk-deposit-unpaid {
    background: #fbe1e1;
    color: #d64545;
}

.bk-deposit-refunded {
    background: #efe9e3;
    color: #8a7d78;
}

.bk-actions > * {
    margin: 0 6px 4px 0;
}

.bk-more {
    display: inline-block;
    vertical-align: top;
}

.bk-more summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.bk-more summary::-webkit-details-marker {
    display: none;
}

.bk-more-caret {
    margin-left: 6px;
    vertical-align: middle;
    transition: transform 0.15s ease;
}

.bk-more[open] .bk-more-caret {
    transform: rotate(180deg);
}

.bk-more-panel {
    display: grid;
    gap: 4px;
    min-width: 210px;
    margin: 8px 0 4px;
    padding: 8px;
    background: #fff;
    border: 1px solid #efe5db;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.bk-more-panel > * {
    width: 100%;
    margin: 0;
    text-align: left;
    justify-content: flex-start;
}

.bk-note {
    color: var(--muted);
    font-size: 0.82rem;
    margin: 14px 0 0;
}

@media (max-width: 1024px) {
    .bk-title {
        font-size: 1.6rem;
    }

    .bookings-wrap {
        overflow: visible;
        background: transparent;
        box-shadow: none;
    }

    .bookings-table,
    .bookings-table tbody {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .bookings-table thead {
        display: none;
    }

    .bookings-table tbody tr {
        display: block;
    }

    .bookings-table tbody tr[data-booking-id] {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "when status"
            "dog dog"
            "owner owner"
            "service service"
            "groomer groomer"
            "deposit deposit"
            "actions actions";
        column-gap: 14px;
        row-gap: 12px;
        padding: 16px;
        margin-bottom: 14px;
        background: var(--card-bg);
        border: 1px solid #efe5db;
        border-radius: 12px;
        box-shadow: var(--shadow);
    }

    .bookings-table tbody tr[data-booking-id]:hover {
        background: var(--card-bg);
    }

    .bookings-table tbody tr[data-booking-id] td {
        display: block;
        padding: 0;
        border: 0;
        vertical-align: baseline;
        font-size: 0.9rem;
    }

    .bookings-table td[data-label="When"] {
        grid-area: when;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 4px 10px;
        align-self: center;
    }

    .bookings-table td[data-label="When"] .bk-when-date {
        font-size: 1.02rem;
        color: var(--primary-dark);
    }

    .bookings-table td[data-label="Dog"] {
        grid-area: dog;
    }

    .bookings-table td[data-label="Dog"] .bk-dog-name {
        font-size: 1.05rem;
        font-weight: 700;
    }

    .bookings-table td[data-label="Owner"],
    .bookings-table td[data-label="Service"],
    .bookings-table td[data-label="Groomer"],
    .bookings-table td[data-label="Deposit"] {
        display: flex;
        align-items: flex-start;
        gap: 14px;
    }

    .bookings-table td[data-label="Owner"]::before,
    .bookings-table td[data-label="Service"]::before,
    .bookings-table td[data-label="Groomer"]::before,
    .bookings-table td[data-label="Deposit"]::before {
        content: attr(data-label);
        flex: 0 0 96px;
        padding-top: 3px;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--muted);
    }

    .bookings-table td[data-label="Status"] {
        grid-area: status;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .bookings-table td[data-label="Actions"] {
        grid-area: actions;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        margin-top: 2px;
        padding-top: 14px;
        border-top: 1px dashed #efe5db;
    }

    .bookings-table td[data-label="Actions"] > * {
        margin: 0;
    }

    .bk-more-panel {
        min-width: 200px;
    }

    .bookings-table tbody tr.bookings-empty td {
        display: block;
        padding: 24px 0;
        text-align: center;
        border: 0;
    }
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav h2 {
    margin: 0;
    color: var(--primary-dark);
}

.calendar-grid {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calendar-weekdays,
.calendar-week {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.calendar-weekdays {
    background: #f7ece6;
    border-bottom: 2px solid #efe5db;
}

.calendar-weekday {
    padding: 12px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.cal-day-weekend {
    display: none;
}

.calendar-week {
    border-bottom: 1px solid #f1e9e1;
}

.calendar-week:last-child {
    border-bottom: none;
}

.cal-day {
    min-height: 120px;
    padding: 8px;
    border-right: 1px solid #f1e9e1;
    font-size: 0.82rem;
}

.cal-day-out {
    background: #ffffff;
}

.cal-day-today .cal-day-num {
    background: var(--primary-dark);
    color: #fff;
    border-radius: 50%;
    display: inline-block;
    width: 22px;
    text-align: center;
}

.cal-day-num {
    font-weight: 700;
    margin-bottom: 6px;
}

.cal-book {
    padding: 2px 6px;
    margin-bottom: 4px;
    background: #faf5ef;
    border-left: 3px solid var(--secondary);
    border-radius: 4px;
    line-height: 1.4;
    font-size: 0.8rem;
}

.cal-book .cal-book-time {
    font-weight: 700;
}

.cal-book .status-badge {
    font-size: 0.68rem;
    padding: 2px 8px;
    margin-top: 2px;
}

.cal-book-short {
    background: #e0eef2;
    border-left-color: #0e7490;
}

.cal-book-chip {
    display: inline-block;
    background: #0e7490;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 6px;
    margin-left: 4px;
    vertical-align: middle;
}

.cal-balance-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 6px;
    background: #fff3d6;
    color: #a87a00;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}

.cal-more {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 700;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.gallery-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.gallery-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* ===== Gallery focal point picker ===== */
.focal-picker {
    position: relative;
    width: 100%;
    height: 260px;
    border-radius: 8px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    background: #222;
}
.focal-picker.is-dragging { cursor: grabbing; }
.focal-picker img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.focal-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255,255,255,.95);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 0 8px rgba(0,0,0,.55);
    pointer-events: none;
}
.focal-center::before,
.focal-center::after {
    content: '';
    position: absolute;
    background: rgba(255,255,255,.95);
    box-shadow: 0 0 3px rgba(0,0,0,.5);
}
.focal-center::before { left: 50%; top: -8px; width: 2px; height: 36px; transform: translateX(-50%); }
.focal-center::after { top: 50%; left: -8px; height: 2px; width: 36px; transform: translateY(-50%); }
.focal-hint { margin-top: 6px; font-size: 0.78rem; }
.focal-open-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.focal-open-btn svg {
    width: 14px;
    height: 14px;
}
/* ===== Gallery crop widget ===== */
.crop-box {
    position: relative;
    overflow: hidden;
    background: #222;
    border-radius: 8px;
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.crop-box.is-dragging { cursor: grabbing; }
.crop-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: auto;
}
.crop-window {
    position: absolute;
    border: 2px solid #fff;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55);
    cursor: move;
    border-radius: 2px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.crop-window.is-dragging { cursor: grabbing; }
.crop-aspects {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.upload-dims { margin-top: 6px; }
.upload-warn { color: var(--warn, #b8860b); font-weight: 600; }
.edit-modes {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.edit-mode { min-height: 200px; }
.gallery-advanced {
    border: 1px solid #efe5db;
    border-radius: 8px;
    padding: 8px 10px;
}
.gallery-advanced summary {
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    user-select: none;
    list-style: none;
}
.gallery-advanced summary::-webkit-details-marker {
    display: none;
}
.gallery-advanced summary::before {
    content: '▸ ';
    color: var(--accent);
}
.gallery-advanced[open] summary::before {
    content: '▾ ';
}
.gallery-advanced .gallery-controls {
    margin-top: 10px;
}
.gallery-meta > .gallery-advanced {
    margin-top: 10px;
}
.gallery-advanced .gallery-pair-row {
    border-top: none;
    margin-top: 8px;
    padding-top: 0;
}
.focal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.gallery-card-actions .pair-open-btn {
    align-self: flex-start;
}

.gallery-meta {
    padding: 12px 16px;
}

.gallery-meta p {
    font-size: 0.9rem;
}

.featured-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 6px;
    background: var(--accent);
    color: #4d3a00;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.gallery-item {
    position: relative;
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 640px) {
    .gallery-item img {
        height: auto;
        aspect-ratio: 3 / 4;
    }
}

.gallery-caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 16px;
    color: #fff;
    font-weight: 700;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

.gallery-empty {
    text-align: center;
    color: var(--muted);
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

/* ===== Team section ===== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.team-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s ease;
}

.team-card:hover {
    transform: translateY(-2px);
}

.team-card h3 {
    font-size: 1.15rem;
    margin: 12px 0 4px;
    color: var(--primary-dark);
}

.team-role {
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 6px;
}

.team-photo {
    width: 100%;
    max-width: 170px;
    margin: 0 auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: calc(var(--radius) - 4px);
    display: block;
}

.team-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: var(--bg);
    border: 2px dashed #efe5db;
    color: var(--muted);
}

@media (max-width: 640px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.about-home {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.about-home .values-list {
    display: inline-block;
    text-align: left;
}

.about-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.about-grid-3 .about-home {
    max-width: none;
    margin: 0;
}

.about-grid-3 .about-card h2 {
    text-align: center;
}

.mini-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
}

.mini-gallery img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.mini-gallery-empty {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 0.95rem;
    text-align: center;
}

.map-card {
    display: flex;
    flex-direction: column;
}

.map-address {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.map-embed {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
    flex: 1;
    min-height: 240px;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    min-height: 240px;
    border: 0;
}

.map-directions {
    margin-top: 16px;
}

.customer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.temp-password {
    background: #fff3d6;
    border: 2px dashed #e6c25a;
    border-radius: var(--radius);
    padding: 20px;
    max-width: 620px;
}

.temp-password code {
    font-weight: 800;
    color: var(--primary-dark);
}

.settings-hub-head {
    margin-bottom: 24px;
}

.settings-hub-head h1 {
    margin: 0 0 4px;
    color: var(--primary-dark);
}

.settings-hub {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.settings-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 20px;
    text-align: left;
    font: inherit;
    color: inherit;
    background: var(--card-bg);
    border: 1px solid #efe5db;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.settings-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(51, 40, 43, .12);
}

.settings-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.settings-card-icon {
    color: var(--primary);
    margin-bottom: 6px;
}

.settings-card-icon svg {
    display: block;
    width: 26px;
    height: 26px;
}

.settings-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.settings-card-desc {
    font-size: .88rem;
    line-height: 1.4;
    color: var(--muted);
}

.settings-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    min-width: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    text-align: center;
}

.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
    margin-bottom: 22px;
    border-bottom: 2px solid #efe5db;
}

.settings-tab-btn {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 8px 8px 0 0;
    margin-bottom: -2px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}

.settings-tab-btn:hover {
    color: var(--primary-dark);
}

.settings-tab-btn.is-active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}

.settings-tab-link {
    display: inline-block;
    padding: 10px 14px;
    margin-bottom: -2px;
    border-bottom: 3px solid transparent;
    border-radius: 8px 8px 0 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
}

.settings-tab-link:hover {
    color: var(--primary-dark);
}

.settings-tab-link.is-active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}

.settings-log-wrap {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: auto;
    max-height: 480px;
}

.modal--wide {
    max-width: 880px;
}

.modal-divider {
    border: none;
    border-top: 1px solid #efe5db;
    margin: 20px 0;
}

.settings-subtitle {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: var(--primary-dark);
}

.modal-body input[type="time"] {
    width: auto;
    min-width: 110px;
}

.admin-actions form {
    display: inline-block;
}

.admin-actions form .btn {
    margin-right: 6px;
    margin-bottom: 4px;
}

.profile-inline-form {
    display: inline-block;
}

/* Profile tabs */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.profile-tabs {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-tab {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.profile-tab summary {
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
}

.profile-tab summary::-webkit-details-marker {
    display: none;
}

.profile-tab summary:hover {
    background: #fbf6f0;
}

.profile-tab-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-tab-title .card-icon {
    margin: 0;
}

.profile-tab-title h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-dark);
}

.profile-tab[open] summary {
    border-bottom: 2px solid #efe5db;
}

.profile-tab-chevron {
    margin-left: auto;
    width: 10px;
    height: 10px;
    border-right: 2.5px solid var(--muted);
    border-bottom: 2.5px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.profile-tab[open] .profile-tab-chevron {
    transform: rotate(225deg);
}

.profile-tab summary:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.profile-tab-body {
    padding: 24px;
}

.profile-tab-body .form {
    max-width: none;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    padding: 0;
}

@media (max-width: 860px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

.reschedule-form input[type="date"],
.reschedule-form select {
    width: auto;
    padding: 8px 10px;
    margin-right: 6px;
    border: 2px solid #efe5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

/* Chat */
.chat-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    max-height: 460px;
    overflow-y: auto;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-empty {
    margin: 0;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 72%;
}

.chat-msg.customer {
    align-self: flex-start;
}

.chat-msg.staff {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-bubble {
    padding: 10px 16px;
    border-radius: 8px;
    background: #f3e6de;
    color: var(--text);
    word-wrap: break-word;
    white-space: pre-wrap;
}

.chat-msg.staff .chat-bubble {
    background: var(--primary-dark);
    color: #fff;
}

.chat-meta {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
}

.chat-input-form {
    max-width: none;
}

.chat-input {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input textarea {
    flex: 1;
}

.chat-input .btn {
    margin-top: 0;
    white-space: nowrap;
}

.chat-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 6px;
    background: #d64545;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: middle;
}

.nav-pending-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 6px;
    background: #d97706;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 4px;
}

@media (max-width: 860px) {
    .chat-input {
        flex-direction: column;
    }

    .chat-input textarea {
        width: 100%;
    }

    .chat-input .btn {
        align-self: flex-end;
    }
}

/* Footer */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 300;
    background: var(--primary-dark);
    color: #fff;
    padding: 10px 18px;
    border-radius: 0 0 var(--radius) 0;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
}

.cal-day:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: -3px;
}

/* Responsive */
@media (max-width: 860px) {
    .hero-grid,
    .about-grid,
    .about-grid-3 {
        grid-template-columns: 1fr;
    }

    .book-layout {
        grid-template-columns: 1fr;
    }

    .book-summary {
        position: static;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        gap: 16px;
    }

    .nav-links.open {
        display: flex;
    }
}

/* ===== Hero photo ===== */
.hero-photo-wrap {
    text-align: center;
}

.hero-photo {
    max-width: 100%;
    max-height: 360px;
    width: auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: inline-block;
    animation: floaty 3s ease-in-out infinite alternate;
}

@keyframes floaty {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

/* ===== Placement badge ===== */
.placement-badge {
    display: inline-block;
    background: #e0eef2;
    color: #10395a;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.placement-badge.placement-homepage {
    background: var(--accent);
    color: #4d3a00;
}

.placement-badge.placement-shop {
    background: #e8f5e9;
    color: #14461a;
}

.placement-badge.placement-recent {
    background: #fff3e0;
    color: #5c3a00;
}

.placement-badge.placement-hidden {
    background: #eeeeee;
    color: #2c2c2c;
}

/* ===== Gallery homepage buttons ===== */
.gallery-meta form {
    display: inline-block;
    margin: 4px 6px 4px 0;
}

.gallery-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

/* ===== Admin gallery ===== */
.admin-gallery .gallery-upload-card {
    margin-bottom: 36px;
}

.admin-gallery .gallery-upload-card .form-wide {
    max-width: 880px;
}

.admin-gallery .gallery-upload-card h3 {
    margin-bottom: 16px;
}

.admin-gallery .card .form {
    max-width: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
}

.upload-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.upload-drop {
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
    background: #fbf6f0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    text-align: center;
    padding: 16px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.upload-drop:hover,
.upload-drop:focus,
.upload-drop.is-dragging {
    background: #f7ece6;
    border-color: var(--primary-dark);
    outline: none;
}

.upload-drop-icon {
    font-size: 2.4rem;
    display: block;
    margin-bottom: 8px;
}

.upload-drop p {
    margin: 4px 0;
    font-weight: 700;
    color: var(--primary-dark);
}

.upload-preview {
    max-width: 100%;
    max-height: 220px;
    border-radius: calc(var(--radius) - 4px);
    object-fit: cover;
}

.upload-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-options {
    border: none;
    padding: 0;
    margin: 4px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.upload-options legend {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.upload-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fbf6f0;
    border: 1px solid #efe5db;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.upload-option:hover {
    border-color: var(--primary);
}

.upload-option:has(input:checked) {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.upload-hint {
    font-size: 0.85rem;
    margin-top: 4px;
}

.gallery-card[hidden] {
    display: none;
}

@media (max-width: 640px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(51, 40, 43, 0.5);
    backdrop-filter: blur(2px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay[hidden],
.ctx-menu[hidden],
.week-view[hidden] {
    display: none !important;
}

.modal {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(51, 40, 43, 0.18);
    max-width: 640px;
    width: 100%;
    max-height: 82vh;
    max-height: 82dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #efe5db;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
}

.modal-body {
    padding: 8px 20px 20px;
    overflow-y: auto;
}

.day-booking-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed #efe5db;
}

.day-booking-row:last-child {
    border-bottom: none;
}

.day-booking-time {
    font-weight: 700;
    min-width: 84px;
}

.day-booking-info {
    flex: 1;
    font-size: 0.9rem;
}

.day-booking-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.day-booking-actions .btn {
    margin: 0;
}

.modal-empty {
    text-align: center;
    color: var(--muted);
    padding: 24px;
}

.dog-photo-lg { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.booking-detail-header { display: flex; align-items: center; gap: 14px; padding: 4px 0 14px; }
.booking-detail-name { margin: 0; color: var(--primary-dark); }
.booking-detail-sub { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.detail-grid { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; padding: 12px 0; border-top: 1px solid #efe5db; border-bottom: 1px solid #efe5db; font-size: 0.92rem; }
/* .detail-grid hosts full-width .detail-row blocks (each with its own label/value
   columns); spanning keeps auto-placement from squeezing every other row into the
   140px track and letter-wrapping the values. */
.detail-grid > .detail-row { grid-column: 1 / -1; }
.detail-label { color: var(--muted); }
.detail-value { font-weight: 600; }
.detail-notes, .detail-deposits { margin-top: 14px; }
.detail-section-title { font-weight: 700; color: var(--primary-dark); margin-bottom: 6px; }
.detail-notes p { margin: 0; white-space: pre-wrap; font-size: 0.92rem; }
.detail-deposits ul { margin: 0; padding-left: 18px; font-size: 0.92rem; }

.booking-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 2px 0 12px;
}

.booking-more {
    position: relative;
    display: inline-block;
}

.booking-more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.booking-more-toggle .admin-dropdown-caret {
    transition: transform 0.15s ease;
}

.booking-more-toggle[aria-expanded="true"] .admin-dropdown-caret {
    transform: rotate(180deg);
}

.booking-more-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 200;
    min-width: 210px;
    background: #fff;
    border: 1px solid #efe4dd;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(51, 40, 43, 0.14);
    padding: 6px;
}

.booking-more-item {
    appearance: none;
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    font: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    white-space: nowrap;
}

.booking-more-item:hover {
    background: #f7ece6;
    color: var(--primary-dark);
}

.booking-more-item--danger {
    color: #d64545;
}

.booking-more-item--danger:hover {
    background: #fbe1e1;
    color: #b53030;
}

/* ===== Context menu ===== */
.ctx-menu {
    position: fixed;
    z-index: 300;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(51, 40, 43, 0.16);
    padding: 6px;
    min-width: 180px;
}

.ctx-menu-item {
    display: block;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text);
    cursor: pointer;
}

.ctx-menu-item:hover {
    background: #f7ece6;
}

/* ===== Calendar closed / drag states ===== */
.cal-day-closed {
    background: repeating-linear-gradient(45deg, rgba(196, 129, 143, 0.06) 0 10px, transparent 10px 20px);
}

.cal-closed-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 6px;
    background: #fbe1e1;
    color: #d64545;
    font-size: 0.68rem;
    font-weight: 700;
}

.cal-day-drop {
    outline: 3px dashed var(--primary);
    outline-offset: -3px;
    background: #f7ece6;
}

.cal-book-dragging {
    opacity: 0.4;
}

/* ===== Calendar booking status colors ===== */
.cal-book-pending {
    border-left-color: #f0b429;
    background: #fff9e8;
}

.cal-book-confirmed {
    border-left-color: #2e9e5b;
    background: #eefaf2;
}

.cal-book-cancelled {
    border-left-color: #d64545;
    background: #fdf0f0;
}

.cal-book-completed {
    border-left-color: #4f46e5;
    background: #f0f1fe;
}

.cal-day {
    cursor: pointer;
}

/* ===== Week view ===== */
.week-view {
    margin-top: 20px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    overflow-x: auto;
    min-width: 720px;
}

.week-day {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    min-height: 160px;
}

.week-day-head {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary-dark);
    margin-bottom: 10px;
    border-bottom: 2px solid #efe5db;
    padding-bottom: 6px;
}

.week-book {
    font-size: 0.8rem;
    padding: 4px 6px;
    margin-bottom: 6px;
    background: #faf5ef;
    border-left: 3px solid var(--secondary);
    border-radius: 4px;
}

.week-book a {
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: none;
}

.week-nav {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.calendar-nav-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.week-day-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.cal-more {
    cursor: pointer;
}

/* ===== Calendar hint ===== */
.calendar-hint {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 12px;
}

/* ===== Admin booking form ===== */
.admin-toolbar h2 {
    margin: 0;
}

/* ===== Size table ===== */
.section-subtitle {
    text-align: center;
    color: var(--muted);
    margin: -24px 0 32px;
    font-size: 1.05rem;
}

.table-wrap {
    max-width: 860px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    overflow-x: auto;
}

.size-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.size-table thead th {
    font-family: 'Fraunces', serif;
    font-size: 1.05rem;
    color: var(--primary-dark);
    padding: 14px 12px;
    border-bottom: 2px solid var(--primary);
}

.size-table tbody td {
    padding: 16px 12px;
    border-bottom: 1px dashed #efe5db;
    color: var(--text);
}

.size-table tbody tr:last-child td {
    border-bottom: none;
}

.size-table tbody tr:hover {
    background: var(--bg);
}

.size-label {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    color: var(--primary-dark);
}

.size-price {
    font-weight: 700;
    color: var(--primary-dark);
}

.size-note {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 20px;
}

.size-reference {
    max-width: 860px;
    margin: 16px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    justify-content: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.size-reference p {
    margin: 0;
}

/* ===== Service manager (settings) ===== */
.settings-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.settings-section-head h3 {
    margin-bottom: 2px;
}

.settings-section-head p {
    margin: 0;
}

.svc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.svc-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.svc-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.svc-card-head h3 {
    flex: 1;
    margin: 0;
    font-size: 1.1rem;
}

.svc-card-head .status-badge {
    white-space: nowrap;
}

.svc-desc {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

.svc-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.svc-price {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    background: #f7ece6;
    border: 1px solid #efe5db;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.svc-price b {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.svc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.svc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.svc-actions form {
    margin: 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--primary-dark);
    font-size: 1rem;
    line-height: 1;
}

.btn-icon:disabled,
.btn-icon:disabled:hover {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.svc-card-inactive {
    opacity: 0.7;
}

/* ===== Notifications (settings) ===== */
.notif-intro {
    max-width: 60ch;
    margin-bottom: 16px;
}

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notif-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 16px;
    border: 1px solid #efe5db;
    border-radius: 10px;
    background: var(--card-bg, #fff);
}

.notif-row.is-on {
    border-color: #e7c9b7;
}

.notif-info {
    min-width: 0;
}

.notif-info h4 {
    margin: 0 0 2px;
    font-size: 1rem;
}

.notif-info p {
    margin: 0;
}

.notif-recipient {
    margin-top: 4px !important;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary-dark);
}

.notif-recipient-help {
    margin-top: 1px !important;
    font-size: 0.82rem;
}

.notif-controls {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

.notif-switch-form {
    margin: 0;
}

.notif-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    background: none;
    border: none;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
}

.notif-switch:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 8px;
}

.notif-switch-track {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #d9cec4;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.notif-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease;
}

.notif-switch.is-on {
    color: var(--primary-dark);
}

.notif-switch.is-on .notif-switch-track {
    background: var(--primary);
}

.notif-switch.is-on .notif-switch-thumb {
    transform: translateX(18px);
}

.notif-switch-state {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
}

.notif-switch.is-on .notif-switch-state {
    color: var(--primary-dark);
}

.notif-switch.is-disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.notif-coming-soon {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    background: #f1eae3;
    border-radius: 999px;
    padding: 2px 8px;
}

@media (max-width: 640px) {
    .notif-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .notif-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* Service modals */
.modal-body .form {
    max-width: none;
    padding: 0;
    box-shadow: none;
    background: transparent;
}

.form-hint {
    font-size: 0.82rem;
    margin-top: 2px;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.modal-footer .btn {
    margin: 0;
}

.modal > .modal-footer {
    flex-shrink: 0;
    margin-top: 0;
    padding: 14px 20px;
    border-top: 1px solid #efe5db;
    justify-content: flex-end;
    background: #fff;
}

.form-checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding-top: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.form-checkbox input {
    width: auto;
}

/* ===== Admin responsive ===== */
@media (max-width: 860px) {
    .svc-grid {
        grid-template-columns: 1fr;
    }

    .form-row-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .week-grid {
        min-width: 720px;
    }

    .day-booking-actions {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }

    .modal {
        max-height: 90vh;
        max-height: 90dvh;
    }
}

/* ===== Admin gallery AI editor ===== */
.ai-modal .modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-original img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: var(--radius);
    background: repeating-conic-gradient(#f0f0f0 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
}

.ai-original p {
    margin: 6px 0 0;
    text-align: center;
}

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

.ai-replace {
    border-top: 1px dashed #efe5db;
    padding-top: 14px;
}

.ai-replace h4 {
    margin: 0 0 10px;
    color: var(--primary-dark);
}

.ai-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    align-items: center;
}

.ai-prompt-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.ai-prompt-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #efe5db;
    border-radius: var(--radius);
    background: #fff;
}

.ai-prompt-meta {
    flex: 1;
    min-width: 0;
}

.ai-prompt-meta strong {
    display: block;
    margin-bottom: 2px;
    color: var(--primary-dark);
}

.ai-prompt-meta span {
    display: block;
    color: #8a8178;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-replace textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.ai-status {
    border-top: 1px dashed #efe5db;
    padding-top: 14px;
}

.ai-result img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    border-radius: var(--radius);
    border: 1px solid #efe5db;
}

.ai-result-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* ===== Before/After gallery ===== */
.gallery-item.is-before img {
    transform: none;
}

.gallery-item {
    position: relative;
}

.ba-before-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: inline-block;
    background: var(--accent);
    color: #7a5a00;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    pointer-events: none;
}

.placement-badge.placement-before {
    background: #e0eef2;
    color: #0e3a61;
}

.placement-badge.placement-after {
    background: var(--accent);
    color: #4d3a00;
}

.pair-thumb {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    vertical-align: middle;
    margin-right: 4px;
    object-fit: cover;
}

.ba-modal-body {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.ba-modal-body .ba-figure {
    flex: 1 1 260px;
    min-width: 0;
    margin: 0;
    text-align: center;
}

.ba-modal-body .ba-figure img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: var(--radius);
    border: 1px solid #efe5db;
}

.ba-modal-body .ba-before-badge,
.ba-modal-body .ba-after-badge {
    position: static;
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 6px;
}

.ba-modal-body .ba-before-badge {
    background: #e0eef2;
    color: #1565c0;
}

.ba-modal-body .ba-after-badge {
    background: var(--accent);
    color: #7a5a00;
}

/* ===== Admin gallery card ===== */
.upload-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.gallery-card-media {
    position: relative;
}

.gallery-card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    pointer-events: none;
    z-index: 1;
}

.gallery-card-badges .placement-badge,
.gallery-card-badges .featured-badge {
    margin-bottom: 0;
}

.gallery-card-hover-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 1;
}

.gallery-card:hover .gallery-card-hover-actions,
.gallery-card:focus-within .gallery-card-hover-actions {
    opacity: 1;
}

@media (hover: none) {
    .gallery-card-hover-actions {
        opacity: 1;
    }
}

.gallery-card-hover-actions .btn-danger {
    background: #d64545;
    color: #fff;
}

.inline-form {
    display: inline-block;
}

.gallery-card-title {
    margin-bottom: 2px;
}

.gallery-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.gallery-control-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}

.gallery-meta .gallery-control-form {
    display: flex;
}

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

.gallery-select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #efe5db;
    border-radius: 8px;
    background: #fff;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
}

.gallery-select:focus {
    outline: none;
    border-color: var(--primary);
}

.gallery-pair-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f1e9e1;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.gallery-pair-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pair-name {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pair-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.pair-pick {
    width: 48px;
    height: 48px;
    padding: 2px;
    border: 2px solid #efe5db;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pair-pick img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.pair-pick:hover {
    border-color: var(--accent);
}

.pair-pick.is-selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(51, 40, 43, 0.25);
}

/* ===== Month mini time-grid ===== */
.cal-day { position: relative; height: 160px; overflow: hidden; padding: 0; }
.cal-day, .week-day {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
.cal-day-num { position: absolute; top: 4px; left: 8px; z-index: 2; margin: 0; }
.cal-day-body {
    position: absolute; top: 26px; left: 4px; right: 4px; bottom: 4px;
    overflow-y: auto;
    display: flex; flex-direction: column; gap: 2px;
}
.cal-tblock {
    box-sizing: border-box; width: 100%;
    border-left: 3px solid var(--secondary);
    border-radius: 0 3px 3px 0; padding: 1px 4px;
    font-size: 0.7rem; line-height: 1.25;
    cursor: pointer;
    position: relative;
}
.cal-tblock::before {
    content: ''; position: absolute;
    top: 100%; left: -3px;
    width: 3px; height: 2px;
    background: var(--secondary);
}
.cal-tblock:last-child::before { display: none; }
.cal-tblock.cal-book-pending { background: #fff9e8; border-left-color: #f0b429; }
.cal-tblock.cal-book-pending::before { background: #f0b429; }
.cal-tblock.cal-book-confirmed { background: transparent; border-left-color: #2e9e5b; }
.cal-tblock.cal-book-confirmed::before { background: #2e9e5b; }
.cal-tblock.cal-book-cancelled { background: transparent; border-left-color: #d64545; }
.cal-tblock.cal-book-cancelled::before { background: #d64545; }
.cal-tblock.cal-book-completed { background: #f0f1fe; border-left-color: #4f46e5; }
.cal-tblock.cal-book-completed::before { background: #4f46e5; }
.cal-tblock.cal-book-short { background: #e0eef2; border-left-color: #0e7490; }
.cal-tblock.cal-book-short::before { background: #0e7490; }
.cal-tblock-text {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.cal-tblock-text.cal-has-balance {
    padding-right: 44px;
    box-sizing: border-box;
}
.cal-tblock .cal-balance-tag {
    position: absolute;
    top: 50%;
    right: 2px;
    transform: translateY(-50%);
    margin-left: 0;
    padding: 0 4px;
    font-size: 0.62rem;
}
.cal-day-off-row { position: static; display: flex; gap: 2px; pointer-events: none; }
.cal-day-off-chip {
    display: inline-block; background: #fbe1e1; color: #d64545;
    border-radius: 6px; padding: 0 6px; font-size: 0.6rem; font-weight: 700;
}
.week-day-off { display: block; margin-top: 4px; font-size: 0.68rem; color: #d64545; font-weight: 700; }

/* ===== Day view ===== */
.day-view { margin-top: 20px; }
.day-nav { display: flex; gap: 12px; justify-content: center; align-items: center; margin-bottom: 16px; }
.day-nav h3 { margin: 0; }
.day-banner { text-align: center; padding: 40px; background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--muted); font-weight: 700; }
.day-off-line { margin-top: 8px; }
.day-sched-wrap { border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.day-grid { display: flex; background: var(--card-bg); border-radius: 0; box-shadow: none; overflow: auto; max-height: calc(100vh - 280px); padding-top: 12px; }
.day-view.day-view-fill .day-grid { height: calc(100vh - 280px); min-height: 320px; }
.day-time-axis { width: 64px; position: relative; border-right: 1px solid #f1e9e1; }
.day-hour-label {
    position: absolute; right: 8px; transform: translateY(-50%);
    font-size: 0.68rem; font-weight: 700; color: var(--muted);
    white-space: nowrap;
}
.day-lanes { position: relative; flex: 1; min-width: 0; }
.day-lane { position: absolute; top: 0; height: 100%; }
.day-lane + .day-lane { border-left: 1px dashed #f1e9e1; }
.day-head-row { display: flex; background: var(--card-bg); border-bottom: 2px solid #efe5db; height: 28px; }
.day-head-spacer { width: 64px; flex: none; }
.day-head-lanes { position: relative; flex: 1; min-width: 0; }
.day-head-cell {
    position: absolute; top: 0; bottom: 0; box-sizing: border-box;
    padding: 0 8px; font-size: 0.72rem; font-weight: 700; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 26px;
}
.day-head-cell + .day-head-cell { border-left: 1px dashed #f1e9e1; }
.day-gridlines {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(to bottom, transparent 0 calc(48px - 1px), #f1e9e1 calc(48px - 1px) 48px);
}
.day-block {
    position: absolute; box-sizing: border-box; border-left: 3px solid var(--secondary);
    border-radius: 4px; padding: 2px 6px; font-size: 0.72rem; line-height: 1.3;
    overflow: hidden; cursor: pointer;
    z-index: 2;
}
.day-block.cal-book-pending { background: #fff9e8; border-left-color: #f0b429; }
.day-block.cal-book-confirmed { background: #eefaf2; border-left-color: #2e9e5b; }
.day-block.cal-book-cancelled { background: transparent; border-left-color: #d64545; }
.day-block.cal-book-completed { background: #f0f1fe; border-left-color: #4f46e5; }

/* ===== Context menu day-off picker ===== */
.ctx-menu-note {
    display: block;
    padding: 6px 14px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: #fdf3e7;
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ctx-menu-back { color: var(--muted); font-size: 0.78rem; }
.ctx-menu-picker-list { max-height: 260px; overflow-y: auto; }
.ctx-menu-empty { padding: 8px 14px; }
.ctx-menu-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.ctx-menu-check input[type="checkbox"] {
    margin: 0;
    flex: none;
    width: 16px;
    height: 16px;
    accent-color: #d64545;
}
.ctx-menu-check-text { font-weight: 700; font-size: 0.88rem; }
.ctx-menu-item.ctx-menu-day-off-on { color: #d64545; }
.ctx-menu-apply {
    margin-top: 4px;
    border-top: 1px solid #efe5db;
    border-radius: 8px;
    color: var(--primary-dark);
}

/* ===== Calendar help modal ===== */
.cal-help-title { font-weight: 700; color: var(--primary-dark); margin: 14px 0 4px; }
.cal-help-title:first-child { margin-top: 0; }
.cal-help-list { margin: 4px 0 14px; padding-left: 18px; }
.cal-help-list li { margin: 3px 0; font-size: 0.9rem; }

/* ===== Calendar multi-day selection ===== */
.cal-day-selected {
    box-shadow: inset 0 0 0 3px var(--primary);
    background: #fdf3e7;
}

.gallery-control-check {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 2px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
}

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

/* ===== Calendar side panel layout ===== */
.calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
}

.calendar-main {
    min-width: 0;
}

.calendar-side {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.calendar-side-title {
    margin: 0;
    color: var(--primary-dark);
    font-size: 1.3rem;
    line-height: 1.2;
}

/* Input-appropriate tip: touch devices see long-press wording. */
.calendar-tip--touch { display: none; }
@media (hover: none) {
    .calendar-tip--mouse { display: none; }
    .calendar-tip--touch { display: block; }
}

/* Loading state for AJAX-refreshed calendar views. */
.calendar-grid.is-loading,
.week-view.is-loading,
.day-view.is-loading {
    opacity: 0.55;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.calendar-side .calendar-nav-group {
    width: 100%;
}

.calendar-side .calendar-nav-group .btn,
.calendar-side .view-switch .btn {
    flex: 1;
    justify-content: center;
    text-align: center;
}

.calendar-side .view-switch {
    width: 100%;
}

.calendar-side .btn-primary {
    width: 100%;
    text-align: center;
}

.calendar-side .calendar-groomer-filter {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calendar-side .calendar-groomer-filter select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e7d8cc;
    border-radius: 8px;
    font: inherit;
    background: #fff;
}

.calendar-side .calendar-groomer-filter .btn {
    width: 100%;
    text-align: center;
}

@media (max-width: 1100px) {
    .calendar-layout {
        grid-template-columns: 1fr;
    }
    .calendar-side {
        position: static;
        order: -1;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    .calendar-side-title {
        flex: 1 1 100%;
    }
    .calendar-side .calendar-nav-group,
    .calendar-side .view-switch,
    .calendar-side .calendar-groomer-filter {
        flex: 1 1 auto;
        width: auto;
    }
    .calendar-side .btn-primary {
        width: auto;
    }
}

/* ===== Segmented control (admin gallery) ===== */
.seg {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 3px;
    background: #f3e6de;
    border-radius: 6px;
}

.seg-btn {
    border: none;
    background: transparent;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.seg-btn:hover { color: var(--text); }
.seg-btn.is-active { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 3px rgba(51, 40, 43, 0.15); }

.seg-upload { width: 100%; }
.seg-upload .seg-btn { flex: 1; text-align: center; }

/* ===== Featured toggle (admin gallery) ===== */
.featured-toggle {
    padding: 4px 8px;
    border: 1px solid #efe5db;
    border-radius: 8px;
    background: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    align-self: flex-start;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.featured-toggle:hover { border-color: var(--accent); }
.featured-toggle.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #4d3a00;
}

/* ===== Toasts ===== */
.toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 340px;
}

.toast {
    padding: 12px 16px;
    border-radius: 6px;
    background: #33282b;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    animation: toast-in 0.2s ease;
}

.toast-error { background: #d64545; }
.toast-success { background: #2e9e5b; }
.toast-alert { background: #b45309; cursor: default; }
.toast-alert .toast-alert-link {
    color: #fff;
    text-decoration: underline;
    font-weight: 700;
    margin-left: 8px;
    white-space: nowrap;
}
.toast.is-leaving { opacity: 0; transform: translateY(-6px); }

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

/* ===== Network status banner ===== */
.net-status {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    max-width: 320px;
    padding: 12px 16px;
    border-radius: 6px;
    background: #33282b;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transform: translateX(120%);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.net-status:not([hidden]) { transform: translateX(0); }
.net-status.is-offline { background: #d64545; }
.net-status.is-online { background: #2e9e5b; }
.net-status.is-leaving { opacity: 0; transform: translateX(120%); }

/* ===== Pair block (admin gallery) ===== */
.pair-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.pair-link-btn { align-self: flex-start; }

/* ===== Calendar drag & now-line ===== */
.week-day-drop {
    outline: 3px dashed var(--primary);
    outline-offset: -3px;
    background: #f7ece6;
}

.day-lane-drop {
    background: #f7ece6;
}

.day-now-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0245e;
    z-index: 1;
    pointer-events: none;
}

.day-now-line::after {
    content: '';
    position: absolute;
    left: -4px;
    top: -4px;
    width: 9px;
    height: 9px;
    background: #e0245e;
    border-radius: 50%;
}

/* ===== Upload wizard ===== */
.wizard-question {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 14px;
}

.wizard-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wizard-choice {
    min-width: 110px;
}

.wizard-steps {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 0;
}

.wizard-step-ind {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.wizard-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #efe5db;
    border: 2px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.wizard-dot-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: capitalize;
    color: #c9beb6;
    transition: color 0.2s ease;
}

.wizard-dot.is-active {
    background: var(--primary);
}

.wizard-step-ind.is-passed .wizard-dot {
    background: var(--primary-dark);
}

.wizard-step-ind.is-passed .wizard-dot-label {
    color: var(--primary-dark);
}

.wizard-step-ind.is-active .wizard-dot {
    background: var(--primary);
    border-color: var(--primary);
    animation: dot-pulse 2.2s ease-in-out infinite;
}

.wizard-step-ind.is-active .wizard-dot-label {
    color: var(--primary-dark);
}

@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(196, 129, 143, 0.18); }
    50% { box-shadow: 0 0 0 7px rgba(196, 129, 143, 0.06); }
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.wizard-error {
    margin-top: 10px;
    color: #d64545;
    font-weight: 700;
}

.wizard-link-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

#wizardLinkPicker {
    display: block;
}

.dog-photo-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }

/* Upload wizard fade + modal animations */
.upload-fade {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.upload-fade.is-visible {
    opacity: 1;
}

@keyframes wizard-in {
    from { opacity: 0; transform: translateY(28px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wizard-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(28px) scale(0.96); }
}

#upload_wizard_modal.modal-overlay {
    background: transparent;
    backdrop-filter: none;
}

#upload_wizard_modal .modal {
    animation: wizard-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
    will-change: transform, opacity;
}

#upload_wizard_modal.is-closing {
    pointer-events: none;
}

#upload_wizard_modal.is-closing .modal {
    animation: wizard-out 0.28s ease both;
}

/* Wizard step transitions */
.wizard-step {
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.wizard-step.is-fading-out {
    opacity: 0;
    transform: translateY(-10px);
}

@keyframes step-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-step.is-fading-in {
    animation: step-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ===== Booking wizard (customer) ===== */
#booking_wizard_modal.modal-overlay {
    background: transparent;
    backdrop-filter: none;
}

#booking_wizard_modal .modal {
    animation: wizard-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
    will-change: transform, opacity;
}

#booking_wizard_modal.is-closing {
    pointer-events: none;
}

/* ===== Save-for-later confirmation modal ===== */
#saveDraftModal .modal {
    animation: wizard-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
    will-change: transform, opacity;
}

#saveDraftModal.is-closing {
    pointer-events: none;
}

#saveDraftModal.is-closing .modal {
    animation: wizard-out 0.28s ease both;
}

#booking_wizard_modal.is-closing .modal {
    animation: wizard-out 0.28s ease both;
}

/* ===== Before/After viewer modal ===== */
#baModal.modal-overlay {
    background: transparent;
    backdrop-filter: none;
}

#baModal .modal {
    animation: wizard-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
    will-change: transform, opacity;
}

#baModal.is-closing {
    pointer-events: none;
}

#baModal.is-closing .modal {
    animation: wizard-out 0.28s ease both;
}

/* ===== Generic white-fade modal (site-wide) ===== */
.modal-overlay.fade-modal {
    background: transparent;
    backdrop-filter: none;
}
.fade-modal .modal {
    animation: wizard-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
    will-change: transform, opacity;
}
.fade-modal.is-closing {
    pointer-events: none;
}
.fade-modal.is-closing .modal {
    animation: wizard-out 0.28s ease both;
}

#booking_wizard_modal .form {
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: none;
}

#booking_wizard_modal .wizard-footer {
    justify-content: space-between;
}

#booking_wizard_modal .book-summary {
    position: static;
    top: auto;
}

#booking_wizard_modal .wizard-footer-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.book-trigger-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.book-trigger-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
    border-radius: var(--radius) var(--radius) 0 0;
}

.book-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f7ece6, #fdf3ea);
    color: var(--primary-dark);
    margin-bottom: 16px;
}

.book-trigger-icon svg {
    width: 30px;
    height: 30px;
}

.book-trigger-card h2 {
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.book-trigger-card p {
    margin: 0 0 22px;
    color: var(--muted);
}

.btn-lg {
    font-size: 1.05rem;
    padding: 14px 34px;
}

.bk-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.bk-cal-head h4 {
    margin: 0;
    color: var(--primary-dark);
}

.bk-cal-nav-btn {
    background: #f7ece6;
    border: 1px solid #efe5db;
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--text);
}

.bk-cal-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.bk-cal-weekdays,
.bk-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.bk-cal-weekdays {
    background: #f7ece6;
    border-bottom: 2px solid #efe5db;
}

.bk-cal-weekday {
    padding: 10px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.bk-cal-days {
    border: 1px solid #f1e9e1;
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}

.bk-cal-day {
    position: relative;
    min-height: 56px;
    padding: 8px 6px;
    border-right: 1px solid #f1e9e1;
    border-bottom: 1px solid #f1e9e1;
    text-align: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.bk-cal-day:nth-child(7n) {
    border-right: none;
}

.bk-cal-day-out {
    background: #faf7f4;
    cursor: default;
}

.bk-cal-day-num {
    display: inline-block;
    min-width: 24px;
    padding: 2px 0;
    font-weight: 700;
}

.bk-cal-today .bk-cal-day-num {
    background: var(--primary-dark);
    color: #fff;
    border-radius: 50%;
}

.bk-cal-day.is-available:hover,
.bk-cal-day.is-available:focus-visible {
    background: #fdf3ea;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(51, 40, 43, 0.08);
    z-index: 2;
    outline: none;
}

.bk-cal-day.is-available:hover .bk-cal-day-num,
.bk-cal-day.is-available:focus-visible .bk-cal-day-num {
    color: var(--primary-dark);
    font-weight: 800;
}

.bk-cal-day.is-selected {
    background: var(--primary);
}

.bk-cal-day.is-selected .bk-cal-day-num {
    color: #fff;
    font-weight: 800;
}

.bk-cal-day.is-unavailable {
    background: #faf7f4;
    color: #c9beb6;
    cursor: not-allowed;
}

.bk-cal-day.is-unavailable.reason-full {
    background: #fdf3ea;
    color: #b39483;
}

.bk-cal-day.is-unavailable .bk-cal-day-num {
    opacity: 0.6;
}

.bk-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--muted);
}

.bk-cal-legend span::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 5px;
}

.bk-cal-legend .lg-avail::before {
    background: var(--primary);
}

.bk-cal-legend .lg-closed::before {
    background: #c9beb6;
}

.bk-cal-legend .lg-full::before {
    background: #f0d9c9;
}

.bk-time-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.bk-time-chip {
    padding: 8px 14px;
    border: 2px solid #efe5db;
    border-radius: 20px;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.bk-time-chip:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(196, 129, 143, 0.2);
}

.bk-time-chip.is-selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(196, 129, 143, 0.35);
}

.bk-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 4px;
}

.bk-select-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 4px;
    padding: 16px;
    background: var(--card-bg);
    border: 2px solid #efe5db;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.bk-select-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.bk-select-card.is-selected {
    border-color: var(--primary);
    background: #fdf3ea;
    box-shadow: 0 4px 12px rgba(196, 129, 143, 0.2);
}

.bk-card-name {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1rem;
}

.bk-card-sub {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.35;
}

.bk-card-price {
    margin-top: 4px;
    font-weight: 800;
    color: var(--primary);
    font-size: 0.95rem;
}

.addon-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding: 8px 10px;
    border: 1px solid #efe5db;
    border-radius: var(--radius);
    background: var(--card-bg);
}

.bk-groomer-grid {
    grid-template-columns: repeat(3, 1fr);
}

.bk-groomer-card {
    align-items: center;
    text-align: center;
}

.bk-card-photo {
    width: 100%;
    max-width: 120px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 8px;
}

.bk-card-photo-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 2px dashed #efe5db;
    color: var(--muted);
    font-size: 2.2rem;
}

.bk-card-role {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

/* Dog-size tier card selector */
.bk-size-grid {
    grid-template-columns: repeat(4, 1fr);
}

.bk-size-card {
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 14px 10px;
}

.bk-size-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    color: var(--primary);
    line-height: 0;
}

.bk-size-icon svg {
    width: 24px;
    height: 24px;
}

.bk-size-icon.is-s svg {
    width: 18px;
    height: 18px;
}

.bk-size-icon.is-m svg {
    width: 26px;
    height: 26px;
}

.bk-size-icon.is-l svg {
    width: 34px;
    height: 34px;
}

.bk-size-icon.is-xl svg {
    width: 44px;
    height: 44px;
}

.bk-size-card .bk-card-name {
    font-size: 0.9rem;
}

.bk-size-card .bk-card-sub {
    font-size: 0.75rem;
}

.bk-size-card.is-selected .bk-size-icon {
    color: var(--primary-dark);
}

.bk-size-grid.is-locked .bk-size-card {
    cursor: default;
}

.bk-size-grid.is-locked .bk-size-card:not(.is-selected) {
    opacity: 0.45;
}

.bk-size-grid.is-locked .bk-size-card:hover {
    transform: none;
    border-color: #efe5db;
}

.bk-size-grid.is-locked .bk-size-card.is-selected:hover {
    border-color: var(--primary);
}

.bk-size-grid.field-error {
    outline: 2px solid #d64545;
    outline-offset: 3px;
    border-radius: var(--radius);
}

/* Repeat cadence card selector */
.bk-recur-grid {
    grid-template-columns: repeat(4, 1fr);
}

.bk-recur-card {
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 14px 8px;
}

.bk-recur-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    color: var(--primary);
    line-height: 0;
}

.bk-recur-icon svg {
    width: 22px;
    height: 22px;
}

.bk-recur-card .bk-card-name {
    font-size: 0.85rem;
}

.bk-recur-card .bk-card-sub {
    font-size: 0.72rem;
}

.bk-recur-card.is-selected .bk-recur-icon {
    color: var(--primary-dark);
}

@media (max-width: 640px) {
    .bk-card-grid {
        grid-template-columns: 1fr;
    }
    .bk-groomer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bk-size-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bk-recur-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

[hidden] {
    display: none !important;
}

/* ===== Cross-document page transitions ===== */
@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: page-out 0.35s ease-out both;
}

::view-transition-new(root) {
    animation: page-in 0.35s ease-out both;
}

@keyframes page-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-30px); }
}

@keyframes page-in {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

::view-transition-old(site-header),
::view-transition-new(site-header) {
    animation: none;
}

/* ===== Scroll reveal ===== */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.in-view {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0.01ms;
    }

    .js .reveal,
    .js .reveal.in-view {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .wizard-step,
    .wizard-step.is-fading-out,
    .wizard-step.is-fading-in,
    #booking_wizard_modal .modal,
    #booking_wizard_modal.is-closing .modal,
    #upload_wizard_modal .modal,
    #upload_wizard_modal.is-closing .modal,
    #baModal .modal,
    #baModal.is-closing .modal,
    .fade-modal .modal,
    .fade-modal.is-closing .modal,
    .wizard-dot,
    .wizard-step-ind.is-active .wizard-dot,
    .bk-cal-day,
    .bk-time-chip {
        animation: none;
        transition: none;
    }

    .wizard-step-ind.is-active .wizard-dot {
        box-shadow: none;
    }
}

html.js.js-swap .reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

.logo-bubble svg {
    width: 26px;
    height: 26px;
}

.card-icon svg,
.emoji-paw svg,
.team-photo-placeholder svg,
.upload-drop-icon svg {
    width: 1em;
    height: 1em;
}

.btn svg,
.contact-icon,
.svc-duration-line svg,
.svc-meta svg,
.nav-toggle svg {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
}

.logo-bubble svg,
.nav-toggle svg,
.card-icon svg,
.emoji-paw svg,
.team-photo-placeholder svg,
.contact-icon,
.upload-drop-icon svg,
.svc-meta svg,
.svc-duration-line svg {
    color: var(--text);
}

.page-footer {
    background: var(--text);
    color: #fff;
    margin-top: 0;
    padding: 28px 0 34px;
}

.page-footer-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.page-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    justify-content: center;
}

.page-footer-links a {
    color: #f3e9e2;
    text-decoration: none;
    font-size: 0.92rem;
}

.page-footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.page-footer-copy {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
}

.policy-prose h2 {
    font-size: 1.35rem;
    margin-top: 1.2rem;
}

.policy-prose h2:first-child {
    margin-top: 0;
}

.policy-prose p {
    max-width: 72ch;
}

/* Contact reveal (homepage About card) */
.contact-reveal {
    margin: 6px 0 0;
}
.contact-reveal-btn {
    min-width: 160px;
}
html:not(.js) .contact-reveal-hold {
    display: none;
}
html.js .contact-reveal-hold {
    max-height: 60px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease;
}
html.js .contact-reveal.is-open .contact-reveal-hold {
    max-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}
html.js .contact-reveal-options {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-4px);
    pointer-events: none;
    margin: 0;
    transition: max-height 0.45s ease, opacity 0.45s ease, transform 0.45s ease, margin 0.45s ease;
}
html.js .contact-reveal.is-open .contact-reveal-options {
    max-height: 160px;
    opacity: 1;
    transform: none;
    margin-top: 10px;
    pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
    .contact-reveal-hold,
    .contact-reveal-options {
        transition: none !important;
    }
}

/* ===== Admin dashboard ===== */
.dash-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Only rendered when something needs a decision. */
.dash-attention {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.dash-attention-item {
    flex: 1 1 260px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff3d6;
    border: 1px solid #efdfa8;
    border-radius: var(--radius);
    padding: 10px 14px;
    text-decoration: none;
    color: #8a6a00;
    font-size: 0.9rem;
    transition: background 0.15s ease;
}

.dash-attention-item:hover { background: #fdf0c8; }

.dash-attention-num {
    font-family: 'Fraunces', serif;
    font-size: 1.4rem;
    line-height: 1;
    color: #7a5c00;
}

.dash-attention-text { flex: 1 1 auto; font-weight: 600; }

.dash-attention-go {
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Today's groomer board: a column per groomer, side by side so a busy day
   fits without scrolling. */
.dash-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 14px;
    align-items: start;
}

.dash-board-col {
    min-width: 0;
    background: #fdf9f4;
    border: 1px solid #f2e7dc;
    border-radius: 10px;
    padding: 10px 12px;
}

.dash-board-col.is-unassigned {
    background: #fff8ef;
    border-color: #efd9bf;
}

.dash-board-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid #efe5db;
}

.dash-board-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-board-col.is-unassigned .dash-board-name { color: #a2601a; }

.dash-board-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
}

/* Board rows live in narrow columns: let them wrap and give the time its
   natural width instead of the 74px list gutter. */
.dash-board .dash-slot-link { flex-wrap: wrap; gap: 3px 8px; }
.dash-board .dash-slot-when { flex: 0 0 auto; }

.dash-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    gap: 0 22px;
    align-items: start;
}

.dash-panel {
    background: var(--card-bg);
    border: 1px solid #efe5db;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 22px;
}

.dash-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-bottom: 8px;
}

.dash-panel-title {
    font-size: 1.2rem;
    color: var(--primary-dark);
}

.dash-panel-count {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dash-panel-link {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: none;
}

.dash-panel-link:hover { text-decoration: underline; }

.dash-group + .dash-group { margin-top: 4px; }

.dash-group-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text);
    margin: 10px 0 2px;
    padding-bottom: 4px;
    border-bottom: 1px dashed #eadfd5;
}

.dash-group-count {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.dash-slots {
    list-style: none;
    margin: 0;
}

.dash-slot { border-bottom: 1px solid #f5eee7; }

.dash-slot:last-child { border-bottom: none; }

.dash-slot-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 6px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
}

.dash-slot-link:hover { background: rgba(196, 129, 143, 0.07); }

.dash-slot-when {
    flex: 0 0 74px;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.dash-slot-time {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dash-slot-date {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
}

.dash-slot-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.dash-slot-dog {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-slot-meta {
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-empty {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 8px 6px 4px;
}

.dash-month { margin-bottom: 22px; }

.dash-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    margin: 6px 0 14px;
    background: #efe5db;
    border: 1px solid #efe5db;
    border-radius: var(--radius);
    overflow: hidden;
}

.dash-kpi {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    padding: 8px 14px;
    background: #fdf9f4;
    text-decoration: none;
    color: var(--text);
}

.dash-kpi-link { transition: background 0.15s ease; }

.dash-kpi-link:hover { background: #fff; }

.dash-kpi-value {
    font-family: 'Fraunces', serif;
    font-size: 1.05rem;
    line-height: 1.2;
    color: var(--primary-dark);
}

.dash-kpi-label {
    font-size: 0.68rem;
    color: var(--muted);
    font-weight: 600;
}

.dash-month-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 26px;
}

.dash-subhead {
    font-size: 0.85rem;
    margin: 0 0 8px;
    color: var(--text);
}

.dash-subhead .admin-muted { font-weight: 400; }

.dash-status-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dash-status-links a {
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    border: 1px solid #efe5db;
    border-radius: 999px;
    padding: 4px 12px;
    background: var(--card-bg);
}

.dash-status-links a strong { color: var(--primary-dark); margin-left: 4px; }

.dash-status-links a:hover { border-color: var(--primary); }

.dash-top-services ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-top-services li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.85rem;
    border-bottom: 1px dashed #efe5db;
    padding-bottom: 4px;
}

.dash-top-services li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dash-top-name { font-weight: 700; }

.dash-top-meta {
    color: var(--muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    /* Once the KPI row wraps, drop the single-bar dividers for compact cards
       so a partly-filled last row doesn't show an empty divider block. */
    .dash-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        background: transparent;
        border: none;
        overflow: visible;
    }
    .dash-kpi {
        border: 1px solid #efe5db;
        border-radius: var(--radius);
    }
    .dash-kpi-link:hover { border-color: var(--primary); }
    .dash-month-bottom { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
    .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-attention-item { flex-basis: 100%; }
    .dash-slot-link { flex-wrap: wrap; gap: 4px 12px; }
    .dash-slot-when { flex: 1 0 100%; }
}

/* ===== Dashboard: tap a schedule row -> quick options ===== */
.dash-slot-link { transition: opacity 150ms ease; }
.dash-slot.is-open { background: #fdf9f5; border-radius: 8px; box-shadow: inset 0 0 0 1px #f0e3d6; }
.dash-slot.is-open .dash-slot-link { opacity: 0; }

.dash-slot-badges {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dash-slot-actions { padding: 10px 6px 8px; }
.dash-slot-actions[hidden] { display: none !important; }

.dash-actions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}
.dash-actions-title { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.dash-actions-chips { display: inline-flex; gap: 4px; }
.dash-actions-grid { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dash-actions-grid .btn { margin: 0; }

@keyframes dashActionsIn {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: none; }
}

/* ===== Customer-present modal ===== */
#customerHereModal .modal { max-width: 900px; }
.modal-loading { color: var(--muted); padding: 18px 4px; margin: 0; text-align: center; }

.cust-head { display: flex; gap: 14px; align-items: center; padding: 10px 0 14px; }
.cust-photo {
    width: 64px; height: 64px; border-radius: 10px; object-fit: cover;
    flex-shrink: 0; background: #f4ece3;
}
.cust-photo-fallback {
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; font-weight: 800; color: var(--primary);
    background: #f9e9de;
}
.cust-head-main { min-width: 0; }
.cust-name { font-size: 1.12rem; font-weight: 800; color: var(--primary-dark); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cust-chips { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }

.cust-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}
.cust-col { min-width: 0; }

.cust-detail-grid { padding: 8px 0 2px; border-top: 1px solid #efe5db; }
.detail-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 4px 10px;
    padding: 5px 0;
    border-bottom: 1px dashed #f2e7dc;
    font-size: 0.9rem;
    align-items: baseline;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--muted); }
.detail-value { font-weight: 600; word-break: break-word; }
.cust-notes { white-space: pre-wrap; font-weight: 400; color: var(--text); }

.cust-section { margin: 14px 0 0; }
.cust-section h4 { margin: 0 0 8px; color: var(--primary-dark); }
.cust-section[hidden] { display: none !important; }

.cust-checkin-btn { font-size: 0.98rem; padding: 10px 14px; }
.cust-hint { margin: 6px 0 0; font-size: 0.78rem; }
.cust-arrived-line { margin: 2px 0 6px; }
.cust-action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cust-action-row .btn { margin: 0; }
.cust-links { border-top: 1px dashed #efe5db; padding-top: 10px; }

.cust-pay-col { background: #fdf9f4; border: 1px solid #efe5db; border-radius: 10px; padding: 14px; }
.cust-pay-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cust-pay-head h4 { margin: 0; color: var(--primary-dark); }
.cust-balance { font-weight: 800; color: var(--primary-dark); }
.cust-pay-totals { border-top: 1px dashed #e7d9ca; padding-top: 6px; }
.cust-pay-line { display: flex; justify-content: space-between; gap: 10px; font-size: 0.9rem; padding: 3px 0; }
.cust-pay-line span:last-child { font-weight: 700; }
.cust-pay-list { list-style: none; margin: 6px 0 0; padding: 0; }
.cust-pay-list li {
    display: flex; justify-content: space-between; gap: 10px;
    font-size: 0.85rem; padding: 3px 0; color: var(--text);
}
.cust-pay-list li span:last-child { font-weight: 700; }
.cust-pay-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

.btn-block { display: block; width: 100%; text-align: center; box-sizing: border-box; }

.cust-manual-pay { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e7d9ca; }
.cust-manual-pay[hidden] { display: none !important; }
.cust-manual-pay .btn { margin-top: 8px; }
.cust-helcim-pay { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e7d9ca; }
.cust-helcim-pay[hidden] { display: none !important; }

.cust-move-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; margin-bottom: 10px; align-items: end; }
.cust-move-row label {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 0.78rem; font-weight: 700; color: var(--muted);
}
.cust-move-row input[type="date"],
.cust-move-row input[type="number"],
.cust-move-row select {
    width: 100%; box-sizing: border-box; padding: 7px 9px; font-size: 0.9rem;
    border: 1px solid #e2d6c8; border-radius: 8px; background: #fff; color: var(--text);
    font-weight: 500;
}
.cust-move-times-wrap { min-width: 0; }
.cust-move-times { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cust-time-chip {
    border: 1px solid #e2d6c8; background: #fff; color: var(--text);
    border-radius: 999px; padding: 5px 12px; font-size: 0.85rem; font-weight: 600;
    cursor: pointer;
}
.cust-time-chip:hover { border-color: var(--primary); color: var(--primary); }
.cust-time-chip.is-selected { background: var(--primary); border-color: var(--primary); color: #fff; }
[data-move-status] { margin: 0 0 2px; font-size: 0.82rem; }

.status-badge.status-arrived { background: #e0f2fe; color: #0369a1; }

@media (max-width: 760px) {
    .cust-grid { grid-template-columns: minmax(0, 1fr); }
    .cust-move-row { grid-template-columns: minmax(0, 1fr); }
    .dash-actions-head { align-items: flex-start; }
}

/* =========================================================
   Messages redesign — customer + staff
   ========================================================= */

.section--tight {
    padding: 28px 0 56px;
}

.chat-shell {
    max-width: 880px;
    margin: 0 auto;
}

/* --- Customer welcome hero --- */
.msg-hero {
    background: linear-gradient(135deg, #fbeae4 0%, #f8f0f9 55%, #eef4f8 100%);
    border: 1px solid #f2dcd3;
    border-radius: 20px;
    padding: 26px 28px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}

.msg-hero-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.msg-hero-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 2px 10px rgba(169, 106, 120, 0.18);
}

.msg-hero-icon svg {
    width: 28px;
    height: 28px;
}

.msg-hero-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-dark);
    margin: 0 0 2px;
}

.msg-hero h1 {
    font-size: 1.7rem;
    margin: 0;
    color: var(--text);
}

.msg-hero-copy {
    margin: 14px 0 0;
    color: #5d4e50;
    max-width: 60ch;
}

.msg-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 14px;
    font-size: 0.88rem;
    color: var(--muted);
}

.msg-hero-meta a {
    color: var(--muted);
}

/* --- Upcoming visit nudge --- */
.booking-nudge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #ead9d0;
    border-radius: 14px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text);
    margin-bottom: 18px;
    box-shadow: var(--shadow);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.booking-nudge:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.booking-nudge-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary);
    flex: 0 0 auto;
}

.booking-nudge-text {
    flex: 1 1 auto;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.booking-nudge-arrow {
    color: var(--primary-dark);
    font-weight: 700;
    flex: 0 0 auto;
}

/* --- Chat window chrome --- */
.chat-window,
.chat-thread-window {
    background: var(--card-bg);
    border: 1px solid #efe5db;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 18px;
}

.chat-window-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 20px 0;
}

.chat-window-title {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chat-window-sub {
    font-size: 0.85rem;
}

.chat-online-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #63b37a;
    display: inline-block;
}

/* --- The conversation --- */
.chat-box {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 16px 20px 20px;
    max-height: 520px;
    overflow-y: auto;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-msg {
    max-width: 80%;
}

.chat-bubble {
    padding: 11px 16px;
    border-radius: 18px;
    background: #f6ece6;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(51, 40, 43, 0.06);
    line-height: 1.5;
}

.chat-msg.customer .chat-bubble {
    border-bottom-left-radius: 5px;
    background: #f3e2d9;
}

.chat-msg.staff {
    align-items: flex-end;
}

.chat-msg.staff .chat-bubble {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    border-bottom-right-radius: 5px;
}

.chat-meta {
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 5px;
    padding: 0 4px;
}

.chat-msg.staff .chat-meta {
    text-align: right;
}

/* --- Empty state --- */
.chat-empty {
    margin: auto;
    text-align: center;
    padding: 26px 10px;
    max-width: 520px;
}

.chat-empty-bubble {
    background: #fdf8f4;
    border: 1px dashed #e4cfc5;
    border-radius: 18px;
    padding: 22px 20px;
}

.chat-empty-title {
    font-family: 'Fraunces', serif;
    font-size: 1.15rem;
    margin: 0 0 6px;
    color: var(--text);
}

.chat-empty-sub {
    color: var(--muted);
    font-size: 0.92rem;
    margin: 0 0 14px;
}

.chat-quickchips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.chat-quickchip {
    appearance: none;
    border: 1px solid #e7c9bd;
    background: #fff;
    color: #7d4f45;
    border-radius: 999px;
    padding: 7px 14px;
    font: inherit;
    font-size: 0.84rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-quickchip:hover {
    background: #fbeae4;
    border-color: var(--primary);
}

/* --- Composer --- */
.chat-input-form {
    max-width: none;
}

.chat-input textarea {
    border-radius: 14px;
}

.chat-input .btn {
    border-radius: 999px;
}

/* --- Shared bits: staff inbox --- */
.chat-inbox-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.chat-inbox-wrap {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #efe5db;
    box-shadow: var(--shadow);
}

.chat-inbox-table {
    margin: 0;
}

.chat-inbox-table th {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid #efe5db;
    padding: 12px 16px;
}

.chat-inbox-row td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f6ede5;
    background: #fff;
}

.chat-inbox-row--unread td {
    background: #fdf7f3;
}

.chat-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e9b7a2, var(--primary));
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chat-avatar--lg {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
}

.chat-person-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-person-name {
    font-weight: 700;
    color: var(--text);
}

.chat-person-sub {
    font-size: 0.82rem;
    color: var(--muted);
}

.chat-preview-cell {
    min-width: 260px;
}

.chat-preview {
    color: var(--muted);
    display: block;
    font-size: 0.9rem;
}

.chat-preview--unread {
    color: var(--text);
    font-weight: 600;
}

.chat-next-chip {
    display: inline-block;
    margin-top: 6px;
    background: #eef4f8;
    color: #41647c;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.75rem;
}

.chat-badge--inbox {
    font-size: 0.8rem;
}

.chat-inbox-actions-col {
    width: 190px;
}

.chat-inbox-actions-inner {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.chat-inbox-empty {
    text-align: center;
    padding: 70px 20px;
    border: 1px dashed #e4cfc5;
    border-radius: 20px;
    background: #fff;
}

.chat-inbox-empty-icon {
    font-size: 2.4rem;
    margin-bottom: 8px;
}

.chat-inbox-empty h3 {
    font-size: 1.25rem;
    margin: 0 0 4px;
}

/* --- Staff thread customer card --- */
.chat-thread-toolbar {
    margin-bottom: 14px;
}

.chat-thread-customer {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #fdf6f1, #f6f0f8);
    border: 1px solid #f0dfd6;
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.chat-thread-customer-main {
    flex: 1 1 auto;
    min-width: 200px;
}

.chat-thread-customer-name {
    font-size: 1.25rem;
    margin: 0;
}

.chat-thread-customer-links {
    font-size: 0.84rem;
    margin-top: 2px;
}

.chat-thread-customer-links a {
    color: var(--secondary);
}

.chat-next-booking {
    flex: 0 1 auto;
    max-width: 360px;
    background: #fff;
    border: 1px solid #ead9d0;
    border-radius: 14px;
    padding: 9px 13px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-next-booking-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary);
}

.chat-next-booking-text {
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-thread-window {
    background: #fff;
}

/* --- Structured / system messages (used by proposal flow later) --- */
.chat-msg.system {
    align-self: center;
    max-width: 92%;
    align-items: center;
}

.chat-msg.system .chat-bubble {
    background: #f4ede8;
    color: var(--muted);
    font-size: 0.8rem;
    border-radius: 999px;
    text-align: center;
}

.chat-card {
    display: block;
    background: #fff;
    border: 1px solid #eadfd7;
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(51, 40, 43, 0.05);
}

.chat-card-title {
    font-family: 'Fraunces', serif;
    font-size: 1rem;
    margin: 0 0 8px;
}

.chat-card-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.9rem;
    padding: 3px 0;
}

.chat-card-row dt {
    color: var(--muted);
}

.chat-card-row dd {
    margin: 0;
    font-weight: 600;
}

.chat-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

@media (max-width: 860px) {
    .chat-inbox-table,
    .chat-inbox-table tbody {
        display: block;
    }

    .chat-inbox-table thead {
        display: none;
    }

    .chat-inbox-table tr,
    .chat-inbox-table td {
        display: block;
        width: 100%;
    }

    .chat-inbox-actions-inner {
        justify-content: flex-start;
    }

    .chat-next-booking {
        max-width: none;
    }
}

/* ===== Mobile modal fixes (<=640px) ===== */
@media (max-width: 640px) {
    /* Let the header reflow instead of squeezing title + close + steps. */
    .modal-header {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    /* Drop the step indicator onto its own full-width line and keep the close
       button beside the title (order moves it after the DOM-later button). */
    .wizard-steps {
        order: 3;
        flex: 1 0 100%;
        gap: 10px;
    }

    /* Booking wizard: hide step text labels so the dots fit a phone width. */
    .wizard-dot-label {
        display: none;
    }

    /* Booking detail: stack label above value instead of a fixed label column. */
    .detail-grid,
    .detail-row {
        grid-template-columns: 1fr;
        gap: 2px 0;
    }
}
