:root {
  --navy: #10233f;
  --blue: #135aa0;
  --blue-dark: #0d477f;
  --blue-soft: #eaf3fb;
  --green: #0a8a59;
  --green-soft: #e7f7f0;
  --amber: #a85c00;
  --amber-soft: #fff5df;
  --red: #b42318;
  --red-soft: #feeceb;
  --ink: #182536;
  --muted: #5f6e7d;
  --line: #d8e0e8;
  --surface: #ffffff;
  --canvas: #f4f7fa;
  --shadow: 0 8px 28px rgba(16, 35, 63, .08);
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 20; padding: 10px 14px; color: white; background: var(--navy); border-radius: 6px; }
.skip-link:focus { top: 12px; }

.topbar { min-height: 86px; display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(340px, auto); align-items: center; gap: 24px; padding: 8px max(24px, calc((100vw - 1440px) / 2)); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; color: #1c2e2c; }
.brand-logo { position: relative; display: block; overflow: hidden; width: 220px; height: 90px; }
.brand-logo img { position: absolute; top: -54px; left: 0; display: block; width: 220px; height: 220px; max-width: none; }
.user-badge strong, .user-badge small { display: block; }
.title-wrap { text-align: center; }
.title-wrap h1 { margin: 2px 0 0; font-size: clamp(22px, 3vw, 32px); letter-spacing: -.025em; }
.eyebrow { margin: 0; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.account-actions { justify-self: end; display: flex; align-items: center; gap: 14px; min-width: 0; }
.user-badge { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-badge .avatar { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; color: white; font-weight: 700; background: var(--navy); border-radius: 50%; }
.account-info { min-width: 0; }
.user-badge strong, .user-badge small { overflow-wrap: anywhere; }
.user-badge small { margin-top: 2px; color: var(--muted); }
.logout-button { flex: 0 0 auto; padding: 9px 14px; color: var(--navy); background: var(--blue-soft); border: 1px solid var(--line); border-radius: 7px; font-weight: 700; }
.logout-button:hover { background: #dcecf8; }
.logout-button:disabled { opacity: .6; cursor: wait; }

.main-nav { position: sticky; top: 0; z-index: 10; display: flex; justify-content: center; gap: 8px; padding: 8px 20px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.nav-button { padding: 10px 18px; color: var(--muted); font-weight: 600; background: transparent; border: 0; border-radius: 7px; }
.nav-button:hover { color: var(--blue); background: var(--blue-soft); }
.nav-button.active { color: white; background: var(--navy); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 5px; padding: 0 5px; color: var(--navy); font-size: 11px; background: white; border-radius: 999px; }
.environment-banner { padding: 9px 24px; color: #6d3c00; text-align: center; background: var(--amber-soft); border-bottom: 1px solid #f0d59a; }

main { max-width: 1440px; min-height: calc(100vh - 140px); margin: 0 auto; padding: 28px 24px 60px; }
.view { display: none; }
.view.active { display: block; }
.form-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 20px; }
.form-workspace > form { min-width: 0; }
.completion-panel { position: sticky; top: 74px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.completion-summary { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 13px; margin: 10px 0 14px; }
.completion-summary h3 { margin: 0 0 4px; color: var(--navy); font-size: 17px; }
.completion-summary p { margin: 0; color: var(--muted); font-size: 12px; }
.completion-ring { --progress: 0; display: grid; place-items: center; width: 70px; height: 70px; background: conic-gradient(var(--green) calc(var(--progress) * 1%), #e6edf3 0); border-radius: 50%; }
.completion-ring::before { content: ""; grid-area: 1 / 1; width: 54px; height: 54px; background: white; border-radius: 50%; }
.completion-ring strong { z-index: 1; grid-area: 1 / 1; color: var(--navy); font-size: 17px; }
.completion-bar { height: 7px; overflow: hidden; background: #e6edf3; border-radius: 99px; }
.completion-bar span { display: block; width: 0; height: 100%; background: var(--green); border-radius: inherit; transition: width .2s ease; }
.required-progress { margin: 9px 0 16px; color: var(--muted); font-size: 11px; }
.section-progress { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.section-progress li { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.section-progress li > span { display: grid; place-items: center; width: 24px; height: 24px; color: var(--blue); font-weight: 700; background: var(--blue-soft); border-radius: 50%; }
.section-progress li strong { color: var(--ink); font-size: 11px; }
.section-progress li.complete > span { color: white; background: var(--green); }
.section-progress li.complete small { color: var(--green); font-weight: 700; }
.completion-pending { margin-top: 16px; padding: 11px; color: #754000; background: var(--amber-soft); border-radius: 7px; }
.completion-pending strong, .completion-pending p { display: block; margin: 0; font-size: 11px; }
.completion-pending p { margin-top: 4px; line-height: 1.35; }
.completion-pending.complete { color: #075e3d; background: var(--green-soft); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.page-heading h2 { margin: 4px 0 0; font-size: 27px; letter-spacing: -.02em; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.card { margin-bottom: 18px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 22px; }
.section-heading.compact { margin-bottom: 18px; }
.section-heading h3 { margin: 0; font-size: 19px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.section-number { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; color: var(--blue); font-size: 12px; font-weight: 800; background: var(--blue-soft); border-radius: 50%; }

.field-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 20px; }
.control-card .field-grid { row-gap: 10px; }
.field-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; min-width: 0; gap: 7px; }
.field.span-2 { grid-column: span 2; }
.field.span-4 { grid-column: 1 / -1; }
.control-card [data-field-host="objective"] { margin-top: -36px; }
.field label, .toolbar label > span { color: #2c3e50; font-size: 13px; font-weight: 650; }
.required { color: var(--red); }
.field input, .field select, .field textarea, .toolbar input, .toolbar select { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--ink); background: white; border: 1px solid #b9c5d2; border-radius: 6px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .toolbar input:focus, .toolbar select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(19,90,160,.13); }
.field select[multiple] { min-height: 104px; }
.field input[readonly] { color: #465465; background: #f0f3f6; border-color: #dde3e9; }
.field input.criticality-critical { color: #8d1710; font-weight: 800; background: var(--red-soft); border-color: #e69b96; }
.field input.criticality-regular { color: #805000; font-weight: 800; background: var(--amber-soft); border-color: #e8c46e; }
.field input.criticality-normal { color: #087047; font-weight: 800; background: var(--green-soft); border-color: #88c9aa; }
.field-help { margin: -2px 0 0; color: var(--muted); font-size: 11px; }
.cost-center-status[data-type="success"] { color: var(--green); font-weight: 700; }
.cost-center-status[data-type="error"] { color: var(--red); font-weight: 700; }
.cost-center-inputs { display: grid; grid-template-columns: minmax(140px, .65fr) minmax(0, 1.35fr); gap: 10px; }
.cost-center-inputs input::placeholder { font-size: 13px; }
@media (max-width: 760px) { .cost-center-inputs { grid-template-columns: 1fr; } }
.email-entry-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.email-list { display: grid; gap: 6px; }
.email-list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 11px; color: var(--navy); background: var(--blue-soft); border: 1px solid #c8dced; border-radius: 6px; }
.email-list-item span { overflow-wrap: anywhere; }
.email-list-item button { padding: 4px 7px; color: var(--red); font-size: 11px; font-weight: 700; background: white; border: 1px solid #e7b3af; border-radius: 5px; }
.email-list-empty { padding: 8px 0; color: var(--muted); }
@media (max-width: 650px) { .email-entry-row { grid-template-columns: 1fr; } }
.form-note { margin: 20px 0 0; padding: 10px 12px; color: #344659; font-size: 13px; background: #f7f9fb; border-left: 3px solid var(--blue); }
.split-card { display: grid; grid-template-columns: 1fr 1.25fr; gap: 32px; }
.subsection + .subsection { padding-left: 32px; border-left: 1px solid var(--line); }

.signature-pad { display: grid; grid-template-columns: minmax(280px, 620px) 1fr; gap: 18px; align-items: start; }
.signature-upload-wrap { position: relative; display: grid; place-items: center; overflow: hidden; width: 100%; height: 180px; min-height: 0; padding: 12px; background: #fff; border: 1px dashed #8da0b3; border-radius: 8px; }
.signature-placeholder { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: #748394; font-size: 13px; }
.signature-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.signature-preview { display: block; width: 100%; height: 156px; min-width: 0; padding: 6px; object-fit: contain; background: white; border-radius: 6px; }
.signature-preview[hidden] { display: none; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; opacity: 0; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 22px rgba(16,35,63,.08); }
.button { min-height: 42px; padding: 9px 16px; font-weight: 700; border: 1px solid transparent; border-radius: 6px; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button-primary { color: white; background: var(--blue); }
.button-primary:hover:not(:disabled) { background: var(--blue-dark); }
.button-secondary { color: var(--navy); background: white; border-color: #aebbc8; }
.button-secondary:hover { background: #f2f5f8; }
.button-ghost { color: var(--blue); background: var(--blue-soft); }
.button-danger { color: var(--red); background: var(--red-soft); }
.button-approve { color: #145c3d; background: #dff4e8; border-color: #9ed0b7; }
.button-approve:hover:not(:disabled) { color: #0d4a30; background: #ccebd9; border-color: #79bd99; }
.icon-button { width: 38px; height: 38px; color: var(--muted); font-size: 27px; line-height: 1; background: transparent; border: 0; border-radius: 50%; }
.icon-button:hover { background: #eef2f6; }

.status { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; font-size: 11px; font-weight: 750; border-radius: 999px; }
.status-draft { color: #4c5966; background: #e9edf1; }
.status-commercial { color: #805000; background: #fff1cc; }
.status-manager { color: #714b8a; background: #f3eafa; }
.status-projects { color: #075a76; background: #dff4fb; }
.status-development { color: #805000; background: #fff1cc; }
.status-director { color: #334f8a; background: #e6edff; }
.status-done { color: #087047; background: #ddf6eb; }
.status-rejected { color: #9b1c1c; background: var(--red-soft); }

.toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) 260px; gap: 16px; box-shadow: none; }
.toolbar label { display: flex; flex-direction: column; gap: 6px; }
.toolbar-note { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 4px 0; }
.toolbar-note strong { color: var(--navy); font-size: 13px; }
.toolbar-note span { color: var(--muted); font-size: 12px; }
.records-content { min-height: 220px; }
.consultation-table-wrap, .consultation-details { padding: 0; overflow: hidden; box-shadow: none; }
.consultation-detail-row > td { padding: 0 !important; background: #f8fafc; border-bottom: 2px solid #9eb7ce !important; }
.consultation-details { margin: 12px; background: white; border: 1px solid var(--line); border-radius: 8px; }
.table-title { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.table-title h3 { margin: 0; color: var(--navy); font-size: 17px; font-weight: 650; }
.consultation-detail-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.table-scroll { overflow-x: auto; }
.consultation-table, .details-table { width: 100%; border-collapse: collapse; }
.consultation-table { min-width: 980px; table-layout: fixed; }
.consultation-table th:nth-child(1) { width: 7%; }
.consultation-table th:nth-child(2) { width: 5%; }
.consultation-table th:nth-child(3) { width: 5%; }
.consultation-table th:nth-child(4) { width: 8%; }
.consultation-table th:nth-child(5) { width: 7%; }
.consultation-table th:nth-child(6) { width: 8%; }
.consultation-table th:nth-child(7) { width: 12%; }
.consultation-table th:nth-child(8) { width: 13%; }
.consultation-table th:nth-child(9) { width: 35%; }
.update-table th:nth-child(1) { width: 10%; }
.update-table th:nth-child(2) { width: 9%; }
.update-table th:nth-child(3) { width: 8%; }
.update-table th:nth-child(4) { width: 11%; }
.update-table th:nth-child(5) { width: 12%; }
.update-table th:nth-child(6) { width: 14%; }
.update-table th:nth-child(7) { width: 22%; }
.update-table th:nth-child(8) { width: 14%; }
.consultation-table th, .consultation-table td, .details-table th, .details-table td { padding: 13px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.consultation-table th { color: #38506a; font-size: 12px; background: #eef3f7; white-space: nowrap; }
.consultation-table td { font-size: 13px; }
.consultation-table tbody tr:last-child td, .details-table tbody tr:last-child th, .details-table tbody tr:last-child td { border-bottom: 0; }
.consultation-table tbody tr.selected { background: #f0f6ff; }
.consultation-table .rfq-group-row > td { padding: 10px 14px; color: var(--navy); background: #dfeaf4; border-top: 2px solid #b8cada; border-bottom: 1px solid #b8cada; }
.consultation-table .rfq-group-row:first-child > td { border-top: 0; }
.rfq-group-row strong { margin-right: 10px; font-size: 14px; }
.rfq-group-row span { color: #536b82; font-size: 11px; font-weight: 650; }
.revision-toggle { float: right; display: inline-flex; align-items: center; gap: 7px; padding: 3px 7px; color: var(--navy); background: transparent; border: 0; border-radius: 5px; cursor: pointer; font: inherit; }
.revision-toggle:hover { background: rgba(255, 255, 255, .55); }
.revision-toggle-arrow { display: inline-block; transition: transform .2s ease; }
.revision-toggle[aria-expanded="true"] .revision-toggle-arrow { transform: rotate(180deg); }
.consultation-table .rfq-revision-row > td:first-child { padding-left: 24px; }
.consultation-table td:nth-child(7) { overflow-wrap: anywhere; }
.consultation-table .record-actions { flex-wrap: nowrap; gap: 6px; }
.consultation-table .record-actions .button { flex: 0 0 auto; padding-inline: 10px; font-size: 12px; }
.consultation-table .button { white-space: nowrap; }
.details-table th { width: 15%; color: var(--muted); font-size: 11px; font-weight: 650; background: #f7f9fb; }
.details-table td { width: 35%; color: var(--ink); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.consultation-signature { display: block; width: auto; max-width: 220px; max-height: 90px; object-fit: contain; }
.consultation-signature-wrap { display: grid; justify-items: start; gap: 7px; }
.consultation-signature-wrap small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.consultation-signature-loading { color: var(--muted); font-size: 12px; }
.acvr-upload { margin-top: 20px; padding: 20px; background: var(--blue-soft); border: 1px solid #b8d3ea; border-radius: 10px; }
.acvr-upload input[type="file"] { display: block; width: 100%; margin-top: 10px; padding: 12px; background: white; border: 1px solid var(--line); border-radius: 7px; }
.consultation-attachments { padding: 18px; border-top: 1px solid var(--line); }
.consultation-attachments > h3 { margin: 0 0 12px; color: var(--navy); font-size: 16px; }
.attachment-list { display: grid; gap: 8px; }
.attachment-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; background: #f7f9fb; border: 1px solid var(--line); border-radius: 7px; }
.attachment-item strong, .attachment-item small { display: block; overflow-wrap: anywhere; }
.attachment-item small, .attachment-empty, .attachment-unavailable { margin-top: 3px; color: var(--muted); font-size: 11px; }
.attachment-error { color: var(--red); }
.approval-requirement { margin-top: 14px !important; padding: 10px 12px; color: #805000 !important; background: var(--amber-soft); border: 1px solid #f0d59a; border-radius: 7px; }
.development-table-wrap { padding: 0; overflow-x: auto; box-shadow: none; }
.development-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.development-table th, .development-table td { padding: 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.development-table th { color: #38506a; font-size: 12px; background: #eef3f7; white-space: nowrap; }
.development-table td { font-size: 13px; }
.development-table tbody tr:last-child td { border-bottom: 0; }
.development-table td:first-child strong, .development-table td:first-child small { display: block; }
.development-table td:first-child small { margin-top: 4px; color: var(--muted); }
.development-table select { min-width: 170px; height: 42px; padding: 8px 34px 8px 10px; background: white; border: 1px solid #afbdca; border-radius: 6px; }
.development-table tr.release-locked { background: #f2faf6; }
.development-table .development-group-row > td { padding: 9px 14px; color: var(--navy); background: #dfeaf4; border-top: 2px solid #b8cada; border-bottom: 1px solid #b8cada; }
.development-table .development-group-row:first-child > td { border-top: 0; }
.development-group-row strong { margin-right: 10px; font-size: 14px; }
.development-group-row span { color: #536b82; font-size: 11px; font-weight: 650; }
.development-table select:disabled { color: #245c43; font-weight: 700; background: #e6f5ed; border-color: #b8dac8; opacity: 1; }
.development-final-approvals { display: grid; gap: 10px; margin-top: 20px; }
.print-report { display: none; }
.record-list { display: grid; gap: 10px; }
.record-group-list { display: grid; gap: 16px; }
.record-group { overflow: hidden; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.record-group-header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--navy); background: #dfeaf4; border-bottom: 1px solid #b8cada; }
.record-group-header strong { font-size: 14px; }
.record-group-header span { color: #536b82; font-size: 11px; font-weight: 650; }
.record-group .record-list { gap: 0; }
.record-group .record-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.record-group .record-card:last-child { border-bottom: 0; }
.record-card { display: grid; grid-template-columns: 1.3fr 1.1fr 1fr auto; align-items: center; gap: 18px; padding: 17px 19px; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 3px 12px rgba(16,35,63,.04); }
.record-card:hover { border-color: #9eb7ce; }
.record-main strong, .record-meta strong { display: block; }
.record-main span, .record-meta span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.record-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.empty-state { display: grid; place-items: center; padding: 60px 20px; color: var(--muted); text-align: center; background: white; border: 1px dashed #b8c4d0; border-radius: 10px; }
.empty-state > span { color: #8aa2b8; font-size: 40px; }
.empty-state h3 { margin: 8px 0 3px; color: var(--ink); }
.empty-state p { margin: 0; }
.loading { padding: 50px; color: var(--muted); text-align: center; }

.dialog { width: min(920px, calc(100vw - 30px)); height: calc(100dvh - 30px); max-height: calc(100vh - 30px); padding: 0; overflow: clip; border: 0; border-radius: 13px; box-shadow: 0 30px 80px rgba(2,15,31,.35); }
.dialog::backdrop { background: rgba(10,25,43,.64); backdrop-filter: blur(2px); }
.dialog-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: 100%; height: 100%; min-height: 0; }
.dialog-header, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; background: white; }
.dialog-header { min-height: 0; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 3px 0 0; }
.dialog-content { min-height: 0; overflow: auto; padding: 22px; background: var(--canvas); }
.dialog-actions { align-self: auto; justify-content: flex-end; min-height: 0; max-height: 92px; overflow-x: auto; overflow-y: hidden; border-top: 1px solid var(--line); }
.detail-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.detail-summary div, .detail-grid div { padding: 12px; background: white; border: 1px solid var(--line); border-radius: 7px; }
.detail-summary small, .detail-grid dt { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; }
.detail-summary strong { overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
.detail-grid dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-grid strong { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.grouped-details { display: grid; gap: 14px; padding: 16px; }
.detail-group { padding: 16px; background: #f7f9fb; border: 1px solid var(--line); border-radius: 9px; }
.detail-group h4 { margin: 0 0 12px; color: var(--navy); font-size: 15px; }
.detail-group .detail-grid div { background: white; }
.article-search-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.catalog-options { position: relative; z-index: 4; display: grid; max-height: 230px; overflow: auto; background: white; border-radius: 7px; box-shadow: 0 10px 28px rgba(16,35,63,.16); }
.catalog-options:empty { display: none; }
.catalog-options button { display: grid; grid-template-columns: minmax(90px,auto) 1fr; gap: 12px; padding: 10px 12px; color: var(--ink); text-align: left; background: white; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.catalog-options button:hover { background: var(--blue-soft); }
.catalog-options span { color: var(--muted); }
.catalog-lookup-popup { position: fixed; top: 50%; left: 50%; z-index: 500; display: flex; align-items: center; justify-content: center; gap: 14px; width: min(560px, calc(100vw - 32px)); min-height: 110px; padding: 24px 28px; color: #123e63; font-size: 18px; font-weight: 700; text-align: center; background: #eef6fc; border: 2px solid #70a8d0; border-radius: 13px; box-shadow: 0 25px 80px rgba(2,15,31,.48); transform: translate(-50%, -50%); pointer-events: none; }
.catalog-lookup-popup[hidden] { display: none; }
.catalog-lookup-popup[data-type="success"] { color: #17633c; background: #eaf7f0; border-color: #b5ddc8; }
.catalog-lookup-popup[data-type="warning"] { color: #765414; background: #fff8df; border-color: #ead694; }
.catalog-lookup-popup[data-type="error"] { color: #982f2f; background: #fff0f0; border-color: #e6bcbc; }
.catalog-spinner { width: 34px; height: 34px; flex: 0 0 34px; border: 4px solid #b9d5e8; border-top-color: var(--primary); border-radius: 50%; animation: submission-spin .7s linear infinite; }
.article-list { display: grid; gap: 6px; }
.article-list-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: #eef5fb; border: 1px solid #c8dbea; border-radius: 7px; }
.article-list-item button, .email-list-item button { color: var(--red); background: transparent; border: 0; cursor: pointer; }
.update-card { margin-bottom: 14px; }
.update-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.update-card-heading h3 { margin: 8px 0 3px; }
.plant-response-warning { display: inline-block; padding: 5px 9px; border: 1px solid #e8c46e; border-radius: 6px; background: var(--amber-soft); color: #805000; font-size: 12px; font-weight: 700; line-height: 1.35; }
.update-card-heading p { margin: 0; color: var(--muted); }
.update-groups { display: grid; gap: 10px; }
.update-details .update-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; }
@media (max-width: 1100px) { .update-details .update-groups { grid-template-columns: 1fr; } }
.update-group { border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); overflow: hidden; }
.update-group-heading { margin: 0; }
.update-group-heading h4 { margin: 0; color: var(--navy); font-size: 16px; }
.update-group-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 13px 18px; border: 0; background: transparent; color: var(--navy); font-family: inherit; font-size: 16px; font-weight: 700; text-align: left; cursor: pointer; }
.update-group-toggle:hover { background: var(--blue-soft); }
.update-group-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }
.update-chevron { font-size: 23px; line-height: 16px; transition: transform .2s ease; }
.update-group-toggle[aria-expanded="true"] .update-chevron { transform: rotate(180deg); }
.update-group-content { padding: 0 18px 18px; }
.revision-attachment-list { overflow-wrap: anywhere; }
.update-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.update-validation { margin: 12px 0 0; color: var(--red); font-size: 13px; font-weight: 700; }
.update-locked { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
body.login-required > .skip-link, body.login-required > .topbar, body.login-required > .main-nav, body.login-required > .environment-banner, body.login-required > .toast-region, body.login-required > .submission-overlay, body.login-required > #main, body.login-required > .dialog, body.login-required > #printReport { display: none !important; }
.login-shell { display: grid; place-items: center; max-width: none; min-height: 100vh; padding: clamp(20px, 4vw, 54px); background: radial-gradient(circle at 12% 18%, #dce9c9 0, transparent 34%), radial-gradient(circle at 88% 82%, #e6edd6 0, transparent 30%), linear-gradient(135deg, #eaf0e5, #f8f5ee); }
.login-panel { position: relative; width: min(880px, 100%); padding: clamp(205px, 24vw, 245px) clamp(34px, 8vw, 86px) clamp(38px, 6vw, 58px); overflow: hidden; background: rgba(255,255,255,.92); border: 1px solid #c8d6ca; box-shadow: 22px 22px 0 #cad8c5; }
.login-panel::before { content: ''; position: absolute; inset: 0 0 auto; width: 100%; aspect-ratio: 6 / 1; min-height: 145px; background: #073f36 url('../login-banner.png') center / cover no-repeat; }
.login-panel::after { content: ''; position: absolute; top: 0; right: 0; width: 6px; height: 100%; background: linear-gradient(#32bf67 0 24%, #0e674f 24% 100%); }
.login-panel > * { max-width: 620px; }
.login-eyebrow { margin: 0 0 10px; color: #0d7355; font: 700 11px/1.2 Arial, sans-serif; letter-spacing: 1.7px; }
.login-panel h1 { margin: 0; color: #14231d; font-size: clamp(42px, 6vw, 66px); line-height: .95; font-weight: 500; letter-spacing: -2px; }
.login-description { max-width: 570px; margin: 22px 0 34px; color: #66736b; font: 16px/1.5 Arial, sans-serif; }
.login-button { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 570px; padding: 17px 20px; border: 0; color: white; background: #0e674f; font: 700 14px Arial, sans-serif; cursor: pointer; transition: background .2s, transform .2s; }
.login-button:hover:not(:disabled) { background: #084c3a; transform: translateY(-1px); }
.login-button:disabled { opacity: .65; cursor: wait; }
.login-note { margin: 16px 0 0; color: #718078; font: 12px/1.5 Arial, sans-serif; }
.login-error { margin: 14px 0 0; color: #874536; font: 13px/1.45 Arial, sans-serif; }
.login-error:empty { display: none; }
.attachment-link { display: block; width: fit-content; margin: 8px 0; color: var(--primary); font-weight: 650; text-decoration: none; }
.attachment-link:hover { text-decoration: underline; }
.approval-box { margin-top: 18px; padding: 18px; background: white; border: 1px solid #b8cee1; border-radius: 8px; }
.approval-box h3 { margin-top: 0; }
.workflow-note { padding: 16px 20px; color: var(--navy); }
.workflow-note p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.signature-upload { display: grid; gap: 8px; max-width: 620px; }
.signature-upload span { font-weight: 700; }
.signature-upload img { width: 100%; max-height: 190px; padding: 8px; object-fit: contain; background: white; border: 1px solid var(--line); border-radius: 7px; }
.revision-card { margin-bottom: 14px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.revision-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.revision-summary h3 { margin: 9px 0 3px; }
.revision-summary p { margin: 0; color: var(--muted); }
.revision-history { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.revision-history > strong { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.revision-history > div { display: flex; flex-wrap: wrap; gap: 7px; }
.revision-chip { padding: 7px 10px; color: var(--blue); background: var(--blue-soft); border: 0; border-radius: 999px; }

.toast-region { position: fixed; right: 18px; top: 105px; z-index: 100; display: grid; gap: 9px; width: min(390px, calc(100vw - 36px)); }
.toast { padding: 13px 15px; color: white; background: var(--navy); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: slide-in .2s ease-out; }
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }
@keyframes slide-in { from { opacity: 0; transform: translateX(15px); } }

.submission-overlay { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; background: rgba(10,25,43,.58); backdrop-filter: blur(2px); }
.submission-overlay[hidden] { display: none; }
.submission-popover { display: flex; align-items: center; gap: 18px; width: min(470px, 100%); padding: 25px 27px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 24px 70px rgba(2,15,31,.32); }
.submission-popover strong { display: block; color: var(--navy); font-size: 18px; }
.submission-popover p { margin: 5px 0 0; color: var(--muted); line-height: 1.45; }
.submission-spinner { flex: 0 0 42px; width: 42px; height: 42px; border: 5px solid #dce9e4; border-top-color: var(--green); border-radius: 50%; animation: submission-spin .8s linear infinite; }
@keyframes submission-spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .field-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split-card { grid-template-columns: 1fr; }
  .subsection + .subsection { padding: 26px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .record-card { grid-template-columns: 1fr 1fr; }
  .record-actions { justify-content: flex-end; }
}

@media (max-width: 1180px) {
  .topbar { grid-template-columns: 1fr auto; }
  .title-wrap { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .form-workspace { grid-template-columns: 1fr; }
  .form-workspace > form { grid-row: 2; }
  .completion-panel { position: static; grid-row: 1; }
  .section-progress { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .login-shell { padding: 14px; align-items: start; }
  .login-panel { margin-top: 18px; padding: 135px 25px 34px; box-shadow: 10px 10px 0 #cad8c5; }
  .login-panel::before { min-height: 105px; }
  .login-panel h1 { font-size: 40px; letter-spacing: -1.2px; }
  .topbar { grid-template-columns: 1fr; gap: 12px; padding: 12px 16px; }
  .title-wrap { grid-column: 1; grid-row: auto; }
  .account-actions { justify-self: stretch; justify-content: space-between; }
  .brand-logo { width: 150px; height: 64px; }
  .brand-logo img { top: -38px; width: 150px; height: 150px; }
  .user-badge small { display: block; }
  .main-nav { justify-content: stretch; overflow-x: auto; }
  .nav-button { flex: 1 0 auto; }
  main { padding: 20px 12px 50px; }
  .card { padding: 18px 15px; }
  .field-grid, .field-grid.two-columns, .toolbar, .detail-summary, .detail-grid { grid-template-columns: 1fr; }
  .field.span-2, .field.span-4 { grid-column: auto; }
  .control-card [data-field-host="objective"] { margin-top: 0; }
  .signature-pad { grid-template-columns: 1fr; }
  .form-actions { flex-wrap: wrap; padding: 12px; }
  .form-actions .button { flex: 1 1 100%; }
  .record-card { grid-template-columns: 1fr; }
  .record-actions { justify-content: stretch; }
  .record-actions .button { flex: 1; }
  .revision-summary { align-items: stretch; flex-direction: column; }
  .section-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
  @page { size: A4 portrait; margin: 0; }
  .main-nav, .environment-banner, .form-actions, .button, .account-actions, .completion-panel { display: none !important; }
  body, :root { background: white; }
  main { max-width: none; padding: 0; }
  .card { break-inside: avoid; box-shadow: none; }
  body.print-query > .topbar, body.print-query > .main-nav, body.print-query > .environment-banner, body.print-query > main, body.print-query > dialog, body.print-query > .toast-region { display: none !important; }
  body.print-query .print-report { display: block !important; width: 100%; padding: 8mm; color: #111; font-family: Arial, sans-serif; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-report header { margin-bottom: 10px; padding-bottom: 7px; border-bottom: 2px solid #111; }
  .print-report header p { margin: 0 0 3px; font-size: 10px; font-weight: 700; letter-spacing: .1em; }
  .print-report header h1 { margin: 0 0 4px; font-size: 23px; }
  .print-report header span, .print-filters { font-size: 9px; }
  .print-record-full { break-inside: auto; }
  .print-record-full h2 { margin: 8px 0 9px; font-size: 16px; }
  .print-record-full table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 9.5px; line-height: 1.25; }
  .print-record-full th, .print-record-full td { padding: 3.5px 5px; text-align: left; vertical-align: top; border: 1px solid #aaa; overflow-wrap: anywhere; }
  .print-record-full th { width: 19%; background: #eee; }
  .print-record-full td { width: 31%; }
  .print-record-full .print-section-title th { width: auto; padding: 5px 7px; color: #fff; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; background: #183b60; border-color: #183b60; }
  .print-signature { display: block; width: auto; max-width: 120px; max-height: 32px; object-fit: contain; }
  .print-filters { margin: 0 0 12px; }
  .print-report table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .print-report th { background: #e8edf2; }
  .print-report tr { break-inside: avoid; }
}
