/* Workspace lifecycle layouts. application-design.css supplies the final shared
   component layer across workspace, authentication and both console builds. */
:root{

 --er-blue:var(--er-primary);--er-navy:var(--er-heading);--er-teal:#0d9488;--er-green:#16a34a;
 --er-amber:#f59e0b;--er-red:#ef4444;--er-slate:var(--er-ink);--er-radius:10px;
 --theme-bg:var(--ui-background);--theme-panel:var(--ui-surface);--theme-panel-2:var(--ui-subtle);--theme-panel-3:var(--ui-subtle);
 --theme-text:var(--ui-heading);--theme-text-2:var(--ui-ink);--theme-muted:var(--ui-muted);--theme-line:var(--ui-border);
 --theme-accent:var(--ui-primary);--theme-accent-2:var(--ui-primary-hover);--theme-hover:var(--ui-subtle);--theme-sidebar:var(--ui-surface);
 --er-shadow:0 2px 10px #0f274505;
}
body[data-theme="dark"],html[data-theme="dark"]{
 --er-blue:var(--er-primary);--er-navy:var(--er-heading);--er-teal:#5fd4c3;--er-green:#70d999;
 --er-amber:#f9c46b;--er-red:#ff9696;--er-slate:var(--er-ink);
 --theme-bg:var(--ui-background);--theme-panel:var(--ui-surface);--theme-panel-2:var(--ui-subtle);--theme-panel-3:var(--ui-subtle);
 --theme-text:var(--ui-heading);--theme-text-2:var(--ui-ink);--theme-muted:var(--ui-muted);--theme-line:var(--ui-border);
 --theme-accent:var(--ui-primary);--theme-accent-2:var(--ui-primary-hover);--theme-hover:var(--ui-subtle);--theme-sidebar:var(--ui-surface);
 --er-shadow:none;
}
body{background:var(--theme-bg);color:var(--theme-text-2);font-family:Arial,Helvetica,sans-serif}
button,input,select,textarea,h1,h2,h3{font-family:Arial,Helvetica,sans-serif}
.er-dashboard h3{font-family:Arial,Helvetica,sans-serif!important}
.er-dashboard-column{display:grid;gap:18px}
.er-dashboard a{text-decoration:none;color:var(--theme-accent)}
.er-dashboard a:hover{text-decoration:underline}
main{background:var(--theme-bg)}
/* Source navigation remains available for permission mirroring, never as a left menu. */
.app>aside,.app>.sidebar-toggle,.app>.sidebar-resizer{display:none!important}
.app{grid-template-columns:minmax(0,1fr)!important}
.app>main,body.sidebar-collapsed .app>main{grid-column:1!important;margin-left:0!important;width:auto!important}
main>.toprow{padding-bottom:0;border-bottom:0;margin-bottom:14px}
main>.toprow .sub{margin-bottom:0}
main>.toprow h1{font-size:26px!important}
h1,h2,h3{color:var(--theme-text);letter-spacing:-.025em}
h1{font-size:26px}h2{font-size:19px}h3{font-size:15px}
.card,.live-page,.er-board-panel{background:var(--theme-panel)!important;border:1px solid var(--theme-line);border-radius:var(--er-radius);box-shadow:var(--er-shadow)}
button:disabled{opacity:.5;cursor:not-allowed}
table thead th{background:var(--ui-table-header)!important;color:var(--ui-table-header-ink)!important;font-weight:600}
.er-assessment-heading{border-bottom:1px solid var(--theme-line);padding-bottom:16px;margin-bottom:16px}
.er-assessment-heading>.actions:last-child{gap:6px;margin-top:16px}
.er-assessment-heading progress{accent-color:var(--er-teal)}
.er-context-nav{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.nav-legacy-note{padding:10px;font-size:11px;line-height:1.6;border-top:1px solid var(--theme-line)}
#persistentApp.horizontal #persistentNav{background:var(--theme-panel)}
#persistentApp.horizontal #persistentNav aside{background:var(--theme-panel)!important;align-items:center;gap:18px;padding:12px 20px!important;min-height:70px}
#persistentApp.horizontal nav{gap:3px}
#persistentApp.horizontal .nav-group-toggle,#persistentApp.horizontal nav>.nav-primary{font-size:12px!important;padding:10px!important;border-radius:7px!important;color:var(--nav-ink)!important}
#persistentApp.horizontal nav>.nav-primary.active,#persistentApp.horizontal .nav-group-toggle[data-current="true"]{color:var(--nav-selected-ink)!important;background:var(--nav-selected)!important;border-color:transparent!important;box-shadow:none!important}
#persistentApp.horizontal .nav-group.open>.nav-group-toggle{box-shadow:none;background:var(--nav-hover)}

#persistentApp.horizontal .nav-stage-caption{color:var(--theme-text);font-size:12px}
#persistentApp.horizontal .nav-submenu{box-shadow:0 8px 28px #0f274519;border-radius:10px}
#persistentApp.horizontal .nav-submenu button{font-size:12px!important;border-radius:6px!important}
#persistentApp.horizontal .shell-account-controls{border-left:1px solid var(--theme-line);padding-left:14px}
.er-dashboard{display:grid;gap:18px}
.er-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.er-summary{padding:18px;display:grid;grid-template-columns:38px 1fr;gap:4px 12px;align-content:start}
.er-summary-symbol{grid-row:1/4;width:36px;height:36px;border-radius:9px;background:var(--theme-hover);color:var(--er-blue);display:grid;place-items:center;font-size:18px;font-weight:700}
.er-summary:nth-child(2) .er-summary-symbol{color:var(--er-green)}.er-summary:nth-child(3) .er-summary-symbol{color:var(--er-amber)}.er-summary:nth-child(4) .er-summary-symbol{color:var(--er-teal)}
.er-summary h3{font-size:12px;margin:0;color:var(--theme-text-2);letter-spacing:0}.er-summary strong{font-size:28px;line-height:1.25;color:var(--theme-text)}.er-summary small{color:var(--theme-muted);line-height:1.5}
.er-dashboard-panel{padding:20px;min-width:0}.er-panel-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:14px}.er-panel-heading h3{margin:0}.er-panel-heading a{font-size:12px;color:var(--theme-accent)}
.er-chart-track{height:9px;border-radius:8px;overflow:hidden;background:var(--theme-panel-3)}.er-chart-fill{height:100%;border-radius:8px;background:var(--er-blue)}
.er-chart-fill[data-rating="fully_effective"]{background:var(--er-teal)}.er-chart-fill[data-rating="partially_effective"]{background:var(--er-amber)}.er-chart-fill[data-rating="not_effective"]{background:var(--er-red)}.er-chart-fill[data-rating="not_assessed"]{background:var(--theme-muted)}
.er-dashboard-note{font-size:12px;line-height:1.7;color:var(--theme-muted);margin:10px 0 0}.er-dashboard-empty{padding:18px;background:var(--theme-panel-2);border-radius:8px;color:var(--theme-muted);line-height:1.7}
.er-timeline,.er-next-steps{list-style:none;padding:0;margin:0}.er-timeline li,.er-next-steps li{padding:12px 0;border-bottom:1px solid var(--theme-line)}.er-timeline li:last-child,.er-next-steps li:last-child{border:0}.er-timeline a,.er-next-steps a{color:var(--theme-text);font-weight:600}.er-timeline small,.er-next-steps small{display:block;color:var(--theme-muted);margin-top:4px;line-height:1.5}
.er-register-counts{display:flex;gap:10px;flex-wrap:wrap}.er-register-counts a{border:1px solid var(--theme-line);border-radius:7px;padding:9px 12px;color:var(--theme-text-2);font-size:12px;background:var(--theme-panel)}
@media(max-width:1100px){.er-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){#persistentApp.horizontal #persistentNav aside{gap:12px;padding:12px 15px!important}.er-summary{padding:14px;grid-template-columns:1fr}.er-summary-symbol{grid-row:auto}.er-summary strong{font-size:24px}.er-dashboard-panel{padding:16px}}

/* Compact register hierarchy, shared by genuine tables and their existing tools. */
body,h1,h2,h3,h4,button,input,select,textarea,.view th,.view td{font-family:var(--font-ui)!important}
.app>main{padding:22px 24px!important}
main>.toprow{align-items:center;gap:10px;margin-bottom:16px}
main>.toprow h1{margin:0 0 5px;font-weight:650;line-height:1.2}
main>.toprow .sub{max-width:920px;color:var(--theme-muted)!important;font-size:13px!important;line-height:1.5}
.view .card>.toprow{gap:12px;align-items:center;margin-bottom:12px}
.view .card>.toprow h2{font-size:17px!important;margin:0 0 4px;font-weight:650}
.view .card>.toprow .note{margin:0;line-height:1.5!important}
.view .card>.toprow>.actions{align-items:center;gap:6px}
.view table th{font-size:12px!important;font-weight:600!important;line-height:1.4;padding:10px 12px!important}
.view table td{font-size:13px!important;line-height:1.45;padding:9px 12px!important;vertical-align:middle}
.view table th,.view table td{border-left-color:transparent!important;border-right-color:transparent!important;border-bottom-color:var(--theme-line)!important}
.view table td small,.view table td .note{font-size:11px!important;color:var(--theme-muted)!important;line-height:1.45}
.view table tbody tr:nth-child(even)>td{background:var(--theme-panel-2)}
.view table tbody tr:not(.row-deleted):hover>td{background:var(--theme-hover)!important}
.view .record-row-actions{align-items:center;gap:5px}
.view .live-register-pager,.view .er-catalogue-pager{font-size:12px;align-items:center;gap:8px;padding-top:12px}
/* Keep the established 28px tool buttons; align search and closed filters to them. */
body .view .filters input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
body .view .table-tools input[type=search],body .view .filters select,
body .view .filters .workspace-checkbox-filter>summary,body .view .table-tools .workspace-checkbox-filter>summary,
body .view .table-tools select,body .view .er-catalogue-filter>summary{
 box-sizing:border-box!important;height:var(--er-control-height)!important;min-height:var(--er-control-height)!important;max-height:var(--er-control-height)!important;
 padding:4px 9px!important;border:1px solid var(--theme-line)!important;border-radius:var(--er-control-radius)!important;
 background:var(--theme-panel)!important;color:var(--theme-text-2)!important;font-size:12px!important;line-height:18px!important;
}
.view input[type=search]::placeholder{color:var(--theme-muted);opacity:1}
.view .workspace-filter-label,.view .er-catalogue-filter-label{font-weight:500;color:var(--theme-text-2)}
.view .filters,.view .table-tools{gap:8px!important;align-items:center}
.er-combo-menu{border-color:var(--theme-line);border-radius:8px;box-shadow:0 8px 24px #0f274514}
.view .table-tool-button:hover,.view .record-action-button:hover{background:var(--theme-hover)!important;border-color:var(--theme-accent)!important}
#persistentApp.horizontal nav>.nav-group>.nav-group-toggle{color:var(--theme-text-2)!important}
#persistentApp.horizontal nav>.nav-group>.nav-group-toggle[data-current="true"]{color:var(--nav-selected-ink)!important}
body[data-theme] .view .e8-context{background:var(--theme-panel-2)!important;border:1px solid var(--theme-line)!important;border-radius:10px;padding:14px 16px;margin-bottom:16px}
body[data-theme] .view .e8-context h3{color:var(--theme-text)!important;font:600 14px/1.4 var(--font-ui)!important;margin:0 0 5px}
.view .e8-context p{margin:0;color:var(--theme-muted)!important}
.view .e8-context .e8-chip{background:var(--theme-hover)!important;border-color:var(--theme-line)!important;color:var(--theme-text-2)!important}
@media(max-width:600px){.app>main{padding:16px 12px!important}.view .card>.toprow{flex-wrap:wrap;gap:8px}.view table th,.view table td{padding:8px!important}main>.toprow h1{font-size:23px!important}}
@media(max-width:700px){
 .view .register-combined-toolbar>.toprow{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
 .view .register-combined-toolbar>.toprow>.filters{grid-column:1;flex-wrap:wrap!important;width:100%;gap:8px!important}
 body .view .register-combined-toolbar>.toprow>.filters>input:not([type=checkbox]):not([type=radio]){width:100%!important;max-width:100%!important;flex:1 1 100%!important;min-width:0!important}
 .view .register-combined-toolbar>.toprow>.actions{grid-column:1;justify-content:flex-start!important;flex-wrap:wrap!important;margin-left:0!important;max-width:100%!important;overflow:visible!important}
}

/* A current-page marker is distinct from the transient open-menu highlight. */
#persistentApp.horizontal nav>.nav-group:not(.open)>.nav-group-toggle[data-current="true"]{background:transparent!important;color:var(--nav-ink)!important;box-shadow:inset 0 -2px var(--er-violet,#6d28d9)!important}
#persistentApp.horizontal nav>.nav-group.open>.nav-group-toggle{background:var(--nav-selected)!important;color:var(--nav-selected-ink)!important;box-shadow:none!important}

/* Existing workspace density; shared base owns the actual typography rules. */
body[data-view]{--ui-font-size-sub:13px;--ui-font-size-h1:26px;--ui-font-size-h2:19px;--fs-sub:var(--ui-font-size-sub);--fs-h1:var(--ui-font-size-h1);--fs-h2:var(--ui-font-size-h2)}
