/* ==========================================================================
   Melr Hair admin
   Mobile first: most staff use a phone. Lists are cards, never wide tables.

   1. Tokens          5. Forms            9.  Calendar
   2. Base            6. Cards and lists  10. Booking and order detail
   3. Shell           7. Feedback         11. Editors
   4. Buttons         8. Dashboard        12. Reports
   ========================================================================== */

/* 1. Tokens
   ========================================================================== */
:root {
    --plum: #1a0f16;
    --plum-2: #26161f;
    --plum-3: #34202c;
    --plum-line: rgba(255, 255, 255, 0.1);
    --blush: #f1aed7;
    --blush-deep: #e48cc2;
    --rose: #c23d84;
    --petal: #fcebf4;
    --petal-line: #f2d2e4;
    --ink: #1a0f16;
    --ink-soft: #4d3d47;
    --stone: #7a6a73;
    --line: #eee3e9;
    --ground: #faf6f8;
    --paper: #ffffff;
    --on-dark: rgba(255, 255, 255, 0.72);

    --success: #2e7553;
    --success-soft: #e6f4ec;
    --warning: #9a5b00;
    --warning-soft: #fff3dc;
    --danger: #b42b37;
    --danger-soft: #fbe5e7;
    --info: #4b3a9b;
    --info-soft: #ece9fb;

    --font-display: "Playfair Display", Georgia, serif;
    --font-body: "Open Sans", "Helvetica Neue", Arial, sans-serif;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.375rem;
    --text-2xl: clamp(1.5rem, 4vw, 2rem);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    --topbar-height: 56px;
    --tabbar-height: 64px;
    --sidebar-width: 248px;
    --gutter: 16px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --shadow: 0 1px 2px rgba(26, 15, 22, 0.05), 0 4px 16px rgba(26, 15, 22, 0.05);
    --shadow-lift: 0 10px 40px rgba(26, 15, 22, 0.18);
    --focus: 0 0 0 3px var(--paper), 0 0 0 5px var(--rose);
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 2. Base
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
    margin: 0;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus);
    border-radius: var(--radius-sm);
}

[hidden] {
    display: none !important;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    z-index: 100;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--paper);
}

.skip-link:focus {
    left: 8px;
}

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

.small {
    font-size: var(--text-sm);
}

.stack > * + * {
    margin-top: 1rem;
}

.stack--tight > * + * {
    margin-top: 0.5rem;
}

.section-title {
    margin-bottom: 0.75rem;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--stone);
}

.section-title--row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.section {
    margin-top: 1.75rem;
}

/* 3. Shell
   ========================================================================== */
.shell {
    padding-top: var(--topbar-height);
    padding-bottom: calc(var(--tabbar-height) + var(--safe-bottom));
}

.main {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem var(--gutter) 2.5rem;
}

.main--narrow {
    max-width: 760px;
}

/* Top bar (phones and tablets) */
.topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: var(--topbar-height);
    padding: 0 0.5rem 0 var(--gutter);
    background: var(--plum);
    color: var(--paper);
}

.topbar__brand img {
    width: 84px;
    height: auto;
}

.topbar__title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--paper);
    text-decoration: none;
}

/* Tab bar (phones) */
.tabbar {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    height: calc(var(--tabbar-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.tabbar__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    border: 0;
    background: none;
    color: var(--stone);
    font-size: 0.6875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.tabbar__link i {
    font-size: 1.15rem;
}

.tabbar__link[aria-current="page"] {
    color: var(--rose);
}

/* Sidebar (desktop) */
.sidebar {
    display: none;
}

.sidebar__tag {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-pill);
    background: var(--blush);
    color: var(--plum);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (min-width: 992px) {
    .shell {
        padding: 0 0 0 var(--sidebar-width);
    }

    .topbar,
    .tabbar {
        display: none;
    }

    .main {
        padding: 2rem 2.5rem 3rem;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 30;
        display: flex;
        flex-direction: column;
        width: var(--sidebar-width);
        padding: 1.5rem 1rem 1rem;
        background: var(--plum);
        color: var(--paper);
    }

    .sidebar__brand {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        margin: 0 0.5rem 1.75rem;
        text-decoration: none;
    }

    .sidebar__nav {
        display: flex;
        flex: 1;
        flex-direction: column;
        gap: 0.15rem;
        overflow-y: auto;
    }

    .sidebar__link {
        display: flex;
        align-items: center;
        gap: 0.85rem;
        padding: 0.65rem 0.75rem;
        border-radius: var(--radius-sm);
        color: var(--on-dark);
        font-size: var(--text-sm);
        font-weight: 600;
        text-decoration: none;
        transition: background 0.15s var(--ease), color 0.15s var(--ease);
    }

    .sidebar__link i {
        width: 1.1rem;
        text-align: center;
    }

    .sidebar__link:hover {
        background: var(--plum-2);
        color: var(--paper);
    }

    .sidebar__link[aria-current="page"] {
        background: var(--blush);
        color: var(--plum);
    }

    .sidebar__user {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-top: 1rem;
        padding: 0.75rem;
        border-radius: var(--radius-md);
        background: var(--plum-2);
        color: var(--paper);
        text-decoration: none;
    }

    .sidebar__user-text {
        display: flex;
        flex-direction: column;
        min-width: 0;
        font-size: var(--text-sm);
        line-height: 1.3;
    }

    .sidebar__user-text strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sidebar__user-text small {
        color: var(--on-dark);
    }
}

/* Public pages: sign in and password links */
.auth {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 2.5rem var(--gutter);
    background: radial-gradient(ellipse at 80% 0%, #4a2340 0%, var(--plum) 60%);
}

.auth__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.auth__brand img {
    width: 130px;
    height: auto;
}

.auth__main {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow-lift);
}

.auth-card .form {
    margin-top: 1.5rem;
}

.auth-card .notice {
    margin-top: 1.25rem;
}

.auth-card__title {
    font-size: var(--text-2xl);
}

.auth-card__text {
    margin-top: 0.5rem;
    color: var(--ink-soft);
}

.auth-card__link {
    display: block;
    margin-top: 1.25rem;
    color: var(--rose);
    font-size: var(--text-sm);
    font-weight: 600;
    text-align: center;
}

/* Page heading */
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.page-head__title {
    font-size: var(--text-2xl);
}

.page-head__subtitle {
    margin-top: 0.25rem;
    color: var(--stone);
    font-size: var(--text-sm);
}

.page-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 4. Buttons
   ========================================================================== */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.6rem 1.15rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.1s var(--ease);
}

.button:active {
    transform: scale(0.98);
}

.button--dark {
    background: var(--plum);
    color: var(--paper);
}

.button--dark:hover {
    background: var(--plum-3);
}

.button--primary {
    background: var(--blush);
    color: var(--plum);
}

.button--primary:hover {
    background: var(--blush-deep);
}

.button--ghost {
    border-color: var(--line);
    background: var(--paper);
    color: var(--ink);
}

.button--ghost:hover {
    border-color: var(--stone);
}

.button--danger {
    background: var(--danger);
    color: var(--paper);
}

.button--danger-ghost {
    border-color: var(--danger-soft);
    background: var(--paper);
    color: var(--danger);
}

.button--small {
    min-height: 36px;
    padding: 0.4rem 0.85rem;
    font-size: var(--text-xs);
}

.button--block {
    width: 100%;
}

.button--icon {
    width: 44px;
    padding: 0;
}

.button--icon.button--small {
    width: 36px;
}

.button[data-state="loading"] {
    pointer-events: none;
    opacity: 0.7;
}

.button[data-state="loading"]::after {
    content: "";
    width: 0.9em;
    height: 0.9em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.button-row--stack {
    flex-direction: column;
}

.button-row--end {
    justify-content: flex-end;
}

.text-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--rose);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.text-button--danger {
    color: var(--danger);
}

/* 5. Forms
   ========================================================================== */
.form > * + * {
    margin-top: 1rem;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 576px) {
    .form-grid--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .form-grid .field--wide {
        grid-column: 1 / -1;
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.field__label {
    padding: 0;
    font-size: var(--text-sm);
    font-weight: 600;
}

.field__optional {
    color: var(--stone);
    font-weight: 400;
}

.field__input {
    width: 100%;
    min-height: 46px;
    padding: 0.65rem 0.85rem;
    border: 1px solid #ddd0d8;
    border-radius: var(--radius-sm);
    background: var(--paper);
    font-size: 16px;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.field__input:focus {
    outline: none;
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(194, 61, 132, 0.15);
}

textarea.field__input {
    min-height: 90px;
    resize: vertical;
}

select.field__input {
    appearance: none;
    padding-right: 2.25rem;
    background-image: linear-gradient(45deg, transparent 50%, var(--stone) 50%), linear-gradient(135deg, var(--stone) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-repeat: no-repeat;
    background-size: 5px 5px;
}

.field__input[readonly] {
    background: var(--ground);
}

.field__help {
    color: var(--stone);
    font-size: var(--text-xs);
}

.field__error {
    color: var(--danger);
    font-size: var(--text-xs);
    font-weight: 600;
}

.field__error:empty {
    display: none;
}

.field[data-invalid="true"] .field__input {
    border-color: var(--danger);
}

.field__affix {
    display: flex;
    align-items: stretch;
}

.field__affix > span {
    display: grid;
    place-items: center;
    padding: 0 0.85rem;
    border: 1px solid #ddd0d8;
    border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: var(--ground);
    color: var(--stone);
    font-weight: 600;
}

.field__affix .field__input {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.field__password {
    position: relative;
}

.field__password .field__input {
    padding-right: 3rem;
}

.field__reveal {
    position: absolute;
    top: 50%;
    right: 4px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--stone);
    transform: translateY(-50%);
    cursor: pointer;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: 32px;
    cursor: pointer;
}

.check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.check__box {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-top: 1px;
    border: 1.5px solid #cdbcc6;
    border-radius: 7px;
    background: var(--paper);
    color: transparent;
    font-size: 0.75rem;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.check input:checked + .check__box {
    border-color: var(--plum);
    background: var(--plum);
    color: var(--paper);
}

.check input:focus-visible + .check__box {
    box-shadow: var(--focus);
}

.check__label {
    display: flex;
    flex-direction: column;
    font-size: var(--text-sm);
    font-weight: 600;
}

.check__label small {
    color: var(--stone);
    font-weight: 400;
}

.segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.segmented__option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented__option span {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--paper);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
}

.segmented__option input:checked + span {
    border-color: var(--plum);
    background: var(--plum);
    color: var(--paper);
}

.segmented__option input:focus-visible + span {
    box-shadow: var(--focus);
}

.search-bar {
    position: relative;
    margin-bottom: 1rem;
}

.stack + .search-bar,
.panel-toggle + .search-bar {
    margin-top: 1rem;
}

.search-bar i {
    position: absolute;
    top: 50%;
    left: 0.95rem;
    color: var(--stone);
    transform: translateY(-50%);
}

.search-bar .field__input {
    padding-left: 2.6rem;
    border-radius: var(--radius-pill);
}

/* 6. Cards and lists
   ========================================================================== */
.card {
    display: block;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.card + .card {
    margin-top: 0.6rem;
}

.card--link {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding-right: 2.25rem;
    text-decoration: none;
    transition: border-color 0.15s var(--ease);
}

.card--link:hover {
    border-color: var(--petal-line);
}

.card__chevron {
    position: absolute;
    top: 50%;
    right: 1rem;
    color: #cdbcc6;
    font-size: 0.8rem;
    transform: translateY(-50%);
}

.card__title {
    margin-bottom: 0.75rem;
    font-size: var(--text-lg);
}

.card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.list > .card + .card {
    margin-top: 0;
}

.list-group__title {
    margin: 1.25rem 0 0.5rem;
    color: var(--stone);
    font-size: var(--text-sm);
    font-weight: 700;
}

.booking-card__time {
    display: flex;
    flex: 0 0 56px;
    flex-direction: column;
    line-height: 1.2;
}

.booking-card__time strong {
    font-size: var(--text-lg);
}

.booking-card__time small {
    color: var(--stone);
}

.booking-card__body,
.order-card__body,
.person-card__body {
    min-width: 0;
}

.booking-card__name,
.order-card__name,
.person-card__name {
    font-weight: 700;
}

.booking-card__meta,
.order-card__meta,
.person-card__meta {
    color: var(--stone);
    font-size: var(--text-sm);
}

.booking-card__services {
    margin-top: 0.15rem;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: var(--text-sm);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booking-card__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.order-card__icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--petal);
    color: var(--rose);
}

.person-card {
    align-items: center;
}

.avatar {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--blush);
    color: var(--plum);
    font-size: var(--text-sm);
    font-weight: 700;
}

.avatar--small {
    width: 32px;
    height: 32px;
    font-size: var(--text-xs);
}

.avatar--large {
    width: 64px;
    height: 64px;
    font-size: var(--text-lg);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    background: var(--ground);
    color: var(--ink-soft);
    font-size: var(--text-xs);
    font-weight: 700;
    white-space: nowrap;
}

.pill[data-tone="success"] { background: var(--success-soft); color: var(--success); }
.pill[data-tone="warning"] { background: var(--warning-soft); color: var(--warning); }
.pill[data-tone="danger"]  { background: var(--danger-soft);  color: var(--danger); }
.pill[data-tone="info"]    { background: var(--info-soft);    color: var(--info); }

.chips {
    display: flex;
    gap: 0.4rem;
    margin: 0 calc(var(--gutter) * -1) 1rem;
    padding: 0 var(--gutter) 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.chips::-webkit-scrollbar {
    display: none;
}

.chip {
    flex: 0 0 auto;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--paper);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.chip[aria-current="true"] {
    border-color: var(--plum);
    background: var(--plum);
    color: var(--paper);
}

@media (min-width: 992px) {
    .chips {
        flex-wrap: wrap;
        margin: 0 0 1rem;
        padding: 0;
        overflow: visible;
    }
}

.details {
    display: flex;
    flex-direction: column;
}

.details__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
    font-size: var(--text-sm);
}

.details__row:last-child {
    border-bottom: 0;
}

.details__row dt {
    color: var(--stone);
}

.details__row dd {
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.details__row--strong dt,
.details__row--strong dd {
    color: var(--ink);
    font-weight: 700;
}

.details__row--danger dd {
    color: var(--danger);
    font-weight: 700;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
}

.pager__label {
    color: var(--stone);
    font-size: var(--text-sm);
}

/* Collapsible panels (accordion) */
.panel-toggle {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.panel-toggle + .panel-toggle {
    margin-top: 0.6rem;
}

.panel-toggle__summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 56px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.panel-toggle__summary::-webkit-details-marker {
    display: none;
}

.panel-toggle__summary > i:first-child {
    width: 1.25rem;
    color: var(--rose);
    text-align: center;
}

.panel-toggle__summary > span {
    flex: 1;
    min-width: 0;
}

.panel-toggle__summary > .avatar,
.panel-toggle__summary > .pill {
    flex: 0 0 auto;
}

.panel-toggle__chevron {
    color: var(--stone);
    font-size: 0.8rem;
    transition: transform 0.2s var(--ease);
}

.panel-toggle[open] > .panel-toggle__summary .panel-toggle__chevron {
    transform: rotate(180deg);
}

.panel-toggle__body {
    padding: 0 1rem 1.1rem;
}

.panel-toggle[data-tone="danger"] .panel-toggle__summary > i:first-child {
    color: var(--danger);
}

.panel-toggle__meta {
    color: var(--stone);
    font-size: var(--text-xs);
    font-weight: 400;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

.timeline__item {
    position: relative;
    display: flex;
    gap: 0.85rem;
    padding-bottom: 1.1rem;
}

.timeline__item:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 34px;
    bottom: 0;
    left: 16px;
    width: 2px;
    background: var(--line);
}

.timeline__icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ground);
    color: var(--stone);
    font-size: 0.8rem;
}

.timeline__item[data-type="MESSAGE"] .timeline__icon { background: var(--info-soft); color: var(--info); }
.timeline__item[data-type="REFUND"] .timeline__icon,
.timeline__item[data-type="ATTENTION"] .timeline__icon { background: var(--danger-soft); color: var(--danger); }
.timeline__item[data-type="PAYMENT"] .timeline__icon { background: var(--success-soft); color: var(--success); }

.timeline__body {
    min-width: 0;
    padding-top: 0.35rem;
}

.timeline__summary {
    font-size: var(--text-sm);
}

.timeline__message {
    margin-top: 0.4rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--ground);
    font-size: var(--text-sm);
    overflow-wrap: anywhere;
}

.timeline__meta {
    margin-top: 0.2rem;
    color: var(--stone);
    font-size: var(--text-xs);
}

/* Bottom sheet / dialog */
.sheet {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 15, 22, 0.5);
    animation: fade 0.2s var(--ease);
}

.sheet__panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    padding: 0.75rem var(--gutter) calc(1.5rem + var(--safe-bottom));
    overflow-y: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--paper);
    animation: rise 0.25s var(--ease);
}

.sheet__panel--center {
    padding-top: 1.75rem;
    text-align: center;
}

.sheet__handle {
    width: 40px;
    height: 4px;
    margin: 0 auto 1rem;
    border-radius: 2px;
    background: var(--line);
}

.sheet__title {
    font-size: var(--text-xl);
}

.sheet__text {
    margin: 0.5rem 0 1.25rem;
    color: var(--ink-soft);
}

.sheet__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.sheet__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem 0.25rem;
    border-radius: var(--radius-md);
    background: var(--ground);
    font-size: var(--text-xs);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.sheet__item i {
    color: var(--rose);
    font-size: 1.25rem;
}

.sheet__item[aria-current="page"] {
    background: var(--petal);
}

@media (min-width: 576px) {
    .sheet {
        align-items: center;
        padding: 1rem;
    }

    .sheet__panel {
        border-radius: var(--radius-lg);
    }
}

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

@keyframes rise {
    from { transform: translateY(24px); opacity: 0; }
}

/* 7. Feedback
   ========================================================================== */
.notice {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: var(--info-soft);
    color: var(--info);
    font-size: var(--text-sm);
}

.notice > i {
    margin-top: 0.15rem;
}

.notice[data-tone="error"]   { background: var(--danger-soft);  color: var(--danger); }
.notice[data-tone="success"] { background: var(--success-soft); color: var(--success); }
.notice[data-tone="warning"] { background: var(--warning-soft); color: var(--warning); }

.attention {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid #f3c3c8;
    border-radius: var(--radius-md);
    background: var(--danger-soft);
    color: #6e1720;
    font-size: var(--text-sm);
}

.attention__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--danger);
    font-weight: 700;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 2rem 1rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    text-align: center;
}

.empty-state--page {
    max-width: 480px;
    margin: 3rem auto;
    padding: 2.5rem 1.5rem;
    border-style: solid;
}

.empty-state__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--petal);
    color: var(--rose);
    font-size: 1.35rem;
}

.empty-state__icon[data-tone="danger"] {
    background: var(--danger-soft);
    color: var(--danger);
}

.empty-state__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
}

.empty-state__text {
    max-width: 36ch;
    color: var(--stone);
    font-size: var(--text-sm);
}

.empty-state .button {
    margin-top: 0.5rem;
}

.toasts {
    position: fixed;
    right: 0;
    bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 0.75rem);
    left: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0 var(--gutter);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 480px;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-pill);
    background: var(--plum);
    color: var(--paper);
    box-shadow: var(--shadow-lift);
    font-size: var(--text-sm);
    font-weight: 600;
    animation: rise 0.25s var(--ease);
}

.toast[data-tone="error"] {
    background: var(--danger);
}

.toast i {
    color: var(--blush);
}

.toast[data-tone="error"] i {
    color: var(--paper);
}

@media (min-width: 992px) {
    .toasts {
        bottom: 1.5rem;
        left: var(--sidebar-width);
    }
}

/* 8. Dashboard
   ========================================================================== */
.greeting {
    margin-bottom: 1.25rem;
}

.greeting__date {
    color: var(--stone);
    font-size: var(--text-sm);
    font-weight: 600;
}

.greeting__title {
    margin-top: 0.15rem;
    font-size: var(--text-2xl);
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

@media (min-width: 768px) {
    .stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.stat__label {
    color: var(--stone);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stat__value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.1;
}

.stat__hint {
    color: var(--stone);
    font-size: var(--text-xs);
}

.stat[data-tone="danger"] .stat__value {
    color: var(--danger);
}

.stat--dark {
    border-color: var(--plum);
    background: var(--plum);
    color: var(--paper);
}

.stat--dark .stat__label,
.stat--dark .stat__hint {
    color: var(--on-dark);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

/* 9. Calendar
   ========================================================================== */
.view-switch {
    display: inline-flex;
    padding: 0.25rem;
    border-radius: var(--radius-pill);
    background: var(--paper);
    border: 1px solid var(--line);
}

.view-switch a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
}

.view-switch a[aria-current="page"] {
    background: var(--plum);
    color: var(--paper);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.calendar {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calendar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.6rem 0.6rem 1rem;
    border-bottom: 1px solid var(--line);
}

.calendar__month {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
}

.calendar__nav {
    display: flex;
    gap: 0.25rem;
}

.calendar__weekdays,
.calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar__weekdays {
    padding: 0.5rem 0.25rem 0.25rem;
    color: var(--stone);
    font-size: var(--text-xs);
    font-weight: 700;
    text-align: center;
}

.calendar__grid {
    gap: 2px;
    padding: 0.25rem 0.25rem 0.5rem;
}

.calendar__day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-height: 54px;
    padding: 0.4rem 0.1rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    cursor: pointer;
    transition: background 0.15s var(--ease);
}

.calendar__day:hover {
    background: var(--ground);
}

.calendar__day[data-outside="true"] {
    visibility: hidden;
    pointer-events: none;
}

.calendar__date {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: var(--text-sm);
    font-weight: 600;
}

.calendar__day[data-today="true"] .calendar__date {
    color: var(--rose);
    box-shadow: inset 0 0 0 1.5px var(--rose);
}

.calendar__day[aria-pressed="true"] .calendar__date {
    background: var(--plum);
    color: var(--paper);
    box-shadow: none;
}

.calendar__day[data-past="true"] .calendar__date {
    color: var(--stone);
}

.calendar__count {
    min-width: 20px;
    padding: 0 0.35rem;
    border-radius: var(--radius-pill);
    background: var(--blush);
    color: var(--plum);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 18px;
}

.calendar__count[data-attention="true"] {
    background: var(--danger);
    color: var(--paper);
}

.calendar__chips {
    display: none;
}

.agenda {
    margin-top: 1.25rem;
    scroll-margin-top: calc(var(--topbar-height) + 12px);
}

.agenda__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.agenda__title {
    font-size: var(--text-xl);
}

.calendar-layout {
    display: grid;
    gap: 0;
}

@media (min-width: 992px) {
    .calendar-layout {
        grid-template-columns: minmax(0, 1fr) 340px;
        align-items: start;
        gap: 1.5rem;
    }

    .calendar-layout .agenda {
        position: sticky;
        top: 1.5rem;
        margin-top: 0;
    }

    .calendar__day {
        align-items: stretch;
        min-height: 104px;
        padding: 0.4rem;
        border: 1px solid transparent;
    }

    .calendar__day[aria-pressed="true"] {
        border-color: var(--plum);
        background: var(--ground);
    }

    .calendar__date {
        width: 28px;
        height: 28px;
    }

    .calendar__count {
        display: none;
    }

    .calendar__chips {
        display: flex;
        flex-direction: column;
        gap: 2px;
        width: 100%;
    }

    .calendar__chip {
        overflow: hidden;
        padding: 0.1rem 0.35rem;
        border-radius: 5px;
        background: var(--petal);
        color: var(--plum);
        font-size: 0.6875rem;
        font-weight: 600;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .calendar__chip[data-attention="true"] {
        background: var(--danger-soft);
        color: var(--danger);
    }

    .calendar__chip[data-status="CANCELLED"],
    .calendar__chip[data-status="EXPIRED"] {
        text-decoration: line-through;
        opacity: 0.6;
    }

    .calendar__more {
        color: var(--stone);
        font-size: 0.6875rem;
        font-weight: 600;
        text-align: left;
    }
}

/* Slot picker (new booking, reschedule) */
.slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 0.4rem;
}

.slot {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
}

.slot[aria-pressed="true"] {
    border-color: var(--plum);
    background: var(--plum);
    color: var(--paper);
}

.picker-calendar .calendar__day[data-status="closed"],
.picker-calendar .calendar__day[data-status="past"],
.picker-calendar .calendar__day[data-status="full"] {
    opacity: 0.35;
    pointer-events: none;
}

.picker-calendar .calendar__day {
    min-height: 44px;
}

@media (min-width: 992px) {
    .picker-calendar .calendar__day {
        align-items: center;
        min-height: 48px;
    }
}

/* 10. Booking and order detail
   ========================================================================== */
.detail-layout {
    display: grid;
    gap: 1rem;
}

@media (min-width: 992px) {
    .detail-layout {
        grid-template-columns: minmax(0, 1fr) 360px;
        align-items: start;
        gap: 1.5rem;
    }
}

.hero-card {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: var(--plum);
    color: var(--paper);
}

.hero-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.hero-card__when {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    line-height: 1.25;
}

.hero-card__sub {
    margin-top: 0.25rem;
    color: var(--on-dark);
    font-size: var(--text-sm);
}

.hero-card__ref {
    color: var(--blush);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
}

.hero-card .pill {
    background: rgba(255, 255, 255, 0.12);
    color: var(--paper);
}

.contact-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.hero-card .contact-row .button {
    flex: 1;
    border-color: var(--plum-line);
    background: var(--plum-2);
    color: var(--paper);
}

.line-items {
    padding: 0;
    list-style: none;
}

.line-items li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
    font-size: var(--text-sm);
}

.line-items li:last-child {
    border-bottom: 0;
}

.line-items small {
    display: block;
    color: var(--stone);
}

.return-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
}

.return-line .field__input {
    width: 84px;
}

.stepper-input {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.stepper-input .field__input {
    width: 64px;
    text-align: center;
}

/* 11. Editors: catalog, products, policy
   ========================================================================== */
.tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--paper);
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tabs a,
.tabs button {
    flex: 1 0 auto;
    white-space: nowrap;
    padding: 0.55rem 0.5rem;
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.tabs a[aria-current="page"],
.tabs button[aria-selected="true"] {
    background: var(--plum);
    color: var(--paper);
}

.tabs__badge {
    display: inline-grid;
    place-items: center;
    min-width: 1.25rem;
    height: 1.25rem;
    margin-left: 0.25rem;
    padding: 0 0.35rem;
    border-radius: var(--radius-pill);
    background: var(--rose);
    color: var(--paper);
    font-size: var(--text-xs);
}

.thread {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
}

.thread__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 88%;
}

.thread__item[data-from="salon"] {
    align-self: flex-end;
    align-items: flex-end;
}

.thread__bubble {
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px;
    background: var(--paper);
    overflow-wrap: anywhere;
}

.thread__item[data-from="salon"] .thread__bubble {
    border-color: var(--plum);
    border-radius: var(--radius-lg) var(--radius-lg) 4px var(--radius-lg);
    background: var(--plum);
    color: var(--paper);
}

.thread__item[data-unread="true"] .thread__bubble {
    border-color: var(--blush-deep);
    background: var(--petal);
}

.thread__subject {
    margin: 0 0 0.25rem;
    font-weight: 700;
}

.thread__body {
    margin: 0;
}

.thread__meta {
    margin: 0.35rem 0.25rem 0;
    color: var(--stone);
    font-size: var(--text-xs);
}

.thread__reply {
    width: 100%;
}

.thumb {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background: var(--ground);
    object-fit: cover;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 0.5rem;
}

.image-tile {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--ground);
}

.image-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-tile__remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(26, 15, 22, 0.75);
    color: var(--paper);
    cursor: pointer;
}

.image-tile--add {
    display: grid;
    place-items: center;
    border-style: dashed;
    color: var(--stone);
    cursor: pointer;
}

.image-tile--add input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

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

.image-field .thumb {
    width: 72px;
    height: 72px;
}

.upload-button {
    position: relative;
    overflow: hidden;
}

.upload-button input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.hours-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}

.hours-row__times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.hours-row[data-closed="true"] .hours-row__times {
    display: none;
}

@media (min-width: 576px) {
    .hours-row {
        grid-template-columns: 160px 1fr;
        align-items: center;
    }
}

/* Policy editor */
.editor-section {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.editor-section + .editor-section {
    margin-top: 0.75rem;
}

.editor-section > summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 60px;
    padding: 0.75rem 1rem;
    list-style: none;
    cursor: pointer;
}

.editor-section > summary::-webkit-details-marker {
    display: none;
}

.editor-section__icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--petal);
    color: var(--rose);
}

.editor-section__name {
    flex: 1;
    min-width: 0;
    font-weight: 700;
}

.editor-section__name small {
    display: block;
    color: var(--stone);
    font-weight: 400;
}

.editor-section__body {
    padding: 0 1rem 1rem;
}

.editor-block {
    margin-top: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--ground);
}

.editor-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.editor-block__type {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--stone);
}

.editor-block__tools {
    display: flex;
    gap: 0.25rem;
}

.editor-block .field__input,
.editor-block .ql-container {
    background: var(--paper);
}

.editor-subcard {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
}

.editor-subcard__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: var(--text-sm);
    font-weight: 700;
}

.add-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.save-bar {
    position: sticky;
    bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 0.5rem);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding: 0.75rem 0.75rem 0.75rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--plum);
    color: var(--paper);
    box-shadow: var(--shadow-lift);
}

.save-bar__text {
    font-size: var(--text-sm);
}

@media (min-width: 992px) {
    .save-bar {
        bottom: 1rem;
    }
}

.ql-toolbar.ql-snow {
    border-color: #ddd0d8;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: var(--paper);
    font-family: var(--font-body);
}

.ql-container.ql-snow {
    min-height: 140px;
    border-color: #ddd0d8;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-family: var(--font-body);
    font-size: 16px;
}

/* 12. Reports
   ========================================================================== */
.bars {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bar {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 80px;
    align-items: center;
    gap: 0.6rem;
    font-size: var(--text-xs);
}

.bar__label {
    color: var(--stone);
    font-weight: 600;
}

.bar__track {
    position: relative;
    height: 12px;
    border-radius: var(--radius-pill);
    background: var(--ground);
    overflow: hidden;
}

.bar__fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: var(--radius-pill);
    background: var(--rose);
}

.bar__value {
    font-weight: 700;
    text-align: right;
}

.bar[data-empty="true"] .bar__value {
    color: var(--stone);
    font-weight: 400;
}

.breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breakdown .pill {
    padding: 0.35rem 0.75rem;
    font-size: var(--text-sm);
}

.text-danger {
    color: var(--danger);
}

.quick-status {
    margin-bottom: 0.25rem;
}

.quick-status .button {
    flex: 1;
}

.button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.toolbar__filter {
    min-width: 200px;
}

.filter-dates {
    margin-bottom: 0.5rem;
}

.panel-toggle--flat {
    box-shadow: none;
}

.option-row {
    align-items: center;
    padding: 0.35rem 0;
}

.option-row .check__label {
    flex: 1;
}

.option-row__price {
    font-size: var(--text-sm);
    font-weight: 700;
}

.selected-customer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--petal);
}

.selected-customer .person-card__body {
    flex: 1;
}

.result-button {
    width: 100%;
    border: 1px solid var(--line);
    cursor: pointer;
    text-align: left;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-card__name {
    font-size: var(--text-xl);
}


.contact-row--light .button {
    flex: 1;
}

.stats--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats--3 .stat__value {
    font-size: 1.35rem;
}

.product-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.address {
    white-space: pre-line;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.field__input--small {
    min-height: 38px;
    padding: 0.4rem 0.7rem;
    font-size: var(--text-sm);
}

.catalog-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.catalog-row__text {
    flex: 1;
    min-width: 0;
}

.catalog-row__text small {
    display: block;
    color: var(--stone);
    font-weight: 400;
}

.danger-zone {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

/* 13. Editor extras, reviews, messages, staff
   ========================================================================== */
.segmented--icons {
    flex-wrap: wrap;
}

.segmented--icons .segmented__option span {
    min-width: 44px;
}

.editor-add-label {
    margin: 1rem 0 0;
}

.editor-section__foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.editor-add-section {
    margin-top: 0.75rem;
}

.editor-card__kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--rose);
    font-size: var(--text-xs);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.editor-card__title .field__input {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
}

.editor-card__lines {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.75rem;
    counter-reset: card-line;
}

.editor-pair {
    padding: 0.75rem;
    border: 1px solid var(--petal-line);
    border-left: 3px solid var(--blush);
    border-radius: var(--radius-sm);
    background: var(--ground);
    counter-increment: card-line;
}

.editor-pair__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.editor-pair__number::before {
    content: "Line " counter(card-line);
    color: var(--stone);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.editor-pair .field__input {
    background: var(--paper);
}

.editor-subcard .text-button,
.editor-block > .text-button {
    margin-top: 0.5rem;
}

.rich-editor {
    min-height: 140px;
}

.rich-editor .ql-editor {
    min-height: 140px;
    line-height: 1.6;
}

.quote-card__text,
.staff-card__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.quote-card__quote {
    display: -webkit-box;
    overflow: hidden;
    font-weight: 500;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.staff-card__name {
    font-weight: 700;
}

.staff-card .panel-toggle__meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card--link.message-card {
    flex-direction: column;
    align-items: stretch;
}

.message-card__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.message-card__text {
    margin: 0.85rem 0;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}

.message-card__email {
    margin: 0.5rem 0 0;
    overflow-wrap: anywhere;
}

.message-card[data-status="NEW"] {
    border-left: 3px solid var(--rose);
}

.message-card[data-status="ARCHIVED"] {
    opacity: 0.75;
}

/* Reports extras */
.bars--scroll {
    max-height: 420px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.bar--wide {
    grid-template-columns: 96px minmax(0, 1fr) 80px;
}

.bar__fill--refund {
    background: var(--danger);
    opacity: 0.7;
    top: auto;
    height: 4px;
}

.bar__value small {
    display: block;
    font-weight: 400;
}

.bars__legend {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.75rem 0 0;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rose);
}

.legend-dot--refund {
    margin-left: 0.75rem;
    background: var(--danger);
}

.live-values {
    margin-top: 1rem;
}

.live-values__list {
    display: grid;
    gap: 0.4rem;
}

.live-value {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.1rem 0.75rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--ground);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.live-value code {
    color: var(--rose);
    font-size: var(--text-sm);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.live-value__label {
    grid-column: 1;
    color: var(--stone);
    font-size: var(--text-xs);
}

.live-value__value {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    font-weight: 700;
}

/* Drag and drop ordering */
.sort-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
}

.sortable-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sortable-list + .list-group__title {
    margin-top: 1.5rem;
}

.sortable-list[data-state="saving"] {
    opacity: 0.7;
}

.sortable-item .panel-toggle__summary {
    padding-left: 0.25rem;
}

.drag-handle {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: -0.5rem 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--stone);
    cursor: grab;
    touch-action: none;
}

.drag-handle:hover,
.drag-handle:focus-visible {
    background: var(--ground);
    color: var(--ink);
}

.drag-handle:active {
    cursor: grabbing;
}

.sortable-item--chosen {
    box-shadow: var(--shadow-lift);
}

.sortable-item--ghost {
    opacity: 0.35;
    background: var(--petal);
}

.sortable-list .panel-toggle + .panel-toggle {
    margin-top: 0;
}

.image-field__empty {
    display: grid;
    place-items: center;
    border: 1px dashed var(--line);
    color: var(--stone);
    font-size: 1.25rem;
}

/* "{{" live value suggestions */
.token-menu {
    position: absolute;
    z-index: 60;
    max-height: 260px;
    min-width: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    box-shadow: var(--shadow-lift);
}

.token-menu__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 0.75rem;
    width: 100%;
    min-height: 44px;
    padding: 0.5rem 0.65rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.token-menu__item[aria-selected="true"],
.token-menu__item:hover {
    background: var(--petal);
}

.token-menu__item code {
    color: var(--rose);
    font-size: var(--text-sm);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.token-menu__label {
    grid-column: 1;
    color: var(--stone);
    font-size: var(--text-xs);
}

.token-menu__value {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    font-size: var(--text-sm);
}

.release-setting {
    margin-top: 0.5rem;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--ground);
}

.release-setting [data-release-fields] {
    margin-top: 0.75rem;
}

/* Bags (website carts) */
.bar--long {
    grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) minmax(4.5rem, auto);
}

.bar--long .bar__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .bar--long {
        grid-template-columns: minmax(0, 1fr) minmax(4.5rem, auto);
        row-gap: 0.25rem;
    }

    .bar--long .bar__track {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

.avatar--muted {
    background: var(--ground);
    color: var(--stone);
}

.plain-list {
    margin: 0;
    padding-left: 1.1rem;
}

.plain-list li + li {
    margin-top: 0.25rem;
}

.stat__value small {
    font-size: var(--text-sm);
    font-weight: 400;
    color: inherit;
    opacity: 0.7;
}

/* Static modal (edit forms) */
.modal__panel {
    max-width: 620px;
    text-align: left;
}

.modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.5rem 0 1rem;
}

body[data-modal-open="true"] {
    overflow: hidden;
}

.tabs button {
    border: 0;
    background: transparent;
    color: inherit;
    font-family: inherit;
    cursor: pointer;
}

/* Client profile */
.profile-card--detailed {
    display: block;
}

.profile-card__top {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-card__who {
    flex: 1;
    min-width: 0;
}

.profile-card--detailed .details {
    margin-top: 1rem;
}

.profile-card__notes {
    margin-top: 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--ground);
    font-size: var(--text-sm);
}

.profile-card__notes p {
    margin: 0;
    overflow-wrap: anywhere;
}

.profile-card__notes .profile-card__notes-label {
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.main > .notice {
    margin-bottom: 1rem;
}

.back-link {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--ink-soft);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    color: var(--plum);
}

@media (min-width: 992px) {
    .back-link {
        display: inline-flex;
    }
}

.conversation-group {
    margin-bottom: 1.5rem;
}

.tracking-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.tracking-line__number {
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* Blocked time and banners */
.block-card__text,
.banner-card__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.block-card__when,
.banner-card__name {
    font-weight: 700;
}

.block-card[data-state="ended"],
.banner-card[data-state="ended"] {
    opacity: 0.7;
}

.banner-editor.ql-container.ql-snow {
    min-height: 96px;
}

.banner-editor .ql-editor {
    min-height: 96px;
    line-height: 1.6;
}

.banner-preview {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--plum);
    color: var(--paper);
    font-size: var(--text-sm);
    line-height: 1.55;
    text-align: center;
}

.banner-preview p {
    margin: 0;
}

.banner-preview a {
    color: var(--blush);
    font-weight: 700;
}

.calendar__day[data-blocked="day"] {
    background: repeating-linear-gradient(135deg, var(--ground) 0 6px, var(--line) 6px 8px);
}

.calendar__day[data-blocked="day"] .calendar__date {
    color: var(--stone);
    text-decoration: line-through;
}

.calendar__block-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--stone);
}

.agenda-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px dashed var(--stone);
    border-radius: var(--radius-md);
    color: var(--ink-soft);
    text-decoration: none;
}

.agenda-block__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    font-size: var(--text-sm);
}

.agenda-block__text strong {
    color: var(--ink);
}

@media (min-width: 992px) {
    .calendar__block-dot {
        display: none;
    }

    .calendar__chip[data-blocked="true"] {
        background: var(--line);
        color: var(--ink-soft);
    }
}
