:root { color-scheme: dark; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; background: #0b1020; color: #e8ecf8; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
a { color: inherit; }
main { width: min(100%, 1560px); min-height: calc(100vh - 170px); margin: 0 auto; padding: 110px 32px 48px; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 10px 0; }
h2 { font-size: 1.25rem; }
p { line-height: 1.6; }
.muted { color: #a4adc8; }
.eyebrow { color: #a4adc8; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.org-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0; }
.org-picker select { min-height: 44px; max-width: 100%; padding: 8px 12px; border: 1px solid #354362; border-radius: 9px; background: #151f36; }
.button { display: inline-flex; padding: 10px 18px; border: 1px solid #3a4b71; border-radius: 10px; text-decoration: none; background: #172441; }
.button:hover { background: #213456; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #72b1ff; outline-offset: 3px; }
.skip { position: fixed; top: -100px; left: 16px; padding: 12px; background: #172441; z-index: 2000; }
.skip:focus { top: 10px; }
.session, .screen-placeholder { margin-top: 28px; padding: 24px; border: 1px solid #293650; border-radius: 16px; background: #10192e; }
.session { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.session p { flex-basis: 100%; margin: 0; }
.session { margin: 18px 0 28px; padding: 12px 18px; gap: 6px 16px; font-size: .85rem; }
.session p { flex-basis: auto; margin-right: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button, .button { min-height: 44px; min-width: 44px; }
button { padding: 10px 14px; border: 1px solid #354362; background: #151f36; border-radius: 9px; cursor: pointer; }
button:hover:enabled { background: #263554; }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: #3977e8; border-color: #6199ff; color: #fff; font-weight: 650; }
button.primary:hover:enabled { background: #285fc6; }
button.danger { color: #ffaca9; border-color: #80444d; }
button[aria-pressed="true"] { background: #284879; border-color: #83b7ff; color: #fff; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: .85rem; font-weight: 650; margin-bottom: 12px; }
.agenda-heading, .agenda-toolbar, .period-controls, .view-controls, .detail-heading { display: flex; align-items: center; gap: 8px; }
.agenda-heading { justify-content: space-between; margin-bottom: 20px; }
.agenda-heading h2 { margin: 0 0 5px; font-size: 1.5rem; }
.agenda-heading p { margin: 0; font-size: .8rem; }
.agenda-toolbar { flex-wrap: wrap; margin-bottom: 18px; }
.agenda-toolbar h3 { margin: 0 auto 0 12px; font-size: 1rem; font-weight: 550; }
.agenda-layout { display: flex; align-items: flex-start; border: 1px solid #2a3652; border-radius: 14px; background: #10182b; overflow: clip; }
.agenda-sidebar { padding: 22px 16px; width: 188px; flex-shrink: 0; }
.calendar-filter { min-height: 44px; display: flex; align-items: center; gap: 9px; font-size: .85rem; overflow-wrap: anywhere; cursor: pointer; }
.calendar-filter input { width: 20px; height: 20px; flex-shrink: 0; accent-color: #80aaff; }
.primary-label { color: #b9d1ff; }
.team-label { color: #d2b9ff; }
.status-legend { margin-top: 28px; }
.status-legend h3 { font-size: .8rem; color: #a4adc8; }
.status-legend p { display: flex; align-items: center; gap: 8px; font-size: .75rem; margin: 12px 0; line-height: 1.3; }
.swatch { width: 11px; height: 11px; border: 1px solid currentColor; border-radius: 3px; flex-shrink: 0; }
.confirmed { background: #142f45; color: #a1d6ff; border-color: #439bd8; }
.awaiting_deposit { background: #3c301a; color: #ffe099; border-color: #e1b14e; }
.cancelled { background: #34232f; color: #f6abb6; border-color: #a96476; }
.noshow, .completed { background: #272f41; color: #bdc5d9; border-color: #7f8ba6; }
.team-agenda { border-left-color: #b58bf6; }
.swatch.team-agenda { background: #42325d; color: #b58bf6; }
.google-busy { color: #8d97ad; background: repeating-linear-gradient(135deg, #293246 0 4px, #141c2d 4px 8px); }
.agenda-content { flex: 1; min-width: 0; border-left: 1px solid #2a3652; }
.agenda-feedback { display: flex; align-items: center; gap: 8px; padding: 6px 12px; min-height: 57px; border-bottom: 1px solid #2a3652; }
.agenda-feedback p { flex: 1; font-size: .8rem; margin: 0; }
.agenda-feedback button { font-size: .8rem; }
.week-scroll { overflow: auto; max-height: 690px; overscroll-behavior: contain; scrollbar-color: #445779 #10182b; }
.week-grid { display: flex; min-width: 680px; }
.time-axis { width: 55px; flex-shrink: 0; }
.day-heading { position: sticky; top: 0; z-index: 2; width: 100%; min-height: 58px; border: 0; border-bottom: 1px solid #34415c; border-radius: 0; background: #131e33; text-align: center; font-size: .8rem; }
.time-axis .day-heading { display: flex; align-items: center; justify-content: center; }
.week-day { flex: 1; min-width: 0; border-left: 1px solid #2a3652; }
.week-day.is-today { background: #152443; }
.is-today .day-heading { background: #233e6a; color: #c2dcff; box-shadow: inset 0 -3px #7cadff; }
.hour-labels { height: 1728px; display: grid; grid-template-rows: repeat(24, 72px); color: #a4adc8; font-size: .65rem; text-align: center; }
.hour-labels span { padding-top: 5px; }
.day-lanes { display: flex; min-height: 1728px; background: repeating-linear-gradient(to bottom, transparent 0 35px, #253049 35px 36px, transparent 36px 71px, #34415b 71px 72px); }
.booking-lane { flex: 1; min-width: 0; display: grid; grid-template-rows: repeat(1440, 1.2px); }
.appointment { width: 100%; text-align: left; border-left-width: 3px; padding: 7px; border-radius: 7px; overflow: hidden; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 4px; font-size: .75rem; margin: 0; }
.booking-lane .appointment { min-height: 44px; min-width: 0; margin: 0 2px; width: calc(100% - 4px); z-index: 1; align-self: stretch; }
.appointment:hover:enabled { filter: brightness(1.2); }
.appointment-time { font-size: .7rem; font-weight: 600; }
.appointment-meta { font-size: .68rem; opacity: .9; }
.booking-lane .cancelled strong { text-decoration: line-through; }
.booking-detail { width: 300px; flex-shrink: 0; padding: 18px; border-left: 1px solid #34415c; max-height: 800px; overflow-y: auto; }
.detail-heading { justify-content: space-between; }
.detail-heading h3, .detail-heading h2 { overflow-wrap: anywhere; margin: 0; }
.badge { display: inline-block; padding: 5px 9px; border: 1px solid; border-radius: 20px; font-size: .75rem; margin: 12px 0; }
.booking-detail dt { font-size: .75rem; color: #a4adc8; margin-top: 16px; }
.booking-detail dd { margin: 4px 0 0; font-size: .85rem; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.booking-detail h4 { margin-bottom: 5px; }
.booking-detail ul { font-size: .8rem; line-height: 1.5; padding-left: 18px; }
.detail-actions { display: grid; gap: 9px; margin-top: 24px; }
.day-pills { display: flex; gap: 6px; padding: 12px; overflow-x: auto; }
.day-pill { min-width: 62px; flex-shrink: 0; font-size: .8rem; }
.day-pill[aria-current="date"] { border-bottom: 3px solid #7cadff; }
.day-cards { display: grid; gap: 12px; padding: 16px; }
.day-cards .appointment { padding: 16px; font-size: .95rem; gap: 7px; min-height: 120px; }
.day-cards .appointment-time { font-size: .9rem; }
.day-cards .appointment-meta { font-size: .8rem; }
.empty-state { padding: 55px 20px; text-align: center; color: #b1bdd8; }
.empty-state h3 { color: #e8ecf8; }
dialog { color: #e8ecf8; background: #10192e; border: 1px solid #43567c; border-radius: 16px; width: min(540px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 24px; }
dialog::backdrop { background: #030815b8; }
.form-fields { display: grid; gap: 8px; }
.form-fields label { font-size: .85rem; margin-top: 14px; }
.form-fields input, .form-fields select, .form-fields textarea { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #465878; background: #0b1222; border-radius: 8px; }
.form-fields p, .form-fields small { font-size: .75rem; line-height: 1.5; margin: 3px 0; }
#save-booking { width: 100%; margin-top: 12px; }
.slot-taken { padding: 16px; border: 1px solid #b58c48; border-radius: 10px; background: #342b1d; margin: 15px 0; }
.slot-taken p { font-size: .8rem; }
#alternative-times { display: grid; gap: 8px; }
#alternative-times button { text-align: left; }
#detail-message, #form-message { font-size: .85rem; color: #ffdca2; }
.availability-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; margin: 20px 0; }
.settings-card, .setup-card { min-width: 0; padding: 22px; background: #10182b; border: 1px solid #2a3652; border-radius: 14px; }
.settings-card h3 { font-size: 1rem; margin: 0 0 12px; }
.settings-card p { font-size: .85rem; }
.settings-card .detail-heading { flex-wrap: wrap; }
.settings-card .detail-heading h3 { margin: 0; }
.settings-card .detail-heading > .muted { font-size: .75rem; }
.availability-toolbar { max-width: 440px; margin: 18px 0; }
.availability-toolbar label { margin-top: 0; }
.availability-toolbar p { margin: 2px 0; }
.hours-card { grid-column: 2; grid-row: 1 / span 2; }
.exceptions-card { grid-column: 1 / -1; }
.service-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 18px 0; border-bottom: 1px solid #2a3652; }
.service-row:last-child { border-bottom: 0; padding-bottom: 0; }
.service-info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.service-info h4 { display: inline; font-size: 1rem; margin: 0 8px 0 0; }
.service-info p { margin: 6px 0; }
.service-info .badge { margin: 0; color: #b9d1ff; border-color: #46618b; }
.service-duration { color: #b9d1ff; }
.service-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.weekday { padding: 16px 0; border-bottom: 1px solid #2a3652; }
.weekday:last-child { border-bottom: 0; }
.weekday legend { font-size: .95rem; margin-bottom: 4px; }
.day-switch { min-height: 44px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .85rem; }
.day-switch input { width: 22px; height: 22px; accent-color: #80aaff; margin: 0; }
.hours-range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin: 8px 0 12px; }
.hours-range .form-fields label { margin-top: 0; }
.hours-range .form-fields input { padding: 10px 8px; }
.hours-range button { font-size: .75rem; }
.day-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.weekday [role="status"] { margin: 8px 0 0; overflow-wrap: anywhere; }
.settings-values { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 12px; align-items: start; font-size: .85rem; margin: 22px 0; }
.settings-values dt { color: #a4adc8; }
.settings-values dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
#exception-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.exception-form button { margin-top: 12px; }
.exception-list { list-style: none; padding: 0; margin-bottom: 0; }
.exception-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid #2a3652; font-size: .85rem; overflow-wrap: anywhere; }
.exception-list li > div { min-width: 0; }
.exception-list p { margin: 6px 0 0; }
.connection-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid #2a3652; }
.notice { border-left: 3px solid #729de5; padding: 12px 14px; background: #172642; border-radius: 6px; line-height: 1.6; }
.setup-card { margin-bottom: 24px; border-color: #466a9d; background: #14223a; }
.setup-card h2 { margin-top: 0; }
.setup-steps { display: flex; flex-wrap: wrap; gap: 20px 38px; padding-left: 24px; margin: 24px 0; }
.setup-steps li { padding-left: 4px; line-height: 1.5; }
#save-service { width: 100%; margin-top: 12px; }
#availability-message, #service-form-message { overflow-wrap: anywhere; color: #ffdca2; }
@media (max-width: 1000px) {
  .availability-grid { grid-template-columns: minmax(0, 1fr); }
  .hours-card, .exceptions-card { grid-column: auto; grid-row: auto; }
}
@media (max-width: 700px) {
  .settings-card, .setup-card { padding: 16px; }
  #exception-controls { grid-template-columns: minmax(0, 1fr); }
  .hours-range { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hours-range button { grid-column: 1 / -1; justify-self: start; }
  .setup-steps { display: grid; gap: 16px; }
  .setup-card > button { width: 100%; }
  .service-actions { width: 100%; }
}
@media (max-width: 1150px) {
  .agenda-layout { flex-wrap: wrap; }
  .agenda-content { flex-basis: calc(100% - 188px); }
  .booking-detail { width: 100%; border-left: 0; border-top: 1px solid #34415c; }
}
.screen-placeholder { min-height: 230px; }
#maintenance { max-width: 650px; margin: 0 auto; text-align: center; padding: 20px 0 40px; }
.maintenance-art { display: block; width: min(100%, 480px); height: auto; margin: 0 auto; }
#duxels-owner-banner { margin: 0; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1500; padding: 8px 12px; text-align: center; background: #493719; color: #ffdf99; }
body[data-state="owner"] { padding-bottom: 42px; }
@media (max-width: 800px) {
  main { padding: 86px 20px 32px; }
  .session, .screen-placeholder { padding: 20px; }
}
@media (max-width: 700px) {
  main { padding: 86px 14px 30px; }
  #panel > .eyebrow, #panel > .muted { display: none; }
  #screen-title { font-size: 1.8rem; }
  .session { margin-bottom: 22px; }
  .agenda-heading { flex-wrap: wrap; gap: 14px; }
  .agenda-heading h2 { font-size: 1.2rem; }
  .agenda-heading .primary { width: 100%; }
  .agenda-toolbar { gap: 12px; }
  .agenda-toolbar h3 { order: -1; width: 100%; margin: 0; }
  .period-controls { margin-right: auto; }
  .view-controls { gap: 2px; }
  .view-controls button { padding: 8px; font-size: .85rem; }
  .agenda-sidebar { width: 100%; padding: 14px; }
  .agenda-sidebar legend { margin: 0; }
  #agenda-filters { display: flex; flex-wrap: wrap; gap: 0 18px; }
  .status-legend { display: none; }
  .agenda-content { flex-basis: 100%; border-left: 0; border-top: 1px solid #2a3652; }
  .booking-detail { position: fixed; inset: 72px 0 0; width: 100%; z-index: 1400; background: #10192e; max-height: none; padding: 20px 20px 60px; overscroll-behavior: contain; }
  .booking-detail .detail-heading { position: sticky; top: -20px; padding: 8px 0; background: #10192e; }
  .booking-detail dd { font-size: 1rem; }
  .day-cards { padding: 12px; }
  dialog { padding: 18px; }
}
