h1:focus {
    outline: none;
}

.image-field {
    display: grid;
    gap: 0.45rem;
}

.image-field-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.image-picker {
    display: grid;
    gap: 0.6rem;
    justify-items: start;
}

.image-picker-frame {
    width: 160px;
    height: 160px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.image-picker-frame:has(.image-picker-preview:not([hidden])) {
    border-style: solid;
}

.image-picker-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    border: 0;
}

.image-picker-empty {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    padding: 1rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.3;
    text-align: center;
}

.image-picker-empty svg {
    width: 1.8rem;
    height: 1.8rem;
}

.image-picker [hidden] {
    display: none !important;
}

.image-picker input[type=file] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: 0;
    opacity: 0;
}

.image-picker-choose {
    position: relative;
    cursor: pointer;
}

.image-picker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tip {
    position: relative;
    display: inline-flex;
}

.tip-btn {
    width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    border: 1px solid var(--line, #3a3a3a);
    border-radius: 50%;
    background: transparent;
    color: var(--muted, #a3a3a3);
    font: inherit;
    font-size: 0.72rem;
    line-height: 1;
    cursor: help;
}

.tip-bubble {
    display: none;
    position: absolute;
    z-index: 5;
    left: 0;
    top: calc(100% + 0.4rem);
    width: min(18rem, 70vw);
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line, #3a3a3a);
    border-radius: 0.4rem;
    background: var(--surface);
    color: #f3f0ea;
    font-size: 0.82rem;
    line-height: 1.4;
    font-weight: 400;
}

.tip:hover .tip-bubble,
.tip:focus-within .tip-bubble {
    display: block;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.mobile-dock { display: none; }

@media (max-width: 900px) {
    .admin-shell { display: block; min-height: 100vh; }
    .sidebar { display: none; }
    .admin-main {
        padding: 0.85rem 0.9rem calc(4.6rem + env(safe-area-inset-bottom));
    }
    .admin-main h1 { font-size: 1.85rem; margin-bottom: 0.7rem; }
    .page-head { margin-bottom: 0.85rem; }
    .admin-section, .admin-section:first-of-type { margin-top: 1.25rem; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
    .stat { padding: 0.65rem 0.7rem; }
    .stat strong { font-size: 1.55rem; }
    .stat span { font-size: 0.75rem; }
    .action-grid { grid-template-columns: 1fr 1fr; }
    .action-card { padding: 1rem 0.9rem; }
    .action-card span { font-size: 0.92rem; line-height: 1.3; }
    .day-list li { grid-template-columns: 3.5rem minmax(0, 1fr); }
    .day-list .badge { grid-column: 2; justify-self: start; }
    .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
    .bar-track { grid-column: 1 / -1; }

    .mobile-dock {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        align-items: stretch;
        gap: 0.15rem;
        background: var(--surface);
        border-top: 1px solid var(--border);
        padding: 0.2rem 0.35rem calc(0.25rem + env(safe-area-inset-bottom));
    }
    .mobile-dock > a,
    .mobile-dock > form,
    .mobile-dock .dock-more {
        flex: 1 1 0;
        min-width: 0;
    }
    .mobile-dock > a,
    .mobile-dock summary,
    .mobile-dock > form button {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 3rem;
        width: 100%;
        margin: 0;
        padding: 0.35rem 0.15rem;
        border: 0;
        background: transparent;
        color: var(--muted);
        font-family: var(--sans);
        font-size: 0.72rem;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        cursor: pointer;
    }
    .mobile-dock > a.active,
    .mobile-dock summary:hover,
    .mobile-dock > a:hover { color: var(--brass); }
    .mobile-dock > a.active { box-shadow: inset 0 -2px 0 var(--brass); }
    .dock-more { position: static; }
    .dock-more summary { list-style: none; }
    .dock-more summary::-webkit-details-marker { display: none; }
    .dock-sheet {
        position: fixed;
        left: 0.6rem;
        right: 0.6rem;
        bottom: calc(3.7rem + env(safe-area-inset-bottom));
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
        padding: 0.7rem;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 8px;
        box-shadow: var(--shadow);
    }
    .dock-sheet a,
    .dock-sheet button {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 2.75rem;
        padding: 0.45rem 0.4rem;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--surface);
        color: var(--cream);
        font-family: var(--sans);
        font-size: 0.86rem;
        cursor: pointer;
    }
    .dock-sheet a.active { border-color: var(--brass); color: var(--brass); }
    .dock-sheet form { margin: 0; }

    .admin-main .table:not(.table-keep) { border-collapse: separate; border-spacing: 0 0.65rem; }
    .admin-main .table:not(.table-keep) thead { display: none; }
    .admin-main .table:not(.table-keep),
    .admin-main .table:not(.table-keep) tbody,
    .admin-main .table:not(.table-keep) tr,
    .admin-main .table:not(.table-keep) td { display: block; width: 100%; }
    .admin-main .table:not(.table-keep) tr {
        background: var(--surface);
        border: 1px solid var(--border);
        padding: 0.55rem 0.75rem 0.7rem;
    }
    .admin-main .table:not(.table-keep) td {
        border: 0;
        padding: 0.28rem 0;
        text-align: left;
        white-space: normal;
    }
    .admin-main .table:not(.table-keep) td[data-label] {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 0.75rem;
    }
    .admin-main .table:not(.table-keep) td.when-cell,
    .admin-main .table:not(.table-keep) td.status-cell { align-items: center; }
    .admin-main .table:not(.table-keep) td.when-cell .when-value { margin-left: auto; text-align: right; }
    .admin-main .table:not(.table-keep) td.status-cell .badge { flex: none; margin-left: auto; }
    .admin-main .table:not(.table-keep) td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: var(--muted);
        font-size: 0.68rem;
        letter-spacing: 0.07em;
        text-transform: uppercase;
    }
    .admin-main .table:not(.table-keep) td.block[data-label] { display: block; }
    .admin-main .table:not(.table-keep) td.block[data-label]::before { display: block; margin-bottom: 0.2rem; }
    .admin-main .table:not(.table-keep) tr.is-focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 2px var(--primary);
    }
    .admin-main .table:not(.table-keep) tr.is-focus td { box-shadow: none; }
    .admin-main .table:not(.table-keep) td.actions {
        display: block;
        width: 100%;
        padding-top: 0.75rem;
    }
    .admin-main .table:not(.table-keep) td.actions form { display: inline; }
    .admin-main .table:not(.table-keep) td.actions form.desk-form { display: grid; }
    .admin-main .table:not(.table-keep) td.actions .booking-change:not([open]) > form.desk-form { display: none; }
    .admin-main .table:not(.table-keep) td.actions .btn {
        margin: 0;
        min-height: 2.5rem;
    }
    .admin-main .table:not(.table-keep) td.empty { text-align: center; }
    .admin-main .table:not(.table-keep) tr.with-thumb {
        display: grid;
        grid-template-columns: 4.75rem 1fr;
        column-gap: 0.75rem;
        align-items: center;
    }
    .admin-main .table:not(.table-keep) tr.with-thumb td.thumb {
        grid-column: 1;
        grid-row: 1 / span 6;
        width: 4.75rem;
        padding: 0;
    }
    .admin-main .table:not(.table-keep) tr.with-thumb td.actions { grid-column: 1 / -1; }
    .admin-main .table:not(.table-keep) tr.with-thumb .table-thumb {
        width: 4.75rem;
        height: 4.75rem;
        object-fit: cover;
    }
    .admin-main .table:not(.table-keep) td.thumb:empty { display: none; }
    html[data-theme="light"] .mobile-dock { background: var(--surface); }
    html[data-theme="light"] .mobile-dock > a.active { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
    html[data-theme="light"] .dock-sheet { background: var(--surface); }
    html[data-theme="light"] .dock-sheet a,
    html[data-theme="light"] .dock-sheet button { background: var(--bg); color: var(--cream); }
}

.admin-topbar { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 0.75rem; }
.account-menu { position: relative; }
.account-menu > summary {
    list-style: none;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--cream);
    cursor: pointer;
}
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary:hover,
.account-menu[open] > summary { border-color: var(--brass); color: var(--brass); }
.account-menu svg { width: 1.25rem; height: 1.25rem; display: block; }
.account-panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    z-index: 30;
    width: 16rem;
    padding: 0.95rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
}
.account-name { margin: 0; font-weight: 600; color: var(--cream); }
.account-email { margin: 0.25rem 0 0.9rem; color: var(--muted); font-size: 0.88rem; overflow-wrap: anywhere; }
.account-panel form { margin: 0; }
.account-panel .btn { width: 100%; }
.admin-mobile-bar { display: none; }
html[data-theme="light"] .tip-bubble { background: #ffffff; color: #1c2b36; }

@media (min-width: 901px) {
    .admin-mobile-bar { display: none; }
}

@media (max-width: 900px) {
    .admin-topbar {
        justify-content: flex-start;
        gap: 0.5rem;
        margin: -0.15rem 0 0.85rem;
    }
    .admin-mobile-bar {
        display: flex;
        flex: 1 1 auto;
        flex-flow: row nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 0.75rem;
        min-width: 0;
        margin: 0;
    }
    .admin-mobile-bar .brand {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 1.2rem;
    }
    .admin-mobile-bar .brand-mark { width: 48px; height: 48px; }
    .admin-mobile-bar .theme-toggle {
        flex: 0 0 auto;
        margin-left: auto;
    }
}

.day-board { display: grid; gap: 1.75rem; }
.day-board h2 { margin: 0 0 0.75rem; font-size: 1.25rem; }
.action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.action-card { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 0.45rem; min-height: 6.25rem; padding: 1.05rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); color: var(--muted); text-align: center; }
.action-card strong { color: var(--cream); font-size: 1.85rem; letter-spacing: -0.03em; }
.action-card.is-clear { opacity: 0.72; }
.action-card:hover { border-color: var(--primary); color: var(--cream); }
@media (max-width: 900px) {
    .action-grid { grid-template-columns: 1fr 1fr; }
}
.day-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.day-list li { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr) auto; gap: 0.85rem; align-items: center; padding: 0.85rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.day-list time { font-weight: 600; color: var(--primary); }
.day-list strong { display: block; }
.day-list span { display: block; color: var(--muted); font-size: 0.92rem; }
.day-list .note { margin-top: 0.2rem; }
.empty-day { margin: 0; padding: 1.1rem 1rem; border: 1px dashed var(--border); border-radius: var(--radius-card); }
.page-head a.chip { text-decoration: none; }
.cal-scroll { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.cal-week {
    min-width: 52rem;
    display: grid;
    grid-template-columns: 3.6rem repeat(7, minmax(0, 1fr));
    grid-template-rows: 3.6rem 1fr;
}
.cal-corner { position: sticky; top: 0; left: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.cal-day-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 0.1rem;
    min-height: 3.6rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.cal-day-head strong { color: var(--cream); font-size: 1.15rem; letter-spacing: -0.03em; text-transform: none; }
.cal-day-head.is-today strong { color: var(--primary); }
.cal-times {
    display: grid;
    grid-template-rows: repeat(var(--cal-hours), minmax(3.2rem, 1fr));
    border-right: 1px solid var(--border);
    background: var(--surface);
}
.cal-hour-label {
    color: var(--muted);
    font-size: 0.72rem;
    padding: 0.2rem 0.35rem 0 0;
    text-align: right;
    transform: translateY(-0.45rem);
}
.cal-day-col {
    position: relative;
    display: grid;
    grid-template-rows: repeat(var(--cal-hours), minmax(3.2rem, 1fr));
    min-height: calc(var(--cal-hours) * 3.2rem);
    border-left: 1px solid var(--border);
}
.cal-day-col.is-today { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.cal-slot { border-top: 1px solid var(--border); }
.cal-now {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--danger);
    z-index: 2;
    pointer-events: none;
}
.cal-now::before {
    content: "";
    position: absolute;
    left: -5px;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
}
.cal-block {
    position: absolute;
    z-index: 1;
    overflow: hidden;
    padding: 0.28rem 0.4rem;
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--primary) 55%, var(--border));
    background: color-mix(in srgb, var(--primary) 22%, var(--surface));
    color: var(--cream);
    font-size: 0.75rem;
    line-height: 1.25;
}
.cal-block strong { display: block; font-size: 0.72rem; color: var(--primary); }
.cal-block span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cream); }
.cal-block.is-pending { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 18%, var(--surface)); }
.cal-block.is-confirmed { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, var(--surface)); }
.cal-block.is-done { opacity: 0.72; }
.cal-block.is-blocked {
    z-index: 0;
    border-style: dashed;
    border-color: var(--muted);
    background: repeating-linear-gradient(-45deg, transparent, transparent 6px, color-mix(in srgb, var(--muted) 18%, transparent) 6px, color-mix(in srgb, var(--muted) 18%, transparent) 12px);
    pointer-events: none;
}
.cal-month-item.is-blocked { border-style: dashed; }
.desk-section { margin-top: 1.75rem; margin-bottom: 1.5rem; }
.desk-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 1rem;
    align-items: end;
    margin-top: 0.85rem;
}
.table td.actions form.desk-form { display: grid; }
.desk-form > input[type="hidden"] { display: none; }
.desk-form > label { min-width: 0; }
.desk-form input:not([type="checkbox"]):not([type="hidden"]),
.desk-form select,
.desk-form textarea { width: 100%; min-width: 0; max-width: 100%; }
.desk-form .full,
.desk-form .check,
.desk-form > .btn { grid-column: 1 / -1; }
.desk-form .check { margin-top: 0.35rem; }
.desk-form > .btn { margin-top: 0.35rem; justify-self: start; }
.admin-main .table td.actions { white-space: normal; }
.booking-actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 1.35rem;
    width: 100%;
    min-width: min(100%, 22rem);
}
.booking-primary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    margin-right: auto;
}
.booking-primary .btn { margin-left: 0; }
.booking-tools {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    margin-left: auto;
}
.booking-change summary { cursor: pointer; color: var(--brass); padding: 0.35rem 0; white-space: nowrap; }
.booking-change[open] > .desk-form {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1;
    margin-top: 0;
}
.table td.actions:has(.booking-actions) { width: auto; white-space: normal; }
.table td.status-cell { vertical-align: middle; white-space: nowrap; }
.table td.status-cell .badge { flex: none; }
.table td.actions .booking-change:not([open]) > form.desk-form,
.booking-change:not([open]) > .desk-form { display: none; }
.table tr.is-focus td {
    box-shadow: inset 0 2px 0 var(--primary), inset 0 -2px 0 var(--primary);
}
.table tr.is-focus td:first-child {
    box-shadow: inset 2px 0 0 var(--primary), inset 0 2px 0 var(--primary), inset 0 -2px 0 var(--primary);
}
.table tr.is-focus td:last-child {
    box-shadow: inset -2px 0 0 var(--primary), inset 0 2px 0 var(--primary), inset 0 -2px 0 var(--primary);
}
.load-more { margin: 1rem 0 1.5rem; }
.block-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.block-list li { display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.cal-block:hover { border-color: var(--cream); }
.cal-month {
    min-width: 44rem;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}
.cal-month-dow {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.7rem 0.65rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.cal-month-cell {
    min-height: 8.5rem;
    padding: 0.45rem 0.4rem 0.5rem;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}
.cal-month-cell.is-outside { background: color-mix(in srgb, var(--bg) 35%, var(--surface)); }
.cal-month-cell.is-outside .cal-month-num { color: var(--muted); }
.cal-month-cell.is-today { box-shadow: inset 0 0 0 1px var(--primary); }
.cal-month-num {
    display: inline-flex;
    min-width: 1.6rem;
    justify-content: center;
    color: var(--cream);
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.cal-month-cell.is-today .cal-month-num { color: var(--primary); }
.cal-month-items { display: grid; gap: 0.2rem; }
.cal-month-item {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 0.12rem 0.3rem;
    border-radius: 4px;
    background: color-mix(in srgb, var(--primary) 18%, var(--surface));
    color: var(--cream);
    font-size: 0.72rem;
}
.cal-month-item.is-pending { background: color-mix(in srgb, var(--brass) 20%, var(--surface)); }
.cal-month-item.is-confirmed { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); }
.cal-month-more { color: var(--muted); font-size: 0.72rem; }
.cal-month-more:hover, .cal-month-num:hover { color: var(--primary); }
.week-strip { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; color: var(--muted); }
.week-strip strong { color: var(--cream); margin-left: 0.35rem; }
.bars { display: grid; gap: 0.7rem; }
.bar-row { display: grid; grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; }
.bar-row span { color: var(--cream); }
.bar-track { height: 0.7rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 999px; }
.bar-row strong { min-width: 2rem; text-align: right; }
.promo-target[hidden] { display: none; }
.analytics-shell {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.analytics-studios {
    display: grid;
    gap: 0.15rem;
    padding: 0.7rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    position: sticky;
    top: 0.75rem;
}
.analytics-studios a {
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius);
    color: var(--muted);
}
.analytics-studios a:hover,
.analytics-studios a.active {
    background: var(--surface-2);
    color: var(--cream);
}
.analytics-kicker {
    margin: 1.35rem 0 0.75rem;
    font-size: 1.05rem;
}
.analytics-kicker:first-child { margin-top: 0.35rem; }
@media (max-width: 900px) {
    .analytics-shell { grid-template-columns: 1fr; }
    .analytics-studios {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
}
.settings-form { width: 100%; max-width: 40rem; min-width: 0; }
.settings-form p, .settings-form .muted { overflow-wrap: anywhere; }
.hours-editor { display: grid; gap: 0.55rem; min-width: 0; }
.hours-head, .hours-row {
    display: grid;
    grid-template-columns: minmax(5.5rem, 7.5rem) 3.2rem minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
    min-width: 0;
}
.hours-head { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.hours-times { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem; min-width: 0; }
.hours-row input[type="checkbox"] { width: 1.15rem; height: 1.15rem; justify-self: center; }
.hours-row input[type="time"] { width: 100%; min-width: 0; max-width: 100%; padding: 0.55rem 0.35rem; }
@media (max-width: 900px) {
    .hours-head { display: none; }
    .hours-row {
        grid-template-columns: 1fr auto;
        padding: 0.7rem 0.75rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
    }
    .hours-times { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
    .hours-times { grid-template-columns: 1fr; }
}
.chip-row a.chip { text-decoration: none; }
.badge.completed { color: var(--ok); border-color: var(--ok); }
.record-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.record-card {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.95rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
}
.record-card:has(.record-card-actions) {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.85rem;
}
.record-card-body { display: grid; gap: 0.75rem; min-width: 0; }
.record-card-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 0.35rem 0.75rem; }
.record-card-title { flex: 1 1 10rem; min-width: 0; font-weight: 600; font-size: 1.05rem; line-height: 1.3; overflow-wrap: break-word; }
.record-card-heading .badge { flex: none; }
.record-lines { display: grid; gap: 0.2rem; }
.record-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem 1rem; margin: 0; }
.record-meta div { display: grid; gap: 0.12rem; min-width: 0; }
.record-meta dt { margin: 0; color: var(--muted); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.record-meta dd { margin: 0; overflow-wrap: break-word; }
.record-card-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    justify-self: end;
    gap: 0.45rem;
    margin: 0;
}
.record-card-actions form { margin: 0; width: 100%; }
.record-card-actions .btn { width: 100%; min-width: 8.75rem; margin: 0; justify-content: center; }
@media (max-width: 720px) {
    .record-meta { grid-template-columns: 1fr; }
}
.customer-search {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1rem;
    max-width: 36rem;
}
.customer-search input { flex: 1; }
.customer-list {
    display: grid;
    gap: 0.75rem;
}
.customer-tile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.85rem;
    padding: 0.9rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    color: inherit;
    text-decoration: none;
}
.customer-tile-body { display: grid; gap: 0.2rem; min-width: 0; }
.customer-tile .customer-view { margin: 0; min-width: 5.75rem; pointer-events: none; }
.customer-tile:hover { border-color: var(--brass); }
.customer-tile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.customer-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}
.customer-stats .card-body {
    display: grid;
    gap: 0.25rem;
}
.customer-stats span { color: var(--muted); font-size: 0.85rem; }
.customer-visits {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: grid;
    gap: 0.55rem;
}
.customer-visits li {
    display: grid;
    gap: 0.15rem;
    padding: 0.7rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.customer-visits span { color: var(--muted); }
.setup-check ul { list-style: none; padding: 0; margin: 0.75rem 0 0; display: grid; gap: 0.45rem; }
.setup-check li a { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: inherit; }
.promote-url { word-break: break-all; font-weight: 600; }
.promote-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0; }
.promote-steps, .promote-tips { margin: 0.4rem 0 1rem; padding-left: 1.2rem; }
.promote-caption { display: grid; gap: 0.45rem; margin: 0.8rem 0; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.promote-caption p { margin: 0; }
