:root {
    --navy-950: #0b2238;
    --navy-900: #10314f;
    --navy-800: #16466f;
    --blue-700: #17659c;
    --blue-500: #2d8ac0;
    --blue-100: #dcecf7;
    --ink: #122238;
    --muted: #60758f;
    --line: #d7e1eb;
    --surface: #ffffff;
    --canvas: #edf3f7;
    --green: #16845b;
    --green-soft: #dff5eb;
    --amber: #b66c12;
    --amber-soft: #fff0d6;
    --red: #b93838;
    --red-soft: #ffe5e2;
    --shadow: 0 18px 50px rgba(17, 45, 72, .12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --sidebar: 292px;
    --topbar: 82px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: Aptos, Candara, "Trebuchet MS", sans-serif; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue-700); text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(45, 138, 192, .25); outline-offset: 2px; }

.app-shell { min-height: 100vh; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar); display: flex; flex-direction: column; color: #fff; background: radial-gradient(circle at 20% 0, rgba(62, 151, 197, .28), transparent 38%), linear-gradient(160deg, var(--navy-950), #0c3355 58%, #102943); border-right: 1px solid rgba(255,255,255,.1); }
.brand-block { min-height: var(--topbar); display: flex; align-items: center; gap: 13px; padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-logo { width: 58px; height: 50px; object-fit: contain; padding: 7px; background: #fff; border-radius: 13px; }
.brand-block div { display: grid; gap: 2px; }
.brand-block strong { font: 700 20px/1 Bahnschrift, "Arial Narrow", sans-serif; letter-spacing: .02em; }
.brand-block span { color: #b9cde0; font-size: 13px; }
.sidebar-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 24px; padding: 20px 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.28) transparent; }
.app-navigation { display: grid; gap: 8px; }
.nav-link { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; align-items: center; padding: 13px 14px; color: #dce8f2; border: 1px solid transparent; border-radius: 16px; transition: .18s ease; }
.nav-link:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.1); }
.nav-link.is-active { color: #fff; background: linear-gradient(120deg, rgba(56, 139, 200, .48), rgba(38, 104, 169, .68)); border-color: rgba(138, 203, 241, .35); box-shadow: 0 12px 25px rgba(0,0,0,.15); }
.nav-link span:last-child { min-width: 0; display: grid; gap: 3px; }
.nav-link strong { font-size: 14px; }
.nav-link small { overflow: hidden; color: #aebfd1; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.nav-link.is-active small { color: #d8ecfa; }
.nav-dot { width: 8px; height: 8px; background: #68829a; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,.04); }
.nav-link.is-active .nav-dot { background: #86d8ff; box-shadow: 0 0 0 5px rgba(134,216,255,.15); }
.sidebar-note { margin-top: auto; padding: 18px; color: #d6e3ed; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 18px; }
.sidebar-note strong { display: block; margin: 8px 0; color: #fff; font-size: 14px; }
.sidebar-note p { margin: 0; color: #b9cbd9; font-size: 12px; line-height: 1.55; }

.app-workspace { min-width: 0; margin-left: var(--sidebar); }
.app-topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: 18px; padding: 0 26px; background: rgba(247, 250, 252, .92); border-bottom: 1px solid rgba(188, 204, 218, .75); backdrop-filter: blur(18px); }
.topbar-context { min-width: 0; display: grid; gap: 3px; }
.topbar-context strong { overflow: hidden; font: 700 20px/1.1 Bahnschrift, "Arial Narrow", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.topbar-user > span { display: grid; text-align: right; }
.topbar-user strong { font-size: 13px; }
.topbar-user small { color: var(--muted); font-size: 11px; }
.menu-toggle { display: none; }
.app-content { width: 100%; min-width: 0; padding: 26px clamp(18px, 2.5vw, 42px) 52px; }

.eyebrow { color: var(--blue-700); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.is-light { color: #9fdcff; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-heading h1, .form-hero h1 { margin: 6px 0 7px; font: 700 clamp(28px, 3.1vw, 48px)/1 Bahnschrift, "Arial Narrow", sans-serif; letter-spacing: -.035em; }
.page-heading p, .form-hero p { max-width: 78ch; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.panel { min-width: 0; padding: 22px; background: rgba(255,255,255,.94); border: 1px solid rgba(199, 212, 224, .8); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.panel-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-heading h2, .section-heading h2, .process-panel h2, .dialog-card h2 { margin: 4px 0 0; font: 700 22px/1.15 Bahnschrift, "Arial Narrow", sans-serif; }
.panel-heading a { font-size: 13px; font-weight: 700; }
.panel-note { color: var(--muted); font-size: 12px; }

.btn-primary, .btn-secondary, .btn-quiet, .btn-small { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; font-weight: 800; border: 1px solid transparent; border-radius: 13px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn-primary { color: #fff; background: linear-gradient(120deg, var(--navy-800), var(--blue-700)); box-shadow: 0 10px 22px rgba(23, 101, 156, .22); }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-1px); }
.btn-primary:disabled { cursor: not-allowed; opacity: .45; transform: none; box-shadow: none; }
.btn-secondary { color: var(--navy-800); background: #eef5fa; border-color: #c8d9e7; }
.btn-quiet { min-height: 38px; padding: 0 13px; color: var(--navy-800); background: transparent; border-color: #cad7e2; }
.btn-small { min-height: 34px; padding: 0 12px; color: #fff; background: var(--blue-700); border-radius: 10px; font-size: 12px; }
.btn-small.is-quiet { color: var(--navy-800); background: #edf4f8; border-color: #cbd9e4; }
.is-wide { width: 100%; }

.alert { margin-bottom: 18px; padding: 13px 16px; border: 1px solid; border-radius: 14px; font-size: 13px; font-weight: 700; }
.alert.is-success { color: #0d6645; background: var(--green-soft); border-color: #acdcca; }
.alert.is-error { color: #962d2d; background: var(--red-soft); border-color: #efb9b5; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.metric-card { position: relative; min-width: 0; min-height: 146px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 20px; background: linear-gradient(145deg, #fff, #eef5f9); border: 1px solid #d1dfe9; border-radius: 22px; box-shadow: 0 12px 30px rgba(16,49,79,.08); }
.metric-card::before { position: absolute; top: -45px; right: -30px; width: 125px; height: 125px; content: ""; background: rgba(23,101,156,.08); border-radius: 50%; }
.metric-card > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-card strong { margin: 8px 0 2px; font: 700 36px/1 Bahnschrift, "Arial Narrow", sans-serif; }
.metric-card small { color: var(--muted); }
.metric-card.is-blue { background: linear-gradient(145deg, #eef8ff, #dceefa); }
.metric-card.is-amber { background: linear-gradient(145deg, #fff9ec, #ffefd1); }
.metric-card.is-green { background: linear-gradient(145deg, #effaf5, #dff3e9); }
.metric-card.is-red { background: linear-gradient(145deg, #fff2f0, #ffe1dd); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .7fr); gap: 18px; align-items: start; }
.document-list { display: grid; }
.document-row { display: grid; grid-template-columns: 110px minmax(180px, 1fr) max-content 58px; gap: 14px; align-items: center; padding: 14px 6px; color: var(--ink); border-bottom: 1px solid var(--line); }
.document-row:last-child { border-bottom: 0; }
.document-row > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.document-row small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.document-code { color: var(--blue-700); font-size: 12px; font-weight: 900; letter-spacing: .05em; }
.progress-value { font-weight: 900; text-align: right; }
.process-panel { background: linear-gradient(165deg, #103b60, #0d2740); color: #fff; }
.process-panel .eyebrow { color: #91d8ff; }
.process-list { display: grid; gap: 17px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: steps; }
.process-list li { position: relative; display: grid; gap: 4px; padding-left: 42px; counter-increment: steps; }
.process-list li::before { position: absolute; left: 0; width: 27px; height: 27px; display: grid; place-items: center; content: counter(steps); color: #09253c; font-size: 11px; font-weight: 900; background: #99dbff; border-radius: 9px; }
.process-list span { color: #b8ccdb; font-size: 12px; line-height: 1.45; }
.empty-state { display: grid; place-items: center; min-height: 210px; padding: 30px; text-align: center; background: repeating-linear-gradient(-45deg, #f8fbfd, #f8fbfd 12px, #f3f7fa 12px, #f3f7fa 24px); border: 1px dashed #bdcedc; border-radius: 18px; }
.empty-state strong { font-size: 17px; }
.empty-state p { max-width: 52ch; margin: 6px 0 0; color: var(--muted); }

.filter-bar { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; padding: 14px; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 18px; }
.filter-bar label { flex: 1; min-width: 180px; }
label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 800; }
label small { color: var(--muted); font-weight: 500; }
input, select, textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid #c9d5e0; border-radius: 12px; }
input, select { min-height: 46px; padding: 0 13px; }
textarea { padding: 11px 13px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(45,138,192,.1); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.check-label { display: flex; align-items: center; align-self: end; min-height: 46px; flex-direction: row; }
.check-label input, .check-row input { width: 18px; min-height: 18px; }
.table-panel { padding: 14px; }
.table-panel .panel-heading { padding: 8px 8px 0; }
.responsive-table { width: 100%; max-height: calc(100vh - 245px); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 18px; scrollbar-width: thin; }
table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; }
th { position: sticky; top: 0; z-index: 2; padding: 13px 15px; color: #fff; font-size: 10px; letter-spacing: .09em; text-align: left; text-transform: uppercase; background: var(--navy-800); }
th:first-child { border-radius: 16px 0 0; }
th:last-child { border-radius: 0 16px 0 0; }
td { padding: 14px 15px; vertical-align: middle; background: #fff; border-bottom: 1px solid var(--line); }
tbody tr:nth-child(even) td { background: #f7fafc; }
tbody tr:hover td { background: #eef6fb; }
td > strong, td > small { display: block; }
td > small { margin-top: 4px; color: var(--muted); }
.format-actions { display: flex; gap: 9px; min-width: 390px; }
.format-action { flex: 1; min-width: 180px; display: grid; gap: 2px; padding: 10px 12px; text-align: left; color: var(--navy-800); background: #edf5fa; border: 1px solid #cbdce8; border-radius: 12px; cursor: pointer; }
.format-action:hover { background: #dfeef8; border-color: #9ec6df; }
.format-action strong { font-size: 12px; }
.format-action span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.count-badge { display: inline-grid; min-width: 34px; height: 34px; place-items: center; color: var(--navy-800); font-weight: 900; background: var(--blue-100); border-radius: 12px; }
.row-actions { display: flex; gap: 7px; }
.inline-progress { width: 110px; height: 7px; overflow: hidden; background: #dce7ef; border-radius: 999px; }
.inline-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #44b389); border-radius: inherit; }
.status-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; color: var(--navy-800); font-size: 10px; font-weight: 900; white-space: nowrap; background: #e5edf3; border-radius: 999px; }
.status-pill.is-in_progress { color: #875009; background: var(--amber-soft); }
.status-pill.is-submitted { color: #135885; background: #dceffc; }
.status-pill.is-approved { color: #0c6544; background: var(--green-soft); }
.status-pill.is-rejected, .status-pill.is-rejected { color: #9e3030; background: var(--red-soft); }
.integration-note { max-width: 900px; }

.app-dialog { width: min(620px, calc(100vw - 30px)); max-height: calc(100vh - 30px); padding: 0; overflow: auto; background: transparent; border: 0; border-radius: 24px; box-shadow: 0 35px 90px rgba(5, 25, 43, .38); }
.app-dialog::backdrop { background: rgba(7, 27, 44, .62); backdrop-filter: blur(5px); }
.dialog-card { position: relative; display: grid; gap: 18px; padding: clamp(22px, 4vw, 34px); background: #fff; border-radius: 24px; }
.dialog-card > p { margin: -7px 0 0; color: var(--muted); line-height: 1.55; }
.dialog-close { position: absolute; top: 15px; right: 15px; width: 38px; height: 38px; display: grid; place-items: center; color: var(--navy-800); font-size: 25px; background: #edf3f7; border: 0; border-radius: 50%; cursor: pointer; }

.form-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end; margin-bottom: 16px; }
.back-link { display: inline-block; margin-bottom: 14px; font-size: 12px; font-weight: 800; }
.form-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.form-meta span { min-width: 150px; display: grid; gap: 3px; padding: 10px 13px; background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 13px; }
.form-meta small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.form-meta strong { overflow-wrap: anywhere; font-size: 12px; }
.progress-card { display: flex; align-items: center; gap: 15px; padding: 16px 20px; background: linear-gradient(145deg, #fff, #e9f3f9); border: 1px solid #cbdce8; border-radius: 22px; box-shadow: var(--shadow); }
.progress-card p { font-size: 12px; }
.progress-ring { --progress: 0; width: 76px; height: 76px; display: grid; flex: 0 0 auto; place-items: center; background: conic-gradient(var(--green) calc(var(--progress) * 1%), #d7e4ec 0); border-radius: 50%; }
.progress-ring::before { grid-area: 1/1; width: 60px; height: 60px; content: ""; background: #fff; border-radius: 50%; }
.progress-ring strong { z-index: 1; grid-area: 1/1; font: 700 17px/1 Bahnschrift, sans-serif; }
.actor-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding: 15px 18px; color: #fff; background: linear-gradient(110deg, var(--navy-900), var(--navy-800)); border-radius: 18px; box-shadow: 0 12px 28px rgba(16,49,79,.2); }
.actor-bar > div { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 3px 12px; align-items: center; }
.actor-bar .eyebrow { grid-column: 1/-1; color: #9bd9fb; }
.actor-bar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actor-bar small { color: #bed1df; }
.actor-bar .btn-secondary { flex: 0 0 auto; color: #fff; background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.25); }

.form-workspace { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.form-index { position: sticky; top: calc(var(--topbar) + 14px); min-width: 0; height: calc(100vh - var(--topbar) - 30px); padding: 16px 10px 16px 16px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 13px 35px rgba(16,49,79,.09); }
.form-index-scroll { height: 100%; padding-right: 6px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.form-index nav { display: grid; gap: 5px; margin-top: 13px; }
.form-index a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 11px; color: var(--ink); border-radius: 11px; }
.form-index a:hover { background: #eef5f9; }
.form-index a span { overflow: hidden; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.form-index a small { flex: 0 0 auto; color: var(--blue-700); font-size: 10px; font-weight: 900; }
.form-sections { min-width: 0; display: grid; gap: 16px; }
.form-section { min-width: 0; scroll-margin-top: calc(var(--topbar) + 14px); padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 14px 40px rgba(16,49,79,.09); }
.section-heading { padding: 2px 3px 0; }
.section-heading > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.entry-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; scrollbar-width: thin; }
.entry-table { min-width: 920px; }
.entry-header, .entry-row { display: grid; grid-template-columns: 92px minmax(280px, 1.8fr) minmax(170px, .75fr) minmax(160px, .7fr); }
.entry-table.is-torque .entry-header, .entry-table.is-torque .entry-row { grid-template-columns: 92px minmax(280px, 1.5fr) 210px minmax(170px, .8fr) minmax(160px, .7fr); }
.entry-header { position: sticky; top: 0; z-index: 3; color: #fff; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; background: var(--navy-800); }
.entry-header span { padding: 12px; border-right: 1px solid rgba(255,255,255,.15); }
.entry-row { min-height: 108px; background: #fff; border-bottom: 1px solid var(--line); transition: background .15s ease; }
.entry-row:last-child { border-bottom: 0; }
.entry-row:nth-child(odd) { background: #f8fbfd; }
.entry-row.is-completed { background: linear-gradient(90deg, rgba(223,245,235,.72), #fff 32%); }
.entry-row.is-not_applicable { background: #f0f3f5; }
.entry-row > div { min-width: 0; padding: 12px; border-right: 1px solid var(--line); }
.entry-row > div:last-child { border-right: 0; }
.entry-check { display: grid; place-items: center; align-content: center; gap: 5px; text-align: center; }
.entry-check form { margin: 0; }
.check-button { width: 46px; height: 46px; display: grid; place-items: center; padding: 0; color: #fff; background: #fff; border: 2px solid #aebfcd; border-radius: 14px; cursor: pointer; box-shadow: inset 0 0 0 4px #fff; }
.check-button span { width: 32px; height: 32px; display: grid; place-items: center; font-size: 20px; border-radius: 9px; }
.check-button:hover { border-color: var(--blue-500); }
.check-button.is-checked { background: var(--green); border-color: var(--green); box-shadow: 0 8px 18px rgba(22,132,91,.22); }
.check-button.is-readonly { cursor: default; }
.entry-check small { color: var(--muted); font-size: 9px; font-weight: 800; }
.entry-description { display: grid; align-content: center; gap: 5px; }
.item-code { width: max-content; padding: 3px 7px; color: var(--blue-700); font-size: 9px; font-weight: 900; background: var(--blue-100); border-radius: 7px; }
.entry-description strong { font-size: 13px; line-height: 1.35; }
.entry-description small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.torque-spec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; align-content: center; }
.torque-spec span { min-width: 0; display: grid; gap: 3px; padding: 7px 4px; text-align: center; background: #edf4f8; border-radius: 9px; }
.torque-spec small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.torque-spec strong { overflow-wrap: anywhere; font-size: 11px; }
.entry-owner { display: grid; align-content: center; gap: 4px; }
.entry-owner strong { font-size: 12px; }
.entry-owner small { color: var(--muted); font-size: 9px; }
.entry-detail { display: grid; align-content: center; gap: 6px; }
.entry-file-count { color: var(--muted); font-size: 10px; }
.entry-file-count span { color: var(--blue-700); font-weight: 900; }
details summary { color: var(--blue-700); font-size: 11px; font-weight: 900; cursor: pointer; }
.entry-options { min-width: 320px; display: grid; gap: 10px; margin-top: 12px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 25px rgba(16,49,79,.12); }
.entry-options p { margin: 0; color: var(--muted); font-size: 11px; }
.entry-options > a { font-size: 10px; }
.detail-form, .upload-form { display: grid; gap: 9px; }
.check-row, .option-actions, .signature-actions, .document-actions, .review-panel > div { display: flex; flex-wrap: wrap; gap: 8px; }
.check-row label { display: flex; align-items: center; flex-direction: row; }
.upload-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.file-button { min-height: 38px; display: flex; align-items: center; justify-content: center; padding: 0 11px; color: var(--navy-800); background: #edf4f8; border: 1px dashed #98b3c8; border-radius: 10px; cursor: pointer; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.signature-section { padding: clamp(18px, 3vw, 30px); }
.signature-status { display: grid; gap: 4px; margin-bottom: 16px; padding: 13px 15px; color: #0d6243; background: var(--green-soft); border-radius: 13px; }
.signature-status span { font-size: 11px; }
.signature-form { display: grid; gap: 14px; }
.signature-pad { position: relative; padding: 10px; background: repeating-linear-gradient(0deg, #fff, #fff 27px, #edf3f7 28px); border: 2px dashed #a7bac9; border-radius: 15px; }
.signature-pad canvas { width: 100%; height: min(220px, 30vw); min-height: 150px; display: block; touch-action: none; }
.signature-pad > span { position: absolute; right: 12px; bottom: 8px; color: #8ca0b1; font-size: 9px; }
.signature-actions { justify-content: flex-end; }
.submit-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 16px; background: linear-gradient(120deg, #edf6fb, #f8fbfd); border: 1px solid #cbdce8; border-radius: 16px; }
.submit-panel p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.review-panel { display: grid; gap: 12px; margin-top: 18px; padding: 17px; background: var(--amber-soft); border: 1px solid #efd19e; border-radius: 16px; }
.review-panel > div { justify-content: flex-end; }

.login-body { min-height: 100vh; background: #0b2842; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.15fr) minmax(420px, .85fr); }
.login-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(30px, 5vw, 78px); color: #fff; background: radial-gradient(circle at 84% 17%, rgba(59,164,216,.42), transparent 24%), radial-gradient(circle at 20% 85%, rgba(33,111,154,.36), transparent 30%), linear-gradient(145deg, #0a2944, #123f64 60%, #0b304e); }
.login-brand-panel::after { position: absolute; right: -9vw; bottom: -20vw; width: 46vw; height: 46vw; content: ""; border: 1px solid rgba(255,255,255,.13); border-radius: 48% 52% 38% 62%; transform: rotate(18deg); }
.login-brand-line { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; font: 700 17px/1 Bahnschrift, sans-serif; letter-spacing: .05em; }
.login-brand-line img { width: 92px; height: 70px; object-fit: contain; padding: 9px; background: #fff; border-radius: 16px; }
.login-message { position: relative; z-index: 1; max-width: 720px; }
.login-message h1 { margin: 14px 0 18px; font: 700 clamp(42px, 5.6vw, 78px)/.96 Bahnschrift, "Arial Narrow", sans-serif; letter-spacing: -.045em; }
.login-message p { max-width: 58ch; margin: 0; color: #c6d8e6; font-size: clamp(15px, 1.35vw, 20px); line-height: 1.55; }
.login-features { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.login-features span { padding: 8px 11px; color: #d6e8f3; font-size: 10px; font-weight: 800; letter-spacing: .05em; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; }
.login-form-panel { display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 100% 0, #d9e9f2, transparent 35%), #f0f5f8; }
.login-card { width: min(470px, 100%); display: grid; gap: 17px; padding: clamp(26px, 4vw, 46px); background: rgba(255,255,255,.95); border: 1px solid #d4e0e9; border-radius: 28px; box-shadow: 0 28px 70px rgba(12,48,78,.16); }
.login-card h2 { margin: 0; font: 700 32px/1 Bahnschrift, sans-serif; }
.login-card > p { margin: -8px 0 0; color: var(--muted); line-height: 1.5; }
.login-card > small { color: var(--muted); text-align: center; }

@media (min-width: 1700px) {
    :root { --sidebar: 320px; }
    .app-content { padding-left: 52px; padding-right: 52px; }
    .metric-card { min-height: 164px; }
    .form-workspace { grid-template-columns: 285px minmax(0, 1fr); }
    .entry-table { min-width: 1100px; }
}

@media (max-width: 1180px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-workspace { grid-template-columns: 210px minmax(0, 1fr); }
    .topbar-user > span { display: none; }
}

@media (max-width: 900px) {
    :root { --topbar: 70px; }
    .app-sidebar { width: min(310px, 84vw); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 20px 0 50px rgba(4,20,34,.25); }
    .app-sidebar.is-open { transform: translateX(0); }
    .app-workspace { margin-left: 0; }
    .menu-toggle { min-height: 38px; display: inline-flex; align-items: center; padding: 0 12px; color: var(--navy-800); font-weight: 800; background: #e7f0f6; border: 1px solid #c8d9e5; border-radius: 11px; }
    .app-topbar { padding: 0 16px; }
    .app-content { padding: 20px 15px 38px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading .btn-primary { width: 100%; }
    .form-hero { grid-template-columns: 1fr; }
    .progress-card { justify-content: flex-start; }
    .form-workspace { display: block; }
    .form-index { position: sticky; top: calc(var(--topbar) + 7px); z-index: 15; width: 100%; height: auto; margin-bottom: 12px; padding: 10px; border-radius: 15px; }
    .form-index-scroll { display: flex; align-items: center; gap: 10px; overflow-x: auto; overflow-y: hidden; }
    .form-index-scroll > .eyebrow { flex: 0 0 auto; }
    .form-index nav { display: flex; flex: 0 0 auto; margin: 0; }
    .form-index a { flex: 0 0 auto; min-width: 145px; background: #f1f6f9; }
    .form-index a span { max-width: 110px; }
    .actor-bar { align-items: flex-start; flex-direction: column; }
    .actor-bar > div { grid-template-columns: 1fr; }
    .actor-bar .btn-secondary { width: 100%; }
    .login-shell { grid-template-columns: 1fr; }
    .login-brand-panel { min-height: 40vh; gap: 45px; padding: 30px; }
    .login-message h1 { font-size: clamp(38px, 8vw, 58px); }
    .login-features { display: none; }
}

@media (max-width: 680px) {
    .topbar-context .eyebrow { display: none; }
    .topbar-context strong { font-size: 16px; }
    .topbar-user .btn-quiet { min-height: 36px; padding: 0 9px; font-size: 11px; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .metric-card { min-height: 120px; padding: 15px; }
    .metric-card strong { font-size: 30px; }
    .metric-card small { font-size: 10px; }
    .document-row { grid-template-columns: 85px minmax(0,1fr) 48px; }
    .document-row .status-pill { grid-column: 2/4; width: max-content; }
    .filter-bar { align-items: stretch; flex-direction: column; }
    .filter-bar label { min-width: 0; }
    .filter-bar .btn-secondary { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .panel, .form-section { padding: 14px; border-radius: 18px; }
    .responsive-table { max-height: none; }
    .form-meta { display: grid; grid-template-columns: 1fr 1fr; }
    .form-meta span { min-width: 0; }
    .entry-table-wrap { overflow: visible; border: 0; }
    .entry-table, .entry-table.is-torque { min-width: 0; display: grid; gap: 10px; }
    .entry-header { display: none; }
    .entry-row, .entry-table.is-torque .entry-row { display: grid; grid-template-columns: 78px minmax(0, 1fr); min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
    .entry-row > div { border-right: 0; border-bottom: 1px solid var(--line); }
    .entry-row > div:last-child { border-bottom: 0; }
    .entry-check { grid-row: span 2; border-right: 1px solid var(--line) !important; }
    .entry-description { min-height: 96px; }
    .torque-spec, .entry-owner, .entry-detail { grid-column: 1/-1; }
    .entry-detail { min-height: 58px; }
    .entry-options { min-width: 0; box-shadow: none; }
    .submit-panel { align-items: stretch; flex-direction: column; }
    .submit-panel .btn-primary { width: 100%; }
    .signature-pad canvas { height: 170px; }
    .login-brand-panel { min-height: 34vh; }
    .login-brand-line img { width: 72px; height: 55px; }
    .login-message p { display: none; }
    .login-form-panel { padding: 15px; }
    .login-card { padding: 24px 20px; border-radius: 22px; }
}

@media (max-width: 430px) {
    .metric-grid { grid-template-columns: 1fr; }
    .metric-card { min-height: 104px; }
    .form-meta { grid-template-columns: 1fr; }
    .page-heading h1, .form-hero h1 { font-size: 30px; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .login-brand-panel { min-height: 29vh; padding: 22px; }
    .login-message h1 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* SLACOL corporate interface */
:root {
    --navy-950: #061d3a;
    --navy-900: #082b57;
    --navy-800: #0b3d80;
    --blue-700: #0f4fb3;
    --blue-500: #2f75d6;
    --blue-100: #e7f0ff;
    --ink: #10243e;
    --muted: #607797;
    --line: #d7e1ed;
    --surface: #ffffff;
    --canvas: #eef3f9;
    --green: #13835e;
    --green-soft: #def5eb;
    --amber: #a9650b;
    --amber-soft: #fff1d8;
    --red: #b83235;
    --red-soft: #ffe4e3;
    --shadow: 0 18px 46px rgba(16, 43, 79, .1);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 13px;
    --sidebar: clamp(276px, 18vw, 310px);
    --topbar: 88px;
    --font-body: "IBM Plex Sans", Aptos, Candara, sans-serif;
    --font-display: "Space Grotesk", Bahnschrift, "Arial Narrow", sans-serif;
}

html { overflow-x: hidden; }
body {
    min-width: 320px;
    font-family: var(--font-body);
    background:
        radial-gradient(circle at 92% 3%, rgba(47, 117, 214, .1), transparent 27rem),
        linear-gradient(rgba(255,255,255,.34) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.34) 1px, transparent 1px),
        var(--canvas);
    background-size: auto, 42px 42px, 42px 42px, auto;
}
button, input, select, textarea { font-family: var(--font-body); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline-color: rgba(47, 117, 214, .34);
}

.app-sidebar {
    width: var(--sidebar);
    background:
        radial-gradient(circle at 8% 2%, rgba(69, 132, 218, .3), transparent 27%),
        linear-gradient(158deg, #061d3a 0%, #082f63 56%, #061c38 100%);
    border-right-color: rgba(154, 190, 235, .2);
    box-shadow: 12px 0 36px rgba(5, 24, 51, .12);
}
.app-sidebar::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    opacity: .22;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
.brand-block {
    position: relative;
    z-index: 1;
    min-height: 178px;
    display: grid;
    align-content: center;
    gap: 13px;
    padding: 24px 25px 21px;
    border-bottom-color: rgba(255,255,255,.13);
}
.brand-logo {
    width: min(194px, 100%);
    height: auto;
    max-height: 72px;
    padding: 0;
    object-fit: contain;
    object-position: left center;
    background: transparent;
    border-radius: 0;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,.18));
}
.brand-block .brand-copy { display: grid; gap: 2px; }
.brand-block .brand-copy > span {
    color: #91b8e8;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.brand-block .brand-copy > strong {
    font: 700 22px/1.1 var(--font-display);
    letter-spacing: -.02em;
}
.brand-block .brand-copy > small { color: #c1d3e8; font-size: 11px; }
.sidebar-scroll {
    position: relative;
    z-index: 1;
    gap: 16px;
    padding: 17px 14px 20px;
}
.sidebar-scroll::-webkit-scrollbar, .responsive-table::-webkit-scrollbar, .entry-table-wrap::-webkit-scrollbar, .form-index-scroll::-webkit-scrollbar { width: 9px; height: 9px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.24); border: 2px solid transparent; border-radius: 999px; background-clip: padding-box; }
.responsive-table::-webkit-scrollbar-thumb, .entry-table-wrap::-webkit-scrollbar-thumb, .form-index-scroll::-webkit-scrollbar-thumb { background: #b6c7da; border: 2px solid transparent; border-radius: 999px; background-clip: padding-box; }
.sidebar-section-label {
    padding: 0 11px;
    color: #789cc9;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.app-navigation { gap: 6px; }
.nav-link {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    min-height: 65px;
    padding: 9px 11px;
    border-radius: 14px;
}
.nav-link:hover { transform: translateX(2px); background: rgba(255,255,255,.075); }
.nav-link.is-active {
    background: linear-gradient(112deg, #155ab6, #0f4a9e);
    border-color: rgba(142, 187, 242, .36);
    box-shadow: 0 12px 24px rgba(0, 18, 50, .25), inset 3px 0 0 #8abfff;
}
.nav-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #9bbce4;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 11px;
}
.nav-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-link.is-active .nav-icon { color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.18); }
.nav-link strong { font-size: 13px; }
.nav-link small { color: #9db3cf; font-size: 10px; }
.sidebar-note {
    margin-top: 8px;
    padding: 15px;
    background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
    border-color: rgba(150, 190, 237, .15);
    border-radius: 15px;
}
.sidebar-note .eyebrow { color: #7fafe8; }
.sidebar-note strong { margin: 7px 0 4px; font: 600 13px/1.25 var(--font-display); }
.sidebar-note p { color: #aebfd3; font-size: 10px; line-height: 1.5; }
.sidebar-account {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 9px;
    gap: 10px;
    align-items: center;
    margin: 0 14px 14px;
    padding: 12px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 15px;
}
.sidebar-account > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.sidebar-account strong, .sidebar-account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account strong { color: #fff; font-size: 11px; }
.sidebar-account small { color: #a9bed8; font-size: 9px; }
.online-dot { width: 8px; height: 8px; background: #43ce93; border: 2px solid #173f6e; border-radius: 50%; box-shadow: 0 0 0 3px rgba(67,206,147,.12); }
.user-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    font: 700 11px/1 var(--font-display);
    background: linear-gradient(145deg, #347ddc, #0b4698);
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 12px;
    box-shadow: 0 7px 15px rgba(7, 48, 105, .19);
}

.app-workspace { margin-left: var(--sidebar); }
.app-topbar {
    height: var(--topbar);
    gap: 16px;
    padding: 0 clamp(20px, 2.2vw, 36px);
    background: rgba(255,255,255,.91);
    border-bottom-color: rgba(185, 202, 222, .68);
    box-shadow: 0 8px 28px rgba(20, 46, 79, .055);
}
.topbar-context { gap: 2px; }
.topbar-context .eyebrow { color: var(--blue-700); }
.topbar-context strong { font: 700 20px/1.15 var(--font-display); letter-spacing: -.02em; }
.topbar-utilities { min-width: 0; margin-left: auto; display: flex; align-items: center; gap: 10px; }
.context-chip {
    min-height: 44px;
    display: grid;
    align-content: center;
    gap: 1px;
    padding: 0 13px;
    background: #f4f7fb;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.context-chip small { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.context-chip strong { font-size: 11px; }
.topbar-user {
    min-width: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 10px 4px 5px;
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.topbar-user-copy { min-width: 0; display: grid; gap: 1px; }
.topbar-user-copy strong, .topbar-user-copy small { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user-copy strong { font-size: 11px; }
.topbar-user-copy small { color: var(--muted); font-size: 9px; }
.logout-form { margin: 0; }
.logout-button { gap: 7px; min-height: 44px; color: var(--navy-800); background: #fff; }
.logout-button svg, .menu-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.topbar-mobile-logo { display: none; width: 90px; height: 35px; object-fit: contain; object-position: left center; }
.sidebar-scrim { display: none; }
.app-content { padding: 28px clamp(20px, 2.6vw, 46px) 54px; }

.eyebrow { color: var(--blue-700); font-weight: 700; }
.page-heading h1, .form-hero h1 { font-family: var(--font-display); letter-spacing: -.045em; }
.panel-heading h2, .section-heading h2, .process-panel h2, .dialog-card h2 { font-family: var(--font-display); letter-spacing: -.025em; }
.panel {
    background: rgba(255,255,255,.96);
    border-color: rgba(203, 215, 230, .9);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}
.btn-primary, .btn-secondary, .btn-quiet, .btn-small { min-height: 44px; font-weight: 700; border-radius: 12px; }
.btn-primary { background: linear-gradient(120deg, #0b3d80, #1260c3); box-shadow: 0 10px 22px rgba(15,79,179,.22); }
.btn-secondary { color: #0b3d80; background: #eef4fd; border-color: #c8d8ee; }
.btn-quiet { color: #0b3d80; border-color: #cad7e6; }
input, select, textarea { border-color: #c8d4e3; border-radius: 11px; }
input, select { min-height: 48px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(47,117,214,.11); }

.metric-grid { gap: 12px; }
.metric-card {
    min-height: 142px;
    padding: 21px;
    background: linear-gradient(145deg, #fff, #f4f8fd);
    border-color: #d2dfef;
    border-radius: 19px;
    box-shadow: 0 12px 28px rgba(13, 53, 103, .075);
}
.metric-card::after { position: absolute; top: 0; left: 21px; width: 46px; height: 4px; content: ""; background: var(--blue-700); border-radius: 0 0 8px 8px; }
.metric-card.is-amber::after { background: var(--amber); }
.metric-card.is-green::after { background: var(--green); }
.metric-card.is-red::after { background: var(--red); }
.metric-card > span { font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.metric-card strong { font-family: var(--font-display); }
.process-panel { background: linear-gradient(155deg, #0b3c7d, #06254e); }
.process-list li::before { color: #07346f; background: #d5e7ff; }
.empty-state { background: repeating-linear-gradient(-45deg, #fbfdff, #fbfdff 12px, #f4f8fc 12px, #f4f8fc 24px); }
.filter-bar { background: #f8fafd; border-color: #d6e1ee; border-radius: 16px; }
.responsive-table, .entry-table-wrap { scrollbar-color: #b6c7da transparent; }
th, .entry-header { background: linear-gradient(115deg, #0a3a79, #0f56ae); }
th { font-weight: 700; }
tbody tr:hover td { background: #edf4ff; }
.format-action { color: #0a3d83; background: #edf4ff; border-color: #c9daef; }
.format-action:hover { background: #e2edfc; border-color: #a8c4e6; }
.form-index, .form-section { border-color: #d4e0ee; box-shadow: 0 14px 34px rgba(13, 53, 103, .08); }
.form-index a:hover { background: #edf4ff; }
.form-index a:focus-visible { background: #edf4ff; }
.progress-ring strong { font-family: var(--font-display); }
.actor-bar { background: linear-gradient(110deg, #082d5d, #0e4c9b); }
.check-button { border-color: #a8b9cd; border-radius: 13px; }
.check-button:hover { border-color: var(--blue-500); background: var(--blue-100); }
.check-button.is-checked { background: var(--green); border-color: var(--green); }
.item-code { color: #0b4ba7; background: #e5effe; }
.file-button { color: #0a3d83; background: #edf4ff; border-color: #8eadcf; }
.signature-pad { border-color: #9db4cf; }

.order-explorer { display: grid; gap: 14px; }
.explorer-heading { padding: 5px 3px 2px; }
.order-folder { overflow: hidden; background: rgba(255,255,255,.97); border: 1px solid #cfdaea; border-radius: 20px; box-shadow: 0 14px 32px rgba(13,53,103,.08); }
.order-folder > summary { min-height: 92px; display: grid; grid-template-columns: 48px minmax(220px,1fr) auto auto auto; gap: 16px; align-items: center; padding: 17px 21px; cursor: pointer; list-style: none; background: linear-gradient(110deg,#f9fbfe,#edf4fd); }
.order-folder > summary::-webkit-details-marker { display: none; }
.folder-icon { width: 44px; height: 35px; position: relative; background: #d7e8ff; border: 1px solid #a9c7ec; border-radius: 7px; }
.folder-icon::before { position: absolute; top: -7px; left: 3px; width: 19px; height: 9px; content: ""; background: #b8d5f8; border: 1px solid #a9c7ec; border-bottom: 0; border-radius: 5px 5px 0 0; }
.folder-title { min-width: 0; display: grid; gap: 2px; }
.folder-title small { color: var(--blue-700); font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.folder-title strong { overflow-wrap: anywhere; font: 700 19px/1.15 var(--font-display); }
.folder-title span { color: var(--muted); font-size: 11px; }
.folder-stats { display: grid; gap: 2px; min-width: 72px; color: var(--muted); font-size: 10px; text-align: center; }
.folder-stats b { color: var(--navy-900); font: 700 18px/1 var(--font-display); }
.serial-folder-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,420px),1fr)); gap: 14px; padding: 16px; border-top: 1px solid #d7e2ef; }
.serial-folder { min-width: 0; padding: 18px; background: #fff; border: 1px solid #d8e3ef; border-radius: 16px; }
.serial-folder > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 13px; border-bottom: 1px solid #e3eaf3; }
.serial-folder h3 { margin: 3px 0; overflow-wrap: anywhere; font: 700 17px/1.2 var(--font-display); }
.serial-folder p { margin: 0; color: var(--muted); font-size: 11px; }
.serial-documents { display: grid; gap: 7px; padding: 12px 0; }
.serial-document { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; color: inherit; text-decoration: none; background: #f5f8fc; border: 1px solid #e0e8f2; border-radius: 11px; }
.serial-document:hover { background: #edf4ff; border-color: #bed2eb; }
.serial-document > span:first-child { min-width: 0; display: grid; gap: 2px; }
.serial-document strong,.serial-document small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serial-document strong { font-size: 11px; }
.serial-document small { color: var(--muted); font-size: 9px; }
.serial-empty { padding: 8px 2px; }
.explorer-format-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
.quality-callout { display: grid; gap: 6px; margin-top: 14px; padding: 17px 18px; border: 1px solid; border-radius: 14px; }
.quality-callout strong { font: 700 15px/1.2 var(--font-display); }
.quality-callout p,.quality-callout span { margin: 0; font-size: 12px; line-height: 1.55; }
.quality-callout.is-waiting { color: #5e4716; background: #fff8e8; border-color: #ead5a6; }
.quality-callout.is-pending { color: #174a82; background: #edf5ff; border-color: #bdd5f0; }
.quality-callout.is-approved { color: #116342; background: #edfbf5; border-color: #b9e4d1; }
.quality-callout.is-rejected { color: #8d2929; background: #fff0f0; border-color: #edc0c0; }

.version-history { display: grid; gap: 9px; margin-top: 16px; padding: 16px; background: #f7f9fc; border: 1px solid #d5e0ec; border-radius: 14px; }
.version-history h3 { margin: 3px 0 0; font: 700 16px/1.2 var(--font-display); }
.version-history article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; background: #fff; border: 1px solid #dde6f0; border-radius: 11px; }
.version-history article > span { min-width: 0; display: grid; gap: 2px; }
.version-history article strong { font-size: 11px; }
.version-history article small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.version-history article > div { display: flex; gap: 7px; }

.login-body { background: #061c38; }
.login-shell { grid-template-columns: minmax(500px, 1.18fr) minmax(430px, .82fr); }
.login-brand-panel {
    padding: clamp(34px, 5vw, 76px);
    background:
        radial-gradient(circle at 86% 15%, rgba(57, 125, 220, .5), transparent 23%),
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(145deg, #061d3a, #0a3d80 62%, #061d3a);
    background-size: auto, 42px 42px, 42px 42px, auto;
}
.login-brand-panel::before {
    position: absolute;
    top: 18%;
    right: -8rem;
    width: 29rem;
    height: 29rem;
    content: "";
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    box-shadow: 0 0 0 5rem rgba(255,255,255,.025), 0 0 0 10rem rgba(255,255,255,.018);
}
.login-brand-panel::after { right: -14vw; bottom: -27vw; border-color: rgba(255,255,255,.09); }
.login-brand-line { align-items: flex-start; flex-direction: column; gap: 13px; font-family: var(--font-display); }
.login-brand-line img {
    width: min(220px, 52vw);
    height: auto;
    max-height: 78px;
    padding: 0;
    object-fit: contain;
    object-position: left center;
    background: transparent;
    border-radius: 0;
    filter: drop-shadow(0 6px 11px rgba(0,0,0,.2));
}
.login-brand-line span { display: grid; gap: 3px; color: #fff; font-size: 16px; }
.login-brand-line small { color: #9dc2ee; font-family: var(--font-body); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.login-message { max-width: 760px; }
.login-message h1 { max-width: 13ch; font-family: var(--font-display); font-size: clamp(42px, 5vw, 72px); line-height: .98; }
.login-message p { color: #c5d8ed; }
.login-features span { color: #d5e5f7; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); }
.login-form-panel {
    padding: clamp(22px, 4vw, 56px);
    background:
        radial-gradient(circle at 100% 0, rgba(126, 168, 221, .3), transparent 38%),
        linear-gradient(145deg, #f7f9fc, #e9eff7);
}
.login-card {
    width: min(480px, 100%);
    gap: 18px;
    padding: clamp(27px, 4vw, 45px);
    border-color: #d1ddec;
    border-radius: 24px;
    box-shadow: 0 28px 70px rgba(9, 40, 82, .17);
}
.login-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.login-card-heading img { width: 106px; height: 40px; object-fit: contain; object-position: left center; }
.security-badge { padding: 7px 9px; color: #0b4b9f; font-size: 8px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; background: #e7f0ff; border-radius: 999px; }
.login-card > div:nth-of-type(2) { display: grid; gap: 7px; }
.login-card h2 { margin: 0; font: 700 32px/1.05 var(--font-display); letter-spacing: -.035em; }
.login-card div > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

@media (min-width: 1800px) {
    :root { --sidebar: 320px; }
    .app-content { padding-right: 54px; padding-left: 54px; }
    .metric-card { min-height: 158px; }
    .form-workspace { grid-template-columns: 300px minmax(0, 1fr); }
    .entry-table { min-width: 1140px; }
}

@media (max-width: 1360px) {
    .topbar-user-copy strong, .topbar-user-copy small { max-width: 120px; }
    .context-chip { display: none; }
}

@media (max-width: 1180px) {
    .topbar-user > span.user-avatar { display: grid; }
    .topbar-user > span.topbar-user-copy { display: none; }
    .topbar-user { padding-right: 5px; }
}

@media (max-width: 1024px) {
    :root { --topbar: 74px; }
    body.sidebar-open { overflow: hidden; }
    .app-sidebar {
        width: min(318px, 88vw);
        transform: translateX(-105%);
        transition: transform .24s ease;
        box-shadow: 22px 0 60px rgba(4,20,44,.3);
    }
    .app-sidebar.is-open { transform: translateX(0); }
    .app-workspace { margin-left: 0; }
    .sidebar-scrim {
        position: fixed;
        inset: 0;
        z-index: 35;
        display: block;
        pointer-events: none;
        opacity: 0;
        background: rgba(4, 20, 43, .55);
        border: 0;
        backdrop-filter: blur(3px);
        transition: opacity .2s ease;
    }
    body.sidebar-open .sidebar-scrim { pointer-events: auto; opacity: 1; }
    .menu-toggle {
        width: 42px;
        min-height: 42px;
        display: grid;
        flex: 0 0 auto;
        place-items: center;
        padding: 0;
        color: #0a3d83;
        background: #edf3fc;
        border: 1px solid #c9d8eb;
        border-radius: 12px;
    }
    .topbar-mobile-logo { display: block; }
    .app-topbar { padding: 0 18px; }
    .app-content { padding: 22px 18px 42px; }
    .form-hero { grid-template-columns: 1fr; }
    .progress-card { justify-content: flex-start; }
    .form-workspace { display: block; }
    .form-index { position: sticky; top: calc(var(--topbar) + 7px); z-index: 15; width: 100%; height: auto; margin-bottom: 12px; padding: 10px; border-radius: 15px; }
    .form-index-scroll { display: flex; align-items: center; gap: 10px; overflow-x: auto; overflow-y: hidden; }
    .form-index-scroll > .eyebrow { flex: 0 0 auto; }
    .form-index nav { display: flex; flex: 0 0 auto; margin: 0; }
    .form-index a { flex: 0 0 auto; min-width: 145px; background: #f1f5fb; }
    .form-index a span { max-width: 110px; }
    .actor-bar { align-items: flex-start; flex-direction: column; }
    .actor-bar > div { grid-template-columns: 1fr; }
    .actor-bar .btn-secondary { width: 100%; }
}

@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-brand-panel { min-height: 39vh; gap: 38px; padding: 28px; }
    .login-message h1 { font-size: clamp(38px, 8vw, 58px); }
    .login-features { display: none; }
}

@media (max-width: 720px) {
    .app-topbar { gap: 10px; padding: 0 12px; }
    .topbar-mobile-logo { width: 78px; }
    .topbar-context { min-width: 0; }
    .topbar-context .eyebrow { display: none; }
    .topbar-context strong { max-width: 180px; font-size: 15px; }
    .logout-button { width: 42px; padding: 0; }
    .logout-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .app-content { padding: 19px 13px 38px; }
    .page-heading { align-items: stretch; flex-direction: column; }
    .page-heading .btn-primary { width: 100%; }
    .page-heading p, .form-hero p { font-size: 13px; }
    .panel { border-radius: 19px; }
}

@media (max-width: 560px) {
    .topbar-user { display: none; }
    .topbar-context strong { max-width: 125px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-card { min-height: 116px; padding: 15px; }
    .metric-card::after { left: 15px; }
    .metric-card strong { font-size: 29px; }
    .login-brand-panel { min-height: 31vh; gap: 24px; padding: 22px; }
    .login-brand-line img { width: 155px; }
    .login-brand-line span { font-size: 13px; }
    .login-message h1 { margin-bottom: 0; font-size: 32px; }
    .login-message p { display: none; }
    .login-form-panel { padding: 12px; }
    .login-card { padding: 22px 18px; border-radius: 19px; }
    .login-card-heading img { width: 92px; }
    .security-badge { font-size: 7px; }
}

@media (max-width: 430px) {
    .topbar-mobile-logo { width: 67px; }
    .topbar-context strong { max-width: 105px; font-size: 14px; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-card { min-height: 102px; }
    .page-heading h1, .form-hero h1 { font-size: 29px; }
    .login-card-heading { gap: 10px; }
}

@media (max-width: 1024px) {
    .order-folder > summary { grid-template-columns: 42px minmax(0,1fr) auto; }
    .order-folder > summary .folder-stats { display: none; }
}

@media (max-width: 640px) {
    .order-folder > summary { grid-template-columns: 36px minmax(0,1fr); gap: 11px; padding: 15px; }
    .folder-icon { width: 34px; height: 28px; }
    .order-folder > summary > .status-pill { grid-column: 2; justify-self: start; }
    .serial-folder-grid { grid-template-columns: minmax(0,1fr); padding: 10px; }
    .serial-folder { padding: 14px; }
    .serial-folder > header { display: grid; }
    .explorer-format-actions { grid-template-columns: minmax(0,1fr); }
    .serial-document { align-items: flex-start; flex-direction: column; }
    .version-history article { align-items: stretch; flex-direction: column; }
    .version-history article > div .btn-small { flex: 1; }
}

@media (max-height: 680px) and (min-width: 1025px) {
    .brand-block { min-height: 145px; padding-top: 18px; padding-bottom: 16px; }
    .brand-logo { width: 164px; max-height: 60px; }
    .sidebar-note { display: none; }
    .nav-link { min-height: 58px; }
}

/* Form workspace controls */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.form-index-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 6px; }
.form-index-toggle { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; color: var(--blue-700); background: #edf4ff; border: 1px solid #c8d9ee; border-radius: 10px; cursor: pointer; }
.form-index-toggle > span[aria-hidden] { font-size: 26px; line-height: 1; transition: transform .18s ease; }
.form-workspace.is-index-collapsed { grid-template-columns: 56px minmax(0, 1fr); }
.form-workspace.is-index-collapsed .form-index { padding: 11px; }
.form-workspace.is-index-collapsed .form-index-heading { justify-content: center; padding: 0; }
.form-workspace.is-index-collapsed .form-index-heading > .eyebrow,
.form-workspace.is-index-collapsed .form-index-scroll { display: none; }
.form-workspace.is-index-collapsed .form-index-toggle > span[aria-hidden] { transform: rotate(180deg); }
.check-button:not(.is-checked) span { color: #7894b5; opacity: .55; }
.check-button.is-checked span { color: #fff; opacity: 1; }
.check-button.is-saving { cursor: wait; opacity: .65; }
.check-button.is-saving span { animation: check-saving .7s linear infinite; }
.is-hidden { display: none !important; }
.collaborator-picker { position: relative; display: block; }
.collaborator-picker > input[type="search"] { width: 100%; padding-right: 42px; color: var(--ink); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230f4fb3' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat right 14px center; }
.collaborator-results { position: absolute; z-index: 80; top: calc(100% + 7px); left: 0; right: 0; max-height: 280px; display: none; overflow-y: auto; padding: 7px; background: #fff; border: 1px solid #bfd1e8; border-radius: 14px; box-shadow: 0 20px 45px rgba(8,43,87,.2); }
.collaborator-results.is-open { display: grid; gap: 4px; }
.collaborator-results button { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 12px; color: var(--ink); text-align: left; background: #f7faff; border: 1px solid transparent; border-radius: 10px; cursor: pointer; }
.collaborator-results button:hover,
.collaborator-results button:focus-visible { color: var(--navy-900); background: var(--blue-100); border-color: #b9cfea; outline: none; }
.collaborator-results button strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.collaborator-results button small { flex: 0 0 auto; padding: 4px 8px; color: #fff; font-size: 9px; font-weight: 800; background: var(--blue-700); border-radius: 999px; }
.collaborator-results button[hidden] { display: none; }
.collaborator-empty { padding: 18px 12px; color: var(--muted); font-size: 11px; text-align: center; }
.collaborator-empty[hidden] { display: none; }
.actor-bar { position: relative; z-index: 2; top: auto; margin-bottom: 20px; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 14px 32px rgba(8,43,87,.2); }
.actor-bar + .form-workspace { margin-top: 0; }
.actor-bar strong { font-size: 17px; }
.inline-save-status { min-height: 16px; display: block; color: var(--green); font-size: 9px; font-weight: 800; text-align: right; }
.detail-form.is-saving { opacity: .82; }
.entry-evidence-links { display: grid; gap: 6px; }
.entry-evidence-links:empty { display: none; }

@media (min-width: 901px) {
    .form-workspace { height: min(760px, calc(100dvh - var(--topbar) - 130px)); min-height: 440px; align-items: stretch; }
    .form-index { position: relative; top: auto; height: 100%; }
    .form-index-scroll { height: calc(100% - 46px); padding-top: 4px; overflow-y: auto; }
    .form-sections { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 2px 10px 28px 2px; scrollbar-gutter: stable; scrollbar-color: #aac0d9 transparent; scrollbar-width: thin; }
    .form-sections::-webkit-scrollbar { width: 10px; }
    .form-sections::-webkit-scrollbar-thumb { background: #aac0d9; border: 2px solid transparent; border-radius: 999px; background-clip: padding-box; }
}

@media (max-width: 900px) {
    .actor-bar { position: relative; top: auto; margin-bottom: 16px; }
    .actor-bar + .form-workspace { height: auto; min-height: 0; margin-top: 0; }
}
@keyframes check-saving { to { transform: rotate(360deg); } }
.entry-detail details { width: 100%; }
.entry-detail details > summary { min-height: 52px; display: grid; align-content: center; gap: 5px; padding: 8px 10px; list-style: none; background: #f1f6fd; border: 1px solid #d4e1f0; border-radius: 10px; }
.entry-detail details > summary::-webkit-details-marker { display: none; }
.entry-detail details > summary span:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); font-size: 10px; }
.entry-detail details > summary b { min-width: 25px; padding: 3px 7px; color: #fff; text-align: center; background: var(--blue-700); border-radius: 999px; }
.entry-detail details > summary span:last-child { color: var(--blue-700); font-size: 10px; font-weight: 800; }
.entry-detail details[open] > summary { background: #e7f0ff; border-color: #aec7e8; }
.entry-options { min-width: 260px; }

@media (min-width: 901px) {
    .entry-header, .entry-row { grid-template-columns: 82px minmax(360px, 2.2fr) minmax(190px, .8fr) minmax(190px, .72fr); }
    .entry-table.is-torque .entry-header, .entry-table.is-torque .entry-row { grid-template-columns: 82px minmax(330px, 1.8fr) 190px minmax(190px, .8fr) minmax(190px, .72fr); }
}

@media (max-width: 900px) {
    .form-index-heading { flex: 0 0 auto; }
    .form-index-scroll { flex: 1 1 auto; }
    .form-workspace.is-index-collapsed .form-index { width: 56px; }
    .form-workspace.is-index-collapsed .form-index-scroll { display: none; }
}

/* Checklist operator handoff */
.actor-bar[data-actor-bar] { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(340px, 1.35fr) auto; align-items: center; gap: 18px; padding: 16px 18px; }
.actor-bar .active-actor-summary { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; align-items: center; padding-right: 18px; border-right: 1px solid rgba(255,255,255,.18); }
.active-actor-summary .eyebrow { grid-column: 1 / -1; }
.active-actor-summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-actor-summary small { color: #bed1df; line-height: 1.4; }
.actor-participants { min-width: 0; display: grid; gap: 7px; }
.actor-participants-label { color: #a9c9e5; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.actor-chip-list { min-width: 0; display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 2px 3px 5px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent; }
.actor-chip { min-width: 145px; max-width: 205px; flex: 0 0 auto; display: flex; align-items: center; gap: 9px; padding: 7px 10px 7px 7px; color: #dbe9f7; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; }
.actor-chip > i { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; color: #dcecff; font: normal 700 9px/1 var(--font-display); background: rgba(255,255,255,.12); border-radius: 9px; }
.actor-chip > span { min-width: 0; display: grid; gap: 2px; }
.actor-chip strong, .actor-chip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actor-chip strong { font-size: 10px; }
.actor-chip small { color: #9fb9d3; font-size: 8px; }
.actor-chip.is-active { color: #fff; background: rgba(29, 177, 128, .2); border-color: rgba(110, 231, 190, .5); box-shadow: inset 0 0 0 1px rgba(110,231,190,.08); }
.actor-chip.is-active > i { color: #063e31; background: #75e3bc; }
.actor-chip.is-active small { color: #9df0d2; }
.actor-add-button { min-height: 48px; display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 8px; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.27); border-radius: 13px; cursor: pointer; transition: .16s ease; }
.actor-add-button > span { width: 32px; height: 32px; display: grid; place-items: center; color: #0a3d83; font: 700 22px/1 var(--font-display); background: #fff; border-radius: 9px; }
.actor-add-button strong { font-size: 10px; white-space: nowrap; }
.actor-add-button:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.42); transform: translateY(-1px); }

@media (max-width: 1180px) {
    .actor-bar[data-actor-bar] { grid-template-columns: minmax(250px, .8fr) minmax(300px, 1.2fr); }
    .actor-add-button { grid-column: 1 / -1; justify-self: end; margin-top: -4px; }
}

@media (max-width: 760px) {
    .actor-bar[data-actor-bar] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .actor-bar .active-actor-summary { grid-template-columns: 1fr; padding: 0 0 13px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
    .actor-chip-list { width: 100%; }
    .actor-add-button { grid-column: auto; width: 100%; justify-content: center; margin: 0; }
}

/* Multiple operator marks per checklist item */
.entry-owner { align-content: start; }
.entry-actor-list { display: grid; gap: 6px; }
.entry-actor-badge { min-width: 0; display: grid; gap: 2px; padding: 7px 9px; background: #f2f6fb; border: 1px solid #d4e0ed; border-radius: 9px; }
.entry-actor-badge strong { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.entry-actor-badge small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.entry-actor-badge.is-current { background: #e5f7f0; border-color: #a9ddc9; box-shadow: inset 3px 0 0 #109268; }
.entry-actor-badge.is-current strong { color: #08664b; }
.entry-actor-empty { color: var(--muted); font-size: 10px; font-weight: 700; }

/* Tool preoperationals and maintenance */
.tool-page-heading { margin-bottom: 18px; }
.tool-heading-actions { display: flex; gap: 10px; }
.tool-metrics { margin-bottom: 18px; }
.tool-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; padding: 5px; background: #e7eef7; border: 1px solid #cfdaea; border-radius: 15px; }
.tool-tabs a { flex: 1 0 auto; padding: 11px 16px; color: #536a83; font-size: 11px; font-weight: 800; text-align: center; border-radius: 11px; }
.tool-tabs a.is-active { color: #fff; background: linear-gradient(120deg,#0a3d83,#1764bc); box-shadow: 0 7px 18px rgba(10,61,131,.2); }
.tool-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.tool-asset-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid #d3dfeb; border-radius: 18px; box-shadow: 0 10px 25px rgba(13,46,82,.07); }
.tool-asset-card header { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 17px; background: linear-gradient(145deg,#f7fbff,#edf4fb); border-bottom: 1px solid #dce6f0; }
.tool-icon { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; font-size: 21px; background: #0f56ae; border-radius: 12px; }
.tool-asset-card h2 { margin: 2px 0 0; font: 700 15px/1.2 var(--font-display); }
.tool-asset-card header small { color: var(--muted); font-size: 9px; }
.tool-state { padding: 5px 8px; color: #087756; font-size: 8px; font-weight: 900; background: #dff5ed; border-radius: 999px; }
.tool-state.is-out_of_service { color: #a53e3e; background: #ffe6e4; }
.tool-state.is-operational_observations { color: #8a6300; background: #fff0c8; }
.tool-asset-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; padding: 16px; }
.tool-asset-card dl div { min-width: 0; }
.tool-asset-card dt,.tool-asset-card footer small { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.tool-asset-card dd { overflow: hidden; margin: 4px 0 0; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.tool-asset-card footer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 13px 16px; background: #f8fafc; border-top: 1px solid #e1e8f0; }
.tool-asset-card footer span { display: grid; gap: 3px; }
.tool-asset-card footer strong { font-size: 9px; }
.tool-form-panel { max-width: 1080px; margin: 0 auto; }
.tool-record-form { display: grid; gap: 18px; }
.tool-record-form > label,.tool-record-form .form-grid > label { display: grid; gap: 7px; color: var(--ink); font-size: 11px; font-weight: 800; }
.tool-record-form textarea { resize: vertical; }
.tool-checklist-empty { padding: 36px; color: var(--muted); text-align: center; background: #f5f8fb; border: 1px dashed #bdcad8; border-radius: 15px; }
.tool-checklist-empty p { margin: 5px 0 0; font-size: 10px; }
.tool-checklist section { overflow: hidden; border: 1px solid #d1deeb; border-radius: 16px; }
.tool-checklist section > header { padding: 15px 17px; color: #fff; background: linear-gradient(120deg,#0a3d83,#1359aa); }
.tool-checklist h3 { margin: 3px 0 0; font: 700 17px/1.2 var(--font-display); }
.tool-checklist article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; background: #fff; border-bottom: 1px solid #dde6ef; }
.tool-checklist article:last-child { border-bottom: 0; }
.tool-checklist article > div:first-child { display: grid; gap: 7px; }
.tool-checklist article strong { font-size: 11px; }
.tool-checklist article input[type="text"] { min-height: 36px; font-size: 9px; }
.tool-result-options { display: flex; gap: 6px; }
.tool-result-options label { display: flex; align-items: center; gap: 5px; padding: 8px; font-size: 9px; font-weight: 800; background: #f0f5fa; border: 1px solid #d4dfeb; border-radius: 9px; cursor: pointer; }
.tool-result-options input { accent-color: #0f56ae; }
.tool-upload-zone { padding: 18px; background: #f2f7fd; border: 1px dashed #9fb9d5; border-radius: 14px; }
.tool-upload-zone input { margin: 8px 0; }
.tool-upload-zone span { color: #0f56ae; font-size: 10px; }
@media(max-width:1100px){.tool-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.tool-checklist article{grid-template-columns:1fr}.tool-result-options{flex-wrap:wrap}}
@media(max-width:650px){.tool-heading-actions{flex-direction:column}.tool-card-grid{grid-template-columns:1fr}.tool-result-options{display:grid;grid-template-columns:1fr}.tool-tabs a{min-width:130px}}
.tool-history-details { display: grid; gap: 10px; margin-top: 18px; }
.tool-history-record { padding: 0; overflow: hidden; }
.tool-history-record > summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 18px; cursor: pointer; list-style: none; }
.tool-history-record > summary::-webkit-details-marker { display: none; }
.tool-history-record > summary > span:first-child { min-width: 0; display: grid; gap: 4px; }
.tool-history-record > summary strong { font-size: 12px; }
.tool-history-record > summary small { color: var(--muted); font-size: 9px; }
.tool-history-record > div { padding: 17px 18px; background: #f7faff; border-top: 1px solid #dae5ef; }
.tool-answer-list { display: grid; gap: 6px; }
.tool-answer-list article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 9px 11px; background: #fff; border: 1px solid #dce5ee; border-radius: 9px; }
.tool-answer-list span,.tool-answer-list strong { font-size: 9px; }
.tool-answer-list small { grid-column: 1/-1; color: var(--muted); }
.tool-file-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }

/* Shared inspection agenda */
.inspection-metric-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.inspection-filter-bar { grid-template-columns: minmax(260px, 1fr) minmax(190px, .45fr) auto auto; }
.inspection-board { display: grid; gap: 16px; margin-top: 20px; }
.inspection-assignment { display: grid; grid-template-columns: 98px minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; border-left: 4px solid var(--blue-700); }
.inspection-assignment.is-overdue { border-left-color: #c07111; }
.inspection-assignment-date { min-height: 100%; display: grid; align-content: center; justify-items: center; padding: 22px 12px; color: var(--navy-900); text-align: center; background: linear-gradient(155deg, #e6f0ff, #f7faff); }
.inspection-assignment-date strong { font: 700 clamp(34px, 4vw, 48px)/.9 var(--font-display); }
.inspection-assignment-date span { margin-top: 8px; color: var(--blue-700); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.inspection-assignment-date small { margin-top: 10px; font-weight: 800; }
.inspection-assignment-content { min-width: 0; display: grid; gap: 15px; padding: 23px; }
.inspection-assignment-content > header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.inspection-assignment-content h2 { margin: 6px 0 0; color: var(--navy-900); font: 700 20px/1.25 var(--font-display); overflow-wrap: anywhere; }
.inspection-context-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.inspection-context-grid > span { min-width: 0; display: grid; gap: 4px; padding: 11px 12px; background: #f5f8fc; border: 1px solid #dce6f1; border-radius: 12px; overflow-wrap: anywhere; }
.inspection-context-grid small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.inspection-context-grid strong { color: var(--ink); font-size: 11px; }
.inspection-notes { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.inspection-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 9px; }
.inspection-actions form, .inspection-actions details, .inspection-actions summary { margin: 0; }
.inspection-actions summary { list-style: none; cursor: pointer; }
.inspection-actions summary::-webkit-details-marker { display: none; }
.inspection-reschedule form { width: min(440px, 74vw); display: grid; gap: 10px; padding: 13px; margin-top: 8px; background: #fffaf2; border: 1px solid #ecd2aa; border-radius: 13px; }
.inspection-reschedule label { display: grid; gap: 6px; color: var(--ink); font-size: 10px; font-weight: 800; }
.inspection-reschedule textarea { width: 100%; min-height: 82px; resize: vertical; }
.inspection-history { width: min(520px, 76vw); max-height: 270px; display: grid; gap: 8px; padding: 12px; margin-top: 8px; overflow: auto; background: #f7faff; border: 1px solid #d6e2f0; border-radius: 13px; }
.inspection-history article { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(130px, 1fr) auto; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid #e0e8f1; }
.inspection-history article:last-child { padding-bottom: 0; border-bottom: 0; }
.inspection-history article strong, .inspection-history article span, .inspection-history article small { font-size: 9px; }
.inspection-history article p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; }

@media (max-width: 1360px) {
    .inspection-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .inspection-context-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .inspection-metric-grid, .inspection-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inspection-assignment { grid-template-columns: minmax(0, 1fr); }
    .inspection-assignment-date { min-height: 0; grid-template-columns: auto auto auto; justify-content: start; gap: 8px; padding: 12px 16px; }
    .inspection-assignment-date strong, .inspection-assignment-date span, .inspection-assignment-date small { align-self: baseline; margin: 0; }
    .inspection-assignment-date strong { font-size: 24px; }
    .inspection-assignment-content { padding: 17px 15px; }
}

@media (max-width: 520px) {
    .inspection-metric-grid, .inspection-filter-bar, .inspection-context-grid { grid-template-columns: minmax(0, 1fr); }
    .inspection-history article { grid-template-columns: minmax(0, 1fr); }
}

/* Explicit route states and responsive operational modules */
.route-state { min-height: min(520px, 62vh); display: flex; align-items: center; justify-content: center; gap: 22px; text-align: left; }
.route-state-icon { width: 68px; height: 68px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; font: 700 30px/1 var(--font-display); background: linear-gradient(145deg, #0d4b9d, #1d71ca); border-radius: 20px; box-shadow: 0 14px 32px rgba(12, 72, 151, .2); }
.route-state h1 { margin: 7px 0 8px; font-size: clamp(24px, 4vw, 38px); }
.route-state p { max-width: 620px; margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.executive-metrics { grid-template-columns: repeat(6, minmax(135px, 1fr)); }
.executive-alert { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 13px 16px; color: #684b12; background: #fff7e4; border: 1px solid #ecd49a; border-radius: 14px; }
.executive-alert > span { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; font-weight: 900; background: #c17b0b; border-radius: 10px; }
.executive-alert > div { min-width: 0; display: grid; gap: 2px; }
.executive-alert small { font-size: 12px; }
.executive-alert a { margin-left: auto; color: #845d0d; font-size: 12px; font-weight: 900; }
.operation-hub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.operation-card { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: center; padding: 16px; color: var(--ink); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.operation-card:hover { border-color: #91b7df; box-shadow: 0 12px 26px rgba(15, 65, 119, .1); transform: translateY(-2px); }
.operation-card-index { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 900; background: linear-gradient(145deg, #0b438c, #1967b9); border-radius: 12px; }
.operation-card > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.operation-card small { color: var(--blue-700); font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.operation-card strong { font-size: 15px; }
.operation-card em { color: var(--muted); font-size: 12px; font-style: normal; }
.operation-card b { grid-column: 2; color: var(--blue-700); font-size: 12px; }

.tool-metrics { grid-template-columns: repeat(5, minmax(145px, 1fr)); }
.tool-attention { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 18px 20px; background: #fff8e9; border: 1px solid #ecd7a5; border-left: 5px solid #d08b15; border-radius: 16px; }
.tool-attention > div { min-width: 0; display: flex; align-items: center; gap: 13px; }
.tool-attention > div > span:last-child { display: grid; gap: 3px; }
.tool-attention small { color: #745823; font-size: 13px; }
.tool-attention-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; font-weight: 900; background: #c67b0a; border-radius: 12px; }
.tool-overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .65fr); gap: 18px; align-items: start; }
.tool-type-panel { min-width: 0; }
.tool-type-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tool-type-list > a { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; color: var(--ink); background: #f7faff; border: 1px solid #dbe6f1; border-radius: 13px; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.tool-type-list > a:hover { border-color: #8fb5df; box-shadow: 0 8px 18px rgba(23, 75, 130, .08); transform: translateY(-1px); }
.tool-type-list > a > span:first-child { min-width: 0; display: grid; gap: 4px; }
.tool-type-list strong { overflow-wrap: anywhere; font-size: 14px; }
.tool-type-list small { color: var(--muted); font-size: 12px; }
.tool-type-counts { flex: 0 0 auto; display: grid; justify-items: end; gap: 4px; }
.tool-type-counts em { padding: 4px 7px; color: #806018; font-size: 11px; font-style: normal; font-weight: 800; background: #fff2cc; border-radius: 999px; }
.tool-type-counts em.is-danger { color: #a33636; background: #ffe5e3; }
.tool-quick-actions { display: grid; gap: 18px; }
.tool-quick-actions .panel { display: grid; gap: 10px; }
.tool-quick-actions h2 { margin: 0; font-size: 20px; }
.tool-quick-actions p { margin: 0 0 5px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.tool-inventory-filter { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; }
.tool-result-summary { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.tool-result-summary strong { color: var(--ink); font-size: 15px; }
.tool-asset-card header small, .tool-asset-card dt, .tool-card-dates small { font-size: 11px; }
.tool-asset-card h2 { font-size: 16px; }
.tool-state { max-width: 150px; padding: 6px 9px; font-size: 11px; line-height: 1.25; text-align: center; }
.tool-asset-card dd { font-size: 13px; }
.tool-card-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 13px 16px; background: #f8fafc; border-top: 1px solid #e1e8f0; }
.tool-card-dates span { display: grid; gap: 4px; }
.tool-card-dates strong { font-size: 12px; }
.tool-asset-card footer { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-asset-card footer .btn-small { flex: 1 1 120px; min-height: 40px; justify-content: center; }
.tool-selection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-record-form > label, .tool-record-form .form-grid > label { font-size: 14px; }
.tool-checklist-empty p { font-size: 13px; }
.tool-checklist section > header small { display: block; margin-top: 6px; color: #dceaff; font-size: 12px; }
.tool-checklist article strong { font-size: 14px; line-height: 1.45; }
.tool-checklist article input[type="text"] { min-height: 42px; font-size: 13px; }
.tool-result-options { min-width: 305px; margin: 0; padding: 0; border: 0; }
.tool-result-options legend { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tool-result-options label { min-height: 42px; padding: 9px 11px; font-size: 12px; }
.tool-result-options input { width: 18px; height: 18px; }
.tool-upload-zone { min-height: 118px; align-content: center; }
.tool-upload-zone small, .tool-upload-zone span { font-size: 12px; }
.tool-form-actions { position: sticky; bottom: 10px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 15px; background: rgba(255,255,255,.96); border: 1px solid #d5e1ed; border-radius: 14px; box-shadow: 0 10px 26px rgba(17, 54, 95, .12); backdrop-filter: blur(8px); }
.tool-form-actions small { max-width: 620px; color: var(--muted); font-size: 12px; }
.tool-profile-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; margin-bottom: 18px; padding: 20px; background: linear-gradient(130deg, #07397d, #125db0); border-radius: 18px; box-shadow: 0 14px 32px rgba(8, 57, 125, .18); color: #fff; }
.tool-profile-header > div:first-child { min-width: 0; display: flex; align-items: center; gap: 13px; }
.tool-profile-header > div:first-child > span:last-child { min-width: 0; display: grid; gap: 3px; }
.tool-profile-header > div:first-child small { color: #bcd8f6; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.tool-profile-header > div:first-child strong { font: 700 21px/1.2 var(--font-display); overflow-wrap: anywhere; }
.tool-profile-header > div:first-child em { color: #d9e9fb; font-size: 12px; font-style: normal; overflow-wrap: anywhere; }
.tool-profile-header .tool-state { align-self: start; }
.tool-profile-header dl { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.tool-profile-header dl div { padding: 11px 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 11px; }
.tool-profile-header dt { color: #bed8f5; font-size: 11px; }
.tool-profile-header dd { margin: 4px 0 0; font-size: 14px; font-weight: 800; }
.tool-profile-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.tool-profile-header .btn-quiet { color: #fff; border-color: rgba(255,255,255,.35); }
.tool-history-intro { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.tool-history-intro h2 { margin: 4px 0; }
.tool-history-intro p { margin: 0; color: var(--muted); font-size: 14px; }
.tool-history-timeline { display: grid; gap: 11px; }
.tool-history-record > summary { display: grid; grid-template-columns: 42px minmax(0, 1fr) minmax(145px, auto) auto; }
.tool-history-record > summary > span:nth-child(2), .tool-history-meta { min-width: 0; display: grid; gap: 4px; }
.tool-history-record > summary strong { font-size: 14px; }
.tool-history-record > summary small { font-size: 12px; }
.tool-history-meta { text-align: right; }
.tool-timeline-marker { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; font-weight: 900; background: #128e68; border-radius: 12px; }
.tool-timeline-marker.is-maintenance { background: #155eaf; }
.tool-history-body { display: grid; gap: 14px; }
.tool-record-facts { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-record-facts span { display: grid; gap: 3px; padding: 10px 12px; background: #eef5fc; border: 1px solid #d5e3f1; border-radius: 10px; }
.tool-record-facts small { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.tool-record-facts strong { font-size: 13px; }
.tool-answer-list article { padding: 11px 13px; }
.tool-answer-list article.is-fail { border-left: 4px solid #c44747; background: #fff8f7; }
.tool-answer-list span, .tool-answer-list strong { font-size: 13px; }
.tool-answer-list small { font-size: 12px; }
.tool-maintenance-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .25fr); gap: 12px; }
.tool-maintenance-detail span, .tool-observation { padding: 13px; background: #fff; border: 1px solid #dce5ee; border-radius: 11px; }
.tool-maintenance-detail small { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.tool-maintenance-detail p, .tool-observation p { margin: 5px 0 0; font-size: 14px; line-height: 1.55; }
.tool-file-links > strong { font-size: 13px; }

.inspection-filter-bar { display: grid; align-items: end; }
.inspection-result-summary { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.inspection-result-summary strong { color: var(--ink); font-size: 14px; }
.inspection-context-grid small { font-size: 11px; }
.inspection-context-grid strong { font-size: 14px; }
.inspection-reschedule label { font-size: 13px; }
.inspection-history article strong, .inspection-history article span, .inspection-history article small { font-size: 12px; }
.inspection-history article p { font-size: 12px; }

@media (max-width: 1280px) {
    .executive-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tool-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tool-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-selection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-selection-grid > label:last-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    .operation-hub { grid-template-columns: minmax(0, 1fr); }
    .tool-overview-grid { grid-template-columns: minmax(0, 1fr); }
    .tool-type-list { grid-template-columns: minmax(0, 1fr); }
    .tool-checklist article { grid-template-columns: minmax(0, 1fr); }
    .tool-result-options { min-width: 0; flex-wrap: wrap; }
}

@media (max-width: 680px) {
    .route-state { min-height: 55vh; flex-direction: column; text-align: center; }
    .tool-page-heading, .tool-heading-actions, .tool-attention, .tool-history-intro { align-items: stretch; flex-direction: column; }
    .tool-heading-actions a, .tool-attention > a, .tool-history-intro > a { width: 100%; justify-content: center; }
    .executive-metrics, .tool-metrics, .tool-card-grid, .tool-selection-grid, .tool-profile-header dl, .tool-maintenance-detail, .tool-inventory-filter { grid-template-columns: minmax(0, 1fr); }
    .executive-alert { align-items: flex-start; flex-wrap: wrap; }
    .executive-alert a { width: 100%; margin-left: 46px; }
    .tool-selection-grid > label:last-child { grid-column: auto; }
    .tool-tabs a { min-width: 145px; min-height: 44px; display: grid; place-items: center; font-size: 13px; }
    .tool-asset-card header { grid-template-columns: 42px minmax(0, 1fr); }
    .tool-asset-card header .tool-state { grid-column: 1 / -1; max-width: none; }
    .tool-asset-card dl, .tool-card-dates { grid-template-columns: minmax(0, 1fr); }
    .tool-result-options { display: grid; grid-template-columns: minmax(0, 1fr); }
    .tool-result-options label { width: 100%; }
    .tool-form-actions { position: static; align-items: stretch; flex-direction: column; }
    .tool-form-actions .btn-primary { width: 100%; justify-content: center; }
    .tool-profile-header { grid-template-columns: minmax(0, 1fr); }
    .tool-profile-header .tool-state { justify-self: stretch; max-width: none; }
    .tool-profile-actions { justify-content: stretch; }
    .tool-profile-actions a { width: 100%; justify-content: center; }
    .tool-history-record > summary { grid-template-columns: 38px minmax(0, 1fr); }
    .tool-history-meta, .tool-history-record > summary .status-pill { grid-column: 2; justify-self: start; text-align: left; }
    .tool-history-record > summary .status-pill { max-width: 100%; }
}

.metal-brand { display:grid; grid-template-columns:minmax(0,300px) minmax(0,1fr); align-items:center; gap:28px; padding:22px 26px; margin-bottom:22px; border:1px solid #d4e2dc; border-radius:18px; background:#fff; box-shadow:0 6px 24px rgba(17,45,66,.05); }
.metal-brand__image { min-width:0; }
.metal-brand .metal-brand-logo { display:block; width:100%; max-width:300px; height:auto; margin:0; object-fit:contain; aspect-ratio:3522 / 891; }
.metal-brand__caption { min-width:0; display:grid; gap:6px; padding-left:26px; border-left:1px solid #dce7e1; }
.metal-brand__area { color:#247438; font-size:11px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; }
.metal-brand__caption strong { color:#20336f; font-size:clamp(17px,1.7vw,23px); line-height:1.3; overflow-wrap:anywhere; }
.metal-brand__code { color:#607081; font-size:12px; line-height:1.5; }
.metal-brand__fallback { color:#293985; font-size:32px; font-weight:800; }
.metal-brand__fallback span { color:#24812f; }
.app-dialog { max-height:calc(100dvh - 32px); max-width:calc(100vw - 24px); overflow-y:auto; overscroll-behavior:contain; }
.dialog-card { min-width:0; }
.collaborator-results[popover] { margin:0; padding:7px; inset:auto; box-sizing:border-box; overscroll-behavior:contain; }
.collaborator-results button strong { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; line-height:1.4; font-size:13px; }
.collaborator-results button.is-active { background:#e3effe; border-color:#95b9e9; }
.collaborator-results button small { font-size:11px; }
.collaborator-picker > input { min-height:44px; }
.tracking-order-settings { grid-column:1/-1; display:flex; align-items:end; flex-wrap:wrap; gap:12px; padding:16px; background:#f1f6fc; border:1px solid #d3deec; border-radius:14px; }
.tracking-order-settings label { flex:1 1 200px; max-width:320px; }
.tracking-order-settings small { flex:1 1 250px; line-height:1.6; }
.tracking-equipment-label { padding:8px 12px; margin:10px 0; color:#173f76; background:#eef4fb; border-radius:8px; font-weight:700; font-size:13px; }
.tracking-equipment-settings { margin:12px 0; }
.tracking-equipment-settings form { display:grid; gap:10px; padding:12px 0; }
.tracking-tabs { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:20px; }
.tracking-tabs a { padding:12px 18px; min-height:44px; border:1px solid #cbd9e9; border-radius:10px; background:#fff; color:#173f76; font-weight:700; }
.tracking-tabs a[aria-current] { background:#124c9b; color:#fff; }
.vsd-metadata { margin-bottom:20px; padding:20px; }
.vsd-metadata form { display:grid; gap:14px; }
.measurement-form { display:grid; gap:8px; margin-top:12px; max-width:340px; }
.measurement-form input { min-width:0; }
.measurement-result { display:block; margin-top:12px; padding:10px; background:#edf5fc; border-radius:8px; }
.serial-document strong,.serial-document small { white-space:normal; overflow-wrap:anywhere; }
.entry-row:has(.entry-detail details[open]) .entry-detail { grid-column:1/-1; }
.entry-options { min-width:0; max-width:100%; }
.entry-actor-badge strong { white-space:normal; overflow-wrap:anywhere; }
.active-actor-summary strong,.actor-chip strong { white-space:normal; overflow:visible; overflow-wrap:anywhere; }
.person-authorization { padding:18px; margin:16px 0; border:1px solid #c7d9f1; border-radius:16px; background:linear-gradient(135deg,#f0f6ff,#fff); min-width:0; }
.person-authorization[hidden] { display:none; }
.person-authorization p,.person-authorization small { color:#526c90; line-height:1.5; }
.person-authorization p { font-size:14px; margin:10px 0; }
.person-authorization > strong { display:block; margin-top:8px; color:#10396c; overflow-wrap:anywhere; }
.person-authorization input { width:100%; min-width:0; letter-spacing:.18em; }
.person-authorization input::placeholder { letter-spacing:normal; }
.personnel-tabs { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:20px; }
.personnel-panel { padding:24px; margin-bottom:20px; min-width:0; }
.personnel-add,.personnel-row { display:grid; grid-template-columns:minmax(120px,1fr) minmax(180px,2fr) auto; gap:16px; align-items:end; }
.personnel-search { display:flex; align-items:end; gap:12px; margin:20px 0; }
.personnel-search label { flex:1; }
.personnel-list { display:grid; gap:12px; }
.personnel-row { grid-template-columns:minmax(120px,1fr) minmax(180px,2fr) minmax(130px,1fr) auto; padding:18px; border:1px solid #d9e4f2; border-radius:14px; background:#f8fbff; }
.personnel-row small { display:block; color:#526c90; overflow-wrap:anywhere; }
.personnel-row input,.personnel-row select,.personnel-add input { width:100%; min-width:0; }
@media(max-width:900px) { .personnel-row,.personnel-add { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } }
@media(max-width:540px) { .personnel-row,.personnel-add { grid-template-columns:minmax(0,1fr); } .personnel-panel { padding:16px; } .personnel-search { align-items:stretch; flex-direction:column; } }
@media(min-width:901px) {
    .form-workspace.is-tracking .entry-table:not(.is-torque) { min-width:0; }
    .form-workspace.is-tracking .entry-table:not(.is-torque) .entry-header,
    .form-workspace.is-tracking .entry-table:not(.is-torque) .entry-row { grid-template-columns:64px minmax(150px,1.6fr) minmax(135px,1fr) minmax(130px,.8fr); }
    .form-workspace.is-tracking .entry-table.is-torque { min-width:0; }
    .form-workspace.is-tracking .entry-table.is-torque .entry-header,
    .form-workspace.is-tracking .entry-table.is-torque .entry-row { grid-template-columns:64px minmax(150px,1.5fr) minmax(105px,.8fr) minmax(135px,1fr) minmax(130px,.8fr); }
}
@media(max-width:600px) { .tracking-order-settings { display:grid; grid-template-columns:minmax(0,1fr); } .tracking-order-settings label { max-width:none; } .vsd-metadata { padding:16px; } }
.metal-format-picker { margin-top:16px; border:1px solid #d5e2d9; border-radius:12px; overflow:hidden; }
.metal-format-picker > summary { padding:14px 16px; cursor:pointer; font-weight:700; color:#253784; background:#eef6f0; }
.metal-format-picker .format-actions { padding:12px; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr)); gap:10px; }
.metal-format-picker .format-action { width:100%; min-width:0; text-align:left; white-space:normal; }
.metal-acceptance { display:grid; gap:6px; border-left:4px solid #258338; padding:14px 18px; background:#f0f7f1; border-radius:8px; }
.metal-acceptance p { margin:8px 0 0; line-height:1.6; }
@media(max-width:600px) {
    .metal-brand { grid-template-columns:minmax(0,1fr); padding:18px; gap:16px; border-radius:14px; margin-bottom:18px; }
    .metal-brand .metal-brand-logo { width:min(100%,260px); }
    .metal-brand__caption { padding:14px 0 0; border-left:0; border-top:1px solid #dce7e1; gap:5px; }
    .metal-brand__area { font-size:10px; }
    .metal-brand__caption strong { font-size:18px; }
}
@media(min-width:901px) {
    .form-workspace.is-metal .entry-table { min-width:0; }
    .form-workspace.is-metal .entry-header,
    .form-workspace.is-metal .entry-row { grid-template-columns:64px minmax(160px,1.6fr) minmax(135px,1fr) minmax(130px,.8fr); }
}
