.commission-filter,.report-period-filter{display:flex;align-items:end;gap:12px;margin-bottom:18px;padding:16px;flex-wrap:wrap}
.order-period-filter{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:14px;padding:14px 16px}.order-single-date,.order-range-date{display:flex;align-items:end;gap:9px}.order-period-filter label{display:flex;flex-direction:column;gap:7px;min-width:155px;color:var(--muted);font-size:12px}.order-period-filter input{height:44px;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:11px;padding:0 13px}.order-single-date>.secondary-button:first-child,.order-single-date>.secondary-button:nth-child(3){width:44px;padding:0;font-size:20px}
.order-range-toggle{display:none}
input[type="date"]{background-position:right 14px center;background-repeat:no-repeat;background-size:17px 17px;padding-right:42px}input[type="date"]::-webkit-calendar-picker-indicator{opacity:0;cursor:pointer;width:24px;height:24px}body:not(.light) input[type="date"]{color-scheme:dark;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23e8e8ef' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E")}.light input[type="date"]{color-scheme:light;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2322272f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E")}
.icon-sprite{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}.sidebar nav{gap:4px;margin-top:16px;overflow-y:auto;scrollbar-width:none}.sidebar nav::-webkit-scrollbar{display:none}.nav-item{min-height:50px;flex-direction:column;gap:3px;padding:5px 2px}.nav-item .nav-icon{width:21px;height:21px;display:grid;place-items:center;font-size:0}.nav-item .nav-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.nav-item b{display:block;font-size:8.5px;line-height:1.05;font-weight:700;letter-spacing:.01em;white-space:nowrap}.nav-item.active:before{height:30px}.settings{flex:none;margin-top:5px}
.commission-filter label,.report-period-filter label{min-width:175px;flex:1;color:var(--muted);font-size:12px}
.commission-filter input,.commission-filter select,.report-period-filter input{display:block;width:100%;height:44px;margin-top:7px;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:11px;padding:0 13px}
.commission-overview,.commission-detail{margin-top:16px}.commission-detail h4{margin:22px 0 10px}.commission-detail td small{display:block;color:var(--muted);margin-top:4px}.commission-net{font-size:20px}
.commission-total{display:flex;gap:12px;align-items:center;justify-content:flex-end;flex-wrap:wrap;margin-top:18px;padding-top:16px;border-top:1px solid var(--border)}
.commission-total span,.commission-total strong{padding:10px 14px;border-radius:10px;background:var(--surface2)}
.adjustment-row{grid-template-columns:42px minmax(180px,1fr) auto auto auto;align-items:center;gap:12px}
.period-presets{display:flex;gap:8px;flex-wrap:wrap}.period-presets button{border:1px solid var(--border);background:var(--surface2);color:var(--text);border-radius:10px;padding:11px 14px;cursor:pointer}.period-presets button.active{background:var(--purple);border-color:var(--purple);color:#fff}
.date-time-label{grid-column:span 2}.date-time-pickers{display:grid;grid-template-columns:minmax(220px,1fr) 120px auto;gap:8px;margin-top:7px}.date-time-pickers select{width:100%;height:44px;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:11px;padding:0 13px}
.today-chip{border:1px solid var(--border);background:var(--surface2);color:var(--text);border-radius:10px;padding:0 14px;cursor:pointer}.today-chip.active{border-color:var(--purple);color:var(--purple2);background:rgba(121,86,255,.12)}.order-date-hint{display:block;color:var(--purple2);margin-top:6px}
.money-positive{color:var(--green)!important}.money-negative{color:var(--red)!important}
.order-row-actions{display:flex;flex-wrap:wrap;gap:4px;min-width:130px}.main-order-service{margin-bottom:5px}.added-service-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:5px;padding-top:5px;border-top:1px dashed var(--border)}.added-service-row>span{min-width:0}.added-service-label{display:inline-block;margin-left:6px;padding:2px 5px;border-radius:5px;background:rgba(118,87,255,.12);color:var(--purple2);font-size:9px}.cancel-added-service{border:0;background:transparent;color:var(--red);font-size:10px;font-weight:800;padding:4px;white-space:nowrap}.cancel-added-service:hover{text-decoration:underline}.order-service-summary{display:flex;flex-direction:column;gap:4px;padding:13px;border:1px solid var(--border);border-radius:11px;background:var(--surface2)}.order-service-summary span{color:var(--muted);font-size:12px}.existing-services{display:grid;gap:8px}.existing-services>p{margin:0}.existing-services>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface2)}.existing-services>div>span{display:flex;flex-direction:column;gap:4px}.existing-services small{color:var(--muted)}.half-leave{border-bottom:2px solid var(--red)}
.select-column{width:46px;min-width:46px;text-align:center!important;padding-left:12px!important;padding-right:8px!important}.select-column input{width:17px;height:17px;accent-color:var(--purple)}
.inactive-team-panel{margin-top:18px}.inactive-team-panel .panel-head{margin-bottom:8px}.inactive-team-panel .panel-head p:last-child{margin-top:6px}.inactive-team-panel table{min-width:720px}.inactive-team-panel td:first-child{font-weight:750}
.customer-search-field{position:relative;z-index:12}.customer-suggestions{position:absolute;z-index:100;top:100%;left:0;right:0;margin-top:5px;max-height:250px;overflow-y:auto;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:0 18px 42px rgba(0,0,0,.3)}.customer-suggestion{width:100%;display:grid;grid-template-columns:1fr auto;gap:3px 12px;padding:11px 13px;border:0;border-bottom:1px solid var(--border);background:transparent;color:var(--text);text-align:left}.customer-suggestion:last-child{border-bottom:0}.customer-suggestion:hover,.customer-suggestion.active{background:rgba(118,87,255,.14)}.customer-suggestion b{font-size:13px}.customer-suggestion span{color:var(--muted);font-size:11px}.customer-suggestion small{grid-column:1/-1;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.customer-suggestion-empty{display:block;padding:12px 13px;color:var(--muted);font-size:12px}
.schedule-booking.has-conflict{box-shadow:0 0 0 1px rgba(255,183,93,.7),0 5px 18px rgba(0,0,0,.22)}
.schedule-booking.is-completed{border-color:#707681;background:linear-gradient(145deg,rgba(128,135,147,.34),rgba(92,99,110,.2));opacity:.9}.schedule-booking.is-past b{color:var(--muted)}.schedule-booking .booking-status{margin-top:auto;color:var(--muted);font-size:9px;font-style:normal;font-weight:800}.schedule-booking.is-unpaid .booking-status{color:var(--red)}.light .schedule-booking.is-completed{border-color:#a8adb6;background:linear-gradient(145deg,#e5e7eb,#d7dbe1)}.light .schedule-booking.is-paid .booking-status{color:#4f5665}.light .schedule-booking.is-unpaid .booking-status{color:#c53652}
.calendar-person-head{display:flex!important;min-width:0;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px}.calendar-person-head.head-off{background:rgba(255,99,125,.09)}.calendar-person-head.head-off small,.calendar-person-head.head-leave small{color:var(--red)}.availability-select{width:100%;height:25px;border:1px solid var(--border);border-radius:7px;background:var(--surface);color:var(--text);padding:0 6px;font-size:9px}.availability-select:disabled{opacity:.55}.weekly-off-column{z-index:2;margin:2px;display:grid;place-items:center;text-align:center;color:var(--red);font-size:11px;font-weight:800;background:repeating-linear-gradient(135deg,rgba(255,99,125,.05),rgba(255,99,125,.05) 8px,rgba(255,99,125,.14) 8px,rgba(255,99,125,.14) 16px);pointer-events:none}.light .calendar-person-head.head-off{background:#fff0f2}.light .weekly-off-column{background:repeating-linear-gradient(135deg,#fff7f8,#fff7f8 8px,#ffe7eb 8px,#ffe7eb 16px)}
.calendar-slot-cell{position:relative;padding:0}.calendar-add-slot{position:absolute;z-index:1;inset:0;width:100%;border:0;background:transparent;color:var(--purple2);opacity:.22;display:grid;place-items:center;transition:background .15s,opacity .15s}.calendar-add-slot span{width:24px;height:24px;display:grid;place-items:center;border:1px solid transparent;border-radius:8px;font-size:19px;line-height:1}.calendar-add-slot:hover,.calendar-add-slot:focus-visible{opacity:1;background:rgba(118,87,255,.08);outline:0}.calendar-add-slot:hover span,.calendar-add-slot:focus-visible span{border-color:rgba(154,133,255,.5);background:rgba(118,87,255,.14)}.slot-locked{background:rgba(255,99,125,.025)}.light .calendar-add-slot{color:#6247d7}.light .calendar-add-slot:hover,.light .calendar-add-slot:focus-visible{background:#f1edff}@media(pointer:coarse){.calendar-add-slot{opacity:.42}}
.schedule-booking .booking-address{display:block;width:100%;min-width:0;margin-top:3px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.schedule-booking .booking-note{display:block;width:100%;min-width:0;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.light .schedule-booking .booking-address,.light .schedule-booking .booking-note{color:#555d6b}
.service-drag-handle{display:inline-flex;align-items:center;justify-content:center;width:26px;margin-right:8px;color:var(--muted);font-size:18px;line-height:1;cursor:grab;user-select:none;vertical-align:middle}.service-sort-row{transition:opacity .15s ease,background .15s ease}.service-sort-row.is-dragging{opacity:.42}.service-sort-row.drag-target{background:rgba(117,79,255,.12)}.service-sort-row.drag-target td:first-child{box-shadow:inset 4px 0 0 var(--purple)}
.order-table-wrap table{min-width:1220px}.order-table-wrap th:nth-child(2){width:90px}.order-table-wrap th:nth-child(3){width:130px}.order-table-wrap th:nth-child(4){width:115px}.order-table-wrap th:nth-child(5){width:230px}.order-table-wrap th:nth-child(6){width:190px}.order-table-wrap th:nth-child(7){width:90px}.order-address{min-width:190px;max-width:250px;line-height:1.45;white-space:normal;overflow-wrap:anywhere}.past-order .order-customer-name{color:var(--muted);font-weight:700}.calendar-shell,.order-table-wrap{touch-action:pan-x pan-y}.calendar-shell.is-pinching,.order-table-wrap.is-pinching{scroll-snap-type:none;user-select:none}
.stock-history-title{margin:0;padding:34px 0 14px;font-size:16px}
.stock-report-item{border:0;background:transparent;color:var(--purple2);font:inherit;font-weight:800;padding:0;text-align:left;cursor:pointer}.stock-report-item:hover{text-decoration:underline}.selected-stock-row{background:rgba(118,87,255,.07)}
.stock-detail-placeholder{margin-top:26px;padding:22px;border:1px dashed var(--border);border-radius:13px;color:var(--muted);text-align:center}
.stock-item-detail{scroll-margin-top:20px;margin-top:28px;padding:20px;border:1px solid rgba(118,87,255,.35);border-radius:15px;background:rgba(118,87,255,.045)}.stock-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.stock-detail-head h3{margin:4px 0 0;font-size:20px}.stock-detail-period{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:18px 0 14px}.stock-detail-period label{display:flex;min-width:180px;flex-direction:column;gap:6px;color:var(--muted);font-size:11px}.stock-detail-period input{width:100%;height:42px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);padding:0 12px}.stock-opening-balance{margin:0 0 14px;padding:11px 13px;border-radius:10px;background:var(--surface2);color:var(--muted)}.stock-opening-balance b{color:var(--text)}
body.light{--muted:#4f5665;--purple2:#6247d7;--green:#087a55;--red:#c53652;--orange:#9a5a00;color:var(--text)}.light .nav-item{color:#626978}.light .nav-item:hover,.light .nav-item.active{color:#5b3fd6;background:#eee9ff}.light dialog,.light .date-popover{background:#fff;box-shadow:0 24px 70px rgba(25,29,38,.18)}.light dialog::backdrop{background:rgba(29,33,42,.35)}.light .calendar-head .time-col,.light .cal-time{background:#f7f8fa}.light .calendar-shell{scrollbar-color:#a9afbb #edf0f4}.light .calendar-shell::-webkit-scrollbar-track{background:#edf0f4}.light .calendar-shell::-webkit-scrollbar-thumb{background:#a9afbb;border-color:#edf0f4}.light .schedule-booking span,.light .schedule-booking small,.light .schedule-booking em{color:#343a46}.light .schedule-booking strong{color:#17191f}.light .detail-grid span,.light .payment-receipt,.light .service-check{background:#f7f8fa}.light input::placeholder,.light textarea::placeholder{color:#737a88;opacity:1}.light .status.success{color:#087a55;background:#dff5ec}.light .status.pending{color:#865000;background:#fff0d9}.light .status.danger{color:#b62745;background:#ffe5eb}.light .status.entrusted{color:#135f9c;background:#e3f2ff}.light .payment-info{color:#135f9c!important;background:#e3f2ff}.light .storage-warning{color:#7b4900;background:#fff4df}.light .trend{color:#087a55;background:#dff5ec}.light .text-button,.light .order-date-hint,.light .picker-today{color:#5b3fd6}.light .report-card:hover{border-color:#858c99}
@media(max-width:980px){.order-period-filter{align-items:stretch;flex-direction:column}.order-single-date,.order-range-date{width:100%;flex-wrap:wrap}.order-period-filter label{flex:1}}
@media(max-width:760px){.commission-filter,.report-period-filter{align-items:stretch}.commission-filter label,.report-period-filter label{min-width:140px}.order-single-date,.order-range-date{align-items:stretch}.order-period-filter label{flex-basis:100%;min-width:0}.order-single-date .secondary-button:last-child,.order-range-date .primary-button{flex:1}.date-time-label{grid-column:1/-1}.date-time-pickers{grid-template-columns:1fr 100px}.today-chip{grid-column:1/-1;min-height:42px}.adjustment-row{grid-template-columns:38px 1fr}.adjustment-row>*:not(:first-child):not(:nth-child(2)){grid-column:2}.stock-item-detail{padding:15px}.stock-detail-head{flex-direction:column}.stock-detail-period{align-items:stretch}.stock-detail-period label,.stock-detail-period button{width:100%;min-width:0}}
.payment-order{border-color:rgba(117,82,255,.45)!important;color:var(--purple)!important;white-space:nowrap}
.payment-order-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px 16px;margin:0 0 18px;border:1px solid var(--border);border-radius:14px;background:var(--surface2)}
.payment-order-summary div{display:flex;flex-direction:column;gap:4px}.payment-order-summary span{font-size:12px;color:var(--muted)}
.payment-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.payment-fields[hidden]{display:none}.payment-info{margin:0;color:var(--muted);font-size:13px}
.bar-value{position:absolute;z-index:2;left:50%;bottom:calc(var(--bar-height,0%) + 5px);transform:translateX(-50%);color:var(--text);font-size:9px;line-height:1;white-space:nowrap}.therapist-receipt-fields{padding:14px;border:1px solid rgba(118,87,255,.3);border-radius:12px;background:rgba(118,87,255,.06)}
.payment-total{display:grid;grid-template-columns:1fr auto;gap:9px 20px;padding:15px 17px;margin-top:18px;border:1px solid rgba(117,82,255,.35);border-radius:14px;background:rgba(117,82,255,.08)}
.payment-total span{color:var(--muted);font-size:13px}.payment-total strong{text-align:right}.payment-total strong:last-child{color:var(--purple)}
.proof-input span{display:flex;align-items:center;gap:7px;margin-top:7px;font-size:12px;color:var(--muted)}.proof-input span input{width:auto}
@media(max-width:700px){.payment-order-summary,.payment-fields{grid-template-columns:1fr}}
input[type="date"]{background-image:none!important;padding-right:14px!important}input[type="date"]::-webkit-calendar-picker-indicator{opacity:1!important;cursor:pointer!important;width:18px;height:18px;filter:none!important}body:not(.light) input[type="date"]{color-scheme:dark}.light input[type="date"]{color-scheme:light}
.mobile-menu-dialog{display:none}.mobile-nav svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:720px){html{overscroll-behavior:none}body{font-size:14px;-webkit-tap-highlight-color:transparent}body.mobile-menu-open{overflow:hidden}button,a,input,select,textarea{touch-action:manipulation}input,select,textarea{font-size:16px!important}.topbar{padding-top:env(safe-area-inset-top);height:calc(68px + env(safe-area-inset-top))}main{padding-top:calc(91px + env(safe-area-inset-top));padding-bottom:calc(94px + env(safe-area-inset-bottom))}.mobile-nav{height:calc(68px + env(safe-area-inset-bottom));backdrop-filter:none;background:#111318}.light .mobile-nav{background:#fff}.mobile-nav button{min-width:0;min-height:48px}.mobile-nav button:not(#mobileAdd)>span{display:grid;place-items:center}.mobile-nav #mobileAdd span{margin-top:-14px}.panel{border-radius:14px}.section-toolbar{gap:12px}.section-toolbar .toolbar-actions{width:100%;margin-left:0;flex-wrap:wrap}.section-toolbar .toolbar-actions>.primary-button,.section-toolbar .toolbar-actions>.secondary-button{min-height:44px}.filter-row{gap:8px}.filter-row input,.filter-row select,.filter-row button{width:100%;min-width:0;min-height:44px}.order-period-filter{padding:12px}.order-single-date,.order-range-date{display:grid;grid-template-columns:44px 1fr 44px;gap:8px}.order-single-date label,.order-range-date label{grid-column:1/-1}.order-single-date .secondary-button:last-child,.order-range-date .primary-button{grid-column:1/-1;width:100%}.order-range-date{grid-template-columns:1fr}.metrics,.metrics.compact{grid-template-columns:1fr 1fr}.metric-card{min-width:0}.metric-card p,.metric-card small{overflow-wrap:anywhere}.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin}.table-wrap table{min-width:760px}.calendar-head,.calendar-body{min-width:880px}.calendar-shell{border-radius:12px;scroll-snap-type:x proximity}.calendar-person-head{scroll-snap-align:start}.schedule-booking:hover{transform:none;filter:none}dialog{width:100%;max-width:none;height:100%;max-height:none;margin:0;border:0;border-radius:0;padding-top:env(safe-area-inset-top)}dialog form,.info-dialog{padding:18px 16px calc(24px + env(safe-area-inset-bottom))}.modal-head{position:sticky;z-index:5;top:0;margin:-18px -16px 18px;padding:18px 16px 12px;background:var(--surface);border-bottom:1px solid var(--border)}.modal-actions{position:sticky;z-index:4;bottom:0;margin:18px -16px calc(-24px - env(safe-area-inset-bottom));padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--border)}.modal-actions button{min-height:46px;flex:1}.mobile-menu-dialog:not([hidden]){position:fixed;top:0;right:0;bottom:0;left:0;z-index:1200;display:flex;align-items:flex-end;width:100%;height:100%;margin:0;background:rgba(0,0,0,.58);padding:0;overscroll-behavior:contain}.mobile-menu-sheet{width:100%;padding:20px 16px calc(22px + env(safe-area-inset-bottom));border:1px solid var(--border);border-width:1px 0 0;border-radius:22px 22px 0 0;background:var(--surface);box-shadow:none}.mobile-menu-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:16px}.mobile-menu-head h2{margin:3px 0 0}.mobile-menu-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.mobile-menu-grid button{min-height:76px;border:1px solid var(--border);border-radius:13px;background:var(--surface2);color:var(--text);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;font-size:11px;font-weight:750}.mobile-menu-grid button svg{width:23px;height:23px;fill:none;stroke:var(--purple2);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.mobile-menu-grid button:active{background:rgba(118,87,255,.14)}.toast{transition:opacity .18s,transform .18s}}
@media(max-width:420px){.metrics,.metrics.compact{grid-template-columns:1fr}.mobile-menu-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.commission-filter,.report-period-filter{display:grid;grid-template-columns:1fr}.commission-filter>* ,.report-period-filter>*{width:100%;min-width:0}.team-grid{grid-template-columns:1fr}.reminder-summary{padding:13px}.panel{padding:15px}}
@media(max-width:720px){.mobile-nav button{line-height:1;overflow:visible}.mobile-nav button small{display:none}.mobile-nav button:not(#mobileAdd)>span{width:24px;height:24px;flex:0 0 24px}.mobile-nav button:not(#mobileAdd)>span svg{display:block;width:22px;height:22px}.mobile-nav button::after{content:attr(data-label);display:block;position:relative;z-index:2;min-height:12px;font-size:10px;line-height:12px;color:inherit}}

/* Android compact layout: predictable hierarchy, 48px touch targets, and tidy overflow. */
@media(max-width:720px){
  html,body{max-width:100%;overflow-x:hidden}
  body{font-size:13px;line-height:1.42}
  .topbar{height:60px;padding-left:14px;padding-right:14px}
  .topbar h1{font-size:17px;line-height:1.2}
  .top-actions .primary-button{width:36px;height:36px;border-radius:10px;padding:0}
  main{padding:76px 12px calc(108px + env(safe-area-inset-bottom))}
  .view{min-width:0;max-width:100%;overflow-x:hidden}
  .view.active{animation:none}
  .welcome-row,.section-toolbar{margin-bottom:14px;gap:10px}
  .section-toolbar{flex-direction:column;align-items:stretch}
  .section-toolbar>div:first-child{min-width:0}
  .view:not(#dashboard):not(#calendar) .section-toolbar h2{display:none}
  .view:not(#dashboard):not(#calendar) .section-toolbar .muted{font-size:11px;line-height:1.35}
  .welcome-row h2,.section-toolbar h2{margin:2px 0 4px;font-size:21px;line-height:1.18;letter-spacing:-.02em}
  .eyebrow,.panel-kicker{font-size:9px;line-height:1.25;margin-bottom:4px}
  .muted{font-size:12px;line-height:1.42}
  .panel{padding:14px;border-radius:14px;box-shadow:none}
  .panel-head{margin-bottom:13px;gap:8px}
  .panel h3,.panel-head h3{font-size:15px;line-height:1.28}
  .primary-button,.secondary-button,.icon-button,.danger-button{min-height:48px;height:48px;border-radius:11px;padding:0 13px;font-size:12px}
  .section-toolbar .toolbar-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .section-toolbar .toolbar-actions>.primary-button,.section-toolbar .toolbar-actions>.secondary-button{width:100%;min-width:0;white-space:normal;line-height:1.2}
  .section-toolbar .toolbar-actions>.secondary-button{display:inline-flex;align-items:center;justify-content:center}
  .metrics,.metrics.compact{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}
  .metrics>.metric-card:last-child:nth-child(odd){grid-column:1/-1}
  .metric-card{min-height:92px;padding:12px;border-radius:13px}
  .metric-card p{margin-bottom:7px;font-size:11px;line-height:1.28}
  .metric-card strong{font-size:19px;line-height:1.15;margin-bottom:7px}
  .metric-card small{font-size:10px;line-height:1.3}
  .dashboard-grid,.dashboard-grid.two{grid-template-columns:1fr;gap:10px}
  .report-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .settings-grid{gap:9px}
  .report-card{min-height:76px;padding:13px;grid-template-columns:38px minmax(0,1fr) 16px;gap:11px;border-radius:13px}
  .report-card>span{width:38px;height:38px;border-radius:10px;font-size:18px}
  .report-card h3{font-size:14px;line-height:1.25;margin-bottom:3px}
  .report-card p{font-size:10px;line-height:1.35}
  .team-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .team-card{min-width:0;padding:13px;border-radius:13px}
  .team-card>span{width:38px;height:38px;border-radius:11px;font-size:12px}
  .team-card h3{margin:12px 0 3px;font-size:14px;line-height:1.25;overflow-wrap:anywhere}
  .team-card>p{margin-bottom:12px;font-size:11px;line-height:1.35}
  .team-card>div{gap:4px;padding-top:11px;font-size:11px;overflow-wrap:anywhere}
  .team-card em{margin-top:8px;font-size:9px}
  .team-card .skills{display:block;max-width:100%;padding:10px 0 0;border-top:1px solid var(--border);font-size:10px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .team-card .table-action{display:block;width:100%;min-height:40px;margin:10px 0 0;white-space:normal}
  .filter-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:11px}
  .filter-row input{grid-column:1/-1}
  .filter-row input,.filter-row select,.filter-row button{height:48px;font-size:13px!important}
  .filter-row button:last-child:nth-child(odd){grid-column:1/-1}
  .table-wrap{width:calc(100% + 28px);max-width:calc(100% + 28px);margin-left:-14px;margin-right:-14px;border-radius:0;overflow-x:auto;overscroll-behavior-x:contain}
  .table-wrap table{min-width:700px}
  .order-table-wrap table{min-width:1220px}
  th,td{padding:13px 14px;font-size:11px;line-height:1.35;vertical-align:top}
  th{font-size:9px;white-space:nowrap}
  .table-action{min-height:40px;padding:7px 10px}

  .payment-reminder{margin-bottom:10px}
  .reminder-summary,.reminder-clear{padding:11px 12px;border-radius:13px;gap:10px}
  .reminder-summary>span,.reminder-clear>span{width:34px;height:34px;border-radius:9px}
  .reminder-summary h3{font-size:14px;line-height:1.3;margin:1px 0 2px}
  .reminder-summary small,.reminder-clear small{font-size:10px;line-height:1.35}
  .reminder-summary small{display:none}
  .reminder-summary{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:start}
  .reminder-summary>span{grid-column:1;grid-row:1 / span 2}
  .reminder-summary>div{grid-column:2;min-width:0}
  .reminder-summary .secondary-button{grid-column:2;justify-self:start;width:auto;min-height:38px;height:38px;padding:0 12px;font-size:10px}
  .reminder-list{display:flex;gap:12px;margin-top:9px;overflow-x:auto;padding:0 8px 5px 0;scroll-snap-type:none;-webkit-overflow-scrolling:touch}
  .reminder-order{min-width:220px;max-width:270px;flex:0 0 76%;padding:10px 12px;scroll-snap-align:start}
  .reminder-order b{font-size:12px}
  .reminder-order span,.reminder-order small{font-size:10px}

  .order-period-filter{display:block;padding:12px;margin-bottom:11px}
  .order-single-date{display:grid;grid-template-columns:48px minmax(0,1fr) 48px 72px;gap:8px;align-items:end;width:100%}
  #orderPrevDate{grid-column:1;grid-row:1}
  .order-single-date label{grid-column:2;grid-row:1;min-width:0}
  #orderNextDate{grid-column:3;grid-row:1}
  #orderTodayDate{grid-column:4;grid-row:1;width:100%;height:48px;min-height:48px;padding:0 6px}
  .order-single-date>.secondary-button:first-child,.order-single-date>.secondary-button:nth-child(3){width:48px;height:48px;min-height:48px;font-size:20px;padding:0}
  .order-period-filter label{gap:5px;font-size:10px;line-height:1.25}
  .order-period-filter label,.order-period-filter input{min-width:0;max-width:100%}
  .order-period-filter input{width:100%;height:48px;padding:0 9px;font-size:13px!important}
  .order-range-toggle{display:flex;align-items:center;justify-content:center;width:100%;height:40px;min-height:40px;margin-top:8px;font-size:10px}
  .order-range-date{display:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}
  .order-range-date.is-open{display:grid}
  .order-range-date label{grid-column:auto;min-width:0}
  .order-range-date .primary-button{grid-column:1/-1;width:100%;height:44px;min-height:44px}

  .report-period-filter,.commission-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;column-gap:10px;row-gap:12px;padding:12px;margin-bottom:12px}
  .report-period-filter .period-presets{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .period-presets button{min-width:0;min-height:42px;padding:7px 5px;font-size:10px;line-height:1.2}
  .report-period-filter label,.commission-filter label{width:auto;min-width:0;max-width:100%;font-size:10px;line-height:1.25;overflow:hidden}
  .report-period-filter input,.commission-filter input,.commission-filter select{display:block;width:100%;min-width:0;max-width:100%;height:48px;margin-top:5px;padding:0 9px;font-size:13px!important}
  .report-period-filter>.primary-button{grid-column:1/-1;width:100%;height:44px;min-height:44px}
  .commission-filter label:nth-of-type(3),.commission-filter>.primary-button{grid-column:1/-1}
  .commission-filter label:nth-of-type(3){margin-top:2px}
  .commission-filter>.primary-button{width:100%;height:44px;min-height:44px}

  .date-time-pickers{display:grid;grid-template-columns:minmax(0,1fr) 78px 70px;gap:8px}
  .date-time-pickers>*{min-width:0;max-width:100%}
  .date-time-pickers select{height:48px;padding:0 9px;font-size:13px!important}
  .today-chip{grid-column:auto;min-height:48px;height:48px;padding:0 6px;font-size:11px}

  #calendar .section-toolbar{display:flex;flex-direction:column;align-items:stretch;gap:10px}
  #calendar .section-toolbar>div:first-child{min-width:0}
  #calendar .section-toolbar .muted{display:none}
  #calendar .calendar-controls{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;gap:8px;width:100%;margin:0}
  #calendar .calendar-controls .date-arrow{display:block;width:48px;height:48px;padding:0;font-size:20px}
  #calendar .calendar-controls .date-picker-wrap{min-width:0}
  #calendar .calendar-controls #todayButton{width:100%;height:48px;min-width:0;padding:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #calendar .calendar-controls .primary-button{grid-column:1/-1;width:100%;height:44px;min-height:44px}
  .calendar-status{min-height:58px;margin-bottom:10px;padding:11px 12px;border-radius:12px;align-items:center}
  .calendar-status>div{min-width:0;gap:12px}
  .calendar-status p{min-width:0;gap:3px}
  .calendar-status b{display:block;font-size:12px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .calendar-status small{display:block;font-size:9px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .calendar-date-icon{width:32px;height:32px;border-radius:9px;font-size:15px;flex:0 0 auto}
  .calendar-status .text-button{max-width:84px;font-size:9px;line-height:1.25;text-align:right}
  .calendar-shell{margin-left:-12px;margin-right:-12px;max-height:calc(100vh - 300px);border-radius:0;border-left:0;border-right:0;scroll-snap-type:none;scrollbar-width:thin}
  .calendar-head,.calendar-body{min-width:0}
  .calendar-head>div{padding:9px 8px;min-height:74px}
  .calendar-head .time-col{padding:10px 6px;font-size:10px}
  .calendar-person-head{gap:2px;justify-content:flex-start}
  .calendar-person-head b{max-width:100%;font-size:11px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .calendar-person-head small{max-width:100%;min-height:21px;font-size:8px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .availability-select{height:30px;padding:0 4px;font-size:9px!important}
  .cal-cell{padding:5px}
  .cal-time{padding:7px 5px;font-size:9px}
  .calendar-add-slot{min-width:44px;min-height:44px}
  .calendar-add-slot span{width:25px;height:25px;font-size:17px}
  .schedule-booking{margin:2px 3px;padding:5px 6px;gap:1px;border-radius:8px;box-shadow:none}
  .schedule-booking b{font-size:10px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .schedule-booking span,.schedule-booking small,.schedule-booking em{font-size:8px;line-height:1.25}
  .schedule-booking strong{font-size:9px;line-height:1.25}
  .schedule-booking em.booking-address{display:block}
  .schedule-booking em.booking-note{display:none}
  .schedule-booking .booking-status{font-size:8px}
  .leave-column,.weekly-off-column{font-size:9px;line-height:1.35;padding:7px;text-align:center}

  #services .section-toolbar{padding-top:5px;gap:13px}
  #services .section-toolbar .muted{padding-bottom:2px;line-height:1.5}
  #services .table-wrap table{min-width:820px}
  #services .service-sort-row td:first-child{display:flex;align-items:flex-start;gap:10px;min-width:330px;line-height:1.45}
  #services .service-drag-handle{flex:0 0 24px;width:24px;margin:0;padding-top:1px}
  #services .service-sort-row td:first-child b{display:block;min-width:0;overflow-wrap:anywhere}

  #expenseList .adjustment-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:start;gap:10px 12px;padding:16px 0}
  #expenseList .adjustment-row>span:first-child{grid-column:1;grid-row:1 / span 3}
  #expenseList .adjustment-row>p{grid-column:2 / 4;grid-row:1;gap:5px}
  #expenseList .adjustment-row>.status{grid-column:2;grid-row:2;justify-self:start;margin:0}
  #expenseList .adjustment-row>strong{grid-column:3;grid-row:2;align-self:center;white-space:nowrap}
  #expenseList .adjustment-row>.table-action{grid-column:2 / 4;grid-row:3;width:100%;margin:2px 0 0}

  .mobile-nav{left:0;right:0;width:auto;max-width:100%;grid-template-columns:repeat(5,minmax(0,1fr));overflow:hidden}
  .mobile-nav button{width:100%;min-width:0;padding-left:0;padding-right:0}
  .role-matrix{width:100%;max-width:100%;overflow-x:hidden}
  .role-row{min-width:0;grid-template-columns:minmax(118px,1.5fr) repeat(4,minmax(52px,1fr));font-size:10px}
  .role-row>*{min-width:0;padding:10px 4px;overflow-wrap:anywhere}
  .role-head{font-size:8px}

  dialog:not(.mobile-menu-dialog) form,.info-dialog{padding:14px 14px calc(18px + env(safe-area-inset-bottom))}
  .modal-head{margin:-14px -14px 13px;padding:13px 14px 10px}
  .modal-head h2{font-size:20px;line-height:1.2}
  .close-button{width:40px;height:40px}
  .form-grid{gap:12px}
  .form-grid>*{min-width:0;max-width:100%}
  .form-grid label{gap:5px;font-size:11px}
  .form-grid input,.form-grid select{width:100%;min-width:0;max-width:100%;height:48px}
  .form-grid textarea{min-height:72px;padding-top:10px}
  .date-time-pickers{width:100%;max-width:100%;overflow:hidden;grid-template-columns:minmax(0,1fr) 72px 64px}
  .date-time-pickers select{-webkit-appearance:none;appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 10px) 50%,calc(100% - 6px) 50%;background-size:4px 4px,4px 4px;background-repeat:no-repeat;padding-right:20px!important;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
  .modal-summary{margin-top:13px;padding:12px;font-size:13px}
  .modal-actions{margin:14px -14px calc(-18px - env(safe-area-inset-bottom));padding:10px 14px calc(10px + env(safe-area-inset-bottom));gap:8px}
  .modal-actions button{min-width:0;padding-left:8px;padding-right:8px;font-size:11px;white-space:normal;line-height:1.2}
  .payment-fieldset{padding:12px;margin-top:2px}
  .payment-fields{gap:11px;margin-top:12px;padding-top:12px}
  .mobile-menu-grid{gap:7px}
  .mobile-menu-grid button{min-height:68px;font-size:10px}
  .toast{left:18px;right:18px;bottom:78px;padding:10px 12px;border-radius:10px;font-size:11px;line-height:1.35;box-shadow:0 8px 24px rgba(0,0,0,.28)}
}

@media(max-width:380px){
  main{padding-left:10px;padding-right:10px}
  .calendar-shell{margin-left:-10px;margin-right:-10px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Application preferences */
.setting-control{display:flex;align-items:center;gap:10px;margin-top:18px}.setting-control select,.category-add input{min-width:0;height:44px;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--text);padding:0 13px}.setting-control select{flex:1}.front-menu-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:16px}.front-menu-choice{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 10px;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--text);font-size:12px}.front-menu-choice:has(input:checked){border-color:var(--purple);background:rgba(118,87,255,.12)}.front-menu-choice input{width:17px;height:17px;margin:0}.front-menu-choice svg{width:19px;height:19px;fill:none;stroke:var(--purple2);stroke-width:1.8}.category-list{display:flex;flex-wrap:wrap;gap:7px;margin:15px 0}.category-chip{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:5px 7px 5px 11px;border:1px solid var(--border);border-radius:999px;background:var(--surface);font-size:11px}.category-chip button{display:grid;place-items:center;width:22px;height:22px;padding:0;border:0;border-radius:50%;background:var(--surface2);color:var(--muted);font-size:16px}.category-add{display:flex;gap:8px}.category-add input{flex:1}.mobile-menu-empty{grid-column:1/-1;margin:8px 0;color:var(--muted);text-align:center;font-size:12px}

@media(max-width:720px){
  .topbar{align-items:center;padding-left:12px;padding-right:10px}
  .topbar>div:first-child{min-width:0}
  .topbar h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .top-actions .quick-expense-button{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:0;height:38px;margin:7px 0 7px 10px;padding:0 11px;border-radius:10px;font-size:10px;line-height:1.1;white-space:nowrap}
  .top-actions .quick-expense-button::after{content:none}
  .mobile-nav #mobileAdd span{margin-top:-4px}
  #expenseList .adjustment-row>.status{display:inline-flex;align-items:center;justify-content:center;width:max-content;min-width:58px;min-height:34px;padding:8px 12px;line-height:1.2;white-space:nowrap;border-radius:10px}
  .report-period-filter input[type="date"],.commission-filter input[type="date"]{height:48px!important;padding-top:0!important;padding-bottom:0!important;line-height:48px!important;vertical-align:middle}
  .setting-control{display:grid;grid-template-columns:1fr;gap:8px}
  .setting-control select,.setting-control button{width:100%;height:46px}
  .front-menu-options{grid-template-columns:repeat(2,minmax(0,1fr))}
  .front-menu-choice{min-width:0;font-size:11px}
  .category-add{display:grid;grid-template-columns:minmax(0,1fr) auto}
  .category-add input{width:100%;font-size:14px!important}
  .category-add button{height:44px;padding:0 12px}
}
