/* New app design (same tokens as Setup v2, docs/mockups/setup-v2.png + appointment-texts.png). First used by Automatic texts →
   Appointments; the app-wide design step reuses these. Pieces: Components/Ui (UiCard, UiSwitch, UiSegmented, UiChipGroup,
   UiBottomSheet). Wrap a page part in class="ui" to get the font, colours and sizes. The app shell is NOT styled here. */
:root {
    --ui-brand: #4b2bd6;
    --ui-brand-hover: #4224c4;
    --ui-brand-50: #f1edff;
    --ui-brand-200: #c9c0f2;
    --ui-ink: #14142b;
    --ui-muted: #6b6b85;
    --ui-line: #e7e7f0;
    --ui-bg: #f6f6fb;
    --ui-card: #fff;
    --ui-fill: #efeff5;
    --ui-ok: #14804a;
    --ui-warn: #a15c00;
    --ui-danger: #c2261d;
    --ui-danger-bg: #fdecea;
    --ui-disabled: #c9c4e6;
    --ui-switch-off: #e3e3ec;
    --ui-radius-card: 18px;
    --ui-radius: 12px;
    --ui-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.ui {
    color: var(--ui-ink);
    font-family: var(--ui-font);
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

.ui *, .ui *::before, .ui *::after {
    box-sizing: border-box;
}

.ui button {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.ui button:focus-visible, .ui a:focus-visible, .ui [role="switch"]:focus-visible {
    outline: 2px solid var(--ui-brand);
    outline-offset: 2px;
}

/* Show on phone only (< 768px) / desktop only. The element keeps its own display where it shows. */
@media (min-width: 768px) {
    .phone-only {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .desktop-only {
        display: none !important;
    }
}

/* ---- Page head ---- */
.ui-title {
    margin: 0;
    font-size: 27px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ui-ink);
}

.ui-sub {
    margin: 8px 0 0;
    font-size: 16px;
    color: var(--ui-muted);
}

@media (min-width: 768px) {
    .ui-title {
        font-size: 30px;
    }
}

/* ---- Card: radius 18 + 1px line ---- */
.ui-card {
    background: var(--ui-card);
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius-card);
    padding: 18px;
}

.ui-card + .ui-card {
    margin-top: 12px;
}

.ui-card-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.ui-card-text {
    flex: 1;
    min-width: 0;
}

.ui-card-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 600;
    color: var(--ui-ink);
}

.ui-card-sub {
    margin: 2px 0 0;
    font-size: 15px;
    line-height: 1.4;
    color: var(--ui-muted);
}

.ui-divider {
    height: 1px;
    margin: 18px 0 16px;
    background: var(--ui-line);
    border: 0;
}

/* List card: rows with lines between them */
.ui-list {
    background: var(--ui-card);
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius-card);
}

.ui-list-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
}

.ui-list-row + .ui-list-row {
    border-top: 1px solid var(--ui-line);
}

/* ---- Labels, help, links ---- */
.ui-label {
    display: block;
    margin: 16px 0 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ui-ink);
}

.ui-help {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ui-muted);
}

.ui-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ui-brand);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.ui-link:hover {
    color: var(--ui-brand-hover);
    text-decoration: underline;
}

.ui-link-muted {
    color: var(--ui-muted);
    font-weight: 500;
}

.ui-link-muted:hover {
    color: var(--ui-ink);
}

/* ---- Info line (brand-50) ---- */
.ui-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--ui-radius);
    background: var(--ui-brand-50);
    color: #3d3a5c;
    font-size: 14px;
    line-height: 1.4;
}

.ui-info svg {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    color: var(--ui-brand);
}

.ui-alert {
    padding: 12px 14px;
    border-radius: var(--ui-radius);
    background: var(--ui-danger-bg);
    color: var(--ui-danger);
    font-size: 14px;
}

/* ---- Switch 52 x 32 ---- */
.ui-switch {
    flex: none;
    position: relative;
    width: 52px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: var(--ui-switch-off);
    cursor: pointer;
    transition: background 0.15s;
}

.ui-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(20, 20, 43, 0.25);
    transition: transform 0.15s;
}

.ui-switch[aria-checked="true"] {
    background: var(--ui-brand);
}

.ui-switch[aria-checked="true"]::after {
    transform: translateX(20px);
}

.ui-switch:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Bigger tap area without a bigger switch */
.ui-switch::before {
    content: "";
    position: absolute;
    inset: -6px;
}

/* ---- Segmented control ---- */
.ui-seg {
    display: flex;
    gap: 2px;
    padding: 4px;
    border-radius: var(--ui-radius);
    background: var(--ui-fill);
}

.ui-seg-item {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    display: grid;
    place-items: center;
    padding: 0 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ui-muted);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.ui-seg-item:hover {
    color: var(--ui-ink);
}

.ui-seg-item.on {
    background: var(--ui-card);
    color: var(--ui-brand);
    box-shadow: 0 1px 3px rgba(20, 20, 43, 0.12);
}

/* Page tabs: same look, ink text when selected */
.ui-tabs .ui-seg-item.on {
    color: var(--ui-ink);
}

@media (min-width: 768px) {
    .ui-tabs {
        display: inline-flex;
    }

    .ui-tabs .ui-seg-item {
        flex: none;
        padding: 0 22px;
    }
}

/* ---- Chips 44px ---- */
.ui-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ui-chip {
    flex: none;
    min-width: 59px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    background: var(--ui-card);
    color: var(--ui-ink);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.ui-chip:hover {
    border-color: var(--ui-brand-200);
}

.ui-chip.on {
    border-color: var(--ui-brand);
    background: var(--ui-brand);
    color: #fff;
}

/* ---- Primary button 54px ---- */
.ui-button {
    display: block;
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 14px;
    background: var(--ui-brand);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(75, 43, 214, 0.22);
    cursor: pointer;
}

.ui-button:hover:not(:disabled) {
    background: var(--ui-brand-hover);
}

.ui-button:disabled {
    background: var(--ui-disabled);
    box-shadow: none;
    cursor: default;
}

/* ---- Bottom sheet (phone) / modal (desktop) ---- */
html.ui-sheet-open, html.ui-sheet-open body {
    overflow: hidden;
}

.ui-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(20, 20, 43, 0.45);
    animation: ui-fade 0.15s ease-out;
}

.ui-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1061;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px 20px calc(16px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: var(--ui-card);
    box-shadow: 0 -8px 30px rgba(20, 20, 43, 0.18);
    animation: ui-up 0.2s ease-out;
}

.ui-sheet-handle {
    width: 36px;
    height: 5px;
    margin: 0 auto 14px;
    border-radius: 99px;
    background: #d6d6e0;
}

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

.ui-sheet-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.ui-sheet-close {
    flex: none;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ui-ink);
    cursor: pointer;
}

.ui-sheet-close:hover {
    background: rgba(20, 20, 43, 0.05);
}

@media (min-width: 768px) {
    .ui-sheet {
        left: 50%;
        right: auto;
        top: 50%;
        bottom: auto;
        width: 480px;
        max-height: calc(100vh - 64px);
        padding: 24px 28px 20px;
        border-radius: 20px;
        transform: translate(-50%, -50%);
        box-shadow: 0 24px 60px rgba(20, 20, 43, 0.25);
        animation: ui-fade 0.15s ease-out;
    }

    .ui-sheet-handle {
        display: none;
    }
}

@keyframes ui-fade {
    from { opacity: 0; }
}

@keyframes ui-up {
    from { transform: translateY(40px); opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
    .ui-sheet, .ui-sheet-backdrop, .ui-switch, .ui-switch::after {
        animation: none;
        transition: none;
    }
}

/* ---- Token editor (booking text templates) ---- */
.ui-token-editor {
    min-height: 116px;
    padding: 12px 14px;
    border: 2px solid var(--ui-line);
    border-radius: 14px;
    background: var(--ui-card);
    color: var(--ui-ink);
    font-size: 16px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    outline: none;
    cursor: text;
}

.ui-token-editor:focus, .ui-token-editor.focused {
    border-color: var(--ui-brand);
}

.ui-token {
    display: inline-block;
    margin: 0 1px;
    padding: 0 6px;
    border-radius: 6px;
    background: var(--ui-brand-50);
    color: var(--ui-brand);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    user-select: all;
    cursor: default;
}

.ui-insert {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.ui-insert-button {
    height: 38px;
    padding: 0 12px;
    border: 1px dashed var(--ui-brand-200);
    border-radius: 10px;
    background: var(--ui-card);
    color: var(--ui-brand);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ui-insert-button:hover {
    border-color: var(--ui-brand);
    background: var(--ui-brand-50);
}

.ui-counter {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--ui-muted);
}

.ui-counter-texts {
    font-weight: 600;
    color: var(--ui-ok);
}

.ui-counter-texts.warn {
    color: var(--ui-warn);
}

.ui-counter-texts.bad {
    color: var(--ui-danger);
}

.ui-bubble {
    display: inline-block;
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 18px 18px 18px 6px;
    background: var(--ui-fill);
    color: var(--ui-ink);
    font-size: 15px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ==== New look (b) pieces: sheet footer, 44px buttons/inputs, avatar, tags, pills, menu rows, FAB, toast ==== */

/* Sheet footer (forms): stays at the bottom while the sheet scrolls */
.ui-sheet-foot {
    position: sticky;
    bottom: calc(-16px - env(safe-area-inset-bottom));
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px -20px calc(-16px - env(safe-area-inset-bottom));
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--ui-line);
    background: var(--ui-card);
}

.ui-sheet-foot .ui-btn {
    flex: 1 1 0;
}

.ui-sheet-foot .ui-btn.danger {
    flex: none;
    margin-right: auto;
}

/* Phone: forms open full height (clear of the notch) so the keyboard never hides Save. */
@media (max-width: 767.98px) {
    .ui-sheet.ui-sheet-form {
        top: calc(12px + env(safe-area-inset-top));
        max-height: none;
    }
}

@media (min-width: 768px) {
    .ui-sheet-foot {
        bottom: -20px;
        margin: 20px -28px -20px;
        padding: 14px 28px 20px;
        border-radius: 0 0 20px 20px;
    }

    .ui-sheet-foot .ui-btn {
        flex: none;
        min-width: 110px;
    }

    .ui-sheet-foot .ui-btn:not(.danger):first-of-type {
        margin-left: auto;
    }

    .ui-sheet.ui-sheet-wide {
        width: 560px;
    }
}

/* Buttons 44px; .ui-button stays the 54px big one */
.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    background: var(--ui-card);
    color: var(--ui-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.ui-btn:hover:not(:disabled) {
    border-color: var(--ui-brand-200);
    color: var(--ui-ink);
}

.ui-btn.primary {
    border-color: var(--ui-brand);
    background: var(--ui-brand);
    color: #fff;
}

.ui-btn.primary:hover:not(:disabled) {
    background: var(--ui-brand-hover);
    color: #fff;
}

.ui-btn.danger {
    border-color: transparent;
    background: transparent;
    color: var(--ui-danger);
    padding: 0 4px;
}

.ui-btn.danger:hover:not(:disabled) {
    color: #9b1c15;
    text-decoration: underline;
}

.ui-btn.danger-fill {
    border-color: var(--ui-danger);
    background: var(--ui-danger);
    color: #fff;
}

.ui-btn.danger-fill:hover:not(:disabled) {
    background: #a51f17;
    color: #fff;
}

.ui-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.ui-btn.primary:disabled {
    border-color: var(--ui-disabled);
    background: var(--ui-disabled);
    opacity: 1;
}

.ui-icon-btn {
    flex: none;
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ui-ink);
    cursor: pointer;
}

.ui-icon-btn:hover {
    background: rgba(20, 20, 43, 0.05);
}

/* Inputs */
.ui-input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #dcdce6;
    border-radius: var(--ui-radius);
    background: var(--ui-card);
    color: var(--ui-ink);
    font: inherit;
    font-size: 16px;
}

.ui-input:focus {
    border-color: var(--ui-brand);
    outline: none;
    box-shadow: 0 0 0 3px rgba(75, 43, 214, 0.12);
}

textarea.ui-input {
    min-height: 96px;
    resize: vertical;
}

.ui-field + .ui-field {
    margin-top: 18px;
}

.ui-field > .ui-label {
    margin-top: 0;
}

.ui-optional {
    font-weight: 400;
    color: var(--ui-muted);
}

.ui-field .validation-message {
    margin-top: 6px;
    font-size: 13px;
    color: var(--ui-danger);
}

/* Search box with icon */
.ui-search {
    position: relative;
}

.ui-search .ui-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ui-muted);
    pointer-events: none;
}

.ui-search input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px 0 42px;
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    background: var(--ui-card);
    color: var(--ui-ink);
    font: inherit;
    font-size: 16px;
}

.ui-search input::placeholder {
    color: #8a8aa3;
}

.ui-search input:focus {
    border-color: var(--ui-brand);
    outline: none;
    box-shadow: 0 0 0 3px rgba(75, 43, 214, 0.12);
}

/* Avatar (initials; stable colour per client) */
.ui-avatar {
    flex: none;
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ui-brand-50);
    color: var(--ui-brand);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.ui-avatar.c1 { background: #e7f6ee; color: #16794a; }
.ui-avatar.c2 { background: #fdeee2; color: #b4531a; }
.ui-avatar.c3 { background: #e6efff; color: #2457c5; }
.ui-avatar.c4 { background: #fde9ef; color: #b8325b; }
.ui-avatar.c5 { background: #ececf3; color: #4d4d66; }

/* Tags (DUE / NEW / SAID STOP / list names) */
.ui-tag {
    display: inline-flex;
    align-items: center;
    flex: none;
    height: 20px;
    padding: 0 6px;
    border-radius: 6px;
    background: var(--ui-fill);
    color: #4d4d66;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

.ui-tag.due { background: #e3f5ea; color: var(--ui-ok); }
.ui-tag.new { background: var(--ui-brand-50); color: var(--ui-brand); }
.ui-tag.stop { background: var(--ui-danger-bg); color: var(--ui-danger); }

/* Status pill (Confirmed / Not confirmed yet) */
.ui-pill {
    display: inline-flex;
    align-items: center;
    flex: none;
    height: 26px;
    padding: 0 10px;
    border-radius: 99px;
    background: var(--ui-fill);
    color: var(--ui-muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.ui-pill.ok { background: #e3f5ea; color: var(--ui-ok); }
.ui-pill.bad { background: var(--ui-danger-bg); color: var(--ui-danger); }

/* Overline: "NEXT APPOINTMENT" */
.ui-overline {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ui-muted);
}

/* Menu rows (⋯ menus, pick lists) inside a UiBottomSheet */
.ui-menu-rows {
    display: flex;
    flex-direction: column;
    margin: 0 -8px;
}

.ui-menu-row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 52px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ui-ink);
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.ui-menu-row:hover:not(:disabled) {
    background: var(--ui-bg);
    color: var(--ui-ink);
}

.ui-menu-row:disabled {
    color: #a3a3b8;
    cursor: default;
}

.ui-menu-row .ui-icon {
    flex: none;
    color: var(--ui-muted);
}

.ui-menu-row.danger, .ui-menu-row.danger .ui-icon {
    color: var(--ui-danger);
}

.ui-menu-row.on, .ui-menu-row.on .ui-icon {
    color: var(--ui-brand);
}

.ui-menu-row-sub {
    margin-left: auto;
    max-width: 55%;
    font-size: 13px;
    font-weight: 400;
    color: var(--ui-muted);
    text-align: right;
}

/* Floating button above the phone bottom bar ("+ Add client") */
.ui-fab {
    position: fixed;
    right: 16px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    z-index: 1020;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 54px;
    padding: 0 22px 0 18px;
    border: 0;
    border-radius: 16px;
    background: var(--ui-brand);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(75, 43, 214, 0.32);
    cursor: pointer;
}

.ui-fab:hover {
    background: var(--ui-brand-hover);
    color: #fff;
}

.ui-fab:disabled {
    background: var(--ui-disabled);
    box-shadow: none;
}

/* Toast (a few seconds) */
.ui-toast {
    position: fixed;
    left: 50%;
    bottom: calc(150px + env(safe-area-inset-bottom));
    z-index: 1070;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--ui-ink);
    color: #fff;
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 10px 30px rgba(20, 20, 43, 0.25);
    transform: translateX(-50%);
    animation: ui-fade 0.15s ease-out;
}

.ui-toast.bad {
    background: var(--ui-danger);
}

@media (min-width: 768px) {
    .ui-toast {
        bottom: 32px;
    }
}

/* Clients | Lists tabs (Components/ClientsTabs): selected = white with ink text */
.cl-tabs .ui-seg-item {
    min-height: 44px;
    font-size: 16px;
}

.cl-tabs .ui-seg-item.on {
    color: var(--ui-ink);
    font-weight: 600;
}

/* Upload a list: the real file input stays hidden; "Pick a file" clicks it (InputFile is a child component, so not scoped CSS). */
input.cu-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ==== New look (c) pieces: forms in sheets (44px inputs), checks / radios, money box, conflict box ==== */
.ui-form .ui-input, .ui-form select.ui-input {
    min-height: 44px;
    padding: 8px 12px;
}

.ui-form select.ui-input {
    padding-right: 34px;
    appearance: none;
    background: var(--ui-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b85' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
}

.ui-form textarea.ui-input {
    min-height: 80px;
}

.ui-form .ui-field + .ui-field, .ui-form .ui-form-row + .ui-field, .ui-form .ui-field + .ui-form-row, .ui-form .ui-form-row + .ui-form-row {
    margin-top: 14px;
}

.ui-form .ui-label {
    margin: 0 0 6px;
}

.ui-form-lead {
    margin: 0 0 14px;
    font-size: 15px;
    color: var(--ui-muted);
}

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

.ui-form-row > .ui-field + .ui-field {
    margin-top: 0;
}

.ui-form .date-input-text {
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #dcdce6;
    border-radius: var(--ui-radius);
    font-size: 16px;
    color: var(--ui-ink);
}

.ui-form .date-input:focus-within .date-input-text {
    border-color: var(--ui-brand);
    box-shadow: 0 0 0 3px rgba(75, 43, 214, 0.12);
}

.ui-check, .ui-radio {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 44px;
    padding: 11px 0 0;
    font-size: 15px;
    line-height: 1.4;
    cursor: pointer;
}

.ui-check input, .ui-radio input {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--ui-brand);
    cursor: pointer;
}

.ui-money {
    position: relative;
}

.ui-money > span {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ui-muted);
    pointer-events: none;
}

.ui-form .ui-money .ui-input {
    padding-left: 30px;
}

.ui-conflict {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: var(--ui-radius);
    background: #fff4e0;
    color: #6b3d00;
    font-size: 14px;
}

.ui-conflict-title {
    font-weight: 600;
}

.ui-conflict ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.ui-form .ui-alert {
    margin-top: 14px;
}

.ui-btn.ok-fill {
    border-color: var(--ui-ok);
    background: var(--ui-ok);
    color: #fff;
}

.ui-btn.ok-fill:hover:not(:disabled) {
    background: #0f6b3d;
    color: #fff;
}

.ui-btn.ui-btn-warn {
    border-color: #c77700;
    background: #c77700;
    color: #fff;
}

.ui-btn.ui-btn-warn:hover:not(:disabled) {
    background: #a86400;
    color: #fff;
}

/* Quick picks under a field ("Lunch", "Meeting") */
.ui-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ui-quick button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--ui-line);
    border-radius: 99px;
    background: var(--ui-card);
    color: var(--ui-ink);
    font-size: 14px;
    cursor: pointer;
}

.ui-quick button:hover {
    border-color: var(--ui-brand-200);
}

/* A sheet whose content brings its own head (calendar appointment details: name, ⋯, close). */
.ui-sheet.ui-sheet-headless > .ui-sheet-head {
    display: none;
}

/* ---- B1 plan change + team member sheets (docs/mockups/plan-changes.png) ---- */
.ps-sheet .ui-sheet-head {
    margin-bottom: 4px;
}

.ps-sub {
    margin: 0 0 14px;
    color: var(--ui-muted);
    font-size: 15px;
    line-height: 1.45;
}

.ps-small {
    margin: 10px 2px 0;
    color: var(--ui-muted);
    font-size: 13.5px;
}

.ps-gap {
    margin-top: 12px;
}

.ps-seg {
    margin-bottom: 12px;
}

.ps-free {
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 99px;
    background: #e7f6ee;
    color: var(--ui-ok);
    font-size: 11.5px;
    font-weight: 600;
}

.ps-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ps-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    background: var(--ui-card);
    color: var(--ui-ink);
    text-align: left;
    cursor: pointer;
}

.ps-choice.on {
    border-color: var(--ui-brand);
    background: #fbfaff;
    box-shadow: 0 0 0 3px var(--ui-brand-50);
}

.ps-radio {
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border: 2px solid #c9c9d6;
    border-radius: 50%;
}

.ps-choice.on .ps-radio {
    border: 7px solid var(--ui-brand);
}

.ps-choice-text {
    flex: 1;
    min-width: 0;
}

.ps-choice-text strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.ps-choice-text > span {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--ui-muted);
}

.ps-current {
    padding: 1px 8px;
    border-radius: 99px;
    background: var(--ui-fill);
    color: #4d4d66;
    font-size: 11.5px;
    font-weight: 600;
}

.ps-choice-price {
    flex: none;
    font-weight: 700;
    font-size: 16px;
    text-align: right;
}

.ps-choice-price small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--ui-muted);
}

.ps-quote {
    margin: 14px 0 0;
    padding: 4px 14px;
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    background: var(--ui-bg);
}

.ps-quote > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
}

.ps-quote > div + div {
    border-top: 1px solid var(--ui-line);
}

.ps-quote dt {
    color: var(--ui-muted);
    font-size: 14px;
    font-weight: 400;
}

.ps-quote dd {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.ps-quote > div:first-child dd {
    font-size: 17px;
}

.ps-loading {
    padding: 14px;
    color: var(--ui-muted);
    font-size: 14px;
}

.ps-note {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #f1dfb0;
    border-radius: 12px;
    background: #fff8e6;
    color: #5b4300;
    font-size: 14px;
    line-height: 1.45;
}

.ps-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
}

.ui-button.ps-danger {
    background: var(--ui-danger);
    box-shadow: 0 8px 20px rgba(194, 38, 29, 0.22);
}

.ui-button.ps-danger:hover:not(:disabled) {
    background: #a51f17;
}

.ui-button.ps-danger:disabled {
    background: #eab3af;
    box-shadow: none;
}

.ps-text-btn {
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ui-ink);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.ps-text-btn:hover:not(:disabled) {
    background: rgba(20, 20, 43, 0.04);
}

.ps-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ps-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
    font-size: 15px;
    line-height: 1.45;
}

.ps-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.ps-ico.ok, .ps-ico.pay { background: #e7f6ee; color: var(--ui-ok); }
.ps-ico.move { background: var(--ui-brand-50); color: var(--ui-brand); }
.ps-ico.del { background: var(--ui-danger-bg); color: var(--ui-danger); }

.ui-input.ps-delete {
    height: 54px;
    border: 2px solid var(--ui-brand-200);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.ui-input.ps-delete:focus {
    border-color: var(--ui-brand);
}

/* ---- B2 cancel sheets (docs/mockups/cancel.png frames 1–2) ---- */
.ps-ico.warn { background: #fff4dc; color: var(--ui-warn); }

.ps-text-btn.pe-danger-text { color: var(--ui-danger); }

.pe-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 14px;
}

.pe-reason {
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    background: var(--ui-card);
    color: var(--ui-ink);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
}

.pe-reason:hover { border-color: var(--ui-brand-200); }

.pe-reason.on {
    border-color: var(--ui-brand);
    background: var(--ui-brand-50);
    color: var(--ui-brand);
}

textarea.ui-input.pe-note {
    width: 100%;
    min-height: 68px;
    resize: vertical;
}

/* ---- B2 frames 4 + 6: ended shell (no app frame), "Your plan has ended", "Welcome back". Desktop = centered 480px card. ---- */
.pe-shell {
    min-height: 100vh;
    background: var(--ui-bg);
}

.pe-head {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 512px;
    margin: 0 auto;
    padding: 16px 16px 8px;
}

.pe-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
}

.pe-logo {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--ui-brand);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.pe-gap { flex: 1; }

.pe-head-link, .ui button.pe-head-link {
    border: 0;
    background: none;
    padding: 8px 0;
    color: var(--ui-brand);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.pe-main {
    max-width: 512px;
    margin: 0 auto;
    padding: 8px 16px 32px;
}

@media (min-width: 768px) {
    .pe-main > .pe-ended, .pe-main > .pe-page, .pe-main > .content-help {
        padding: 28px 24px;
        border: 1px solid var(--ui-line);
        border-radius: var(--ui-radius-card);
        background: var(--ui-card);
        box-shadow: 0 10px 30px rgba(20, 20, 43, 0.06);
    }
    .pe-main { padding-top: 32px; }
}

.pe-ended { text-align: center; padding-top: 24px; }

.pe-lock {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 8px auto 18px;
    border-radius: 50%;
    background: var(--ui-brand-50);
    font-size: 28px;
}

.pe-ended-title { margin: 0 0 8px; font-size: 24px; font-weight: 700; }

.pe-ended-text { margin: 0 auto 18px; max-width: 340px; color: var(--ui-muted); font-size: 15.5px; }

.pe-rows {
    margin: 0 0 14px;
    padding: 2px 16px;
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    background: var(--ui-card);
    text-align: left;
}

.pe-rows > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    font-size: 14.5px;
}

.pe-rows > div + div { border-top: 1px solid var(--ui-line); }
.pe-rows dt { color: var(--ui-muted); font-weight: 400; }
.pe-rows dd { margin: 0; font-weight: 600; }

a.ui-button.pe-choose {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.pe-download {
    display: block;
    width: 100%;
    height: 50px;
    margin-top: 10px;
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    background: var(--ui-card);
    color: var(--ui-ink);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.pe-portal { margin-top: 14px; }

.pe-welcome-title { margin: 8px 0 8px; font-size: 24px; font-weight: 700; }
.pe-welcome-sub { margin: 0 0 16px; color: var(--ui-muted); font-size: 15.5px; }

.pe-welcome-note {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--ui-brand-50);
    color: #3b2aa0;
    font-size: 14px;
}

.pe-welcome-foot { margin-top: 28px; }

.pe-welcome-secure {
    margin: 10px 0 0;
    color: var(--ui-muted);
    font-size: 13px;
    text-align: center;
}

.pe-welcome-seg .ui-seg-item { white-space: nowrap; }
.pe-welcome-seg .ps-free { margin-left: 4px; padding: 1px 6px; }

/* ---- B3 failed payments (docs/mockups/failed-payments.png): red banner (frames 1–2), paused screen (frames 3–4) ---- */
.pay-banner {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #f4c4c0;
    border-radius: 14px;
    background: #fdeeed;
    color: #9a2a22;
}

.pay-banner-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #d92d20;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}

.pay-banner-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pay-banner-title { color: #7a1a14; font-size: 15.5px; font-weight: 700; }
.pay-banner-text { font-size: 14px; line-height: 1.45; }

.ui a.pay-banner-link, a.pay-banner-link {
    margin-top: 6px;
    color: #b42318;
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
}

.ui a.pay-banner-link:hover { text-decoration: underline; }

.pz-lock { background: #fdeeed; }
.pe-rows dd.pz-red { color: var(--ui-danger); }
.pz-wait { margin: 0 0 12px; text-align: left; }
.pz-foot { margin: 18px auto 0; max-width: 360px; color: var(--ui-ink); font-size: 15px; line-height: 1.45; }

/* ---- Who does which service (docs/mockups/team-services.png): Services list + sheet, team member dialog, day dropdowns ---- */
.ts { max-width: 760px; }
.ts-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ts-title { margin: 0; font-size: 18px; font-weight: 700; }
.ts-add {
    display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 6px; border: 0; background: none;
    color: var(--ui-brand); font-weight: 600; cursor: pointer;
}
.ts-add:hover { text-decoration: underline; }
.ts-sub { margin: 0 0 12px; color: var(--ui-muted); font-size: 14px; }
.ts-empty { padding: 28px 16px; border: 1px dashed var(--ui-line); border-radius: var(--ui-radius-card); text-align: center; color: var(--ui-muted); }
.ts-list { display: flex; flex-direction: column; gap: 10px; }
.ts-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 12px 14px; text-align: left;
    border: 1px solid var(--ui-line); border-radius: 14px; background: var(--ui-card); color: var(--ui-ink); cursor: pointer;
    box-shadow: 0 1px 2px rgba(20, 20, 43, 0.04);
}
.ts-card:hover { border-color: var(--ui-brand-200); }
.ts-card.off { background: #fafafd; }
.ts-card-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15.5px; font-weight: 600; }
.ts-card-sub { color: var(--ui-muted); font-size: 13.5px; }
.ts-who-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 500; }
.ts-avatars { display: inline-flex; gap: 4px; }
.ts-avatar {
    flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    color: #fff; font-size: 9.5px; font-weight: 700; letter-spacing: 0.02em;
}
.ts-nobody { display: inline-flex; align-items: center; gap: 6px; color: var(--ui-danger); font-size: 13px; font-weight: 600; }
.ts-member-none { margin: 0 0 8px; padding: 10px 12px; border-radius: var(--ui-radius); background: var(--ui-danger-bg); }

/* Sheet pieces */
.ts-sheet .ui-form { padding-bottom: 4px; }
.ts-unit, .ts-money { position: relative; display: flex; align-items: center; }
.ts-unit .ui-input { padding-right: 46px; }
.ts-unit > span { position: absolute; right: 12px; color: var(--ui-muted); font-size: 15px; pointer-events: none; }
.ts-money .ui-input { padding-left: 28px; }
.ts-money > span { position: absolute; left: 12px; color: var(--ui-muted); font-size: 15px; pointer-events: none; }
.ts-who { margin-top: 16px; }
.ts-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-chip {
    display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 4px 14px; border: 1px solid var(--ui-line);
    border-radius: 99px; background: var(--ui-card); color: var(--ui-ink); font-size: 14.5px; font-weight: 500; cursor: pointer;
}
.ts-chip.with-avatar { padding-left: 5px; padding-right: 12px; }
.ts-chip .ts-avatar { width: 28px; height: 28px; font-size: 10.5px; }
.ts-chip:hover { border-color: var(--ui-brand-200); }
.ts-chip.on { border-color: var(--ui-brand); background: var(--ui-brand-50); color: var(--ui-brand); }
.ts-help { margin: 8px 0 0; color: var(--ui-muted); font-size: 13px; line-height: 1.45; }
.ts-kept { margin: 8px 0 0; padding: 8px 12px; border-radius: var(--ui-radius); background: #fff4dc; color: var(--ui-warn); font-size: 13.5px; font-weight: 600; }
.ts-switch-card {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 14px;
    border-radius: 14px; background: var(--ui-bg);
}
.ts-switch-title { font-size: 15px; font-weight: 600; }
.ts-switch-sub { color: var(--ui-muted); font-size: 13px; }
.ts-more-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; margin-top: 16px;
    padding: 0 2px; border: 0; border-top: 1px solid var(--ui-line); background: none; color: var(--ui-ink); font-weight: 600; text-align: left; cursor: pointer;
}
.ts-more-toggle small { display: block; color: var(--ui-muted); font-size: 12.5px; font-weight: 400; }
.ts-more { padding-top: 4px; }
.ts-more > .ui-field, .ts-more > .ui-form-row, .ts-more > fieldset { margin-top: 14px; }
.ts-more fieldset { border: 0; padding: 0; }
.ts-link .link-name-prefix { margin-bottom: 4px; }
.ts-link .form-control { min-height: 44px; border-radius: var(--ui-radius); }
.ts-sheet .ui-sheet-foot .ts-save { flex: 1 1 auto; }

/* Team member dialog: ~760px on desktop (frame 4) */
@media (min-width: 768px) {
    .ui-sheet.ts-member { width: 760px; }
}
.ts-member-top { align-items: start; }
.ts-section-title { font-size: 15.5px; font-weight: 700; }
.ts-hours-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 18px; }
.ts-hours-head .ts-help { margin-top: 2px; }
.ts-own { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.ts-days { margin-top: 6px; }
.ts-day {
    display: grid; grid-template-columns: 92px auto 1fr; align-items: center; gap: 10px; padding: 10px 0;
    border-bottom: 1px solid var(--ui-line);
}
.ts-day-head { display: flex; align-items: center; gap: 10px; }
.ts-day-head .ui-switch { transform: scale(0.82); transform-origin: left center; margin-right: -8px; }
.ts-day-name { font-size: 14.5px; font-weight: 600; }
.ts-day-times { display: flex; flex-direction: column; gap: 6px; }
.ts-interval { display: flex; align-items: center; gap: 6px; }
.ui-form .ts-time { width: 118px; min-height: 40px; padding: 6px 8px; font-size: 14px; }
.ts-time.ro { display: inline-flex; align-items: center; justify-content: center; width: 104px; min-height: 40px; border: 1px solid var(--ui-line); border-radius: 10px; color: var(--ui-ink); font-size: 14px; }
.ts-dash { color: var(--ui-muted); }
.ts-closed { color: var(--ui-muted); font-size: 14px; }
.ts-break { align-self: flex-start; min-height: 32px; padding: 0; border: 0; background: none; color: var(--ui-brand); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.ts-x { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--ui-muted); cursor: pointer; }
.ts-x:hover { background: var(--ui-fill); color: var(--ui-danger); }
.ts-day-pick { position: relative; min-width: 0; }
.ts-day-none { color: var(--ui-danger); font-size: 13px; font-weight: 600; }
.ts-select {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 40px; padding: 6px 10px 6px 12px;
    border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-card); color: var(--ui-ink); font-size: 14px; text-align: left; cursor: pointer;
}
.ts-select.picked { border-color: var(--ui-brand); color: var(--ui-brand); font-weight: 600; }
.ts-select-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ts-count { color: var(--ui-muted); font-weight: 400; }
.ts-pop-shield { position: fixed; inset: 0; z-index: 5; }
.ts-pop {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 6; max-height: 320px; overflow-y: auto; padding: 8px;
    border: 1px solid var(--ui-line); border-radius: 14px; background: var(--ui-card); box-shadow: 0 12px 32px rgba(20, 20, 43, 0.16);
}
.ts-pop-search { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; padding: 0 10px; border-radius: 10px; background: var(--ui-bg); color: var(--ui-muted); }
.ts-pop-search input { flex: 1; min-width: 0; min-height: 38px; border: 0; background: none; color: var(--ui-ink); font-size: 15px; outline: none; }
.ts-pop-row { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 8px; border-radius: 8px; font-size: 14.5px; cursor: pointer; }
.ts-pop-row:hover { background: var(--ui-bg); }
.ts-pop-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--ui-brand); }
.ts-pop-all { border-bottom: 1px solid var(--ui-line); border-radius: 8px 8px 0 0; font-weight: 600; }
.ts-pop-row mark { padding: 0; background: #fff3a3; color: inherit; }
.ts-pop-empty { padding: 10px 8px; color: var(--ui-muted); font-size: 14px; }

/* Phone (frame 5): times, then the dropdown under them */
@media (max-width: 767.98px) {
    .ui-form-row.ts-member-top { grid-template-columns: 1fr; }
    .ts-day { grid-template-columns: 1fr; gap: 8px; }
    .ts-day-head { justify-content: space-between; flex-direction: row-reverse; }
    .ts-day-head .ui-switch { transform: none; margin-right: 0; }
    .ui-form .ts-time { width: 112px; }
    .ts-time::-webkit-calendar-picker-indicator { display: none; }
    .ts-hours-head { flex-direction: column-reverse; }
    .ts-cancel { display: none; }
}

/* ---- Services & Team pages + Online booking list (docs/mockups/services-team-menu.png) ---- */
.pg-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.pg-head-text { flex: 1; min-width: 0; }
.pg-head .ui-sub { margin-top: 4px; font-size: 15px; }
.pg-back {
    flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; margin: -2px 0 0 -8px; border-radius: 10px;
    color: var(--ui-ink); text-decoration: none;
}
.pg-back:hover { background: var(--ui-fill); }
.pg-add {
    flex: none; min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--ui-brand); font-size: 17px; font-weight: 600; cursor: pointer;
}
@media (max-width: 767.98px) {
    .pg-head { align-items: center; gap: 6px; margin-bottom: 14px; }
    .pg-head .ui-title { font-size: 19px; }
}

/* Team page */
.tm { max-width: 1120px; }
.tm-notice { margin-bottom: 12px; padding: 10px 14px; border-radius: var(--ui-radius); background: #e3f5ea; color: var(--ui-ok); font-size: 14.5px; font-weight: 500; }
.tm-hours {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--ui-line); border-radius: 14px; background: var(--ui-card);
}
.tm-hours-text { flex: 1; min-width: 0; }
.tm-hours-title { margin: 0; font-size: 15.5px; font-weight: 600; }
.tm-hours-sub { margin: 2px 0 0; color: var(--ui-muted); font-size: 13.5px; }
.tm-link { flex: none; min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--ui-brand); font-size: 15px; font-weight: 600; cursor: pointer; }
.tm-link:hover { text-decoration: underline; }
.tm-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
@media (min-width: 768px) { .tm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tm-card {
    min-width: 0; padding: 14px 16px 8px; border: 1px solid var(--ui-line); border-radius: 14px; background: var(--ui-card); cursor: pointer;
    box-shadow: 0 1px 2px rgba(20, 20, 43, 0.04);
}
.tm-card:hover { border-color: var(--ui-brand-200); }
.tm-card:focus-visible { outline: 2px solid var(--ui-brand); outline-offset: 2px; }
.tm-card.off { background: #fafafd; }
.tm-card-top { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--ui-line); }
.tm-avatar {
    flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 700;
    letter-spacing: 0.02em;
}
.tm-card-who { min-width: 0; }
.tm-card-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.tm-card-sub { color: var(--ui-muted); font-size: 13px; }
.tm-leaves { background: #fff4dc; color: var(--ui-warn); }
.tm-rows { margin: 0; }
.tm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; border-bottom: 1px solid var(--ui-line); font-size: 13.5px; }
.tm-row:last-child { border-bottom: 0; }
.tm-row dt { flex: none; color: var(--ui-muted); font-weight: 400; }
.tm-row dd { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-weight: 600; }
.tm-row dd.tm-none { color: var(--ui-danger); }
.tm-row dd.tm-muted { color: var(--ui-muted); font-weight: 500; }
.tm-google { margin-top: 16px; }
.tm-copy { min-height: 36px; padding: 0 2px; border: 0; background: none; color: var(--ui-ink); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.tm-copy:hover { color: var(--ui-brand); text-decoration: underline; }
.tm-foot { margin: 14px 0 0; color: var(--ui-muted); font-size: 13.5px; }
.tm-hours-body { padding: 0 2px 8px; font-family: var(--ui-font); }
@media (min-width: 768px) { .ui-sheet.tm-hours-sheet { width: min(760px, calc(100vw - 48px)); max-width: none; } }

/* Online booking list (frame 4) */
.ob-crumb { display: inline-block; margin-bottom: 2px; color: var(--ui-muted); font-size: 14px; text-decoration: none; }
.ob-crumb:hover { color: var(--ui-brand); text-decoration: underline; }
.ob-main { max-width: 640px; }
.ob-switch {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--ui-line); border-radius: 14px; background: var(--ui-card);
}
.ob-switch-text { flex: 1; min-width: 0; }
.ob-switch-title { margin: 0; font-size: 15.5px; font-weight: 600; }
.ob-switch-sub { margin: 2px 0 0; color: var(--ui-muted); font-size: 13.5px; overflow-wrap: anywhere; }
.ob-switch-sub a { color: inherit; text-decoration: none; }
.ob-switch-sub a:hover { color: var(--ui-brand); text-decoration: underline; }
.ob-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ob-row {
    display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; border: 1px solid var(--ui-line); border-radius: 14px;
    background: var(--ui-card); color: var(--ui-ink); font-size: 15.5px; font-weight: 600; text-decoration: none;
}
.ob-row:hover { border-color: var(--ui-brand-200); color: var(--ui-ink); }
.ob-row-icon { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--ui-brand-50); color: var(--ui-brand); }
.ob-row-label { flex: 1; min-width: 0; }
.ob-row .ob-row-chevron { flex: none; color: #a3a3b8; }
.ob-moved { margin: 12px 0 0; color: var(--ui-muted); font-size: 13.5px; }
.ob-more-toggle {
    display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: 12px; padding: 0 2px; border: 0; background: none;
    color: var(--ui-muted); font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.ob-more-toggle:hover { color: var(--ui-brand); }
.ob-more-toggle + .ob-rows { margin-top: 2px; }
