/* Compact workspace: navigation and project context remain in view. */
html,body{min-height:100%;height:100%}
body{overflow:hidden}
#app{height:100dvh;min-width:0}
.sidebar{width:210px;padding:18px 12px 12px;overflow-y:auto;overflow-x:hidden}
.brand{padding:0 10px;gap:9px}
.brand-mark{width:32px;height:32px}
.workspace{margin:18px 2px 16px;padding:8px}
.nav-label{margin:0 9px 7px}
.nav-group{gap:3px;margin-bottom:16px}
.nav-link{padding:9px 10px;gap:9px;font-size:12px;min-height:35px}
.nav-link .icon{flex-shrink:0}
.nav-link .count{margin-left:auto}
.sidebar-bottom{padding-top:8px}
.demo-box{padding:10px;margin:0 2px 10px}
.demo-box p{margin:7px 0}
.user-profile{padding:11px 2px 0;gap:8px}
.nav-scrim{display:none}
.nav-toggle{display:inline-flex;flex-shrink:0}
.app-main{margin-left:210px;height:100dvh;display:flex;flex-direction:column;min-width:0}
.topbar{height:52px;min-height:52px;padding:0 22px;flex-shrink:0}
.app-main>.context-bar{margin:0;border-radius:0;border-width:0 0 1px;padding:9px 22px;gap:16px;flex-shrink:0;background:#fff}
.context-field{min-width:0}
.context-field select{max-width:240px;text-overflow:ellipsis}
.context-right{white-space:nowrap}
.content{padding:16px 22px 10px;width:100%;max-width:1640;min-height:0;flex:1;display:flex;flex-direction:column}
.page-head{flex-shrink:0;margin-bottom:14px;gap:14px}
.page-head h1{font-size:25px}
.page-head p{margin-top:5px}
.route-body{flex:1;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.footer{padding-top:10px;flex-shrink:0;gap:10px}
.stats{gap:12px;margin-bottom:12px}
.stat{padding:10px 14px;min-height:96px}
.stat .square-icon{width:24px;height:24px}
.stat-num{margin:2px 0 3px}
.stat-label{font-size:11px}
.stat-foot{font-size:9px}
.two-columns,.bottom-grid{gap:12px;margin-bottom:12px}
.panel{min-width:0}
.panel-header{padding:13px 16px 0;flex-shrink:0;gap:10px}
.panel-title{line-height:1.4}
.panel-subtitle{margin:4px 16px 0;flex-shrink:0}
.completion-body{gap:20px;padding:18px 16px;flex:1;align-items:center}
.completion-list{gap:12px}
.donut{width:104px;height:104px}
.panel-bottom{padding:9px 16px;flex-shrink:0}
.coverage{padding:14px 16px 12px;overflow:auto;scrollbar-width:thin}
.heat-grid{gap:4px}
.heat-cell{height:23px}
.heat-legend{margin-top:11px}
.activity{padding:16px 16px 4px;overflow:auto;scrollbar-width:thin}
.activity-item{padding-bottom:15px}
.activity-item:last-child{padding-bottom:4px}
.activity-item p{margin-top:3px;margin-bottom:3px}
.table-wrap{margin-top:12px;min-height:0;scrollbar-width:thin;overscroll-behavior:contain}
table{border-collapse:separate;border-spacing:0;width:100%}
th{position:sticky;top:0;z-index:2;background:var(--m23-color-faf8fd,#faf8fd);padding:10px 14px;box-shadow:0 1px 0 var(--line)}
td{padding:10px 14px}
.tabs{flex-shrink:0;margin-bottom:12px;gap:22px;overflow-x:auto;white-space:nowrap}
.tab{padding:9px 2px}
.full-panel{margin-bottom:12px}
.toolbar{padding:12px 16px 0;flex-shrink:0}
.summary-banner{padding:13px 16px;flex-shrink:0;gap:12px}
.summary-banner h3{margin-bottom:4px}
.pagination{padding:9px 16px;flex-shrink:0;background:#fff}
.mapping-info{padding:0 16px 10px;flex-shrink:0}
.notice{padding:12px 15px;flex-shrink:0}
.cards{gap:12px;align-content:start}
.layout-card{padding:16px;gap:9px}
.layout-card p{min-height:0}
.layout-icon{width:33px;height:33px}
.form-grid{gap:15px}
.settings-body{padding:20px}
.settings-body h3{margin-bottom:17px}
.settings-body .actions{margin-top:18px}
.event-list{padding:16px;gap:12px}
.event-card{padding:13px}
.appearance-heading{padding:19px 20px 16px}
.palette-fieldset{padding:0 20px 17px}
.palette-sample{height:54px}
.palette-card{padding:7px 7px 9px}
.palette-options{gap:10px}
.custom-palette{padding:15px 20px}
.appearance-preview{margin:0 20px 15px;padding:12px 14px}
.appearance-footer{padding:12px 20px}
.dropzone{padding:20px}
.dropzone h3{margin:10px 0 6px}
.dropzone p{margin:0 0 14px}
.dropzone small{display:block;margin-top:12px}
.file-list{margin-top:12px}
.route-body>.notice[style]{margin-top:12px!important}
/* Record details sit beside the current work, leaving its state untouched. */
.modal-open{overflow:hidden}
.drawer-backdrop{padding:0;display:flex;justify-content:flex-end;align-items:stretch;backdrop-filter:none;background:var(--m23-color-261a424a,#261a424a)}
.detail-drawer{width:min(480px,100%);height:100dvh;max-height:100dvh;border-radius:14px 0 0 14px;display:flex;flex-direction:column;overflow:hidden}
.detail-drawer .modal-head{flex-shrink:0;padding:20px;gap:15px}
.detail-drawer .modal-head h2{line-height:1.4}
.detail-drawer .modal-head .icon-btn{flex-shrink:0}
.detail-drawer .modal-body{overflow:auto;flex:1;padding:20px}
.detail-drawer .detail-grid{grid-template-columns:1fr 1fr;gap:20px 15px}
.detail-drawer .detail-grid>div{border-bottom:1px solid var(--line);padding-bottom:12px;overflow-wrap:anywhere}
.detail-drawer .activity{padding:0}
@media(min-width:701px){
 .nav-collapsed .sidebar{width:66px;padding:18px 9px 12px;align-items:stretch}
 .nav-collapsed .app-main{margin-left:66px}
 .nav-collapsed .brand{padding:0;justify-content:center;margin-bottom:24px}
 .nav-collapsed .brand>div:last-child,.nav-collapsed .workspace,.nav-collapsed .nav-label,.nav-collapsed .nav-text,.nav-collapsed .nav-link .count,.nav-collapsed .demo-box,.nav-collapsed .user-profile>div,.nav-collapsed .user-profile>.avatar{display:none}
 .nav-collapsed .nav-group{gap:5px;margin-bottom:18px}
 .nav-collapsed .nav-link{justify-content:center;padding:10px;min-height:38px}
 .nav-collapsed .user-profile{justify-content:center;padding:12px 0 0}
 .nav-collapsed #toast{left:calc(50% + 33px)}
 .route-body>.panel:last-child,.route-body>.full-panel:last-child{margin-bottom:0}
}
@media(min-width:1000px){
 .content[data-route="overview"] .route-body{display:grid;grid-template-rows:64px 96px minmax(216px,1.12fr) minmax(160px,1fr);gap:12px}
 .content[data-route="overview"] .hero{min-height:0;margin:0;padding:10px 18px;gap:20px;display:flex;align-items:center}
 .content[data-route="overview"] .hero>div{flex:1}
 .content[data-route="overview"] .hero h2{font-size:18px;margin:0 0 3px}
 .content[data-route="overview"] .hero p{margin:0;font-size:11px}
 .content[data-route="overview"] .hero .btn{margin:0;z-index:1}
 .content[data-route="overview"] .hero-art{height:60px;width:90px;position:static;margin:0}
 .content[data-route="overview"] .stats,.content[data-route="overview"] .two-columns,.content[data-route="overview"] .bottom-grid{margin:0;min-height:0}
 .content[data-route="overview"] .two-columns{grid-template-columns:1fr 1.3fr}
 .content[data-route="overview"] .bottom-grid{grid-template-columns:1.8fr 1fr}
 .content[data-route="overview"] .panel{display:flex;flex-direction:column;min-height:0}
 .content[data-route="overview"] .table-wrap,.content[data-route="overview"] .activity{flex:1;overflow:auto}
 .content[data-route="overview"] .completion-body{padding:12px 16px}
 .content[data-route="overview"] .coverage{padding-top:10px;padding-bottom:10px;flex:1;display:flex;flex-direction:column;justify-content:center}
 .content[data-route="overview"] .heat-cell{height:21px}
 .content[data-route="overview"] .heat-legend{margin-top:8px}
 .content[data-route="overview"] .activity{padding-top:12px}
 .content[data-route="overview"] .activity-item{padding-bottom:12px}
 .content[data-route="overview"] td{padding-top:9px;padding-bottom:9px}
 .content[data-route="mapping"] .route-body,.content[data-route="employees"] .route-body,.content[data-route="deliveries"] .route-body,.content[data-route="import"] .route-body{display:flex;flex-direction:column;overflow:hidden;gap:0}
 .content[data-route="mapping"] .route-body>.panel,.content[data-route="employees"] .route-body>.panel,.content[data-route="deliveries"] .route-body>.panel,.content[data-route="import"] .file-list{display:flex;flex-direction:column;flex:1;min-height:0;margin-bottom:0}
 .content[data-route="mapping"] .table-wrap,.content[data-route="employees"] .table-wrap,.content[data-route="deliveries"] .table-wrap,.content[data-route="import"] .table-wrap{flex:1;overflow:auto}
 .content[data-route="deliveries"] .route-body>.notice{margin-bottom:12px}
 .content[data-route="deliveries"] .two-columns{min-height:0;flex:1;margin-bottom:0}
 .content[data-route="deliveries"] .two-columns>.panel{display:flex;flex-direction:column;min-height:0}
 .content[data-route="deliveries"] .activity{flex:1}
 .content[data-route="import"] .dropzone{display:grid;grid-template-columns:48px 1fr auto;column-gap:16px;align-items:center;text-align:left;flex-shrink:0}
 .content[data-route="import"] .upload-icon{grid-row:1/4;margin:0}
 .content[data-route="import"] .dropzone h3{grid-column:2;margin:0 0 5px}
 .content[data-route="import"] .dropzone p{grid-column:2;margin:0}
 .content[data-route="import"] .dropzone small{grid-column:2;margin-top:7px}
 .content[data-route="import"] .dropzone .actions{grid-column:3;grid-row:1/4;margin:0}
 #import-progress{grid-column:1/-1}
 .content[data-route="layouts"] .cards{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:12px}
}
@media(min-width:1000px) and (max-height:800px){
 .content{padding-top:12px}
 .page-head{margin-bottom:10px}
 .content[data-route="overview"] .route-body{grid-template-rows:50px 94px minmax(204px,1.1fr) minmax(140px,1fr);gap:10px}
 .content[data-route="overview"] .stat{min-height:0;padding-top:9px;padding-bottom:9px}
 .content[data-route="overview"] .panel-header{padding-top:10px}
 .content[data-route="overview"] .heat-cell{height:19px}
 .content[data-route="overview"] .heat-grid{gap:3px}
 .content[data-route="overview"] .activity-item{padding-bottom:9px}
 .content[data-route="overview"] .panel-bottom{padding-top:6px;padding-bottom:6px}
 .content[data-route="overview"] .hero-art{height:50px}
}
@media(min-width:701px) and (max-width:999px){
 .sidebar{width:190px}
 .app-main{margin-left:190px}
 .content{padding:16px}
 .topbar{padding:0 16px}
 .app-main>.context-bar{padding:9px 16px}
 .context-field select{max-width:160px}
 .hero{min-height:100px;gap:12px;padding:16px;margin-bottom:12px;flex-wrap:wrap}
 .hero h2{font-size:21px}
 .hero p{max-width:none}
 .hero-art{display:none}
 .two-columns,.bottom-grid{grid-template-columns:1fr}
 .table-wrap{max-height:55dvh}
}
@media(max-width:700px){
 html,body,#app{height:auto;min-height:100%}
 body{overflow:auto}
 .sidebar{width:230px;padding:18px 12px 12px;max-height:100dvh;z-index:30}
 .nav-scrim.visible{display:block;position:fixed;inset:0;background:#2924384d;border:0;z-index:25}
 .app-main{margin-left:0;height:auto;min-height:100dvh}
 .topbar{height:52px;min-height:52px;padding:0 14px;position:sticky;top:0;z-index:15}
 .breadcrumbs{min-width:0}
 .breadcrumbs>span:last-child{max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .top-actions{gap:7px}
 .top-actions>.appearance-shortcut{display:none}
 .app-main>.context-bar{padding:9px 14px;gap:7px;position:sticky;top:52px;z-index:14}
 .context-field{flex:1 1 150px}
 .context-field select{max-width:155px}
 .context-right{display:none}
 .content{padding:17px 14px 14px;display:block}
 .route-body{overflow:visible}
 .page-head h1{font-size:22px}
 .page-head{margin-bottom:14px}
 .hero{min-height:0;padding:16px;margin-bottom:12px;display:flex;flex-wrap:wrap;gap:12px}
 .hero h2{font-size:20px;margin:0 0 5px}
 .hero p{max-width:none;margin:0}
 .hero .btn{margin:0}
 .hero-art{display:none}
 .stats{gap:10px;margin-bottom:12px}
 .stat{min-height:100px;padding:12px}
 .stat-label{font-size:10px}
 .two-columns,.bottom-grid{grid-template-columns:1fr;gap:12px}
 .table-wrap{max-height:62dvh}
 .completion-body{gap:20px;padding:18px 16px}
 .coverage{padding:16px 10px}
 .heat-grid{grid-template-columns:28px repeat(12,minmax(0,1fr));gap:3px}
 .heat-cell{height:21px}
 .cards{grid-template-columns:1fr;margin-top:12px}
 .tabs{gap:18px}
 .dropzone{padding:22px 14px}
 .settings-body{padding:17px}
 .appearance-heading{padding:18px 17px 15px}
 .palette-fieldset{padding:0 17px 17px}
 .palette-sample{height:58px}
 .custom-palette{padding:15px 17px}
 .appearance-preview{margin:0 17px 15px}
 .appearance-footer{padding:12px 17px}
 .detail-drawer{border-radius:0;width:min(440px,100%)}
 .detail-drawer .detail-grid{grid-template-columns:1fr}
}
@media(min-width:701px) and (max-height:800px){
 .sidebar{padding-top:14px}
 .workspace{margin-top:12px;margin-bottom:12px}
 .workspace small,.demo-box p{display:none}
 .nav-group{gap:2px;margin-bottom:12px}
 .nav-link{padding-top:8px;padding-bottom:8px}
 .demo-box .small-heading{margin-bottom:7px}
}
@media(min-width:1000px) and (max-height:740px){
 .content[data-route="overview"] .route-body{grid-template-rows:40px 94px minmax(212px,1.1fr) minmax(128px,1fr)}
 .content[data-route="overview"] .hero{padding-top:4px;padding-bottom:4px}
 .content[data-route="overview"] .hero h2{margin:0}
 .content[data-route="overview"] .hero p,.content[data-route="overview"] .hero-art{display:none}
}
@media(min-width:1000px){
 .content[data-route="settings"] .route-body{display:flex;flex-direction:column;overflow:hidden}
 .content[data-route="settings"] .route-body>.panel{min-height:0;overflow:auto;margin-bottom:0}
}
@media(max-width:700px){
 .context-field select{flex:1;min-width:0;max-width:100%;width:100%}
}
@media(min-width:1000px) and (max-height:740px){
 .content[data-route="overview"] .coverage{padding-top:7px;padding-bottom:7px}
}

/* Keep route transitions from shifting the viewport boundary. */
.route-enter{animation:compact-enter .15s ease}
@keyframes compact-enter{from{opacity:.65}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.route-enter{animation:none}}

/* DE/PARA keeps source metadata in its own column for single-line rows. */
.mapping-rubrics tbody td{padding:7px 12px;white-space:nowrap}
.mapping-rubrics th{padding-left:12px;padding-right:12px}
.mapping-rubrics .mapping-origin .table-primary{display:block;max-width:clamp(200px,21vw,360px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mapping-rubrics .mapping-source{color:var(--text-secondary)}
.mapping-rubrics .mapping-select{padding-top:6px;padding-bottom:6px}
.mapping-rubrics .empty{padding:30px 20px;white-space:normal}
