/* Haven Claws admin layout: shell, page header, toolbar, calendar card, day box.
   One section per component. Colours and fonts come from the tokens in app.css (:root and [data-theme="dark"]).
   When a rule is replaced, delete the old one; do not stack an override on top of it. See my-brain/02_Personal_Haven/haven-ui-rules.md.

   BREAKPOINTS (media queries cannot read custom properties, so the ranges are written out. Use only these):
     xs  <= 400    phones such as iPhone SE            (max-width: 400px)
     sm  401-600   large phones                        (min-width: 401px) and (max-width: 600px)
     md  601-1023  tablets, portrait                   (min-width: 601px) and (max-width: 1023px)
     lg  1024-1279 small laptops, tablet landscape     (min-width: 1024px) and (max-width: 1279px)
     xl  >= 1280   desktop                             (min-width: 1280px)
   Combined: xs+sm (max-width: 600px) | sm+ (min-width: 401px) | md+ (min-width: 601px) | lg+ (min-width: 1024px).
   Base rules (no query) are shared by every size; a query only adds what changes at that size. */

:root {
    --topbar-h: 60px;
    --tabbar-h: 64px;
    --rail-w: 88px;
    --menu-w: 232px;
}


/* ==========================================================================
   1. Admin shell
   xs, sm, md: top bar + bottom tab bar.  lg: slim icon rail.  xl: full side menu.
   ========================================================================== */

.admin-shell-layout {
    --side-w: 0px;
    display: flex;
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--font-sans);
}

.admin-shell-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: var(--side-w);
}

.admin-main-content {
    flex: 1 1 auto;
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 16px 16px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom, 0px));
}

/* Page header: the one admin page title (script 32 px on phones, 44 px from 601 px) with a sub line under it. */
:root { --page-title-size: 32px; --page-pad-x: 16px; }
@media (min-width: 601px) { :root { --page-title-size: 44px; --page-pad-x: 32px; } }

.page-header h1 {
    margin: 0;
    font-family: var(--font-script);
    font-weight: 400;
    font-size: var(--page-title-size);
    line-height: 1.05;
    color: var(--rose);
}

/* Security joins the same column as every other admin page (it used to be a centred 640 px card). */
.admin-main-content > .services-page.security-page { max-width: 1100px; margin-inline: auto; }

/* One left edge: the shell gutter is the only padding; every admin page fills one column of the same width. */
.admin-main-content { padding-inline: var(--page-pad-x); }
.admin-main-content > :is(.services-page, .admin-wide) {
    width: 100%;
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 0;
    padding-top: 0; /* one top edge too: the shell gives it, as on To Do and Appointments */
    box-sizing: border-box;
}

/* Top bar */
.admin-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--topbar-h);
    padding: 0 16px;
    box-sizing: border-box;
    position: sticky;
    top: var(--test-banner-h, 0px);
    z-index: 25;
    background: color-mix(in srgb, var(--pearl) 94%, transparent);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--edge-soft);
}

.admin-top-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.admin-top-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid var(--gold);
    box-sizing: border-box;
    object-fit: cover;
}

.admin-top-text { line-height: 1; }

.admin-top-title {
    font-family: var(--font-script);
    font-size: 26px;
    color: var(--rose);
}

.admin-top-sub {
    margin-top: 2px;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--antique-gold);
}

/* Bottom tab bar */
.admin-tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: var(--tabbar-h);
    box-sizing: border-box;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom, 6px));
    background: color-mix(in srgb, var(--pearl) 96%, transparent);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-top: 1px solid var(--edge-soft);
}

.admin-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 2px 1px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-sans);
    text-decoration: none;
    cursor: pointer;
}

.admin-tab-item svg { width: 22px; height: 22px; flex-shrink: 0; }

.admin-tab-item span {
    font-size: 12px;
    line-height: 1.1;
    white-space: nowrap;
}

.admin-tab-item.active,
.admin-tab-item.active svg {
    color: var(--rose);
    stroke: var(--rose);
}

.admin-tab-item.active { font-weight: 500; }

/* "More" sheet that opens from the tab bar */
.admin-more-sheet-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 0 18px;
}

.admin-more-link {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    box-sizing: border-box;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--deep-rose);
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.admin-more-link:hover { background: var(--petal); }

.admin-more-logout {
    margin-top: 6px;
    border-top: 1px solid var(--blush);
    border-radius: 0;
    color: var(--cherry);
}

/* Side menu: hidden below lg */
.admin-side-menu {
    display: none;
    position: fixed;
    top: var(--test-banner-h, 0px);
    bottom: 0;
    left: 0;
    z-index: 30;
    width: var(--side-w);
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
    padding: 16px 8px;
    background: color-mix(in srgb, var(--pearl) 94%, transparent);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-right: 1px solid var(--edge-soft);
}

.admin-side-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 0 16px;
    text-decoration: none;
    color: inherit;
}

.admin-brand-logo {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid var(--gold);
    box-sizing: border-box;
    object-fit: cover;
    display: block;
}

.admin-brand-text {
    display: none;
    line-height: 1;
    white-space: nowrap;
}

.admin-brand-title {
    font-family: var(--font-script);
    font-size: 26px;
    color: var(--rose);
}

.admin-brand-sub {
    margin-top: 2px;
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--antique-gold);
}

.admin-side-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

.admin-side-links::-webkit-scrollbar { display: none; }

.admin-side-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--edge-soft);
}

/* Rail item: icon with one short label under it */
.admin-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    min-height: 56px;
    padding: 6px 2px;
    box-sizing: border-box;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--deep-rose);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-nav-item:hover { background: var(--petal); color: var(--rose); }

.admin-nav-item.active { background: var(--rose); color: #fff; font-weight: 500; }

.admin-nav-item.active svg { stroke: #fff; }

.admin-nav-full { display: none; }

@media (min-width: 1024px) {
    .admin-shell-layout { --side-w: var(--rail-w); }
    .admin-side-menu { display: flex; }
    .admin-top-bar,
    .admin-tab-bar { display: none; }
    .admin-main-content { padding-block: 24px 48px; }
}

@media (min-width: 1280px) {
    .admin-shell-layout { --side-w: var(--menu-w); }
    .admin-side-menu { padding: 22px 16px; }
    .admin-side-brand { justify-content: flex-start; padding: 0 2px 22px; }
    .admin-brand-text { display: block; }
    .admin-nav-item {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        min-height: 48px;
        padding: 0 14px;
        font-size: 15px;
        text-align: left;
    }
    .admin-nav-short { display: none; }
    .admin-nav-full { display: inline; }
}


/* ==========================================================================
   2. Page header (Appointments)
   One title block and one toolbar, each rendered once. Only their places change per size.
   xs: title with the date on the right.  sm: title with the long date under it.
   md and xl: title and actions on one row, view toggle under the title.  lg: all on one row.
   ========================================================================== */

.appt-sub {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.appt-sub-short { display: none; }

@media (max-width: 600px) {
    .appt-title { margin-bottom: 12px; }
}

@media (max-width: 400px) {
    .appt-title {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 8px;
    }
    .appt-sub { margin: 0; white-space: nowrap; }
    .appt-sub-long { display: none; }
    .appt-sub-short { display: inline; }
}

@media (min-width: 601px) {
    .appt-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "title actions" "toggle toggle";
        align-items: center;
        column-gap: 16px;
        row-gap: 14px;
        margin-bottom: 18px;
    }
    .appt-title { grid-area: title; }
    .appt-toolbar { display: contents; }
    .appt-toggle { grid-area: toggle; justify-self: start; }
    .appt-actions { grid-area: actions; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .appt-head {
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas: "title toggle actions";
    }
    .appt-title { display: flex; align-items: baseline; gap: 14px; }
    .appt-sub { margin: 0; }
}

@media (max-width: 600px) {
    .appt-head { display: contents; }
}


/* ==========================================================================
   3. Toolbar (view toggle, export, add)
   xs, sm: one sticky row below the top bar.  md and up: placed by the page header grid.
   Do not put backdrop-filter on the toolbar: it would trap the fixed backdrop of the Add menu.
   ========================================================================== */

.appt-toggle {
    display: inline-flex;
    align-items: center;
    padding: 2px;
    border: 1px solid var(--edge);
    border-radius: 999px;
    background: var(--pearl);
    box-shadow: inset 0 0 0 3px var(--petal);
}

.appt-toggle-item {
    height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--deep-rose);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease;
}

.appt-toggle-item.is-on {
    background: var(--rose);
    color: #fff;
}

.appt-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.appt-export-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 44px;
    height: 44px;
    padding: 0;
    box-sizing: border-box;
    border: 1px solid var(--logo-pink);
    border-radius: 999px;
    background: var(--pearl);
    color: var(--deep-rose);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.appt-export-btn:hover { background: var(--blush); border-color: var(--rose); }

.appt-export-label { display: none; }

.appt-add { position: relative; display: inline-flex; }

.appt-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 16px;
    box-sizing: border-box;
    border: 0;
    border-radius: 999px;
    background: var(--rose);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(176, 90, 116, 0.25);
    cursor: pointer;
    transition: background-color 150ms ease;
}

.appt-add-btn:hover { background: var(--deep-rose); }

.appt-add-more { display: none; }

.appt-add-chevron { transition: transform 200ms ease; }

.appt-add-chevron.is-open { transform: rotate(180deg); }

.appt-add-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
}

.appt-add-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 180px;
    padding: 6px;
    border: 1px solid var(--logo-pink);
    border-radius: 14px;
    background: var(--pearl);
    box-shadow: 0 8px 24px rgba(176, 90, 116, 0.18);
}

.appt-add-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--deep-rose);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.appt-add-item:hover { background: var(--blush); color: var(--cherry); }

.appt-add-item svg { flex-shrink: 0; }

@media (max-width: 600px) {
    .appt-toolbar {
        position: sticky;
        top: var(--topbar-h);
        z-index: 20;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin: 0 -16px 8px;
        padding: 8px 16px;
        /* the same fixed gradient as the body, so the bar hides what scrolls under it without showing as a band */
        background: var(--page-bg) fixed;
    }
}

@media (max-width: 400px) {
    .appt-toggle-item { padding: 0 14px; }
    .appt-add-btn { padding: 0 14px; }
    /* At 320 the toggle, Export and Add do not fit in one row: Export and Add drop under the toggle instead of sticking out. */
    .appt-toolbar { flex-wrap: wrap; }
    .appt-actions { margin-left: auto; }
}

@media (min-width: 1280px) {
    .appt-export-btn { width: auto; padding: 0 18px; }
    .appt-export-label { display: inline; }
    .appt-add-more { display: inline; }
}


/* ==========================================================================
   4. Calendar card
   Month header, legend, weekday labels, the grid and the caption (phones only).
   xs, sm: nav centred, legend under it.  md and up: nav left, legend right.  xl adds the Today button.
   ========================================================================== */

.appt-cal {
    padding: 14px 12px 12px;
    border: 1px solid var(--card-border);
    border-radius: 24px;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
}

.cal-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cal-title {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 600;
    font-variant-numeric: lining-nums;
    line-height: 1.1;
    white-space: nowrap;
    color: var(--deep-rose);
}

/* 36px to look at, 44px to tap */
.cal-nav-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--logo-pink);
    border-radius: 50%;
    background: var(--pearl);
    color: var(--deep-rose);
    cursor: pointer;
}

.cal-nav-btn::after {
    content: "";
    position: absolute;
    inset: -4px;
}

.cal-nav-btn:hover { background: var(--blush); border-color: var(--rose); }

.cal-today-btn {
    display: none;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--logo-pink);
    border-radius: 999px;
    background: var(--pearl);
    color: var(--deep-rose);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.cal-today-btn:hover { background: var(--blush); border-color: var(--rose); }

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.cal-key {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border: 1px solid var(--edge);
    border-radius: 999px;
    background: var(--blush);
    color: var(--deep-rose);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.cal-key-dot {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: var(--rose);
}

.cal-key--villasis { background: var(--champagne); border-color: var(--gold); color: var(--champagne-ink); }
.cal-key--villasis .cal-key-dot { background: #a8823a; }
.cal-key--closed { background: var(--mist); border-color: var(--mist); color: var(--mist-ink); }
.cal-key--closed .cal-key-dot { background: #a99da2; }
.cal-key--free { background: transparent; border-style: dashed; border-color: var(--field-edge); color: var(--muted); }
.cal-key--free .cal-key-dot { background: transparent; border: 1px dashed var(--muted); box-sizing: border-box; }
.cal-key--need { background: var(--petal); border-color: var(--danger-edge); color: var(--cherry); padding-left: 4px; }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.cal-weekday {
    padding: 4px 0;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--deep-rose);
}

.cal-weekday-long { display: none; }

.cal-caption {
    margin: 10px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

@media (max-width: 400px) {
    .appt-cal { padding: 12px 10px 10px; border-radius: 22px; }
    .cal-grid { gap: 5px; }
    .cal-title { font-size: 24px; }
}

@media (min-width: 601px) {
    .appt-cal { padding: 18px 16px 16px; border-radius: 28px; }
    .cal-head {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px 16px;
    }
    .cal-nav { justify-content: flex-start; }
    .cal-title { font-size: 28px; }
    .cal-legend { justify-content: flex-end; }
    .cal-grid { gap: 8px; }
    .cal-caption { display: none; }
}

@media (min-width: 401px) {
    .cal-weekday-short { display: none; }
    .cal-weekday-long { display: inline; }
}

@media (min-width: 1280px) {
    .cal-today-btn { display: inline-flex; }
    .cal-grid { gap: 9px; }
}


/* ==========================================================================
   5. Day box
   xs, sm: a square with the day number and a count of that day's times.
   md and up: up to four thin time rows, then "+N More". The box grows to fit; nothing is cut off or truncated.
   States: --out (other month, no box), --idle (past, nothing saved), --free (future, nothing saved), --closed,
   --baguio, --villasis, --other. A past day with times keeps its location colours.
   ========================================================================== */

.cal-day {
    --day-bg: var(--pearl);
    --day-edge: var(--edge-soft);
    --day-ink: var(--deep-rose);
    --row-bg: var(--blush);
    --row-ink: var(--deep-rose);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    min-width: 0;
    padding: 5px;
    box-sizing: border-box;
    border: 1px solid var(--day-edge);
    border-radius: 12px;
    background: var(--day-bg);
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.cal-day:disabled { cursor: default; }

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

.cal-day--out {
    border-color: transparent;
    background: none;
    cursor: default;
}

.cal-day--out .cal-day-num { color: var(--muted); opacity: 0.45; }

/* Never opened: dashed and plain, with "Not open" inside (a closed day is grey, an open day has its location tint). */
.cal-day--free {
    --day-edge: var(--field-edge);
    border-style: dashed;
}

/* Past days are dimmed whatever they hold. */
.cal-day--past { opacity: 0.6; }

.cal-day--closed {
    --day-bg: var(--mist);
    --day-edge: var(--mist);
    --day-ink: var(--mist-ink);
}

.cal-day--baguio {
    --day-bg: #fbe3ea;
    --day-edge: #f1b9c8;
    --row-bg: #f6c9d6;
}

.cal-day--villasis {
    --day-bg: #f7ebc8;
    --day-edge: #e0c783;
    --day-ink: #6f5320;
    --row-bg: #f0dba0;
    --row-ink: #6f5320;
}

.cal-day--other {
    --day-bg: #fff;
    --day-edge: #e7b9c6;
}

[data-theme="dark"] .cal-day--baguio { --day-bg: #3a2530; --day-edge: #5a3a46; --row-bg: #52303e; --row-ink: #f6d3de; }
[data-theme="dark"] .cal-day--villasis { --day-bg: #3d3120; --day-edge: #6b5530; --day-ink: #f0d59e; --row-bg: #54421f; --row-ink: #f0d59e; }
[data-theme="dark"] .cal-day--other { --day-bg: var(--pearl); --day-edge: var(--edge); }

.cal-day--today { border: 1.5px solid var(--deep-rose); }

.cal-day--selected {
    border-color: var(--rose);
    box-shadow: 0 0 0 3px var(--halo);
}

.cal-day-top {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.cal-day-num {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    color: var(--day-ink);
}

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

/* Needs you: a small numbered badge, the same look as the To do badge, only on days with something waiting. */
.cal-day-need {
    flex: none;
    min-width: 16px;
    height: 16px;
    margin-left: auto;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: 999px;
    background: var(--cherry);
    color: var(--on-accent);
    font-family: var(--font-sans);
    font-size: 10.5px;
    font-weight: 500;
    line-height: 16px;
    text-align: center;
}

/* The legend sample is a plain dot: the badge number only means something on a day. */
.cal-day-need--key { min-width: 8px; width: 8px; height: 8px; margin-left: 0; padding: 0; }

.cal-day-count {
    align-self: center;
    margin-top: auto;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: 999px;
    background: var(--row-bg);
    color: var(--row-ink);
    font-size: 10px;
    font-weight: 500;
    line-height: 16px;
    text-align: center;
}

/* Rows, notes and the blocked line are for md and up */
.cal-times,
.cal-more,
.cal-note,
.cal-blocked { display: none; }

/* A time chip: filled and with the first name when booked, outlined when open. A long name wraps; nothing is cut off. */
.cal-time {
    display: block;
    min-height: 22px;
    padding: 2px 8px;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 7px;
    background: var(--row-bg);
    color: var(--row-ink);
    font-family: var(--font-sans);
    font-size: clamp(10.5px, 1.5vw, 12px);
    font-weight: 500;
    line-height: 17px;
    overflow-wrap: anywhere;
}

.cal-time--open {
    border-color: color-mix(in srgb, var(--row-ink) 40%, transparent);
    background: transparent;
}

.cal-time--taken {
    background: color-mix(in srgb, var(--row-bg) 45%, transparent);
    color: var(--muted);
}

.cal-time--flagged { color: var(--cherry); font-weight: 600; }

/* A finished booking stays on its time: green when the service was done, red when the client did not make it. */
.cal-time--done { background: var(--success-bg); color: var(--success-ink); border-color: var(--success-edge); }
.cal-time--failed { background: var(--cherry-bg); color: var(--cherry-ink); border-color: var(--cherry-edge); }

.cal-more {
    padding: 0 2px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    color: var(--day-ink);
}

.cal-more--flagged { color: var(--cherry); }

.cal-note {
    font-size: 11.5px;
    line-height: 1.3;
    color: var(--muted);
}

.cal-blocked {
    align-items: center;
    gap: 4px;
    font-size: 11px;
    line-height: 1.2;
    color: var(--antique-gold);
}

@media (max-width: 600px) {
    .cal-day { aspect-ratio: 1 / 1; }
    .cal-day--today .cal-day-num {
        display: grid;
        place-items: center;
        width: 18px;
        height: 18px;
        margin: -2px 0 -2px -2px;
        font-size: 12px;
        border-radius: 50%;
        background: var(--deep-rose);
        color: #fff;
    }
}

/* xs: a 42px box must hold the number and the badge, so everything is a little tighter */
@media (max-width: 400px) {
    .cal-day { padding: 4px; }
    .cal-day-count { min-width: 14px; height: 14px; font-size: 9.5px; line-height: 14px; }
    .cal-day-need { min-width: 14px; height: 14px; padding: 0 3px; font-size: 9.5px; line-height: 14px; }
}

@media (min-width: 601px) {
    .cal-day {
        gap: 6px;
        min-height: 84px;
        padding: 8px 6px 8px;
        border-radius: 14px;
    }
    .cal-day-num { font-size: 16px; }
    .cal-day-today {
        display: inline;
        font-size: 9.5px;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--rose);
    }
    .cal-day-count { display: none; }
    .cal-times { display: flex; flex-direction: column; gap: 3px; }
    .cal-more { display: block; }
    .cal-note { display: block; }
    .cal-blocked { display: inline-flex; }
}

@media (min-width: 1024px) {
    .cal-day { padding: 8px 8px 10px; }
    .cal-day-num { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    .appt-toggle-item,
    .appt-add-btn,
    .appt-add-chevron { transition: none; }
}


/* ==========================================================================
   9. To do badge (side menu and tab bar)
   The count of bookings and quote requests that need Marga. Pulses while above zero.
   ========================================================================== */

:root {
    --on-accent: #ffffff;
}

.admin-nav-icon {
    position: relative;
    display: inline-flex;
}

.admin-todo-badge {
    position: absolute;
    top: -7px;
    right: -11px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    box-sizing: border-box;
    border-radius: 999px;
    background: var(--cherry);
    color: var(--on-accent);
    box-shadow: 0 0 0 2px var(--pearl);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    line-height: 18px;
    text-align: center;
}

/* Attention pulse: a ring that grows and fades behind the number. Only transform and opacity move. */
.admin-todo-badge::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid var(--cherry);
    opacity: 0;
    animation: adminTodoPulse 2.4s ease-out infinite;
}

@keyframes adminTodoPulse {
    0% { opacity: 0.7; transform: scale(1); }
    70%, 100% { opacity: 0; transform: scale(1.9); }
}

/* Full menu (xl): the dot sits at the icon top-right corner with a little room before the label. Same dot, new offset only. */
@media (min-width: 1280px) {
    .admin-side-menu .admin-todo-badge { top: -9px; right: -8px; }
    .admin-side-menu .admin-nav-icon { margin-right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    .admin-todo-badge::after { animation: none; }
}


/* ==========================================================================
   10. To do page (/admin/todo)
   Sections stack in one column. Rows grow to fit; nothing is cut off. The review and action panels are a
   side panel at lg and xl, a slide-over at md and a full screen on phones.
   ========================================================================== */

:root {
    --todo-scrim: rgba(43, 34, 38, 0.45);
    --todo-zoom-scrim: rgba(20, 12, 16, 0.88);
}

[data-theme="dark"] {
    --cherry-bg: #3a1f27;
    --cherry-ink: #f4b6c3;
    --cherry-edge: #7a283c;
    --on-accent: #2b2226;
    --todo-scrim: rgba(0, 0, 0, 0.6);
}

.todo-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
    font-family: var(--font-sans);
    color: var(--ink);
}

.todo-sub {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.todo-section { display: flex; flex-direction: column; gap: 10px; }

.todo-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--deep-rose);
}

.todo-count {
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    box-sizing: border-box;
    border-radius: 999px;
    background: var(--blush);
    color: var(--deep-rose);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    line-height: 24px;
    text-align: center;
}

.todo-empty {
    margin: 0;
    padding: 14px 16px;
    border: 1px dashed var(--edge);
    border-radius: 18px;
    color: var(--muted);
    font-size: 14px;
}

.todo-skeletons { display: flex; flex-direction: column; gap: 12px; }

.todo-error {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--cherry-edge);
    border-radius: 20px;
    background: var(--cherry-bg);
    color: var(--cherry-ink);
}

.todo-error p { margin: 0; font-size: 15px; }

/* Alerts: rose for trouble, amber for a warning */
.todo-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.45;
}

.todo-alert p { margin: 0; }
.todo-alert .icon { flex: none; margin-top: 1px; }
.todo-alert-rose { background: var(--cherry-bg); border: 1px solid var(--cherry-edge); color: var(--cherry-ink); }
.todo-alert-amber { background: var(--champagne); border: 1px solid var(--champagne-edge); color: var(--champagne-ink); }

/* Chips (status, tags) */
.todo-chip {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.todo-chip-rose { background: var(--blush); border-color: var(--edge); color: var(--deep-rose); }
.todo-chip-gold { background: var(--champagne); border-color: var(--champagne-edge); color: var(--champagne-ink); }

/* Buttons and fields. 44px minimum height for anything tappable. */
.todo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.todo-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.todo-btn-primary { background: var(--rose); color: var(--on-accent); }
.todo-btn-primary:hover:not(:disabled) { background: var(--deep-rose); }
.todo-btn-ghost { background: transparent; border-color: var(--edge); color: var(--deep-rose); }
.todo-btn-ghost:hover:not(:disabled) { background: var(--petal); }
.todo-btn-danger { background: var(--cherry); color: var(--on-accent); }
.todo-btn.is-done { background: var(--success-bg); border-color: var(--success-edge); color: var(--success-ink); opacity: 1; }

.todo-spinner {
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: todoSpin 700ms linear infinite;
}

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

.todo-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--edge);
    border-radius: 50%;
    background: transparent;
    color: var(--deep-rose);
    cursor: pointer;
}

.todo-label {
    display: block;
    margin: 14px 0 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--deep-rose);
}

.todo-input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid var(--field-edge);
    border-radius: var(--radius-field);
    background: var(--pearl);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: var(--font-size-input);
}

.todo-input:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.todo-textarea { padding: 12px 14px; resize: vertical; }
.todo-hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.todo-field-error { margin: 6px 0 0; font-size: 13px; color: var(--cherry); }

.todo-actions { margin-top: 18px; }

/* Today strip */
.todo-today {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.todo-today-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    min-height: 44px;
    --todo-card-r: 18px;
    position: relative;
    padding: 14px 18px;
    box-sizing: border-box;
    border: 1px solid var(--card-border);
    border-radius: var(--todo-card-r);
    background: var(--card-bg);
    color: var(--ink);
    font-family: var(--font-sans);
    text-align: left;
    cursor: pointer;
}

.todo-today-card.has-overlap { border-color: var(--cherry-edge); background: var(--cherry-bg); }
.todo-today-time { font-size: 15px; font-weight: 500; color: var(--rose); }
.todo-today-name { font-size: 15px; font-weight: 500; }
.todo-today-set { font-size: 13px; color: var(--muted); }

/* Notifications card */
.todo-push {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    --todo-card-r: 20px;
    position: relative;
    padding: 16px 20px;
    border: 1px solid var(--card-border);
    border-radius: var(--todo-card-r);
    background: var(--petal);
}

.todo-push-icon { color: var(--rose); display: inline-flex; }
.todo-push-text { flex: 1 1 220px; min-width: 0; font-size: 15px; }
.todo-push-text p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.todo-push-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Rows */
.todo-list {
    display: grid;
    /* one card fills the row, two or more share it: 2 columns on iPad, 1 on phones */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    align-items: start;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.todo-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    --todo-card-r: 20px;
    position: relative;
    padding: 16px 20px;
    border: 1px solid var(--card-border);
    border-radius: var(--todo-card-r);
    background: var(--card-bg);
    transition: opacity 240ms ease, transform 240ms ease;
}

.todo-row.is-leaving { opacity: 0; transform: translateX(24px); }

.todo-row-main {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-sans);
    text-align: left;
    cursor: pointer;
}

.todo-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.todo-row-name { font-size: 16px; font-weight: 500; }
.todo-row-set { font-size: 14px; color: var(--muted); }
.todo-row-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--muted); }
.todo-row-foot { display: flex; justify-content: flex-end; }

/* Panel: backdrop, shell, steps, blocks */
.todo-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: var(--todo-scrim);
}

.todo-panel {
    position: fixed;
    top: var(--test-banner-h, 0px); /* under the test-site strip when it is on */
    right: 0;
    bottom: 0;
    z-index: 61;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    background: var(--pearl);
    color: var(--ink);
    font-family: var(--font-sans);
    box-shadow: -12px 0 32px var(--todo-scrim);
    animation: todoPanelIn 260ms var(--ease-spring) both;
}

@keyframes todoPanelIn {
    from { opacity: 0; transform: translateX(28px); }
    to { opacity: 1; transform: translateX(0); }
}

.todo-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--edge-soft);
}

.todo-panel-titles { min-width: 0; }
.todo-panel-title { margin: 0; font-family: var(--font-serif); font-size: 26px; font-weight: 600; color: var(--deep-rose); }
.todo-panel-sub { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

.todo-panel-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 18px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--edge) transparent;
}

.todo-panel-body::-webkit-scrollbar { width: 8px; }
.todo-panel-body::-webkit-scrollbar-track { background: transparent; }
.todo-panel-body::-webkit-scrollbar-thumb { background: var(--edge); border-radius: 999px; }
.todo-panel-body::-webkit-scrollbar-thumb:hover { background: var(--rose); }

/* Action buttons stay at the bottom of the panel while the content scrolls above them. */
.todo-panel-foot {
    flex: none;
    padding: 12px 18px max(16px, env(safe-area-inset-bottom, 16px));
    border-top: 1px solid var(--edge-soft);
    background: var(--pearl);
    box-shadow: 0 -8px 16px -10px var(--todo-scrim);
}

.todo-panel-foot .todo-actions { margin-top: 0; }

.todo-steps { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }

.todo-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--edge-soft);
    border-radius: 999px;
    font-size: 14px;
    color: var(--muted);
}

.todo-step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--blush);
    color: var(--deep-rose);
    font-size: 13px;
    font-weight: 500;
}

.todo-step.is-on { border-color: var(--rose); color: var(--deep-rose); font-weight: 500; }
.todo-step.is-on .todo-step-no { background: var(--rose); color: var(--on-accent); }
.todo-step.is-done .todo-step-no { background: var(--success-bg); color: var(--success-ink); }

.todo-block {
    --todo-card-r: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 18px 20px;
    border: 1px solid var(--card-border);
    border-radius: var(--todo-card-r);
    background: var(--card-bg);
}

.todo-block-title { margin: 0 0 8px; font-family: var(--font-serif); font-size: 19px; font-weight: 600; color: var(--deep-rose); }

.todo-standing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.todo-standing-note { font-size: 13px; color: var(--muted); }

.todo-proof {
    display: block;
    width: 100%;
    max-width: 260px;
    min-height: 120px;
    margin-inline: auto; /* centred in the card (A10) */
    padding: 0;
    overflow: hidden;
    border: 1px dashed var(--logo-pink);
    border-radius: 16px;
    background: var(--petal);
    cursor: zoom-in;
}

.todo-proof img { display: block; width: 100%; max-height: 320px; object-fit: contain; }

.todo-proof-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    cursor: default;
}

.todo-facts { display: flex; flex-direction: column; margin: 10px 0 0; }

.todo-facts > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--edge-soft);
    font-size: 14px;
}

.todo-facts > div:last-child { border-bottom: 0; }
.todo-facts dt { color: var(--muted); }
.todo-facts dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }

.todo-quote-note {
    margin: 10px 0 0;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--petal);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.todo-sub-title { margin: 14px 0 8px; font-size: 13px; font-weight: 500; color: var(--muted); }

.todo-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}

.todo-photo {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--petal);
    cursor: zoom-in;
}

.todo-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.todo-photo-failed {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    cursor: default;
}

.todo-seg {
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--edge);
    border-radius: 999px;
    background: var(--petal);
}

.todo-seg-item {
    flex: 1 1 0;
    min-height: 44px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--deep-rose);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.todo-seg-item.is-on { background: var(--rose); color: var(--on-accent); }

.todo-tier-picker { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.todo-tier-service { margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.todo-tier-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.todo-tier-picker .todo-tier-list { margin-top: 0; }

.todo-tier {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 44px;
    padding: 10px 12px;
    box-sizing: border-box;
    border: 1px solid var(--edge);
    border-radius: 16px;
    background: var(--pearl);
    color: var(--ink);
    font-family: var(--font-sans);
    text-align: left;
    cursor: pointer;
}

.todo-tier.is-on { border-color: var(--rose); background: var(--blush); }
.todo-tier-name { font-size: 14px; font-weight: 500; }
.todo-tier-range { font-size: 12px; color: var(--muted); }

.todo-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.todo-pill {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--edge);
    border-radius: 999px;
    background: var(--pearl);
    color: var(--deep-rose);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.todo-pill.is-on { background: var(--rose); border-color: var(--rose); color: var(--on-accent); }

.todo-zoom {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--todo-zoom-scrim);
}

.todo-zoom img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.todo-zoom-close { position: absolute; top: 16px; right: 16px; background: var(--pearl); }

/* Panel sizes: phone full screen (base); md slide-over; lg and xl side panel */
@media (max-width: 1023px) {
    .todo-page { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
}

@media (min-width: 601px) and (max-width: 1023px) {
    .todo-panel { width: min(560px, 90vw); }
}

@media (min-width: 1024px) {
    .todo-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .todo-panel { width: 480px; }
    .todo-backdrop { background: transparent; }
}


@media (prefers-reduced-motion: reduce) {
    .todo-row,
    .todo-btn { transition: none; }
    .todo-panel { animation: none; }
    .todo-spinner { animation-duration: 1800ms; }
}


/* ==========================================================================
   12. Schedule: agenda, day sheet, add booking, time off
   Agenda: one open date per row (date block on the left, that day's bookings on the right). A row grows to fit its words;
   nothing is cut off. Day sheet and the other panels use the To do panel shell (section 10): side panel on lg and xl,
   slide-over on md, full screen on phones.
   ========================================================================== */

.sched-need-link {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    min-height: 44px;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 6px 16px;
    border: 1px solid var(--champagne-edge);
    border-radius: 999px;
    background: var(--champagne);
    color: var(--champagne-ink);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.sched-need-go { display: inline-flex; align-items: center; gap: 2px; text-decoration: underline; }

.sched-empty {
    padding: 28px 20px;
    border: 1px solid var(--card-border);
    border-radius: 24px;
    background: var(--card-bg);
    text-align: center;
}

.sched-days { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.sched-month { margin: 8px 4px 0; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--antique-gold); }

.sched-day {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px 14px 10px;
    border: 1px solid var(--card-border);
    border-radius: 24px;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
}

/* The date block: day number, weekday, location chip. Tapping it opens the day sheet. */
.sched-date {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.sched-date-num { font-size: 40px; font-weight: 500; line-height: 1.1; color: var(--deep-rose); }
.sched-date-week { font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--antique-gold); }

.sched-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.sched-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

.sched-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    box-sizing: border-box;
    margin-left: auto;
    padding: 0 14px;
    border: 1px solid var(--edge);
    border-radius: 999px;
    background: transparent;
    color: var(--deep-rose);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.sched-edit:hover { background: var(--petal); }

.sched-need-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border: 1px solid var(--champagne-edge);
    border-radius: 999px;
    background: var(--champagne);
    color: var(--champagne-ink);
    font-size: 13px;
    font-weight: 500;
}

.sched-note { flex: 1 1 10rem; min-width: 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }

.sched-rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }

.sched-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.sched-row:hover { background: var(--petal); }
.sched-time { flex: none; min-width: 5.2rem; font-size: 18px; font-weight: 500; color: var(--deep-rose); }
.sched-name { flex: 1 1 9rem; min-width: 0; font-size: 17px; overflow-wrap: anywhere; }

.sched-set {
    padding: 2px 10px;
    border: 1px solid var(--edge);
    border-radius: 999px;
    background: var(--blush);
    color: var(--deep-rose);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.sched-set-removal { border-style: dashed; background: var(--mist); color: var(--mist-ink); }
.sched-flag { font-size: 12px; font-weight: 500; color: var(--cherry-ink); }
.sched-none { margin: 0; padding: 8px 10px; font-size: 15px; color: var(--muted); }
.sched-more { padding: 12px 0 4px; text-align: center; }

/* A day with no bookings is a compact row: the same date column, "3 times open" and Edit day on one line. */
.sched-day--empty { padding: 8px 14px; gap: 2px 14px; align-items: center; }
.sched-day--empty .sched-date { min-height: 0; }
.sched-day--empty .sched-date-num { font-size: 26px; }
.sched-day--empty .sched-none { flex: 1 1 auto; min-width: 0; padding: 0; font-size: 14px; }
.sched-skeletons { display: flex; flex-direction: column; gap: 12px; }

/* xs: on a compact row the button is just the pencil (its name stays "Edit day for ...") so the row stays one line. */
@media (max-width: 400px) {
    .sched-day--empty .sched-edit { width: 44px; padding: 0; justify-content: center; }
    .sched-day--empty .sched-edit-label { display: none; }
}

@media (min-width: 601px) {
    .sched-day { grid-template-columns: 112px minmax(0, 1fr); gap: 18px; padding: 16px 18px 12px; }
    .sched-date { flex-direction: column; align-items: center; align-self: start; gap: 4px; padding-top: 4px; text-align: center; }
}

/* Day sheet, add booking, time off, copy to dates: content of the To do panel shell */
.sheet-section { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }

/* One heading style in the sheet: "Where will you be?", "Times", "Day note". Sentence case, body font. */
.sheet-section legend,
.sheet-label {
    margin: 0 0 4px;
    padding: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--deep-rose);
}

.sheet-hint { margin: 0; font-size: 13px; line-height: 1.4; color: var(--muted); }

.sheet-readonly {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--edge);
    border-radius: 16px;
    background: var(--petal);
    color: var(--ink);
    font-size: 14px;
}

.sheet-readonly .icon { flex: none; margin-top: 2px; }

.sheet-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.sheet-switch-text { font-size: 16px; font-weight: 500; }
.sheet-seg-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sheet-location { flex: 1 1 8rem; flex-direction: row; gap: 8px; min-height: 48px; }
.sheet-times-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }

/* A time row may wrap, and a block reason is shown in full. */
.sheet-section .slot { flex-wrap: wrap; gap: 6px 10px; }
.sheet-section .slot-timebox { width: 104px; }
.sheet-section .chip-blocked { max-width: none; overflow: visible; text-overflow: clip; white-space: normal; line-height: 1.3; padding: 4px 10px; }
.sheet-booked { cursor: pointer; }
.sheet-section .slot-closed { background: var(--mist); border-color: var(--mist); color: var(--muted); }
.sheet-section .slot-closed .t { color: var(--muted); }
.sheet-plain { margin: 0; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

.sheet-refusal {
    margin: 6px 0 4px 4px;
    padding: 10px 14px;
    border: 1px solid var(--cherry-edge);
    border-radius: 14px;
    background: var(--cherry-bg);
    color: var(--cherry-ink);
    font-size: 14px;
}

.sheet-inline-actions { margin-top: 10px; }
.sheet-add { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.sheet-add-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.sheet-add-field { flex: 1 1 9rem; }
.sheet-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sheet-textarea { height: auto; min-height: 72px; padding: 12px 14px; resize: vertical; }
.sheet-changed { margin-top: 2px; }

.sheet-flagged { padding: 12px 14px; border: 1px solid var(--cherry-edge); border-radius: 16px; background: var(--cherry-bg); }
.sheet-flagged-title { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; font-weight: 600; color: var(--cherry-ink); }
.sheet-flagged-list { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }

.sheet-flagged-link {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 1px solid var(--edge);
    border-radius: 12px;
    background: var(--pearl);
    color: var(--deep-rose);
    font: inherit;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
}

.sheet-flagged-link .icon { margin-left: auto; }
.sheet-flagged-link:disabled { cursor: default; opacity: 0.7; }

/* Add booking: option buttons for date, time and payment */
.sched-opts { display: flex; flex-wrap: wrap; gap: 8px; }

.sched-opt {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
    padding: 6px 14px;
    border: 1px solid var(--edge);
    border-radius: 14px;
    background: var(--pearl);
    color: var(--deep-rose);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.sched-opt.is-on { border-color: var(--rose); background: var(--blush); box-shadow: 0 0 0 2px var(--rose); }
.sched-opt-sub { font-size: 12px; color: var(--muted); }

/* Time off: the live summary and the bookings it would flag */
.sched-summary { padding: 12px 14px; border: 1px solid var(--edge); border-radius: 16px; background: var(--petal); font-size: 15px; line-height: 1.5; }
.sched-affected { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 15px; }

@media (max-width: 600px) {
    .sheet-section .slot-timebox { width: 96px; }
}

/* ==========================================================================
   13. Booking panel (J7): stats, client card, money, message, pills, sheets, breakdown, history
   Docked beside the agenda from 1024px (.bp-dock inside the aside); otherwise it is the To do panel shell.
   Every view has an opaque sticky footer (the shell's) and one close button.
   ========================================================================== */

/* The docked panel: no stitch on the shell itself (it is not a .card), same pearl surface as the To do panels. Blocks inside keep their stitch. */
.appointments-details-aside {
    position: sticky;
    top: 24px;
    flex-shrink: 0;
    width: 440px;
    box-sizing: border-box;
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    border-radius: 28px;
    background: var(--pearl);
    box-shadow: var(--card-shadow);
}

@media (max-width: 1023px) {
    .appointments-details-aside { display: none; }
}

.bp-empty { padding: 22px 18px; text-align: center; }

.bp-dock {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    max-height: calc(100dvh - 48px);
    background: var(--pearl);
    color: var(--ink);
    font-family: var(--font-sans);
}

.bp-dock .todo-panel-head { flex: none; }
.bp-dock .todo-panel-body { min-height: 0; }

.bp-head-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.bp-set { font-size: 14px; color: var(--muted); }

/* Stats: five tiles, never wrapping inside a tile; 3 + 2 on phones */
.bp-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.bp-stat {
    min-width: 0;
    padding: 10px 4px;
    border-radius: 16px;
    background: var(--petal);
    text-align: center;
}
.bp-stat-val { font-size: 18px; font-weight: 500; color: var(--deep-rose); white-space: nowrap; line-height: 1.2; }
.bp-stat-lbl { margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; }

.bp-client-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.bp-ig { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.bp-link { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--deep-rose); text-decoration: none; }
.bp-link:hover { text-decoration: underline; }
.bp-ok { color: var(--success-ink); }
.bp-done { background: var(--success-bg); border: 1px solid var(--success-edge); color: var(--success-ink); }

.bp-proof { padding: 0; border: 1px solid var(--edge); border-radius: 14px; background: var(--card-bg); cursor: pointer; overflow: hidden; max-width: 160px; }
.bp-proof img { display: block; width: 100%; height: auto; }

.bp-message-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bp-message-head .todo-label { margin: 0; }
.bp-copy { min-height: 40px; padding: 0 14px; font-size: 13px; }
.bp-bubble {
    padding: 12px 14px;
    border: 1px solid var(--edge-soft);
    border-radius: 16px;
    background: var(--card-bg);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.bp-pills { align-items: center; }

/* Sheets */
.bp-note { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.bp-check { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 14px; }
.bp-minutes { width: 96px; min-height: 44px; }
.bp-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; font-size: 14px; }
.bp-sum .bp-line { border-bottom: 1px solid var(--edge-soft); }
.bp-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 10px; }
.bp-total span { font-size: 15px; font-weight: 500; }
.bp-total strong { font-family: var(--font-sans); font-size: 32px; font-weight: 500; color: var(--deep-rose); }

.bp-history { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.bp-history li { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 2px solid var(--edge); }
.bp-h-text { font-size: 15px; font-weight: 500; }
.bp-h-meta { font-size: 13px; color: var(--muted); }

/* Footer: Cancel quiet on the left, the one primary on the right. Back is a ghost on the left. */
.bp-actions { width: 100%; }
.bp-foot-note { margin: 0; font-size: 12px; color: var(--muted); }
.bp-cancel { background: transparent; border-color: var(--cherry-edge); color: var(--cherry); }
.bp-cancel:hover:not(:disabled) { background: var(--cherry-bg); }
.bp-foot-total { order: -1; display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; font-weight: 500; }
.bp-foot-total strong { font-size: 22px; font-weight: 500; color: var(--deep-rose); }

@media (max-width: 600px) {
    .bp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bp-total strong { font-size: 28px; }
}

/* ==========================================================================
   14. Export sheet (Share your schedule): the To do panel shell, wide on lg
   Options on the left, the preview on the right; below lg the preview sits under the options.
   Footer: quiet Cancel on the left, Save picture on the right (auto width).
   ========================================================================== */

.export-sheet { display: flex; flex-direction: column; gap: 14px; }

/* After the stacked default, or it would win over the two columns. */
@media (min-width: 1024px) {
    .todo-panel.export-panel { width: min(900px, calc(100vw - 48px)); }
    .export-sheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 18px; align-items: start; }
    .export-preview { position: sticky; top: 0; }
}
.export-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.export-pick .todo-input { width: 100%; }
.export-options { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.export-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.export-frame-slot { display: flex; justify-content: center; min-width: 0; }

/* The design is always 1080 wide; the script scales it down to fit and sets the wrapper to the scaled size. */
.export-frame-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 16px 36px var(--todo-scrim);
    border: 1px solid var(--edge);
    background: var(--petal);
}

.export-stage {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
}

.export-design-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.export-design-actions .todo-btn { font-size: 14px; } /* same type size as the design pills above */
.export-paste { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.export-paste .todo-hint { margin: 0; }
.export-paste-box {
    min-height: 180px;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre;
    overflow: auto;
}
.export-paste-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.export-paste-actions .export-upload { margin-right: auto; }

/* "Load from file": a real button; the file input sits invisibly over it. */
.export-upload { position: relative; overflow: hidden; }
.export-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.export-upload:focus-within { box-shadow: var(--focus-ring); }

.export-actions { display: flex; align-items: center; gap: 10px; width: 100%; }
.export-actions .todo-btn:first-child { margin-right: auto; }

/* J8: two fields side by side in a panel; Services rows; Settings with one column; Studio rules editor beside its preview */
.bp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-settings-page .settings-two-col-layout { grid-template-columns: minmax(0, 1fr); }
.services-tabs { margin: 0 0 16px; }
/* Q1: Settings shows one tab at a time, full width of the content column */
.settings-tab-panel > .card { width: 100%; box-sizing: border-box; }
/* Q3: Add schedule, date range */
.pick-range-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pick-range-days { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }

/* Q5: Edit plus Delete or Turn off on each place */
.settings-place-row.is-off .settings-place-text { opacity: .7; }
.settings-delete-actions { margin-top: 16px; }

/* The tabs are links: no link underline (A0.2). */
.services-tabs .rules-tab-btn,
.services-tabs .rules-tab-btn:hover { text-decoration: none; }
.tier-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 14px; }
.tier-sum-item { display: inline-flex; flex-direction: column; gap: 1px; }
.tier-sum-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
/* Two tiers per row once there is room, so the right side is not empty (A0.2). */
@media (min-width: 1024px) {
    .admin-services-page .service-tiers-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) { .admin-rules-page .rules-tab-content { flex-direction: row; align-items: flex-start; } .admin-rules-page .rules-edit-pane, .admin-rules-page .rules-live-preview-box { flex: 1 1 0; min-width: 0; } }
.rules-dirty-inline { display: inline-block; margin-right: 6px; }
.rules-save-btn { height: 48px; padding: 0 34px; margin-left: auto; }
.service-add-btn { height: 44px; padding: 0 22px; }
.service-long-desc-wrap { margin: 16px 0 0; padding: 12px; background: var(--petal); border-radius: 12px; border: 1px solid var(--edge); }
.service-long-desc-label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.service-long-desc-input { resize: vertical; }

/* J9: Clients, Quotes, Settings and Activity pages */
.j9-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1024px) { .j9-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.client-card { display: flex; flex-direction: column; gap: 8px; text-align: left; text-decoration: none; color: var(--ink); font: inherit; cursor: pointer; width: 100%; box-sizing: border-box; }
.client-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.client-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.client-card-name { font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: var(--deep-rose); min-width: 0; overflow-wrap: anywhere; }
.client-card-sub { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.client-card-tag { margin-left: 8px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--petal); border: 1px solid var(--edge); font-size: 12px; color: var(--deep-rose); }
.client-card-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.client-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.client-block-btn { color: var(--cherry); }

.quote-thumbs { display: flex; gap: 8px; }
.quote-thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; border: 1px solid var(--edge); }
.quote-thumb-missing { display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--surface-2, transparent); font-weight: 600; }

.settings-group-card { display: flex; flex-direction: column; gap: 12px; }
.settings-group-intro { margin: 0; }
.settings-group-row { display: flex; flex-direction: column; gap: 6px; }
.settings-group-hint { font-size: 13px; color: var(--muted); line-height: 1.4; }
.settings-group-foot { display: flex; justify-content: flex-end; }
.settings-place-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--edge-soft); }
.settings-place-text { min-width: 0; overflow-wrap: anywhere; }
.settings-place-name { font-size: 16px; font-weight: 500; }

.activity-list { list-style: none; margin: 0; padding: 8px 20px; }
.activity-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--edge-soft); flex-wrap: wrap; }
.activity-row:first-child { border-top: 0; }
.activity-main { flex: 1 1 220px; min-width: 0; }
.activity-summary { font-size: 15px; overflow-wrap: anywhere; }
.activity-meta { font-size: 13px; color: var(--muted); }
.activity-amount { font-weight: 600; color: var(--deep-rose); }
.activity-open { min-height: 38px; height: 38px; padding: 0 14px; font-size: 13px; }
.settings-group-grow { flex: 1; }
.j9-empty { text-align: center; padding: 32px 20px; }
.j9-empty p { margin: 0; }
.j9-more { text-align: center; margin-top: 12px; }
.gallery-move-btns { display: flex; gap: 6px; }

/* Compact outline pill for secondary actions inside rows and cards (Open booking, Edit place, Block). */
.btn-outline {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--edge);
    background: var(--white);
    color: var(--deep-rose);
    font: 500 14px var(--font-sans);
    cursor: pointer;
    text-decoration: none;
}
.btn-outline:hover { background: var(--blush); }
.btn-outline:disabled { background: var(--disabled-bg); color: var(--disabled-ink); border-color: transparent; cursor: not-allowed; }
.btn-outline:focus-visible { outline: 2px solid var(--deep-rose); outline-offset: 2px; }

.qr-method-card { position: relative; }

/* ==========================================================================
   Earnings controls and stat cards (D7, T2)
   ========================================================================== */
.earn-periods { display: flex; align-items: center; gap: 8px; }
.earn-periods .period-btn { min-height: 44px; }
.earn-stepper { display: flex; align-items: center; gap: 8px; min-width: 0; }
.earn-step { min-height: 44px; min-width: 44px; padding: 0; border-radius: 22px; }
.earn-range { flex: 1 1 auto; min-width: 0; text-align: center; font-weight: 600; font-size: 16px; color: var(--ink); }
.earn-today {
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--deep-rose);
    font: 500 14px var(--font-sans);
    text-decoration: underline;
    cursor: pointer;
}
@media (min-width: 601px) {
    .earn-range { flex: none; min-width: 180px; }
}
/* Eight cards fill two rows of four; the ninth (Refunds due) makes three rows of three. */
@media (min-width: 1024px) {
    .earnings-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .earnings-grid--nine { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ==========================================================================
   Admin polish: Security header (A2), Services groups (A8), Gallery card buttons (T4)
   ========================================================================== */
.security-head { display: flex; align-items: center; gap: 18px; }
.security-head-text { flex: 1 1 auto; min-width: 0; }
.security-head-title { font-family: var(--font-serif); font-size: 30px; font-weight: 600; color: var(--deep-rose); }
.security-head-sub { font-size: 15px; color: var(--muted); margin-top: 4px; }
.security-head-state { display: flex; align-items: center; gap: 12px; }
@media (max-width: 600px) {
    .security-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .security-head-title { font-size: 24px; }
}

.service-collapse-btn { display: none; }
@media (max-width: 600px) {
    .service-collapse-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        color: var(--deep-rose);
        cursor: pointer;
    }
    .service-collapse-btn svg { transition: transform var(--duration-fast, .15s) ease; }
    .service-group:not(.is-collapsed) .service-collapse-btn svg { transform: rotate(180deg); }
    .service-group.is-collapsed .service-tiers-list { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .service-collapse-btn svg { transition: none; }
}

.gallery-edit-btns { display: flex; gap: 16px; }
