@import url("/assets/css/controls.css?v=4");
/* ============================================================
   WEBLINK ADMIN
   Shared styles for login, register and backoffice
   ============================================================ */


/* ============================================================
   RESET
   ============================================================ */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    background: #f5f6f8;
    color: #222;
}

a {
    color: inherit;
    text-decoration: none;
}

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


/* ============================================================
   AUTH
   Login / Register
   ============================================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
}

.auth-box {
    width: 100%;
    max-width: 450px;
    background: #fff;
    padding: 35px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h1 {
    margin: 0;
    font-size: 28px;
}

.auth-title {
    margin: 0 0 25px;
    font-size: 22px;
}


/* ============================================================
   FORMS
   ============================================================ */

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-control,
.form-select {
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #d5d9df;
    border-radius: 6px;
    background: #fff;
    color: #222;
    outline: none;
    line-height: 22px;
}

.form-select:focus {
    border-color: #777;
}

.form-control:focus,
.form-select:focus {
    border-color: #777;
}

.form-help {
    margin-top: 5px;
    font-size: 13px;
    color: #777;
}


/* ============================================================
   ALERTS
   ============================================================ */

.alert {
    padding: 12px 14px;
    margin-bottom: 20px;
    border-radius: 6px;
}

.alert-error {
    background: #fbeaea;
    color: #a00000;
}

.alert-success {
    background: #eaf7ed;
    color: #176b2c;
}


/* ============================================================
   ADMIN LAYOUT
   ============================================================ */

.admin-layout {
    min-height: 100vh;
    display: flex;
    background: #f5f6f8;
}


/* ============================================================
   ADMIN SIDEBAR
   ============================================================ */

.admin-sidebar {
    width: 240px;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;

    display: flex;
    flex-direction: column;

    background: #222;
    color: #fff;
}


.admin-sidebar > * {
    flex-shrink: 0;
}

/* ============================================================
   SIDEBAR LOGO
   ============================================================ */

.sidebar-logo {
    height: 70px;

    display: flex;
    align-items: center;

    padding: 0 24px;

    font-size: 22px;
    font-weight: 700;
    
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}


/* ============================================================
   SIDEBAR NAVIGATION
   ============================================================ */

.sidebar-nav {
    padding: 15px 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 11px 13px;
    margin-bottom: 4px;

    border-radius: 6px;

    color: rgba(255, 255, 255, 0.75);

    font-size: 14px;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 600;
}


/* ============================================================
   SIDEBAR BOTTOM
   ============================================================ */

.sidebar-bottom {
    margin-top: auto;

    padding: 12px 10px;

    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


/* ============================================================
   ADMIN MAIN
   ============================================================ */

.admin-main {
    margin-left: 240px;

    width: calc(100% - 240px);

    min-height: 100vh;
}


/* ============================================================
   ADMIN HEADER
   ============================================================ */

.admin-header {
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 30px;

    background: #fff;

    border-bottom: 1px solid #e5e7eb;
}


/* ============================================================
   COMPANY NAME
   ============================================================ */

.admin-company-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}


/* ============================================================
   CURRENT USER
   ============================================================ */

.admin-user {
    text-align: right;
}

.admin-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.admin-user-phone {
    margin-top: 2px;

    font-size: 12px;
    color: #6b7280;
}


/* ============================================================
   ADMIN CONTENT
   ============================================================ */

.admin-content {
    width: 100%;
    max-width: 1400px;

    padding: 32px;
}

.admin-content h1 {
    margin: 0;

    font-size: 28px;
    font-weight: 700;

    color: #111827;
}

.page-description {
    margin: 8px 0 28px;

    font-size: 14px;
    color: #6b7280;
}


/* ============================================================
   GENERIC CARD
   ============================================================ */

.card {
    padding: 20px;

    background: #fff;

    border: 1px solid #e5e7eb;

    border-radius: 8px;
}

.card-title {
    margin: 0 0 15px;

    font-size: 18px;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {

    .admin-sidebar {
        width: 210px;
    }

    .admin-main {
        margin-left: 210px;

        width: calc(100% - 210px);
    }

}


@media (max-width: 700px) {

    .admin-sidebar {
        width: 64px;
    }

    .sidebar-logo {
        justify-content: center;

        padding: 0;

        font-size: 0;
    }

    .sidebar-logo::after {
        content: "W";

        font-size: 22px;
    }

    .sidebar-link {
        justify-content: center;

        padding: 12px 0;
    }

    .sidebar-link span {
        display: none;
    }

    .admin-main {
        margin-left: 64px;

        width: calc(100% - 64px);
    }

    .admin-header {
        padding: 0 18px;
    }

    .admin-content {
        padding: 22px 18px;
    }

    .admin-user-phone {
        display: none;
    }

}


@media (max-width: 480px) {

    .auth-box {
        padding: 25px 20px;
    }

    .admin-content {
        padding: 18px 14px;
    }

    .admin-header {
        padding: 0 14px;
    }

    .admin-content h1 {
        font-size: 24px;
    }

}


/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}


/* ============================================================
   TABLE
   ============================================================ */

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

.admin-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.admin-table th {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
}

.admin-table td {
    font-size: 14px;
    color: #374151;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: #fafafa;
}

.table-empty {
    padding: 40px 16px !important;
    text-align: center !important;
    color: #6b7280 !important;
}


/* ============================================================
   MOBILE TABLE
   ============================================================ */

@media (max-width: 700px) {

    .table-wrapper {
        overflow: visible;
    }

    .admin-table {
        min-width: 0;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 12px;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table tbody tr {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 16px;
    }

    .admin-table tbody tr:hover {
        background: #fff;
    }

    .admin-table td {
        padding: 0;
        border: 0;
        white-space: normal;
    }

    .admin-table td + td {
        margin-top: 8px;
    }

}


/* ============================================================
   STATUS
   ============================================================ */

.status {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}


/* Active / Success */

.status-active,
.status-success {
    background: #eaf7ed;
    color: #176b2c;
}


/* Inactive */

.status-inactive {
    background: #f3f4f6;
    color: #6b7280;
}


/* Pending / Waiting */

.status-pending {
    background: #fff7e6;
    color: #9a6700;
}


/* Warning */

.status-warning {
    background: #fff7e6;
    color: #9a6700;
}


/* Error / Failed */

.status-error,
.status-failed {
    background: #fbeaea;
    color: #a00000;
}


/* Suspended / Blocked */

.status-suspended,
.status-blocked {
    background: #fbeaea;
    color: #a00000;
}


/* Draft */

.status-draft {
    background: #f3f4f6;
    color: #6b7280;
}


/* Published */

.status-published {
    background: #eaf7ed;
    color: #176b2c;
}


/* ============================================================
   TABLE ACTIONS
   ============================================================ */

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

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 18px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    gap: 8px;
}

:root {
    --admin-primary: #222;
    --admin-sidebar-accent: #7197c6;
    --admin-secondary-bg: #f3f4f6;
    --admin-secondary-hover-bg: #e5e7eb;
    --admin-secondary-text: #374151;
    --admin-secondary-border: #d5d9df;
    --admin-delete-text: #b42332;
    --admin-delete-hover-text: #91202b;
    --admin-action-height: 44px;
    --admin-action-radius: 6px;
    --admin-action-padding: 9px 18px;
}

.btn-primary {
    background: var(--admin-primary);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* One neutral button style for secondary controls and all row actions.
   Behavior hooks stay separate from the explicit destructive button class. */
.btn-secondary,
.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--admin-action-height);
    padding: var(--admin-action-padding);
    border: 1px solid var(--admin-secondary-border);
    border-radius: var(--admin-action-radius);
    background: var(--admin-secondary-bg);
    color: var(--admin-secondary-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
}

.btn-secondary:hover,
.table-action:hover {
    background: var(--admin-secondary-hover-bg);
    color: var(--admin-secondary-text);
    text-decoration: none;
}

.btn-secondary:focus-visible,
.table-action:focus-visible {
    outline: 2px solid var(--admin-primary);
    outline-offset: 2px;
}

.btn-secondary:disabled,
.table-action:disabled,
.table-action[aria-disabled="true"] {
    opacity: .5;
    cursor: not-allowed;
}

/* ============================================================
   FORM ACTIONS
   ============================================================ */

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}


.form-actions-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.form-actions .btn {
    width: auto;
    min-width: 100px;
}

/* ============================================================
   AUTH BUTTON
   ============================================================ */

.auth-box .btn-primary {
    width: 100%;
}

/* ============================================================
   PAGE HEADER ACTION
   ============================================================ */

.page-header .btn {
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

.sidebar-section-title {
    padding: 0 13px 9px;
    margin-left: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--admin-sidebar-accent);
}
/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s ease;
}

.pagination-link:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.pagination-link.active {
    background: #333;
    border-color: #333;
    color: #fff;
}

.pagination-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Table Actions */

.admin-table th.table-actions,
.admin-table td.table-actions {
    text-align: right;
}
@media (max-width: 768px) {

    .admin-table th,
    .admin-table td {
        text-align: left;
    }

    .admin-table th.table-actions,
    .admin-table td.table-actions {
        text-align: right;
    }

}

/* ============================================================
   TABLE SEARCH
   ============================================================ */

.table-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.table-search .form-control {
    flex: 1;
    min-width: 0;
}

.table-search .btn {
    flex-shrink: 0;
}

@media (max-width: 600px) {

    .table-search {
        flex-direction: column;
        align-items: stretch;
    }

    .table-search .btn {
        width: 100%;
    }

}


.alert-message {
    display: none;
    width: 100%;
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

.alert-message.success {
    display: block;
    background: #ecfdf3;
    border-color: #a7f3d0;
    color: #047857;
}

.alert-message.error {
    display: block;
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.form-section-label {
    margin: 12px 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.card-title + .form-section-label {
    margin-top: 8px;
}

.admin-content > .card + .card {
    margin-top: 20px;
}



.status-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

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

.switch-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 999px;
    transition: background 0.2s ease;
}

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

.status-switch input:checked + .switch-slider {
    background: #22c55e;
}

.status-switch input:checked + .switch-slider::after {
    transform: translateX(20px);
}

.status-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}
.page-header-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.page-back-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    text-decoration: none;
}

/* ============================================================
   WEBLINK BOOKING POPUPS â€” SINGLE CONSISTENT RULESET
   Desktop: centered dialog. Mobile: full-width dialog.
   ============================================================ */
:root {
    --booking-popup-header-height: 80px;
    --booking-popup-backdrop: rgba(0, 0, 0, 0.45);
    --booking-popup-strip: transparent;
}

:is(#booking-details, #booking-customer).booking-details,
#booking-edit.booking-edit {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    overflow: auto;
    background: var(--booking-popup-backdrop);
}

:is(#booking-details, #booking-customer).booking-details.open,
#booking-edit.booking-edit.open {
    display: flex;
}

:is(#booking-details, #booking-customer) .booking-details-panel,
#booking-edit .booking-edit-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(880px, calc(100vw - 48px));
    max-width: 880px;
    height: min(720px, calc(100vh - 20vh - var(--booking-popup-header-height)));
    min-height: 300px;
    max-height: none;
    margin: var(--booking-popup-header-height) 0 0;
    padding: 0;
    overflow: visible;
    box-sizing: border-box;
    background: #fff;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

/* Details action strip sits immediately above the white dialog. */
:is(#booking-details, #booking-customer) .booking-details-header {
    position: absolute;
    top: calc(-1 * var(--booking-popup-header-height));
    right: 0;
    left: 0;
    z-index: 5;
    display: block;
    height: var(--booking-popup-header-height);
    margin: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    color: #fff;
}

:is(#booking-details, #booking-customer) .booking-details-header > div:first-child {
    position: absolute;
    top: calc(var(--booking-popup-header-height) + 20px);
    right: 24px;
    left: 24px;
    z-index: 2;
    pointer-events: none;
}

:is(#booking-details, #booking-customer) .booking-details-title,
#booking-edit .booking-edit-title {
    margin: 0;
    color: #111827;
    font-size: 24px;
    font-weight: 700;
}

:is(#booking-details, #booking-customer) .booking-details-service,
#booking-edit .booking-edit-subtitle {
    margin-top: 4px;
    color: #6b7280;
    font-size: 14px;
}

:is(#booking-details, #booking-customer) .booking-details-header-actions {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

:is(#booking-details, #booking-customer) .booking-details-edit,
:is(#booking-details, #booking-customer) .booking-details-close,
#booking-edit .booking-edit-close {
    position: absolute;
    top: 19px;
    z-index: 11;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    pointer-events: auto;
}

:is(#booking-details, #booking-customer) .booking-details-edit { right: 84px; }
:is(#booking-details, #booking-customer) .booking-details-close { right: 24px; left: auto; font-size: 22px; }
#booking-edit .booking-edit-close { top: 19px; right: 24px; left: auto; font-size: 22px; }

:is(#booking-details, #booking-customer) .booking-details-edit:hover,
:is(#booking-details, #booking-customer) .booking-details-close:hover,
#booking-edit .booking-edit-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

:is(#booking-details, #booking-customer) .booking-details-list {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 112px 24px 24px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

:is(#booking-details, #booking-customer) .booking-details-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
    border-bottom: 1px solid #eef0f3;
}

:is(#booking-details, #booking-customer) .booking-details-actions,
#booking-edit .booking-edit-actions {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 16px 16px;
    background: #fff;
}

:is(#booking-details, #booking-customer) .booking-details-actions button,
#booking-edit .booking-edit-actions .btn {
    min-height: 44px;
}

/* Edit popup: separate action strip and a scrollable form area. */
#booking-edit.booking-edit::before {
    content: "";
    position: absolute;
    top: 10vh;
    left: 50%;
    width: min(880px, calc(100vw - 48px));
    height: var(--booking-popup-header-height);
    transform: translateX(-50%);
    border-radius: 16px 16px 0 0;
    background: transparent;
    pointer-events: none;
}

#booking-edit .booking-edit-panel {
    margin-top: var(--booking-popup-header-height);
    overflow: hidden;
}

#booking-edit .booking-edit-header {
    position: relative;
    flex: 0 0 auto;
    display: block;
    margin: 0;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #eef0f3;
    background: #fff;
}

#booking-edit .booking-edit-close {
    position: fixed;
    top: calc(10vh + 19px);
    right: max(24px, calc((100vw - 880px) / 2 + 24px));
    z-index: 10020;
}

#booking-edit .booking-edit-form {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#booking-edit .booking-edit-field,
#booking-edit .booking-edit-message {
    flex: 0 0 auto;
    margin-right: 24px;
    margin-left: 24px;
}

#booking-edit .booking-edit-field:first-child { margin-top: 20px; }
#booking-edit .booking-edit-field { margin-bottom: 16px; }

#booking-edit .booking-edit-field label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

#booking-edit .booking-edit-field input,
#booking-edit .booking-edit-field select {
    width: 100%;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    background: #fff;
    color: #111827;
    font: inherit;
    box-sizing: border-box;
}

#booking-edit .booking-edit-message {
    min-height: 20px;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 13px;
}
#booking-edit .booking-edit-message.error { color: #b91c1c; }
#booking-edit .booking-edit-message.success { color: #166534; }

@media (max-width: 640px) {
    :is(#booking-details, #booking-customer).booking-details,
    #booking-edit.booking-edit {
        align-items: stretch;
        justify-content: flex-start;
        overflow: hidden;
        /* Use the exact same single backdrop on desktop and mobile. */
        background: var(--booking-popup-backdrop);
    }

    :is(#booking-details, #booking-customer) .booking-details-panel,
    #booking-edit .booking-edit-panel {
        position: absolute;
        inset: var(--booking-popup-header-height) 0 0;
        width: 100%;
        max-width: none;
        height: auto;
        min-height: 0;
        margin: 0;
        border-radius: 16px 16px 0 0;
        box-shadow: none;
    }

    :is(#booking-details, #booking-customer) .booking-details-header {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        height: var(--booking-popup-header-height);
        background: transparent;
    }

    :is(#booking-details, #booking-customer) .booking-details-header > div:first-child {
        top: calc(var(--booking-popup-header-height) + 20px);
        right: 16px;
        left: 16px;
    }

    :is(#booking-details, #booking-customer) .booking-details-edit { right: 64px; }
    :is(#booking-details, #booking-customer) .booking-details-close { right: 14px; }

    :is(#booking-details, #booking-customer) .booking-details-list {
        padding: 112px 16px 20px;
    }

    :is(#booking-details, #booking-customer) .booking-details-actions,
    #booking-edit .booking-edit-actions {
        gap: 8px;
        padding: 12px 16px;
    }

    #booking-edit.booking-edit::before {
        top: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: var(--booking-popup-header-height);
        transform: none;
        border-radius: 0;
        background: transparent;
    }

    #booking-edit .booking-edit-panel {
        margin-top: 0;
    }

    #booking-edit .booking-edit-header {
        padding: 20px 16px 14px;
    }

    #booking-edit .booking-edit-title { font-size: 21px; }

    #booking-edit .booking-edit-close {
        position: fixed;
        top: 19px;
        right: 14px;
        z-index: 10020;
    }

    #booking-edit .booking-edit-field,
    #booking-edit .booking-edit-message {
        margin-right: 16px;
        margin-left: 16px;
    }

    #booking-edit .booking-edit-actions .btn { flex: 1 1 0; }
}
/* Customer selection uses the standard booking dialog shell. */
#booking-customer .booking-details-panel{max-width:680px}
#booking-customer .booking-details-list{padding:24px}
#booking-customer h2{margin:0 0 22px}
#booking-customer .customer-picker-toolbar{display:flex;gap:12px;margin-bottom:24px}
#booking-customer .customer-picker-toolbar input{min-width:0;flex:1}
#booking-customer .customer-picker-row{display:block;width:100%;text-align:left;padding:16px 12px;background:transparent;border:0;border-bottom:1px solid #e5e7eb;cursor:pointer;color:inherit;font:inherit}
#booking-customer .customer-picker-row:hover{background:#f3f4f6}
#booking-customer .customer-picker-row strong,#booking-customer .customer-picker-row span{display:block}
#booking-customer .customer-picker-row span{font-size:14px;color:#6b7280;margin-top:5px}
#booking-customer .customer-picker-row:focus-visible{outline:2px solid currentColor;outline-offset:-2px}
#booking-customer .customer-picker-status{color:#6b7280;font-size:14px;line-height:1.6}
#booking-customer .customer-picker-error{color:#b91c1c}
#booking-customer .form-group{margin-bottom:20px}
#booking-customer [hidden]{display:none!important}
@media(max-width:640px){#booking-customer .booking-details-panel{max-width:none}#booking-customer .customer-picker-toolbar{flex-wrap:wrap}#booking-customer .booking-details-list{padding:24px 16px}}

/* Booking overview: customer first, then service, time and staff. */
#booking-details .booking-details-service a{color:inherit;text-decoration:none;pointer-events:auto;text-underline-offset:3px}
#booking-details .booking-details-service a:hover{text-decoration:underline}
#booking-details .booking-details-list{padding-top:96px}
#booking-details .booking-overview{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:18px;overflow-wrap:anywhere;border-top:1px solid #e5e7eb;padding-top:18px}
#booking-details .booking-overview-label{display:block;color:#6b7280;font-size:13px;margin-bottom:8px}
#booking-details .booking-overview-service{display:block;font-size:21px;line-height:1.4;font-weight:650;color:#111827}
#booking-details .booking-overview-staff{display:block;font-size:17px;line-height:1.6;font-weight:550;color:#111827}
#booking-details .booking-overview-when{grid-column:1/-1;background:transparent;border-top:1px solid #e5e7eb;padding-top:18px}
#booking-details .booking-overview-when strong{display:block;font-size:19px;font-weight:650;line-height:1.5;color:#111827}
#booking-details .booking-overview-when>span:last-child{display:block;font-size:16px;line-height:1.6;margin-top:3px;color:#374151}
#booking-details .booking-overview-badges{display:flex;gap:8px;flex-wrap:wrap;grid-column:1/-1;border-top:1px solid #e5e7eb;padding-top:18px}
#booking-details .booking-overview-badge{display:inline-block;padding:6px 10px;border:1px solid #e5e7eb;border-radius:100px;background:transparent;color:#374151;font-size:12px;font-weight:550;line-height:1.4}
#booking-details .booking-overview-reference,#booking-details .booking-overview-contact{grid-column:1/-1;font-size:13px;color:#6b7280}
#booking-details .booking-overview-contact a{color:inherit;text-underline-offset:3px}
@media(max-width:480px){#booking-details .booking-overview{grid-template-columns:1fr;gap:20px}#booking-details .booking-overview-when{padding:18px 0 0}}

/* Only destructive Delete actions use red text; image X controls stay gray. */
.btn-secondary.btn-delete,
.table-action.btn-delete { color: var(--admin-delete-text); }
.btn-secondary.btn-delete:hover,
.table-action.btn-delete:hover { color: var(--admin-delete-hover-text); }

/* Compact row actions; page and form controls retain their full size. */
:root {
    --admin-row-action-height: 34px;
    --admin-row-action-padding: 6px 12px;
    --admin-row-action-font-size: 13px;
}
.admin-table :is(.table-action, .btn-secondary) {
    min-height: var(--admin-row-action-height);
    padding: var(--admin-row-action-padding);
    font-size: var(--admin-row-action-font-size);
}

/* Shared segmented selector: product type and Home editor views. */
.admin-segmented{display:inline-flex;gap:4px;padding:4px;border:1px solid #e5e7eb;border-radius:8px;background:#f3f4f6;max-width:100%}
.admin-segmented [hidden]{display:none!important}
.admin-segmented-choice{border:1px solid transparent;border-radius:5px;background:transparent;padding:10px 16px;min-height:42px;font:inherit;font-size:14px;color:#6b7280;cursor:pointer}
.admin-segmented-choice:is([aria-pressed=true],[aria-selected=true]){background:#fff;color:var(--admin-primary,#222);border-color:#d1d5db;font-weight:600;box-shadow:0 1px 2px #0000000a}
.admin-segmented-choice:focus-visible{outline:2px solid var(--admin-primary,#222);outline-offset:2px}
@media(max-width:500px){.admin-segmented{display:flex;width:100%}.admin-segmented-choice{flex:1;padding:10px 8px;min-width:0}}

/* Shared image picker tile. */
.admin-image-upload{position:relative;width:150px;margin-top:10px}
.admin-image-tile{display:flex;align-items:center;justify-content:center;width:150px;height:150px;padding:0;border:1px dashed var(--admin-secondary-border);border-radius:8px;background:#f9fafb;color:#6b7280;overflow:hidden;cursor:pointer}
.admin-image-tile:hover{border-color:var(--admin-primary);background:var(--admin-secondary-bg)}
.admin-image-plus{font-size:42px;line-height:1;font-weight:300}
.admin-image-tile img{display:block;width:100%;height:100%;object-fit:cover}
.admin-image-remove{position:absolute;top:6px;right:6px;display:grid;place-items:center;width:28px;height:28px;padding:0;border:1px solid var(--admin-secondary-border);border-radius:50%;background:white;color:#6b7280;font-size:22px;line-height:1;cursor:pointer;box-shadow:0 1px 4px #0002}
.admin-image-upload [hidden]{display:none!important}
.admin-image-tile:focus-visible,.admin-image-remove:focus-visible{outline:2px solid var(--admin-primary);outline-offset:3px}

/* Context adapters retain one tile size and removal control. */
.wb-image-field.admin-image-upload{display:block}
.wb-image-field.admin-image-upload .wb-image-preview{width:100%;height:100%;max-height:none;object-fit:contain;border:0}
.product-image-tiles{display:flex;align-items:flex-start;flex-wrap:wrap;gap:12px}
.product-image-tiles .product-gallery{display:contents}
.product-image-tiles .gallery-item{width:150px;padding:0;border:0;background:transparent;overflow:visible}
.product-image-tiles .gallery-thumb{width:150px;height:150px;border:1px solid var(--admin-secondary-border);border-radius:8px;object-fit:cover}
.product-image-tiles .gallery-item.is-main{border:0;background:transparent}
.product-image-tiles .gallery-item.is-main .gallery-thumb{border:2px solid var(--admin-primary)}
.product-image-tiles .gallery-item .admin-image-remove{top:6px;right:6px;width:28px;height:28px;border:1px solid var(--admin-secondary-border)}
.product-image-tiles .gallery-badge{top:6px;left:6px;background:var(--admin-primary)}
.admin-image-tile:disabled{opacity:.45;cursor:not-allowed}

/* Shared website preview action on every admin page. */
.admin-header { gap:16px; }
.admin-company-name { min-width:0; overflow-wrap:break-word; }
.admin-header-actions { display:flex; align-items:center; gap:20px; flex-shrink:0; }
.admin-preview-website { display:inline-flex; align-items:center; justify-content:center; gap:8px; white-space:nowrap; }
@media(max-width:600px) {
    .admin-header { height:auto; min-height:70px; padding-top:10px; padding-bottom:10px; gap:10px; }
    .admin-header-actions { gap:10px; }
    .admin-preview-website { width:44px; min-width:44px; padding:0; }
    .admin-preview-website span { display:none; }
    .admin-header .admin-user { max-width:100px; overflow-wrap:break-word; }
}

/* Compact sidebar group markers remain distinct from navigation actions. */
.sidebar-section-icon { display: none; }
@media (max-width: 700px) {
    .sidebar-section-title {
        display: flex;
        justify-content: center;
        margin: 8px 0 0;
        padding: 0;
    }
    .sidebar-section-title > span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .admin-sidebar .sidebar-section-title > .sidebar-section-icon {
        display: inline-flex;
        flex: 0 0 32px;
        text-align: center;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        color: var(--admin-sidebar-accent);
        font-size: 20px;
        letter-spacing: normal;
    }
}

@media (min-width: 701px) {
    .admin-sidebar .sidebar-section-title {
        display: flex;
        align-items: center;
        gap: 9px;
    }
    .admin-sidebar .sidebar-section-title > .sidebar-section-icon {
        display: inline-block;
        width: 16px;
        flex: 0 0 16px;
        text-align: center;
    }
}
