.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-heading {
    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 var(--dur-1) 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 var(--dur-1) 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-heading {
        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-digit {
    background: var(--primary-dark);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.cal-day-digit {
    font-weight: 700;
    line-height: 1;
}

.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 var(--dur-4) 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 var(--dur-2) 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 var(--dur-2) 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;
}

/* --- Customers: list (leans on the bookings-page classes) ------------- */

.bookings-table--customers {
    min-width: 860px;
}

.bookings-table--customers td {
    vertical-align: middle;
}

.bk-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bk-sort select {
    padding: 10px 12px;
    border: 2px solid #efe5db;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-family: inherit;
    font-size: 0.86rem;
}

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

.customer-contact {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.customer-contact a:hover {
    color: var(--primary-dark);
}

.customer-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3e7e4;
    color: var(--primary-dark);
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    vertical-align: middle;
}

.customer-spend {
    font-family: 'Fraunces', serif;
    font-size: 1rem;
    color: var(--primary-dark);
}

.customer-actions-cell {
    text-align: right;
}

/* --- Customers: detail ----------------------------------------------- */

.customer-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    margin: 4px 0 18px;
    background: #efe5db;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.customer-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    background: var(--card-bg);
}

.customer-stat-value {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    line-height: 1.2;
    color: var(--primary-dark);
}

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

.customer-contact-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: center;
    margin-top: 4px;
}

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

.customer-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.customer-detail-form {
    max-width: none;
    margin-bottom: 22px;
}

.customer-message-form h3 {
    margin-top: 0;
}

.customer-detail-form textarea {
    min-height: 76px;
}

@media (max-width: 720px) {
    .customer-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .customer-stat:last-child {
        grid-column: 1 / -1;
    }
    .customer-actions-cell {
        text-align: left;
    }
}

.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 var(--dur-1) ease, box-shadow var(--dur-1) 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 var(--dur-2) 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); }
}

/* An endless drift is exactly what this preference exists to stop: the
   homepage hero photo moves up and down 8px for as long as the page is open,
   with no pause and no way to opt out. Honour it. `animation: none` returns
   the photo to its natural position -- the keyframe starts at translateY(0)
   and there is no `both` fill, so nothing is left mid-motion. */
@media (prefers-reduced-motion: reduce) {
    .hero-photo { animation: none; }
}

/* ===== 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 var(--dur-1) ease, border-color var(--dur-1) 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 var(--dur-1) ease, background var(--dur-1) ease, color var(--dur-1) 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 ===== */
