/* One material, existing silhouettes: glass actions, purple selected states. */
:root{--df-glass:rgba(39,32,48,.82);--df-glass-edge:rgba(225,211,255,.3);--df-glass-sheen:linear-gradient(150deg,rgba(255,255,255,.16),rgba(255,255,255,.025) 48%,rgba(196,164,255,.07));--df-glass-shadow:inset 0 1px 0 rgba(255,255,255,.24),inset 0 -1px 0 rgba(255,255,255,.035),0 5px 14px rgba(0,0,0,.16)}
body :is(button,.btn,summary.service-picker-trigger){background-color:var(--df-glass);background-image:var(--df-glass-sheen);border:1px solid var(--df-glass-edge);box-shadow:var(--df-glass-shadow);backdrop-filter:blur(14px) saturate(130%);-webkit-backdrop-filter:blur(14px) saturate(130%);color:#f8f5ff;transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease;}
body :is(#team,dialog) :is(.btn,.tab),body #team :is(#new-booking,#my-profile){background-image:var(--df-glass-sheen);box-shadow:var(--df-glass-shadow);border-color:var(--df-glass-edge);color:#f8f5ff}
body #customer :is(button,.btn){background-image:var(--df-glass-sheen);box-shadow:var(--df-glass-shadow);border-color:var(--df-glass-edge);color:#f8f5ff}
/* Legacy primary buttons use !important: override only their material here. */
body .btn.btn-primary{background-color:#7544ad!important;background-image:var(--df-glass-sheen)!important;border-color:#d4b5fc!important}
body .btn.btn-primary:disabled{background-color:#33273e!important;border-color:#665774!important}
body .back{border-radius:12px;padding:10px 12px;min-height:44px;display:inline-flex;align-items:center}
body #customer :is(.slot,.staff-option){border-radius:12px}
body :is(button,.btn):is(.selected,.tab-active,[aria-pressed=true],[aria-selected=true],.btn-primary),body #team #new-booking{background-color:#7544ad;border-color:#d4b5fc;color:#fff}
body #team :is(.tab-active,.selected,[aria-pressed=true],[aria-selected=true]),body dialog :is(.selected,[aria-pressed=true],.btn-primary){background-color:#7544ad;border-color:#d4b5fc;color:#fff}
body .day,body #team .ma-month-day{border-radius:12px}
body #team :is(.da-event,.ma-appointment){background-image:var(--df-glass-sheen)}
body :is(button,.btn):is(.danger,.btn-error){background-color:#763544;border-color:#e6a4b1;color:#fff}
body :is(button,.btn):disabled{background-color:#241f2b;border-color:#4a4056;color:#ada5ba;box-shadow:inset 0 1px 0 #ffffff0a;opacity:.58;cursor:not-allowed;backdrop-filter:none;-webkit-backdrop-filter:none}
body :is(button,.btn):focus-visible{outline:2px solid #e1ccff;outline-offset:3px}
body :is(.btn-circle,.calendar-arrow,.ui-close),body #team :is(#prev-week,#next-week,#mobile-refresh){display:inline-flex;align-items:center;justify-content:center;aspect-ratio:1;width:44px;min-width:44px;height:44px;min-height:44px;max-height:44px;flex:0 0 44px;padding:0;border-radius:50%;line-height:1}
body .ui-close svg{width:20px;height:20px;stroke-width:2.8;flex:none}
.ux-action-icon{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
body #team :is(.btn,.tab),body dialog .btn{gap:8px;align-items:center;justify-content:center;line-height:1.35}
/* Appointment colors carry meaning and must remain visible under the sheen. */
body :is(.da-event,.ma-appointment,.appointment){backdrop-filter:none;-webkit-backdrop-filter:none}
.directory-heading{display:flex;justify-content:space-between;align-items:start;gap:20px;margin-bottom:24px}
.directory-heading h2{font-family:var(--font-interface);font-size:1.5rem;text-transform:none;margin:0 0 10px}
.directory-heading p{max-width:64ch;margin:0}
.directory-search{display:grid;gap:8px;max-width:560px;font-size:.875rem}
.directory-search input{width:100%}
[data-directory-status]{margin:16px 0;font-size:.875rem}
.directory-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 0;border-bottom:1px solid var(--df-line)}
.directory-row>div{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}
.directory-row strong{font-size:1rem}.directory-row span{font-size:.875rem;color:var(--df-secondary)}
.directory-row .btn{flex:none}
.preview-toolbar{position:relative;z-index:5;max-width:1320px;margin:0 auto;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#151319;border-bottom:1px solid var(--df-line)}
.preview-toolbar p{font-size:.8125rem;line-height:1.5;color:var(--df-secondary);margin:0;max-width:65ch}
.preview-toolbar .preview-modes{display:flex;gap:8px;flex:none}
.preview-toolbar .btn{border-radius:12px;min-height:44px;padding:10px 16px;font-size:.875rem}
.preview-client-frame{display:block;width:min(100%,430px);height:calc(100dvh - 150px);min-height:500px;margin:24px auto;border:1px solid var(--df-line);border-radius:24px;background:#08080a}
.preview-client-frame[hidden]{display:none}
body.preview-client-mode>:is(header,#team,#customer,#booking-dock,#home-install){display:none!important}
body.preview-embedded .dropfade-header{position:relative}
body.preview-embedded #install-reopen,body.preview-embedded #home-install{display:none!important}
@media(hover:hover){body :is(button,.btn):not(:disabled):hover{border-color:#dcc3ff;box-shadow:inset 0 1px 0 #ffffff55,0 6px 18px #0004}body :is(button,.btn):not(:disabled):active{box-shadow:inset 0 2px 5px #0004}}
@media(max-width:767px){.preview-toolbar{padding:12px 18px;align-items:stretch;flex-direction:column;gap:10px}.preview-toolbar .preview-modes{display:grid;grid-template-columns:1fr 1fr}.preview-client-frame{width:100%;border:0;border-radius:0;margin:0;height:calc(100dvh - 140px)}.directory-heading{align-items:start;gap:12px}.directory-heading .btn{font-size:.8125rem;padding:10px}.directory-heading p{font-size:.875rem}.directory-row{padding:16px 0}body #team .team-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){body :is(button,.btn){transition:none}}
@media(prefers-reduced-transparency:reduce){body :is(button,.btn){backdrop-filter:none;-webkit-backdrop-filter:none;background-color:#302639}}

body #customer #services .services-discover{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:0;max-width:none;min-height:40px;height:40px;padding:0 16px;border-radius:12px;font-size:12px;line-height:1.2;letter-spacing:normal;text-transform:none;font-weight:600;white-space:nowrap;flex:none;pointer-events:auto}

body #team :is(.team-top h1,.stock-heading h2,.ma-filter-heading h2,.da-title h2,h1,h2,h3),body:has(#team:not([hidden])) dialog h2{text-transform:uppercase;text-wrap:balance}

body #team #new-booking{display:inline-flex;justify-content:center;gap:5px}
body #team #new-booking .ux-action-icon{width:16px;height:16px;margin:0}
body #team #my-profile{display:inline-flex;justify-content:center;gap:8px}
.profile-button-avatar{position:relative;display:inline-grid;place-items:center;width:28px;height:28px;flex:0 0 28px;border-radius:50%;overflow:hidden;background:#453252;color:#fff;font-size:10px;line-height:1}
body #team #my-profile .profile-button-photo{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;border-radius:50%;margin:0}

/* Consistent icon-only refresh controls in agenda, inventory and directory. */
body #team .stock-heading>.stock-actions button.ui-refresh,body dialog button.ui-refresh,body #team button.ui-refresh,body #team :is(.stock-actions,.directory-heading,.agenda-controls,.ma-range) button.ui-refresh{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;max-width:44px;min-height:44px;max-height:44px;flex:0 0 44px;aspect-ratio:1;border-radius:50%;padding:0;gap:0;line-height:1;background-color:var(--df-glass);background-image:var(--df-glass-sheen);box-shadow:var(--df-glass-shadow);border:1px solid var(--df-glass-edge)}
body dialog button.ui-refresh svg,body #team button.ui-refresh svg{display:block;width:20px;height:20px;flex:none;margin:0;stroke-width:1.9}

/* Final alignment pass: keep arrows outside the seven date controls. */
@media(min-width:601px){body #team-booking-dialog .internal-week-row{grid-template-columns:44px minmax(0,1fr) 44px;gap:8px}body #team-booking-dialog .internal-week-days{gap:8px}}
body dialog :is(.input,.select){min-width:0;max-width:100%}
body dialog .sale-picker{gap:12px;align-items:end}
body :is(#team,dialog) :is(input,select){font-variant-numeric:tabular-nums}
body #team .stock-heading>.stock-actions{align-items:center;gap:12px}
body #team :is(h1,h2,h3),body dialog h2{overflow-wrap:break-word}

@media(max-width:420px){body #team #new-booking,body #team #my-profile{font-size:.75rem;padding-inline:8px}body #team #my-profile .profile-button-avatar{width:24px;height:24px;flex-basis:24px}}
@media(max-width:700px){body #team .stock-heading>.stock-actions{grid-template-columns:44px minmax(0,1fr) minmax(0,1fr);gap:10px}}

body #team :is(.admin-heading h2,.team-availability .card-title,.directory-heading h2){font-family:var(--font-interface);font-size:1.5rem;font-weight:650;line-height:1.25;letter-spacing:-.02em;margin:0 0 12px}
body #team .admin-heading .eyebrow{display:none}
body #team :is(.team-admin,.team-availability) label{line-height:1.5}
body #team .team-user-info{min-width:0;overflow-wrap:anywhere}

body #team #block-form button[type=submit],body dialog .modal-action .btn{font-size:.875rem}

/* Desktop workspace: separation through spacing, one rule below the page title. */
@media(min-width:1024px){
 body #team .team-top{gap:32px;margin-bottom:28px;padding-bottom:28px;border-bottom:1px solid var(--df-line)}
 body #team .team-tabs{border:0;padding:0;margin:0 0 28px;gap:10px;flex-wrap:wrap}
 body #team .team-tabs .tab{min-height:46px;padding:10px 20px}
 body #team .ux-sync{margin-bottom:20px}
 body #team .stats-row{border:0;gap:20px;margin:0 0 28px}
 body #team .stat-box{padding:20px 24px}
 body #team .agenda-controls{border:0;padding:0;gap:12px;margin:0 0 24px;align-items:center}
 body #team .agenda-controls label{display:flex;align-items:center;gap:12px}
 body #team .agenda-controls label input{margin:0;min-width:148px}
 body #team .desktop-agenda{padding:24px}
 body #team :is(.team-users-title,.stock-more,.da-cancelled){border-top:0}
 body #team .directory-row{border-bottom:1px solid var(--df-line);padding-block:16px}
 body #team .team-users-title{margin-top:32px;padding-top:0;margin-bottom:20px}
 body #team .stock-heading{gap:32px;align-items:center;margin-bottom:24px}
 body #team .directory-heading{align-items:center;margin-bottom:24px}
 body #team .directory-search{max-width:640px}
 body #team .da-heading{margin-block:24px}
}

@media(min-width:1024px){body:has(#team:not([hidden])) .dropfade-header{border-bottom:0}}

/* Compact desktop week strip: date and day/count share the button width. */
@media(min-width:1024px){
 body #team .da-days{gap:10px}
 body #team .da-days .btn{display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;justify-content:center;align-content:center;align-items:center;column-gap:14px;row-gap:3px;min-height:76px;padding:14px 12px;text-align:left}
 body #team .da-days .btn b{grid-column:1;grid-row:1 / 3;font-size:32px;line-height:1;font-weight:650;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
 body #team .da-days .btn span{grid-column:2;grid-row:1;font-size:13px;font-weight:600;line-height:1.3}
 body #team .da-days .btn small{grid-column:2;grid-row:2;font-size:11px;line-height:1.4;white-space:nowrap;color:var(--df-secondary);font-variant-numeric:tabular-nums}
 body #team .da-days .btn.da-selected{background-color:#39224f;border-color:var(--df-highlight)}
 body #team .da-days .btn.da-selected small{color:var(--df-text)}
}
@media(min-width:1024px) and (max-width:1199px){
 body #team .da-days{gap:8px}
 body #team .da-days .btn{column-gap:9px;padding-inline:8px;min-height:72px}
 body #team .da-days .btn b{font-size:28px}
}

/* Phone-style address book: a single initial on the left of each surname group. */
body #team .directory-filters{display:flex;flex-wrap:wrap;align-items:end;gap:12px}
body #team .directory-filters label{display:grid;gap:8px;font-size:.875rem;line-height:1.5;margin:0}
body #team .directory-filters .directory-search{flex:1 1 300px;max-width:640px;min-width:0}
body #team .directory-filters input{width:100%;margin:0}
body #team .directory-order{font-size:.8125rem;margin:12px 0 0}
body #team .directory-group{display:grid;grid-template-columns:32px minmax(0,1fr);column-gap:16px;margin:0 0 24px;align-items:start}
body #team .directory-group-title{grid-column:1;grid-row:1;margin:0;padding-top:20px;color:var(--df-highlight);font-size:1rem;font-weight:650;line-height:1.5;text-align:left}
body #team .directory-row{grid-column:2;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:16px 0;min-width:0}
body #team .directory-row:first-of-type{grid-row:1}
body #team .directory-row>div{min-width:0;overflow-wrap:anywhere}
body #team .directory-more{margin-top:8px;min-height:46px}
@media(max-width:600px){body #team .directory-filters .directory-search{flex-basis:100%}body #team .directory-group{grid-template-columns:20px minmax(0,1fr);column-gap:12px;margin-bottom:20px}body #team .directory-row{gap:10px}body #team .directory-row .btn{padding-inline:12px;font-size:.8125rem}body #team .directory-row strong{font-size:.9375rem}}

/* Alphabet rail stays alongside the list; letter jumps never fetch more pages. */
body #team .directory-browser{display:grid;grid-template-columns:44px minmax(0,1fr);gap:16px;align-items:start}
body #team .directory-index{gap:0;position:sticky;top:80px;display:flex;flex-direction:column;align-items:center;max-height:calc(100dvh - 100px);overflow-y:auto;scrollbar-width:thin}
body #team .directory-index .directory-index-letter{width:40px;min-width:40px;height:24px!important;min-height:24px!important;max-height:24px;padding:0;flex:none;border:0;border-radius:6px;background:none;background-image:none;box-shadow:none;backdrop-filter:none;font-size:12px;line-height:1;color:var(--df-highlight)}
body #team .directory-index .directory-index-letter:disabled{opacity:.3;pointer-events:none}
body #team .directory-index .directory-index-letter[aria-current]{background:var(--df-panel);color:var(--df-text)}
body #team .directory-group{display:block;scroll-margin-top:84px}
body #team .directory-group-title{padding:0 0 4px;margin:0;font-size:.875rem}
body #team .directory-row>div{display:flex;flex-direction:column;justify-content:center;gap:2px}
body #team .directory-row :is(strong,span){margin:0;line-height:1.3}
@media(max-width:600px){body #team .directory-browser{grid-template-columns:32px minmax(0,1fr);gap:10px}body #team .directory-index .directory-index-letter{width:32px;min-width:32px}body #team .directory-row{padding-block:12px}}
@media(min-width:1024px){body #team .da-title{justify-content:flex-start;gap:14px}body #team .da-days .btn{row-gap:0!important}}
body #team .ma-date-cell{row-gap:2px}

body #team .directory-row>.directory-actions{display:flex;flex-direction:row;align-items:center;gap:8px}
body #team .directory-actions .directory-remove{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;padding:0;flex:none;border-radius:50%;color:var(--df-secondary)}
body #team .directory-remove svg{width:18px;height:18px;display:block;margin:0}
.directory-remove-dialog{width:min(440px,calc(100vw - 32px))}
.directory-remove-dialog [data-contact-name]{font-weight:650;margin:12px 0 8px}
.directory-remove-dialog [data-remove-error]{color:#ffb4b4}
@media(max-width:600px){body #team .directory-row{column-gap:8px}body #team .directory-actions{gap:6px}body #team .directory-actions>.btn:not(.directory-remove){padding-inline:8px;font-size:12px}}

/* Align team header controls with the workspace content edges. */
body:has(#team:not([hidden])) .dropfade-header{width:100%;max-width:none;margin-inline:auto;padding-inline:clamp(16px,5vw,28px)}
@media(min-width:1024px) and (hover:hover) and (pointer:fine){body:has(#team:not([hidden])) .dropfade-header{padding-inline:max(40px,calc((100% - 1240px)/2))}}
@media(max-width:767px){body:has(#team:not([hidden])) .dropfade-header{padding-inline:18px}}

@media(min-width:1024px) and (hover:hover) and (pointer:fine){
 body #team .desktop-agenda .da-availability-dot{display:inline-block;width:7px;height:7px;min-width:7px;border-radius:50%;margin-left:6px;vertical-align:middle;background:#e77777;box-shadow:none}
 body #team .desktop-agenda .da-availability-dot.is-available{background:#64d89b}
 body #team .da-title .da-availability-dot{width:8px;height:8px;margin-left:10px}
}

body #team .revenue-value{display:flex;align-items:center;justify-content:space-between;gap:12px}
body #team .revenue-value .btn{width:40px;height:40px;min-width:40px;min-height:40px;padding:0;border-radius:50%;flex:none}
body #team .revenue-value svg{width:20px;height:20px;display:block}
body #team .stats-row:not(:has(.revenue-card)){grid-template-columns:repeat(2,minmax(0,1fr))}
.revenue-dialog{width:min(440px,calc(100vw - 32px))}.revenue-dialog label{display:grid;gap:8px}.revenue-dialog input{width:100%;min-width:0}
