:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-soft: #f9fafc;
    --surface-strong: #eef2ff;
    --text: #111827;
    --muted: #667085;
    --muted-2: #98a2b3;
    --line: #e6e9f0;
    --line-strong: #d7ddea;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: #eef2ff;
    --primary-text: #3730a3;
    --success: #079455;
    --success-soft: #ecfdf3;
    --warning: #dc6803;
    --warning-soft: #fff4e5;
    --danger: #d92d20;
    --danger-soft: #fef3f2;
    --sidebar: #ffffff;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow: 0 16px 40px rgba(16, 24, 40, 0.08);
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 24px;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.sidebar-footer {
    flex-wrap: wrap;
}

.sidebar-footer small {
    display: block;
    width: calc(100% - 48px);
    margin-left: 48px;
    color: #8e8e93;
    font-size: 0.72rem;
}

.staff-access-panel {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.staff-permission-grid {
    margin-top: 18px;
}

.staff-permission-grid.permissions-disabled {
    opacity: 0.55;
}

.staff-permission-grid .settings-toggle.permission-disabled {
    opacity: 0.5;
}

.access-scope-notice {
    margin: 14px 0 18px;
    padding: 14px 16px;
    border: 1px solid #b9ded8;
    border-radius: 16px;
    background: #f0faf8;
    color: #123f3b;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.access-scope-notice > span {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #d7f1ed;
    display: grid;
    place-items: center;
}

.access-scope-notice strong,
.access-scope-notice p {
    display: block;
}

.access-scope-notice strong {
    font-size: 14px;
}

.access-scope-notice p {
    margin: 3px 0 0;
    color: #52706d;
    font-size: 12px;
    line-height: 1.45;
}

#serviceManagementNotice {
    margin: 0;
}

.confirmation-open {
    overflow: hidden;
}

.confirmation-overlay {
    position: fixed;
    inset: 0;
    z-index: 6200;
    padding: 20px;
    background: rgba(11, 18, 25, .56);
    backdrop-filter: blur(7px);
    display: grid;
    place-items: center;
}

.confirmation-dialog {
    width: min(440px, 100%);
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 24px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 30px 90px rgba(11, 18, 25, .35);
    animation: confirmation-in .18s ease-out;
}

@keyframes confirmation-in {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.confirmation-dialog__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: #fff1f0;
    color: #c43227;
    display: grid;
    place-items: center;
}

.confirmation-dialog__icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.confirmation-dialog__copy h3 {
    margin: 5px 0 8px;
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -.035em;
}

.confirmation-dialog__copy p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.confirmation-dialog__actions {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.danger-confirm-btn {
    min-height: 46px;
    border: 1px solid #c43227;
    border-radius: 13px;
    background: #c43227;
    color: #fff;
    font-weight: 750;
}

.danger-confirm-btn:hover {
    border-color: #a9251d;
    background: #a9251d;
}

.danger-confirm-btn:disabled {
    cursor: not-allowed;
    border-color: #e6aaa5;
    background: #e6aaa5;
    box-shadow: none;
}

.salon-danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-color: #f0c8c4;
    background: #fffafa;
}

.salon-danger-zone__copy {
    min-width: 0;
}

.salon-danger-zone__copy .panel-kicker {
    color: #a83229;
}

.salon-danger-zone__copy h3 {
    margin: 0;
    color: #72251f;
    font-size: 20px;
    letter-spacing: -.025em;
}

.salon-danger-zone__copy p {
    max-width: 760px;
    margin: 7px 0 0;
    color: #755f5d;
    font-size: 13px;
    line-height: 1.55;
}

.salon-delete-open-btn {
    min-width: 138px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 13px;
    font: inherit;
    font-weight: 760;
    white-space: nowrap;
}

.salon-delete-overlay {
    z-index: 6600;
}

.salon-delete-dialog {
    width: min(540px, 100%);
}

.salon-delete-warning {
    margin-top: 18px;
    padding: 14px 15px;
    border: 1px solid #f0cbc7;
    border-radius: 14px;
    color: #8b2d25;
    background: #fff6f5;
}

.salon-delete-warning strong,
.salon-delete-warning span {
    display: block;
}

.salon-delete-warning strong {
    font-size: 13px;
}

.salon-delete-warning span {
    margin-top: 3px;
    color: #855d59;
    font-size: 12px;
    line-height: 1.45;
}

.salon-delete-fields {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.salon-delete-fields label,
.salon-delete-fields label > span {
    display: block;
}

.salon-delete-fields label > span {
    margin-bottom: 7px;
    color: #414a48;
    font-size: 12px;
    font-weight: 760;
}

.salon-delete-fields label > span strong {
    color: #8b2d25;
    overflow-wrap: anywhere;
}

.salon-delete-fields input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #d9dedd;
    border-radius: 13px;
    color: var(--text);
    background: #fff;
    font: inherit;
    outline: none;
}

.salon-delete-fields input:focus {
    border-color: #c96158;
    box-shadow: 0 0 0 4px rgba(196, 50, 39, .10);
}

.salon-delete-error {
    margin: 14px 0 0;
    padding: 11px 12px;
    border-radius: 12px;
    color: #a9251d;
    background: #fff1f0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

@media (max-width: 620px) {
    .booking-mode-picker {
        width: 100%;
        min-width: 0;
    }

    .booking-mode-menu {
        width: 100%;
    }

    .confirmation-overlay {
        padding: 12px;
        place-items: end center;
    }

    .confirmation-dialog {
        padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
        border-radius: 24px 24px 18px 18px;
    }

    .salon-danger-zone {
        align-items: stretch;
        flex-direction: column;
    }

    .salon-delete-open-btn {
        width: 100%;
    }

    .salon-delete-actions {
        grid-template-columns: 1fr;
    }
}

.staff-access-actions {
    justify-content: flex-end;
    margin-top: 18px;
}

.audit-table {
    min-width: 920px;
}

.audit-details {
    max-width: 420px;
    white-space: normal;
    overflow-wrap: anywhere;
    color: #62666f;
    font-size: 0.85rem;
}

.cell-helper {
    margin-top: 5px;
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.review-admin-reply,
.review-admin-report {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 9px;
    color: #475467;
    background: var(--surface-soft);
    font-size: 12px;
    line-height: 1.45;
}

.review-admin-reply {
    border-left: 3px solid var(--primary);
}

.review-admin-report {
    border-left: 3px solid var(--warning);
    background: var(--warning-soft);
}

[hidden] {
    display: none !important;
}

* { box-sizing: border-box; }

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

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

button { cursor: pointer; }

button:disabled,
input:disabled,
select:disabled {
    opacity: 0.62;
    cursor: not-allowed;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    background:
        radial-gradient(circle at 18% 0%, rgba(79, 70, 229, 0.10), transparent 28%),
        var(--bg);
    overflow-x: hidden;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 26px 18px;
    background: rgba(255,255,255,0.86);
    border-right: 1px solid rgba(230, 233, 240, 0.9);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    gap: 26px;
    overflow-y: auto;
}

.brand {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 0 6px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 14px 26px rgba(79, 70, 229, 0.24);
}

.brand h1 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.04em;
    line-height: 1;
}

.brand p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav-link {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 12px 14px;
    text-align: left;
    color: #344054;
    background: transparent;
    font-weight: 750;
    letter-spacing: -0.01em;
    transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.nav-link:hover {
    background: #f2f4f7;
    color: var(--text);
}

.nav-link.active {
    background: var(--primary-soft);
    color: var(--primary-text);
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.12);
}

.sidebar-footer {
    margin-top: auto;
    padding: 14px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.sidebar-footer p {
    margin: 0 0 4px;
    color: var(--text);
    font-weight: 800;
}

.sidebar-footer span { color: var(--muted); }

.main-content {
    min-width: 0;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 34px 40px 56px;
    overflow-x: hidden;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.topbar h2 {
    margin: 0;
    font-size: clamp(30px, 3vw, 44px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.topbar p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.topbar-actions,
.filter-actions,
.client-form-actions,
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.view { display: none; }
.view.active { display: block; }

.panel,
.dashboard-card,
.client-stat-card {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(230,233,240,0.92);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.panel {
    padding: 24px;
    margin-bottom: 20px;
}

.panel-header {
    margin-bottom: 20px;
}

.panel-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.panel-header h3 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.035em;
}

.panel-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.hidden-panel { display: none !important; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-card {
    padding: 20px;
    min-width: 0;
}

.dashboard-card span,
.client-stat-card span,
.calendar-summary span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-card strong,
.client-stat-card strong,
.calendar-summary strong {
    display: block;
    margin-top: 8px;
    font-size: 30px;
    line-height: 1;
    letter-spacing: -0.06em;
}

.dashboard-card small {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-weight: 650;
}

.form-grid,
.grid-layout,
.clients-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.single-grid { grid-template-columns: 1fr; }

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

.form-group.full-width { grid-column: 1 / -1; }
.form-group.small { min-width: 220px; }

label {
    color: #1d2939;
    font-weight: 800;
    font-size: 13px;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--text);
    background: #fff;
    outline: none;
    box-shadow: 0 1px 0 rgba(16,24,40,0.02);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(79,70,229,0.65);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.10);
}

.form-help,
.muted-text {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.primary-btn,
.secondary-btn,
.success-btn,
.secondary-link-btn,
.table-action-btn,
.success-soft-btn,
.warning-btn,
.whatsapp-btn,
.danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    padding: 11px 14px;
    min-height: 42px;
    color: var(--text);
    background: #f2f4f7;
    font-weight: 850;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease, color .14s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.success-btn:hover,
.secondary-link-btn:hover,
.table-action-btn:hover {
    transform: translateY(-1px);
}

.primary-btn {
    background: var(--primary);
    color: white;
    box-shadow: 0 12px 24px rgba(79,70,229,0.18);
}
.primary-btn:hover { background: var(--primary-hover); }

.secondary-btn,
.secondary-link-btn,
.table-action-btn {
    background: #f3f4f7;
    color: #1f2937;
}

.secondary-btn.active,
.calendar-mode-switch .secondary-btn.active {
    background: var(--primary-soft);
    color: var(--primary-text);
}

.success-btn {
    background: #111827;
    color: white;
    box-shadow: 0 12px 24px rgba(17,24,39,0.14);
}
.success-soft-btn,
.whatsapp-btn { background: var(--success-soft); color: var(--success); }
.warning-btn { background: var(--warning-soft); color: var(--warning); }
.danger-btn { background: var(--danger-soft); color: var(--danger); }

.table-action-btn {
    min-height: 36px;
    padding: 8px 11px;
    font-size: 13px;
}

.message {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 800;
    border: 1px solid transparent;
}
.message.success { background: var(--success-soft); color: var(--success); border-color: #abefc6; }
.message.error { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }
.message-action { margin-top:10px; display:block; color:inherit; font-weight:900; text-decoration:underline; }

.selected-slot-box,
.empty-state {
    border: 1px dashed var(--line-strong);
    background: #fbfcfe;
    border-radius: 16px;
    padding: 18px;
}

.empty-state {
    min-height: 96px;
    display: grid;
    place-items: center;
    color: var(--muted);
    text-align: center;
}
.empty-state p { margin: 0; width: 100%; text-align: center; }

.slot-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.selected-slot-box strong { display:block; margin-top:4px; }

.slot-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.slot-list.empty-state { grid-template-columns: 1fr; }

.slot-btn {
    border: 1px solid #d8e0f5;
    border-radius: 14px;
    background: #f6f8ff;
    color: #1d3a8a;
    padding: 12px;
    font-weight: 850;
}
.slot-btn:hover,
.slot-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.bookings-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.bookings-table th {
    padding: 13px 12px;
    text-align: left;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--line);
}

.bookings-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f0f2f7;
    vertical-align: top;
}

.bookings-table tr:hover td { background: #fbfcff; }
.empty-row { text-align:center; color:var(--muted); padding:34px 12px !important; }

.status-badge,
.client-source-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
.status-new { background: var(--primary-soft); color: var(--primary-text); }
.status-confirmed { background: var(--success-soft); color: var(--success); }
.status-completed { background: #ecfdf3; color: #027a48; }
.status-cancelled { background: var(--danger-soft); color: var(--danger); }
.status-noshow { background: var(--warning-soft); color: var(--warning); }
.client-source-badge { margin-left:8px; background:#f2f4f7; color:#475467; }

.upcoming-list {
    display: grid;
    gap: 10px;
}
.upcoming-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fbfcff;
    border: 1px solid var(--line);
}
.upcoming-item strong { display:block; }
.upcoming-item span:not(.status-badge) { color: var(--muted); font-size: 13px; }

.admin-bookings-list {
    display: grid;
    gap: 12px;
}
.admin-bookings-list.empty-state { display:grid; }

.admin-booking-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.admin-booking-card.archived { background:#fbfcff; }
.booking-card-top {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    margin-bottom:12px;
}
.booking-card-client strong {
    display:block;
    font-size:18px;
    letter-spacing:-.03em;
}
.booking-card-client span { display:block; margin-top:2px; color:var(--muted); overflow-wrap:anywhere; }
.booking-card-meta {
    display:grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap:10px;
    padding:12px;
    border-radius:16px;
    background:#f8fafc;
}
.booking-card-meta span {
    min-width:0;
    color:#344054;
    overflow-wrap:anywhere;
    font-size:13px;
}
.booking-card-meta b { color:var(--muted); font-weight:850; }
.booking-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 12px;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #d9e2ef;
    border-radius: 13px;
    background: #f8fafc;
    color: #344054;
    font-size: 13px;
    line-height: 1.45;
}
.booking-note strong { color: #101828; }
.booking-note span { min-width: 0; overflow-wrap: anywhere; }
.booking-note.client-note {
    border-color: #c7d7fe;
    background: #f5f8ff;
}
.booking-note.internal-note {
    border-color: #fde2aa;
    background: #fffaf0;
}
.booking-card-actions,
.calendar-booking-actions {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-top:14px;
}

.archive-outcome-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #b8e7ca;
    border-radius: 15px;
    background: #f0fbf4;
}
.archive-outcome-panel strong,
.archive-outcome-panel span { display: block; }
.archive-outcome-panel strong { color: #075f3b; }
.archive-outcome-panel span {
    margin-top: 3px;
    color: #4b6b5c;
    font-size: 13px;
}
.archive-outcome-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 620px) {
    .booking-note { grid-template-columns: 1fr; }
    .archive-outcome-panel { align-items: stretch; flex-direction: column; }
    .archive-outcome-actions .table-action-btn { flex: 1 1 100%; }
}

.calendar-panel { overflow: hidden; }
.calendar-mode-switch,
.calendar-nav-actions,
.calendar-filters,
.calendar-toolbar {
    display:flex;
    gap:10px;
    align-items:end;
    flex-wrap:wrap;
}
.calendar-toolbar {
    justify-content:space-between;
    margin-bottom:16px;
}
.calendar-filters label {
    min-width: 190px;
    display:flex;
    flex-direction:column;
    gap:8px;
}
.calendar-nav-actions input { width: 180px; }
.calendar-summary {
    display:grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap:12px;
    margin-bottom:16px;
}
.calendar-summary > div {
    padding:16px;
    border-radius:18px;
    background:#fbfcff;
    border:1px solid var(--line);
}
.calendar-summary strong { font-size:22px; }
.calendar-timeline {
    max-width:100%;
    overflow-x:auto;
    padding-bottom:6px;
}
.calendar-day-view {
    display:grid;
    gap:12px;
}
.calendar-week-view {
    display:grid;
    grid-template-columns: repeat(7, minmax(190px, 1fr));
    gap:10px;
    min-width: 1120px;
}
.calendar-week-day {
    min-width:0;
    border:1px solid var(--line);
    border-radius:18px;
    background:#fff;
    overflow:hidden;
}
.calendar-week-day.today { border-color: rgba(79,70,229,.45); box-shadow: 0 0 0 3px rgba(79,70,229,.08); }
.calendar-week-day-head {
    display:flex;
    justify-content:space-between;
    gap:8px;
    align-items:center;
    padding:11px;
    border-bottom:1px solid var(--line);
    background:#fbfcff;
}
.calendar-week-day-head strong { font-size:14px; }
.calendar-week-day-list { display:grid; gap:8px; padding:10px; }
.calendar-empty-day {
    margin:0;
    padding:18px 10px;
    border:1px dashed var(--line-strong);
    border-radius:14px;
    text-align:center;
    color:var(--muted);
    font-weight:800;
    background:#fbfcff;
}
.calendar-booking-card {
    display:grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap:12px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#fff;
}
.calendar-booking-card.compact {
    display:block;
    padding:10px;
}
.calendar-booking-time {
    border-radius:14px;
    background:var(--primary-soft);
    color:var(--primary-text);
    padding:10px;
}
.calendar-booking-time strong {
    display:block;
    font-size:22px;
    line-height:1;
    letter-spacing:-.05em;
}
.calendar-booking-time span {
    display:block;
    margin-top:6px;
    font-size:12px;
    font-weight:850;
}
.calendar-booking-title {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:8px;
}
.calendar-booking-title strong { font-size:17px; line-height:1.1; letter-spacing:-.03em; overflow-wrap:anywhere; }
.calendar-booking-details {
    display:flex;
    gap:7px;
    flex-wrap:wrap;
    margin-top:10px;
}
.calendar-booking-details span {
    display:inline-flex;
    border:1px solid var(--line);
    background:#fbfcff;
    border-radius:999px;
    padding:5px 9px;
    color:#475467;
    font-size:12px;
    font-weight:800;
}
.compact .calendar-booking-time { padding:8px; margin-bottom:8px; }
.compact .calendar-booking-time strong { font-size:18px; }
.compact .calendar-booking-title { display:block; }
.compact .calendar-booking-title strong { display:block; font-size:14px; }
.compact .status-badge { margin-top:6px; }
.compact .calendar-booking-details { gap:5px; margin-top:8px; }
.compact .calendar-booking-details span { font-size:11px; padding:4px 7px; }

.client-stats-grid {
    display:grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap:14px;
    margin-bottom:18px;
}
.client-stat-card { padding:18px; }
.client-notes-cell { max-width: 240px; color:var(--muted); }
.clients-search-field { margin-bottom: 14px; }

.profile-summary-card {
    display:flex;
    align-items:center;
    gap:14px;
    padding:16px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#fbfcff;
    margin-bottom:18px;
}
.profile-logo-preview {
    width:58px;
    height:58px;
    border-radius:16px;
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,#4f46e5,#8b5cf6);
    color:#fff;
    font-size:24px;
    font-weight:900;
    overflow:hidden;
}
.profile-summary-card strong { display:block; font-size:17px; }
.profile-summary-card span { color:var(--muted); font-size:13px; }

.upload-card {
    display:grid;
    grid-template-columns: 220px minmax(0,1fr);
    gap:14px;
    align-items:center;
    padding:14px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#fbfcff;
}
.upload-preview {
    min-height:120px;
    border:1px dashed var(--line-strong);
    border-radius:16px;
    display:grid;
    place-items:center;
    overflow:hidden;
    background:#fff;
    color:var(--muted);
    font-weight:800;
}
.upload-preview-cover { min-height:150px; }
.upload-preview-logo { width:120px; height:120px; min-height:120px; border-radius:24px; }
.upload-controls { display:grid; gap:10px; }
.upload-controls small { color:var(--muted); }

.worker-profile-cell { display:flex; align-items:center; gap:12px; }
.worker-avatar-small {
    width:44px; height:44px; flex:0 0 44px;
    border-radius:14px;
    background-size:cover;
    background-position:center;
    background-color:var(--primary-soft);
    color:var(--primary-text);
    display:grid;
    place-items:center;
    font-weight:900;
}
.worker-profile-cell strong { display:block; }
.worker-profile-cell span { color:var(--muted); font-size:12px; }
.worker-bio-text { color:var(--muted); line-height:1.5; max-width:520px; }
.rating-cell { color:#f79009; font-weight:900; white-space:nowrap; }
.checkbox-row { display:flex; gap:10px; align-items:center; cursor:pointer; font-weight:800; }
.checkbox-row input[type="checkbox"] { width:18px; height:18px; accent-color:var(--primary); }

.public-page {
    --primary: #087f78;
    --primary-hover: #066f69;
    --primary-soft: #eff7f6;
    --primary-text: #066f69;
    --bf-accent: #087f78;
    background:
        radial-gradient(circle at 20% 0%, rgba(8,127,120,.10), transparent 30%),
        var(--bg);
}
.public-wrapper {
    max-width: 980px;
    margin: 0 auto;
    padding: 48px 20px;
}
.public-home-link {
    min-height: 42px;
    padding: 0 12px 0 9px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #343741;
    background: rgba(255,255,255,.78);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.public-home-link:hover {
    border-color: #c8cce0;
    background: #fff;
    transform: translateX(-2px);
}
.public-home-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.public-hero { text-align:center; margin-bottom:22px; }
.public-brand {
    display:inline-flex;
    padding:8px 13px;
    border-radius:999px;
    background:var(--primary-soft);
    color:var(--primary-text);
    font-weight:900;
    margin-bottom:14px;
}
.public-hero h1 { margin:0; font-size:42px; letter-spacing:-.06em; }
.public-hero p { color:var(--muted); font-size:17px; }
.public-panel { max-width:860px; margin:0 auto; }
.login-panel { max-width:520px; }
.login-extra-link { text-align:center; color:var(--muted); font-weight:650; }
.login-extra-link a { color:var(--primary); font-weight:900; text-decoration:none; }
.forgot-password-row { display:flex; justify-content:flex-end; margin-top:8px; }
.forgot-password-row a { color:var(--primary); font-size:14px; font-weight:800; text-decoration:none; }
.forgot-password-row a:hover,
.login-extra-link a:hover { text-decoration:underline; }
.login-panel button:disabled { cursor:not-allowed; opacity:.65; transform:none; }
.public-page .success-btn:hover { background: #066f69; }
.public-slots-panel { margin-top:20px; }

@media (max-width: 1280px) {
    .dashboard-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .booking-card-meta { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .calendar-summary { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        height:auto;
        border-right:0;
        border-bottom:1px solid var(--line);
    }
    .main-content { padding: 24px 18px 42px; }
    .topbar { flex-direction:column; align-items:stretch; }
    .form-grid,
    .grid-layout,
    .clients-tools-grid,
    .client-stats-grid { grid-template-columns: 1fr; }
    .panel-header-row { flex-direction: column; }
    .calendar-toolbar { align-items:stretch; }
    .calendar-nav-actions, .calendar-filters { width:100%; }
    .calendar-filters label { flex: 1 1 210px; }
}

@media (max-width: 700px) {
    .dashboard-grid,
    .calendar-summary { grid-template-columns: 1fr; }
    .panel { padding: 18px; border-radius: 20px; }
    .booking-card-top { flex-direction:column; }
    .booking-card-meta { grid-template-columns: 1fr; }
    .calendar-booking-card { grid-template-columns:1fr; }
    .upload-card { grid-template-columns: 1fr; }
}

/* =========================================================
   BookingFlow admin redesign v2 — compact SaaS shell
   Inspired by modern booking dashboards, not a 1:1 copy.
   ========================================================= */
:root {
    --bf-page: #f3f3f4;
    --bf-rail: #171717;
    --bf-rail-soft: #242424;
    --bf-ink: #121212;
    --bf-text: #1f2328;
    --bf-muted: #767c86;
    --bf-line: #dedfe3;
    --bf-card: #ffffff;
    --bf-accent: #111111;
    --bf-green: #22c55e;
    --bf-blue: #2563eb;
    --bf-red: #ef4444;
    --bf-orange: #f97316;
    --bf-purple: #8b5cf6;
    --bf-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 14px 34px rgba(15, 23, 42, .05);
    --radius: 12px;
    --radius-lg: 16px;
}

html,
body {
    background: var(--bf-page);
    color: var(--bf-text);
    overflow-x: hidden;
}

.app-shell {
    grid-template-columns: 68px minmax(0, 1fr);
    background: var(--bf-page);
    min-height: 100vh;
    overflow-x: hidden;
}

.sidebar {
    width: 68px;
    padding: 12px 8px;
    background: var(--bf-rail);
    color: #fff;
    border-right: 0;
    box-shadow: none;
    gap: 14px;
    overflow-x: visible;
    overflow-y: auto;
    scrollbar-width: none;
    z-index: 80;
}

.sidebar::-webkit-scrollbar { width: 0; height: 0; }

.brand {
    padding: 8px 0 12px;
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2554d8 0 50%, #ffd237 50% 100%);
    color: transparent;
    box-shadow: none;
    font-size: 0;
}

.brand-copy,
.sidebar-footer span { display: none; }

.nav-text {
    position: absolute;
    left: 56px;
    top: 50%;
    min-width: max-content;
    transform: translateY(-50%) translateX(-8px);
    pointer-events: none;
    opacity: 0;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 15px;
    border-radius: 0 14px 14px 0;
    background: var(--bf-rail-soft);
    color: #fff;
    border: 1px solid rgba(255,255,255,.10);
    border-left: 0;
    box-shadow: 0 14px 28px rgba(0,0,0,.20);
    font-size: 14px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -.02em;
    white-space: nowrap;
    transition: opacity .16s ease, transform .16s ease;
    z-index: 120;
}

.nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.nav-link {
    position: relative;
    isolation: isolate;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: transparent;
    color: rgba(255,255,255,.60);
    font-size: 0;
    box-shadow: none;
    overflow: visible;
}

.nav-link:hover,
.nav-link:focus-visible {
    background: rgba(255,255,255,.10);
    color: #fff;
    transform: none;
    z-index: 90;
    outline: none;
}

.nav-link.active {
    background: #fff;
    color: #111;
    box-shadow: none;
}

.nav-link.active::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: #fff;
}

.nav-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-link::after {
    display: none;
}

.nav-link:hover .nav-text,
.nav-link:focus-visible .nav-text {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.nav-link.active .nav-text {
    background: #fff;
    color: #111;
    border-color: rgba(255,255,255,.18);
}

.sidebar-footer {
    margin-top: auto;
    padding: 10px 0 0;
    display: grid;
    place-items: center;
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(255,255,255,.12);
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f2f2f2;
    color: #555;
    font-size: 12px;
    font-weight: 800;
}

.main-content {
    max-width: none;
    margin: 0;
    padding: 28px 34px 54px;
    overflow-x: hidden;
}

.topbar {
    min-height: 68px;
    align-items: center;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--bf-line);
}

.topbar h2 {
    font-size: 30px;
    letter-spacing: -.035em;
    line-height: 1.1;
}

.topbar p {
    margin-top: 4px;
    font-size: 14px;
    color: var(--bf-muted);
}

.panel,
.dashboard-card,
.client-stat-card,
.booking-card-admin,
.client-card,
.archive-booking-card,
.calendar-booking-card,
.calendar-summary > div {
    background: var(--bf-card);
    border: 1px solid var(--bf-line);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.panel {
    padding: 22px;
    margin-bottom: 18px;
}

.panel-header h3 {
    font-size: 21px;
    letter-spacing: -.02em;
}

.panel-header p {
    color: var(--bf-muted);
    font-size: 14px;
}

button,
.primary-btn,
.secondary-btn,
.success-btn,
.table-action-btn,
.secondary-link-btn,
.hero-button {
    border-radius: 9px;
    min-height: 38px;
    font-weight: 760;
    letter-spacing: -.01em;
}

.primary-btn,
.success-btn {
    background: var(--bf-accent);
    color: #fff;
}

.primary-btn:hover,
.success-btn:hover { background: #000; }

.secondary-btn,
.table-action-btn,
.secondary-link-btn {
    background: #fff;
    color: var(--bf-ink);
    border: 1px solid var(--bf-line);
}

.secondary-btn:hover,
.table-action-btn:hover,
.secondary-link-btn:hover { background: #f7f7f8; }

.danger-btn {
    color: #b42318;
    background: #fff1f0;
    border-color: #ffd1cc;
}

.success-soft-btn,
.whatsapp-btn {
    color: #087443;
    background: #eafaf0;
    border-color: #c6f2d6;
}

.warning-btn {
    color: #b54708;
    background: #fff3e0;
    border-color: #fed8a8;
}

input,
select,
textarea {
    border-radius: 9px;
    border-color: #d8dae0;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}

.dashboard-grid,
.client-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-card,
.client-stat-card {
    padding: 18px;
}

.dashboard-card span,
.client-stat-card span,
.calendar-summary span {
    color: var(--bf-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .07em;
    font-weight: 800;
}

.dashboard-card strong,
.client-stat-card strong,
.calendar-summary strong {
    margin-top: 6px;
    font-size: 26px;
    letter-spacing: -.03em;
}

.dashboard-card small,
.client-stat-card small {
    color: var(--bf-muted);
    margin-top: 4px;
}

.form-grid {
    gap: 14px;
}

.filter-bar,
.calendar-toolbar,
.clients-toolbar {
    background: transparent;
    border: 0;
    padding: 0;
}

/* Booking cards instead of cramped table feel */
.admin-bookings-list,
.archive-bookings-list {
    display: grid;
    gap: 10px;
}

.booking-card-admin,
.archive-booking-card {
    display: grid;
    grid-template-columns: minmax(190px, 1.1fr) minmax(210px, 1fr) minmax(180px, .9fr) minmax(260px, 1.25fr);
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
}

.booking-card-admin strong,
.archive-booking-card strong {
    font-size: 15px;
}

.booking-meta,
.booking-person,
.booking-service,
.booking-time {
    min-width: 0;
}

.booking-meta span,
.booking-person span,
.booking-service span,
.booking-time span {
    display: block;
    color: var(--bf-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.booking-actions,
.archive-booking-actions,
.calendar-booking-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.status-badge {
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.status-new { background: #eef4ff; color: #1849a9; }
.status-confirmed { background: #eafaf0; color: #087443; }
.status-completed { background: #f1f5f9; color: #475467; }
.status-cancelled { background: #fff1f0; color: #b42318; }
.status-noshow { background: #fff3e0; color: #b54708; }

/* Calendar: flatter, more like a work schedule */
.calendar-panel {
    padding: 0;
    overflow: hidden;
}

.calendar-panel > .panel-header {
    padding: 20px 22px 14px;
    margin: 0;
    border-bottom: 1px solid var(--bf-line);
}

.calendar-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 16px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--bf-line);
}

.calendar-nav-actions,
.calendar-filters {
    display: flex;
    gap: 8px;
    align-items: end;
    flex-wrap: wrap;
}

.calendar-mode-switch {
    padding: 4px;
    background: #f1f1f2;
    border-radius: 10px;
    display: flex;
    gap: 4px;
}

.calendar-mode-switch .secondary-btn {
    border: 0;
    background: transparent;
    min-height: 34px;
}

.calendar-mode-switch .secondary-btn.active {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

.calendar-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 10px;
    padding: 16px 22px;
    overflow-x: auto;
}

.calendar-summary > div {
    padding: 12px 14px;
    min-width: 130px;
}

.calendar-summary strong { font-size: 20px; }

.calendar-timeline {
    padding: 0 22px 22px;
}

.calendar-day-view {
    display: grid;
    gap: 10px;
}

.calendar-week-view {
    display: grid;
    grid-template-columns: repeat(7, minmax(180px, 1fr));
    gap: 0;
    overflow-x: auto;
    padding-bottom: 8px;
}

.calendar-week-day {
    min-height: 520px;
    border: 1px solid var(--bf-line);
    border-left: 0;
    background: #fff;
}

.calendar-week-day:first-child { border-left: 1px solid var(--bf-line); border-radius: 10px 0 0 10px; }
.calendar-week-day:last-child { border-radius: 0 10px 10px 0; }

.calendar-week-day.today {
    background: #fbfcff;
    box-shadow: inset 0 0 0 1px #bcd2ff;
}

.calendar-week-day-head {
    min-height: 54px;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--bf-line);
}

.calendar-week-day-head strong { font-size: 14px; }

.calendar-week-day-head .table-action-btn {
    min-height: 30px;
    padding: 6px 8px;
    font-size: 12px;
}

.calendar-week-day-list {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.calendar-empty-day {
    margin: 0;
    min-height: 54px;
    display: grid;
    place-items: center;
    border: 1px dashed #d9dbe2;
    border-radius: 9px;
    color: var(--bf-muted);
    background: #fafafa;
    font-weight: 700;
}

.calendar-booking-card {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border-left: 4px solid #111;
}

.calendar-booking-card.compact {
    display: block;
    padding: 10px;
    border-left: 3px solid #111;
}

.calendar-booking-time {
    padding: 10px;
    border-radius: 9px;
    background: #f4f6fa;
    color: #111;
}

.calendar-booking-time strong {
    display: block;
    font-size: 18px;
    letter-spacing: -.02em;
}

.calendar-booking-time span {
    display: block;
    margin-top: 2px;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
}

.calendar-booking-card.compact .calendar-booking-time {
    margin-bottom: 8px;
    padding: 8px;
}

.calendar-booking-card.compact .calendar-booking-time strong { font-size: 15px; }
.calendar-booking-card.compact .calendar-booking-title { align-items: flex-start; gap: 6px; }
.calendar-booking-card.compact .calendar-booking-title strong { font-size: 13px; }
.calendar-booking-card.compact .status-badge { padding: 4px 7px; font-size: 11px; }
.calendar-booking-card.compact .calendar-booking-details span { font-size: 11px; }

.calendar-booking-title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.calendar-booking-title strong {
    overflow-wrap: anywhere;
}

.calendar-booking-details {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.calendar-booking-details span {
    padding: 5px 8px;
    background: #f6f6f7;
    border: 1px solid #e7e7ea;
    border-radius: 999px;
    color: #5d6673;
    font-size: 12px;
    font-weight: 700;
}

.calendar-booking-actions { margin-top: 10px; }
.calendar-booking-actions .table-action-btn { min-height: 31px; padding: 6px 9px; font-size: 12px; }

/* Sales, store, reports, settings */
.sales-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
    gap: 18px;
    align-items: start;
}

.sale-builder {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcff;
}

.sale-cart-list {
    display: grid;
    gap: 10px;
    min-height: 98px;
    margin: 16px 0;
}

.sale-cart-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.sale-cart-row span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.sale-total-box {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 180px minmax(120px, 1fr);
    gap: 12px;
    align-items: end;
    padding: 16px;
    margin: 12px 0 16px;
    border-radius: 14px;
    background: #111827;
    color: #fff;
}

.sale-total-box span {
    display: block;
    color: rgba(255,255,255,.72);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.sale-total-box strong {
    display: block;
    margin-top: 4px;
    font-size: 24px;
    letter-spacing: 0;
}

.sale-total-box .form-group label { color: rgba(255,255,255,.72); }
.sale-total-box input { background: #fff; }
.full-width-btn { width: 100%; }
.sales-table { min-width: 720px; }

.report-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.reports-grid { margin-top: 18px; }
.report-tables-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.report-list {
    display: grid;
    gap: 9px;
    min-height: 120px;
}

.report-list-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.report-list-row strong { overflow-wrap: anywhere; }
.report-list-row span {
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
}

.report-daily-list {
    max-height: 360px;
    overflow: auto;
    padding-right: 4px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.settings-toggle {
    min-height: 84px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    font-weight: 850;
}

.settings-toggle input {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    accent-color: var(--primary);
}

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

/* Clients */
.clients-layout,
.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
}

.client-card {
    padding: 14px;
}

/* Tables stay readable */
.table-wrapper { overflow-x: auto; }
.bookings-table { min-width: 980px; }
.bookings-table th,
.bookings-table td { word-break: normal; overflow-wrap: anywhere; }

@media (max-width: 1180px) {
    .dashboard-grid,
    .client-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .booking-card-admin,
    .archive-booking-card { grid-template-columns: 1fr 1fr; }
    .calendar-toolbar { grid-template-columns: 1fr; }
    .sales-layout,
    .report-tables-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .settings-number-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .clients-layout,
    .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .app-shell {
        grid-template-columns: 1fr;
        overflow: visible;
    }
    .sidebar {
        position: fixed;
        z-index: 100;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 8px;
    }
    .brand { display: none; }
    .nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        min-width: max-content;
    }
    .nav-link {
        width: 44px;
        min-width: 44px;
        height: 44px;
        border-radius: 10px;
    }
    .nav-link.active::before {
        left: 9px;
        right: 9px;
        top: auto;
        bottom: -8px;
        width: auto;
        height: 3px;
        border-radius: 999px 999px 0 0;
    }
    .nav-link::after { display: none; }
    .nav-text { display: none; }
    .sidebar-footer { display: none; }
    .main-content { padding: 80px 14px 40px; }
    .topbar { flex-direction: column; align-items: stretch; }
    .dashboard-grid,
    .client-stats-grid { grid-template-columns: 1fr; }
    .booking-card-admin,
    .archive-booking-card { grid-template-columns: 1fr; }
    .sale-cart-row,
    .sale-total-box,
    .settings-grid,
    .settings-number-grid { grid-template-columns: 1fr; }
}

/* === Sidebar flyout labels fix ===
   Collapsed sidebar stays icon-only. On hover/focus it opens as a small menu
   with readable labels, without the labels being clipped by the rail. */
@media (min-width: 761px) {
    .app-shell {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .sidebar {
        position: sticky;
        top: 0;
        width: 68px;
        height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
        transition: width .18s ease, box-shadow .18s ease;
        z-index: 200;
    }

    .sidebar:hover,
    .sidebar.is-keyboard-focus:focus-within {
        width: 232px;
        box-shadow: 18px 0 40px rgba(0, 0, 0, .18);
    }

    .sidebar:hover .brand,
    .sidebar.is-keyboard-focus:focus-within .brand {
        justify-content: flex-start;
        padding-left: 8px;
        gap: 12px;
    }

    .sidebar:hover .brand-logo,
    .sidebar.is-keyboard-focus:focus-within .brand-logo {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .sidebar:hover .brand-copy,
    .sidebar.is-keyboard-focus:focus-within .brand-copy {
        display: block;
        min-width: 0;
    }

    .sidebar:hover .brand-copy h1,
    .sidebar.is-keyboard-focus:focus-within .brand-copy h1 {
        color: #fff;
        font-size: 17px;
        line-height: 1;
        margin: 0;
        letter-spacing: -.04em;
    }

    .sidebar:hover .brand-copy p,
    .sidebar.is-keyboard-focus:focus-within .brand-copy p {
        color: rgba(255,255,255,.58);
        font-size: 11px;
        margin: 4px 0 0;
        white-space: nowrap;
    }

    .sidebar:hover .nav,
    .sidebar.is-keyboard-focus:focus-within .nav {
        align-items: stretch;
    }

    .sidebar:hover .nav-link,
    .sidebar.is-keyboard-focus:focus-within .nav-link {
        width: 100%;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        padding: 0 13px;
        border-radius: 14px;
        font-size: 14px;
        text-align: left;
    }

    .sidebar:hover .nav-text,
    .sidebar.is-keyboard-focus:focus-within .nav-text {
        position: static;
        opacity: 1;
        transform: none;
        display: inline-block;
        min-width: 0;
        min-height: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: currentColor;
        font-size: 14px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: -.02em;
        white-space: nowrap;
        pointer-events: auto;
        transition: none;
    }

    .sidebar:hover .nav-link.active .nav-text,
    .sidebar.is-keyboard-focus:focus-within .nav-link.active .nav-text {
        background: transparent;
        color: currentColor;
        border: 0;
    }

    .sidebar:hover .sidebar-footer,
    .sidebar.is-keyboard-focus:focus-within .sidebar-footer {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        padding: 12px 8px 0;
    }

    .sidebar:hover .sidebar-footer span,
    .sidebar.is-keyboard-focus:focus-within .sidebar-footer span {
        display: inline;
        color: rgba(255,255,255,.70);
        font-weight: 800;
        white-space: nowrap;
    }
}

/* Promowane — jednorazowe wyróżnienie salonu */
.promotion-panel {
    overflow: hidden;
    border: 1px solid #d9e8e6;
    border-radius: 26px;
    background:
        radial-gradient(circle at 6% 4%, rgba(18, 166, 106, .12), transparent 34%),
        linear-gradient(145deg, #fbfffe 0%, #f2f8f7 100%);
    box-shadow: 0 24px 70px rgba(16, 48, 45, .09);
}

.promotion-panel__main {
    padding: clamp(26px, 4vw, 48px);
}

.promotion-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .72fr);
}

.promotion-panel__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.promotion-kicker {
    color: #087f78;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.promotion-status-badge {
    padding: 7px 11px;
    border: 1px solid #d6dcdf;
    border-radius: 999px;
    color: #667085;
    background: rgba(255, 255, 255, .76);
    font-size: 12px;
    font-weight: 850;
}

.promotion-status-badge.is-active {
    border-color: rgba(18, 166, 106, .3);
    color: #087443;
    background: #eafaf2;
}

.promotion-panel__main > h3 {
    max-width: 650px;
    margin: 18px 0 10px;
    color: #102321;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -.045em;
}

.promotion-panel__main > p {
    max-width: 680px;
    margin: 0;
    color: #596a68;
    font-size: 15px;
    line-height: 1.65;
}

.promotion-benefits {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.promotion-benefits article {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(8, 127, 120, .13);
    border-radius: 16px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    background: rgba(255, 255, 255, .7);
}

.promotion-benefits article > span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #087f78;
    font-size: 13px;
    font-weight: 900;
}

.promotion-benefits article > div {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.promotion-benefits strong {
    color: #19312f;
    font-size: 13px;
}

.promotion-benefits small {
    color: #687875;
    font-size: 11px;
    line-height: 1.45;
}

.promotion-active-period {
    margin-top: 22px;
    padding: 14px 16px;
    border: 1px solid rgba(18, 166, 106, .24);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #286150;
    background: rgba(234, 250, 242, .9);
    font-size: 13px;
}

.promotion-offer {
    padding: clamp(26px, 3vw, 38px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    background: linear-gradient(155deg, #102c2a 0%, #087f78 100%);
}

.promotion-offer__label {
    color: rgba(255, 255, 255, .72);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.promotion-offer__price {
    margin-top: 10px;
    display: flex;
    align-items: flex-end;
    gap: 7px;
}

.promotion-offer__price strong {
    font-size: clamp(50px, 6vw, 72px);
    line-height: .95;
    letter-spacing: -.06em;
}

.promotion-offer__price span {
    padding-bottom: 8px;
    color: rgba(255, 255, 255, .8);
    font-size: 18px;
    font-weight: 800;
}

.promotion-offer > p {
    margin: 9px 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: 14px;
}

.promotion-offer ul {
    margin: 24px 0;
    padding: 0;
    display: grid;
    gap: 10px;
    list-style: none;
    color: rgba(255, 255, 255, .84);
    font-size: 12px;
}

.promotion-offer li::before {
    content: "✓";
    margin-right: 8px;
    color: #83edbd;
    font-weight: 900;
}

.promotion-checkout-btn {
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 13px;
    color: #0b3a35;
    background: #fff;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 15px 34px rgba(0, 0, 0, .18);
}

.promotion-checkout-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #effff8;
}

.promotion-checkout-btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.promotion-offer > small {
    margin-top: 13px;
    color: rgba(255, 255, 255, .66);
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}

@media (max-width: 1060px) {
    .promotion-panel {
        grid-template-columns: 1fr;
    }

    .promotion-benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .promotion-panel {
        border-radius: 19px;
    }

    .promotion-panel__main,
    .promotion-offer {
        padding: 22px 18px;
    }

    .promotion-panel__heading,
    .promotion-active-period {
        align-items: flex-start;
        flex-direction: column;
    }

    .promotion-benefits {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Salon plan: calm trial banner and Stripe paywall
   ========================================================= */
.billing-banner {
    margin: -4px 0 22px;
    padding: 17px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #d9ddd9;
    border-radius: 19px;
    background: #fbfcfa;
    box-shadow: 0 10px 26px rgba(20, 42, 39, .045);
}

.billing-banner__icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #0b675f;
    background: #e3f1ee;
    font-size: 14px;
    font-weight: 800;
}

.billing-banner__copy {
    min-width: 0;
    flex: 1 1 auto;
}

.billing-banner__copy > span {
    display: block;
    margin-bottom: 2px;
    color: #697773;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.billing-banner__copy strong {
    display: block;
    color: #182522;
    font-size: 15px;
    font-weight: 720;
    line-height: 1.3;
}

.billing-banner__copy p {
    margin: 3px 0 0;
    color: #65716e;
    font-size: 12px;
    line-height: 1.45;
}

.billing-banner__actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.billing-banner.is-active {
    border-color: #cfe1da;
    background: #f8fbf9;
}

.billing-banner.is-active .billing-banner__icon {
    color: #08725a;
    background: #def2e9;
}

.billing-banner.is-expired,
.billing-banner.is-past-due {
    border-color: #ead9bd;
    background: #fffaf2;
}

.billing-banner.is-expired .billing-banner__icon,
.billing-banner.is-past-due .billing-banner__icon {
    color: #8c5218;
    background: #f7e9d2;
}

.billing-primary-btn,
.billing-secondary-btn {
    min-height: 42px;
    padding: 10px 15px;
    border-radius: 12px;
    font: inherit;
    font-size: 12px;
    font-weight: 720;
    white-space: nowrap;
}

.billing-primary-btn {
    border: 1px solid #0b8178;
    color: #fff;
    background: #0b8178;
    box-shadow: 0 8px 18px rgba(11, 129, 120, .16);
}

.billing-primary-btn:hover {
    border-color: #096d66;
    background: #096d66;
}

.billing-primary-btn:disabled {
    cursor: wait;
    opacity: .65;
}

.billing-secondary-btn {
    border: 1px solid #cfd6d3;
    color: #2e4440;
    background: #fff;
}

.billing-secondary-btn:hover {
    border-color: #9eaaa6;
    background: #f7f9f8;
}

.billing-paywall-open {
    overflow: hidden;
}

.billing-paywall-overlay {
    position: fixed;
    inset: 0;
    z-index: 6400;
    padding: 28px;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(24, 24, 22, .72);
    backdrop-filter: blur(16px) saturate(82%);
}

.billing-paywall {
    position: relative;
    width: min(900px, 100%);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 28px;
    color: #1d1d1a;
    background: #f8f7f3;
    box-shadow:
        0 44px 120px rgba(0, 0, 0, .34),
        0 2px 8px rgba(0, 0, 0, .08);
    animation: confirmation-in .2s cubic-bezier(.2, .75, .25, 1);
}

.billing-paywall__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 86px;
    padding: 20px 28px;
    border-bottom: 1px solid #dedcd5;
}

.billing-paywall__identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.billing-paywall__top-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.billing-paywall__mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border: 1px solid #1d1d1a;
    border-radius: 12px;
    color: #f8f7f3;
    background: #1d1d1a;
}

.billing-paywall__mark svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.billing-paywall .panel-kicker {
    color: #1d1d1a;
    font-size: 12px;
    font-weight: 780;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.billing-paywall__top-copy small {
    color: #76756f;
    font-size: 11px;
    font-weight: 500;
}

.billing-paywall__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 6px 11px;
    border: 1px solid #dcd3c2;
    border-radius: 999px;
    color: #66543a;
    background: #f2ede3;
    font-size: 11px;
    font-weight: 680;
    line-height: 1;
    white-space: nowrap;
}

.billing-paywall__status::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #9b6a28;
    box-shadow: 0 0 0 3px rgba(155, 106, 40, .11);
}

.billing-paywall__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(300px, .82fr);
}

.billing-paywall__content {
    min-width: 0;
    padding: 48px 46px 42px;
}

.billing-paywall__eyebrow {
    display: block;
    margin-bottom: 14px;
    color: #74736d;
    font-size: 10.5px;
    font-weight: 720;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.billing-paywall h3 {
    max-width: 500px;
    margin: 0 0 17px;
    color: #1d1d1a;
    font-size: clamp(36px, 4.4vw, 48px);
    font-weight: 690;
    line-height: 1.02;
    letter-spacing: -.052em;
}

.billing-paywall__content > p {
    max-width: 500px;
    margin: 0;
    color: #6b6a64;
    font-size: 14.5px;
    line-height: 1.65;
}

.billing-paywall__benefits {
    margin: 31px 0 0;
    display: grid;
}

.billing-paywall__benefit {
    min-width: 0;
    padding: 14px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #dedcd5;
}

.billing-paywall__benefit:last-child {
    border-bottom: 1px solid #dedcd5;
}

.billing-paywall__check {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #f8f7f3;
    background: #292925;
    font-size: 11px;
    font-weight: 800;
}

.billing-paywall__benefit > span:last-child {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.billing-paywall__benefit strong {
    color: #2b2b27;
    font-size: 12.5px;
    font-weight: 690;
    line-height: 1.3;
}

.billing-paywall__benefit small {
    color: #7a7973;
    font-size: 10.5px;
    line-height: 1.45;
}

.billing-paywall__plan {
    min-width: 0;
    padding: 43px 36px 38px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #dedcd5;
    background: #eeece6;
}

.billing-paywall__plan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.billing-paywall__plan-head > span:first-child {
    color: #65645e;
    font-size: 10.5px;
    font-weight: 720;
    letter-spacing: .095em;
    text-transform: uppercase;
}

.billing-paywall__amount {
    margin-top: 35px;
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.billing-paywall__amount strong {
    color: #1d1d1a;
    font-size: clamp(48px, 5vw, 60px);
    font-weight: 680;
    line-height: .92;
    letter-spacing: -.065em;
}

.billing-paywall__amount > span {
    color: #363631;
    font-size: 18px;
    font-weight: 680;
}

.billing-paywall__period {
    margin: 11px 0 0;
    color: #77766f;
    font-size: 11.5px;
    line-height: 1.4;
}

.billing-paywall__plan-badge {
    padding: 5px 8px;
    border: 1px solid #d5d2ca;
    border-radius: 999px;
    color: #6d6b65;
    background: rgba(255, 255, 255, .42);
    font-size: 9.5px;
    font-weight: 650;
    white-space: nowrap;
}

.billing-paywall__divider {
    height: 1px;
    margin: 34px 0 26px;
    background: #d4d1c9;
}

.billing-paywall__actions {
    display: grid;
    gap: 9px;
}

.billing-paywall__actions button {
    width: 100%;
    min-height: 50px;
    border-radius: 12px;
    font-size: 11.5px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}

.billing-paywall__actions .billing-primary-btn {
    position: relative;
    padding-right: 42px;
    border-color: #1d1d1a;
    color: #fff;
    background: #1d1d1a;
    box-shadow: 0 10px 22px rgba(29, 29, 26, .17);
}

.billing-paywall__actions .billing-primary-btn::after {
    content: "→";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-52%);
    font-size: 17px;
    font-weight: 500;
}

.billing-paywall__actions .billing-primary-btn:hover {
    transform: translateY(-1px);
    border-color: #363631;
    background: #363631;
    box-shadow: 0 13px 25px rgba(29, 29, 26, .22);
}

.billing-paywall__actions .billing-primary-btn:focus-visible,
.billing-paywall__actions .billing-secondary-btn:focus-visible {
    outline: 3px solid rgba(29, 29, 26, .2);
    outline-offset: 3px;
}

.billing-paywall__actions .billing-secondary-btn {
    border-color: #d0cdc5;
    color: #4b4a45;
    background: rgba(255, 255, 255, .48);
    box-shadow: none;
}

.billing-paywall__actions .billing-secondary-btn:hover {
    transform: translateY(-1px);
    border-color: #bcb9b0;
    background: rgba(255, 255, 255, .78);
}

.billing-paywall__secure {
    margin: auto 0 0;
    padding-top: 25px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #817f78;
    font-size: 9.5px;
    line-height: 1.45;
    text-align: left;
}

.billing-paywall__secure svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 760px) {
    .billing-banner {
        align-items: flex-start;
        flex-wrap: wrap;
        margin-top: 0;
    }

    .billing-banner__copy {
        flex-basis: calc(100% - 65px);
    }

    .billing-banner__actions {
        width: 100%;
        padding-left: 61px;
        flex-wrap: wrap;
    }

    .billing-paywall-overlay {
        padding: 18px;
    }

    .billing-paywall__top {
        padding-inline: 22px;
    }

    .billing-paywall__content {
        padding: 38px 32px 34px;
    }

    .billing-paywall__plan {
        padding: 37px 27px 32px;
    }

    .billing-paywall h3 {
        font-size: clamp(34px, 5.7vw, 42px);
    }
}

@media (max-width: 680px) {
    .billing-banner__actions {
        padding-left: 0;
    }

    .billing-banner__actions button {
        width: 100%;
    }

    .billing-paywall-overlay {
        padding: 8px;
        place-items: end center;
    }

    .billing-paywall {
        width: 100%;
        max-height: calc(100vh - 16px);
        overflow-y: auto;
        border-radius: 24px 24px 14px 14px;
    }

    .billing-paywall__top {
        min-height: 70px;
        padding: 14px 18px;
    }

    .billing-paywall__mark {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 11px;
    }

    .billing-paywall__status {
        max-width: 160px;
        min-height: 28px;
        padding: 5px 9px;
        white-space: normal;
        line-height: 1.2;
    }

    .billing-paywall__layout {
        grid-template-columns: 1fr;
    }

    .billing-paywall__content {
        padding: 26px 22px 20px;
    }

    .billing-paywall h3 {
        margin-bottom: 13px;
        font-size: clamp(32px, 9vw, 39px);
        line-height: 1.03;
    }

    .billing-paywall__eyebrow {
        margin-bottom: 10px;
    }

    .billing-paywall__content > p {
        line-height: 1.55;
    }

    .billing-paywall__benefits {
        margin-top: 19px;
    }

    .billing-paywall__benefit {
        padding: 9px 0;
    }

    .billing-paywall__plan {
        padding: 22px 22px calc(18px + env(safe-area-inset-bottom));
        border-top: 1px solid #dedcd5;
        border-left: 0;
    }

    .billing-paywall__amount {
        margin-top: 18px;
    }

    .billing-paywall__divider {
        margin: 23px 0 19px;
    }

    .billing-paywall__actions button {
        min-height: 48px;
    }

    .billing-paywall__secure {
        padding-top: 15px;
    }
}

@media (max-width: 400px) {
    .billing-paywall__top-copy small {
        display: none;
    }

    .billing-paywall__status {
        max-width: 140px;
        font-size: 10px;
    }
}

/* Optional, actual-revenue tracking */
[data-revenue-only][hidden],
[data-finance-module][hidden] {
    display: none !important;
}

.finance-settings-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
    padding: 20px;
    border: 1px solid #cfd7e6;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8f7ff 0%, #eef5ff 100%);
    cursor: pointer;
}

.finance-settings-card > input {
    width: 22px;
    height: 22px;
    accent-color: #111827;
}

.finance-settings-copy {
    display: grid;
    gap: 4px;
}

.finance-settings-copy strong {
    color: #111827;
    font-size: 18px;
}

.finance-settings-copy small,
.finance-settings-note {
    color: var(--muted);
    line-height: 1.55;
}

.finance-settings-kicker {
    color: #6656d9;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.finance-settings-state {
    padding: 7px 11px;
    border-radius: 999px;
    background: #e8edf4;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
}

.finance-settings-state.enabled {
    background: #dcfae6;
    color: #067647;
}

.finance-settings-note {
    margin-bottom: 22px;
    padding: 12px 15px;
    border-left: 3px solid #8b7cf6;
    border-radius: 0 12px 12px 0;
    background: #f8f7ff;
    font-size: 13px;
}

.booking-finance-panel {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin: 14px 0;
    padding: 14px 16px;
    border: 1px solid #d9e2ee;
    border-radius: 14px;
    background: #f8fafc;
}

.booking-finance-panel.pending {
    border-color: #f3cc78;
    background: #fff9e8;
}

.booking-finance-panel > div {
    display: grid;
    gap: 2px;
}

.booking-finance-panel span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.booking-finance-panel strong {
    color: #111827;
    font-size: 18px;
}

.booking-finance-panel small {
    color: var(--muted);
}

.settlement-modal-open {
    overflow: hidden;
}

.settlement-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(4px);
}

.settlement-modal-overlay[hidden] {
    display: none;
}

.settlement-modal {
    width: min(650px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(15, 23, 42, .30);
}

.settlement-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.settlement-modal-header h3 {
    margin: 4px 0 6px;
    color: #111827;
    font-size: 28px;
    letter-spacing: -.035em;
}

.settlement-modal-header p {
    margin: 0;
    color: var(--muted);
}

.settlement-booking-summary {
    display: grid;
    gap: 3px;
    margin: 20px 0 14px;
    padding: 15px 17px;
    border-radius: 15px;
    background: #f4f6fa;
}

.settlement-booking-summary span {
    color: var(--muted);
    font-size: 13px;
}

.settlement-amount-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.settlement-amount-summary article {
    display: grid;
    gap: 4px;
    padding: 15px 17px;
    border: 1px solid #dde4ee;
    border-radius: 15px;
}

.settlement-amount-summary article:last-child {
    border-color: #b9b0ff;
    background: #f5f3ff;
}

.settlement-amount-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.settlement-amount-summary strong {
    color: #111827;
    font-size: 22px;
}

.settlement-form-grid textarea {
    min-height: 84px;
    resize: vertical;
}

.settlement-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

@media (max-width: 620px) {
    .finance-settings-card {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        padding: 16px;
    }

    .finance-settings-state {
        grid-column: 2;
        justify-self: start;
    }

    .booking-finance-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .settlement-modal-overlay {
        align-items: end;
        padding: 0;
    }

    .settlement-modal {
        width: 100%;
        max-height: 92dvh;
        padding: 20px 16px calc(18px + env(safe-area-inset-bottom));
        border-radius: 24px 24px 0 0;
    }

    .settlement-modal-header h3 {
        font-size: 24px;
    }

    .settlement-amount-summary {
        grid-template-columns: 1fr;
    }

    .settlement-modal-actions {
        position: sticky;
        bottom: 0;
        padding-bottom: 2px;
        background: #fff;
    }

    .settlement-modal-actions button {
        flex: 1;
    }
}

/* Salon events and publications */
.content-workflow-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    padding: 24px 26px;
    border: 1px solid #d8def0;
    border-radius: 22px;
    background:
        radial-gradient(circle at 92% 12%, rgba(79, 70, 229, .13), transparent 34%),
        linear-gradient(135deg, #fff 0%, #f7f8ff 100%);
    box-shadow: var(--shadow-sm);
}

.content-workflow-note h3 {
    margin: 5px 0 7px;
    color: #101828;
    font-size: clamp(21px, 2vw, 29px);
    letter-spacing: -.035em;
}

.content-workflow-note p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.content-workflow-note .section-kicker {
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
}

.content-api-status {
    display: grid;
    gap: 5px;
    margin: -4px 0 22px;
    padding: 15px 17px;
    border: 1px solid #fedf89;
    border-radius: 15px;
    color: #7a2e0e;
    background: #fffaeb;
    font-size: 12px;
    line-height: 1.5;
}

.content-api-status strong {
    font-size: 13px;
}

.content-api-status code {
    padding: 2px 5px;
    border-radius: 5px;
    color: #5925dc;
    background: #f4f3ff;
    font-weight: 800;
}

.content-editor-grid,
.content-list-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.content-list-grid {
    margin-top: 22px;
}

.content-form-panel {
    overflow: hidden;
}

.content-type-pill {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.event-pill {
    color: #175cd3;
    background: #eff8ff;
}

.post-pill {
    color: #6941c6;
    background: #f4f3ff;
}

.content-image-uploader {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin: 20px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
}

.content-image-uploader > div:last-child {
    display: grid;
    gap: 8px;
}

.content-image-uploader input[type="file"] {
    width: 100%;
    color: var(--muted);
    font-size: 12px;
}

.content-image-uploader small {
    color: var(--muted);
    font-size: 11px;
}

.content-image-preview {
    display: grid;
    place-items: center;
    min-height: 105px;
    overflow: hidden;
    border: 1px dashed #cbd2e1;
    border-radius: 13px;
    color: var(--muted);
    background: #fff center / cover no-repeat;
    font-size: 12px;
    text-align: center;
}

.content-image-preview.has-image span {
    display: none;
}

.content-form-grid {
    gap: 15px;
}

.content-long-text {
    min-height: 150px;
    resize: vertical;
}

.compact-toggle {
    min-height: 52px;
    align-self: end;
}

.content-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.content-form-actions .success-btn {
    flex: 1 1 220px;
}

.content-admin-list {
    display: grid;
    gap: 14px;
}

.content-admin-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.content-admin-card__main {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 15px;
    padding: 14px;
}

.content-admin-thumb {
    display: grid;
    place-items: center;
    min-height: 105px;
    overflow: hidden;
    border-radius: 12px;
    color: #667085;
    font-size: 24px;
    background: linear-gradient(135deg, #eef2ff, #f8fafc) center / cover no-repeat;
}

.content-admin-thumb img {
    width: 100%;
    height: 100%;
    min-height: 105px;
    object-fit: cover;
}

.content-admin-copy {
    min-width: 0;
}

.content-admin-copy h4 {
    margin: 7px 0 5px;
    color: #101828;
    font-size: 16px;
    line-height: 1.3;
}

.content-admin-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.content-admin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 9px;
    color: #475467;
    font-size: 11px;
}

.content-status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.content-promotion-status {
    display: inline-flex;
    margin-left: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #fff;
    background: #1b1b1f;
    font-size: 10px;
    font-weight: 850;
}

.content-status--published,
.content-status--confirmed {
    color: #067647;
    background: #ecfdf3;
}

.content-status--draft,
.content-status--pending {
    color: #b54708;
    background: #fffaeb;
}

.content-status--cancelled {
    color: #b42318;
    background: #fef3f2;
}

.content-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 10px 14px 14px;
    border-top: 1px solid #f0f2f5;
}

.content-admin-actions button,
.registration-actions button {
    padding: 7px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    color: #344054;
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.content-admin-actions button:hover,
.registration-actions button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.content-admin-actions .danger-action {
    color: var(--danger);
}

.event-registrations {
    padding: 0 14px 14px;
}

.event-registrations summary {
    cursor: pointer;
    color: #344054;
    font-size: 12px;
    font-weight: 800;
}

.registration-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.registration-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border-radius: 11px;
    background: var(--surface-soft);
}

.registration-row strong,
.registration-row span {
    display: block;
}

.registration-row span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.registration-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
    align-items: center;
}

@media (max-width: 1180px) {
    .content-editor-grid,
    .content-list-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .content-workflow-note {
        align-items: flex-start;
        flex-direction: column;
        padding: 19px;
    }

    .content-image-uploader,
    .content-admin-card__main {
        grid-template-columns: 1fr;
    }

    .content-image-preview,
    .content-admin-thumb {
        min-height: 165px;
    }

    .registration-row {
        flex-direction: column;
    }

    .registration-actions {
        justify-content: flex-start;
    }
}

.staff-time-off-panel {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #e2e7ef);
}

.bookings-list-panel > summary {
    cursor: pointer;
    list-style: none;
    margin-bottom: 0;
}

.bookings-list-panel > summary::-webkit-details-marker {
    display: none;
}

.bookings-list-panel .summary-hint {
    display: inline-flex;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #667085;
    font-size: 11px;
    vertical-align: middle;
}

.bookings-list-panel .when-open { display: none; }
.bookings-list-panel[open] .when-closed { display: none; }
.bookings-list-panel[open] .when-open { display: inline; }

.bookings-list-panel[open] > summary {
    margin-bottom: 14px;
}

.staff-time-off-list {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

.staff-time-off-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border-color, #e2e7ef);
    border-radius: 12px;
    background: #fff;
}

.staff-time-off-list article > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.staff-time-off-list article span {
    color: #667085;
    font-size: 12px;
}

.status-pending,
.status-processing {
    color: #854a0e;
    background: #fff6df;
}

.status-sent {
    color: #087a55;
    background: #e8fbf3;
}

.status-failed {
    color: #b42318;
    background: #fef3f2;
}

.status-skipped {
    color: #475467;
    background: #f2f4f7;
}

@media (max-width: 760px) {
    .sidebar,
    .sidebar:hover,
    .sidebar.is-keyboard-focus:focus-within {
        width: 100%;
        box-shadow: none;
    }

    .sidebar:hover .brand-copy,
    .sidebar.is-keyboard-focus:focus-within .brand-copy,
    .sidebar:hover .nav-text,
    .sidebar.is-keyboard-focus:focus-within .nav-text,
    .sidebar:hover .sidebar-footer,
    .sidebar.is-keyboard-focus:focus-within .sidebar-footer {
        display: none;
    }
}

/* =========================
   Workers workspace
   ========================= */
.staff-workspace {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.staff-directory {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: calc(100vh - 180px);
}

.staff-directory-head {
    align-items: flex-start;
}

.count-badge {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-text);
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.08);
}

.staff-search {
    height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: #fff;
}

.staff-search svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--muted);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.staff-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 0;
    color: var(--text);
    font-weight: 700;
}

.quick-add-worker {
    padding: 14px;
    border: 1px dashed var(--line-strong);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, var(--surface-soft));
}

.quick-add-worker label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.quick-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.quick-add-row input {
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 12px 14px;
    outline: 0;
    background: #fff;
}

.compact-btn {
    min-height: 46px;
    padding-inline: 18px;
    white-space: nowrap;
}

.staff-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    padding-right: 4px;
}

.staff-list-item {
    width: 100%;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    color: var(--text);
    text-align: left;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.staff-list-item:hover {
    transform: translateY(-1px);
    border-color: rgba(79, 70, 229, 0.28);
    box-shadow: 0 14px 28px rgba(16, 24, 40, 0.08);
}

.staff-list-item.active {
    border-color: rgba(17, 24, 39, 0.16);
    background: #111827;
    color: #fff;
    box-shadow: 0 18px 36px rgba(17, 24, 39, 0.20);
}

.staff-list-avatar,
.staff-avatar-large {
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.staff-list-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--surface-strong);
    color: var(--text);
    font-weight: 900;
}

.staff-list-item.active .staff-list-avatar {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.staff-list-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-list-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.staff-list-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 900;
}

.staff-list-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-weight: 700;
}

.staff-list-item.active .staff-list-copy small {
    color: rgba(255,255,255,0.70);
}

.staff-list-empty,
.staff-empty-state {
    padding: 28px 18px;
    border: 1px dashed var(--line-strong);
    border-radius: 20px;
    background: var(--surface-soft);
    color: var(--muted);
    text-align: center;
}

.staff-list-empty strong,
.staff-empty-state h3 {
    color: var(--text);
    font-weight: 900;
}

.staff-empty-state {
    min-height: 440px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
}

.empty-icon {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: var(--surface-strong);
    font-size: 30px;
}

.staff-profile-area {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.staff-profile-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.staff-profile-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.staff-avatar-large {
    width: 82px;
    height: 82px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, var(--surface-strong), #fff);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 28px;
    font-weight: 900;
    box-shadow: var(--shadow-sm);
}

.panel-kicker {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.staff-profile-main h3 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.staff-profile-main p:last-child {
    margin: 6px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.staff-profile-actions,
.staff-inline-actions,
.staff-calendar-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.danger-outline-btn {
    color: var(--danger) !important;
    border-color: rgba(217, 45, 32, 0.24) !important;
    background: var(--danger-soft) !important;
}

.staff-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.staff-stats-grid article,
.staff-schedule-summary article,
.staff-calendar-summary article {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, var(--surface-soft));
}

.staff-stats-grid span,
.staff-schedule-summary span,
.staff-calendar-summary span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.staff-stats-grid strong,
.staff-schedule-summary strong,
.staff-calendar-summary strong {
    display: block;
    margin-top: 6px;
    font-size: 26px;
    line-height: 1;
    letter-spacing: -.04em;
}

.staff-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
}

.staff-tab {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    background: transparent;
    color: var(--muted);
    font-weight: 900;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.staff-tab:hover,
.staff-tab.active {
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.staff-tab-panel {
    display: none;
    animation: staffFadeIn .18s ease;
}

.staff-tab-panel.active {
    display: block;
}

@keyframes staffFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.staff-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.staff-section-head h4 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -.035em;
}

.staff-section-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.staff-services-list {
    display: grid;
    gap: 12px;
}

.staff-service-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.staff-service-card div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.staff-service-card strong {
    font-size: 17px;
    font-weight: 900;
}

.staff-service-card span {
    color: var(--muted);
    font-weight: 700;
}

.staff-service-card b {
    white-space: nowrap;
    font-size: 18px;
}

.staff-schedule-summary,
.staff-calendar-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.staff-calendar-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.staff-schedule-editor {
    display: grid;
    gap: 10px;
}

.staff-schedule-row {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(230px, auto);
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.staff-schedule-row.is-off {
    background: var(--surface-soft);
}

.staff-day-name {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.staff-day-name strong {
    font-size: 16px;
    font-weight: 900;
}

.staff-day-name span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.staff-day-switch {
    position: relative;
    width: 54px;
    height: 30px;
    display: inline-flex;
}

.staff-day-switch input {
    position: absolute;
    opacity: 0;
}

.staff-day-switch span {
    width: 54px;
    height: 30px;
    border-radius: 999px;
    background: #d0d5dd;
    transition: background .18s ease;
}

.staff-day-switch span::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease;
}

.staff-day-switch input:checked + span {
    background: #111827;
}

.staff-day-switch input:checked + span::after {
    transform: translateX(24px);
}

.staff-time-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.staff-time-inputs input,
.staff-calendar-controls input {
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
    font-weight: 800;
    outline: 0;
}

.staff-calendar-controls .active {
    background: #111827 !important;
    color: #fff !important;
    border-color: #111827 !important;
}

.staff-calendar-timeline {
    display: grid;
    gap: 12px;
}

.staff-week-grid {
    grid-template-columns: repeat(7, minmax(190px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
}

.staff-week-day {
    min-height: 240px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
}

.staff-week-day.today {
    border-color: rgba(79, 70, 229, 0.35);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.staff-week-day header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}

.staff-week-day header strong {
    font-size: 13px;
    font-weight: 900;
    text-transform: capitalize;
}

.staff-week-day header span {
    min-width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.staff-week-day > div {
    display: grid;
    gap: 10px;
    padding: 10px;
}

.staff-week-day p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.file-upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.file-upload-row input[type="file"] {
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: #fff;
}

.worker-photo-uploader {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f8fafc;
}

.worker-photo-preview {
    width: 112px;
    height: 112px;
    overflow: hidden;
    position: relative;
    display: grid;
    place-items: center;
    border: 1px dashed #b9c3d1;
    border-radius: 18px;
    color: #748094;
    background: #eef2f6;
    font-size: 28px;
    font-weight: 500;
}

.worker-photo-preview.has-photo {
    border-style: solid;
    background: #fff;
}

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

.worker-photo-preview img[hidden] {
    display: none;
}

.worker-photo-preview.has-photo > span {
    display: none;
}

.worker-photo-uploader__controls {
    min-width: 0;
}

.worker-photo-uploader .field-help {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.upload-feedback {
    width: fit-content;
    margin-top: 10px;
    padding: 8px 11px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #d5dce5;
    border-radius: 10px;
    color: #475467;
    background: #fff;
    font-size: 13px;
}

.upload-feedback span {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e9eef5;
    font-size: 11px;
}

.upload-feedback.success {
    border-color: #a7e6c4;
    color: #087443;
    background: #ecfdf3;
}

.upload-feedback.success span {
    color: #fff;
    background: #12a666;
}

.upload-feedback.error {
    border-color: #f6b6b1;
    color: #b42318;
    background: #fff1f0;
}

.upload-feedback.error span {
    color: #fff;
    background: #d92d20;
}

.upload-feedback.pending {
    border-color: #b8dfe6;
    color: #086b7d;
    background: #edfafd;
}

@media (max-width: 1180px) {
    .staff-workspace {
        grid-template-columns: 1fr;
    }

    .staff-directory {
        position: static;
        min-height: 0;
    }

    .staff-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .staff-stats-grid,
    .staff-calendar-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .staff-profile-head,
    .staff-section-head {
        flex-direction: column;
    }

    .staff-profile-main {
        align-items: flex-start;
    }

    .staff-stats-grid,
    .staff-schedule-summary,
    .staff-calendar-summary,
    .staff-list {
        grid-template-columns: 1fr;
    }

    .staff-schedule-row {
        grid-template-columns: 1fr;
    }

    .staff-time-inputs,
    .staff-calendar-controls,
    .staff-inline-actions,
    .staff-profile-actions,
    .file-upload-row,
    .quick-add-row {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .worker-photo-uploader {
        grid-template-columns: 1fr;
    }

    .staff-calendar-controls input,
    .staff-calendar-controls button,
    .staff-inline-actions button,
    .staff-profile-actions button,
    .file-upload-row button,
    .quick-add-row button {
        width: 100%;
    }
}


/* =========================
   Soft admin typography update
   ========================= */
:root {
    --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body {
    font-size: 14px;
    line-height: 1.5;
}

.topbar h2,
.brand h1,
.panel-header h3,
.staff-profile-main h3,
.staff-section-head h4,
.public-hero h1 {
    font-weight: 700;
    letter-spacing: -0.03em;
}

.topbar h2 {
    font-size: clamp(25px, 2.2vw, 32px);
    line-height: 1.12;
}

.topbar p,
.panel-header p,
.staff-profile-main p:last-child,
.staff-section-head p,
.staff-list-copy small,
.staff-day-name span,
.staff-week-day p {
    font-weight: 500;
}

.nav-link,
.primary-btn,
.secondary-btn,
.danger-btn,
.success-btn,
.table-action-btn,
.compact-btn,
label,
.form-group label,
.quick-add-worker label,
.staff-tab,
.staff-search input,
.staff-time-inputs input,
.staff-calendar-controls input {
    font-weight: 600;
}

.panel-kicker,
.staff-stats-grid span,
.staff-schedule-summary span,
.staff-calendar-summary span,
.dashboard-card span,
.count-badge {
    font-weight: 650;
    letter-spacing: 0.035em;
}

.staff-profile-main h3 {
    font-size: clamp(24px, 2.3vw, 34px);
    line-height: 1.08;
}

.staff-section-head h4 {
    font-size: 21px;
}

.staff-list-copy strong,
.staff-day-name strong,
.staff-service-card strong,
.staff-week-day header strong {
    font-weight: 650;
}

.staff-stats-grid strong,
.staff-schedule-summary strong,
.staff-calendar-summary strong {
    font-size: 23px;
    font-weight: 650;
    letter-spacing: -0.025em;
}

.staff-avatar-large,
.staff-list-avatar,
.brand-logo {
    font-weight: 700;
}

.staff-tab {
    padding: 10px 14px;
}

.staff-schedule-row {
    padding: 14px 16px;
}

.staff-directory {
    gap: 16px;
}

.staff-search {
    height: 50px;
}

/* =========================================================
   Safe sidebar height fix — v2
   Keeps the working admin layout, but prevents the bottom icons
   and salon avatar from being cut off. This version does NOT move
   the main content and does NOT use fixed positioning for desktop.
   ========================================================= */
@media (min-width: 761px) {
    .sidebar {
        position: sticky !important;
        top: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    .brand {
        flex: 0 0 auto !important;
        padding-top: 6px !important;
        padding-bottom: 10px !important;
    }

    .nav {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        gap: 6px !important;
        padding: 0 0 6px !important;
        scrollbar-width: none !important;
    }

    .nav::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
    }

    .nav-link {
        min-height: 40px !important;
        height: 40px !important;
        flex: 0 0 40px !important;
    }

    .sidebar:hover .nav-link,
    .sidebar.is-keyboard-focus:focus-within .nav-link {
        min-height: 40px !important;
        height: 40px !important;
        flex-basis: 40px !important;
    }

    .sidebar-footer {
        flex: 0 0 auto !important;
        margin-top: 8px !important;
        padding-top: 9px !important;
        padding-bottom: 0 !important;
    }

    .sidebar-avatar {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
    }
}

/* =========================================================
   Staff calendar polish
   Cleaner controls, softer calendar numbers, no ugly wrapping.
   ========================================================= */
.staff-tab-panel#staffTabCalendar .staff-section-head {
    align-items: flex-start;
    gap: 18px;
}

.staff-tab-panel#staffTabCalendar .staff-section-head h4 {
    font-size: 20px;
    line-height: 1.15;
}

.staff-tab-panel#staffTabCalendar .staff-section-head p {
    max-width: 420px;
}

.staff-calendar-controls {
    display: grid !important;
    grid-template-columns: auto minmax(180px, 240px) auto auto auto auto;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
}

.staff-calendar-controls .secondary-btn,
.staff-calendar-controls input {
    min-height: 42px;
    height: 42px;
    border-radius: 13px;
    box-shadow: none;
}

.staff-calendar-controls .secondary-btn {
    padding: 0 14px;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
}

.staff-calendar-controls .staff-calendar-nav-btn {
    min-width: 104px;
}

.staff-calendar-controls input {
    width: 100%;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 600;
}

.staff-calendar-summary {
    grid-template-columns: minmax(190px, 1.25fr) repeat(4, minmax(110px, 1fr)) !important;
    gap: 12px;
}

.staff-calendar-summary article {
    min-height: 96px;
    padding: 15px 18px;
}

.staff-calendar-summary span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.045em;
}

.staff-calendar-summary strong {
    margin-top: 8px;
    font-size: 22px !important;
    font-weight: 650 !important;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.staff-calendar-summary article:first-child strong {
    font-size: 20px !important;
    white-space: nowrap;
}

.staff-calendar-timeline.empty-state {
    min-height: 110px;
    border-radius: 18px;
}

@media (max-width: 1180px) {
    .staff-tab-panel#staffTabCalendar .staff-section-head {
        flex-direction: column;
    }

    .staff-calendar-controls {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .staff-calendar-controls {
        grid-template-columns: 1fr 1fr;
    }

    .staff-calendar-controls input {
        grid-column: 1 / -1;
        order: -1;
    }

    .staff-calendar-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    .staff-calendar-controls,
    .staff-calendar-summary {
        grid-template-columns: 1fr !important;
    }

    .staff-calendar-summary article:first-child strong {
        white-space: normal;
    }
}

/* Staff profile avatar image fix */
.staff-avatar-large {
    position: relative;
    padding: 0;
    cursor: pointer;
}

.staff-avatar-large img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-avatar-large span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.staff-avatar-large.has-photo {
    background: var(--surface-strong);
}

.staff-avatar-large.has-photo::after {
    content: "✓";
    position: absolute;
    right: -6px;
    bottom: -7px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
}

.staff-avatar-large:hover {
    border-color: rgba(17, 24, 39, 0.28);
}

/* BookingFlow records workspace — Booksy-style calendar UX */
.booking-pro-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.45), rgba(59, 130, 246, 0.42));
    color: #111827;
    box-shadow: var(--shadow-sm);
}

.booking-pro-banner strong,
.booking-pro-banner span {
    display: block;
}

.booking-pro-banner strong {
    font-size: 16px;
    font-weight: 760;
    letter-spacing: -0.02em;
}

.booking-pro-banner span {
    margin-top: 2px;
    color: #1f2937;
    font-size: 14px;
}

.booking-pro-banner-btn {
    border: 0;
    border-radius: 13px;
    padding: 11px 15px;
    background: #111827;
    color: #fff;
    font-weight: 760;
    box-shadow: 0 12px 25px rgba(17, 24, 39, 0.22);
}

.bookings-dashboard-grid {
    margin-bottom: 18px;
}

.booking-workspace {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.booking-side-panel,
.booking-calendar-panel {
    background: rgba(255,255,255,0.94);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.booking-side-panel {
    position: sticky;
    top: 18px;
    padding: 18px;
}

.booking-side-head,
.booking-toolbar,
.side-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.eyebrow {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 780;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.booking-side-head h3 {
    margin: 4px 0 0;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: -0.04em;
    text-transform: capitalize;
}

.mini-calendar-actions,
.booking-toolbar-left,
.booking-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-soft-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fff;
    color: #111827;
    font-size: 24px;
    line-height: 1;
    display: inline-grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
}

.icon-soft-btn.large {
    width: 46px;
    height: 46px;
    border-radius: 15px;
}

.icon-soft-btn:hover,
.secondary-btn:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .08);
}

.mini-calendar-weekdays,
.mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.mini-calendar-weekdays {
    margin: 18px 0 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 720;
    text-align: center;
}

.mini-calendar-day {
    position: relative;
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #111827;
    font-size: 14px;
    font-weight: 620;
}

.mini-calendar-day:hover {
    background: #f2f4f7;
}

.mini-calendar-day.muted {
    color: #98a2b3;
}

.mini-calendar-day.today span,
.mini-calendar-day.selected span {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 999px;
}

.mini-calendar-day.today span {
    background: #eef2ff;
    color: #3730a3;
}

.mini-calendar-day.selected span {
    background: #111827;
    color: #fff;
}

.mini-calendar-day.in-range:not(.selected):not(.range-end) {
    border-radius: 10px;
    background: #eef2ff;
}

.mini-calendar-day.range-end span {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #6366f1;
    border-radius: 999px;
    background: #fff;
    color: #3730a3;
}

.mini-calendar-day i {
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    transform: translateX(-50%);
}

.booking-side-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.side-section-title strong {
    font-size: 14px;
    font-weight: 760;
}

.side-section-title span {
    display: inline-grid;
    min-width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 760;
    font-size: 12px;
}

.booking-side-workers {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.booking-status-filter-section .clean-select {
    width: 100%;
    margin-top: 12px;
}

.side-worker-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    padding: 10px;
    text-align: left;
    color: #111827;
}

.side-worker-filter.active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.side-worker-filter strong,
.side-worker-filter small {
    display: block;
}

.side-worker-filter strong {
    font-size: 14px;
    font-weight: 760;
}

.side-worker-filter small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 12px;
}

.side-worker-filter.active small {
    color: rgba(255,255,255,.72);
}

.booking-worker-avatar {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #eef2ff;
    color: #111827;
    font-weight: 760;
}

.booking-worker-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.all-workers-icon {
    font-size: 12px;
}

.clean-select,
.booking-date-pill input,
.booking-search-box input {
    border: 1px solid var(--line-strong);
    border-radius: 15px;
    background: #fff;
    color: #111827;
    min-height: 46px;
    padding: 0 14px;
    font-weight: 650;
    outline: 0;
}

.clean-select:focus,
.booking-date-pill input:focus,
.booking-search-box input:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 4px rgba(79,70,229,.10);
}

.full-width-btn {
    width: 100%;
}

#saveSettingsBtn {
    margin-top: 20px;
}

.compact-select {
    min-width: 132px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.booking-mode-picker {
    position: relative;
    min-width: 238px;
}

.booking-mode-button {
    width: 100%;
    min-height: 54px;
    padding: 7px 12px 7px 9px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: #fff;
    color: var(--text);
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 10px;
    text-align: left;
    box-shadow: var(--shadow-sm);
}

.booking-mode-button:hover,
.booking-mode-button[aria-expanded="true"] {
    border-color: #70b9b1;
    box-shadow: 0 0 0 4px rgba(7, 148, 128, .10), 0 12px 30px rgba(16, 24, 40, .08);
}

.booking-mode-button__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #e9f7f4;
    color: #087f73;
}

.booking-mode-button__icon svg,
.booking-mode-button__chevron {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.booking-mode-button__copy {
    min-width: 0;
}

.booking-mode-button__copy strong,
.booking-mode-button__copy small {
    display: block;
}

.booking-mode-button__copy strong {
    font-size: 14px;
    font-weight: 740;
}

.booking-mode-button__copy small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-weight: 550;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booking-mode-button__chevron {
    color: #667085;
    transition: transform .18s ease;
}

.booking-mode-button[aria-expanded="true"] .booking-mode-button__chevron {
    transform: rotate(180deg);
}

.booking-mode-menu {
    position: absolute;
    z-index: 120;
    top: calc(100% + 8px);
    left: 0;
    width: min(310px, calc(100vw - 32px));
    padding: 8px;
    border: 1px solid #dce3e8;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .18);
}

.booking-mode-option {
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: var(--text);
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    text-align: left;
}

.booking-mode-option:hover {
    background: #f4f8f7;
}

.booking-mode-option.selected {
    background: #e9f7f4;
    color: #075e57;
}

.booking-mode-option__mark {
    width: 22px;
    height: 22px;
    border: 1px solid #ccd7dc;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: transparent;
    font-size: 12px;
    font-weight: 800;
}

.booking-mode-option.selected .booking-mode-option__mark {
    border-color: #0a8f83;
    background: #0a8f83;
    color: #fff;
}

.booking-mode-option strong,
.booking-mode-option small {
    display: block;
}

.booking-mode-option strong {
    font-size: 14px;
}

.booking-mode-option small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.booking-calendar-panel {
    overflow: hidden;
}

.booking-toolbar {
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    flex-wrap: wrap;
}

.booking-toolbar-left { flex-wrap: wrap; }

.booking-date-pill {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    min-width: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.booking-date-pill input {
    width: 166px;
}

.booking-period-step-btn {
    flex: 0 0 46px;
    box-shadow: none;
}

.booking-period-step-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.booking-date-range-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 720;
    white-space: nowrap;
}

.booking-period-picker {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 1 166px;
}

.booking-period-picker[hidden] {
    display: none;
}

.booking-period-picker > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.booking-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 190px;
    border: 1px solid var(--line-strong);
    border-radius: 15px;
    background: #fff;
    padding: 0 12px;
}

.booking-search-box svg {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--muted);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.booking-search-box input {
    border: 0;
    box-shadow: none;
    padding: 0;
    min-height: 44px;
    width: 100%;
}

.booking-board-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
}

.booking-board-summary div {
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.booking-board-summary span,
.booking-board-summary strong {
    display: block;
}

.booking-board-summary span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 780;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.booking-board-summary strong {
    margin-top: 4px;
    font-size: 22px;
    line-height: 1.05;
    font-weight: 760;
    letter-spacing: -0.04em;
}

.booking-board-shell {
    overflow-x: auto;
    background: #fff;
}

.booking-workers-header {
    display: grid;
    grid-template-columns: repeat(var(--booking-workers-count, 1), minmax(220px, 1fr));
    margin-left: 76px;
    min-width: 720px;
    border-bottom: 1px solid var(--line);
}

.booking-worker-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 14px 18px;
    border-left: 1px solid var(--line);
    background: #fff;
}

.booking-worker-head strong,
.booking-worker-head span {
    display: block;
}

.booking-worker-head strong {
    font-size: 15px;
    font-weight: 760;
}

.booking-worker-head span {
    color: var(--muted);
    font-size: 13px;
}

.booking-board-timeline {
    min-height: 660px;
}

.booking-day-board {
    display: grid;
    grid-template-columns: 76px minmax(720px, 1fr);
}

.board-time-column {
    display: grid;
    grid-template-rows: repeat(12, 60px);
    border-right: 1px solid var(--line);
    background: #fff;
}

.board-time-column span {
    padding-top: 8px;
    padding-right: 12px;
    color: #475467;
    font-size: 12px;
    font-weight: 650;
    text-align: right;
    border-bottom: 1px solid #edf0f5;
}

.board-worker-columns {
    display: grid;
    grid-template-columns: repeat(var(--booking-workers-count, 1), minmax(220px, 1fr));
}

.board-worker-column {
    position: relative;
    min-height: 720px;
    border-left: 1px solid var(--line);
    background:
        repeating-linear-gradient(to bottom, #fff 0, #fff 29px, #f1f3f7 30px, #fff 31px),
        #fff;
}

.board-worker-column:hover {
    background:
        repeating-linear-gradient(to bottom, #fbfcff 0, #fbfcff 29px, #edf0f5 30px, #fbfcff 31px),
        #fbfcff;
}

.board-off-hours.top {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 60px;
    background: repeating-linear-gradient(-45deg, rgba(17,24,39,.05), rgba(17,24,39,.05) 4px, transparent 4px, transparent 8px);
    border-bottom: 1px solid #edf0f5;
    pointer-events: none;
}

.board-booking-card {
    position: absolute;
    left: 10px;
    right: 10px;
    min-height: 52px;
    padding: 9px 10px;
    border-radius: 14px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #111827;
    box-shadow: 0 14px 26px rgba(79, 70, 229, .12);
    overflow: hidden;
}

.board-booking-card strong,
.board-booking-card span,
.board-booking-card small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-booking-card strong {
    font-size: 13px;
    font-weight: 780;
}

.board-booking-card span {
    margin-top: 2px;
    color: #475467;
    font-size: 12px;
    font-weight: 650;
}

.board-booking-card small {
    margin-top: 2px;
    color: #3730a3;
    font-size: 11px;
    font-weight: 760;
}

.board-booking-card.status-confirmed {
    background: #ecfdf3;
    border-color: #abefc6;
}

.board-booking-card.status-completed {
    background: #f2f4f7;
    border-color: #d0d5dd;
}

.board-booking-card.status-cancelled,
.board-booking-card.status-noshow {
    background: #fef3f2;
    border-color: #fecdca;
}

.booking-range-board {
    display: grid;
    grid-template-columns: repeat(var(--booking-range-days, 1), minmax(180px, 1fr));
    gap: 0;
    min-width: var(--booking-range-width, 720px);
    background: #fff;
}

.range-board-day {
    min-height: 620px;
    border-left: 1px solid var(--line);
    background: #fff;
}

.range-board-day.today {
    background: #fbfcff;
}

.range-board-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 60px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    padding: 12px;
    text-align: left;
}

.range-board-day-head strong {
    font-size: 14px;
    font-weight: 760;
    text-transform: capitalize;
}

.range-board-day-head span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.range-board-day-list {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.range-board-day-list p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.range-booking-row {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
}

.range-booking-row strong,
.range-booking-row span,
.range-booking-row small {
    display: block;
}

.range-booking-row strong {
    color: #111827;
    font-size: 13px;
    font-weight: 760;
}

.range-booking-row span {
    margin-top: 2px;
    font-size: 13px;
}

.range-booking-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.bookings-list-panel {
    margin-top: 18px;
}

.booking-drawer-open {
    overflow: hidden;
}

.booking-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    justify-content: flex-end;
    background: rgba(17, 24, 39, .56);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.booking-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.booking-drawer {
    width: min(620px, 100vw);
    height: 100vh;
    overflow-y: auto;
    background: #fff;
    box-shadow: -24px 0 55px rgba(16, 24, 40, .20);
    transform: translateX(24px);
    transition: transform .18s ease;
}

.booking-drawer-overlay.open .booking-drawer {
    transform: translateX(0);
}

.booking-drawer-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 28px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.drawer-close-btn {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 13px;
    background: #f2f4f7;
    color: #111827;
    font-size: 28px;
    line-height: 1;
}

.booking-drawer-header h3 {
    margin: 0;
    font-size: 30px;
    line-height: 1;
    letter-spacing: -0.05em;
    font-weight: 780;
}

.booking-drawer-header p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.booking-client-box {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 28px;
    padding: 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: #fbfcff;
}

.client-placeholder-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-size: 30px;
    font-weight: 300;
}

.booking-client-box strong,
.booking-client-box span {
    display: block;
}

.booking-client-box strong {
    font-weight: 760;
}

.booking-client-box span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 14px;
}

.drawer-tabs {
    display: flex;
    gap: 24px;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
}

.drawer-tab {
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: 14px 0;
    color: var(--muted);
    font-weight: 760;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .04em;
}

.drawer-tab.active {
    color: #111827;
    border-bottom-color: #111827;
}

.drawer-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 24px 28px 0;
}

.drawer-form-grid .full-width,
.drawer-slots-card,
.drawer-selected-slot,
.drawer-bottom-actions {
    grid-column: 1 / -1;
}

.drawer-action-field {
    align-self: end;
}

.drawer-slots-card {
    margin: 20px 28px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fbfcff;
}

.drawer-selected-slot {
    margin: 18px 28px 0;
}

.drawer-bottom-actions {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 18px 28px;
    background: rgba(255,255,255,.94);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.drawer-bottom-actions .secondary-btn,
.drawer-bottom-actions .success-btn {
    min-height: 54px;
    font-size: 15px;
    font-weight: 780;
}

@media (max-width: 1180px) {
    .booking-workspace {
        grid-template-columns: 1fr;
    }

    .booking-side-panel {
        position: static;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(230px, .42fr);
        gap: 16px;
        padding: 16px;
    }

    .booking-side-head,
    .booking-side-panel > .mini-calendar-weekdays,
    .booking-side-panel > .mini-calendar-grid,
    .booking-today-section {
        display: none;
    }

    .booking-workers-filter-section,
    .booking-status-filter-section {
        min-width: 0;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .booking-side-workers {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 0 0 5px;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
    }

    .side-worker-filter {
        flex: 0 0 220px;
        scroll-snap-align: start;
    }

    .booking-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .booking-toolbar-left,
    .booking-toolbar-right,
    .booking-date-pill {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .booking-board-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .booking-side-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .booking-status-filter-section {
        padding-top: 16px;
        border-top: 1px solid var(--line);
    }

    .side-worker-filter {
        flex-basis: min(220px, 76vw);
    }

    .booking-pro-banner,
    .booking-toolbar-left,
    .booking-toolbar-right {
        align-items: stretch;
        flex-direction: column;
    }

    .booking-board-summary,
    .drawer-form-grid,
    .drawer-bottom-actions {
        grid-template-columns: 1fr;
    }

    .booking-date-pill,
    .booking-search-box {
        width: 100%;
        min-width: 0;
    }

    .booking-period-picker {
        flex: 1 1 160px;
    }

    .booking-date-pill input {
        width: 100%;
    }

    .booking-date-range-label {
        flex: 1 1 100%;
        padding-left: 54px;
    }

    .booking-drawer-header,
    .booking-client-box,
    .drawer-form-grid,
    .drawer-slots-card,
    .drawer-selected-slot,
    .drawer-bottom-actions {
        margin-left: 16px;
        margin-right: 16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .booking-drawer-header {
        margin: 0;
    }
}

/* Popular service picker */
.service-template-picker {
    grid-column: 1 / -1;
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid #e4e7ec;
    border-radius: 20px;
    background:
        radial-gradient(circle at 100% 0, rgba(17, 24, 39, .06), transparent 34%),
        #f8fafc;
}

.service-template-picker-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.service-template-picker-copy > span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
}

.service-template-picker-copy > strong {
    color: #101828;
    font-size: 17px;
    line-height: 1.3;
}

.service-template-picker-copy > small {
    max-width: 760px;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
}

.service-template-picker-grid {
    display: grid;
    grid-template-columns: minmax(180px, .75fr) minmax(260px, 1.25fr) minmax(230px, .9fr);
    gap: 14px;
    align-items: start;
}

.service-template-picker select {
    min-height: 50px;
    background-color: #fff;
}

.service-template-picker select:disabled {
    cursor: not-allowed;
    color: #98a2b3;
    background: #f2f4f7;
}

.service-template-package-action button {
    width: 100%;
    min-height: 50px;
}

.service-template-package-action .form-help {
    min-height: 34px;
}

@media (max-width: 1050px) {
    .service-template-picker-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-template-package-action {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .service-template-picker {
        padding: 16px;
        border-radius: 16px;
    }

    .service-template-picker-grid {
        grid-template-columns: 1fr;
    }

    .service-template-package-action {
        grid-column: auto;
    }
}

/* =========================================================
   Fixed desktop sidebar
   Keeps the rail visible while the page scrolls and keeps the
   collapsed account avatar centred.
   ========================================================= */
@media (min-width: 761px) {
    .app-shell {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 68px;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: none !important;
    }

    .main-content {
        grid-column: 2;
    }

    .sidebar-footer {
        width: 100%;
        justify-items: center;
    }

    .sidebar-footer > small {
        display: none !important;
        width: auto;
        margin: 0;
    }

    .sidebar-avatar {
        margin-inline: auto !important;
    }

    .sidebar:hover .sidebar-footer,
    .sidebar.is-keyboard-focus:focus-within .sidebar-footer {
        display: grid !important;
        grid-template-columns: 34px minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 10px;
        row-gap: 1px;
        align-items: center;
        justify-items: start;
        padding: 9px 8px 0 !important;
    }

    .sidebar:hover .sidebar-avatar,
    .sidebar.is-keyboard-focus:focus-within .sidebar-avatar {
        grid-column: 1;
        grid-row: 1 / 3;
        margin: 0 !important;
    }

    .sidebar:hover .sidebar-footer > span,
    .sidebar.is-keyboard-focus:focus-within .sidebar-footer > span {
        grid-column: 2;
        grid-row: 1;
        display: block;
    }

    .sidebar:hover .sidebar-footer > small,
    .sidebar.is-keyboard-focus:focus-within .sidebar-footer > small {
        grid-column: 2;
        grid-row: 2;
        display: block !important;
        width: auto;
        margin: 0;
        color: rgba(255, 255, 255, .48);
        line-height: 1.2;
        white-space: nowrap;
    }
}
