/* CALIBRO 8108 shared skin. Values are authored in calibro/brand.json. */
:root {
  --ink: var(--text-primary); --muted: var(--text-secondary); --line: var(--border);
  --soft: var(--background); --paper: var(--surface); --nav: var(--brand);
  --brand-2: var(--brand); --primary: var(--brand);
}
html { color-scheme: light; }
body { color: var(--text-primary); background: var(--background); font-family: var(--font-family); font-size: var(--text-body); line-height: 1.55; }
.session-gate {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
  background: var(--background);
  visibility: hidden;
  animation: calibro-session-gate-show 0s linear 1.5s forwards;
}
.session-gate-content { display: grid; justify-items: center; gap: 14px; text-align: center; }
.session-gate-content img { display: block; width: min(220px,70vw); height: auto; }
.session-gate-content p { margin: 0; color: var(--text-secondary); font-size: var(--text-label); }
@keyframes calibro-session-gate-show { to { visibility: visible; } }
*, *::before, *::after { box-sizing: border-box; }
h1,h2,h3,h4 { color: var(--text-primary); letter-spacing: -.025em; }
h1,.topbar h1,.planning-topbar h1 { font-size: var(--text-page-title); line-height: 1.18; font-weight: var(--weight-heading); }
h2,.panel h2,.section-title h2 { font-size: var(--text-section-title); line-height: 1.3; }
h3,.card h3 { font-size: var(--text-card-title); }
label { font-size: var(--text-label); }
small,.caption { font-size: var(--text-caption); }
a { color: var(--brand); text-underline-offset: 3px; }
button { min-height: 40px; font-size: var(--text-button); border: 1px solid transparent; border-radius: var(--radius); background: var(--brand); box-shadow: none; }
button:hover:not(:disabled) { background: var(--text-secondary); box-shadow: none; transform: none; }
button.blue,button.ok,button.warn,button.violet { background: var(--brand); color: var(--surface); }
button.blue:hover:not(:disabled),button.ok:hover:not(:disabled),button.warn:hover:not(:disabled),button.violet:hover:not(:disabled) { background: var(--text-secondary); color: var(--surface); }
button.secondary,.button.secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text-primary); box-shadow: none; }
button.secondary:hover:not(:disabled) { background: var(--status-neutral); border-color: var(--brand); color: var(--text-primary); }
button.danger { color: #8A2626; background: var(--surface); border-color: currentColor; }
button.danger:hover:not(:disabled) { color: #8A2626; background: var(--background); border-color: currentColor; }
button.ghost { color: var(--text-primary); background: var(--surface); border-color: var(--border); box-shadow: none; }
button.ghost:hover:not(:disabled) { color: var(--text-primary); background: var(--status-neutral); border-color: var(--brand); box-shadow: none; }
button:disabled,input:disabled,select:disabled,textarea:disabled { opacity: .65; cursor: not-allowed; box-shadow: none; }
:where(button,a,input,select,textarea,summary,[tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; box-shadow: none; }
input:not([type=checkbox]):not([type=radio]),select,textarea { color: var(--text-primary); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
input:not([type=checkbox]):not([type=radio]),select { min-height: 42px; }
input:focus,select:focus,textarea:focus { border-color: var(--focus); box-shadow: none; }
input[type=checkbox],input[type=radio],progress { accent-color: var(--brand); }
input::placeholder,textarea::placeholder { color: var(--disabled); opacity: 1; }
.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
/* Shared shell and navigation retain their existing routes and event hooks. */
.shell { --sidebar-width: 246px; grid-template-columns: var(--sidebar-width) minmax(0,1fr); }
.sidebar { background: var(--surface); color: var(--text-primary); border-right: 1px solid var(--border); padding: 16px 12px; }
.brand { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0 8px 18px; box-shadow: none; margin-bottom: 16px; }
.mark { height: 76px; }
.mark img { width: 100%; height: auto; object-fit: contain; }
.brand span,.brand-user-role { color: var(--text-secondary); }
.brand .brand-user-name { color: var(--text-primary); font-size: var(--text-label); }
.sidebar .brand-user-role { font-size: var(--text-caption); line-height: 1.35; }
.user-profile-trigger { color: var(--text-primary); }
.user-profile-trigger:hover:not(:disabled) { background: var(--status-neutral); color: var(--text-primary); }
.logout-icon { color: var(--text-secondary); border: 1px solid var(--border); background: var(--surface); }
.nav { gap: 3px; }
.nav button { min-height: 42px; padding: 9px 10px; color: var(--text-secondary); border: 1px solid transparent; font-size: var(--text-label); }
.nav-icon { width: 19px; height: 19px; filter: grayscale(1); opacity: .7; }
.nav button.active { background: var(--brand); color: var(--surface); }
.nav button.active .nav-icon { filter: brightness(0) invert(1); }
.nav button:hover:not(.active) { background: var(--status-neutral); color: var(--text-primary); }
.nav button:hover:not(.active) .nav-icon { filter: grayscale(1); }
.content { padding: clamp(20px,2.3vw,34px); }
.topbar { align-items: flex-start; gap: 18px 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.topbar > div:first-child { min-width: 0; flex: 1 1 320px; }
.topbar .toolbar { min-width: 0; max-width: 100%; }
.topbar p,.planning-topbar p { max-width: 72ch; color: var(--text-secondary); font-size: var(--text-label); line-height: 1.55; }
/* Components: neutral surfaces, service accents, independent status labels. */
.panel,.card,.kanban-card,.quote-card,.wo-detail,.governance-unit-card,.training-card,.timing-editor,.timing-sidebar { background: var(--surface); border-color: var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.panel { padding: clamp(18px,1.8vw,24px); }
.card { padding: 18px; }
.section-title { gap: 12px 20px; margin-bottom: 18px; align-items: flex-start; flex-wrap: wrap; }
.section-title > div:first-child { min-width: 0; }
.section-title h2,.section-title h3 { margin: 0; }
.section-title p,.section-title small { color: var(--text-secondary); font-size: var(--text-label); line-height: 1.5; }
.section-title p { max-width: 72ch; margin-top: 5px; }
.row,.wo-row,.wo-task-card,.training-row,.timing-phase-card { border-color: var(--border); }
.table-wrap { border-color: var(--border); border-radius: var(--radius); }
table { font-size: var(--text-table); }
th { color: var(--text-secondary); background: var(--background); font-size: var(--text-caption); font-weight: var(--weight-label); }
td,th { border-color: var(--border); }
tbody tr:hover { background: color-mix(in srgb,var(--background) 50%,var(--surface)); }
.chip,.chip.ok,.chip.warn,.chip.danger,.chip.blue,.chip.violet,.chip.dark { background: var(--status-neutral); color: var(--text-primary); border: 1px solid var(--border); border-radius: 5px; font-size: var(--text-badge); font-weight: var(--weight-label); box-shadow: none; }
.notice,.notice.ok,.notice.warn,.notice.blue,.notice.violet { color: var(--text-primary); background: var(--background); border: 1px solid var(--border); border-left: 3px solid var(--text-secondary); border-radius: var(--radius); }
.notice.danger { background: var(--surface); color: #8A2626; border: 1px solid var(--border); border-left: 3px solid currentColor; }
.empty { color: var(--text-secondary); background: transparent; border-color: var(--border); border-radius: var(--radius); }
.modal-backdrop,.modal-overlay { background: var(--overlay); backdrop-filter: none; }
.modal,.modal-card,.modal-content { color: var(--text-primary); background: var(--surface); border-color: var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.tabs button,.tabbar button,.training-tabs button,.wo-page-switch button { box-shadow: none; }
.tabs button.active,.tabbar button.active,.training-tabs button.active,.wo-page-switch button.active { background: var(--brand); color: var(--surface); border-color: var(--brand); }
.calibro-service-badge { display: inline-flex!important; align-items: center; gap: 7px; width: fit-content; max-width: 100%; padding: 4px 7px 4px 5px; border: 1px solid var(--border); border-left: 3px solid var(--service-color,var(--border)); border-radius: 4px; background: color-mix(in srgb,var(--service-color,var(--background)) 9%,var(--surface)); color: var(--text-primary)!important; font-size: var(--text-caption); font-weight: 600; line-height: 1.4; text-align: left; vertical-align: middle; white-space: normal; }
.calibro-service-badge > b { display: inline-block; font-size: var(--text-badge); font-weight: 800; letter-spacing: .045em; white-space: nowrap; }
.calibro-service-badge > span:not(.sr-only) { display: inline!important; color: inherit!important; font-size: inherit!important; margin: 0; }
.calibro-service-card[data-service],.wo-detail-status[data-service],.timing-profile-card[data-service] { border-left: 3px solid var(--service-color); }
.quote-card.calibro-service-card[data-service] { border-top-color: var(--border); background: var(--surface); }
.calibro-service-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.calibro-service-code { display: inline-block; padding: 2px 5px; margin-right: 5px; border-radius: 3px; background: color-mix(in srgb,var(--service-color) 16%,var(--surface)); color: var(--text-primary); font-size: var(--text-badge); }
label.requested-service-option[data-service] { border-left: 3px solid var(--service-color); background: var(--surface); }
label.requested-service-option[data-service].is-selected { border-color: var(--service-color); background: color-mix(in srgb,var(--service-color) 8%,var(--surface)); }
/* CALIBRO overview: real data from the existing authorized workorder snapshot. */
.calibro-overview { margin-bottom: 30px; }
.calibro-service-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 16px; }
.calibro-overview-card { display: flex; flex-direction: column; min-width: 0; padding: 20px; border: 1px solid var(--border); border-top: 4px solid var(--service-color); border-radius: var(--radius-card); background: var(--surface); }
.calibro-overview-card[data-service] { border-left-width: 1px; border-left-color: var(--border); }
.calibro-overview-card > p { color: var(--text-secondary); margin: 12px 0; font-size: var(--text-label); }
.calibro-service-metric { display: flex; gap: 12px; align-items: center; margin: 8px 0 18px; }
.calibro-service-metric > strong { font-size: 2.25rem; line-height: 1; font-weight: 750; }
.calibro-service-metric > span { font-size: var(--text-label); }
.calibro-caption { display: block; color: var(--text-secondary); font-size: var(--text-caption); }
.calibro-service-due { display: grid; gap: 4px; padding-top: 12px; margin-top: auto; border-top: 1px solid var(--border); font-size: var(--text-caption); }
.calibro-service-due > span { color: var(--text-secondary); }
.calibro-service-link { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 16px; white-space: normal; text-align: left; }
.calibro-service-records { display: grid; gap: 6px; margin-top: 12px; }
.calibro-service-records button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; width: 100%; color: var(--text-primary); background: transparent; padding: 6px 0; border-bottom: 1px solid var(--border); border-radius: 0; white-space: normal; text-align: left; font-size: var(--text-label); }
.calibro-service-records button:hover:not(:disabled) { background: var(--background); }
.calibro-service-records button span:first-child { overflow-wrap: anywhere; }
.dashboard-metric-icon,.dashboard-metric-icon.ok,.dashboard-metric-icon.warn,.dashboard-metric-icon.danger,.dashboard-metric-icon.blue,.dashboard-metric-icon.violet { background: var(--status-neutral); color: var(--text-primary); }
.dashboard-metric-icon img { filter: grayscale(1); }
.dashboard-trend,.dashboard-trend.ok,.dashboard-trend.warn,.dashboard-trend.danger,.dashboard-trend.violet,.dashboard-action-rank { background: var(--status-neutral); color: var(--text-primary); }
.card.metric,.dashboard-panel,.dashboard-panel-button,.dashboard-money,.dashboard-score { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.dashboard-panel-button:hover:not(:disabled),.metric-button:hover:not(:disabled) { background: var(--surface); border-color: var(--brand); box-shadow: var(--shadow); }
.dashboard-view { gap: var(--space-6); }
.dashboard-role-section { gap: var(--space-4); }
.dashboard-role-section + .dashboard-role-section { margin-top: var(--space-2); padding-top: var(--space-6); }
.dashboard-panel .section-title { background: var(--surface); border-bottom-color: var(--border); }
.dashboard-panel .section-title h2 { color: var(--text-primary); font-size: var(--text-card-title); line-height: 1.35; }
.dashboard-panel .section-title p { font-size: var(--text-caption); line-height: 1.5; }
.dashboard-bar-track i,.dashboard-quote-track i { background: var(--text-secondary)!important; }
.workflow .step,.workflow .step.done,.workflow .step.blocked { background: var(--background); color: var(--text-primary); border-color: var(--border); }
.workflow .step b,.workflow .step span { color: var(--text-primary); }
.dashboard-action-rank.danger,.dashboard-action-rank.warn,.dashboard-action-rank.blue { background: var(--status-neutral); color: var(--text-primary); }
/* Module surfaces inherit the same controls; factual person markers remain secondary. */
.wo-client-hero,.wo-summary-card,.wo-detail-hero,.training-hero,.timing-profile-card,.governance-unit-card { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.support-hero h2 { color: var(--surface); }
.governance-app [data-governance-body] { display: grid; gap: 1rem; min-width: 0; }
.cp-root .cp-tile { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.wo-progress > span,.wo-progress > i,.training-progress > span { background: var(--service-color,var(--brand)); }
.planning-person-card.planning-person-warn,.planning-person-card.planning-person-danger { background: var(--surface); border-color: var(--border); }
.planning-event[data-service],.ap-event[data-service],.ap-task-row[data-service] { border-left-color: var(--service-color); }
/* Login: official signature and emblem, no reconstructed marks. */
.login-screen,.login-hero { background: var(--brand); }
.login-hero-copy { width: min(1380px,100%); grid-template-columns: minmax(0,1fr) minmax(330px,430px); gap: 48px; padding: clamp(28px,5vw,72px); }
.login-eyebrow { color: var(--surface-muted); font-size: var(--text-caption); font-weight: 600; letter-spacing: .1em; }
.login-hero h1 { font-size: clamp(38px,4.5vw,62px); font-weight: 650; line-height: 1.08; text-shadow: none; letter-spacing: -.035em; max-width: 650px; }
.login-hero .login-copy-main > p { color: var(--surface-muted); font-size: var(--text-body); max-width: 550px; line-height: 1.65; }
.login-form { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: none; backdrop-filter: none; padding: 30px; }
.login-form-logo { width: min(330px,100%); margin: 0 auto; }
.login-form-head { text-align: left; }
.login-form-head h2,.login-form label { color: var(--text-primary); }
.login-form button:not(.password-toggle):not(.forgot-password) { background: var(--brand); box-shadow: none; }
.login-form .forgot-password { color: var(--text-primary); background: transparent; border: 0; }
.login-form .password-toggle { background: transparent; color: var(--text-secondary); border: 0; }
.login-form .password-toggle:hover:not(:disabled) { color: var(--text-primary); background: var(--status-neutral); }
.login-points.calibro-login-services { gap: 10px; }
.login-points .calibro-service-badge { border: 1px solid var(--text-secondary); border-left: 3px solid var(--service-color); border-radius: 4px; background: var(--brand); color: var(--surface)!important; padding: 7px 9px; backdrop-filter: none; }
.login-points .calibro-service-badge > span { background: transparent; border: 0; padding: 0; min-height: 0; font-weight: 500; backdrop-filter: none; }
.calibro-method { display: flex; align-items: center; gap: 18px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--text-secondary); color: var(--surface-muted); font-size: var(--text-caption); }
.calibro-method img { width: 96px; height: 96px; object-fit: contain; background: var(--background); border-radius: 6px; padding: 8px; }
.login-hero-media { display: none; }
.login-error { grid-column: 2; margin: 0; }
/* Standalone request, verification and capture portals. */
.calibro-public-brand { display: block; width: fit-content; max-width: 100%; line-height: 0; }
.calibro-public-brand img { width: 260px; max-width: 100%; height: auto; }
.calibro-capture-page { background: var(--background); color: var(--text-primary); }
.calibro-capture-page .capture-brand { background: var(--surface); color: var(--text-primary); border-color: var(--border); box-shadow: none; }
.calibro-capture-page .capture-brand img { width: 260px; height: auto; max-width: 100%; }
.calibro-capture-page .capture-brand p,.calibro-capture-page .capture-brand small { color: var(--text-secondary); }
.calibro-capture-page .capture-card,.calibro-capture-page .capture-panel { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.calibro-capture-page button { background: var(--brand); box-shadow: none; }
.calibro-capture-page progress::-webkit-progress-value { background: var(--brand); }
@media (max-width:1100px) {
  .shell { --sidebar-width: 224px; grid-template-columns: var(--sidebar-width) minmax(0,1fr); }
  .content { padding: 22px; }
  .calibro-service-grid { gap: 12px; }
  .calibro-overview-card { padding: 14px; }
  .calibro-service-badge { gap: 5px; }
  .login-hero-copy { gap: 32px; padding: 38px; }
}
@media (max-width:900px) {
  .calibro-overview-card { padding: 18px; }
  .calibro-service-metric { margin: 14px 0; }
  .login-hero-copy { grid-template-columns: minmax(0,1fr) minmax(290px,340px); gap: 24px; padding: 28px; }
  .login-hero h1 { font-size: 38px; }
  .login-form { padding: 24px; }
}
@media (max-width:900px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: sticky; top: 0; height: auto; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { grid-template-columns: minmax(115px,160px) minmax(0,1fr) 32px; gap: 10px; align-items: center; padding: 0 0 10px; margin-bottom: 10px; }
  .mark { grid-column: auto; height: auto; }
  .brand .brand-user-name { font-size: var(--text-caption); }
  .brand-user-role { font-size: var(--text-caption); }
  .nav { display: flex; overflow-x: auto; padding-bottom: 5px; gap: 4px; }
  .nav button { flex: 0 0 auto; width: auto; min-height: 42px; padding: 8px 10px; }
  .nav-icon { width: 16px; height: 16px; }
  .content { padding: 18px 14px; }
  .topbar { align-items: flex-start; flex-wrap: wrap; gap: 12px; padding-bottom: 16px; }
  .topbar .toolbar { flex-wrap: wrap; max-width: 100%; }
  .panel { padding: 16px; }
  .calibro-overview { margin-bottom: 24px; }
  .login-hero-copy { grid-template-columns: minmax(0,1fr); grid-template-areas: "copy" "form"; min-height: 100dvh; padding: 32px 20px; gap: 28px; }
  .login-copy-main { display: block; }
  .login-hero h1 { font-size: 36px; }
  .login-hero .login-copy-main > p { font-size: var(--text-label); }
  .calibro-method { display: none; }
  .login-points.calibro-login-services { margin-top: 18px; gap: 7px; }
  .login-form { width: 100%; max-width: 440px; justify-self: center; }
  .login-error { grid-column: 1; }
  .calibro-public-brand img { width: 220px; }
}
@media print {
  body { background: white; }
  .sidebar,.calibro-service-link { display: none!important; }
  .shell { display: block; }
  .calibro-service-badge { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior: auto!important; transition-duration: 0s!important; animation-duration: 0s!important; } }
.login-hero .login-form-head p,.login-hero .login-form-head small { color: var(--text-secondary); font-size: var(--text-label); }
@media(max-width:700px) {
  .login-points.calibro-login-services { display: flex; }
  .login-points.calibro-login-services .calibro-service-badge { flex: 0 1 auto; width: fit-content; }
  .login-points.calibro-login-services .calibro-service-badge > span { flex: 0 1 auto; width: auto; }
}
.wo-metric { min-width: 0; }
.wo-metric > strong { overflow-wrap: anywhere; white-space: normal; font-size: clamp(1rem,1.5vw,1.4rem); }
.calibro-capture-page .capture-spinner { border-color: var(--border); border-top-color: var(--brand); }
.calibro-capture-page .capture-eyebrow { color: var(--text-secondary); }
.calibro-capture-page .capture-help { color: var(--text-primary); background: var(--background); border: 1px solid var(--border); }
.calibro-capture-page .capture-upload-progress { background: var(--border); }
.calibro-capture-page .capture-upload-progress i { background: var(--brand); }
.dashboard-view .dashboard-kpis .metric,.dashboard-view button.dashboard-panel-button { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.dashboard-view .dashboard-kpis .metric::before { background: var(--border); height: 2px; }
.dashboard-view .dashboard-kpis button.metric-button:hover:not(:disabled),.dashboard-view button.dashboard-panel-button:hover:not(:disabled) { transform: none; background: var(--surface); border-color: var(--brand); box-shadow: var(--shadow); }
.dashboard-view .metric .chip,.dashboard-view .metric .dashboard-trend { background: var(--status-neutral); color: var(--text-primary); border-color: var(--border); }
.dashboard-view .dashboard-metric-icon img { filter: grayscale(1); }
.dashboard-view .crm-workflow .step.done,.dashboard-view .crm-workflow .step.blocked { background: var(--background); border-color: var(--border); box-shadow: none; }
.dashboard-view .crm-workflow .step::before { background: var(--text-secondary); }
.dashboard-view .dashboard-money-grid > span,.dashboard-view .dashboard-quote-item { background: var(--background); border-color: var(--border); color: var(--text-primary); }
.dashboard-view .dashboard-action-list button { min-width: 0; white-space: normal; }
.dashboard-view .dashboard-action-list button > span { min-width: 0; }
.dashboard-view .dashboard-action-list strong,.dashboard-view .dashboard-action-list small,.dashboard-view .dashboard-action-list em { white-space: normal; overflow-wrap: anywhere; }
.calibro-capture-page button.secondary { background: var(--surface); color: var(--text-primary); border-color: var(--border); }
@media(max-width:900px) {
  .sidebar { display: block; }
  .sidebar .brand { width: 100%; }
}
.sidebar .brand-copy,.sidebar .user-profile-trigger { min-width: 0; }
.sidebar .user-profile-trigger { max-width: 100%; }
.sidebar .brand-user-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}
.sidebar .brand-user-role {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  font-size: var(--text-badge);
  letter-spacing: -.01em;
}
@media(min-width:901px) {
  .shell > .content { grid-column: 2; }
  .sidebar {
    display: flex;
    flex-direction: column;
    align-self: start;
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    min-width: 0;
    overflow: hidden;
    box-shadow: none;
  }
  .sidebar .brand { flex: 0 0 auto; grid-template-columns: minmax(0,1fr) 34px; }
  .sidebar .mark { grid-column: 1/-1; }
  .sidebar .nav {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    align-content: start;
    grid-auto-rows: min-content;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
.sidebar .nav button { width: 100%; }
}

/* Operational layout: the same alignment and density across overview, records and dialogs. */
.shell > .content { width: 100%; max-width: 1680px; margin-inline: auto; }
.content { padding: clamp(20px,2.2vw,32px); }
.topbar { margin-bottom: 22px; }
.topbar p { max-width: 64ch; }
.dashboard-view { gap: 24px; }
.dashboard-role-section { gap: 16px; }
.dashboard-role-section + .dashboard-role-section { margin-top: 0; padding-top: 22px; }
.panel,.card { border-radius: var(--radius-card); }
.section-title { align-items: center; }
.section-title p { max-width: 66ch; }
input,select,textarea { font-family: var(--font-family); font-size: var(--text-label); }
button { font-family: var(--font-family); font-size: var(--text-button); font-weight: 650; }
select { padding-right: 32px; }

/* The three service cards keep their full record links, but place the key facts side by side. */
.calibro-overview { margin-bottom: 0; }
.calibro-overview > .section-title { margin-bottom: 14px; }
.calibro-service-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.calibro-overview-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  align-content: start;
  gap: 0 12px;
  padding: 16px 18px;
}
.calibro-overview-card > .calibro-service-badge,
.calibro-overview-card > p,
.calibro-service-records,
.calibro-overview-card > .calibro-service-link { grid-column: 1 / -1; }
.calibro-overview-card > p { margin: 8px 0 10px; font-size: var(--text-caption); line-height: 1.45; }
.calibro-service-metric { gap: 8px; margin: 0; min-width: 0; align-items: center; }
.calibro-service-metric > strong { font-size: 1.9rem; }
.calibro-service-metric > span { font-size: var(--text-caption); line-height: 1.35; }
.calibro-service-due { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: 0 0 0 12px; margin: 0; border-top: 0; border-left: 1px solid var(--border); font-size: var(--text-caption); }
.calibro-service-due strong { overflow-wrap: anywhere; }
.calibro-service-records { margin-top: 12px; border-top: 1px solid var(--border); }
.calibro-service-records button { margin: 0; padding: 8px 2px; font-size: var(--text-caption); line-height: 1.4; }
.calibro-service-records .calibro-caption { font-size: var(--text-badge); }
.calibro-service-link { min-height: 38px; margin-top: 10px; padding: 7px 11px; font-size: var(--text-caption); }

/* Scan-friendly dashboard indicators and uniform panel headings. */
.dashboard-grid.dashboard-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.dashboard-grid.dashboard-kpis > .metric { grid-column: auto; min-width: 0; }
.dashboard-kpis .metric { min-height: 108px; padding: 13px 14px; }
.dashboard-kpis .metric::before { height: 3px; }
.dashboard-metric-head { gap: 8px; }
.dashboard-metric-icon { width: 28px; height: 28px; border-radius: 6px; }
.dashboard-metric-icon img { width: 16px; height: 16px; }
.dashboard-kpis .metric span { font-size: var(--text-caption); line-height: 1.3; }
.dashboard-kpis .metric b { margin: 5px 0; font-size: 1.75rem; }
.dashboard-kpis .metric .chip { padding: 0; border: 0; background: transparent; font-size: var(--text-badge); font-weight: 500; }
.dashboard-trend { min-height: 22px; padding: 3px 6px; border-radius: 5px; font-size: var(--text-badge); }
.dashboard-panel,.dashboard-panel-button { min-width: 0; }
.dashboard-panel .section-title { background: var(--surface); padding-block: 12px; margin-bottom: 12px; }
.dashboard-panel .section-title h2 { font-size: var(--text-card-title); }
.dashboard-panel .section-title p { font-size: var(--text-caption); }

/* The automation readiness message becomes a compact summary above the work list. */
.wo-automation-readiness { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px 18px; align-items: center; padding: 16px 18px; }
.wo-automation-readiness > .section-title { grid-column: 1 / -1; margin: 0; }
.wo-automation-readiness > .section-title p { max-width: 78ch; }
.wo-automation-readiness > .chips { grid-column: 1; gap: 6px; }
.wo-automation-readiness > .wo-form-actions { grid-column: 2; grid-row: 2; margin: 0; }
.wo-metrics > .metric { min-height: 96px; padding: 14px 16px; }
.wo-metrics > .metric span { font-size: var(--text-caption); }
.wo-metrics > .metric b { font-size: 1.5rem; }
.wo-metrics > .metric .chip { width: fit-content; margin-top: 4px; }

/* Quotes: compact KPIs, aligned filter rows, readable record actions. */
.quote-registry { gap: 14px; }
.quote-registry-kpis { gap: 12px; }
.quote-registry-kpis .metric { min-height: 106px; padding: 13px 15px; }
.quote-registry-kpis .metric span { font-size: var(--text-caption); }
.quote-registry-kpis .metric b { margin: 5px 0; font-size: 1.55rem; }
.quote-registry-kpis .metric small { font-size: var(--text-badge); line-height: 1.4; }
.quote-status-tab { min-height: 46px; padding: 8px 10px; font-size: var(--text-caption); }
.quote-quick-filters { grid-template-columns: repeat(12,minmax(0,1fr)); gap: 9px 10px; padding: 12px 14px; }
.quote-quick-filters > * { min-width: 0; }
.quote-quick-filters > .quote-search-control { grid-column: span 6; }
.quote-quick-filters > label { grid-column: span 3; }
.quote-quick-filters > .quote-toolbar-button,
.quote-quick-filters > .quote-filter-clear,
.quote-quick-filters > .quote-filter-result { grid-column: span 3; }
.quote-quick-filters > label,.quote-advanced-filters > label { color: var(--text-secondary); font-size: var(--text-caption); }
.quote-quick-filters select,.quote-advanced-filters select { font-size: var(--text-label); }
.quote-quick-filters .quote-filter-result { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 7px 10px; background: var(--background); border-color: var(--border); }
.quote-quick-filters .quote-filter-result strong { font-size: var(--text-body); }
.quote-quick-filters .quote-filter-result span { margin-top: 0; font-size: var(--text-badge); }
.quote-card { border-color: var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.quote-card-main { gap: 12px; padding: 14px; }
.quote-card-heading h3 { font-size: var(--text-card-title); white-space: normal; overflow-wrap: anywhere; }
.quote-card-heading small,.quote-card-tags,.quote-card-value > span,.quote-card-owner > span,.quote-card-value small,.quote-card-owner small,.quote-card-timing small { font-size: var(--text-badge); }
.quote-card-owner strong { font-size: var(--text-caption); }
.quote-card-primary-actions button { min-height: 40px; font-size: var(--text-caption); }

/* Training and organization use the same compact KPI and tab language. */
.training-toolbar,.governance-toolbar { padding: 12px 16px; }
.training-tabs,.governance-tabs { gap: 6px; }
.training-tabs button,.governance-tabs button { min-height: 40px; padding: 8px 12px; border-radius: var(--radius); }
.training-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
@media (min-width: 1101px) {
  .training-kpis:has(> :nth-child(5):last-child) { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .training-kpis:has(> :nth-child(5):last-child) > * { grid-column: span 2; }
  .training-kpis:has(> :nth-child(5):last-child) > :nth-child(n+4) { grid-column: span 3; }
}
.training-kpi,.governance-kpi { min-height: 100px; align-content: space-between; gap: 8px; padding: 14px 16px; }
.training-kpi .chip,.governance-kpi .chip { padding: 0; border: 0; background: transparent; font-size: var(--text-caption); line-height: 1.4; white-space: normal; }
.training-kpi strong,.governance-kpi strong { font-size: clamp(1.5rem,2vw,1.85rem); line-height: 1.1; }
.training-grid,.governance-grid { gap: 14px; }

/* Dialogs share one frame; longer forms retain their own width and internal scrolling. */
.modal-card { width: min(640px,100%); max-height: min(820px,calc(100dvh - 40px)); }
.modal-head { align-items: center; padding: 15px 20px; background: var(--surface); }
.modal-head h2 { color: var(--text-primary); font-size: var(--text-section-title); }
.modal-head p { font-size: var(--text-caption); line-height: 1.45; }
.modal-body { padding: 18px 20px 20px; }

@media (max-width: 1300px) {
  .dashboard-grid.dashboard-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1100px) {
  .calibro-service-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid.dashboard-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .training-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .quote-quick-filters > .quote-search-control { grid-column: span 6; }
}
@media (max-width: 900px) {
  .content { padding: 20px; }
  .calibro-service-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quote-quick-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quote-quick-filters > .quote-search-control { grid-column: span 2; }
  .quote-quick-filters > label,
  .quote-quick-filters > .quote-toolbar-button,
  .quote-quick-filters > .quote-filter-clear { grid-column: span 1; }
  .quote-quick-filters > .quote-filter-result { grid-column: span 2; }
  .governance-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .content { padding: 16px 14px 28px; }
  .dashboard-view { gap: 20px; }
  .calibro-service-grid { grid-template-columns: minmax(0,1fr); }
  .calibro-overview-card { padding: 15px; }
  .dashboard-grid.dashboard-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-kpis .metric { min-height: 114px; padding: 12px; }
  .training-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .training-toolbar,.governance-toolbar { padding: 12px; }
  .dashboard-metric-foot { flex-wrap: wrap; }
  .wo-automation-readiness { grid-template-columns: minmax(0,1fr); }
  .wo-automation-readiness > .section-title,
  .wo-automation-readiness > .chips,
  .wo-automation-readiness > .wo-form-actions { grid-column: 1; grid-row: auto; }
  .wo-automation-readiness > .wo-form-actions button { width: 100%; }
  .quote-status-tabs { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); }
  .quote-status-tab { grid-column: span 2; gap: 4px; padding-inline: 5px; }
  .quote-status-tab:nth-child(4),.quote-status-tab:nth-child(5) { grid-column: span 3; }
  .quote-registry-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quote-registry-kpis .metric { min-height: 110px; }
  .quote-quick-filters { padding: 12px; }
  .quote-quick-filters > .quote-toolbar-button,
  .quote-quick-filters > .quote-filter-clear { white-space: normal; }
  .modal-backdrop { padding: 12px; }
  .modal-card { max-height: calc(100dvh - 24px); }
  .modal-head { padding: 13px 16px; }
  .modal-body { padding: 16px; }
}

/* ADMIN IT and Manager settings use the same neutral hierarchy as the rest of CALIBRO. */
.admin-settings-grid { gap: 16px; }
.admin-settings-grid .settings-role-context { color: var(--text-secondary); font-size: var(--text-label); }
.settings-overview { gap: 14px; }
.settings-overview-intro {
  gap: 16px;
  padding: 18px 20px;
  border-color: var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.settings-eyebrow { color: var(--text-secondary); font-size: var(--text-badge); letter-spacing: .05em; }
.settings-overview-intro h2,.settings-detail-heading h2 { color: var(--text-primary); }
.settings-overview-intro p,.settings-detail-heading p { color: var(--text-secondary); font-size: var(--text-label); }
.settings-overview-count { flex-basis: 100px; border: 1px solid var(--border); background: var(--background); color: var(--text-primary); box-shadow: none; }
.settings-overview-count span { color: var(--text-secondary); font-size: var(--text-badge); }
.settings-overview-grid { gap: 14px; align-items: start; }
.settings-group-card { border-color: var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.settings-group-card > header { padding: 15px 17px 13px; border-bottom-color: var(--border); background: var(--background); }
.settings-group-mark { background: var(--brand); }
.settings-group-card h3 { color: var(--text-primary); font-size: var(--text-card-title); }
.settings-group-card header p { color: var(--text-secondary); font-size: var(--text-caption); }
.settings-group-links { padding: 4px 10px 8px; }
.settings-overview-link { min-width: 0; padding: 10px 8px; border-bottom-color: var(--border); color: var(--text-primary); white-space: normal; }
.settings-overview-link > span:first-child { min-width: 0; }
.settings-overview-link strong { color: var(--text-primary); font-size: var(--text-label); line-height: 1.35; }
.settings-overview-link small { color: var(--text-secondary); font-size: var(--text-caption); font-weight: 400; line-height: 1.4; white-space: normal; }
.settings-overview-link:hover:not(:disabled),.settings-overview-link:focus-visible { padding-left: 8px; border-color: var(--border); background: var(--status-neutral); color: var(--text-primary); }
.settings-link-arrow { color: var(--text-secondary); }
.settings-detail-navigation { gap: 14px; border-color: var(--border); }
.settings-detail-heading h2 { font-size: var(--text-section-title); }
.settings-switcher > summary { border-color: var(--border); background: var(--surface); color: var(--text-primary); font-size: var(--text-label); }
.settings-switcher-groups { border-color: var(--border); background: var(--surface); box-shadow: var(--shadow); }
.settings-switcher-group > strong { color: var(--text-secondary); font-size: var(--text-badge); }

@media (max-width: 620px) {
  .settings-overview-intro { padding: 16px; }
  .settings-group-card > header { padding: 14px; }
  .settings-group-links { padding-inline: 8px; }
}
