:root {
  --ink: #17232d;
  --muted: #63717c;
  --line: #d8dfe3;
  --surface: #ffffff;
  --canvas: #f3f5f6;
  --brand: #00688b;
  --brand-dark: #003847;
  --accent: #00688b;
  --danger: #ad343e;
  --shadow: 0 8px 30px rgba(20, 35, 45, .08);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 15px; }
body.auth-pending > .app-header, body.auth-pending > main { visibility: hidden; }
body[data-role="user"] .delete { display: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 5vw; background: #00688b; border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: white; background: var(--brand); font-size: 12px; font-weight: 800; }
.brand-logo { box-sizing: border-box; padding: 4px; object-fit: contain; }
.brand .brand-mark { transition: background-color .2s ease; }
body[data-active-view="form-view"] .brand .brand-mark,
body[data-active-view="archive-view"] .brand .brand-mark { background: var(--brand); }
body[data-active-view="work-form-view"] .brand .brand-mark { background: #59404a; }
body[data-active-view="scheduled-maintenance-view"] .brand .brand-mark { background: #00688b; }
body[data-active-view="fleet-form-view"] .brand .brand-mark { background: #31566a; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.tabs { display: flex; align-self: stretch; gap: 24px; }
.tab { position: relative; border: 0; padding: 0 2px; color: var(--muted); background: transparent; font-weight: 650; }
.tab[hidden] { display: none !important; }
.tab.is-active { color: var(--brand); }
.tab.is-active::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: var(--brand); }
.header-shutdown { align-self: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 4px; color: var(--danger); background: white; font-size: 20px; line-height: 1; }
.header-shutdown:hover, .header-shutdown:focus { border-color: var(--danger); background: #f9ecee; outline: none; }
.header-session { align-self: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 4px; color: var(--brand); background: white; font-size: 19px; }
.session-profile { border: 0; color: inherit; background: transparent; }
.session-actions { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.session-identity { display: flex; align-items: center; gap: 7px; }
.session-status { color: var(--muted); font-size: 11px; font-weight: 700; }
.session-user { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; color: #315d59; background: transparent; font-size: 12px; font-weight: 800; white-space: nowrap; }
.session-user::before { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 3px; color: #fff; background: var(--accent); content: attr(data-initial); font-size: 11px; }
.count, .backup-nav-alert, .competency-nav-alert { box-sizing: border-box; display: inline-grid; width: 22px; min-width: 22px; height: 22px; margin-left: 5px; padding: 2px 0 0; place-items: center; border-radius: 3px; font-size: 13px; font-weight: 900; line-height: 1; vertical-align: middle; }
.count { color: var(--brand); background: #e2f0ed; }
.count[hidden] { display: none !important; }
.count.scheduled-count { color: #fff; background: var(--accent); }
.count.scheduled-count.is-critical { color: white; background: var(--danger); }
.backup-nav-alert { color: #171c20; background: #f3a719; }
.backup-nav-alert.is-critical { color: #fff; background: var(--danger); }
.backup-nav-alert[hidden] { display: none !important; }
.competency-nav-alert { color: #171c20; background: #f3a719; }
.competency-nav-alert.is-critical { color: #fff; background: var(--danger); }
.competency-nav-alert[hidden] { display: none !important; }

main { width: min(calc(1180px + 1cm), 92vw); margin: 36px auto 70px; }
.shutdown-message { max-width: 560px; padding: 48px; background: white; border: 1px solid var(--line); text-align: center; box-shadow: var(--shadow); }
.view { display: none; }
.view.is-active { display: block; }
#maintenance-form, #work-form, #fleet-form { overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.page-heading, .archive-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.page-heading { padding: 30px 34px 24px; color: white; background: var(--brand-dark); }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.1; letter-spacing: 0; }
h2 { margin: 0 0 18px; font-size: 16px; letter-spacing: 0; }
.sheet-number { display: flex; align-items: center; gap: 10px; }
.sheet-number label { display: block; flex: 0 0 auto; color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.sheet-number input { width: 150px; }
.sheet-number input { color: white; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.35); }
.sheet-number { position: relative; }
.sheet-number-warning { position: absolute; top: calc(100% + 7px); right: 0; z-index: 2; width: min(390px, 80vw); padding: 8px 10px; color: #00688b; background: #e7f5f7; border: 1px solid #87c5d0; border-radius: 4px; font-size: 11px; line-height: 1.35; }

.form-band { padding: 25px 34px; border-bottom: 1px solid var(--line); }
.field-grid { display: grid; gap: 18px; margin-bottom: 18px; }
.field-grid[hidden], label[hidden] { display: none !important; }
.field-grid:last-child { margin-bottom: 0; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.account-access-grid { grid-template-columns: repeat(6, minmax(0, 1fr)) auto; }
.personnel-panel #account-access-form > .account-access-grid { padding-bottom: 28px; }
.account-access-grid .personnel-inline-actions { align-self: end; margin-left: 7px; }
.account-access-grid .personnel-inline-actions .button { white-space: nowrap; }
.personnel-data-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.service-primary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; margin-bottom: 26px; }
.service-sheet-field { position: relative; }
.service-sheet-field .sheet-number-warning { margin-top: 5px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.technical-signals-grid > label:nth-child(-n+6) > :is(input, textarea) { height: 74px; min-height: 74px; }
label { display: grid; gap: 7px; color: #40515e; font-size: 12px; font-weight: 700; }
#manual-component-field[hidden] { display: none !important; }
.safety-organ-section { margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.safety-organ-section h2 { margin-bottom: 16px; }
.safety-organ-grid { margin-bottom: 0; }
#safety-organ-feedback[data-state="error"] { display: flex; align-items: center; gap: 9px; margin: 14px 0 0; padding: 9px 11px; color: var(--danger); background: #fff4f4; border-left-color: var(--danger); }
#safety-organ-feedback[data-state="error"]::before { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; color: #fff; background: var(--danger); content: "!"; font-size: 14px; font-weight: 900; }
.access-enabled-field { display: flex; align-items: center; align-self: end; gap: 9px; min-height: 42px; padding: 0 2px; color: var(--ink); cursor: pointer; }
.access-enabled-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.access-toggle-track { position: relative; flex: 0 0 42px; width: 42px; height: 24px; border: 1px solid #9daab2; border-radius: 14px; background: #e8edef; transition: background .18s ease, border-color .18s ease; }
.access-toggle-track::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20,35,45,.25); content: ""; transition: transform .18s ease; }
.access-enabled-field input:checked + .access-toggle-track { border-color: var(--brand); background: var(--brand); }
.access-enabled-field input:checked + .access-toggle-track::after { transform: translateX(18px); }
.access-enabled-field input:focus-visible + .access-toggle-track { outline: 3px solid rgba(0,104,139,.2); outline-offset: 2px; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #bdc8ce; border-radius: 4px; padding: 10px 11px; color: var(--ink); background: #fff; outline: none; }
.date-entry-control { position: relative; display: block; width: 100%; }
.date-entry-control .date-native-input { position: absolute; right: 8px; top: 50%; z-index: 1; display: block !important; width: 28px; height: 28px; margin: 0; padding: 0; opacity: 0; pointer-events: none; transform: translateY(-50%); }
.date-entry-control .date-entry-input { width: 100%; padding-right: 42px; }
.date-entry-picker { position: absolute; right: 4px; top: 50%; z-index: 2; display: grid; width: 32px; height: 32px; padding: 0; border: 0; place-items: center; color: #40515e; background: transparent; font-size: 15px; transform: translateY(-50%); }
.date-entry-picker:hover, .date-entry-picker:focus-visible { color: var(--brand); background: #eef3f4; outline: none; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(18,99,91,.12); }
.choice-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 18px; }
.choice-grid label { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: #f8fafb; }
.choice-grid input { width: 17px; height: 17px; accent-color: var(--brand); }
.narrative-fields > label { margin-bottom: 18px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 22px 34px; background: #f8fafb; }
.work-attachment-control { display: flex; align-items: center; min-width: 0; gap: 9px; }
.work-attachment-status { max-width: 260px; overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.work-attachment-progress { display: inline-flex; align-items: center; gap: 7px; }
.work-attachment-progress[hidden] { display: none !important; }
.work-attachment-progress progress { width: 150px; height: 10px; accent-color: var(--accent); }
.work-attachment-progress small { min-width: 32px; color: var(--muted); font-size: 11px; font-weight: 800; }
.work-heading { background: #59404a; }
.scheduled-heading { background: #00688b; }
.scheduled-heading > div > p:last-child { margin: 9px 0 0; color: #d8e0e4; }
#work-center-view, #scheduled-maintenance-view { background: transparent; }
.scheduled-table-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); }
.scheduled-table { width: 100%; min-width: 1050px; border-collapse: collapse; }
.scheduled-table th, .scheduled-table td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.scheduled-table th { color: #40515e; background: #eef2f3; font-size: 12px; }
.scheduled-table tbody tr:nth-child(even) { background: #f4f7f8; }
.scheduled-table tbody tr:last-child td { border-bottom: 0; }
.scheduled-table small, .scheduled-missing { color: var(--muted); }
.scheduled-remaining { color: #00688b; font-family: Bahnschrift, Consolas, monospace; font-weight: 750; }
.scheduled-overdue { color: var(--danger); }
.scheduled-open-button { white-space: nowrap; }
.scheduled-inline-workflow { margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.scheduled-inline-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 450px; gap: 20px; min-height: 0; height: 100%; background: #e7eef1; }
.scheduled-inline-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; color: white; background: #00688b; }
.scheduled-inline-heading .eyebrow { margin: 0 0 3px; color: #d8e7ea; }
.scheduled-inline-heading h2 { margin: 0; font-size: 19px; }
.scheduled-inline-heading .scheduled-state-tag { color: #216844; background: #e4f3e9; }
.alert-row-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.alert-row-title strong { min-width: 0; }
.scheduled-state-tag { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; color: #8a5900; background: #fff0c9; font-size: 11px; font-weight: 850; white-space: nowrap; }
.scheduled-state-tag.is-in-progress { color: #00688b; background: #dff4f3; }
.scheduled-state-tag.is-ready { color: #fff; background: #2d9b46; }
.scheduled-inline-table-wrap { height: calc(100vh - 225px); height: calc(100dvh - 225px); display: grid; padding: 0 24px; overflow: hidden; place-items: start center; background: #e7eef1; }
.scheduled-document-sheet { box-sizing: border-box; display: flex; width: 1123px; height: 100%; min-height: 0; margin: 0 auto; padding: 20px; overflow: hidden; flex-direction: column; border-radius: 0; background: #fff; box-shadow: 0 5px 18px rgba(26, 48, 59, .20); }
.scheduled-inline-table-wrap .scheduled-checklist-table { display: block; width: 100%; min-width: 1019px; height: 100%; min-height: 0; flex: 1; table-layout: fixed; font-family: Arial, sans-serif; font-size: 10px; }
.scheduled-inline-table-wrap .scheduled-checklist-table thead { display: block; height: 60px; }
.scheduled-inline-table-wrap .scheduled-checklist-table tbody { display: block; height: calc(100% - 60px); overflow-y: auto; overflow-x: hidden; }
.scheduled-inline-table-wrap .scheduled-checklist-table thead tr, .scheduled-inline-table-wrap .scheduled-checklist-table tbody tr { display: table; width: 100%; table-layout: fixed; }
.scheduled-inline-table-wrap .scheduled-checklist-table th, .scheduled-inline-table-wrap .scheduled-checklist-table td { overflow-wrap: anywhere; border-color: #7b858a; }
.scheduled-inline-table-wrap .scheduled-checklist-table th { position: static; padding: 7px 5px; font-size: 8px; line-height: 1.1; }
.scheduled-inline-table-wrap .scheduled-checklist-table td { padding: 7px 5px; line-height: 1.2; }
.scheduled-inline-table-wrap .scheduled-checklist-table thead tr { height: 60px; }
.scheduled-inline-table-wrap .scheduled-checklist-table th:nth-child(1), .scheduled-inline-table-wrap .scheduled-checklist-table td:nth-child(1) { width: 43px; }
.scheduled-inline-table-wrap .scheduled-checklist-table th:nth-child(2), .scheduled-inline-table-wrap .scheduled-checklist-table td:nth-child(2) { width: 40px; }
.scheduled-inline-table-wrap .scheduled-checklist-table th:nth-child(3), .scheduled-inline-table-wrap .scheduled-checklist-table td:nth-child(3) { width: 130px; }
.scheduled-inline-table-wrap .scheduled-checklist-table th:nth-child(4), .scheduled-inline-table-wrap .scheduled-checklist-table td:nth-child(4) { width: 128px; }
.scheduled-inline-table-wrap .scheduled-checklist-table th:nth-child(5), .scheduled-inline-table-wrap .scheduled-checklist-table td:nth-child(5) { width: 232px; }
.scheduled-inline-table-wrap .scheduled-checklist-table th:nth-child(6), .scheduled-inline-table-wrap .scheduled-checklist-table td:nth-child(6) { width: 77px; }
.scheduled-inline-table-wrap .scheduled-checklist-table th:nth-child(7), .scheduled-inline-table-wrap .scheduled-checklist-table td:nth-child(7) { width: 35px; white-space: nowrap; }
.scheduled-inline-table-wrap .scheduled-checklist-table th:nth-child(8), .scheduled-inline-table-wrap .scheduled-checklist-table td:nth-child(8) { width: 104px; }
.scheduled-inline-table-wrap .scheduled-checklist-table th:nth-child(9), .scheduled-inline-table-wrap .scheduled-checklist-table td:nth-child(9) { width: 230px; }
.scheduled-inline-table-wrap .scheduled-checklist-table tbody tr { height: 77px; }
.scheduled-inline-execution { padding: 0 !important; }
.scheduled-inline-execution input, .scheduled-inline-execution select, .scheduled-inline-execution div, .scheduled-inline-execution span { display: block; width: 100%; min-height: 34px; margin: 0; padding: 5px 6px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 10px; }
.scheduled-inline-execution span { color: var(--muted); font-size: 11px; font-weight: 700; }
.scheduled-inline-execution span:last-child { border-bottom: 0; }
.scheduled-inline-actions { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 12px; margin: 0; padding: 22px 18px; border: 1px solid #c3d4da; border-radius: 0; background: linear-gradient(180deg, #edf5f7 0%, #d3e4e9 100%); }
.scheduled-inline-actions .button { width: 100%; min-height: 44px; border-radius: 8px; white-space: normal; }
.scheduled-inline-actions .button span { margin-right: 6px; font-size: 17px; vertical-align: -1px; }
.scheduled-actions-title { margin: 0 0 4px; color: #344047; font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.scheduled-inline-actions .scheduled-dialog-feedback { margin: 0; }
.scheduled-activity-start { display: grid; gap: 6px; color: #344047; font-size: 12px; font-weight: 800; }
.scheduled-activity-start input { width: 100%; min-height: 38px; }
.scheduled-dialog { width: min(1480px, 96vw); max-width: none; max-height: 94vh; padding: 0; overflow: hidden; }
.scheduled-dialog .dialog-header { margin: 0; }
.scheduled-dialog-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; padding: 1px; background: var(--line); }
.scheduled-dialog-summary div { min-width: 0; padding: 15px 17px; background: white; }
.scheduled-dialog-summary small, .scheduled-dialog-summary strong { display: block; }
.scheduled-dialog-summary small { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.scheduled-summary-margin { border-left: 5px solid #2f8057; }
.scheduled-summary-margin.is-overdue { border-left-color: var(--danger); background: #fff4f4; }
.scheduled-summary-margin strong { color: #216844; }
.scheduled-summary-margin.is-overdue strong { color: var(--danger); }
.scheduled-activity-period { display: grid; grid-template-columns: minmax(250px, 1fr) 190px 190px; align-items: end; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: #f1f4f5; }
.scheduled-activity-period > div { display: grid; gap: 4px; }
.scheduled-activity-period small { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.scheduled-activity-period strong { color: var(--ink); }
.scheduled-activity-period p { margin: 0; color: var(--muted); font-size: 12px; }
.scheduled-activity-period label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 750; }
.scheduled-list-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: white; }
.scheduled-list-actions > span { color: var(--ink); font-weight: 800; }
.scheduled-list-actions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.scheduled-list-actions .button { min-height: 34px; padding: 6px 11px; font-size: 12px; }
.scheduled-checklist-wrap { max-height: calc(94vh - 310px); overflow: auto; }
.scheduled-checklist-table { width: 100%; min-width: 1050px; border-collapse: collapse; }
.scheduled-checklist-table th, .scheduled-checklist-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.scheduled-checklist-table th { position: sticky; top: 0; z-index: 1; color: white; background: #354047; font-size: 11px; text-transform: uppercase; }
.scheduled-checklist-table tbody tr:nth-child(even) { background: #f4f7f8; }
.scheduled-checklist-table tbody tr.is-complete { color: #48635c; background: #eaf3ef; }
.scheduled-checklist-table td:nth-child(2) { width: 190px; font-size: 11px; }
.scheduled-checklist-table td:nth-child(3) { width: 145px; }
.scheduled-checklist-table td:nth-child(4) { width: 115px; }
.scheduled-checklist-table td:nth-child(5) { width: 210px; }
.scheduled-checklist-table input[type="text"] { min-width: 175px; padding: 8px 9px; }
.scheduled-checklist-table input[type="date"] { min-width: 130px; padding: 8px 9px; }
.scheduled-dialog-actions { position: sticky; bottom: 0; border-top: 1px solid var(--line); }
.scheduled-dialog-feedback { flex: 1; margin: 0 auto 0 0; padding: 8px 11px; color: #00688b; background: #e7f5f7; border-left: 3px solid var(--accent); font-size: 12px; font-weight: 750; }
.scheduled-dialog-feedback[data-state="success"] { color: #216844; background: #e4f3e9; border-left-color: var(--success); }
.fleet-heading { background: #31566a; }
.fleet-km-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); max-width: none; margin-bottom: 0; }
.fleet-entry-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: end; }
.fleet-form-actions { align-self: end; margin: 0; padding: 0 !important; background: transparent; }
.fleet-dashboard { display: grid; gap: 18px; margin-top: 30px; }
.analytics-heading { display: flex; align-items: end; justify-content: space-between; }
.analytics-heading h2 { margin: 0; font-size: 22px; }
.fleet-register { overflow: hidden; border: 1px solid var(--line); background: white; }
.fleet-register .analytics-heading { padding: 18px 34px; border-bottom: 1px solid var(--line); }
.fleet-empty-dashboard p { margin: 0; padding: 24px 20px; color: var(--muted); }
.fleet-register-actions, .fleet-period-control { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.fleet-register-actions { align-items: center; }
.fleet-register-actions .button { min-height: 42px; padding: 9px 18px; font-size: 15px; font-weight: 750; }
.fleet-register-actions .fleet-dashboard-action { display: grid; width: 42px; min-height: 42px; padding: 0; place-items: center; font-size: 19px; }
.fleet-register-actions .fleet-dashboard-statistics { color: #fff; background: var(--accent); border-color: #00688b; }
.fleet-register-actions .fleet-dashboard-edit { color: #fff; background: var(--danger); border-color: #8f2d22; }
.fleet-register-actions .fleet-dashboard-edit.is-editing { background: var(--success); border-color: #245f40; }
.fleet-period-control { padding-right: 8px; border-right: 1px solid var(--line); }
.fleet-period-control .button.is-active, #fleet-register-edit-mode.is-active { color: white; background: #00688b; border-color: #00688b; }
.fleet-register-table-wrap { max-height: 320px; overflow-x: auto; overflow-y: auto; }
.fleet-register-table { width: 100%; min-width: 700px; border-collapse: collapse; }
.fleet-register-table th, .fleet-register-table td { padding: 12px 15px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.fleet-register-table th { text-align: left; }
.fleet-register-table th:first-child, .fleet-register-table td:first-child { text-align: left; }
.fleet-register-table th:first-child, .fleet-register-table td:first-child { padding-left: 34px; }
.fleet-register-table .fleet-register-spacer { width: 100%; }
.fleet-register-table th { position: sticky; top: 0; z-index: 1; color: #40515e; background: #eef2f3; font-size: 12px; }
.fleet-register-table tbody tr:last-child td { border-bottom: 0; }
.fleet-register-table tbody tr:nth-child(even) { background: #f4f7f8; }
.fleet-register-table td:not(:first-child) { color: var(--brand-dark); font-weight: 750; }
.fleet-register-edit { padding: 0; border: 0; color: inherit; background: transparent; font: inherit; font-weight: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.fleet-register-edit:hover, .fleet-register-edit:focus { color: #31566a; outline: none; }
.fleet-table-wrap { overflow-x: auto; border: 1px solid var(--line); background: white; }
.fleet-summary-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.fleet-summary-table th, .fleet-summary-table td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: right; }
.fleet-summary-table th:first-child, .fleet-summary-table td:first-child { text-align: left; }
.fleet-summary-table th { color: #40515e; background: #eef2f3; font-size: 12px; }
.fleet-summary-table tbody tr:last-child td { border-bottom: 0; }
.fleet-summary-table td strong { color: var(--brand-dark); }
.material-heading { margin-bottom: 18px; }
.material-heading > div > p:last-child { margin: 9px 0 0; color: #d8e0e4; }
.material-actions { display: flex; gap: 8px; }
.material-filters { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(260px, 1fr) auto auto; align-items: end; gap: 10px 12px; margin-bottom: 14px; padding: 13px 34px 20px; border: 1px solid var(--line); border-top: 3px solid var(--accent); background: #eef2f3; box-shadow: 0 5px 16px rgba(31,40,45,.06); }
.material-filters .button { min-height: 40px; }
.material-filters .button:disabled { opacity: 1; color: #6c7b83; background: #fff; border-color: #b8c3c8; filter: none; }
.material-filters .material-clear-button { color: #fff; background: var(--accent); border-color: #00688b; }
.material-filters .material-export-button:disabled { color: #fff; background: #217346; border-color: #185c37; }
.material-register { overflow: hidden; border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.material-register-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 34px; border-bottom: 1px solid var(--line); }
.material-register-heading div { display: grid; gap: 4px; }
.material-register-heading small, .material-register-heading p { color: var(--muted); }
.material-register-heading p { margin: 0; font-size: 12px; }
.material-table { min-width: 1280px; }
.material-table th, .material-table td { text-align: left; }
.material-table th:first-child, .material-table td:first-child { padding-left: 34px; }
.material-table th:last-child, .material-table td:last-child { padding-right: 34px; }
.material-table th:nth-child(1) { width: 115px; }
.material-table th:nth-child(2) { width: 140px; }
.material-table th:nth-child(3) { width: 95px; }
.material-table th:nth-child(4) { width: 130px; }
.material-table th:nth-child(6) { width: 140px; }
.material-table th:nth-child(7), .material-table th:nth-child(8), .material-table th:nth-child(9) { width: 170px; }
.material-index, .material-serial { color: var(--brand-dark); font-family: Bahnschrift, Consolas, monospace; font-weight: 750; }
.material-empty { padding: 34px !important; color: var(--muted); text-align: center !important; }
.fleet-chart-tool { padding: 20px; border: 1px solid var(--line); background: white; }
.chart-toolbar { display: grid; grid-template-columns: minmax(190px, 1fr) 210px 155px 155px; align-items: end; gap: 12px; margin-bottom: 14px; }
.chart-toolbar h2 { margin: 0 0 9px; font-size: 18px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; min-height: 24px; margin-bottom: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 650; }
.chart-legend i { width: 18px; height: 3px; }
.chart-container { position: relative; width: 100%; min-height: 340px; }
#fleet-chart { display: block; width: 100%; height: 340px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); background: #f8fafb; }
.chart-empty[hidden] { display: none; }
.order-row { display: flex; align-items: center; gap: 12px; margin: 4px 0 20px; }
.order-caption { color: #40515e; font-size: 12px; font-weight: 700; }
.order-row #order-number-field { display: flex; align-items: center; width: min(360px, 100%); gap: 8px; white-space: nowrap; }
.order-row #order-number-field input { width: 190px; }
.source-link-row { display: grid; grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) minmax(160px, 220px); align-items: end; gap: 12px; margin: 4px 0 20px; }
.work-source-mode { margin: -8px 0 18px; padding: 9px 12px; border-left: 4px solid #788790; color: #40515e; background: #eef2f3; font-size: 12px; font-weight: 750; }
.work-source-mode.is-linked { border-left-color: #788790; color: #4f5960; background: #edf1f2; }
.work-activity-type { display: flex; width: max-content; margin: 0 0 20px; padding: 3px; border: 1px solid #bdc8ce; border-radius: 5px; background: #eef2f3; }
.work-activity-type[hidden] { display: none; }
.work-activity-type legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.work-activity-type label { display: block; }
.work-activity-type input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.work-activity-type span { display: block; min-width: 145px; padding: 9px 16px; border-radius: 3px; color: var(--muted); text-align: center; cursor: pointer; }
.work-activity-type input:checked + span { color: white; background: #59404a; }
.verification-sheet-field { display: none; }
.activity-verification .verification-sheet-field { display: grid; }
.source-standalone .source-sheet-field { display: none; }
.activity-verification .intervention-only { display: none; }
.activity-verification .operators-field { display: none; }
.office-maintainer-band { display: none; }
.activity-verification .office-maintainer-band { display: block; }
.activity-verification #office-maintainer-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.activity-verification #office-maintainer-fields .operator-list { display: contents; }
.office-closure-band { display: none; }
.closing-office-report .office-closure-band { display: block; }
.office-report-bottom-row { display: block; }
.activity-verification .office-report-bottom-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.activity-verification .office-report-bottom-row .safety-organ-section,
.activity-verification .office-report-bottom-row .office-maintainer-band { margin: 0; }
.activity-verification .office-report-bottom-row .safety-organ-section { padding-top: 0; border-top: 0; }
.activity-verification .operator-row:nth-child(n+2) { display: none; }
.source-locked-field { color: #4f5960; background: #edf1f2; cursor: not-allowed; }
.source-locked-field[type="date"] { pointer-events: none; }
select.source-locked-field { pointer-events: none; }
select.maintainer-company-field { pointer-events: none; }
.source-linked .sheet-picker input { color: #4f5960; background: #edf1f2; }
.source-linked .sheet-picker button { display: none; }
.source-work-order .sheet-picker button { display: grid; }
.source-work-order .sheet-picker input { color: var(--ink); background: #fff; }
.status-fieldset { display: grid; grid-template-columns: auto minmax(180px, 260px); align-items: end; gap: 24px; margin: 20px 0 0; padding: 0; border: 0; }
.status-fieldset legend { margin-bottom: 9px; color: #40515e; font-size: 12px; font-weight: 700; }
.segmented-control { display: flex; width: max-content; padding: 3px; border: 1px solid #bdc8ce; border-radius: 5px; background: #eef2f3; }
.segmented-control label { display: block; }
.segmented-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.segmented-control span { display: block; min-width: 145px; padding: 9px 12px; border-radius: 3px; color: var(--muted); text-align: center; }
.segmented-control input:checked + span { color: white; background: var(--brand); }
.component-details { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 14px; padding: 15px 17px; border-left: 4px solid var(--accent); background: #f7f8f8; }
.component-details div { min-width: 0; }
.component-details small, .component-details strong { display: block; overflow-wrap: anywhere; }
.component-details small { margin-bottom: 4px; color: var(--muted); }
.work-main-row { grid-template-columns: minmax(145px, .9fr) minmax(135px, .8fr) minmax(120px, .7fr) minmax(210px, 1.2fr) minmax(210px, 1.2fr); align-items: end; }
.work-primary-row { grid-template-columns: minmax(115px, .6fr) minmax(140px, .8fr) minmax(115px, .65fr) minmax(130px, .7fr) minmax(105px, .5fr) minmax(155px, .8fr); align-items: end; }
.source-work-order .work-primary-row { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.work-secondary-row { grid-template-columns: repeat(4, minmax(150px, 1fr)); align-items: end; }
@media (min-width: 851px) {
  .source-standalone:not(.activity-verification) .work-primary-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .activity-verification .work-primary-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
.sheet-picker { position: relative; display: flex; }
.sheet-picker input { padding-right: 34px; cursor: pointer; }
.sheet-picker button { position: absolute; right: 1px; bottom: 1px; display: grid; place-items: center; width: 32px; height: calc(100% - 2px); border: 0; color: var(--muted); background: transparent; font-size: 18px; }
.sheet-picker-options { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 42px); gap: 3px; max-height: 230px; padding: 6px; overflow-y: auto; background: white; border: 1px solid #bdc8ce; border-radius: 4px; box-shadow: var(--shadow); }
.sheet-picker-options[hidden] { display: none; }
.sheet-picker-options button { position: static; display: block; width: auto; height: 30px; padding: 0; border: 0; border-radius: 3px; color: var(--ink); background: transparent; font-size: 12px; }
.sheet-picker-options button:hover, .sheet-picker-options button:focus { color: white; background: var(--brand); outline: none; }
.sheet-picker-options button:first-child { grid-column: 1 / -1; color: var(--muted); background: #eef2f3; }
.sheet-picker-options button:first-child:hover, .sheet-picker-options button:first-child:focus { color: var(--ink); background: #dfe7e9; }
.operators-field { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); align-items: end; gap: 12px; margin-bottom: 20px; }
.operator-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.operator-row { min-width: 0; }
.ram-search-field { display: grid; gap: 7px; margin-bottom: 18px; }
.ram-search-controls { display: flex; align-items: stretch; gap: 8px; }
.ram-search-controls .ram-search-box { flex: 1 1 auto; min-width: 0; }
.ram-clear-button { flex: 0 0 auto; width: 42px; height: 42px; color: #fff; background: linear-gradient(145deg, rgba(0,104,139,.78), rgba(0,104,139,.72)); border-color: rgba(0,104,139,.75); }
.ram-clear-button:hover { color: #fff; background: linear-gradient(145deg, rgba(32,169,194,.9), rgba(0,101,124,.86)); border-color: #00688b; }
.ram-search-box { position: relative; display: block; }
.ram-search-box > span { position: absolute; z-index: 1; top: 5px; left: 11px; color: var(--muted); font-size: 22px; font-weight: 400; }
.ram-search-box input { padding-left: 39px; }
.ram-search-field > small { min-height: 15px; color: var(--muted); font-weight: 500; }
.ram-search-box > .ram-search-results { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; left: 0; display: block; overflow-y: auto; max-height: 330px; padding: 5px; border: 1px solid #aebbc2; border-radius: 4px; color: var(--ink); background: white; box-shadow: 0 12px 32px rgba(20,35,45,.18); font-size: 13px; font-weight: 400; }
.ram-search-results[hidden] { display: none; }
.ram-result { display: grid; grid-template-columns: 1fr; gap: 4px; width: 100%; padding: 10px 11px; border: 0; border-bottom: 1px solid #edf0f2; border-radius: 2px; color: var(--ink); background: white; text-align: left; }
.ram-result:last-child { border-bottom: 0; }
.ram-result:hover, .ram-result:focus { background: #eaf3f1; outline: none; }
.ram-result-description { overflow-wrap: anywhere; }
.ram-result-meta { grid-column: 1; color: var(--muted); font-size: 11px; }
.ram-result-parent { grid-column: 1; color: #40515e; font-size: 11px; font-weight: 750; }
.field-invalid { border-color: #bf3f45 !important; box-shadow: 0 0 0 2px rgba(191, 63, 69, .14); }
.field-validation-message { display: block; margin-top: 5px; color: #a32930; font-size: 11px; font-weight: 750; }
.order-badge { display: inline-block; margin-top: 5px; padding: 3px 7px; border-radius: 3px; color: #34454f; background: #e8edef; font-size: 11px; font-weight: 750; }
.record-type-badge { display: inline-block; margin-top: 5px; padding: 3px 7px; border-radius: 3px; color: var(--brand-dark); background: #e2f0ed; font-size: 10px; font-weight: 800; white-space: nowrap; }
.record-type-badge.maintenance { color: #59404a; background: #f0e7ea; }
.record-type-badge.internal-maintenance { color: #31566a; background: #e3eef3; }
.record-type-badge.verification { color: #fff; background: #c0392b; }
.record-type-badge.scheduled-maintenance { color: #00688b; background: #e3eef3; }
.record-type-badge.fleet { color: #31566a; background: #e3eef3; }
.record-type-badge.note-open, .order-badge.note-open { color: #fff; background: #c0392b; }
.record-type-badge.note-closed, .order-badge.note-closed { color: #27613c; background: #dff1e5; }
.record-link-badge { display: inline-block; flex: 0 0 auto; margin-top: 0; padding: 3px 7px; border-radius: 3px; color: #59404a; background: #f0e7ea; font-size: 10px; font-weight: 800; white-space: nowrap; }
.record-link-badge.is-open { color: #fff; background: #c0392b; }
.record-link-badge.is-closed { color: #27613c; background: #dff1e5; }
.record-link-badge.is-pending { color: #31566a; background: #e4edf1; }
.record-link-badge.is-to-close { color: #171c20; background: #f3a719; }
.button, .icon-button { border: 1px solid transparent; border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255,255,255,.48), 0 2px 6px rgba(29,49,60,.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-weight: 750; transition: transform .15s ease, filter .15s ease, box-shadow .15s ease; }
.button { min-height: 42px; padding: 9px 18px; }
.button:not(:disabled):hover, .icon-button:not(:disabled):hover { transform: translateY(-1px); }
.button:disabled { opacity: .42; cursor: not-allowed; filter: grayscale(.35); }
.button.primary { color: white; background: linear-gradient(145deg, rgba(0,104,139,.82), rgba(0,104,139,.76)); border-color: rgba(0,104,139,.78); }
.button.primary:hover { background: linear-gradient(145deg, rgba(32,169,194,.94), rgba(0,86,106,.9)); }
#work-form-view .button.primary,
#work-form-view .segmented-control input:checked + span { background: #59404a; }
#work-form-view .button.primary { background: linear-gradient(145deg, rgba(100,72,83,.84), rgba(89,64,74,.78)); border-color: rgba(89,64,74,.8); }
#work-form-view .button.primary:hover { background: linear-gradient(145deg, rgba(112,81,94,.94), rgba(66,47,55,.9)); }
#scheduled-maintenance-view .button.primary,
#scheduled-maintenance-view .segmented-control input:checked + span { background: #00688b; }
#scheduled-maintenance-view .button.primary { background: linear-gradient(145deg, rgba(55,140,158,.84), rgba(40,114,133,.78)); border-color: rgba(40,114,133,.8); }
#scheduled-maintenance-view .button.primary:hover { background: linear-gradient(145deg, rgba(65,151,169,.94), rgba(31,86,100,.9)); }
#fleet-form-view .button.primary,
#fleet-form-view .segmented-control input:checked + span { background: #31566a; }
#fleet-form-view .button.primary { background: linear-gradient(145deg, rgba(75,112,133,.84), rgba(49,86,106,.78)); border-color: rgba(49,86,106,.8); }
#fleet-form-view .button.primary:hover { background: linear-gradient(145deg, rgba(88,126,147,.94), rgba(36,63,78,.9)); }
.button.secondary { color: var(--ink); background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(229,237,240,.58)); border-color: rgba(143,161,169,.72); }
.button.secondary:hover { background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(232,240,242,.76)); }
.button.danger-outline { color: white; background: linear-gradient(145deg, rgba(200,73,82,.82), rgba(173,52,62,.76)); border-color: rgba(173,52,62,.78); }
.button.danger-outline:hover { color: white; background: linear-gradient(145deg, rgba(214,83,93,.94), rgba(142,42,51,.9)); border-color: #8e2a33; }
.backup-panel-shell .button.is-selection-active { color: white; background: var(--brand); border-color: var(--brand); }
.backup-panel-shell .button.is-selection-active:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.backup-restore-button.is-selection-active { color: #fff; background: var(--danger); border-color: var(--danger); }
.backup-restore-button.is-selection-active:hover { background: #8e2a33; border-color: #8e2a33; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0 0 2px; color: var(--ink); background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(229,237,240,.58)); border-color: rgba(143,161,169,.72); font-size: 22px; }

.archive-heading { margin-bottom: 24px; }
.archive-heading .eyebrow { color: var(--brand); }
.archive-actions { display: flex; gap: 8px; }
.filters { display: grid; grid-template-columns: minmax(150px, .7fr) 140px minmax(205px, 1.05fr) 140px 125px 125px 125px 124px 134px; align-items: end; gap: 10px; margin-bottom: 20px; padding: 16px; background: white; border: 1px solid var(--line); }
.search-field { position: relative; }
.search-field-label { display: block; margin-bottom: 5px; color: #43525a; font-size: 12px; font-weight: 750; }
.search-field-icon { position: absolute; z-index: 1; bottom: 8px; left: 11px; color: var(--muted); font-size: 22px; }
.search-field input { padding-right: 38px; padding-left: 38px; }
.search-field button { position: absolute; right: 7px; bottom: 7px; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 50%; color: #557078; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; }
.search-field button:hover { color: #00688b; background: #e4f3f6; }
.archive-list { display: grid; gap: 10px; }
.record-card { display: grid; grid-template-columns: 110px minmax(130px,.7fr) minmax(180px,1fr) minmax(230px,1.5fr) auto; align-items: center; gap: 18px; padding: 18px 20px; background: white; border: 1px solid var(--line); border-left: 4px solid var(--brand); }
.scheduled-maintenance-card { grid-template-columns: max-content max-content max-content max-content minmax(78px, 1fr); height: 46px; gap: 4px 20px; padding: 4px 16px; }
.scheduled-maintenance-card > div:nth-child(5):not(.record-actions) { display: none; }
.scheduled-maintenance-card > div:not(.record-actions) { display: flex; align-items: center; min-width: 0; gap: 8px; }
.scheduled-maintenance-card > div:not(.record-actions) small { flex: 0 0 auto; color: var(--ink); font-weight: 800; }
.scheduled-maintenance-card > div p { min-width: 0; margin: 0; overflow: hidden; }
.scheduled-maintenance-card > div p strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scheduled-maintenance-card .record-link-badge { margin: 0; }
.scheduled-maintenance-card .record-actions { position: relative; z-index: 1; justify-self: end; padding-left: 4px; background: white; }
#archive-list .record-card.scheduled-maintenance-card { height: 46px; padding: 4px 16px !important; }
.record-card:hover { box-shadow: var(--shadow); }
.record-card p { overflow: hidden; margin: 3px 0 0; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.record-card small { color: var(--muted); }
.maintenance-card { grid-template-columns: minmax(210px, auto) minmax(135px, .55fr) minmax(160px, .7fr) minmax(300px, 1.25fr) auto; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
.logbook-card { grid-template-columns: repeat(6, max-content) minmax(78px, 1fr); grid-template-rows: auto; gap: 4px 28px; padding: 4px 34px; }
#archive-list .record-card.logbook-card { height: 46px; padding: 4px 34px !important; }
.logbook-card .logbook-train { grid-column: 1; grid-row: 1; }
.logbook-card .logbook-sheet { grid-column: 2; grid-row: 1; }
.logbook-card .logbook-statuses { grid-column: 3; grid-row: 1; justify-content: flex-start; flex-wrap: nowrap; }
.logbook-card .logbook-date { grid-column: 4; grid-row: 1; }
.logbook-card .logbook-opened { grid-column: 5; grid-row: 1; }
.logbook-card .logbook-created { grid-column: 6; grid-row: 1; }
.logbook-card .record-actions { grid-column: 7; grid-row: 1; align-self: center; justify-self: end; }
.fleet-card { grid-template-columns: minmax(170px, auto) minmax(135px, .55fr) minmax(160px, 1fr) auto; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
.maintenance-card > div:not(.record-actions), .logbook-card > div:not(.record-actions), .fleet-card > div:not(.record-actions) { display: flex; align-items: center; min-width: 0; gap: 8px; }
.maintenance-card > div:not(.record-actions) small, .logbook-card > div:not(.record-actions) small, .fleet-card > div:not(.record-actions) small { flex: 0 0 auto; color: var(--ink); font-weight: 800; }
.maintenance-card > div:not(.record-actions) p, .logbook-card > div:not(.record-actions) p, .fleet-card > div:not(.record-actions) p { min-width: 0; margin: 0; }
.maintenance-card .record-type-badge, .logbook-card .record-type-badge, .fleet-card .record-type-badge { flex: 0 0 auto; margin-top: 0; }
.record-actions { display: flex; gap: 6px; }
.work-open-actions { grid-column: -2; justify-self: end; }
.work-open-card { grid-template-columns: repeat(6, max-content) minmax(78px, 1fr); height: auto; gap: 4px 28px; padding: 4px 34px; }
#work-archive-list .record-card.work-open-card { height: 46px; padding: 4px 34px !important; }
#archive-list .record-card.work-open-card { height: 46px; padding: 4px 34px !important; }
.work-open-card > div:not(.record-actions) { display: flex; align-items: center; min-width: 0; gap: 8px; }
.work-open-card > div:not(.record-actions) small { flex: 0 0 auto; color: var(--ink); font-weight: 800; }
.logbook-card .logbook-sheet small, .work-open-card .corrective-sheet small { flex-basis: 260px; }
.work-open-card > div:not(.record-actions) p { min-width: 0; margin: 0; }
.work-open-card .record-link-badge { margin: 0; }
.closed-corrective-card { grid-template-columns: max-content max-content max-content max-content minmax(78px, 1fr); gap: 4px 20px; padding: 4px 16px; }
.closed-corrective-card .corrective-sheet small { flex-basis: auto; }
.closed-corrective-card > div p { overflow: hidden; }
.closed-corrective-card > div p strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.closed-corrective-card .record-actions { position: relative; z-index: 1; justify-self: end; padding-left: 4px; background: white; }
#archive-list .record-card.closed-corrective-card { height: 46px; padding: 4px 16px !important; }
.record-actions button { width: 36px; height: 36px; font-size: 17px; }
.record-actions .button { width: auto; min-width: 148px; padding: 0 14px; font-size: 13px; white-space: nowrap; }
.record-actions .icon-button:disabled { opacity: .36; cursor: not-allowed; color: #64737a; background: #edf1f2; border-color: #d3dce0; }
.record-actions .attachment-download svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.record-actions .delete { color: #a43b42; background: #fdf1f2; border-color: #e5b9bd; }
.record-actions .delete:hover { color: #8f2f36; background: #f9dfe1; border-color: #d99398; }
.personnel-user-actions .maintainer-delete { color: #fff; background: linear-gradient(145deg, rgba(200,73,82,.78), rgba(173,52,62,.72)); border-color: rgba(173,52,62,.76); }
.personnel-user-actions .maintainer-delete:hover { color: #fff; background: #8e2a33; border-color: #8e2a33; }
.personnel-user-actions .icon-button { box-shadow: inset 0 1px 0 rgba(255,255,255,.52), 0 2px 6px rgba(29, 49, 60, .12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.personnel-user-actions .icon-button:not(.maintainer-delete) { color: #27363e; background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(229,237,240,.54)); border-color: rgba(112, 138, 148, .62); }
.personnel-user-actions .icon-button:not(.maintainer-delete):hover { background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(232,240,242,.72)); border-color: #657983; transform: translateY(-1px); }
.personnel-user-actions .icon-button.account-reset { color: #fff; background: linear-gradient(145deg, rgba(0,104,139,.78), rgba(0,104,139,.72)); border-color: rgba(0,104,139,.75); }
.personnel-user-actions .icon-button.account-reset:hover { color: #fff; background: linear-gradient(145deg, rgba(32,169,194,.9), rgba(0,101,124,.86)); border-color: #00688b; }
.personnel-user-actions .icon-button.account-delete { color: #fff; background: linear-gradient(145deg, rgba(200,73,82,.78), rgba(173,52,62,.72)); border-color: rgba(173,52,62,.76); }
.personnel-user-actions .icon-button.account-delete:hover { color: #fff; background: linear-gradient(145deg, rgba(214,83,93,.9), rgba(142,42,51,.86)); border-color: #8e2a33; }
.personnel-user-actions .icon-button.account-delete:disabled { color: #fff; background: linear-gradient(145deg, rgba(200,73,82,.55), rgba(173,52,62,.5)); border-color: rgba(173,52,62,.55); }
.new-maintainer-control, .new-access-control { display: flex; align-items: center; gap: 9px; }
.new-maintainer-control[hidden], .new-access-control[hidden] { display: none !important; }
.new-maintainer-control strong, .new-access-control strong { color: var(--ink); font-size: 14px; }
.new-maintainer-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0 0 2px; border: 1px solid rgba(39,119,78,.76); border-radius: 4px; color: #fff; background: linear-gradient(145deg, rgba(60,149,103,.78), rgba(39,119,78,.72)); box-shadow: inset 0 1px 0 rgba(255,255,255,.52), 0 2px 6px rgba(29, 49, 60, .12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 21px; line-height: 1; font-weight: 900; transition: transform .15s ease, filter .15s ease; }
.new-maintainer-button:hover { border-color: #216844; background: linear-gradient(145deg, rgba(74,165,117,.9), rgba(33,104,68,.86)); filter: saturate(1.05); transform: translateY(-1px); }
.record-actions .maintenance-link { color: #59404a; background: #f8f1f3; border-color: #d9c4cb; }
.record-actions .close-note { color: #27613c; background: #e8f5ec; border-color: #b8d7c2; }
.record-actions .reopen-activity { color: #79620b; background: #fffaf0; border-color: #e7d8a4; }
.record-actions .reopen-activity:hover { color: #695306; background: #fff3cf; border-color: #d7bd69; }
.record-actions .attachment-download { color: #00688b; background: #eef9fc; border-color: #abd5df; }
.record-actions .attachment-download:hover { color: #00688b; background: #e1f4f8; border-color: #83c3d1; }
.technical-note-open { border-left-color: var(--accent); background: #f2fafb; }
.technical-note-closed { border-left-color: #43865b; }
.technical-note-detail.is-open { border-left: 5px solid var(--accent); }
.technical-note-detail.is-closed { border-left: 5px solid #43865b; }
.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); background: white; border: 1px dashed #b9c3c8; }
.empty-state strong { color: var(--ink); font-size: 18px; }
.empty-state p { margin-bottom: 0; }

dialog { width: min(760px, 92vw); max-height: 88vh; padding: 0; border: 0; border-radius: 6px; box-shadow: 0 24px 80px rgba(0,0,0,.28); }
#backup-dialog { width: min(1260px, 94vw); }
.login-dialog { width: min(420px, 92vw); }
.login-dialog form { display: grid; gap: 16px; padding: 28px; }
.login-dialog [hidden] { display: none !important; }
.login-company-logo { display: grid; place-items: center; margin: -28px -28px 2px; padding: 20px 28px; background: #00688b; }
.login-company-logo img { display: block; width: min(100%, 300px); height: auto; }
.login-heading { display: flex; align-items: center; gap: 13px; }
.login-heading .login-symbol { background: #00688b !important; border-color: #003847; }
.login-heading .login-symbol::after { display: none; }
.login-heading .login-symbol img { display: block; width: 70%; height: 70%; object-fit: contain; filter: brightness(0) invert(1); }
.login-heading h2, .login-heading p { margin: 0; }
.login-heading strong, .login-heading small { display: block; }
.login-heading strong { font-size: 14px; text-transform: uppercase; }
.login-heading small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.login-dialog > form > p { margin: 0; color: var(--muted); }
.login-error { min-height: 18px; color: var(--danger) !important; font-size: 12px; font-weight: 700; }
.login-dialog .button { width: 100%; }
.profile-dialog { width: min(440px, 92vw); }
.profile-content { padding: 24px; }
.profile-identity { display: flex; align-items: center; gap: 13px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.profile-identity > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 4px; color: #171c20; background: var(--accent); font-size: 16px; font-weight: 800; }
.profile-identity strong, .profile-identity small { display: block; }
.profile-identity small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.profile-details { display: grid; gap: 15px; margin: 20px 0 0; }
.profile-details div { display: grid; gap: 4px; }
.profile-details dt { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.profile-details dd { margin: 0; font-weight: 700; }
.profile-password { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.profile-content > .profile-password:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.profile-password h3 { margin: 0 0 14px; font-size: 15px; }
.profile-password form { display: grid; gap: 13px; }
.profile-password-feedback { margin: 0; padding: 9px 11px; color: #00688b; background: #e7f5f7; border-left: 3px solid var(--accent); font-size: 12px; font-weight: 700; }
.profile-password-feedback[data-state="success"] { color: #216844; background: #e4f3e9; border-left-color: var(--success); }
.profile-password .button { justify-self: end; }
dialog::backdrop { background: rgba(12,23,29,.55); }
.dialog-header, .dialog-actions { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; }
.dialog-actions { justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); border-bottom: 0; }
.dialog-actions[hidden], .dialog-actions button[hidden] { display: none !important; }
.work-save-dialog { width: min(520px, 92vw); }
#fleet-statistics-dialog { width: min(1120px, 94vw); max-width: none; }
#fleet-statistics-dialog .work-save-content { overflow-x: auto; }
#fleet-statistics-dialog .fleet-summary-table { min-width: 880px; }
.inline-maintainer-expiries-dialog { width: min(1550px, 96vw); height: calc(100vh - 16px); max-width: none; max-height: none; padding: 0; overflow: hidden; }
.inline-maintainer-expiries-dialog .dialog-header { align-items: flex-start; }
.inline-maintainer-expiries-dialog .dialog-header .eyebrow { margin: 0 0 4px; }
.inline-maintainer-expiries-actions { display: flex; align-items: center; gap: 10px; }
.inline-maintainer-expiries-actions .button { min-height: 38px; }
.inline-maintainer-expiries-content { height: calc(100vh - 96px); max-height: none; padding: 22px; overflow: auto; background: #f3f7f8; }
.inline-maintainer-expiries-content .competency-monitoring-matrix { margin: 0; }
.competency-comparison-section { padding: 18px; border: 1px solid #c8d8dd; border-radius: 10px; background: #fff; }
.competency-comparison-section + .competency-comparison-section { margin-top: 20px; }
.competency-comparison-section h3 { margin: 0; color: #173746; font-size: 16px; }
.competency-comparison-section > p { margin: 5px 0 13px; color: #5b6f78; font-size: 12px; }
.competency-comparison-section.is-after { border-color: #99c9aa; }
.competency-comparison-section.is-after h3 { color: #17643b; }
.scheduled-renewal-preview { margin-top: 22px; padding: 18px; border: 1px solid #c8d8dd; border-radius: 10px; background: #fff; }
.scheduled-renewal-preview h3 { margin: 0; color: #173746; font-size: 16px; }
.scheduled-renewal-preview > p { margin: 6px 0 14px; color: #5b6f78; font-size: 12px; }
.scheduled-renewal-preview-wrap { overflow-x: auto; }
.scheduled-renewal-preview table { width: 100%; min-width: 860px; border-collapse: collapse; }
.scheduled-renewal-preview th, .scheduled-renewal-preview td { padding: 9px 10px; border: 1px solid #cbd7dc; text-align: left; vertical-align: top; font-size: 12px; }
.scheduled-renewal-preview th { color: #fff; background: #00688b; font-size: 11px; text-transform: uppercase; }
.scheduled-renewal-preview tbody tr:nth-child(even) { background: #f3f6f7; }
.scheduled-renewal-preview-new { color: #17643b; background: #e6f5e9; font-weight: 800; }
.scheduled-renewal-preview-current.is-empty { background: #eef2f3; }
.scheduled-renewal-preview-current.is-warning { color: #5a4210; background: #fff0c9; }
.scheduled-renewal-preview-current.is-expired { color: #7f2025; background: #fde2e3; }
.scheduled-renewal-preview-days { display: block; margin-top: 3px; color: #657681; font-size: 10px; font-weight: 700; }
.scheduled-renewal-preview small.is-warning { display: block; margin-top: 4px; color: #9a6300; font-weight: 800; }
.scheduled-report-dialog { width: min(1180px, 94vw); max-width: none; padding: 0; overflow: hidden; }
.scheduled-task-manual-dialog { width: min(1280px, 96vw); height: min(900px, 94vh); max-width: none; padding: 0; overflow: hidden; }
.scheduled-task-manual-dialog::backdrop { background: rgba(20, 35, 45, .55); }
.scheduled-task-manual-dialog iframe { display: block; width: 100%; height: calc(100% - 84px); border: 0; background: #f3f5f6; }
.scheduled-report-content { max-height: 74vh; padding: 22px; overflow: auto; background: #f3f7f8; }
.scheduled-report-summary { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; margin-bottom: 18px; }
.scheduled-report-summary div { padding: 13px; border: 1px solid #d6e1e5; border-radius: 10px; background: #fff; }
.scheduled-report-summary small { display: block; margin-bottom: 5px; color: #63747c; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.scheduled-report-summary strong { color: #173746; font-size: 15px; }
.scheduled-report-section-title { margin: 20px 0 10px; color: #173746; font-size: 17px; }
.scheduled-report-table-wrap { overflow: auto; border: 1px solid #d6e1e5; border-radius: 10px; background: #fff; }
.scheduled-report-table { width: 100%; min-width: 850px; border-collapse: collapse; }
.scheduled-report-table th, .scheduled-report-table td { padding: 10px 12px; border-bottom: 1px solid #d6e1e5; text-align: left; vertical-align: top; font-size: 13px; }
.scheduled-report-table th { color: #fff; background: #344047; font-size: 11px; text-transform: uppercase; }
.scheduled-report-table tr:last-child td { border-bottom: 0; }
.scheduled-report-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: #8a5900; background: #fff0c9; font-size: 12px; font-weight: 800; }
.scheduled-report-status.is-in-progress { color: #00688b; background: #dff4f3; }
.scheduled-report-status.is-completed { color: #216844; background: #eaf6ed; }
@media (max-width: 720px) { .scheduled-report-summary { grid-template-columns: 1fr 1fr; } }
.scheduled-execution-content { display: grid; min-width: 0; min-height: 0; height: 100%; gap: 18px; }
.scheduled-operator-workspace { display: grid; grid-template-columns: minmax(280px, 350px) minmax(0, 1fr) minmax(250px, 310px); gap: 18px; align-items: stretch; height: calc(100vh - 165px); height: calc(100dvh - 165px); min-height: 0; margin-top: 20px; }
.scheduled-operator-activity-list, .scheduled-operator-actions, .scheduled-operator-documents { padding: 18px; border: 1px solid #d6e1e5; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.scheduled-operator-activity-list { min-height: 0; overflow-y: auto; }
.scheduled-operator-activity-list h2 { margin: 0 0 14px; color: #203640; font-size: 16px; }
.scheduled-operator-card { display: grid; gap: 12px; width: 100%; padding: 16px; border: 1px solid #d6e1e5; border-radius: 12px; color: #173746; background: #fff; text-align: left; cursor: pointer; }
.scheduled-operator-card + .scheduled-operator-card { margin-top: 12px; }
.scheduled-operator-card.is-selected { border-color: #e6ad1b; box-shadow: 0 0 0 1px #f4d581; }
.scheduled-operator-card strong { font-size: 14px; line-height: 1.35; }
.scheduled-operator-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #506872; font-size: 12px; }
.scheduled-operator-card-progress { height: 8px; overflow: hidden; border-radius: 99px; background: #e6ecef; }
.scheduled-operator-card-progress span { display: block; height: 100%; border-radius: inherit; background: #00688b; }
.scheduled-operator-side { display: grid; min-height: 0; height: 100%; grid-template-rows: auto minmax(0, 1fr); gap: 14px; }
.scheduled-operator-actions { display: grid; gap: 10px; }
.scheduled-operator-actions p, .scheduled-operator-documents p { margin: 0; color: #344047; font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.scheduled-operator-actions .button { width: 100%; }
.scheduled-operator-documents { display: flex; min-height: 0; flex-direction: column; gap: 8px; overflow: hidden; color: #61747c; }
.scheduled-operator-documents span { font-size: 13px; line-height: 1.45; }
.scheduled-operator-manual-list { display: grid; min-height: 0; flex: 1 1 auto; gap: 7px; margin-top: 4px; padding-right: 4px; overflow-y: scroll; overscroll-behavior: contain; scrollbar-gutter: stable; }
.scheduled-operator-manual-list button { width: 100%; padding: 9px 10px; border: 1px solid #cbdce1; border-radius: 7px; color: #245260; background: #f6fafb; text-align: left; font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }
.scheduled-operator-manual-list button:hover, .scheduled-operator-manual-list button:focus { border-color: #00688b; color: #fff; background: #00688b; outline: none; }
.scheduled-execution-card { display: flex; min-height: 0; height: 100%; flex-direction: column; overflow: hidden; border: 1px solid #d6e1e5; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.scheduled-execution-card-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; color: #fff; background: #00688b; }
.scheduled-execution-card-header h2 { margin: 0; font-size: 20px; }
.scheduled-execution-card-header p { margin: 4px 0 0; color: #dff4f3; font-size: 13px; }
.scheduled-execution-progress { min-width: 150px; text-align: right; }
.scheduled-execution-progress strong { display: block; font-size: 16px; }
.scheduled-execution-progress span { color: #dff4f3; font-size: 12px; }
.scheduled-execution-table-wrap { min-height: 0; flex: 1 1 auto; overflow: auto; }
.scheduled-execution-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.scheduled-execution-table th, .scheduled-execution-table td { padding: 14px 16px; border-bottom: 1px solid #d6e1e5; text-align: left; vertical-align: middle; }
.scheduled-execution-table th { color: #60727b; background: #f3f7f8; font-size: 11px; text-transform: uppercase; }
.scheduled-execution-table tr:last-child td { border-bottom: 0; }
.scheduled-execution-table td strong { color: #173746; }
.scheduled-execution-date { width: 148px; min-height: 38px; }
.scheduled-execution-complete { min-width: 128px; min-height: 38px; }
.scheduled-execution-controls, .scheduled-execution-pending { display: flex; align-items: center; gap: 8px; }
.scheduled-execution-controls { display: grid; grid-template-columns: minmax(138px, 1fr) 72px; width: 100%; }
.scheduled-execution-controls .scheduled-execution-date { width: 100%; min-width: 0; padding-right: 5px; padding-left: 7px; font-size: 12px; }
.scheduled-execution-controls .scheduled-execution-complete { width: 72px; min-width: 0; padding: 7px 2px; border-radius: 6px; font-size: 10px; white-space: nowrap; }
.scheduled-execution-manual-entry { display: grid; gap: 3px; margin-bottom: 7px; color: #61747c; font-size: 10px; font-weight: 800; }
.scheduled-execution-manual-button, .scheduled-execution-manual-unavailable { width: 100%; min-height: 32px; padding: 6px 8px; border: 1px solid #d6e1e5; border-radius: 5px; color: #344047; background: #f6f9fa; text-align: left; font-size: 12px; font-weight: 700; }
.scheduled-execution-manual-button:hover, .scheduled-execution-manual-button:focus { border-color: #00688b; color: #fff; background: #00688b; outline: none; }
.scheduled-execution-manual-unavailable { display: flex; align-items: center; color: #75868d; }
.scheduled-execution-wrench { display: grid; gap: 3px; margin-top: 7px; color: #61747c; font-size: 10px; font-weight: 800; }
.scheduled-execution-wrench select { width: 100%; min-height: 32px; color: #344047; background: #fff; border: 1px solid #d6e1e5; border-radius: 5px; font-size: 12px; }
.scheduled-execution-done { display: inline-flex; align-items: center; gap: 6px; color: #216844; font-weight: 800; }
.scheduled-execution-empty { min-height: 290px; }
@media (max-width: 720px) { .scheduled-execution-card-header { align-items: flex-start; flex-direction: column; } .scheduled-execution-progress { text-align: left; } }
@media (max-width: 1180px) { .scheduled-operator-workspace { grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); } .scheduled-operator-side { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .scheduled-operator-workspace { grid-template-columns: 1fr; min-height: 0; } }

/* Manutenzione programmata: pannelli allineati al Centro lavorazioni. */
@media (min-width: 1101px) {
  #scheduled-maintenance-view .scheduled-operator-workspace { grid-template-columns: minmax(230px, 260px) minmax(0, 1fr) minmax(230px, 260px); gap: 10px; margin-top: 0; }
  #scheduled-maintenance-view .scheduled-operator-activity-list,
  #scheduled-maintenance-view .scheduled-operator-actions,
  #scheduled-maintenance-view .scheduled-operator-documents,
  #scheduled-maintenance-view .scheduled-execution-card { border-color: #d7e1e5; border-radius: 16px; box-shadow: var(--shadow); }
  #scheduled-maintenance-view .scheduled-operator-activity-list { padding: 14px; }
  #scheduled-maintenance-view .scheduled-operator-side { gap: 10px; }
  #scheduled-maintenance-view .scheduled-operator-actions,
  #scheduled-maintenance-view .scheduled-operator-documents { padding: 12px; }
}
.competency-monitoring-matrix { margin-top: 18px; overflow: hidden; border: 1px solid #d6e1e5; border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.competency-monitoring-table-wrap { overflow: auto; }
.competency-monitoring-table { width: 100%; min-width: 1120px; border-collapse: collapse; }
.competency-monitoring-table th, .competency-monitoring-table td { padding: 10px 12px; border-right: 1px solid #cbd7dc; border-bottom: 1px solid #cbd7dc; text-align: center; vertical-align: middle; }
.competency-monitoring-table thead th { color: #fff; background: #00688b; font-size: 12px; font-weight: 850; }
.competency-monitoring-table tbody th { min-width: 190px; color: #1f2f38; text-align: left; font-size: 14px; }
.competency-monitoring-table tbody tr:nth-child(even) { background: #f3f6f7; }
.competency-monitoring-table th:last-child, .competency-monitoring-table td:last-child { border-right: 0; }
.competency-monitoring-table tbody tr:last-child th, .competency-monitoring-table tbody tr:last-child td { border-bottom: 0; }
.competency-monitoring-cell { position: relative; min-width: 115px; }
.competency-monitoring-cell.is-empty { color: #657681; background: #eef2f3; font-weight: 800; }
.competency-monitoring-cell.is-warning { background: #fff0c9; }
.competency-monitoring-cell.is-expired { background: #fde2e3; }
.competency-monitoring-cell.is-planned-renewal { background: #dff4e6; box-shadow: inset 0 0 0 2px #27834a; }
.competency-monitoring-cell.is-planned-renewal .competency-monitoring-days { color: #216844; }
.competency-monitoring-cell.is-first-expiry::after { content: '✱'; position: absolute; top: 5px; right: 7px; color: #243540; font-size: 12px; }
.competency-monitoring-renewal, .competency-monitoring-days { display: block; }
.competency-monitoring-renewal { color: #1d2f38; font-size: 13px; font-weight: 850; }
.competency-monitoring-days { margin-top: 3px; color: #657681; font-size: 10px; font-weight: 700; }
.work-save-content { padding: 22px; }
.work-save-content p { margin: 0; }
.create-scheduled-content { display: grid; gap: 16px; }
.create-scheduled-content label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.work-save-hint { margin-top: 10px !important; color: var(--muted); font-size: 13px; }
#detail-dialog { width: min(900px, 94vw); }
#detail-content { overflow: auto; max-height: 64vh; padding: 0; }
.detail-section { margin: 0; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.detail-section:last-child { border-bottom: 0; }
.detail-section h3 { margin: 0 0 16px; color: var(--brand); font-size: 13px; text-transform: uppercase; letter-spacing: .02em; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.detail-grid.operation-grid { grid-template-columns: minmax(0, 1fr) 76px 76px; column-gap: 12px; }
.detail-grid.operation-grid .detail-item:nth-child(2) dd { white-space: nowrap; overflow-wrap: normal; }
.detail-item { min-width: 0; }
.detail-item dt { color: var(--muted); font-size: 12px; }
.detail-item dd { margin: 4px 0 0; color: var(--ink); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-item.no-label dd { margin-top: 0; }
.detail-item.wide { grid-column: 1 / -1; }
.backup-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px 24px 24px; background: #f1f4f5; }
.backup-panel-shell { min-width: 0; }
.backup-local-shell { order: 1; }
.backup-remote-shell { order: 2; }
.backup-panel { --backup-state: #7a878d; position: relative; min-width: 0; margin-top: 27px; overflow: visible; border: 1px solid #cbd4d8; border-top: 5px solid var(--backup-state); background: white; box-shadow: 0 3px 10px rgba(20,35,45,.05); }
.backup-panel::before { position: absolute; top: -32px; left: -1px; z-index: 1; padding: 8px 16px 7px; border: 1px solid #cbd4d8; border-bottom: 0; color: #fff; background: var(--backup-state); content: "Backup"; font-size: 11px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
#local-backup-state::before { content: "Backup locale"; }
#remote-backup-state::before { content: "Backup remoto"; }
#local-backup-state { --backup-state: var(--brand); }
#remote-backup-state { --backup-state: #31566a; }
.backup-status-copy small { display: none; }
.backup-panel.is-warning { --backup-state: #f2a51a; }
.backup-panel.is-error { --backup-state: var(--danger); }
.backup-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.backup-status-copy { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.backup-status-copy strong, .backup-status-copy span { display: inline; }
.backup-status-copy small { display: none; }
.backup-status-copy strong { color: var(--ink); font-size: 15px; }
.backup-status-copy span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#database-path { display: none; }
#remote-backup-path { display: none; }
.backup-panel-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; min-height: 42px; margin-bottom: 8px; }
.backup-state-pill { display: none; }
.backup-panel-shell .button { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.backup-header-actions { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.backup-panel-header .backup-info-button, .backup-panel-header .backup-restore-button, .backup-panel-header .backup-config-button, .backup-panel-header .backup-disconnect-button { width: 34px; height: 34px; min-height: 34px; padding: 0 0 2px; border: 1px solid transparent; border-radius: 2px; box-shadow: none; font-family: inherit; font-style: normal; }
.backup-panel-header .backup-info-button { color: #fff; background: var(--accent); font-size: 17px; font-weight: 850; }
.backup-panel-header .backup-restore-button { color: #fff; background: var(--danger); font-size: 19px; font-weight: 800; }
.backup-panel-header .backup-config-button { color: var(--ink); border-color: rgba(143,161,169,.72); background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(229,237,240,.58)); font-size: 17px; }
.backup-panel-header .backup-disconnect-button { color: #fff; background: var(--danger); font-size: 21px; font-weight: 800; }
.backup-panel-header .backup-restore-button:disabled { opacity: .35; cursor: not-allowed; filter: grayscale(.25); }
.backup-panel-tools { display: none; }
.backup-panel-tools label { display: grid; gap: 5px; max-width: 240px; }
.backup-status { min-height: 20px; margin: 14px 18px 0; color: var(--muted); }
#backup-status { display: none; }
#remote-backup-status { display: none; }
.backup-list { display: grid; grid-auto-rows: max-content; align-content: start; gap: 2px; max-height: 535px; padding: 8px 18px 12px; overflow: auto; }
.remote-backup-list { max-height: 535px; }
.backup-empty-state { align-self: start; margin: 8px 0; padding: 14px 16px; border: 1px dashed #cbd7dc; border-radius: 8px; color: #627780; background: #f8fafb; font-size: 12px; line-height: 1.45; }
.backup-row { display: flex; gap: 12px; align-items: center; min-height: 36px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.backup-row > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.backup-select { width: 18px; height: 18px; accent-color: var(--brand); }
.backup-row-actions { display: flex; gap: 8px; }
.backup-row:last-child { border-bottom: 0; }
.backup-row p { margin: 0; color: var(--muted); font-size: 12px; white-space: nowrap; }
.external-backup-form { display: grid; gap: 14px; padding: 22px; }
.backup-info-grid { display: grid; gap: 16px; }
.backup-info-content { min-width: min(560px, 82vw); }
#local-backup-info-dialog, #remote-backup-info-dialog { width: min(620px, 92vw); }
.backup-info-grid div { display: grid; gap: 4px; }
.backup-info-grid small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.backup-info-grid strong { overflow-wrap: anywhere; }
.external-backup-form p { margin: 0; color: var(--muted); }
.external-backup-form .backup-status { min-height: 0; color: var(--ink); }
.backup-valid { color: #176b43; font-weight: 750; }
.backup-invalid { color: #a13232; font-weight: 750; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 30; transform: translateY(20px); opacity: 0; padding: 13px 17px; color: white; background: #17232d; border-radius: 4px; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

body[data-active-view="alerts-view"] .brand .brand-mark { background: #263d49; }
.alerts-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; padding: 28px 30px; color: white; background: #263d49; box-shadow: var(--shadow); }
.alerts-heading > div > p:last-child { margin: 9px 0 0; color: #d8e0e4; }
.alerts-updated { color: #d8e0e4; white-space: nowrap; }
.alerts-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.alert-summary-card { display: grid; gap: 5px; min-height: 132px; padding: 20px; border: 1px solid var(--line); border-top: 4px solid var(--brand); background: white; box-shadow: var(--shadow); }
.alert-summary-card small { color: var(--muted); font-weight: 750; }
.alert-summary-card strong { font-size: 34px; line-height: 1; }
.alert-summary-card span { color: var(--muted); font-size: 12px; }
.alert-summary-card.is-competency, .alert-summary-card.is-verification { border-top-color: #c0392b; }
.alert-summary-card.is-order { border-top-color: #9b3f4d; }
.alert-summary-card.is-deadline { border-top-color: #31566a; }
.alert-summary-card.is-neutral { border-top-color: #9ba6ac; }
.alert-summary-card.has-warning { border-top-color: var(--accent); }
.alert-summary-card.is-critical { border-top-color: var(--danger); }
.count.is-warning { color: #fff; background: var(--accent); }
.count.is-critical { color: white; background: var(--danger); }
.alerts-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.alerts-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.alerts-panel { overflow: hidden; border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.alerts-panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.alerts-panel-heading h2 { margin: 0; font-size: 18px; }
.alerts-panel-heading .eyebrow { color: var(--brand); }
.alerts-panel-heading .button { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.alerts-list { max-height: 330px; overflow-y: auto; }
#alerts-competency-list { height: 146px; }
#alerts-competency-list .alerts-empty { min-height: 146px; }
#alerts-competency-list .competency-alert-row { grid-template-columns: 24px minmax(0, 1fr) 14px; min-height: 35px; height: 35px; gap: 8px; padding: 4px 12px; }
#alerts-competency-list .competency-alert-row .alert-row-icon { width: 24px; height: 24px; font-size: 14px; }
#alerts-verification-list { height: 210px; }
#alerts-verification-list .alerts-empty { min-height: 210px; }
#alerts-order-list { height: 146px; }
#alerts-order-list .alerts-empty { min-height: 146px; }
#alerts-scheduled-list { height: 146px; }
#alerts-scheduled-list .alerts-empty { min-height: 146px; }
#alerts-verification-list .alert-row, #alerts-order-list .alert-row, #alerts-scheduled-list .alert-row { grid-template-columns: 24px minmax(0, 1fr) auto 14px; min-height: 35px; height: 35px; gap: 8px; padding: 4px 12px; }
#alerts-verification-list .alert-row-icon, #alerts-order-list .alert-row-icon, #alerts-scheduled-list .alert-row-icon { width: 24px; height: 24px; font-size: 14px; }
#alerts-verification-list .alert-row-arrow, #alerts-order-list .alert-row-arrow, #alerts-scheduled-list .alert-row-arrow { font-size: 20px; line-height: 1; }
.alert-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; width: 100%; padding: 15px 18px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: white; text-align: left; }
.alert-row:last-child { border-bottom: 0; }
.alert-row:hover, .alert-row:focus { background: #f4f8f7; outline: none; }
.alert-row.is-overdue { background: white; border-left: 0; }
.alert-row.is-overdue small { color: var(--danger); font-weight: 750; }
.alert-row.is-near-margin { background: white; border-left: 0; }
.alert-row.is-near-margin small { color: #00688b; font-weight: 750; }
.competency-alert-row { grid-template-columns: 34px minmax(0, 1fr); }
.competency-alert-row.is-overdue .alert-row-icon { color: #fff; background: var(--danger); }
.competency-alert-row.is-near-margin { background: white; border-left: 0; }
.competency-alert-row.is-near-margin .alert-row-icon { color: #171c20; background: #f2a51a; }
.alert-row-copy { display: grid; gap: 4px; min-width: 0; }
.alert-row-icon { display: grid; width: 34px; height: 34px; place-items: center; color: #171c20; background: #f3a719; border-radius: 2px; font-size: 18px; font-weight: 900; }
.alert-row-icon[hidden] { display: grid; visibility: hidden; }
.alert-row-copy strong, .alert-row-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-row-copy small, .alert-row-date { color: var(--muted); font-size: 12px; }
.alert-row-arrow { color: var(--brand); font-size: 24px; }
.alerts-empty { display: grid; place-items: center; min-height: 130px; padding: 22px; color: var(--muted); text-align: center; }
.alerts-empty span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #27613c; background: #dff1e5; font-weight: 900; }
.alerts-empty.is-warning span { color: #171c20; background: #f2a51a; }
.alerts-empty.is-error span { width: 38px; height: 38px; color: #fff; background: var(--danger); font-size: 20px; box-shadow: 0 2px 5px rgba(161,50,50,.22); }
.alerts-empty.is-error p { color: #a13232; font-weight: 750; }
.alerts-empty p { margin: 9px 0 0; }
.alerts-deadline-panel { grid-column: 1 / -1; }
.alerts-placeholder { padding: 24px; color: var(--muted); background: #f8fafb; }
.alerts-placeholder p { max-width: 760px; margin: 7px 0 0; line-height: 1.5; }
.personnel-heading { margin-bottom: 18px; }
.settings-tabs { display: flex; gap: 7px; margin: 0 0 18px; padding: 8px 26px; border: 1px solid var(--line); border-top: 3px solid #424e54; background: #eef2f3; box-shadow: 0 5px 16px rgba(35,44,49,.06); }
.settings-tab { min-height: 40px; padding: 10px 16px; border: 1px solid transparent; border-radius: 2px; color: #53636c; background: transparent; font-size: 12px; font-weight: 800; }
.settings-tab:hover { color: var(--ink); background: #e0e7e9; }
.settings-tab.is-active { color: #fff; border-color: #354047; background: #354047; box-shadow: inset 0 1px rgba(255,255,255,.12), 0 2px 5px rgba(35,44,49,.14); }
.settings-panel[hidden] { display: none !important; }
.settings-placeholder { padding: 28px; border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.settings-placeholder h2 { margin: 0; font-size: 18px; }
.settings-placeholder p { margin: 8px 0 0; color: var(--muted); }
.email-notifications-panel { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.email-notifications-heading { display: flex; align-items: center; gap: 16px; min-height: 64px; box-sizing: border-box; margin-bottom: 20px; padding: 10px 16px; border: 1px solid #c9d5da; border-radius: 8px; background: #fff; }.email-notifications-title { display: flex; align-items: center; gap: 12px; }.email-notifications-heading h2 { margin: 0; font-size: 24px; }
.email-notifications-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #b9d7df; border-radius: 50%; color: #fff; background: var(--brand); box-shadow: 0 3px 10px rgba(0,104,139,.24); transition: transform .18s ease, background-color .18s ease; }.email-notifications-icon:hover, .email-notifications-icon:focus-visible { background: var(--brand-dark); outline: none; transform: translateY(-1px); }.email-notifications-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.email-notifications-heading p { margin: 6px 0 0; color: var(--muted); }
.email-notifications-info { margin: 20px 0; padding: 16px 18px; border: 1px solid #c9dce3; border-radius: 7px; color: #315d6b; background: #edf7fa; font-size: 13px; font-weight: 700; }
.email-notifications-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); gap: 20px; min-height: 0; }
.email-notifications-card { min-height: 0; padding: 0; overflow: hidden; border: 1px solid #d4dde1; border-radius: 8px; background: #fff; box-shadow: 0 4px 12px rgba(32,49,58,.05); }
.email-card-heading { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid #dce5e8; background: #f8fbfc; }.email-card-heading-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border: 1px solid #bfe0e6; border-radius: 50%; color: var(--brand); background: #eaf7f9; }.email-card-heading-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }.email-card-heading h3 { margin: 0; font-size: 19px; }.email-card-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }.email-card-body { padding: 20px; }
.email-recipient-form { display: grid; grid-template-columns: 1fr 1.35fr auto; gap: 8px; margin: 0 0 16px; }.email-recipient-form input { min-width: 0; }
.email-recipient-list { overflow: hidden; border: 1px solid #dce3e6; border-radius: 6px; }.email-recipient-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-bottom: 1px solid #e2e8ea; }.email-recipient-row:last-child { border-bottom: 0; }.email-recipient-person { display: flex; align-items: center; gap: 12px; min-width: 0; }.email-recipient-avatar { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border: 1px solid #bfe0e6; border-radius: 50%; color: var(--brand); background: #eaf7f9; }.email-recipient-avatar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }.email-recipient-copy { display: grid; gap: 3px; }.email-recipient-copy span { color: var(--muted); font-size: 12px; }.email-recipient-delete { width: 32px; height: 32px; color: #c93e4b; font-size: 22px; }.email-recipient-empty { margin: 0; padding: 18px; color: var(--muted); font-size: 13px; }
.email-event-list { display: grid; padding: 0 20px; }.email-event-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 55px; border-bottom: 1px solid #e3e8ea; color: var(--ink); font-size: 14px; font-weight: 700; }.email-event-row:last-child { border-bottom: 0; }.email-event-row input { position: absolute; opacity: 0; pointer-events: none; }.email-event-row i { position: relative; width: 46px; height: 25px; border-radius: 20px; background: #b9c3c8; transition: .2s; }.email-event-row i::after { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; content: ''; transition: .2s; box-shadow: 0 1px 3px #0003; }.email-event-row input:checked + i { background: var(--accent); }.email-event-row input:checked + i::after { transform: translateX(21px); }
.email-events-card { display: flex; flex-direction: column; }.email-notifications-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: auto; padding: 20px; }.email-notifications-actions .button { min-width: 170px; }
.email-notification-history { margin-top: 24px; padding: 22px; border: 1px solid #d4dde1; border-radius: 8px; background: #fff; }.email-notification-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }.email-notification-history h3 { margin: 0; font-size: 19px; }.email-notification-history-list { margin-top: 14px; border-top: 1px solid #e2e9ec; }.email-notification-history-row { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(180px, 1.4fr) minmax(0, 2fr) auto auto; gap: 14px; align-items: center; padding: 13px 4px; border-bottom: 1px solid #e2e9ec; font-size: 13px; }.email-notification-history-row strong, .email-notification-history-row span { display: block; }.email-notification-history-row span { color: var(--muted); margin-top: 3px; }.email-notification-status { padding: 5px 9px; border-radius: 999px; font-weight: 800; font-size: 11px; background: #fff1cc; color: #985f00; white-space: nowrap; }.email-notification-delete { width: 32px; height: 32px; color: #c93e4b; font-size: 22px; }.email-notification-history-empty { padding: 16px 0 2px; margin: 0; color: var(--muted); }
.email-history-dialog { width: min(1260px, 94vw); background: #f7fafb; }.email-history-dialog .email-notification-history { margin: 0; border: 0; border-radius: 0; background: transparent; }
.email-history-dialog .email-history-dialog-header { padding: 18px 22px; border-bottom: 1px solid #d7e0e3; background: #eef3f5; }.email-history-dialog-title { display: flex; align-items: center; gap: 12px; }.email-history-dialog-title > span { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #8bcbd8; border-radius: 50%; color: var(--brand); background: #f8ffff; }.email-history-dialog-title svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }.email-history-dialog-title h2 { font-size: 17px; }.email-history-dialog-header .icon-button { width: 38px; height: 38px; border: 1px solid #cbd9de; border-radius: 7px; color: #42525b; background: #fff; font-size: 24px; }
.email-event-row input:checked + i { background: var(--brand); }
@media (max-width: 900px) { .email-notifications-grid, .email-format-grid { grid-template-columns: 1fr; }.email-recipient-form { grid-template-columns: 1fr; }.email-notifications-actions { flex-wrap: wrap; } }
.fleet-management-panel { display: grid; gap: 18px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.fleet-management-panel #fleet-registry-form { padding: 0; border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.fleet-registry-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; gap: 18px; }
.fleet-registry-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.fleet-registry-grid input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.fleet-registry-grid input[type="number"]::-webkit-inner-spin-button, .fleet-registry-grid input[type="number"]::-webkit-outer-spin-button { margin: 0; appearance: none; }
.fleet-registry-actions { white-space: nowrap; }
.fleet-registry-table { margin-top: 0; table-layout: fixed; }
.fleet-registry-table th:nth-child(1), .fleet-registry-table td:nth-child(1) { width: 110px; }
.fleet-registry-table th:nth-child(2), .fleet-registry-table td:nth-child(2) { width: 130px; }
.fleet-registry-table th:nth-child(4), .fleet-registry-table td:nth-child(4) { width: 220px; }
.fleet-registry-table th:last-child, .fleet-registry-table td:last-child { width: 132px; }
.fleet-registry-table th.personnel-access-table-action { display: table-cell; text-align: right; }
.fleet-registry-table th.personnel-access-table-action .new-maintainer-button { margin-left: auto; }
.fleet-management-panel .personnel-table-wrap { margin-top: 0; border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.fleet-registry-table th:last-child, .fleet-registry-table td:last-child { text-align: right; }
.fleet-registry-table td:last-child { padding-right: 34px; white-space: nowrap; }
.fleet-registry-row-actions { display: flex; justify-content: flex-end; gap: 8px; }
.fleet-registry-row-actions .icon-button { flex: 0 0 34px; width: 34px; height: 34px; font-size: 19px; }
.fleet-registry-row-actions .fleet-registry-delete { padding-bottom: 3px; color: #fff; background: linear-gradient(145deg, rgba(200,73,82,.82), rgba(173,52,62,.76)); border-color: rgba(173,52,62,.78); }
.fleet-registry-row-actions .fleet-registry-delete:hover { color: #fff; background: linear-gradient(145deg, rgba(214,83,93,.94), rgba(142,42,51,.9)); border-color: #8e2a33; }
.fleet-registry-hero { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; align-items: center; gap: 22px; min-height: 142px; padding: 26px 36px; border: 1px solid #dce5e8; border-radius: 15px; background: linear-gradient(112deg, #fff 0%, #fbfdfe 100%); box-shadow: 0 10px 22px rgba(30, 66, 82, .10); }
.fleet-registry-hero-icon { display: grid; width: 82px; height: 82px; place-items: center; border: 0; border-radius: 50%; background: #00688b; box-shadow: 0 8px 16px rgba(8, 122, 145, .25); }
.fleet-registry-hero-icon img { width: 56px; height: 56px; }
.fleet-registry-hero h2 { margin: 0; color: #102b4d; font-size: 31px; letter-spacing: -.6px; }
.fleet-registry-hero p { margin: 7px 0 0; color: #66778f; font-size: 17px; }
.fleet-registry-new { display: inline-flex; align-items: center; justify-content: center; min-height: 57px; padding: 0 24px; gap: 10px; font-size: 16px; box-shadow: 0 8px 14px rgba(0, 114, 136, .18); }
.fleet-registry-new span { display: inline-block; margin: 0; font-size: 27px; font-weight: 400; line-height: 1; transform: translateY(-1px); }
.fleet-management-panel .personnel-table-wrap { overflow: hidden; border-radius: 15px; box-shadow: 0 10px 22px rgba(30, 66, 82, .10); }
.fleet-registry-table { table-layout: auto; }
.fleet-registry-table th, .fleet-registry-table td { height: 91px; padding: 16px 26px; text-align: left; font-size: 16px; font-weight: 500; }
.fleet-registry-table th { height: 82px; color: #102b4d; background: #fff; font-size: 13px; font-weight: 850; text-transform: uppercase; }
.fleet-registry-table tbody tr { background: #fff !important; }
.fleet-registry-table tbody tr:hover { background: #f9fcfd !important; }
.fleet-registry-table td:not(:first-child) { color: #354a68; font-weight: 500; }
.fleet-registry-table th:first-child, .fleet-registry-table td:first-child { padding-left: 26px; }
.fleet-registry-table th:first-child, .fleet-registry-table td:first-child { min-width: 155px; }
.fleet-registry-train-cell { display: inline-flex; align-items: center; gap: 13px; white-space: nowrap; }
.fleet-registry-train-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; color: #00688b; }
.fleet-registry-train-icon img { width: 34px; height: 34px; }
.fleet-temporal-status { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.fleet-temporal-status i { width: 10px; height: 10px; border-radius: 50%; background: #00688b; }.fleet-temporal-status.is-empty i { background: #a8b1bf; }
.fleet-registry-row-actions { gap: 10px; }.fleet-registry-manage { min-height: 47px; padding: 0 16px; color: #00688b; border-color: #00688b; background: #fff; font-size: 15px; font-weight: 800; }.fleet-registry-manage span { margin-right: 6px; font-size: 19px; }.fleet-registry-row-actions .fleet-registry-delete { width: 47px; height: 47px; flex-basis: 47px; padding: 0; color: #e54d60; border-color: #f1a0aa; background: #fff; font-size: 24px; }.fleet-registry-row-actions .fleet-registry-delete:hover { color: #fff; background: #d95767; border-color: #d95767; }
.fleet-management-panel .fleet-registry-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.fleet-management-panel .fleet-registry-row-actions .fleet-registry-manage { display: inline-flex; min-height: 0; height: 40px; align-items: center; gap: 7px; padding: 0 13px; color: #00688b !important; border: 1px solid #25bad0 !important; border-radius: 5px; background: #fff !important; box-shadow: none !important; font-size: 14px; font-weight: 800; }
.fleet-management-panel .fleet-registry-manage svg { width: 19px; height: 19px; fill: currentColor; stroke: none; }
.fleet-management-panel .fleet-registry-row-actions .fleet-registry-delete { display: grid; width: 40px; height: 40px; flex-basis: 40px; padding: 0; place-items: center; color: #e64f62 !important; border: 1px solid #f29ba7 !important; border-radius: 5px; background: #fff !important; box-shadow: none !important; }
.fleet-management-panel .fleet-registry-delete svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fleet-management-panel .fleet-registry-row-actions .fleet-registry-manage:hover { color: #fff !important; background: #00688b !important; }.fleet-management-panel .fleet-registry-row-actions .fleet-registry-delete:hover { color: #fff !important; background: #e64f62 !important; border-color: #e64f62 !important; }
.personnel-layout { display: grid; gap: 16px; }
.personnel-panel { overflow: hidden; border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
#personnel-admin-panel { display: grid; gap: 16px; overflow: visible; border: 0; background: transparent; box-shadow: none; }
#personnel-admin-panel { grid-template-columns:260px minmax(0,1fr); grid-template-rows:auto minmax(0,1fr); align-content:start; align-items:start; }
#personnel-admin-panel > .access-hero { grid-column:2; grid-row:1; }.access-users-sidebar { display:flex; min-height:0; height:100%; grid-column:1; grid-row:1 / span 2; align-self:stretch; flex-direction:column; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:var(--shadow); }.access-users-sidebar header { display:flex; flex:0 0 auto; align-items:center; gap:10px; min-height:68px; box-sizing:border-box; padding:13px 20px; border-bottom:1px solid #e1e7eb; background:#f6fafb; }.access-users-sidebar-icon { display:grid; width:40px; height:40px; box-sizing:border-box; flex:0 0 40px; place-items:center; border:1px solid #b9dde2; border-radius:6px; color:#00688b; background:#e4f5f7; }.access-users-sidebar-icon svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }.access-users-sidebar small { color:#153352; font-size:13px; font-weight:800; letter-spacing:.06em; }.access-users-side-list { display:grid; min-height:0; align-content:start; flex:1; gap:7px; padding:10px; overflow:auto; }.access-users-side-list .access-user-list-item { min-height:66px; padding:10px; }.access-users-side-list .access-user-list-role { display:none; }.access-users-empty { margin:8px; color:#718197; font-size:12px; text-align:center; }
.access-users-sidebar-footer { flex:0 0 auto; padding:16px; border-top:1px solid #d5dde0; background:#fff; }.access-delete-user { display:inline-flex; min-height:40px; align-items:center; padding:0; border:0; color:#20282d; background:transparent; box-shadow:none; }.access-delete-user-icon { display:grid; width:40px; height:40px; margin-right:9px; place-items:center; border:1px solid #dfb6b2; border-radius:6px; color:#94372f; background:#f9e9e7; }.access-delete-user-icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }.access-delete-user:hover:not(:disabled) { color:#20282d; background:transparent; }.access-delete-user:hover:not(:disabled) .access-delete-user-icon { border-color:#c57f78; color:#7f2b25; background:#f5d9d5; }.access-delete-user:disabled { color:#20282d; cursor:not-allowed; opacity:1; }
#personnel-admin-panel .personnel-users-toolbar, #personnel-admin-panel > form:not([hidden]), #personnel-admin-panel > .personnel-table-wrap { border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
#personnel-admin-panel > .personnel-table-wrap { margin: 0; }
.access-hero { display:flex; align-items:center; gap:15px; min-height:68px; padding:10px 22px; border-radius:9px; background:#fff; box-shadow:var(--shadow); }
.access-hero-icon { display:grid; width:46px; height:46px; box-sizing:border-box; flex:0 0 46px; place-items:center; border:1px solid #b9dde2; border-radius:7px; color:#00688b; background:#e4f5f7; box-shadow:none; }
.access-hero-icon svg { width:27px; height:27px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.access-hero h2 { margin:0; color:#102950; font-size:24px; line-height:1.05; }.access-hero p { margin:3px 0 0; color:#61718a; font-size:13px; }.access-new-user { display:inline-flex; align-items:center; gap:9px; min-height:36px; margin-left:auto; padding:0 16px; font-size:12px; }.access-new-user span { font-size:21px; line-height:1; transform:translateY(-1px); }
#personnel-admin-panel > .account-access-form { display:grid; min-height:0; height:100%; grid-column:2; grid-row:2; align-self:stretch; grid-template-rows:auto minmax(0,1fr); gap:16px; border:0; background:transparent; box-shadow:none; }
#personnel-admin-panel > form.account-access-form:not([hidden]) { border:0; background:transparent; box-shadow:none; }
#personnel-admin-panel > .account-access-form[hidden] { display:none !important; }
.access-profile-actions { display:none; align-items:center; justify-content:flex-end; gap:10px; padding:14px 18px; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:var(--shadow); }
.account-access-form.is-profile-only .access-profile-actions { display:none; }
.account-access-form.is-profile-only .access-permissions-card { display:grid; }
.account-access-form.is-profile-only .access-user-card { min-height:0; }
.account-access-form.is-profile-only .access-user-card.is-editing .access-role-field { grid-column:3; }
.account-access-form.is-profile-only .access-user-card.is-editing .access-email-field { grid-column:4; }
.account-access-form.is-profile-only .access-user-card.is-editing .access-password-field { display:grid; grid-column:5; }
.access-editor-empty { display:grid; min-height:360px; height:100%; box-sizing:border-box; grid-column:2; grid-row:2; align-self:stretch; place-content:center; justify-items:center; padding:40px; border:1px solid #d6e0e5; border-radius:12px; color:#61718a; background:rgba(255,255,255,.72); text-align:center; }.access-editor-empty[hidden] { display:none; }.access-editor-empty-icon { display:grid; width:58px; height:58px; place-items:center; border-radius:50%; color:#00688b; background:#e4f5f7; }.access-editor-empty-icon svg { width:30px; height:30px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; }.access-editor-empty h2 { margin:16px 0 5px; color:#102950; font-size:20px; }.access-editor-empty p { max-width:430px; margin:0; font-size:13px; line-height:1.5; }
.access-user-card { display:grid; grid-template-columns:50px minmax(180px,.8fr) repeat(3,minmax(180px,1fr)); align-items:center; gap:10px 16px; min-height:76px; padding:10px 20px; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:var(--shadow); }
.access-user-avatar { display:grid; width:48px; height:48px; box-sizing:border-box; place-items:center; border:1px solid #b9dde2; border-radius:7px; color:#00688b; background:#e4f5f7; font-size:16px; font-weight:800; }.access-user-identity { display:grid; gap:3px; }.access-user-identity strong { color:#102950; font-size:19px; }.access-user-identity small { color:#65758a; font-size:12px; }
.access-user-card label { display:grid; gap:4px; color:#44576d; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.03em; }.access-user-card input,.access-user-card select { min-height:34px; border:1px solid #ccd8df; border-radius:5px; color:#17304e; background:#fff; font:inherit; font-size:13px; font-weight:700; }.access-user-card label > input,.access-user-card label > select { margin-top:0; padding:5px 9px; }
.access-active-field { display:flex !important; grid-column:auto; align-items:center; gap:8px; padding-top:8px; }.access-active-field > span:last-child { display:grid; gap:1px; color:#17304e; text-transform:none; letter-spacing:0; }.access-active-field b { font-size:13px; }.access-active-field small { color:#718196; font-size:10px; font-weight:600; }.access-active-field input { position:absolute; opacity:0; }.access-active-field .access-toggle-track { width:36px; min-height:20px; border-radius:999px; background:#b7c4cc; }.access-active-field input:checked + .access-toggle-track { background:#00688b; }.access-active-field .access-toggle-track::after { width:14px; height:14px; top:3px; left:3px; }.access-active-field input:checked + .access-toggle-track::after { transform:translateX(16px); }
.access-account-toggles { display:flex; grid-column:1/3; align-items:center; gap:24px; min-width:0; }
.access-account-toggles .access-active-field { grid-column:auto; flex:0 1 auto; }
.access-recovery-toggle[hidden] { display:none !important; }
.access-user-card.is-editing .access-email-field { grid-column:4; }
.access-user-card.is-editing .access-password-field { display:grid; grid-column:5; }
.access-user-card.is-editing { grid-template-columns:58px minmax(180px,.8fr) repeat(3,minmax(180px,1fr)); }
.access-user-card.is-editing .access-active-field { grid-column:1/3; }
.access-user-card.is-editing .access-role-field { grid-column:3; }
.access-user-card:not(.is-editing):not(.is-password-reset) .access-active-field { grid-column:1/3; }
.access-user-card:not(.is-editing):not(.is-password-reset) .access-role-field { grid-column:3; }
.access-user-card:not(.is-editing):not(.is-password-reset) .access-email-field { grid-column:4; }
.access-user-card:not(.is-editing):not(.is-password-reset) .access-password-field { grid-column:5; }
.access-username-field input[readonly] { color:#17304e; background:#f3f6f7; cursor:default; }
.access-recovery-info { display:grid; grid-column:1/-1; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px 16px; padding-top:14px; margin-top:4px; border-top:1px solid var(--line); }
.access-recovery-info[hidden] { display:none; }
.access-recovery-info h3 { margin:0 0 5px; color:#183553; font-size:14px; }
.access-recovery-info p { margin:0; color:#61718a; font-size:12px; line-height:1.5; }
.access-recovery-info output { color:#17304e; font-weight:700; }
.access-recovery-info .access-recovery-help { grid-column:1/-1; font-size:11px; }
.access-recovery-info .button { max-width:100%; white-space:normal; }
@media (max-width:900px) { .access-recovery-info { grid-template-columns:minmax(0,1fr); }.access-recovery-info .button { justify-self:start; } }
.access-role-field,.access-role-field select,.access-email-field { width:100%; min-width:0; }
.access-user-card.is-password-reset .access-name-field,.access-user-card.is-password-reset .access-surname-field { display:none; }
.access-password-field { grid-column:auto; }.access-permissions-card { display:grid; min-height:0; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:minmax(0,1fr) auto; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:var(--shadow); }.access-permission-column { min-width:0; min-height:0; padding:16px 28px 11px; overflow-y:auto; border-right:1px solid #e1e7eb; }.access-permission-column:last-of-type { border-right:0; }.access-permission-column h3 { display:flex; align-items:center; gap:8px; margin:0 0 9px; color:#183553; font-size:16px; }.access-permission-column h3 span { display:grid; width:28px; height:28px; place-items:center; border-radius:8px; color:#00688b; background:#e7f6f8; font-size:15px; }
.access-switches { display:grid; gap:5px; }.access-switch { display:flex; min-height:28px; align-items:center; justify-content:space-between; gap:10px; padding-bottom:2px; border-bottom:1px solid #e4eaee; color:#385069; font-size:13px; font-weight:700; }.access-switch input { position:absolute; opacity:0; }.access-switch-track { width:42px; height:24px; flex:0 0 42px; border-radius:999px; background:#bec9d0; transition:.15s ease; }.access-switch-track::after { display:block; width:18px; height:18px; margin:3px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.22); content:""; transition:.15s ease; }.access-switch input:checked + .access-switch-track { background:#00688b; }.access-switch input:checked + .access-switch-track::after { transform:translateX(18px); }.access-permissions-card footer { display:flex; grid-column:1/-1; align-items:center; justify-content:space-between; gap:16px; padding:12px 28px; border-top:1px solid #e1e7eb; background:#fbfcfd; }.access-permissions-card footer p { display:flex; align-items:center; gap:10px; margin:0; color:#718197; font-size:11px; }.access-permissions-card footer p::before { display:grid; width:16px; height:16px; flex:0 0 16px; place-items:center; border:2px solid #00688b; border-radius:50%; color:#00688b; font-size:10px; font-weight:800; content:"i"; }.access-permissions-card footer .personnel-inline-actions { margin:0; }.access-users-list { display:none !important; }.access-users-list .personnel-table tr { cursor:pointer; }
.access-hero-icon svg { fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }.access-hero-actions { display:flex; gap:9px; margin-left:auto; }.access-users-button { display:inline-flex; align-items:center; min-height:38px; padding:0 18px; color:#00688b; border-color:#36b7c8; background:#fff; font-size:13px; }.access-permission-column h3 span { font-size:0; }.access-permission-column h3 svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }.access-users-dialog { width:min(620px,calc(100vw - 32px)); padding:0; overflow:hidden; border:0; border-radius:14px; box-shadow:0 20px 56px rgba(16,41,80,.28); }.access-users-dialog::backdrop { background:rgba(13,31,50,.34); }.access-users-dialog header { display:flex; align-items:center; justify-content:space-between; padding:20px 24px; border-bottom:1px solid #e2e8ec; background:#fff; }.access-users-dialog header small { color:#00688b; font-size:10px; font-weight:800; letter-spacing:.08em; }.access-users-dialog header h2 { margin:4px 0 0; color:#102950; font-size:22px; }.access-users-dialog-list { display:grid; gap:8px; max-height:60vh; padding:16px; overflow:auto; background:#f6f9fa; }.access-user-list-item { display:flex; align-items:center; gap:13px; width:100%; padding:13px; border:1px solid #dce5e9; border-radius:9px; color:#193553; background:#fff; text-align:left; }.access-user-list-item:hover,.access-user-list-item.is-selected { border-color:#00688b; background:#eefbfc; }.access-user-list-avatar { display:grid; width:40px; height:40px; place-items:center; border-radius:50%; color:#00688b; background:#e3f6f8; font-size:12px; font-weight:800; }.access-user-list-item strong,.access-user-list-item small { display:block; }.access-user-list-item small { margin-top:3px; color:#708096; }.access-user-list-role { margin-left:auto; color:#00688b; font-size:12px; font-weight:800; }
@media (max-width:1100px) { .access-user-card { grid-template-columns:58px 1fr repeat(2,minmax(150px,1fr)); }.access-password-field { grid-column:2/-1; }.access-permissions-card { grid-template-columns:1fr; }.access-permission-column { border-right:0; border-bottom:1px solid #e1e7eb; } }
@media (max-width:1000px) { #personnel-admin-panel { grid-template-columns:1fr; grid-template-rows:auto auto auto; } #personnel-admin-panel > .access-hero { grid-column:1; grid-row:1; }.access-users-sidebar { height:auto; min-height:150px; grid-column:1; grid-row:2; }.access-users-side-list { grid-template-columns:repeat(2,minmax(0,1fr)); } #personnel-admin-panel > .account-access-form,.access-editor-empty { grid-column:1; grid-row:3; } }
@media (max-width:720px) { .access-hero { align-items:flex-start; flex-wrap:wrap; padding:22px; }.access-hero h2 { font-size:25px; }.access-new-user { width:100%; justify-content:center; margin-left:0; }.access-user-card { grid-template-columns:62px 1fr; padding:22px; }.access-user-card label,.access-password-field { grid-column:1/-1; }.access-permissions-card footer { align-items:stretch; flex-direction:column; }.access-permissions-card footer .personnel-inline-actions { justify-content:stretch; }.access-permissions-card footer button { flex:1; } }
.access-user-list-avatar { flex:0 0 40px; box-sizing:border-box; border:1px solid #b9dde2; border-radius:6px; }
.access-user-list-copy { min-width:0; flex:1; }
.access-user-list-copy strong,.access-user-list-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.access-user-list-arrow { flex:0 0 auto; margin-left:auto; color:#00688b; font-size:27px; font-weight:500; line-height:1; transition:transform .15s ease; }
.access-user-list-item:hover .access-user-list-arrow,.access-user-list-item.is-selected .access-user-list-arrow { transform:translateX(2px); }
.maintainer-management-panel { display: grid; gap: 18px; overflow: visible; border: 0; background: transparent; box-shadow: none; }
.maintainer-management-panel .personnel-users-toolbar, .maintainer-management-panel > form:not([hidden]), .maintainer-management-panel > .personnel-table-wrap { border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.maintainer-management-panel > .personnel-table-wrap { margin: 0; }
.personnel-users-toolbar { display: flex; justify-content: flex-end; padding: 16px 34px; }
.personnel-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 34px; border-bottom: 1px solid var(--line); background: #eef2f3; }
.personnel-panel-heading small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.personnel-panel-heading h2 { margin: 3px 0 0; font-size: 18px; }
.personnel-panel form > .field-grid { margin: 0; padding: 20px 34px; }
.personnel-form-hint { margin: -8px 34px 18px; color: var(--muted); font-size: 12px; }
.personnel-feedback { margin: 0 34px 18px; padding: 10px 12px; color: #00688b; background: #e7f5f7; border-left: 3px solid var(--accent); font-size: 12px; font-weight: 750; }
.personnel-feedback[data-state="success"] { color: #216844; background: #e4f3e9; border-left-color: var(--success); }
.personnel-form-actions { padding: 15px 34px; border-top: 1px solid var(--line); }
.personnel-competencies { position: relative; display: grid; gap: 7px; min-width: 0; }
.personnel-competencies-toggle { width: 100%; min-height: 42px; padding: 10px 34px 10px 11px; overflow: hidden; border: 1px solid #bdc8ce; border-radius: 4px; color: var(--ink); background: white; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.personnel-competencies-toggle::after { position: absolute; top: 31px; right: 12px; color: var(--muted); content: "⌄"; font-size: 17px; pointer-events: none; }
.personnel-competencies-toggle:disabled { color: #657681; background: #eef2f3; cursor: not-allowed; }
.personnel-competencies-panel { position: absolute; top: calc(100% + 4px); left: 0; z-index: 10; width: 255px; padding: 9px; border: 1px solid #bdc8ce; border-radius: 4px; background: white; box-shadow: var(--shadow); }
.personnel-competencies-options { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; gap: 3px; }
.personnel-competencies-options span { min-width: 64px; padding: 7px 8px; font-size: 11px; }
.personnel-competencies-options input:disabled + span { color: #657681; background: #dfe7e9; }
.personnel-inline-actions { display: flex; align-items: end; justify-content: flex-end; gap: 8px; }
.maintainer-management-panel > #user-access-form > .personnel-inline-actions { margin: 0 34px 22px; }
.competency-expiry-section { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 16px 24px; margin: 6px 34px 22px; padding: 20px 26px 16px; border: 1px solid #d0d7da; border-left: 4px solid var(--accent); border-radius: 0 5px 5px 0; background: linear-gradient(135deg, #fafbfb, #f0f2f3); box-shadow: 0 5px 14px rgba(35, 44, 49, .06); }
.competency-expiry-section:not(.is-monitoring) { display: none; }
.competency-expiry-section.is-monitoring { grid-template-columns: 1fr; }
.competency-expiry-section.is-monitoring #competency-expiry-panel { display: contents; }
.competency-expiry-section #competency-expiry-panel[hidden] { display: none !important; }
.competency-expiry-settings { display: grid; grid-template-columns: repeat(2, minmax(360px, 1fr)); gap: 12px; max-width: 860px; }
.competency-expiry-choice { position: relative; display: grid; grid-template-columns: minmax(130px, 1fr) minmax(150px, 190px); align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid #d4dadd; border-radius: 5px; background: rgba(255, 255, 255, .76); color: #40515e; font-size: 12px; font-weight: 700; }
.competency-expiry-choice > span { color: var(--brand-dark); font-weight: 800; }
.competency-expiry-choice-toggle { min-height: 40px; padding: 8px 11px; border: 1px solid #b7c0c4; border-radius: 3px; color: var(--ink); background: #fff; text-align: left; font: inherit; font-weight: 750; }
.competency-expiry-choice-toggle::after { float: right; color: var(--brand); content: "⌄"; font-size: 16px; line-height: .8; }
.competency-expiry-choice-panel { position: absolute; z-index: 12; top: calc(100% + 5px); left: 0; width: 100%; padding: 8px; border: 1px solid #b8c8ce; border-radius: 4px; background: rgba(250,252,252,.96); box-shadow: 0 8px 18px rgba(31,40,45,.16); backdrop-filter: blur(8px); }
.competency-expiry-choice-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.competency-expiry-choice-options button { min-height: 34px; border: 1px solid #9eb2ba; border-radius: 2px; color: var(--ink); background: rgba(255,255,255,.78); font-size: 12px; font-weight: 800; }
.competency-expiry-choice-options button:hover, .competency-expiry-choice-options button.is-selected { color: #fff; border-color: var(--brand); background: linear-gradient(145deg, rgba(0,104,139,.84), rgba(0,104,139,.78)); }
.competency-renewal-list { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px 16px; padding-top: 17px; border-top: 1px solid #d0d7da; }
.competency-renewal-list::before { grid-column: 1 / -1; padding-bottom: 1px; color: var(--brand-dark); content: "Ultimo rinnovo abilitazioni"; font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.competency-renewal-list > label { display: grid; gap: 8px; padding: 11px; border: 1px solid #d2d8da; border-radius: 5px; background: rgba(255, 255, 255, .86); box-shadow: 0 2px 5px rgba(35, 44, 49, .035); transition: border-color .15s ease, box-shadow .15s ease; }
.competency-renewal-list > label:focus-within { border-color: #87959a; box-shadow: 0 0 0 3px rgba(83, 99, 108, .12); }
.competency-renewal-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.competency-renewal-name strong { color: var(--accent); font-size: 12px; white-space: nowrap; }
.competency-renewal-name small { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.competency-renewal-list > label input { width: 100%; min-height: 40px; }
.competency-expiry-section.is-monitoring .personnel-inline-actions { grid-column: 1 / -1; margin-top: 2px; padding-top: 14px; border-top: 1px solid #d0d7da; }
.competency-renewal-list p { margin: 0; color: var(--muted); }
.maintainer-profile-card { margin: 0 34px 22px; overflow: hidden; border: 1px solid #cbd5d9; border-radius: 6px; background: #f8fafb; box-shadow: 0 7px 20px rgba(35, 44, 49, .08); }
.maintainer-profile-summary { display: flex; align-items: center; gap: 20px; padding: 22px 26px; border-bottom: 1px solid #d6dde0; background: linear-gradient(105deg, #fff, #edf3f5); }
.maintainer-profile-avatar { display: grid; width: 68px; height: 68px; place-items: center; flex: 0 0 68px; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #00688b, #00688b); box-shadow: inset 0 0 0 10px #e4f3f6; font-size: 21px; font-weight: 850; }
.maintainer-profile-summary strong { color: #1b282f; font-size: 27px; line-height: 1.1; }
.maintainer-profile-summary p { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0 0; color: #53636b; font-size: 14px; }
.maintainer-profile-summary p span + span { padding-left: 18px; border-left: 1px solid #b6c1c6; }
.maintainer-profile-summary b { color: #293940; font-weight: 750; }
.maintainer-profile-card > .personnel-data-grid { padding: 24px 26px 4px; }
.maintainer-profile-card > .competency-expiry-section { margin: 6px 26px 26px; }
.maintainer-profile-card #user-competencies-fieldset, .maintainer-profile-card .access-enabled-field:has(input[name="monitorCompetencyExpiry"]), .maintainer-profile-card .competency-expiry-settings, .maintainer-profile-card .competency-renewal-list { display: none; }
.maintainer-profile-card .competency-expiry-section { display: grid; grid-template-columns: 1fr; border-left: 4px solid var(--accent); }
.competency-train-section { grid-column: 1 / -1; margin-top: 18px; padding-top: 17px; border-top: 1px solid #d0d7da; }
.competency-train-section h3 { margin: 0; color: var(--brand-dark); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.competency-train-section p { margin: 5px 0 12px; color: var(--muted); font-size: 12px; }
.competency-train-table-wrap { overflow-x: auto; border: 1px solid #d3dce0; border-radius: 4px; background: #fff; }
.competency-train-table { width: 100%; min-width: 700px; border-collapse: collapse; }
.competency-train-table th, .competency-train-table td { padding: 10px 12px; border-right: 1px solid #e0e6e8; border-bottom: 1px solid #dce3e6; text-align: center; }
.competency-train-table thead th { color: #253239; background: #eef2f4; font-size: 12px; font-weight: 850; }
.competency-train-table thead th:first-child, .competency-train-table tbody th { min-width: 230px; text-align: left; }
.competency-train-table tbody th { color: #24333a; background: #f9fbfb; font-size: 12px; }
.competency-train-table tbody th strong, .competency-train-table tbody th small { display: block; }
.competency-train-table tbody th small { margin-top: 3px; color: #68777e; font-size: 11px; font-weight: 600; }
.competency-train-check { display: inline-grid; width: 27px; height: 27px; place-items: center; border: 1px solid #aab7bd; border-radius: 3px; color: transparent; background: #fff; cursor: pointer; }
.competency-train-check input { position: absolute; opacity: 0; }
.competency-train-check:has(input:checked) { border-color: #00688b; color: #fff; background: linear-gradient(145deg, #00688b, #00688b); box-shadow: 0 2px 5px rgba(0, 104, 139, .2); }
.competency-train-expiry { color: #33434b; font-size: 12px; font-weight: 750; white-space: nowrap; }
.competency-train-expiry input { min-height: 34px; padding: 5px 7px; font-size: 12px; }
.competency-train-empty { margin: 0; padding: 15px; border: 1px dashed #bac6ca; border-radius: 4px; color: #63737a; background: #f7fafb; font-size: 12px; }
.personnel-inline-actions .button { min-height: 39px; }
.personnel-table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.personnel-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.competency-monitoring-status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 3px; color: #657681; background: #e8eef0; font-size: 12px; font-weight: 700; white-space: nowrap; }
.competency-monitoring-status.is-active { color: #17643b; background: #e0f2e7; }
.personnel-table th, .personnel-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.personnel-table th:first-child, .personnel-table td:first-child { padding-left: 34px; }
.personnel-table th:last-child, .personnel-table td:last-child { padding-right: 34px; }
.personnel-table th { color: #40515e; background: #eef2f3; font-size: 11px; text-transform: uppercase; }
.personnel-table .personnel-access-table-action { display: flex; align-items: center; justify-content: flex-end; gap: 9px; text-transform: none; }
.personnel-access-table-action strong { color: var(--ink); font-size: 14px; }
.personnel-table tbody tr:last-child td { border-bottom: 0; }
.personnel-user-actions { display: flex; justify-content: flex-end; gap: 7px; }
.personnel-user-actions .button { min-height: 32px; padding: 6px 9px; font-size: 11px; }
.personnel-user-actions .icon-button { width: 34px; height: 34px; font-size: 19px; }

@media (max-width: 850px) {
  .app-header { align-items: flex-start; }
  .tabs { max-width: 62vw; overflow-x: auto; }
  .tab { flex: 0 0 auto; }
  .grid-4, .grid-3, .account-access-grid, .personnel-data-grid { grid-template-columns: repeat(2, 1fr); }
  .work-main-row, .work-primary-row, .work-secondary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fleet-km-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fleet-registry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .fleet-registry-actions { justify-content: flex-start; }
  .competency-renewal-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .material-filters { grid-template-columns: 1fr 1fr; }
  .material-filters .button { grid-column: 1 / -1; }
  .fleet-entry-row { grid-template-columns: 1fr; }
  .fleet-register .analytics-heading { align-items: flex-start; flex-direction: column; }
  .fleet-register-actions { justify-content: flex-start; }
  .chart-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-toolbar h2 { grid-column: 1 / -1; }
  .choice-grid { grid-template-columns: repeat(3, 1fr); }
  .record-card { grid-template-columns: 90px 1fr auto; }
  .work-open-card { height: auto; padding: 4px 34px; }
  #work-archive-list .record-card.work-open-card, #archive-list .record-card.work-open-card, #archive-list .record-card.logbook-card { height: auto; }
  .record-card .record-location, .record-card .record-issue { display: none; }
  .logbook-card { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; grid-template-rows: repeat(3, auto); }
  .logbook-card .logbook-train { grid-column: 1; grid-row: 1; }
  .logbook-card .logbook-sheet { grid-column: 2; grid-row: 1; }
  .logbook-card .logbook-statuses { grid-column: 1; grid-row: 2; flex-wrap: wrap; }
  .logbook-card .logbook-date { grid-column: 2; grid-row: 2; }
  .logbook-card .logbook-opened { grid-column: 1; grid-row: 3; }
  .logbook-card .logbook-created { grid-column: 2; grid-row: 3; }
  .logbook-card .record-actions { grid-column: 3; grid-row: 1 / 4; }
  .logbook-card .record-location { display: flex; }
  .filters { grid-template-columns: 1fr 1fr 42px; }
  .search-field { grid-column: 1 / -1; }
  .component-details { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .app-header { position: static; display: block; padding: 15px 4vw 0; }
  .tabs { width: 100%; max-width: 100%; height: 52px; margin-top: 8px; }
  main { width: 94vw; margin-top: 16px; }
  .page-heading { align-items: start; padding: 24px 20px; }
  .sheet-number { gap: 8px; }
  .sheet-number input { width: 100px; }
  .form-band, .form-actions { padding-right: 20px; padding-left: 20px; }
  .grid-4, .grid-3, .grid-2, .account-access-grid, .personnel-data-grid { grid-template-columns: 1fr; }
  .competency-expiry-section { margin-right: 20px; margin-left: 20px; padding: 16px; }
  .maintainer-profile-card { margin-right: 20px; margin-left: 20px; }
  .maintainer-profile-summary { align-items: flex-start; padding: 18px; }
  .maintainer-profile-summary strong { font-size: 22px; }
  .maintainer-profile-summary p span + span { padding-left: 0; border-left: 0; }
  .maintainer-profile-card > .personnel-data-grid { padding: 18px 18px 2px; }
  .maintainer-profile-card > .competency-expiry-section { margin: 6px 18px 18px; }
  .competency-expiry-settings, .competency-renewal-list { grid-template-columns: 1fr; }
  .competency-expiry-choice { grid-template-columns: 1fr; }
  .personnel-competencies-panel { width: min(255px, 90vw); }
  .material-filters { grid-template-columns: 1fr; }
  .material-filters .button { grid-column: auto; }
  .scheduled-dialog-summary { grid-template-columns: 1fr 1fr; }
  .scheduled-activity-period { grid-template-columns: 1fr 1fr; }
  .scheduled-activity-period > div { grid-column: 1 / -1; }
  .scheduled-list-actions { align-items: flex-start; flex-direction: column; }
  .choice-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-heading { align-items: start; }
  .archive-actions { display: grid; grid-template-columns: 42px 42px; }
  .archive-actions .button { grid-column: 1 / -1; }
  .backup-panels { grid-template-columns: 1fr; padding: 14px; }
  .backup-panel-header { align-items: stretch; flex-direction: column; }
  .backup-panel-actions { justify-content: flex-start; }
  .remote-backup-list { max-height: 535px; }
  .filters { grid-template-columns: 1fr 42px; }
  .filters label:not(.search-field) { grid-column: 1; }
  .filters #clear-filters { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
  .record-card { grid-template-columns: 80px 1fr; gap: 10px; }
  .record-actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 10px; }
  .logbook-card { grid-template-columns: 1fr; grid-template-rows: auto; }
  .logbook-card .logbook-sheet small, .work-open-card .corrective-sheet small { flex-basis: auto; }
  #archive-list .record-card.logbook-card { height: auto; padding: 4px 34px !important; }
  .logbook-card .logbook-train { grid-column: 1; grid-row: 1; }
  .logbook-card .logbook-sheet { grid-column: 1; grid-row: 2; }
  .logbook-card .logbook-statuses { grid-column: 1; grid-row: 3; }
  .logbook-card .logbook-date { grid-column: 1; grid-row: 4; }
  .logbook-card .logbook-opened { grid-column: 1; grid-row: 5; }
  .logbook-card .logbook-created { grid-column: 1; grid-row: 6; }
  .logbook-card .record-actions { grid-column: 1; grid-row: 7; }
  .detail-grid, .detail-grid.operation-grid { grid-template-columns: 1fr; }
  .detail-item.wide { grid-column: auto; }
  .order-row { display: grid; grid-template-columns: 1fr; }
  .order-row #order-number-field { width: 100%; }
  .order-row #order-number-field input { width: 100%; }
  .source-link-row { grid-template-columns: 1fr; }
  .status-fieldset { grid-template-columns: 1fr; }
  .segmented-control { width: 100%; }
  .segmented-control label { flex: 1; }
  .segmented-control span { min-width: 0; }
  .component-details { grid-template-columns: 1fr; }
  .work-main-row, .work-primary-row, .work-secondary-row, .operator-list, .operators-field { grid-template-columns: 1fr; max-width: none; }
  .fleet-km-grid { grid-template-columns: 1fr; max-width: none; }
  .alerts-summary, .alerts-board { grid-template-columns: 1fr; }
  .alerts-deadline-panel { grid-column: auto; }
  .chart-toolbar { grid-template-columns: 1fr; }
  .fleet-chart-tool { padding: 14px; }
  .chart-container { min-height: 260px; }
  #fleet-chart { height: 260px; }
}

@media print {
  @page { size: auto; margin: 6mm 12mm 12mm; }
  @page material-landscape { size: A4 landscape; margin: 10mm; }
  body * { visibility: hidden; }
  dialog[open], dialog[open] * { visibility: visible; }
  body[data-active-view="material-management-view"] #material-management-view,
  body[data-active-view="material-management-view"] #material-management-view * { visibility: visible; }
  body[data-active-view="material-management-view"] #material-management-view { position: absolute; inset: 0; display: block; width: 100%; page: material-landscape; }
  body[data-active-view="material-management-view"] .material-heading { margin-bottom: 12px; }
  body[data-active-view="material-management-view"] .material-register { border: 0; box-shadow: none; }
  body[data-active-view="material-management-view"] .fleet-table-wrap { overflow: visible; }
  body[data-active-view="material-management-view"] .material-table { min-width: 0; table-layout: fixed; font-size: 9px; }
  body[data-active-view="material-management-view"] .material-table th,
  body[data-active-view="material-management-view"] .material-table td { width: auto; padding: 7px 6px; overflow-wrap: anywhere; }
  body[data-active-view="material-management-view"] .material-table tr { break-inside: avoid; page-break-inside: avoid; }
  dialog[open] { position: absolute; inset: 0; width: 100%; max-width: none; max-height: none; margin: 0; border: 0; box-shadow: none; overflow: visible; }
  .dialog-header { padding: 0 0 12px; margin-bottom: 0; }
  .dialog-header button, .dialog-actions { display: none; }
  #detail-content { max-height: none; overflow: visible; padding: 0; }
  .detail-section { padding: 8px 0; break-inside: avoid; page-break-inside: avoid; }
  .return-report-section { break-before: page; page-break-before: always; }
  .intervention-description-section { border-top: 1px solid #c7ced2 !important; }
  .detail-section h3 { margin-bottom: 10px; }
  .detail-grid { gap: 10px 24px; }
  .detail-item dd { line-height: 1.3; }
}

/* Centro lavorazioni: elenco stabile a sinistra, scheda selezionata a destra. */
#work-center-view.is-active { display: grid; grid-template-columns: minmax(230px, 260px) minmax(0, 1fr); column-gap: 10px; row-gap: 20px; align-items: stretch; }
#work-center-view > .page-heading { grid-column: 1 / -1; }
#work-center-view .scheduled-table-wrap { grid-column: 1; margin: 0; padding: 18px; overflow: visible; border: 1px solid #d7e1e5; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
#work-center-view .work-center-list-title { margin: 0 0 14px; color: #243540; font-size: 16px; }
#work-center-view .scheduled-table { display: block; width: 100%; min-width: 0; }
#work-center-view .scheduled-table thead { display: none; }
#work-center-view .scheduled-table tbody { display: grid; gap: 12px; }
#work-center-view .scheduled-table tr.work-center-card { display: block; cursor: pointer; border: 1px solid #dce5e8; border-radius: 12px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
#work-center-view .scheduled-table tr.work-center-card:hover { border-color: #63aeba; transform: translateY(-1px); }
#work-center-view .scheduled-table tr.work-center-card:focus-visible { outline: 3px solid rgba(0, 128, 145, .25); outline-offset: 2px; }
#work-center-view .scheduled-table tr.work-center-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0, 128, 145, .12); }
#work-center-view .scheduled-table tr.work-center-card td { display: block; padding: 11px 10px; border: 0; background: transparent; }
#work-center-view .work-center-card-title { display: block; overflow: hidden; color: #173746; font-size: 13px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
#work-center-view .work-center-card-train { display: flex; align-items: baseline; gap: 5px; margin-top: 5px; color: #47616d; font-size: 11px; }
#work-center-view .work-center-card-train small { color: #6a7d85; font-size: 9px; font-weight: 800; text-transform: uppercase; }
#work-center-view .work-center-card-train b { color: #173746; font-size: 11px; }
#work-center-view .work-center-card-train small:nth-of-type(2) { margin-left: 5px; }
#work-center-view .work-center-status { display: inline-flex; width: 112px; min-width: 112px; align-items: center; justify-content: center; margin: 0 0 6px; padding: 4px 8px; border-radius: 999px; box-sizing: border-box; font-size: 10px; font-weight: 800; text-align: center; white-space: nowrap; }
#work-center-view .work-center-status.is-to-assign { color: #a55a00; background: #fff0c9; }
#work-center-view .work-center-status.is-in-progress { color: #fff; background: #00688b; }
#work-center-view .work-center-status.is-ready { color: #fff; background: #2d9b46; }
#work-center-view .work-center-card-progress { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; color: #1e3a4a; font-size: 10px; }
#work-center-view .work-center-card-progress strong { font-size: 11px; }
#work-center-view .work-center-card-progress.is-assignment { font-weight: 700; }
#work-center-view .work-center-progress-track { height: 7px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: #e5eaed; }
#work-center-view .work-center-progress-track span { display: block; height: 100%; border-radius: inherit; background: #00688b; }
#work-center-view .work-center-progress-track span.is-ready { background: #2d9b46; }
#work-center-view .scheduled-inline-workflow { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; margin: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#work-center-view .scheduled-inline-workspace { grid-template-columns: minmax(0, 1fr) minmax(230px, 260px); gap: 10px; }
#work-center-view .work-center-placeholder { grid-column: 2; grid-row: 1; display: grid; place-content: center; min-height: calc(100vh - 164px); min-height: calc(100dvh - 164px); padding: 36px; border: 1px solid #d7e1e5; border-radius: 16px; background: #fff; box-shadow: var(--shadow); color: #59707b; text-align: center; }
#work-center-view .work-center-placeholder { background: #fff; box-shadow: var(--shadow); }
#work-center-view .work-center-placeholder strong { margin-top: 12px; color: #243540; font-size: 20px; }
#work-center-view .work-center-placeholder-icon { color: var(--accent); font-size: 34px; }
#work-center-view .scheduled-inline-table-wrap { height: calc(100vh - 164px); height: calc(100dvh - 164px); padding-left: 0; padding-right: 0; place-items: start start; }
#work-center-view .scheduled-document-sheet { width: 100%; max-width: none; margin-left: 0; margin-right: 0; overflow: hidden; border-radius: 16px; box-shadow: 0 3px 10px rgba(26, 48, 59, .08); }
#work-center-view .scheduled-inline-actions { gap: 16px; padding: 26px 24px; border-color: #d7e1e5; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
#work-center-view .scheduled-actions-title { margin-bottom: 2px; color: #243540; font-size: 12px; }
#work-center-view .scheduled-reading-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 11px; border: 1px solid #d9e4e8; border-radius: 10px; background: #f5f9fa; }
#work-center-view .scheduled-reading-summary span { display: grid; gap: 3px; min-width: 0; }
#work-center-view .scheduled-reading-summary .scheduled-reading-order { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid #d9e4e8; }
#work-center-view .scheduled-reading-summary small { color: #63747c; font-size: 10px; font-weight: 800; text-transform: uppercase; }
#work-center-view .scheduled-reading-summary strong { color: #173746; font-size: 14px; white-space: nowrap; }
#work-center-view .scheduled-activity-start { gap: 8px; font-size: 13px; }
#work-center-view .scheduled-activity-start input { min-height: 42px; }
#work-center-view .scheduled-inline-actions .button { min-height: 48px; }
#work-center-view #open-mv-assignment-panel { margin-top: auto; color: #00688b; border-color: #86bac2; background: #f3fafb; }
#work-center-view #open-mv-assignment-panel:hover { color: #fff; background: #00688b; }
#work-center-view .scheduled-inline-actions .scheduled-dialog-feedback { flex: none; display: flex; align-items: flex-start; gap: 8px; width: auto; margin: 0; padding: 9px 11px; border: 1px solid #f2c558; border-left: 1px solid #f2c558; border-radius: 9px; color: #8a5900; background: #fff7df; font-size: 12px; line-height: 1.35; }
#work-center-view .scheduled-inline-actions .scheduled-dialog-feedback[hidden] { display: none !important; }
#work-center-view .scheduled-inline-actions .scheduled-dialog-feedback::before { content: '!'; display: grid; flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; place-items: center; color: #fff; background: #d98b00; font-weight: 900; }
#work-center-view .scheduled-inline-actions .scheduled-dialog-feedback[data-state="success"] { border-color: #9acaaa; color: #216844; background: #eaf6ed; }
#work-center-view .scheduled-inline-actions .scheduled-dialog-feedback[data-state="success"]::before { content: '✓'; background: #27834a; }
#work-center-view .scheduled-inline-completed { display: grid; gap: 4px; min-height: auto; padding: 7px 8px; border: 0; border-left: 3px solid #2b9255; border-radius: 0; color: #216844; background: #eef8f1; font-size: 11px; line-height: 1.25; }
#work-center-view .scheduled-inline-completed strong { color: #216844; font-size: 11px; }
#work-center-view .scheduled-inline-completed span { min-height: auto; padding: 0; border: 0; color: #40585f; font-size: 10px; font-weight: 700; }
#work-center-view .scheduled-inline-attachment-list { display: grid; gap: 5px; margin-top: -8px; padding: 8px 10px; border: 1px solid #d7e4e7; border-radius: 8px; background: #f5f9fa; }
#work-center-view .scheduled-inline-attachment-list span { min-height: auto; padding: 0; border: 0; color: #49616a; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
#work-center-view .scheduled-inline-table-wrap .scheduled-checklist-table { font-size: 11px; }
#work-center-view .scheduled-inline-table-wrap .scheduled-checklist-table th { font-size: 9px; }
#work-center-view .scheduled-inline-table-wrap .scheduled-checklist-table td { line-height: 1.28; }
#work-center-view .scheduled-inline-execution input, #work-center-view .scheduled-inline-execution select, #work-center-view .scheduled-inline-execution div, #work-center-view .scheduled-inline-execution span { font-size: 11px; }
@media (min-width: 1101px) {
  html:has(body[data-active-view="work-center-view"]),
  body[data-active-view="work-center-view"] { height: 100%; overflow: hidden; }
  body[data-active-view="work-center-view"] main { height: calc(100vh - 30px); height: calc(100dvh - 30px); margin-bottom: 0; overflow: hidden; }
  #work-center-view.is-active { height: 100%; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  #work-center-view .scheduled-table-wrap { min-height: 0; overflow-y: auto; }
  #work-center-view .scheduled-inline-workflow { min-height: 0; }
  #work-center-view .scheduled-inline-workspace { height: 100%; min-height: 0; }
  #work-center-view .scheduled-inline-table-wrap { height: 100%; min-height: 0; }
  #work-center-view .work-center-placeholder { min-height: 0; }
}
@media (max-width: 1100px) { #work-center-view { grid-template-columns: 1fr; } #work-center-view > .page-heading, #work-center-view .scheduled-table-wrap, #work-center-view .scheduled-inline-workflow, #work-center-view .work-center-placeholder { grid-column: 1; grid-row: auto; } }

/* Layout desktop adattivo: Full HD e zoom di sistema elevato. */
@media (min-width: 1101px) and (max-width: 2100px) {
  #work-center-view.is-active { grid-template-columns: minmax(230px, 260px) minmax(0, 1fr); column-gap: 10px; row-gap: 20px; }
  #work-center-view .scheduled-table-wrap { padding: 14px; }
  #work-center-view .scheduled-inline-workspace { grid-template-columns: minmax(0, 1fr) minmax(230px, 260px); gap: 10px; }
  #work-center-view .scheduled-inline-table-wrap { overflow: auto; overscroll-behavior: contain; }
  #work-center-view .scheduled-document-sheet { width: max(100%, 920px); min-width: 920px; padding: 14px; }
  #work-center-view .scheduled-inline-table-wrap .scheduled-checklist-table { min-width: 890px; }
  #work-center-view .scheduled-inline-actions { gap: 8px; padding: 12px; overflow-y: auto; }
  #work-center-view .scheduled-inline-actions .button { min-height: 38px; padding: 7px 9px; font-size: 12px; }
  #work-center-view .scheduled-reading-summary { gap: 7px; padding: 8px; }
  #work-center-view .scheduled-reading-summary small { font-size: 9px; }
  #work-center-view .scheduled-reading-summary strong { font-size: 12px; }
  #work-center-view .scheduled-activity-start { gap: 5px; font-size: 11px; }
  #work-center-view .scheduled-activity-start input { min-height: 36px; }
  #work-center-view .scheduled-actions-title { font-size: 10px; }
  #work-center-view .scheduled-inline-attachment-list { margin-top: -3px; padding: 6px 8px; }
}

@media (min-width: 901px) and (max-width: 1450px) {
  #work-center-view.is-active { grid-template-columns: minmax(215px, 240px) minmax(0, 1fr); }
  #work-center-view .scheduled-inline-workspace { grid-template-columns: minmax(0, 1fr) minmax(215px, 240px); }
  #work-center-view .scheduled-document-sheet { width: max(100%, 820px); min-width: 820px; }
  #work-center-view .scheduled-inline-table-wrap .scheduled-checklist-table { min-width: 790px; font-size: 10px; }
  #work-center-view .scheduled-inline-actions { padding: 10px; }
}

@media (max-width: 1100px) {
  #work-center-view .scheduled-inline-workspace { grid-template-columns: 1fr; height: auto; }
  #work-center-view .scheduled-inline-table-wrap { height: min(68vh, 720px); overflow: auto; }
  #work-center-view .scheduled-document-sheet { width: max(100%, 820px); min-width: 820px; }
  #work-center-view .scheduled-inline-table-wrap .scheduled-checklist-table { min-width: 790px; }
  #work-center-view .scheduled-inline-actions { overflow: visible; }
}

/* Assegnazione rapida per competenza MV. */
.mv-assignment-dialog { width: min(620px, calc(100vw - 28px)); max-height: min(760px, calc(100dvh - 28px)); padding: 0; overflow: hidden; border: 1px solid #cbd9de; border-radius: 14px; color: #172b36; background: #fff; box-shadow: 0 24px 70px rgba(17, 42, 52, .28); }
.mv-assignment-dialog::backdrop { background: rgba(25, 46, 54, .58); backdrop-filter: blur(2px); }
.mv-assignment-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: min(760px, calc(100dvh - 28px)); }
.mv-assignment-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-bottom: 1px solid #d4e0e4; }
.mv-assignment-heading { display: flex; align-items: center; gap: 12px; }
.mv-assignment-heading h2 { margin: 0; color: #152d3a; font-size: 20px; font-weight: 750; }
.mv-assignment-icon { display: grid; width: 38px; height: 38px; border: 2px solid #006f87; border-radius: 50%; place-items: center; color: #006f87; background: #f7fcfd; font-size: 17px; }
.mv-expiries-info-button { display: grid; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 1px solid #8abdc4; border-radius: 8px; place-items: center; color: #00688b; background: #f2fafb; cursor: pointer; }
.mv-expiries-info-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mv-expiries-info-button:hover, .mv-expiries-info-button:focus-visible { color: #fff; background: #00688b; outline: none; }
.mv-assignment-content { display: grid; min-height: 0; gap: 16px; padding: 16px 20px; overflow: hidden; }
.mv-assignment-content section { min-height: 0; }
.mv-section-heading { display: flex; align-items: center; gap: 9px; margin: 0 0 9px; }
.mv-assignment-content .mv-section-heading h3 { margin: 0; color: #20333d; font-size: 14px; }
.mv-section-step { display: grid; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; place-items: center; color: #006f87; background: #e3f1f5; font-size: 13px; font-weight: 900; }
.mv-operator-count { margin-left: auto; color: #60747e; font-size: 11px; font-weight: 750; }
.mv-competency-keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mv-competency-key { min-height: 40px; padding: 7px; border: 1px solid #aebfc6; border-radius: 7px; color: #172b36; background: #fff; font-size: 13px; font-weight: 850; cursor: pointer; }
.mv-competency-key:hover { border-color: #00688b; background: #eff9fa; }
.mv-competency-key.is-selected { border-color: #00688b; color: #fff; background: #00688b; box-shadow: 0 3px 8px rgba(8, 127, 138, .2); }
.mv-competency-key.is-assigned { border-color: #65b67d; color: #216c3d; background: #edf9f1; }
.mv-competency-key.is-assigned::before { margin-right: 5px; content: '✓'; }
.mv-competency-key.is-assigned.is-selected { border-color: #278b4c; color: #fff; background: #31965a; }
.mv-competency-key.is-unavailable { border-color: #dbe3e6; color: #9ba9af; background: #f2f5f6; box-shadow: none; cursor: not-allowed; opacity: .72; }
.mv-competency-key.is-unavailable:hover { border-color: #dbe3e6; color: #9ba9af; background: #f2f5f6; }
.mv-assignment-helper { margin: 7px 0 0; color: #60747e; font-size: 11px; }
.mv-operators-section { display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.mv-operator-list { display: grid; max-height: 190px; gap: 8px; padding-right: 6px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.mv-operator-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 55px; padding: 8px 12px; border: 1px solid #c7d4d9; border-radius: 8px; background: #fff; cursor: pointer; }
.mv-operator-option:hover { border-color: #6baeb7; }
.mv-operator-option.is-selected { border-color: #edc465; background: #fffbf1; box-shadow: inset 4px 0 #e6a800; }
.mv-operator-option.is-expired { border-color: #dc8790; background: #fff3f4; }
.mv-operator-option.is-expired.is-selected { border-color: #c84350; box-shadow: 0 0 0 1px rgba(200, 67, 80, .12); }
.mv-operator-option input { width: 18px; height: 18px; margin: 0; accent-color: #00688b; }
.mv-operator-copy { display: grid; min-width: 0; gap: 3px; }
.mv-operator-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.mv-operator-copy small { color: #60747e; font-size: 10px; }
.mv-expiry-priority { padding: 5px 8px; border-radius: 999px; color: #8a4c00; background: #ffe6a8; font-size: 10px; font-weight: 850; white-space: nowrap; }
.mv-expiry-expired { padding: 5px 9px; border-radius: 999px; color: #a51f2d; background: #ffdce0; font-size: 10px; font-weight: 900; white-space: nowrap; }
.mv-competency-assigned-tag { padding: 5px 9px; border-radius: 999px; color: #216c3d; background: #dff3e6; font-size: 10px; font-weight: 900; white-space: nowrap; }
.scheduled-renewal-preview-work { display: grid; grid-template-columns: auto 1fr; gap: 2px 7px; text-align: left; }
.scheduled-renewal-preview-work small { color: #687b84; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.scheduled-renewal-preview-work strong { color: #173746; font-size: 10px; }
.mv-operator-empty { padding: 20px; border: 1px dashed #bdccd1; border-radius: 9px; color: #637780; background: #f6f9fa; text-align: center; font-size: 13px; }
.mv-assignment-note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 11px; border: 1px solid #9bc8e6; border-radius: 8px; color: #245f87; background: #f2f9fe; font-size: 11px; }
.mv-assignment-note span { display: grid; flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; place-items: center; color: #fff; background: #1686bc; font-size: 11px; font-weight: 900; }
.mv-assignment-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid #d4e0e4; background: #fbfcfc; }
.mv-assignment-actions .button { min-width: 124px; min-height: 36px; padding: 7px 14px; font-size: 13px; }
@media (max-width: 560px) {
  .mv-assignment-header, .mv-assignment-content, .mv-assignment-actions { padding-right: 14px; padding-left: 14px; }
  .mv-assignment-heading h2 { font-size: 20px; }
  .mv-competency-key { min-height: 43px; font-size: 13px; }
  .mv-operator-option { grid-template-columns: auto minmax(0, 1fr); }
  .mv-expiry-priority { grid-column: 2; justify-self: start; }
  .mv-assignment-actions .button { min-width: 0; flex: 1; }
}

/* Breakpoint intermedio per moduli e barre strumenti, assente nel layout originale. */
@media (min-width: 851px) and (max-width: 1600px) {
  .account-access-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .personnel-data-grid, .service-primary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .work-main-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .work-primary-row, .activity-verification .work-primary-row,
  .source-standalone:not(.activity-verification) .work-primary-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .source-work-order .work-primary-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .work-secondary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .material-filters { grid-template-columns: minmax(160px, .7fr) minmax(220px, 1fr) auto auto; padding-right: 18px; padding-left: 18px; }
  .chart-toolbar { grid-template-columns: minmax(170px, 1fr) 190px 145px 145px; }
  .competency-expiry-settings { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}

@media (max-width: 1200px) {
  .scheduled-dialog-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scheduled-activity-period { grid-template-columns: 1fr 1fr; }
  .scheduled-activity-period > :first-child { grid-column: 1 / -1; }
  .source-link-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .scheduled-dialog-summary, .scheduled-activity-period, .source-link-row { grid-template-columns: 1fr; }
  .scheduled-activity-period > :first-child { grid-column: auto; }
  .scheduled-inline-workspace { grid-template-columns: 1fr; }
}
