/* Shared responsive rules for the application and its HTML mockups. */
.mobile-menu-toggle{display:none}
main,section,form,fieldset,dialog,.form-grid>*,.heading>*,.page-heading>*,.setup-summary>div>*{min-width:0}
input,select,textarea{max-width:100%;box-sizing:border-box}
dialog{overscroll-behavior:contain}body:has(dialog[open]){overflow:hidden}
@media(max-width:1024px){
 aside{position:relative;inset:auto;width:100%;margin:0;padding:12px 20px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 12px;align-items:center;overflow:visible;z-index:5}
 aside .brand,aside .sidebar-brand{grid-column:1;grid-row:1;margin:0;max-width:190px;width:100%;height:52px}
 aside .business,aside .side-bottom,aside .sidebar-profile,aside .sidebar-caption,aside .caption{display:none}
 aside .mobile-menu-toggle{display:block;grid-column:2;grid-row:1;background:#263655;border-color:#536080;color:#fff;min-height:44px;padding:10px 14px;font-size:14px;white-space:normal}
 aside nav{display:none;grid-column:1/-1;max-width:100%;margin:12px 0 0;padding:0;overflow:visible;gap:6px}
 aside.mobile-menu-open nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 aside nav a,aside nav button{width:100%;min-width:0;min-height:44px;margin:0;padding:12px;white-space:normal;overflow-wrap:anywhere;text-align:left;font-size:14px}
 aside nav button:disabled{display:none}
 main{margin-left:0;margin-right:0;width:100%;max-width:100%;padding:0 20px 28px}
 button{min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px;min-height:44px;width:100%;min-width:0}
 input[type=checkbox],input[type=radio]{flex-shrink:0}
 .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .topbar{height:auto;min-height:56px;flex-wrap:wrap;padding:12px 0;gap:8px;font-size:12px}
 .topbar>*{min-width:0;overflow-wrap:anywhere}.topbar .environment{max-width:100%}
 .heading,.page-heading{gap:16px;flex-wrap:wrap;align-items:flex-start}.heading h1,.page-heading h1{overflow-wrap:anywhere}
 .heading-actions{flex-wrap:wrap}.heading-actions button{white-space:normal}
 .filters{flex-wrap:wrap}.filters>*{min-width:0;max-width:100%}
 .setup-summary strong,.workspace-card h2,.entity-hero h3{overflow-wrap:anywhere}
 .calendar-scroll{max-width:100%;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
 .calendar-tools{grid-template-columns:repeat(2,minmax(0,1fr))}.calendar-tools h2{grid-column:1/-1}.calendar-tools #date{min-width:0}
 .modal-head,.dialog-head{gap:12px;align-items:flex-start}.modal-head h2,.dialog-head h2{min-width:0;overflow-wrap:anywhere}
 .modal-head button,.dialog-head>button{flex-shrink:0;max-width:45%}
 .pagination,.tablefoot,.template-pagination{gap:12px;flex-wrap:wrap}.pagination>div{flex-wrap:wrap;max-width:100%}
 .setup-wrap .steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.steps li{min-width:0;white-space:normal}
}
@media(max-width:760px){
 main{padding:0 12px 24px}aside{padding:10px 12px}.heading,.page-heading{display:grid;grid-template-columns:minmax(0,1fr);margin:22px 0 18px}
 .heading h1,.page-heading h1{font-size:25px;line-height:1.2}.heading p,.page-heading p{font-size:14px;max-width:100%}
 .page-heading .primary{font-size:14px}.page-heading>button,.heading-actions,.heading-actions button{width:100%}.heading-actions{display:grid;grid-template-columns:minmax(0,1fr)}
 .form-grid,.workspace-grid,.review-columns,.period-fields,.service-type-grid,.template-filters,.activity-filters,.activity-options{grid-template-columns:minmax(0,1fr)}
 .form-grid .wide{grid-column:1/-1}.form-grid label{width:100%}.form-grid{gap:16px}label{font-size:14px}
 .setup-wrap .steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0}.steps li{font-size:14px;padding:12px}.steps b{display:inline-grid;margin:0 8px 0 0}
 .setup-actions,.setup-actions>div,.schedule-footer,.schedule-footer>div,.modal-actions,.actions{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;width:100%}
 .setup-actions button,.schedule-footer button,.modal-actions button,.actions button{width:100%;margin:0}
 .workspace-card,.setup-body,.schedule-body,.profile-panel{padding:16px}.compact-note{padding:16px}
 .setup-summary>div{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}.setup-summary strong{text-align:left}
 .filters{display:grid;grid-template-columns:minmax(0,1fr);padding:16px}.filters input,.filters select,.filters button{width:100%;max-width:100%;min-width:0;grid-column:1}
 .table-scroll,.table-wrap{max-width:100%;overflow:visible}table,tbody{display:block;width:100%;min-width:0!important}
 thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:16px;border-bottom:1px solid #e1e7ef}
 tbody td{display:block;min-width:0;max-width:100%;padding:0;border:0;white-space:normal;overflow-wrap:anywhere}
 tbody td:first-child{grid-column:1/-1}tbody td:not(:first-child)::before{content:attr(data-label);display:block;font-size:12px;color:#63728a;margin-bottom:5px}
 .entity-cell,.person{max-width:100%;min-width:0}.entity-cell>div,.person>div{min-width:0}.entity-title{font-size:14px}.cell-text{font-size:14px}.secondary{font-size:12px}
 .pill{white-space:normal;overflow-wrap:anywhere;max-width:100%}.pagination{display:flex;flex-direction:column;align-items:stretch;padding:16px;font-size:14px}
 .pagination>div{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}.pagination button{font-size:14px}
 .details,.entity-details{grid-template-columns:minmax(0,1fr)}.details dd{margin:0 0 10px}.details dt{font-size:13px}
 dialog,dialog.entity-modal{inset:0;margin:auto;width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0;border:0;overflow:auto}
 .modal-head,.dialog-head{padding:16px;padding-top:max(16px,env(safe-area-inset-top));position:sticky;top:0;background:#fff;z-index:2}
 .modal-head h2,.dialog-head h2{font-size:20px;line-height:1.3}.modal-body,#card-body{padding:16px;padding-bottom:max(24px,env(safe-area-inset-bottom))}
 #confirm{height:auto;width:calc(100% - 24px);max-height:calc(100dvh - 24px);padding:20px;border-radius:12px}
 .modal-body p,.setup-body p,.hint,.sub,.notice{overflow-wrap:anywhere;line-height:1.5}.modal-body .sub,.hint{font-size:13px}
 .template-option{padding:12px}.template-option>span{min-width:0}.template-pagination>span{flex-basis:100%}.template-pagination button{flex:1}
 .hours-row{grid-template-columns:minmax(0,1fr)}.hours-row>label{grid-column:auto}.exception-row{flex-wrap:wrap}.exception-actions{width:100%;flex-wrap:wrap}
 .login-screen{display:block;min-height:100dvh}.login-card{width:100%;max-width:480px;margin:auto;padding:28px 20px;min-height:100dvh}.auth-visual{display:none}.auth-links button{min-height:44px}
 .toast{left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));transform:none;max-width:none;overflow-wrap:anywhere}
 footer{padding-bottom:env(safe-area-inset-bottom);overflow-wrap:anywhere}
}
@media(max-width:360px){tbody tr{grid-template-columns:minmax(0,1fr)}.metrics{grid-template-columns:minmax(0,1fr)}.month-overview-actions{display:grid;grid-template-columns:minmax(0,1fr)}}
@media(max-height:500px) and (max-width:1024px){dialog{max-height:100dvh}.modal-head,.dialog-head{padding-block:10px}.login-card{padding-block:20px}.auth-logo{margin-bottom:16px}}
