.employee-name{display:block;color:var(--muted);margin-top:3px}
.import-help{font-size:13px;color:var(--muted);max-width:820px}
#import-table{max-height:360px;margin:16px 0}
#import-report p{margin-bottom:8px;font-size:13px}
#import-commit{margin-top:8px}
#admin-users td:last-child{min-width:160px}
#admin-users td:last-child button{display:block;margin:5px 0;text-align:left}

@media(max-width:800px){
  .topbar{min-height:44px;padding:6px 10px;gap:4px 10px;flex-wrap:wrap}
  .brand{font-size:14px;gap:7px;line-height:1.2}
  .brand small{display:none}
  .brand-icon{width:27px;height:27px;font-size:18px;border-radius:8px}
  .account{gap:6px;max-width:58%}
  .account span{font-size:11px;max-width:115px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .account .secondary{padding:5px 10px;font-size:12px}
  .topbar nav{display:none}
  body.authenticated .topbar nav{display:flex;flex-basis:100%;margin:1px 0 0;gap:5px}
  .nav{font-size:11px;padding:5px 8px}
  main{padding:6px 8px 12px;min-height:0}
  #map-page .page-heading{margin:0 0 6px;gap:0}
  #map-page .page-heading>div:first-child{display:none}
  .date-picker{padding:3px 6px;border-radius:8px;gap:6px;height:39px}
  .date-picker label>span{display:none}
  .date-picker label{flex:1;text-align:center}
  .date-picker input{font-size:14px;padding:0;margin:0 auto;width:auto;min-width:135px}
  .date-picker .icon-button{height:30px;font-size:22px}
  .workspace{gap:8px}
  .plan-panel{display:flex;flex-direction:column;border-radius:10px}
  .plan-top{order:0;padding:7px 10px 3px;align-items:center}
  .plan-top h2{display:none}
  .plan-top p,.plan-top .text-button{font-size:11px}
  .plan-controls{order:1;padding:4px 8px;flex-wrap:nowrap;gap:6px}
  .view-toggle{padding:2px;gap:2px}
  .view-toggle button{font-size:11px;padding:5px 9px}
  .zoom-controls{gap:3px}
  .zoom-controls button{font-size:10px;padding:3px 6px}
  .zoom-controls button:first-child,.zoom-controls button:last-child{font-size:16px;min-width:26px;line-height:18px}
  .legend{order:2;padding:3px 10px;gap:10px;font-size:10px}
  .legend span{gap:4px;white-space:nowrap}
  .legend i{width:8px;height:8px;border-radius:2px}
  #map{order:3;padding:3px 4px;min-height:0;max-height:calc(100svh - 220px)}
  #map svg{min-width:0;width:100%;height:auto}
  #weeks-overview{order:3;margin:6px 8px;max-height:calc(100svh - 240px)}
  #week-strip{order:4;margin:2px 8px 4px;padding:2px 1px 5px;gap:3px}
  .week-tile{min-width:35px;padding:3px 2px;gap:0;border-radius:5px}
  .week-tile span{font-size:9px}
  .week-tile strong{font-size:12px}
  .week-tile small{display:none}
  .quick-seat-label{order:5;display:flex;margin:2px 10px 8px;align-items:center;justify-content:space-between;gap:12px;font-size:11px}
  .quick-seat-label select{flex:1;max-width:200px;font-size:13px;padding:5px 8px;margin:0;height:31px}
  .plan-foot{display:none}
  body:not(.has-selection) #map-page aside{display:none}
  .selection{padding:11px 12px;border-radius:10px}
  .selection>.eyebrow,.selection #seat-date{display:none}
  .selection h2{font-size:18px;margin-bottom:5px}
  .selection p{font-size:12px;margin-bottom:8px}
  .selection .primary,.selection .danger{font-size:13px;padding:8px 10px;min-height:36px}
  .selection .booking-summary{padding:7px 9px}
  .future-panel{margin-top:8px;padding:12px}
  .future-panel h3{font-size:12px;margin-bottom:4px}
  #future-seat-label{display:none}
  .calendar-week-title{font-size:9px!important;margin:7px 0 5px}
  .calendar-grid{gap:4px}
  .calendar-weekday{font-size:10px}
  .calendar-day{height:28px;font-size:12px}
  .aside-note,footer{display:none}
  #notice{padding:7px 10px;margin-bottom:6px;font-size:12px}
  #admin-page .page-heading,#mine-page .page-heading{margin:12px 4px}
  #admin-page h1,#mine-page h1{font-size:24px}
  .surface{padding:14px;margin-bottom:10px}
  .surface h2{font-size:17px}
  .assignment-form{margin:12px 0;gap:10px}
  .surface>p{font-size:12px}
}

/* Two-week grid uses the entire available workspace on desktop. */
.workspace,.plan-panel{min-width:0}
.weeks-layout .workspace{grid-template-columns:minmax(0,1fr)}
.weeks-layout .workspace>aside{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.weeks-layout .aside-note{display:none}
#weeks-overview{min-width:0;max-width:100%}
.weeks-table{width:100%;min-width:0!important;table-layout:fixed}
.weeks-table th,.weeks-table td{min-width:0!important;width:auto!important;padding:3px!important;text-align:center}
.weeks-table th:first-child{width:76px!important}
.weeks-table .calendar-day.overview-cell{width:100%;min-width:0;height:30px;margin:0;padding:0}
.weeks-table .calendar-day.chosen{outline:none;box-shadow:none}
.weeks-table .selected-row th{background:#ede9fe;color:#4c1d95}
.weeks-table .calendar-day.selected-cell{outline:3px solid #6d28d9!important;outline-offset:-3px;box-shadow:inset 0 0 0 5px white!important;position:relative;z-index:1}
.weeks-table .selected-cell:after{content:'✓';position:absolute;right:3px;top:0;font-size:11px;font-weight:900;color:#4c1d95}
.weeks-table thead th.chosen{background:#6d28d9;color:white}
.mobile-admin-picker{display:none}
.compact-icon{font-size:22px!important;min-width:36px;min-height:36px;padding:3px 8px!important}
@media(max-width:800px){
 #admin-page .page-heading,#mine-page .page-heading{margin:6px 2px 8px}
 #admin-page .eyebrow,#mine-page .eyebrow,#mine-page .subtitle{display:none}
 #admin-page h1,#mine-page h1{font-size:20px;margin:0}
 .mobile-admin-picker{display:block;width:100%;margin:0 0 8px;padding:8px;font-size:16px}
 #admin-page>.surface:not(.mobile-section-active){display:none}
 .surface{padding:10px;border-radius:10px}
 .surface h2{font-size:15px;margin:0 0 8px}
 .assignment-form{display:flex;flex-wrap:wrap;align-items:end;gap:8px;margin:8px 0}
 .assignment-form label{flex:1 1 130px;min-width:0;font-size:11px}
 input,select{max-width:100%;box-sizing:border-box}
 .assignment-form input,.assignment-form select{width:100%;min-width:0;font-size:16px;padding:7px;margin-top:3px}
 .assignment-form button{padding:8px 10px;font-size:12px;min-height:36px}
 .assignment-form fieldset{flex-basis:100%;min-width:0;padding:6px}
 .weekday-options{display:flex;flex-wrap:wrap;gap:8px}
 .weekday-options label{flex:0 0 auto}
 #admin-page .table-scroll,#mine-page .table-scroll{overflow:visible}
 #admin-page table,#mine-page table{display:block;min-width:0;width:100%}
 #admin-page thead,#mine-page thead{display:none}
 #admin-page tbody,#mine-page tbody{display:grid;gap:6px}
 #admin-page tr,#mine-page tr{display:grid;grid-template-columns:1fr 1fr;gap:4px 8px;border:1px solid #e2e8f0;border-radius:8px;padding:8px;min-width:0}
 #admin-page td,#mine-page td{display:block;min-width:0!important;padding:0!important;border:0;overflow-wrap:anywhere;font-size:12px}
 #admin-page td:before,#mine-page td:before{content:attr(data-label);display:block;font-size:10px;color:#64748b}
 #admin-users td:first-child{grid-column:1/-1;font-weight:600}
 #admin-users td:last-child,#audit td:last-child{grid-column:1/-1}
 #admin-users td:last-child{display:flex;flex-wrap:wrap;gap:6px}
 #admin-users td:last-child:before{display:none}
 #admin-users td:last-child button{display:inline-block;margin:0;padding:6px;font-size:11px}
 .assignment-item{padding:6px 0;gap:6px;min-width:0}
 .assignment-item p{font-size:12px;overflow-wrap:anywhere}
 .assignment-item button{font-size:11px;padding:6px;flex-shrink:0}
 #auth-dialog{box-sizing:border-box;width:calc(100% - 20px);max-height:calc(100dvh - 20px);padding:20px;overflow:auto}
 #auth-dialog h2{font-size:21px;margin-bottom:8px}
 #auth-dialog p{font-size:12px;margin-bottom:8px}
 #auth-dialog input{font-size:16px;padding:8px}
 .auth-links{gap:6px}
 .auth-links button{font-size:12px}
 .weeks-layout .workspace>aside{display:block}
 .weeks-table{min-width:650px!important}
 #weeks-overview{overflow:auto}
}

/* Reset inherited column flex sizing: a flex-basis in a column is height. */
@media(max-width:800px){
 .assignment-form{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;justify-items:stretch;gap:10px;height:auto;min-height:0}
 .assignment-form>label,.assignment-form>fieldset,.assignment-form>button{flex:none;align-self:auto;width:100%;min-width:0;min-height:0;margin:0}
 .assignment-form>label{font-size:12px}
 .assignment-form>button{width:auto;justify-self:start;min-height:40px}
 .assignment-form input,.assignment-form select{height:40px;margin-top:4px}
 .assignment-form input[type=checkbox]{width:20px;height:20px;margin:0 4px 0 0;flex:none}
 .assignment-form fieldset{padding:0}
 .weekday-options{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
 .weekday-options label{font-size:11px;min-width:0;gap:2px;justify-content:center;flex-wrap:wrap}
 .weekday-options input[type=checkbox]{margin:0}
 .assignment-form legend{margin-bottom:6px}
 #employee-form,#technical-form,#role-form{padding-bottom:10px;border-bottom:1px solid var(--line)}
 .assignment-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}
 .assignment-item button{max-width:105px;line-height:1.25}
}

#map-user-label{margin:0 0 12px;max-width:420px;font-weight:600}#map-user{font-size:16px;padding:8px}@media(max-width:800px){#map-user-label{font-size:11px;margin-bottom:6px;max-width:none}#map-user{height:36px;margin-top:3px}}
