/*
 * Yatoon Staff Portal - Mobile-first PWA stylesheet
 * Designed for installation on phone home screen
 */

/* Reset and base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --sp-pink:      #ec4899;
    --sp-pink-dark: #db2777;
    --sp-ink:       #111827;
    --sp-ink2:      #374151;
    --sp-muted:     #6b7280;
    --sp-border:    #e5e7eb;
    --sp-bg:        #f9fafb;
    --sp-card:      #ffffff;
    --sp-green:     #16a34a;
    --sp-red:       #dc2626;
    --sp-amber:     #d97706;
    --sp-radius:    14px;
    --sp-radius-sm: 8px;
    --sp-shadow:    0 1px 4px rgba(15,23,42,.08);
    --sp-shadow-lg: 0 8px 24px rgba(15,23,42,.12);
    --safe-top:     env(safe-area-inset-top, 0px);
    --safe-bottom:  env(safe-area-inset-bottom, 0px);
}

body.yatoon-staff-portal-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--sp-bg);
    color: var(--sp-ink);
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

/* App shell */
#ysp-app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

    /* Screens */
.ysp-screen { display: none; flex-direction: column; flex: 1; }
.ysp-screen.active { display: flex; }

/* Login screen */
#ysp-login-screen {
    justify-content: center;
    align-items: center;
    padding: 32px 24px calc(32px + var(--safe-bottom));
    background: var(--sp-card);
}

.ysp-login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--sp-pink) 0%, var(--sp-pink-dark) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
    box-shadow: 0 4px 14px rgba(236,72,153,.3);
}

.ysp-login-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
}

.ysp-login-sub {
    font-size: 14px;
    color: var(--sp-muted);
    text-align: center;
    margin-bottom: 32px;
}

.ysp-login-form { width: 100%; max-width: 320px; }

.ysp-field { margin-bottom: 16px; }

.ysp-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--sp-ink2);
    margin-bottom: 6px;
}

.ysp-input {
    width: 100%;
    height: 48px;
    border: 1.5px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    padding: 0 14px;
    font-size: 16px; /* prevent iOS zoom */
    color: var(--sp-ink);
    background: var(--sp-card);
    outline: none;
    transition: border-color .15s;
}

.ysp-input:focus { border-color: var(--sp-pink); }

/* PIN dots display */
.ysp-pin-display {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.ysp-pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--sp-border);
    background: transparent;
    transition: background .15s, border-color .15s;
}

.ysp-pin-dot.filled {
    background: var(--sp-pink);
    border-color: var(--sp-pink);
}

/* PIN numpad */
.ysp-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 24px;
}

.ysp-numpad-btn {
    height: 64px;
    border: 1.5px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    background: var(--sp-card);
    font-size: 22px;
    font-weight: 500;
    color: var(--sp-ink);
    cursor: pointer;
    transition: background .1s, transform .1s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
}

.ysp-numpad-btn:active {
    background: var(--sp-bg);
    transform: scale(.95);
}

.ysp-numpad-btn.backspace { font-size: 18px; color: var(--sp-muted); }
.ysp-numpad-btn.empty { border: none; background: transparent; pointer-events: none; }

.ysp-login-error {
    color: var(--sp-red);
    font-size: 13px;
    text-align: center;
    min-height: 20px;
    margin-bottom: 8px;
}

/* Top bar */
.ysp-topbar {
    background: var(--sp-card);
    border-bottom: 1px solid var(--sp-border);
    padding: calc(12px + var(--safe-top)) 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.ysp-topbar-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--sp-ink);
}

.ysp-topbar-sub {
    font-size: 12px;
    color: var(--sp-muted);
    margin-top: 1px;
}

.ysp-topbar-logout {
    font-size: 13px;
    color: var(--sp-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
}

.ysp-topbar-logout:active { background: var(--sp-bg); }

    /* Day tabs */
.ysp-day-tabs {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: var(--sp-card);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ysp-day-tabs::-webkit-scrollbar { display: none; }

.ysp-day-tab {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 14px;
    border-radius: var(--sp-radius-sm);
    border: 1.5px solid var(--sp-border);
    background: var(--sp-card);
    color: var(--sp-ink);
    cursor: pointer;
    transition: all .15s;
    -webkit-tap-highlight-color: transparent;
}

.ysp-day-tab.active {
    background: var(--sp-pink);
    border-color: var(--sp-pink);
    color: #fff;
}

.ysp-day-tab-day { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.ysp-day-tab-num { font-size: 20px; font-weight: 700; line-height: 1.2; }
.ysp-day-tab-count {
    font-size: 10px;
    background: rgba(0,0,0,.08);
    border-radius: 999px;
    padding: 1px 6px;
    margin-top: 3px;
}
.ysp-day-tab.active .ysp-day-tab-count { background: rgba(255,255,255,.25); }

.ysp-week-nav {
    flex: 0 0 auto;
    align-self: stretch;
    min-width: 58px;
    border: 1px solid rgba(229,231,235,.9);
    border-radius: 16px;
    background: #fff;
    color: #374151;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
    box-shadow: 0 8px 18px rgba(15,23,42,.04);
    -webkit-tap-highlight-color: transparent;
}

/* 3.6.0 employee workspace */
.ysp-staff-tabs {
    gap: 8px;
    padding: 8px 16px 10px;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    scrollbar-width: none;
}

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

.ysp-staff-tab {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-weight: 700;
    white-space: nowrap;
}

.ysp-staff-tab i {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
}

.ysp-staff-tab.active {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.ysp-today-head {
    padding: 14px 2px 8px;
}

.ysp-today-head span {
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ysp-today-head h2 {
    margin: 5px 0 0;
    color: #111827;
    font-size: 24px;
    letter-spacing: 0;
}

.ysp-today-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 18px;
}

.ysp-today-metrics > div {
    min-width: 0;
    padding: 13px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.ysp-today-metrics span,
.ysp-today-metrics strong {
    display: block;
}

.ysp-today-metrics span {
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
}

.ysp-today-metrics strong {
    margin-top: 7px;
    color: #111827;
    font-size: 24px;
}

.ysp-today-metrics .attention {
    border-color: #f59e0b;
    background: #fffbeb;
}

.ysp-today-next,
.ysp-today-agenda {
    margin: 0 0 18px;
}

.ysp-today-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.ysp-today-section-title h3 {
    margin: 0;
    font-size: 17px;
}

.ysp-today-section-title button {
    border: 0;
    background: transparent;
    color: #2563eb;
    font-weight: 700;
}

.ysp-next-client,
.ysp-today-row {
    width: 100%;
    min-width: 0;
    display: grid;
    align-items: center;
    gap: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    text-align: left;
}

.ysp-next-client {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 18px;
    border-left: 4px solid #ec4899;
    border-radius: 8px;
}

.ysp-next-time {
    font-size: 18px;
    font-weight: 800;
}

.ysp-next-client span:nth-child(2),
.ysp-today-row span:nth-child(2) {
    min-width: 0;
}

.ysp-next-client strong,
.ysp-next-client em,
.ysp-today-row strong,
.ysp-today-row em {
    display: block;
    overflow-wrap: anywhere;
    font-style: normal;
}

.ysp-next-client em,
.ysp-today-row em {
    margin-top: 3px;
    color: #6b7280;
    font-size: 12px;
}

.ysp-next-client b {
    color: #6b7280;
    font-size: 12px;
}

.ysp-today-row {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    padding: 13px 14px;
    border-width: 0 0 1px;
}

.ysp-today-row:first-child {
    border-top: 1px solid #e5e7eb;
}

.ysp-today-open {
    padding: 22px;
    border: 1px dashed #cfd5df;
    border-radius: 8px;
    background: #f9fafb;
}

.ysp-today-open strong,
.ysp-today-open span {
    display: block;
}

.ysp-today-open span {
    margin-top: 5px;
    color: #6b7280;
}

.ysp-client-context-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ysp-client-context-grid > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.ysp-client-context-grid span,
.ysp-client-context-grid strong,
.ysp-client-context-grid em {
    display: block;
    overflow-wrap: anywhere;
}

.ysp-client-context-grid span,
.ysp-client-context-grid em {
    color: #6b7280;
    font-size: 12px;
    font-style: normal;
}

.ysp-client-context-grid strong {
    margin: 4px 0;
}

.ysp-client-context-grid .attention {
    border-color: #f59e0b;
    background: #fffbeb;
}

.ysp-more-actions {
    display: grid;
    gap: 8px;
}

.ysp-more-actions button {
    display: block;
    width: 100%;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    text-align: left;
}

.ysp-more-actions button span,
.ysp-more-actions button b {
    display: block;
}

.ysp-more-actions button b {
    margin-top: 3px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
}

.ysp-more-actions button.danger span {
    color: #b91c1c;
}

.ysp-timeoff-panel section {
    padding-bottom: 20px;
}

.ysp-timeoff-all {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    font-weight: 700;
}

.ysp-timeoff-submit {
    width: 100%;
    margin-top: 14px;
}

.ysp-timeoff-list {
    display: grid;
    gap: 8px;
}

.ysp-timeoff-request {
    position: relative;
    padding: 13px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.ysp-timeoff-request > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.ysp-timeoff-request p {
    margin: 8px 0;
    color: #4b5563;
}

.ysp-timeoff-status {
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.ysp-timeoff-request.approved {
    border-left: 4px solid #16a34a;
}

.ysp-timeoff-request.rejected {
    border-left: 4px solid #dc2626;
}

.ysp-timeoff-review {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.ysp-timeoff-review button {
    flex: 1;
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    font-weight: 700;
}

.ysp-timeoff-review button.danger {
    background: #fff;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

@media (max-width: 640px) {
    .ysp-staff-tab-all {
        display: none;
    }

    .ysp-today-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ysp-next-client {
        grid-template-columns: 1fr;
    }

    .ysp-next-client b {
        justify-self: start;
    }

    .ysp-client-context-grid {
        grid-template-columns: 1fr;
    }

    .ysp-bottom-nav-btn {
        padding-left: 2px !important;
        padding-right: 2px !important;
        font-size: 10px !important;
    }
}

.ysp-week-nav.active {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

/* Schedule list */
.ysp-schedule {
    flex: 1;
    padding: 12px 16px calc(24px + var(--safe-bottom));
    overflow-y: auto;
}

.ysp-date-heading {
    font-size: 13px;
    font-weight: 600;
    color: var(--sp-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
    margin-top: 4px;
}

.ysp-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--sp-muted);
}
.ysp-empty-icon { font-size: 40px; margin-bottom: 12px; }
.ysp-empty-text { font-size: 15px; }

/* Booking card */
.ysp-card {
    background: var(--sp-card);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: var(--sp-shadow);
    cursor: pointer;
    transition: box-shadow .15s;
    -webkit-tap-highlight-color: transparent;
}
.ysp-card:active { box-shadow: var(--sp-shadow-lg); }

.ysp-card-row1 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ysp-card-time {
    font-size: 20px;
    font-weight: 700;
    color: var(--sp-ink);
    line-height: 1;
}

.ysp-card-duration {
    font-size: 12px;
    color: var(--sp-muted);
    margin-top: 3px;
}

.ysp-status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: capitalize;
}
.ysp-status-badge.confirmed  { background: #dcfce7; color: #15803d; }
.ysp-status-badge.pending    { background: #fef9c3; color: #a16207; }
.ysp-status-badge.arrived    { background: #dbeafe; color: #1d4ed8; }
.ysp-status-badge.no_show    { background: #fee2e2; color: #b91c1c; }
.ysp-status-badge.cancelled  { background: #f3f4f6; color: #6b7280; }
.ysp-status-badge.completed  { background: #f0fdf4; color: #16a34a; }

.ysp-card-customer {
    font-size: 16px;
    font-weight: 600;
    color: var(--sp-ink);
    margin-bottom: 2px;
}

.ysp-card-service {
    font-size: 13px;
    color: var(--sp-muted);
    margin-bottom: 8px;
}

.ysp-card-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--sp-pink);
}

.ysp-card-notes {
    font-size: 13px;
    color: var(--sp-ink2);
    background: #fef3c7;
    border-radius: 6px;
    padding: 6px 10px;
    margin-top: 8px;
    border-left: 3px solid #fbbf24;
}

    /* Detail sheet */
.ysp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 200;
    align-items: flex-end;
}
.ysp-overlay.open { display: flex; }

.ysp-sheet {
    background: var(--sp-card);
    border-radius: 20px 20px 0 0;
    width: 100%;
    left: 0;
    right: 0;
    max-height: 90dvh;
    overflow-y: auto;
    padding: 0 0 calc(24px + var(--safe-bottom));
    animation: slideUp .25s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.ysp-sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--sp-border);
    border-radius: 999px;
    margin: 12px auto 20px;
}

.ysp-sheet-body { padding: 0 20px; }

.ysp-sheet-time {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ysp-sheet-customer {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.ysp-sheet-service {
    font-size: 14px;
    color: var(--sp-muted);
    margin-bottom: 16px;
}

.ysp-sheet-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--sp-ink2);
    padding: 10px 0;
    border-bottom: 1px solid var(--sp-border);
}
.ysp-sheet-info-row:last-of-type { border-bottom: none; }
.ysp-sheet-info-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }

.ysp-sheet-notes-box {
    background: #fef9c3;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--sp-ink2);
    margin: 16px 0;
    border-left: 3px solid #fbbf24;
}

.ysp-sheet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.ysp-action-btn {
    height: 48px;
    border-radius: var(--sp-radius-sm);
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
}
.ysp-action-btn:active { opacity: .8; transform: scale(.97); }

.ysp-action-btn.arrived  { background: #dbeafe; color: #1d4ed8; }
.ysp-action-btn.no-show  { background: #fee2e2; color: #b91c1c; }
.ysp-action-btn.complete { background: #dcfce7; color: #15803d; grid-column: 1 / -1; }
.ysp-action-btn.call     { background: var(--sp-bg); color: var(--sp-ink2); border: 1.5px solid var(--sp-border); }
.ysp-action-btn.cancel   { background: var(--sp-bg); color: var(--sp-muted); }

/* Loading spinner */
.ysp-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--sp-border);
    border-top-color: var(--sp-pink);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ysp-loading-wrap {
    display: flex;
    justify-content: center;
    padding: 40px;
}

    /* Toast */
.ysp-toast {
    position: fixed;
    bottom: calc(24px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--sp-ink);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 999px;
    opacity: 0;
    transition: opacity .2s, transform .2s;
    z-index: 300;
    white-space: nowrap;
}
.ysp-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Install app banner (Add to Home Screen) */
.ysp-install-banner {
    display: none;
    align-items: center;
    gap: 10px;
    position: fixed;
    top: var(--safe-top, 0);
    left: 0;
    right: 0;
    z-index: 500;
    padding: 10px 14px;
    background: var(--sp-ink);
    color: #fff;
    font-size: 13px;
    line-height: 1.3;
}
.ysp-install-banner.show { display: flex; }
.ysp-install-banner-icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
.ysp-install-banner span { flex: 1; min-width: 0; }
.ysp-install-banner button[data-install-now] {
    flex-shrink: 0;
    background: var(--sp-pink);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.ysp-install-dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255,255,255,.7);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
}

/* iOS manual "Add to Home Screen" instructions (shown when there is no
   beforeinstallprompt event to trigger automatically, e.g. Safari) */
.ysp-install-steps {
    padding: 4px 20px 20px;
    color: var(--sp-ink2);
    font-size: 14px;
    line-height: 1.5;
}
.ysp-install-steps ol {
    margin: 10px 0 0;
    padding-left: 20px;
}
.ysp-install-steps li { margin-bottom: 8px; }

/* Refresh button */
.ysp-refresh-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--sp-muted);
    padding: 6px;
    border-radius: 6px;
    -webkit-tap-highlight-color: transparent;
}
.ysp-refresh-btn:active { background: var(--sp-bg); }

/* Staff calendar timeline */
.ysp-calendar-shell {
    margin: 0 -16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #0b0f17;
    color: #fff;
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.ysp-calendar-head,
.ysp-calendar-grid {
    display: grid;
    min-width: 360px;
}

.ysp-calendar-head {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #0b0f17;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.ysp-time-head,
.ysp-staff-head {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,.88);
}

.ysp-time-rail,
.ysp-staff-col {
    position: relative;
    min-height: 100%;
}

.ysp-time-rail {
    border-right: 1px solid rgba(255,255,255,.1);
}

.ysp-hour-label {
    position: absolute;
    right: 8px;
    transform: translateY(-50%);
    color: rgba(255,255,255,.78);
    font-size: 12px;
    white-space: nowrap;
}

.ysp-staff-col {
    border-right: 1px solid rgba(255,255,255,.08);
    min-width: 150px;
}

.ysp-time-slot {
    position: absolute;
    left: 0;
    width: 100%;
    border: 0;
    border-top: 1px solid rgba(255,255,255,.14);
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ysp-time-slot:active {
    background: rgba(255,255,255,.08);
}

.ysp-timeline-booking {
    position: absolute;
    left: 6px;
    right: 6px;
    border: 1px solid rgba(255,255,255,.88);
    border-radius: 7px;
    padding: 6px 8px;
    color: #fff;
    text-align: left;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(0,0,0,.24);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ysp-timeline-booking strong,
.ysp-timeline-booking span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ysp-timeline-booking strong {
    font-size: 13px;
    line-height: 1.15;
}

.ysp-timeline-booking span {
    font-size: 12px;
    line-height: 1.2;
    opacity: .95;
}

.ysp-timeline-color-0 { background: #84cc16; }
.ysp-timeline-color-1 { background: #f59e0b; }
.ysp-timeline-color-2 { background: #06b6d4; }
.ysp-timeline-color-3 { background: #ec4899; }
.ysp-timeline-color-4 { background: #8b5cf6; }

#ysp-editor-sheet .ysp-sheet-body {
    padding-bottom: calc(24px + var(--safe-bottom));
}

#ysp-editor-body .ysp-sheet-time {
    font-size: 26px;
    margin-bottom: 16px;
}

#ysp-add-booking-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sp-ink);
    color: #fff;
    font-size: 24px;
    line-height: 1;
}

/* Native-app polish layer */
body.yatoon-staff-portal-page {
    background:
        radial-gradient(circle at 50% -120px, rgba(244,114,182,.28), transparent 360px),
        linear-gradient(180deg, #fff7fb 0%, #f8fafc 44%, #eef2f7 100%);
    overscroll-behavior-y: none;
}

#ysp-app {
    max-width: 560px;
    background: rgba(255,255,255,.62);
    box-shadow: 0 0 0 1px rgba(255,255,255,.46);
}

#ysp-login-screen {
    background:
        radial-gradient(circle at 50% 12%, rgba(244,114,182,.18), transparent 240px),
        linear-gradient(180deg, #fff 0%, #fff7fb 100%);
}

.ysp-login-logo {
    border-radius: 20px;
}

.ysp-login-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 28px;
}

.ysp-login-sub {
    color: #7b8190;
}

.ysp-pin-dot {
    width: 13px;
    height: 13px;
}

.ysp-numpad {
    gap: 12px;
}

.ysp-numpad-btn {
    height: 68px;
    border-radius: 22px;
    background: rgba(255,255,255,.92);
    border-color: rgba(229,231,235,.92);
    box-shadow: 0 10px 30px rgba(15,23,42,.06);
}

.ysp-numpad-btn:active {
    background: #fdf2f8;
    transform: scale(.96);
}

.ysp-topbar {
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-bottom: 1px solid rgba(229,231,235,.72);
    padding: calc(14px + var(--safe-top)) 16px 12px;
}

.ysp-topbar-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    line-height: 1.1;
}

.ysp-topbar-sub {
    font-size: 12px;
    color: #7b8190;
}

.ysp-topbar-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.ysp-topbar-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ysp-last-sync {
    color: #6b7280; /* 4.6.2: contrast - was #9ca3af (2.54:1 on white), under the 4.5:1 WCAG AA floor. #6b7280 = 4.83:1. */
    font-size: 10px;
}

.ysp-refresh-btn,
.ysp-topbar-logout {
    min-height: 34px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(229,231,235,.9);
    box-shadow: 0 6px 16px rgba(15,23,42,.05);
    color: #4b5563;
    font-size: 12px;
    font-weight: 800;
    padding: 0 12px;
}

#ysp-add-booking-btn {
    background: var(--sp-pink);
    box-shadow: 0 10px 20px rgba(236,72,153,.28);
    border-color: rgba(236,72,153,.2);
    font-size: 23px;
    padding: 0;
}

.ysp-day-tabs {
    background: rgba(255,255,255,.74);
    padding: 12px 14px;
    gap: 8px;
}

.ysp-day-tab {
    min-width: 58px;
    padding: 8px 12px;
    border-radius: 18px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(229,231,235,.92);
    box-shadow: 0 8px 20px rgba(15,23,42,.04);
}

.ysp-day-tab.active {
    background: #111827;
    border-color: #111827;
    box-shadow: 0 12px 22px rgba(17,24,39,.2);
}

.ysp-day-tab-day {
    letter-spacing: 0;
    color: inherit;
}

.ysp-day-tab-num {
    font-size: 19px;
}

.ysp-schedule {
    padding: 12px 16px calc(94px + var(--safe-bottom));
}

.ysp-date-heading {
    color: #111827;
    font-size: 18px;
    letter-spacing: 0;
    text-transform: none;
    margin: 4px 0 12px;
}

.ysp-insight-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
}

.ysp-insight-card {
    min-width: 0;
    border: 1px solid rgba(236,72,153,.18);
    border-radius: 18px;
    background: rgba(255,255,255,.88);
    padding: 10px 11px;
    box-shadow: 0 10px 22px rgba(15,23,42,.05);
}

.ysp-insight-card span,
.ysp-insight-card strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ysp-insight-card span {
    color: #7b8190;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.ysp-insight-card strong {
    margin-top: 4px;
    color: #111827;
    font-size: 17px;
    line-height: 1.1;
}

.ysp-calendar-shell {
    margin: 0 -6px;
    background: linear-gradient(180deg, #fff7fb 0%, #ffffff 100%);
    border-radius: 24px;
    border: 1px solid rgba(236,72,153,.22);
    box-shadow: 0 18px 45px rgba(236,72,153,.10);
    overflow: auto;
    color: #111827;
}

.ysp-calendar-head {
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid rgba(236,72,153,.14);
}

.ysp-time-head,
.ysp-staff-head {
    min-height: 50px;
}

.ysp-staff-head {
    color: #111827;
    font-size: 14px;
}

.ysp-hour-label {
    color: #8a93a3;
    font-size: 11px;
}

.ysp-time-slot {
    border-top-color: rgba(148,163,184,.18);
}

.ysp-time-slot:hover {
    background: rgba(236,72,153,.05);
}

.ysp-timeline-booking {
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.92);
    box-shadow: 0 12px 25px rgba(236,72,153,.20);
}

.ysp-timeline-booking strong {
    font-size: 14px;
}

.ysp-timeline-color-0 { background: linear-gradient(135deg, #ec4899, #db2777); }
.ysp-timeline-color-1 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.ysp-timeline-color-2 { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.ysp-timeline-color-3 { background: linear-gradient(135deg, #22c55e, #16a34a); }
.ysp-timeline-color-4 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.ysp-card {
    border-radius: 22px;
    border-color: rgba(244,114,182,.34);
    box-shadow: 0 14px 35px rgba(15,23,42,.08);
}

.ysp-sheet {
    max-width: none;
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -20px 55px rgba(15,23,42,.22);
}

.ysp-sheet-handle {
    width: 44px;
    height: 5px;
    background: #d1d5db;
}

.ysp-sheet-body {
    padding: 0 22px;
}

.ysp-sheet-time {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 30px;
}

.ysp-sheet-customer {
    font-size: 20px;
}

.ysp-sheet-info-row {
    min-height: 46px;
}

.ysp-sheet-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ysp-action-btn {
    height: 52px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 800;
}

.ysp-action-btn.complete {
    background: var(--sp-pink);
    color: #fff;
    box-shadow: 0 12px 26px rgba(236,72,153,.25);
}

.ysp-action-btn.call {
    background: #fff;
}

.ysp-action-btn.no-show {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

#ysp-editor-body .ysp-sheet-time {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 30px;
}

.ysp-editor-label {
    display: block;
    margin: 12px 0 5px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.ysp-editor-input,
.ysp-editor-select,
.ysp-editor-textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dbe1ea;
    border-radius: 16px;
    background: #f9fafb;
    color: #111827;
    font-size: 16px;
    padding: 0 14px;
    box-sizing: border-box;
    outline: none;
}

.ysp-editor-textarea {
    min-height: 92px;
    padding: 12px 14px;
    resize: vertical;
}

.ysp-editor-input:focus,
.ysp-editor-select:focus,
.ysp-editor-textarea:focus {
    border-color: var(--sp-pink);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(236,72,153,.1);
}

.ysp-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ysp-client-results {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.ysp-client-pick {
    text-align: left;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: 0 8px 18px rgba(15,23,42,.05);
}

.ysp-message-template-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 12px 0 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.ysp-message-template-row::-webkit-scrollbar {
    display: none;
}

.ysp-message-template-row button {
    flex: 0 0 auto;
    min-height: 34px;
    border: 1px solid rgba(236,72,153,.24);
    border-radius: 999px;
    background: #fff;
    color: #be185d;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 800;
}

.ysp-client-pick strong {
    display: block;
    color: #111827;
    font-size: 14px;
}

.ysp-client-pick span {
    color: #6b7280;
    font-size: 12px;
}

.ysp-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 120;
    width: min(560px, 100%);
    display: flex;
    gap: 6px;
    padding: 8px 12px calc(8px + var(--safe-bottom));
    background: rgba(255,255,255,.9);
    border-top: 1px solid rgba(229,231,235,.9);
    box-shadow: 0 -14px 32px rgba(15,23,42,.12);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.ysp-bottom-nav-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 58px;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 800;
    -webkit-tap-highlight-color: transparent;
}

.ysp-bottom-nav-btn.active,
.ysp-bottom-nav-btn:active {
    background: #111827;
    color: #fff;
}

.ysp-bottom-nav-icon {
    font-size: 12px;
    line-height: 1;
}

.ysp-bottom-nav-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Square-inspired Staff Portal refresh */
body.yatoon-staff-portal-page {
    background: #fff;
}

#ysp-app {
    max-width: none;
    background: #fff;
    box-shadow: none;
}

.ysp-topbar,
.ysp-day-tabs {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.ysp-topbar-name,
.ysp-date-heading,
.ysp-sheet-time {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ysp-day-tab,
.ysp-week-nav,
.ysp-insight-card,
.ysp-client-card {
    border-radius: 8px;
    box-shadow: none;
}

.ysp-day-tab.active,
.ysp-week-nav.active,
.ysp-small-primary,
#ysp-add-booking-btn {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
    box-shadow: none;
}

.ysp-schedule {
    padding: 10px 8px calc(86px + var(--safe-bottom));
}

.ysp-insight-strip {
    display: none;
}

.ysp-calendar-shell {
    margin: 0 -8px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-color: #e5e7eb;
    box-shadow: none;
    background: #fff;
}

.ysp-calendar-head {
    background: #fff;
    border-bottom-color: #e5e7eb;
}

.ysp-staff-head {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
}

.ysp-time-rail,
.ysp-staff-col {
    background: #fff;
    border-color: #e5e7eb;
}

.ysp-time-slot {
    border-top-color: #e5e7eb;
}

.ysp-timeline-booking {
    border: 0;
    border-radius: 5px;
    box-shadow: none;
    padding: 5px 7px;
}

.ysp-timeline-booking strong {
    font-size: 13px;
}

.ysp-timeline-color-0 { background: #84cc16; }
.ysp-timeline-color-1 { background: #e58b16; }
.ysp-timeline-color-2 { background: #0891b2; }
.ysp-timeline-color-3 { background: #16a34a; }
.ysp-timeline-color-4 { background: #7c3aed; }

.ysp-bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: none;
    gap: 0;
    padding: 6px 6px calc(6px + var(--safe-bottom));
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.ysp-bottom-nav-btn {
    min-height: 62px;
    border-radius: 8px;
    color: #111827;
    font-size: 11px;
}

.ysp-bottom-nav-btn.active,
.ysp-bottom-nav-btn:active {
    background: #f3f4f6;
    color: #0a0a0a;
}

.ysp-bottom-nav-btn.active .ysp-bottom-nav-icon {
    background: #0a0a0a;
    color: #fff;
}

.ysp-bottom-nav-icon {
    min-width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.ysp-overlay {
    align-items: stretch;
    background: rgba(0,0,0,.18);
}

#ysp-detail-overlay .ysp-sheet {
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: none;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    padding-top: calc(22px + var(--safe-top));
}

#ysp-detail-overlay .ysp-sheet-handle {
    display: none;
}

.ysp-sheet-close {
    position: sticky;
    top: calc(12px + var(--safe-top));
    z-index: 3;
    margin: 0 0 10px 18px;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: #0a0a0a;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

#ysp-detail-overlay .ysp-sheet-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 22px calc(28px + var(--safe-bottom));
}

#ysp-detail-overlay .ysp-sheet-time {
    font-size: clamp(32px, 7vw, 56px);
    font-weight: 800;
    letter-spacing: 0;
}

#ysp-detail-overlay .ysp-sheet-customer {
    font-size: 28px;
    font-weight: 800;
    margin-top: 22px;
}

#ysp-detail-overlay .ysp-action-btn.complete,
.ysp-checkout-primary {
    background: #0a0a0a;
    color: #fff;
    box-shadow: none;
}

#ysp-detail-overlay .ysp-sheet-facts div,
.ysp-client-facts div {
    border-radius: 8px;
}

/* v3.3.6 staff detail and calendar settings */
body.ysp-overlay-lock {
    overflow: hidden !important;
}

.ysp-overlay {
    z-index: 2147483000 !important;
}

#ysp-detail-overlay.open,
#ysp-editor-overlay.open {
    display: flex !important;
}

#ysp-detail-overlay .ysp-sheet {
    padding-top: 0 !important;
    background: #fff !important;
    position: relative;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
}

#ysp-detail-overlay > .ysp-sheet > .ysp-sheet-close,
#ysp-detail-overlay > .ysp-sheet > .ysp-sheet-handle {
    display: none !important;
}

#ysp-detail-overlay .ysp-sheet-body {
    max-width: none !important;
    min-height: 100dvh;
    padding: 0 18px calc(34px + var(--safe-bottom)) !important;
}

.ysp-detail-top,
.ysp-settings-head {
    position: sticky;
    top: 0;
    z-index: 5;
    min-height: calc(88px + var(--safe-top));
    margin: 0 -18px 22px;
    padding: calc(16px + var(--safe-top)) 18px 14px;
    background: #fff;
    border-bottom: 1px solid #ededed;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ysp-detail-close,
.ysp-settings-close {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: #f1f1f1;
    color: #111;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ysp-detail-edit,
.ysp-settings-done {
    min-width: 96px;
    height: 58px;
    border: 0;
    border-radius: 999px;
    background: #0b0b0b;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.ysp-detail-status {
    margin-top: 10px;
    color: #111;
    font-size: 28px;
    font-weight: 850;
}

.ysp-detail-due {
    margin: 10px 0 22px;
    color: #8b5a20;
    font-size: 18px;
}

.ysp-square-primary,
.ysp-square-secondary,
.ysp-square-row-action {
    width: 100%;
    min-height: 58px;
    border: 0;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ysp-square-primary {
    background: #0b0b0b;
    color: #fff;
}

.ysp-detail-checkout {
    margin-bottom: 34px;
}

.ysp-square-section {
    padding: 0 0 28px;
    margin: 0 0 28px;
    border-bottom: 1px solid #ececec;
}

.ysp-square-section h3 {
    margin: 0 0 18px;
    color: #0b0b0b;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 850;
    letter-spacing: 0;
}

.ysp-square-section p {
    margin: 0;
    color: #111;
    font-size: 18px;
    line-height: 1.55;
}

.ysp-square-section p span,
.ysp-square-line em,
.ysp-square-customer em {
    color: #6f6f6f;
    font-style: normal;
}

.ysp-square-customer,
.ysp-square-line,
.ysp-square-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ysp-square-customer {
    width: 100%;
    border: 0;
    padding: 0 0 18px;
    background: transparent;
    text-align: left;
    color: #111;
}

.ysp-square-customer span,
.ysp-square-line span {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.ysp-square-customer strong,
.ysp-square-line strong,
.ysp-square-total strong {
    color: #111;
    font-size: 20px;
    line-height: 1.25;
}

.ysp-square-customer b {
    color: #6b7280; /* 4.6.2: contrast - was #9ca3af. At 44px/300 this is WCAG "large text" (3:1 floor),
       and 2.54:1 missed even that. */
    font-size: 44px;
    font-weight: 300;
}

.ysp-square-line {
    padding: 0 0 22px;
}

.ysp-square-total {
    padding-top: 22px;
    border-top: 1px solid #ececec;
}

.ysp-square-note {
    border: 1px solid #d8d8d8;
    border-radius: 10px;
    padding: 18px;
    color: #111;
    font-size: 18px;
    line-height: 1.5;
}

.ysp-detail-actions {
    display: grid;
    gap: 12px;
}

.ysp-square-row-action {
    border-radius: 12px;
    background: #f3f3f3;
    color: #111;
    padding: 12px 18px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ysp-square-row-action span {
    color: #737373;
    font-size: 13px;
    font-weight: 700;
}

.ysp-square-row-action strong {
    font-size: 17px;
}

.ysp-square-row-action.danger,
.ysp-square-secondary.danger {
    color: #c41230;
}

.ysp-square-bottom-actions {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.ysp-square-secondary {
    background: #f1f1f1;
    color: #111;
}

.ysp-settings-panel section {
    margin: 0 -18px;
    padding: 20px 18px 4px;
    border-bottom: 1px solid #e5e5e5;
}

.ysp-settings-head strong {
    font-size: 22px;
    font-weight: 850;
}

.ysp-settings-panel h3 {
    margin: 0 0 8px;
    color: #4b5563;
    font-size: 15px;
    font-weight: 850;
    text-transform: uppercase;
}

.ysp-settings-row {
    min-height: 62px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #374151;
    font-size: 20px;
    font-weight: 800;
}

.ysp-settings-row input {
    width: 28px;
    height: 28px;
    accent-color: #111;
}

.ysp-settings-row.employee span {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.ysp-settings-row.employee i {
    width: 5px;
    height: 34px;
    display: inline-block;
}

.ysp-week-group {
    margin-bottom: 24px;
}

#ysp-detail-overlay.ysp-settings-overlay {
    inset: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    background: rgba(0,0,0,.28) !important;
}

#ysp-detail-overlay.ysp-settings-overlay .ysp-sheet {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: none !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    overflow: hidden !important;
}

#ysp-detail-overlay.ysp-settings-overlay .ysp-sheet-body {
    width: 100% !important;
    max-width: none !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 18px calc(98px + var(--safe-bottom)) !important;
    overflow-y: auto !important;
    box-sizing: border-box;
}

#ysp-detail-overlay.ysp-settings-overlay .ysp-settings-head {
    margin: 0 -18px 18px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
}

#ysp-detail-overlay.ysp-settings-overlay .ysp-settings-done {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(76px + var(--safe-bottom));
    border-radius: 0;
    padding-bottom: var(--safe-bottom);
    z-index: 6;
}

@media (min-width: 760px) {
    #ysp-detail-overlay:not(.ysp-settings-overlay):not(.ysp-checkout-overlay) .ysp-sheet-body {
        max-width: 760px !important;
        margin: 0 auto;
    }

    #ysp-detail-overlay:not(.ysp-settings-overlay):not(.ysp-checkout-overlay) .ysp-detail-top {
        margin-left: calc((760px - 100vw) / 2);
        margin-right: calc((760px - 100vw) / 2);
        padding-left: max(18px, calc((100vw - 760px) / 2 + 18px));
        padding-right: max(18px, calc((100vw - 760px) / 2 + 18px));
    }
}

/* v3.5.0 calendar hierarchy and compact staff workflow. Keep these overrides last. */
.ysp-calendar-toolbar {
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}

.ysp-view-switch {
    display: inline-grid;
    grid-template-columns: repeat(4, minmax(64px, 1fr));
    gap: 3px;
    padding: 3px;
    border: 1px solid #dfe3e8;
    border-radius: 7px;
    background: #f4f5f7;
}

.ysp-view-switch button,
.ysp-calendar-options {
    min-height: 34px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #5c6675;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
}

.ysp-view-switch button.active {
    background: #fff;
    color: #121826;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .14);
}

.ysp-calendar-options {
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 0;
    border: 1px solid #dfe3e8;
    background: #fff;
    font-size: 18px;
    line-height: 1;
    align-self: center;
}

.ysp-calendar-options:hover {
    border-color: #aab2bf;
    color: #121826;
}

.ysp-design-reference a,
.ysp-design-reference button {
    display: grid;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: zoom-in;
}

.ysp-design-reference-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 18px;
}

.ysp-design-reference-item {
    min-width: 0;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.ysp-design-reference-label {
    display: grid;
    gap: 3px;
    margin-bottom: 10px;
    min-width: 0;
}

.ysp-design-reference-label strong {
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ysp-design-reference-label span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.ysp-design-reference img {
    display: block;
    width: 100%;
    max-height: 340px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    object-fit: contain;
    background: #f8fafc;
}

.ysp-design-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.82);
}

.ysp-design-lightbox-panel {
    position: relative;
    display: grid;
    gap: 12px;
    width: min(920px, 100%);
    max-height: 92vh;
}

.ysp-design-lightbox-panel img {
    display: block;
    width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 10px;
    background: #0f172a;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.ysp-design-lightbox-panel a {
    justify-self: center;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.ysp-design-lightbox-close {
    position: absolute;
    top: -12px;
    right: -8px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

@media (max-width: 720px) {
    .ysp-calendar-toolbar {
        align-items: flex-start;
        padding: 8px 10px;
    }

    .ysp-view-switch {
        width: min(100%, 320px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ysp-view-switch button {
        min-width: 0;
        padding: 0 6px;
        min-height: 30px;
        font-size: 12px;
    }

    .ysp-calendar-options {
        flex-basis: 40px;
        color: #374151;
    }

    .ysp-day-tabs {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }

    .ysp-day-tab {
        min-width: 48px !important;
    }

    .ysp-card {
        margin: 0 12px 10px !important;
        padding: 14px !important;
        border: 1px solid #e4e7ec !important;
        border-radius: 7px !important;
        box-shadow: none !important;
    }

    .ysp-card-customer {
        font-size: 16px !important;
        line-height: 1.25 !important;
    }

    .ysp-card-time {
        font-size: 15px !important;
    }

    .ysp-calendar-shell {
        max-height: 68vh !important;
        overflow: auto !important;
    }
}

/* v3.3.12 final override anchor. */
body.yatoon-staff-portal-page,
#ysp-app,
.ysp-topbar,
.ysp-day-tabs {
    background: #fff !important;
    box-shadow: none !important;
}

.ysp-calendar-shell {
    background: #fff !important;
    border-color: #e5e7eb !important;
    box-shadow: none !important;
}

.ysp-timeline-booking {
    border: 0 !important;
    border-radius: 7px !important;
    padding: 4px 6px !important;
    box-shadow: 0 2px 8px rgba(15,23,42,.10) !important;
}

.ysp-timeline-time {
    margin-bottom: 2px !important;
    padding: 1px 5px !important;
    font-size: 9.5px !important;
    line-height: 1.15 !important;
}

.ysp-timeline-booking strong {
    font-size: 11px !important;
    line-height: 1.06 !important;
    letter-spacing: 0 !important;
}

.ysp-timeline-booking span:not(.ysp-timeline-time):not(.ysp-timeline-meta) {
    font-size: 9.5px !important;
    line-height: 1.05 !important;
}

.ysp-timeline-booking.is-compact span:not(.ysp-timeline-time):not(.ysp-timeline-meta),
.ysp-timeline-booking.is-short span:not(.ysp-timeline-time):not(.ysp-timeline-meta),
.ysp-timeline-meta {
    display: none !important;
}

.ysp-bottom-nav {
    background: rgba(255,255,255,.98) !important;
    border-top: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    box-shadow: 0 -5px 16px rgba(15,23,42,.08) !important;
}

.ysp-bottom-nav-btn.active {
    background: #0b0d12 !important;
    color: #fff !important;
}

#ysp-bottom-add-btn {
    display: none !important;
}

#ysp-detail-overlay:not(.ysp-settings-overlay) {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    align-items: stretch !important;
    justify-content: center !important;
    padding: 0 !important;
    background: #fff !important;
}

#ysp-detail-overlay:not(.ysp-settings-overlay) .ysp-sheet {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    transform: none !important;
}

#ysp-detail-overlay:not(.ysp-settings-overlay) .ysp-sheet-body {
    width: min(760px, 100%) !important;
    height: 100dvh !important;
    margin: 0 auto !important;
    padding: 0 22px calc(34px + var(--safe-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

#ysp-detail-overlay:not(.ysp-settings-overlay) .ysp-sheet-close,
#ysp-detail-overlay:not(.ysp-settings-overlay) .ysp-sheet-handle {
    display: none !important;
}

.ysp-detail-top,
.ysp-checkout-top {
    position: sticky !important;
    top: 0 !important;
    z-index: 4 !important;
    margin: 0 -22px 22px !important;
    padding: max(18px, env(safe-area-inset-top, 0px)) 22px 14px !important;
    min-height: 82px !important;
    background: rgba(255,255,255,.98) !important;
    border-bottom: 1px solid #eceff3 !important;
}

.ysp-square-primary,
.ysp-action-btn.complete,
.ysp-action-btn.ysp-checkout-primary {
    background: #0a0a0a !important;
    color: #fff !important;
    border-radius: 999px !important;
    box-shadow: none !important;
}

.ysp-client-facts div {
    min-width: 0 !important;
}

.ysp-client-facts strong {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

#ysp-detail-overlay .ysp-client-detail-top {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

#ysp-detail-overlay .ysp-client-detail-top .ysp-detail-close {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 58px !important;
    width: 58px !important;
    height: 58px !important;
    font-size: 42px !important;
    line-height: 1 !important;
    pointer-events: auto !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

#ysp-detail-overlay.ysp-settings-overlay .ysp-sheet {
    width: min(420px, 100vw) !important;
    max-width: 420px !important;
    border-radius: 0 !important;
}

@media (max-width: 899px) {
    .ysp-calendar-head,
    .ysp-calendar-grid {
        min-width: 100% !important;
    }

    .ysp-calendar-head {
        grid-template-columns: 42px repeat(var(--ysp-staff-count, 2), minmax(146px, 1fr)) !important;
    }

    .ysp-timeline-booking {
        min-height: 32px !important;
    }
}

/* v3.3.7 checkout full-screen hard override. */
#ysp-detail-overlay.ysp-checkout-overlay,
#ysp-detail-overlay.ysp-checkout-overlay.open {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    transform: none !important;
    background: rgba(15,23,42,.34) !important;
}

#ysp-detail-overlay.ysp-checkout-overlay #ysp-detail-sheet,
#ysp-detail-overlay.ysp-checkout-overlay .ysp-sheet {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    min-width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    overflow: hidden !important;
    animation: none !important;
}

#ysp-detail-overlay.ysp-checkout-overlay #ysp-sheet-body,
#ysp-detail-overlay.ysp-checkout-overlay .ysp-sheet-body {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 18px calc(30px + var(--safe-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

#ysp-detail-overlay.ysp-checkout-overlay .ysp-checkout-hero,
#ysp-detail-overlay.ysp-checkout-overlay .ysp-checkout-help,
#ysp-detail-overlay.ysp-checkout-overlay .ysp-checkout-groups {
    max-width: 100% !important;
}

@media (min-width: 760px) {
    #ysp-detail-overlay.ysp-checkout-overlay #ysp-sheet-body,
    #ysp-detail-overlay.ysp-checkout-overlay .ysp-sheet-body {
        max-width: 760px !important;
        margin: 0 auto !important;
        padding-left: 28px !important;
        padding-right: 28px !important;
    }
}

/* v3.3.8 absolute final detail-sheet full-screen lock. */
#ysp-detail-overlay.open {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    transform: none !important;
}

#ysp-detail-overlay.open #ysp-detail-sheet,
#ysp-detail-overlay.open > .ysp-sheet {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    overflow: hidden !important;
    animation: none !important;
}

#ysp-detail-overlay.open #ysp-sheet-body,
#ysp-detail-overlay.open .ysp-sheet-body {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 18px calc(34px + var(--safe-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

@media (min-width: 760px) {
    #ysp-detail-overlay.open #ysp-sheet-body,
    #ysp-detail-overlay.open .ysp-sheet-body {
        max-width: 760px !important;
        margin: 0 auto !important;
        padding-left: 28px !important;
        padding-right: 28px !important;
    }
}

/* v3.3.8 final detail-sheet full-screen lock. Keep this at the very end. */
#ysp-detail-overlay.open {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    transform: none !important;
}

#ysp-detail-overlay.open #ysp-detail-sheet,
#ysp-detail-overlay.open > .ysp-sheet {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    overflow: hidden !important;
    animation: none !important;
}

#ysp-detail-overlay.open #ysp-sheet-body,
#ysp-detail-overlay.open .ysp-sheet-body {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 18px calc(34px + var(--safe-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

@media (min-width: 760px) {
    #ysp-detail-overlay.open #ysp-sheet-body,
    #ysp-detail-overlay.open .ysp-sheet-body {
        max-width: 760px !important;
        margin: 0 auto !important;
        padding-left: 28px !important;
        padding-right: 28px !important;
    }
}

/* Brand-light calendar and customer workbench */
.ysp-calendar-shell {
    background: #fff;
    color: #111827;
    border-color: rgba(244,114,182,.22);
    box-shadow: 0 16px 42px rgba(236,72,153,.09), 0 12px 36px rgba(15,23,42,.08);
}

.ysp-calendar-head {
    background: rgba(255,247,251,.96);
    border-bottom-color: rgba(244,114,182,.18);
}

.ysp-time-head,
.ysp-staff-head {
    color: #111827;
}

.ysp-time-rail {
    border-right-color: rgba(148,163,184,.2);
    background: #fff;
}

.ysp-hour-label {
    color: #7b8190;
}

.ysp-staff-col {
    border-right-color: rgba(148,163,184,.14);
    background: linear-gradient(180deg, #fff 0%, #fffafd 100%);
}

.ysp-time-slot {
    border-top-color: rgba(148,163,184,.22);
}

.ysp-time-slot:hover,
.ysp-time-slot:active {
    background: rgba(236,72,153,.06);
}

.ysp-timeline-booking {
    border: 1px solid rgba(255,255,255,.96);
    box-shadow: 0 12px 24px rgba(236,72,153,.16), 0 8px 20px rgba(15,23,42,.12);
}

.ysp-timeline-color-0 { background: linear-gradient(135deg, #ec4899, #db2777); }
.ysp-timeline-color-1 { background: linear-gradient(135deg, #f472b6, #ec4899); }
.ysp-timeline-color-2 { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.ysp-timeline-color-3 { background: linear-gradient(135deg, #22c55e, #16a34a); }
.ysp-timeline-color-4 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.ysp-app-view-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.ysp-view-sub {
    color: #7b8190;
    font-size: 13px;
    line-height: 1.35;
    margin: -6px 0 0;
}

.ysp-small-primary {
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    background: var(--sp-pink);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    padding: 0 16px;
    box-shadow: 0 10px 22px rgba(236,72,153,.22);
}

.ysp-search-input {
    margin-bottom: 12px;
    background: #fff;
}

.ysp-client-list {
    display: grid;
    gap: 10px;
}

.ysp-client-card {
    width: 100%;
    border: 1px solid rgba(229,231,235,.94);
    border-radius: 20px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 12px 28px rgba(15,23,42,.06);
    padding: 12px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    text-align: left;
    color: #111827;
}

.ysp-client-card:active {
    transform: scale(.99);
    background: #fff7fb;
}

.ysp-client-avatar {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fce7f3;
    color: #be185d;
    font-size: 18px;
    font-weight: 900;
}

.ysp-client-main {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.ysp-client-main strong,
.ysp-client-main span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ysp-client-main strong {
    font-size: 15px;
}

.ysp-client-main span,
.ysp-client-meta {
    color: #6b7280;
    font-size: 12px;
}

.ysp-client-meta {
    font-weight: 800;
}

.ysp-client-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.ysp-client-facts div,
.ysp-client-fact-btn {
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #f9fafb;
    padding: 12px;
}

.ysp-client-fact-btn {
    appearance: none;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.ysp-client-fact-btn:hover {
    border-color: #111827;
    background: #fff;
}

.ysp-client-facts span,
.ysp-client-fact-btn span {
    display: block;
    color: #7b8190;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ysp-client-facts strong,
.ysp-client-fact-btn strong {
    display: block;
    overflow-wrap: anywhere;
    color: #111827;
    font-size: 14px;
}

.ysp-muted {
    color: #8a8f9d;
    font-size: 13px;
}

.ysp-client-history-list {
    display: grid;
    gap: 10px;
}

.ysp-client-history-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

.ysp-client-history-row span {
    min-width: 0;
}

.ysp-client-history-row strong,
.ysp-client-history-row em {
    display: block;
}

.ysp-client-history-row em {
    color: #6b7280;
    font-size: 12px;
    font-style: normal;
    margin-top: 3px;
}

.ysp-booked-meta {
    color: #6b7280;
    font-size: 12px;
    margin-top: 10px;
}

.ysp-booked-meta span {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ysp-booked-meta em {
    font-style: normal;
}

.ysp-sheet-muted {
    grid-column: 1 / -1;
    color: #6b7280; /* 4.6.2: contrast - was #9ca3af (2.54:1 on white), under the 4.5:1 WCAG AA floor. #6b7280 = 4.83:1. */
    font-size: 12px;
    line-height: 1.4;
    margin: 8px 0 0;
    text-align: center;
}

.ysp-status-row {
    margin-bottom: 8px;
}

.ysp-sheet-link {
    color: inherit;
    text-decoration: none;
}

.ysp-checkout-total {
    color: var(--sp-pink);
    font-size: 18px;
    font-weight: 900;
    white-space: nowrap;
}

.ysp-checkout-amount {
    color: var(--sp-pink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.ysp-checkout-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin: 12px 0 14px;
    padding: 16px;
    border: 1px solid rgba(244,114,182,.24);
    border-radius: 22px;
    background: linear-gradient(180deg, #fff7fb 0%, #ffffff 100%);
    box-shadow: 0 14px 34px rgba(236,72,153,.08);
}

.ysp-checkout-hero .ysp-sheet-customer {
    margin-bottom: 3px;
}

.ysp-checkout-hero .ysp-sheet-service {
    margin-bottom: 9px;
}

.ysp-checkout-help {
    display: grid;
    gap: 5px;
    margin: 14px 0 16px;
    padding: 14px 16px;
    border: 1px solid rgba(244,114,182,.18);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15,23,42,.05);
    color: #374151;
    line-height: 1.35;
}

.ysp-checkout-help strong {
    color: #0f172a;
    font-size: 14px;
}

.ysp-checkout-help span {
    color: #64748b;
    font-size: 13px;
}

.ysp-checkout-groups {
    display: grid;
    gap: 14px;
    margin-top: 8px;
}

.ysp-checkout-group {
    display: grid;
    gap: 10px;
}

.ysp-checkout-group-title {
    color: #6b7280; /* 4.6.2: contrast - was #9ca3af (2.54:1 on white), under the 4.5:1 WCAG AA floor. #6b7280 = 4.83:1. */
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ysp-sheet-actions.ysp-checkout-actions {
    margin-top: 0;
    padding: 12px;
    border: 1px solid rgba(229,231,235,.86);
    border-radius: 22px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 12px 28px rgba(15,23,42,.06);
}

.ysp-action-btn.ysp-checkout-primary {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--sp-pink), var(--sp-pink-dark));
    color: #fff;
    box-shadow: 0 14px 30px rgba(236,72,153,.25);
}

.ysp-checkout-danger .ysp-action-btn {
    width: 100%;
}

.ysp-status-badge.paid_square_pos,
.ysp-status-badge.deposit_paid {
    background: #dcfce7;
    color: #15803d;
}

.ysp-status-badge.waived {
    background: #ede9fe;
    color: #6d28d9;
}

@media (min-width: 720px) {
    #ysp-app {
        border-left: 1px solid rgba(229,231,235,.7);
        border-right: 1px solid rgba(229,231,235,.7);
    }

    .ysp-calendar-shell {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 390px) {
    .ysp-checkout-hero {
        display: grid;
        gap: 12px;
    }

    .ysp-checkout-amount {
        font-size: 30px;
    }

    .ysp-topbar-buttons {
        gap: 4px;
    }

    .ysp-refresh-btn,
    .ysp-topbar-logout {
        padding: 0 9px;
        font-size: 11px;
    }

    .ysp-editor-grid {
        grid-template-columns: 1fr;
    }

    .ysp-bottom-nav {
        gap: 2px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .ysp-bottom-nav-btn {
        border-radius: 16px;
        font-size: 10px;
    }

    .ysp-client-facts {
        grid-template-columns: 1fr;
    }
}

/* 3.3.1 Staff Portal App Polish */
body.yatoon-staff-portal-page {
    background:
        radial-gradient(circle at 50% -80px, rgba(236,72,153,.14), transparent 280px),
        #f7f8fb;
}

#ysp-app {
    background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
}

.ysp-topbar {
    border-bottom-color: rgba(244,114,182,.18);
    background: rgba(255,255,255,.92);
    box-shadow: 0 12px 30px rgba(15,23,42,.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.ysp-staff-name {
    letter-spacing: 0;
}

.ysp-refresh-btn,
.ysp-topbar-logout,
.ysp-add-btn {
    border-radius: 999px;
}

.ysp-add-btn {
    box-shadow: 0 12px 26px rgba(236,72,153,.24);
}

.ysp-week-tabs {
    padding-bottom: 10px;
}

.ysp-day-tab {
    border: 1px solid rgba(229,231,235,.86);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

.ysp-day-tab.active {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.ysp-calendar-shell,
.ysp-client-card,
.ysp-sheet,
.ysp-editor-panel {
    border: 1px solid rgba(244,114,182,.18);
}

.ysp-calendar-shell {
    border-radius: 26px;
}

.ysp-date-heading {
    letter-spacing: 0;
}

.ysp-app-view-head {
    align-items: center;
    padding: 2px 2px 4px;
}

.ysp-client-card {
    border-radius: 22px;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.ysp-client-card:active {
    border-color: rgba(236,72,153,.34);
    box-shadow: 0 16px 34px rgba(236,72,153,.12);
}

.ysp-client-avatar {
    background: linear-gradient(135deg, #fce7f3, #fff7fb);
    border: 1px solid rgba(244,114,182,.22);
}

.ysp-bottom-nav {
    width: min(560px, calc(100% - 12px));
    bottom: 6px;
    border: 1px solid rgba(229,231,235,.92);
    border-radius: 26px;
    box-shadow: 0 -10px 32px rgba(15,23,42,.13);
}

.ysp-bottom-nav-btn {
    min-height: 54px;
}

.ysp-bottom-nav-btn.active {
    background: linear-gradient(135deg, #111827, #252b38);
    box-shadow: 0 10px 24px rgba(15,23,42,.16);
}

.ysp-sheet {
    background:
        linear-gradient(180deg, #fff 0%, #fffafd 100%);
}

.ysp-sheet-time {
    letter-spacing: 0;
}

.ysp-sheet-actions {
    gap: 10px;
}

.ysp-action-btn {
    min-height: 52px;
    letter-spacing: 0;
}

.ysp-action-btn.call {
    border-color: rgba(229,231,235,.92);
    box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

.ysp-empty {
    border: 1px dashed rgba(244,114,182,.28);
    border-radius: 22px;
    background: #fff7fb;
}

/* 3.3.4 Native-app staff polish */
.ysp-icon-button {
    min-width: 42px;
    width: 42px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px !important;
    font-weight: 900;
}

.ysp-icon-button svg {
    width: 19px;
    height: 19px;
    display: block;
}

.ysp-topbar-logout.ysp-icon-button {
    width: 50px;
}

.ysp-bottom-nav-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,23,42,.06);
    color: inherit;
    font-size: 11px;
    font-weight: 900;
}

.ysp-bottom-nav-btn.active .ysp-bottom-nav-icon {
    background: rgba(255,255,255,.18);
}

.ysp-empty-actionable {
    margin-bottom: 12px;
}

.ysp-empty-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.ysp-mini-ghost {
    min-height: 38px;
    border: 1px solid rgba(229,231,235,.9);
    border-radius: 999px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 900;
    padding: 0 16px;
}

.ysp-timeline-time {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 2px 7px;
    background: rgba(255,255,255,.2);
    font-size: 10px !important;
    font-weight: 900 !important;
}

.ysp-timeline-meta {
    margin-top: auto;
    opacity: .88;
    font-size: 10px !important;
    font-weight: 800 !important;
}

.ysp-primary-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
    border: 1px solid rgba(229,231,235,.86);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15,23,42,.06);
}

.ysp-secondary-actions {
    margin-top: 12px;
}

.ysp-sheet-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.ysp-sheet-facts div {
    min-width: 0;
    border: 1px solid rgba(229,231,235,.9);
    border-radius: 18px;
    background: rgba(249,250,251,.92);
    padding: 11px 12px;
}

.ysp-sheet-facts span {
    display: block;
    color: #7b8190;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ysp-sheet-facts strong,
.ysp-sheet-facts a {
    display: block;
    overflow-wrap: anywhere;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
}

.ysp-status-badge.unpaid {
    background: #fef3c7;
    color: #92400e;
}

.ysp-status-badge.refunded {
    background: #fee2e2;
    color: #991b1b;
}

.ysp-permission-list {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.ysp-permission-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(229,231,235,.9);
    border-radius: 16px;
    background: #fff;
    padding: 10px 12px;
}

.ysp-permission-list span {
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
}

.ysp-permission-list strong {
    color: #111827;
    font-size: 12px;
    font-weight: 900;
}

.ysp-permission-note {
    margin: 10px 0 14px;
    border: 1px dashed rgba(236,72,153,.32);
    border-radius: 16px;
    background: #fff7fb;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
    padding: 11px 12px;
}

@media (min-width: 720px) {
    #ysp-app {
        box-shadow: 0 18px 60px rgba(15,23,42,.12);
    }
}

/* 3.3.5 SaaS polish: calmer staff app surfaces and clearer tap targets. */
#ysp-app,
.ysp-screen,
.ysp-sheet {
    color: #111827;
}

.ysp-topbar,
.ysp-bottom-nav,
.ysp-sheet,
.ysp-card,
.ysp-panel,
.ysp-empty,
.ysp-primary-actions {
    border-color: rgba(229,231,235,.9);
}

.ysp-topbar-title,
.ysp-section-title,
.ysp-sheet-title,
.ysp-customer-name,
.ysp-appointment-name {
    letter-spacing: 0;
}

.ysp-topbar-subtitle,
.ysp-muted,
.ysp-empty p,
.ysp-sheet-meta,
.ysp-appointment-meta {
    color: #6b7280;
    line-height: 1.45;
}

.ysp-icon-button,
.ysp-mini-ghost,
.ysp-action-btn,
.ysp-bottom-nav-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.ysp-icon-button,
.ysp-mini-ghost,
.ysp-action-btn {
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.ysp-icon-button:active,
.ysp-mini-ghost:active,
.ysp-action-btn:active,
.ysp-bottom-nav-btn:active {
    transform: scale(.97);
}

.ysp-timeline-card,
.ysp-appointment-card,
.ysp-customer-card {
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15,23,42,.055);
}

.ysp-timeline-card {
    min-height: 104px;
}

.ysp-status-badge {
    font-weight: 900;
    letter-spacing: 0;
}

.ysp-sheet-facts div {
    min-height: 64px;
}

.ysp-primary-actions .ysp-action-btn {
    min-height: 48px;
}

@media (max-width: 380px) {
    .ysp-topbar {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ysp-icon-button {
        min-width: 38px;
        width: 38px;
    }

    .ysp-topbar-logout.ysp-icon-button {
        width: 46px;
    }

    .ysp-sheet-facts {
        grid-template-columns: 1fr;
    }

    .ysp-primary-actions {
        grid-template-columns: 1fr;
    }

    .ysp-bottom-nav-btn {
        font-size: 10px;
    }
}

/* Staff calendar density pass: fixed bottom app bar and cleaner multi-staff timeline. */
.ysp-screen#ysp-schedule-screen {
    padding-bottom: calc(86px + var(--safe-bottom));
}

.ysp-schedule {
    padding-bottom: calc(104px + var(--safe-bottom)) !important;
}

.ysp-bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)) !important;
    gap: 2px !important;
    padding: 8px 8px calc(8px + var(--safe-bottom)) !important;
    border: 1px solid rgba(229,231,235,.94) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 -8px 26px rgba(15,23,42,.12) !important;
}

.ysp-bottom-nav-btn {
    min-width: 0 !important;
    min-height: 58px !important;
    padding: 5px 2px !important;
    border-radius: 14px !important;
    font-size: clamp(9px, 2.55vw, 11px) !important;
    line-height: 1.1 !important;
    overflow: hidden !important;
}

.ysp-bottom-nav-btn span:last-child {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ysp-bottom-nav-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 10px !important;
}

.ysp-bottom-nav-btn.active {
    border-radius: 18px !important;
}

.ysp-calendar-shell {
    margin-left: -8px !important;
    margin-right: -8px !important;
    border: 1px solid rgba(229,231,235,.9) !important;
    border-radius: 18px !important;
    background: #fff !important;
    color: #111827 !important;
    box-shadow: 0 10px 28px rgba(15,23,42,.06) !important;
}

.ysp-calendar-head {
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(229,231,235,.9) !important;
}

.ysp-time-head,
.ysp-staff-head {
    min-height: 38px !important;
    color: #4b5563 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
}

.ysp-time-rail,
.ysp-staff-col {
    background: #fff !important;
}

.ysp-staff-col {
    border-right: 1px solid rgba(229,231,235,.78) !important;
}

.ysp-time-rail {
    border-right: 1px solid rgba(229,231,235,.9) !important;
}

.ysp-hour-label {
    color: #8b95a7 !important;
    font-size: 11px !important;
}

.ysp-time-slot {
    border-top: 1px solid rgba(229,231,235,.82) !important;
}

.ysp-time-slot:hover,
.ysp-time-slot:active {
    background: rgba(236,72,153,.045) !important;
}

.ysp-timeline-booking {
    left: 5px !important;
    right: 5px !important;
    border: 1px solid rgba(255,255,255,.9) !important;
    border-radius: 8px !important;
    padding: 5px 7px !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(15,23,42,.12) !important;
}

.ysp-timeline-time {
    padding: 1px 6px !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
}

.ysp-timeline-booking strong {
    font-size: clamp(11px, 3.2vw, 13px) !important;
    line-height: 1.05 !important;
    margin-top: 2px !important;
}

.ysp-timeline-booking span {
    font-size: clamp(10px, 2.8vw, 12px) !important;
    line-height: 1.12 !important;
}

.ysp-timeline-meta {
    display: none !important;
}

@media (max-width: 430px) {
    .ysp-calendar-head,
    .ysp-calendar-grid {
        min-width: 420px !important;
    }

    .ysp-calendar-head {
        grid-template-columns: 48px repeat(var(--ysp-staff-count, 2), minmax(126px, 1fr)) !important;
    }

    .ysp-bottom-nav {
        grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)) !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
}

/* v3.3.6 final layout pass: page calendar, not a nested app window. */
body.yatoon-staff-portal-page {
    overflow-y: auto !important;
}

#ysp-app {
    width: min(1120px, 100%) !important;
    max-width: 1120px !important;
    margin: 0 auto !important;
    background: #fff !important;
}

.ysp-screen#ysp-schedule-screen {
    min-height: auto !important;
}

.ysp-schedule {
    overflow: visible !important;
}

.ysp-calendar-shell {
    overflow-x: auto !important;
    overflow-y: visible !important;
    max-height: none !important;
    border-radius: 0 !important;
}

.ysp-calendar-grid {
    overflow: visible !important;
}

.ysp-timeline-booking {
    min-height: 46px !important;
}

@media (min-width: 900px) {
    body.yatoon-staff-portal-page {
        background: #fff7fb !important;
    }

    #ysp-app {
        min-height: auto !important;
        box-shadow: 0 1px 0 rgba(15,23,42,.05) !important;
    }

    .ysp-topbar,
    .ysp-day-tabs,
    .ysp-schedule {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .ysp-topbar {
        position: relative !important;
        top: auto !important;
        border-bottom: 0 !important;
    }

    .ysp-day-tabs {
        justify-content: center !important;
        overflow: visible !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .ysp-day-tab,
    .ysp-week-nav {
        min-width: 76px !important;
        min-height: 72px !important;
        border-radius: 10px !important;
    }

    .ysp-week-nav {
        min-width: 96px !important;
    }

    .ysp-schedule {
        padding-bottom: 28px !important;
    }

    .ysp-date-heading {
        margin: 18px 0 16px !important;
        font-size: 20px !important;
        font-weight: 800 !important;
    }

    .ysp-calendar-shell {
        margin: 0 !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 14px !important;
        box-shadow: none !important;
        background: #fff !important;
        overflow: visible !important;
    }

    .ysp-calendar-head,
    .ysp-calendar-grid {
        min-width: 100% !important;
        overflow: visible !important;
    }

    .ysp-time-head,
    .ysp-staff-head {
        min-height: 44px !important;
        font-size: 12px !important;
    }

    .ysp-hour-label {
        right: 12px !important;
        font-size: 13px !important;
    }

    .ysp-timeline-booking {
        left: 8px !important;
        right: 8px !important;
        min-height: 54px !important;
        border-radius: 7px !important;
        padding: 8px 10px !important;
        box-shadow: 0 8px 16px rgba(15,23,42,.10) !important;
    }

    .ysp-timeline-time {
        width: fit-content !important;
        margin-bottom: 3px !important;
        padding: 2px 8px !important;
        border-radius: 999px !important;
        background: rgba(255,255,255,.18) !important;
        font-size: 12px !important;
        font-weight: 900 !important;
    }

    .ysp-timeline-booking strong {
        font-size: 14px !important;
        line-height: 1.15 !important;
    }

    .ysp-timeline-booking span {
        font-size: 12px !important;
        line-height: 1.18 !important;
    }

    .ysp-bottom-nav {
        position: sticky !important;
        left: auto !important;
        right: auto !important;
        bottom: 0 !important;
        transform: none !important;
        width: min(1120px, 100%) !important;
        max-width: 1120px !important;
        margin: 18px auto 0 !important;
        display: grid !important;
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        gap: 8px !important;
        padding: 10px 16px !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 14px 14px 0 0 !important;
        box-shadow: 0 -4px 18px rgba(15,23,42,.06) !important;
        background: rgba(255,255,255,.96) !important;
    }

    .ysp-bottom-nav-btn {
        min-height: 58px !important;
        border-radius: 10px !important;
    }

    .ysp-bottom-nav-btn.active {
        background: #111827 !important;
        color: #fff !important;
    }

    .ysp-bottom-nav-btn.active .ysp-bottom-nav-icon {
        background: rgba(255,255,255,.18) !important;
    }
}

/* v3.3.6 checkout/mobile nav pass */
#ysp-bottom-add-btn {
    display: none !important;
}

#ysp-detail-overlay.ysp-checkout-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    display: none !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
    background: rgba(15,23,42,.34) !important;
}

#ysp-detail-overlay.ysp-checkout-overlay.open {
    display: flex !important;
}

#ysp-detail-overlay.ysp-checkout-overlay .ysp-sheet {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    transform: none !important;
    overflow: hidden !important;
}

#ysp-detail-overlay.ysp-checkout-overlay .ysp-sheet-body {
    width: 100% !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 0 18px calc(28px + var(--safe-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

#ysp-detail-overlay.ysp-checkout-overlay .ysp-sheet-close,
#ysp-detail-overlay.ysp-checkout-overlay .ysp-sheet-handle {
    display: none !important;
}

.ysp-checkout-top {
    position: sticky !important;
    top: 0 !important;
    z-index: 4 !important;
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr) 56px !important;
    align-items: center !important;
    min-height: 92px !important;
    margin: 0 -18px 20px !important;
    padding: max(18px, env(safe-area-inset-top, 0px)) 18px 12px !important;
    border-bottom: 1px solid #eef0f3 !important;
    background: rgba(255,255,255,.98) !important;
    backdrop-filter: blur(12px) !important;
}

.ysp-checkout-top strong {
    color: #111827 !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    text-align: center !important;
}

.ysp-checkout-top .ysp-detail-close {
    position: static !important;
    width: 52px !important;
    height: 52px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #f3f4f6 !important;
    color: #111827 !important;
    font-size: 38px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

#ysp-detail-overlay.ysp-checkout-overlay .ysp-checkout-title {
    font-family: inherit !important;
    font-size: clamp(32px, 8vw, 48px) !important;
    line-height: 1.05 !important;
    margin: 0 0 18px !important;
}

#ysp-detail-overlay.ysp-checkout-overlay .ysp-checkout-hero,
#ysp-detail-overlay.ysp-checkout-overlay .ysp-checkout-help,
#ysp-detail-overlay.ysp-checkout-overlay .ysp-sheet-actions.ysp-checkout-actions {
    border-color: #e5e7eb !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: none !important;
}

#ysp-detail-overlay.ysp-checkout-overlay .ysp-action-btn {
    min-height: 58px !important;
    border-radius: 999px !important;
    font-size: 15px !important;
}

#ysp-detail-overlay.ysp-checkout-overlay .ysp-action-btn.complete,
#ysp-detail-overlay.ysp-checkout-overlay .ysp-action-btn.ysp-checkout-primary {
    background: #0a0a0a !important;
    color: #fff !important;
    box-shadow: none !important;
}

@media (min-width: 760px) {
    #ysp-detail-overlay.ysp-checkout-overlay .ysp-sheet-body {
        max-width: 760px !important;
        padding-left: 28px !important;
        padding-right: 28px !important;
    }

    .ysp-checkout-top {
        margin-left: -28px !important;
        margin-right: -28px !important;
        padding-left: 28px !important;
        padding-right: 28px !important;
    }
}

@media (max-width: 899px) {
    #ysp-app {
        max-width: none !important;
    }

    .ysp-schedule {
        padding-bottom: calc(86px + var(--safe-bottom)) !important;
    }

    .ysp-bottom-nav {
        border-radius: 0 !important;
        box-shadow: 0 -8px 18px rgba(15,23,42,.08) !important;
    }
}

/* v3.3.7 mobile calendar clarity pass: page timeline, not an embedded window. */
@media (max-width: 899px) {
    html,
    body.yatoon-staff-portal-page {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    #ysp-app,
    .ysp-screen#ysp-schedule-screen {
        width: 100% !important;
        max-width: none !important;
        min-height: auto !important;
        overflow: visible !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .ysp-topbar {
        position: relative !important;
        top: auto !important;
        z-index: 3 !important;
        border-bottom: 1px solid #eef0f3 !important;
        background: #fff !important;
    }

    .ysp-day-tabs {
        position: relative !important;
        z-index: 2 !important;
        padding: 8px 12px !important;
        overflow-x: auto !important;
        background: #fff !important;
    }

    .ysp-schedule {
        width: 100% !important;
        max-width: none !important;
        padding: 0 0 calc(92px + var(--safe-bottom)) !important;
        overflow: visible !important;
    }

    .ysp-date-heading,
    .ysp-insight-strip,
    .ysp-empty {
        margin-left: 14px !important;
        margin-right: 14px !important;
    }

    .ysp-insight-strip {
        display: none !important;
    }

    .ysp-calendar-shell {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border: 0 !important;
        border-top: 1px solid #e5e7eb !important;
        border-bottom: 1px solid #e5e7eb !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
    }

    .ysp-calendar-head,
    .ysp-calendar-grid {
        width: max-content !important;
        min-width: 100% !important;
        overflow: visible !important;
    }

    .ysp-calendar-head {
        position: sticky !important;
        top: 0 !important;
        z-index: 2 !important;
        border-bottom: 1px solid #e5e7eb !important;
        background: #fff !important;
    }

    .ysp-time-head,
    .ysp-staff-head {
        min-height: 34px !important;
        padding: 8px 4px !important;
        font-size: 10px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
    }

    .ysp-time-rail {
        background: #fff !important;
        border-right: 1px solid #e5e7eb !important;
    }

    .ysp-staff-col {
        background: #fff !important;
        border-right: 1px solid #edf0f4 !important;
    }

    .ysp-time-slot {
        border-top: 1px solid #edf0f4 !important;
    }

    .ysp-hour-label {
        right: 5px !important;
        color: #8b95a7 !important;
        font-size: 10px !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .ysp-timeline-booking {
        left: 4px !important;
        right: 4px !important;
        min-height: 34px !important;
        padding: 4px 6px !important;
        border: 1px solid rgba(255,255,255,.82) !important;
        border-radius: 6px !important;
        box-shadow: 0 5px 12px rgba(15,23,42,.12) !important;
        gap: 1px !important;
    }

    .ysp-timeline-time {
        display: inline-block !important;
        width: fit-content !important;
        max-width: 100% !important;
        margin: 0 0 1px !important;
        padding: 1px 5px !important;
        border-radius: 999px !important;
        background: rgba(255,255,255,.18) !important;
        color: #fff !important;
        font-size: 9px !important;
        line-height: 1.15 !important;
        font-weight: 900 !important;
    }

    .ysp-timeline-booking strong {
        display: block !important;
        color: #fff !important;
        font-size: 11px !important;
        line-height: 1.08 !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .ysp-timeline-booking span:not(.ysp-timeline-time):not(.ysp-timeline-meta) {
        display: block !important;
        color: rgba(255,255,255,.94) !important;
        font-size: 9.5px !important;
        line-height: 1.05 !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .ysp-timeline-booking.is-short span:not(.ysp-timeline-time),
    .ysp-timeline-meta {
        display: none !important;
    }

    .ysp-bottom-nav {
        height: auto !important;
        border-radius: 0 !important;
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        padding: 7px 7px calc(7px + var(--safe-bottom)) !important;
    }

    .ysp-bottom-nav-btn {
        min-height: 54px !important;
        border-radius: 12px !important;
        font-size: 10px !important;
    }
}

/* v3.3.7 final checkout full-screen lock. Keep this last. */
#ysp-detail-overlay.ysp-checkout-overlay,
#ysp-detail-overlay.ysp-checkout-overlay.open {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    transform: none !important;
}

#ysp-detail-overlay.ysp-checkout-overlay #ysp-detail-sheet,
#ysp-detail-overlay.ysp-checkout-overlay .ysp-sheet {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    overflow: hidden !important;
    animation: none !important;
}

#ysp-detail-overlay.ysp-checkout-overlay #ysp-sheet-body,
#ysp-detail-overlay.ysp-checkout-overlay .ysp-sheet-body {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 18px calc(30px + var(--safe-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

@media (min-width: 760px) {
    #ysp-detail-overlay.ysp-checkout-overlay #ysp-sheet-body,
    #ysp-detail-overlay.ysp-checkout-overlay .ysp-sheet-body {
        max-width: 760px !important;
        margin: 0 auto !important;
        padding-left: 28px !important;
        padding-right: 28px !important;
    }
}

/* ---------------------------------------------------------------------
 * Design/photo upload highlight — applied to any booking card in the
 * staff portal (today list, day list, timeline, week list, month view)
 * that has a customer design/reference image attached.
 *
 * Light-background cards (agenda/list/week/today rows) get a stronger
 * yellow tint + left bar. Timeline cards already have a colored
 * background with white text, so we do NOT swap their background
 * (that made the text unreadable) — instead they get an amber ring
 * plus a small photo badge that stays legible on any card color.
 * --------------------------------------------------------------------- */
.ysp-card.ysp-has-design,
.ysp-client-card.ysp-has-design,
.ysp-today-row.ysp-has-design,
.ysp-next-client.ysp-has-design {
    background: #fef3c7 !important;
    box-shadow: inset 5px 0 0 #f59e0b !important;
    position: relative;
}
.ysp-card.ysp-has-design:active,
.ysp-client-card.ysp-has-design:active,
.ysp-today-row.ysp-has-design:active,
.ysp-next-client.ysp-has-design:active {
    background: #fde68a !important;
}

.ysp-timeline-booking.ysp-has-design {
    box-shadow: inset 0 0 0 2px #f59e0b, 0 5px 18px rgba(0,0,0,.24) !important;
    position: relative;
}

.ysp-card.ysp-has-design::after,
.ysp-client-card.ysp-has-design::after,
.ysp-today-row.ysp-has-design::after,
.ysp-next-client.ysp-has-design::after,
.ysp-timeline-booking.ysp-has-design::after {
    content: '\1F4F7';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    font-size: 11px;
    text-align: center;
    background: #f59e0b;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.35);
    z-index: 2;
}
.ysp-month-cell.has-design {
    box-shadow: inset 0 0 0 2px #f59e0b !important;
}
.ysp-month-cell.has-design .ysp-month-dot {
    background: #f59e0b;
}

/* ---------------------------------------------------------------------
 * Simplified Month calendar view — for staff who just need to see
 * which days they have appointments and tap through to details.
 * --------------------------------------------------------------------- */
.ysp-month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 4px 12px;
}
.ysp-month-label {
    font-size: 16px;
    color: var(--sp-ink);
}
.ysp-month-weekday-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0 2px 6px;
}
.ysp-month-weekday-row span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--sp-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ysp-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    padding: 0 2px 16px;
}
.ysp-month-cell {
    aspect-ratio: 1 / 1;
    min-height: 38px;
    border: 1.5px solid transparent;
    border-radius: var(--sp-radius-sm);
    background: var(--sp-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.ysp-month-cell.is-outside {
    opacity: .35;
}
.ysp-month-daynum {
    font-size: 12px;
    font-weight: 600;
    color: var(--sp-ink);
}
.ysp-month-cell.is-today .ysp-month-daynum {
    color: var(--sp-pink);
}
.ysp-month-cell.is-selected {
    background: var(--sp-pink);
    border-color: var(--sp-pink);
}
.ysp-month-cell.is-selected .ysp-month-daynum {
    color: #fff;
}
.ysp-month-dot-row {
    display: flex;
    align-items: center;
    gap: 2px;
}
.ysp-month-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--sp-pink);
}
.ysp-month-cell.is-selected .ysp-month-dot {
    background: #fff;
}
.ysp-month-more {
    font-size: 8px;
    color: var(--sp-muted);
}
.ysp-month-cell.is-selected .ysp-month-more {
    color: rgba(255,255,255,.85);
}
.ysp-month-cell.has-design:not(.is-selected) {
    box-shadow: inset 0 0 0 2px #f59e0b;
}
.ysp-month-agenda {
    padding-bottom: 12px;
}
.ysp-editor-section-title{margin:18px 0 8px;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--sp-muted)}
.ysp-service-options{display:grid;gap:8px;margin:8px 0 14px}
.ysp-service-option{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--sp-border);border-radius:12px;background:var(--sp-card);cursor:pointer}
.ysp-service-option:has(input:checked){border-color:var(--sp-pink);box-shadow:0 0 0 1px var(--sp-pink);background:#fff7fb}
.ysp-service-option input{width:18px;height:18px;margin:0;flex:0 0 auto}
.ysp-service-option span{display:flex;flex-direction:column;gap:2px;min-width:0}
.ysp-service-option strong{font-size:14px;color:var(--sp-ink)}
.ysp-service-option small,.ysp-editor-help{font-size:12px;color:var(--sp-muted)}
.ysp-service-option.is-addon strong::after{content:' Add-on';font-size:9px;margin-left:6px;padding:2px 5px;border-radius:999px;background:#fce7f3;color:#be185d;vertical-align:middle}
