:root {
  --brand-primary: #213B46;
  --brand-primary-900: #162a31;
  --brand-primary-700: #294b57;
  --brand-primary-200: #c8d5d8;
  --brand-primary-100: #e4ecee;
  --brand-primary-50: #f2f6f7;
  --brand-secondary: #000000;
  --ink: var(--brand-secondary);
  --navy: var(--brand-primary);
  --navy-2: var(--brand-primary-700);
  --muted: #53666b;
  --line: #cbd7da;
  --soft-line: #e3eaec;
  --surface: #ffffff;
  --page: #f2f6f7;
  --locked: #edf2f3;
  --accent: var(--brand-primary);
  --lime: #8ea4aa;
  --danger: #9b3e3e;
}

@font-face { font-family: "NewPanamSkyline"; src: url("/assets/templates/NewPanamSkyline/ttf/NewPanamSkyline-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "NewPanamSkyline"; src: url("/assets/templates/NewPanamSkyline/ttf/NewPanamSkyline-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "NewPanamSkyline"; src: url("/assets/templates/NewPanamSkyline/ttf/NewPanamSkyline-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "NewPanamSkyline"; src: url("/assets/templates/NewPanamSkyline/ttf/NewPanamSkyline-Black.ttf") format("truetype"); font-weight: 900; font-style: normal; font-display: swap; }

* { box-sizing: border-box; }
body { margin: 0; font-family: "NewPanamSkyline", Arial, sans-serif; color: var(--ink); background: var(--page); }
.topbar { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 12px 42px; background: var(--navy); color: #fff; border-bottom: 2px solid var(--lime); }
.brand { display: flex; gap: 16px; align-items: center; }
.brand-logo { width: 210px; height: 58px; object-fit: contain; background: #fff; border-radius: 4px; padding: 7px 10px; }
.brand strong { font-size: 15px; }
.brand span { display: block; color: #dce4ef; font-size: 12px; margin-top: 3px; }
.admin-link { color: #fff; font-weight: 700; text-decoration: none; }
.public-nav { display: flex; align-items: center; margin-left: auto; }
.public-nav a { color: #fff; font-weight: 700; text-decoration: none; }
main { max-width: 1160px; margin: 0 auto; padding: 28px 24px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 32px; letter-spacing: 0; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.stack { display: grid; gap: 14px; }
.grid { display: grid; gap: 14px; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hidden { display: none; }
.work-card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 20px; margin-bottom: 16px; box-shadow: 0 12px 30px rgba(34, 46, 66, .06); }
.lookup-card { max-width: 680px; margin: 24px auto; }
.order-status-card { max-width: 680px; margin: 24px auto 16px; }
.order-status-card h2 { margin-bottom: 8px; }
.public-order-results { display: grid; gap: 8px; max-height: 420px; margin-top: 16px; padding-right: 6px; overflow-y: auto; scrollbar-gutter: stable; }
.public-order-results::-webkit-scrollbar { width: 8px; }
.public-order-results::-webkit-scrollbar-thumb { background: #c2ccda; border-radius: 4px; }
.public-order-results::-webkit-scrollbar-track { background: #f4f6f9; }
.public-order-result { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: #fbfcfe; }
.public-order-result h3 { margin: 0; font-size: 15px; }
.public-order-state { color: #26673a; }
.order-status-empty { margin: 16px 0 0; color: var(--muted); font-weight: 700; }
.work-zone { border: 1px solid var(--soft-line); border-radius: 4px; padding: 14px; background: #fbfcfe; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.section-title h2, .section-title h3 { margin: 0; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: #24324a; }
input, textarea, select { width: 100%; min-height: 38px; padding: 9px 10px; border: 1px solid #b8c5d8; border-radius: 4px; font: inherit; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
input.locked { background: var(--locked); color: #4b5668; cursor: default; font-weight: 800; }
input.invalid-field { outline: 2px solid var(--danger); outline-offset: -2px; background: #fff7f7; }
.field-error { display: block; min-height: 14px; padding: 2px 4px; color: var(--danger); font-size: 11px; line-height: 1.2; }
button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 4px; background: var(--accent); color: white; font-weight: 800; cursor: pointer; }
button.secondary { background: #edf1f6; color: #26344b; border: 1px solid #d1dae8; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--brand-primary-200); outline-offset: 2px; }
button:hover:not(:disabled) { background: var(--brand-primary-900); }
button.secondary:hover:not(:disabled) { background: var(--brand-primary-50); color: var(--brand-primary); border-color: var(--brand-primary); }
button.small { min-height: 30px; padding: 0 10px; font-size: 12px; }
.accessory-colour-control { margin-top: 8px; }
.accessory-colour-control.is-disabled { color: var(--muted); opacity: .55; }
.accessory-colour-control select:disabled { cursor: not-allowed; background: var(--locked); }
fieldset { border: 1px solid var(--line); border-radius: 4px; padding: 12px; }
legend { padding: 0 6px; font-weight: 800; }
.choice-line { display: flex; flex-wrap: wrap; gap: 14px; }
.choice-line label { display: flex; align-items: center; gap: 7px; }
.choice-line input { width: auto; min-height: auto; }
.feedback { color: var(--danger); min-height: 18px; font-weight: 700; }
.feedback a { color: var(--accent); }
.notice-bubble { position: fixed; top: 22px; right: 22px; z-index: 60; width: min(420px, calc(100vw - 32px)); padding: 18px 20px; border: 1px solid #b8c8dd; border-left: 6px solid var(--lime); border-radius: 6px; background: #fff; color: var(--ink); box-shadow: 0 18px 45px rgba(14, 24, 40, .22); transform: translateY(-16px); opacity: 0; transition: opacity .2s ease, transform .2s ease; }
.notice-bubble.visible { transform: translateY(0); opacity: 1; }
.notice-bubble strong { display: block; font-size: 18px; line-height: 1.3; }
.ok-result, .review-result { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 4px; font-style: normal; font-size: 12px; font-weight: 800; }
.ok-result { background: #edf8ef; color: #26673a; }
.review-result { background: #fff1d8; color: #8a5412; }
.mm-note { margin: 8px 12px; color: var(--muted); font-size: 13px; font-weight: 700; }
.validation-panel { display: grid; gap: 4px; padding: 8px 12px; }
.validation-panel:empty { display: none; }
.validation-panel p, .warning { margin: 0; padding: 8px 10px; border-left: 3px solid var(--danger); background: #fff7f7; color: var(--danger); font-weight: 700; }
.validation-panel .warning, .warning { border-left-color: #9a6a1d; background: #fff8e8; color: #7a4e13; }
.intro-copy { max-width: 560px; margin-bottom: 18px; color: var(--muted); line-height: 1.45; }
.note, .muted, small { color: var(--muted); }
.opening-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.opening-card { border: 1px solid var(--line); border-radius: 4px; padding: 10px; cursor: pointer; background: #fff; }
.opening-card:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--lime); }
.opening-card img { width: 100%; height: 132px; object-fit: contain; }
.opening-card input { width: auto; min-height: auto; }
.measure-svg { width: 100%; max-height: 380px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 10px; }
#lines { display: grid; gap: 10px; }
.success-box { padding: 18px; border-left: 4px solid var(--lime); background: #f8faf1; }
.excel-sheet { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 18px; align-items: start; border: 1px solid #202020; padding: 0; background: #fff; }
.sheet-main { min-width: 0; }
.sheet-title { display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 48px; border-bottom: 1px solid #202020; position: relative; }
.sheet-title h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 27px; text-decoration: underline; }
.sheet-title button { position: absolute; right: 10px; top: 8px; }
.sheet-side { display: grid; gap: 14px; padding: 12px; border-left: 1px solid #202020; }
.spring-color-box { text-align: center; border-color: #202020; }
.spring-color-box legend { font-family: Georgia, "Times New Roman", serif; text-transform: uppercase; }
.spring-total { font-size: 22px; text-align: center; }
.pedido-table { width: 100%; }
.pedido-head, .pedido-row { display: grid; grid-template-columns: 52px 62px repeat(6, minmax(86px, 1fr)) 76px; }
.pedido-head { background: #f6f6f6; border-bottom: 1px solid #202020; font-family: Georgia, "Times New Roman", serif; font-weight: 700; text-align: center; }
.pedido-head span { min-height: 44px; display: grid; place-items: center; padding: 6px; border-right: 1px solid #202020; }
.pedido-row { min-height: 38px; border-bottom: 1px solid #202020; }
.pedido-row > strong { display: grid; place-items: center; border-right: 1px solid #202020; font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.pedido-row label { display: block; border-right: 1px solid #202020; }
.pedido-row label span { display: none; }
.pedido-row input { min-height: 37px; border: 0; border-radius: 0; text-align: center; color: #001cff; background: #fff; }
.pedido-row .locked-leaf-field input { background: var(--locked); color: #6c778a; cursor: not-allowed; }
.pedido-row .locked-leaf-field input::placeholder { color: #6c778a; opacity: 1; }
.pedido-row button { min-height: 37px; border-radius: 0; border: 0; }
.pedido-row button:disabled { opacity: .45; cursor: default; }
.observations-box { min-height: 70px; padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: #fbfcfe; white-space: pre-wrap; line-height: 1.45; }
.review-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.review-grid div { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); background: #f8fafc; }
.review-grid strong { font-size: 12px; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.technical-review { display: grid; gap: 12px; margin-top: 16px; padding: 14px; border: 1px solid var(--line); background: #fbfcfe; }
.download-link { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px; border-radius: 4px; background: var(--navy); color: #fff; font-weight: 800; text-decoration: none; }
.login-shell { min-height: 100vh; display: grid; place-items: center; background: #50596b; }
.login-shell .topbar { display: none; }
.login-shell main { width: 100%; max-width: none; padding: 24px; }
.login-card { width: min(360px, calc(100vw - 32px)); margin: auto; padding: 22px; background: #fff; border-top: 4px solid #97abc8; box-shadow: 0 22px 45px rgba(22, 29, 44, .28); }
.login-card h1 { margin-bottom: 14px; font-size: 24px; }
.login-logo { display: grid; gap: 3px; padding: 12px; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-bottom: 3px solid var(--lime); color: var(--ink); }
.login-logo img { width: 260px; max-width: 100%; object-fit: contain; }
.login-logo span { justify-self: end; font-size: 11px; font-weight: 800; }
.admin-shell main { max-width: none; padding: 0; }
.operator-shell main { max-width: none; padding: 0; }
.admin-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: #fff; border-bottom: 1px solid var(--line); }
.tab { height: 52px; border-radius: 0; background: #fff; color: var(--ink); border-right: 1px solid var(--line); }
.tab.active { background: var(--navy-2); color: #fff; box-shadow: inset 0 -3px 0 var(--lime); }
.tab span { display: inline-grid; place-items: center; min-width: 24px; height: 22px; margin-left: 8px; border-radius: 11px; background: rgba(255,255,255,.22); font-size: 12px; }
.tab-arrow { display: none; }
.admin-page { max-width: 1120px; margin: 0 auto; padding: 28px 24px; }
.page-heading { margin-bottom: 16px; }
.page-heading h1 { margin: 0; }
.zone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.zone-grid.side { grid-template-columns: minmax(0, 1fr) 280px; }
.stats-card { display: grid; gap: 12px; }
.metric { padding: 12px; border: 1px solid var(--line); background: #f8fafc; border-radius: 4px; }
.metric strong { display: block; font-size: 28px; }
.metric span { color: var(--muted); font-size: 13px; }
.status-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: #eef2f7; color: #39475d; font-size: 12px; font-weight: 800; white-space: nowrap; }
.data-table { width: 100%; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #fff; }
.table-head, .table-row { display: grid; grid-template-columns: 30px minmax(60px, .55fr) minmax(120px, 1.25fr) minmax(128px, 1fr) minmax(104px, .82fr) minmax(54px, .46fr) minmax(42px, .34fr) minmax(58px, .42fr) minmax(130px, .95fr) minmax(90px, .62fr); gap: 0; align-items: stretch; }
.data-table.no-actions .table-head, .data-table.no-actions .table-row { grid-template-columns: 30px minmax(64px, .65fr) minmax(140px, 1.45fr) minmax(140px, 1.15fr) minmax(118px, .95fr) minmax(58px, .5fr) minmax(48px, .42fr) minmax(64px, .52fr) minmax(140px, 1fr); }
.data-table.pending-table .table-head, .data-table.pending-table .table-row { grid-template-columns: 30px minmax(70px, .65fr) minmax(140px, 1.35fr) minmax(140px, 1.15fr) minmax(118px, .95fr) minmax(58px, .5fr) minmax(48px, .42fr) minmax(64px, .52fr); }
.data-table.launched-table .table-head, .data-table.launched-table .table-row { grid-template-columns: 30px minmax(70px, .7fr) minmax(180px, 1.35fr) minmax(160px, 1.15fr) minmax(118px, .95fr) minmax(64px, .52fr) minmax(64px, .52fr) minmax(150px, 1fr) minmax(94px, .62fr); }
.data-table.no-select.launched-table .table-head, .data-table.no-select.launched-table .table-row { grid-template-columns: minmax(70px, .7fr) minmax(180px, 1.35fr) minmax(160px, 1.15fr) minmax(118px, .95fr) minmax(64px, .52fr) minmax(64px, .52fr) minmax(150px, 1fr) minmax(94px, .62fr); }
.table-head { background: var(--brand-primary-100); color: var(--brand-primary-900); font-size: 11px; font-weight: 800; line-height: 1.2; }
.table-head span, .table-row > * { min-width: 0; padding: 8px 7px; border-right: 0; display: flex; align-items: center; justify-content: center; text-align: center; }
.table-row { min-height: 42px; border-top: 1px solid var(--line); background: #fff; font-size: 12px; line-height: 1.25; }
.table-row:nth-child(odd) { background: #fbfcfe; }
.table-row strong, .table-row span { overflow-wrap: anywhere; }
.table-row input { width: auto; min-height: auto; justify-self: center; }
.select-cell { justify-content: center; gap: 0; }
.select-cell span { display: none; }
.table-row em { display: inline-flex; width: fit-content; max-width: 100%; justify-self: center; align-items: center; justify-content: center; min-height: 24px; padding: 4px 7px; border-radius: 3px; background: #eef2f7; font-style: normal; font-size: 10px; line-height: 1.15; font-weight: 800; color: #26344b; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.table-row button.small, .table-row .pdf-link { justify-self: stretch; width: 100%; min-width: 0; white-space: nowrap; }
.data-table.no-select .table-head, .data-table.no-select .table-row { grid-template-columns: minmax(60px, .55fr) minmax(120px, 1.25fr) minmax(128px, 1fr) minmax(104px, .82fr) minmax(54px, .46fr) minmax(42px, .34fr) minmax(58px, .42fr) minmax(130px, .95fr) minmax(90px, .62fr); }
.provider-table .table-head, .provider-table .table-row, .data-table.provider-table.no-select .table-head, .data-table.provider-table.no-select .table-row { grid-template-columns: minmax(64px, .55fr) minmax(130px, 1.1fr) minmax(128px, .95fr) minmax(118px, .82fr) minmax(118px, .82fr) minmax(60px, .42fr) minmax(148px, 1fr) minmax(90px, .62fr); }
.batch-order-table { margin-top: 10px; }
.batch-order-table .table-head, .batch-order-table .table-row, .data-table.batch-order-table.no-select .table-head, .data-table.batch-order-table.no-select .table-row { grid-template-columns: minmax(64px, .55fr) minmax(130px, 1.15fr) minmax(128px, 1fr) minmax(118px, .82fr) minmax(58px, .42fr) minmax(148px, .95fr) minmax(80px, .55fr); }
.pdf-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.auto-settings-panel { display: grid; gap: 4px; align-content: center; width: 100%; min-height: 58px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 4px; background: #eef2f7; text-align: left; }
.auto-settings-panel strong { font-size: 13px; line-height: 1.2; }
.auto-settings-panel span { color: #4b5870; font-size: 12px; line-height: 1.35; font-weight: 700; }
.inline-form { display: grid; grid-template-columns: 1.2fr 1fr .8fr auto; gap: 8px; margin-bottom: 14px; }
.config-layout { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(520px, 1.2fr); gap: 16px; align-items: start; }
.settings-panel { display: flex; flex-direction: column; gap: 0; }
.settings-panel > .config-form { display: contents; }
.settings-section { padding: 6px 0 20px; border-bottom: 1px solid var(--line); }
.settings-section:last-child { border-bottom: 0; padding-bottom: 0; }
.settings-launch-section { order: 1; }
.settings-client-section { order: 2; }
.operator-management-card { order: 3; }
.settings-email-section { order: 4; }
.settings-scroll-list { max-height: 300px; overflow-y: auto; padding-right: 6px; }
.settings-panel .client-list { max-height: 300px; overflow-y: auto; padding-right: 6px; }
.operator-row { gap: 8px; }
.operator-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.operator-row.compact label, .operator-row.compact > div:not(.operator-row-head) { display: none; }
.operator-row.editing label { margin-top: 4px; }
.operator-edit { display: grid; gap: 8px; }
.provider-validation-page { max-width: 1360px; }
.provider-validation-page .reception-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.provider-validation-page .reception-layout > .work-card { margin-bottom: 0; }
.provider-validation-page .reception-layout label,
.provider-validation-page .reception-layout input,
.provider-validation-page .reception-layout select { width: 100%; }
.provider-validation-page .provider-comparison-result { margin-top: 16px; }
.provider-validation-page .provider-comparison-result > .client-list { max-height: none; overflow: visible; }
.provider-validation-page .provider-comparison-result > .client-list > article { padding: 14px; }
.provider-validation-page .reception-pending-content { max-height: 460px; overflow-y: auto; padding-right: 6px; }
.provider-validation-page .reception-pending-content > .client-list { max-height: none; overflow: visible; }
.provider-validation-page .reception-order-card { gap: 7px; padding: 10px; }
.provider-validation-page .reception-order-card > strong { font-size: 13px; }
.provider-validation-page .reception-order-card > span { font-size: 12px; }
.provider-validation-page .reception-order-card .compact-table { width: 100%; overflow-x: auto; overflow-y: visible; }
.provider-validation-page .reception-order-card .compact-table .table-head, .provider-validation-page .reception-order-card .compact-table .table-row { min-width: 620px; }
.provider-validation-page .provider-confirmation-meta { align-items: stretch; }
.provider-validation-page .provider-confirmation-meta .provider-file-action { min-height: 52px; }
.provider-history-section .history-list { max-height: 460px; overflow-y: auto; padding-right: 6px; }
.provider-history-section .history-card { gap: 8px; padding: 10px; }
.provider-history-section .history-card-head h3 { font-size: 14px; }
.provider-history-section .history-facts { gap: 6px; }
.provider-history-section .history-facts div { padding: 6px; }
.provider-history-section .history-flow { color: #111; }
.config-form { display: grid; gap: 16px; }
.settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.settings-grid > button { grid-column: 1 / -1; }
.settings-note { grid-column: 1 / -1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: #f8fafc; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.35; }
.email-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.field-group { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: #24324a; }
.email-list { display: grid; gap: 8px; }
.email-list-rows { display: grid; gap: 8px; }
.email-row { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 8px; }
.email-row input { min-width: 0; }
.email-row button { grid-column: auto; min-width: 34px; padding: 0; }
.settings-actions { display: flex; justify-content: flex-end; }
.settings-actions button { min-width: 190px; }
.client-list, .event-list { display: grid; gap: 8px; max-height: 420px; overflow: auto; }
.client-list article, .event-list article { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--soft-line); border-radius: 4px; background: #fff; }
.event-list article { grid-template-columns: 120px 1fr 110px 160px; align-items: center; }
.event-list small { grid-column: 1 / -1; }
.batch-info { display: grid; gap: 10px; max-height: 650px; margin-top: 12px; padding-right: 6px; overflow-y: auto; }
.batch-info article { display: grid; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--soft-line); border-radius: 4px; background: #fbfcfe; }
.batch-info strong { font-size: 12px; color: var(--accent); text-transform: uppercase; }
.batch-info span, .batch-info small { overflow-wrap: anywhere; }
.batch-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.batch-card-head div { display: grid; gap: 3px; }
.batch-card-head em { display: inline-flex; min-height: 24px; align-items: center; padding: 3px 8px; border-radius: 999px; background: #eef2f7; color: #3d4a60; font-size: 11px; font-style: normal; font-weight: 800; }
.batch-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; }
.batch-summary div { min-width: 0; padding: 8px; border: 1px solid var(--soft-line); border-radius: 4px; background: #fff; }
.batch-summary dt { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.batch-summary dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.detail-modal { width: min(860px, 100%); }
.detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.detail-summary div { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 4px; background: #f8fafc; }
.detail-summary strong { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.detail-summary span { display: block; overflow-wrap: normal; font-weight: 700; line-height: 1.2; }
.detail-summary small { display: block; margin-top: 2px; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.2; }
.detail-summary .type span { white-space: normal; }
.state-badge { display: inline-flex !important; width: fit-content; min-height: 24px; align-items: center; padding: 3px 8px; border-radius: 999px; background: #eef2f7; color: #2d3a50; font-size: 12px; }
.position-list { display: grid; gap: 8px; margin-bottom: 12px; }
.position-card { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.position-card strong { font-size: 15px; }
.position-card span, .position-card small { overflow-wrap: anywhere; line-height: 1.35; }
.tandem-box { display: grid; gap: 3px; margin-top: 5px; padding: 8px 10px; border-left: 3px solid #b8791c; background: #fff7e6; color: #744a12; }
.tandem-box b { font-size: 11px; letter-spacing: .04em; }
.review-summary { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.review-summary strong { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.review-summary span { font-weight: 800; }
.observations-box.empty { min-height: 44px; color: var(--muted); background: #f8fafc; }
.comparison-table { border: 1px solid var(--line); border-radius: 4px; overflow: auto; background: #fff; }
.comparison-table > div { display: grid; grid-template-columns: 70px minmax(130px, 1fr) minmax(110px, 1fr) minmax(110px, 1fr) 96px; align-items: center; min-width: 560px; }
.comparison-table > div:first-child { background: #e9eff7; color: #2c384c; }
.comparison-table strong, .comparison-table span, .comparison-table em { padding: 9px 10px; border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
.comparison-table > div:first-child strong { border-top: 0; }
.admin-comparison-table { display: grid; margin-top: 10px; border: 1px solid var(--line); border-radius: 4px; overflow: auto; background: #fff; }
.provider-comparison-result .admin-comparison-table { max-height: 480px; overflow: auto; }
.admin-comparison-table > div { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(150px, 1fr) minmax(150px, 1fr) 72px; min-width: 640px; align-items: center; border-top: 1px solid var(--line); }
.admin-comparison-table > div:first-child { position: sticky; top: 0; z-index: 1; border-top: 0; background: #e9eff7; color: #2c384c; }
.admin-comparison-table > div:first-child strong:last-child { font-size: 0; }
.admin-comparison-table strong, .admin-comparison-table span, .admin-comparison-table em { min-width: 0; padding: 8px 10px; overflow-wrap: anywhere; border-right: 1px solid var(--line); }
.admin-comparison-table em { border-right: 0; text-align: center; font-style: normal; font-weight: 900; }
.admin-comparison-table .status-error { background: #fff7f7; color: var(--danger); }
.admin-comparison-table .status-warn { background: #fff9ed; color: #8a5a18; }
.preparation-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.preparation-facts > div { min-width: 0; padding: 8px; border: 1px solid var(--soft-line); background: #fff; }
.preparation-facts dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.preparation-facts dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.preparation-accessory-toggle { display: flex; align-items: center; gap: 7px; }
.preparation-accessory-toggle input { width: auto; min-height: auto; }
.reception-inbox-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.segmented-control { display: inline-flex; gap: 0; }
.segmented-control button { border-radius: 0; }
.segmented-control button:first-child { border-radius: 4px 0 0 4px; }
.segmented-control button:last-child { border-radius: 0 4px 4px 0; }
.segmented-control button.active { background: var(--accent); color: #fff; }
.provider-action-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid var(--soft-line); background: #fff; }
.provider-accessories-list { display: grid; gap: 8px; }
.provider-accessory-result { display: grid; gap: 8px; }
.provider-accessory-result .provider-action-row { margin: 0; }
.provider-accessory-result .result-table-wrap { margin: 0; }
.provider-accessory-result .materials-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 12px; }
.provider-accessory-result .materials-table th, .provider-accessory-result .materials-table td { padding: 7px 9px; border: 1px solid var(--line); text-align: left; }
.provider-accessory-result .materials-table th { background: #e9eff7; color: #2c384c; }
.provider-action-row .error-state { margin-right: 8px; color: var(--danger); font-size: 12px; }
.flow-ok { color: #26673a; font-weight: 800; }
.provider-review { border-left-color: #d99a34; }
.reception-order-card .compact-table { margin-top: 8px; border-color: var(--line); }
.reception-order-card .compact-table .table-head, .reception-order-card .compact-table .table-row { grid-template-columns: repeat(8, minmax(0, 1fr)); min-width: 620px; }
.reception-order-card .compact-table .table-head span, .reception-order-card .compact-table .table-row > span { padding: 5px 6px; font-size: 11px; }
.reception-order-card .compact-table .table-head { min-height: 30px; }
.reception-order-card .compact-table .table-row { min-height: 30px; }
.reception-order-card[data-reception-order] { cursor: pointer; }
.reception-order-card[data-reception-order].selected { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); background: #f7faff; }
.provider-mode { align-items: center; gap: 18px; margin-bottom: 12px; }
.provider-mode label { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.provider-mode input { width: auto; min-height: auto; }
.provider-file-action { display: grid; align-content: center; min-height: 52px; padding: 7px 10px; border: 1px solid var(--line); background: #f8fafc; color: var(--accent); text-decoration: none; text-align: center; }
.provider-file-action span { font-size: 10px; font-weight: 800; text-transform: uppercase; }
.provider-file-action strong { font-size: 13px; }
.provider-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.reception-confirmations-table { display: grid; max-height: 280px; overflow-y: auto; border: 1px solid var(--line); background: #fff; }
.reception-confirmation-row { display: grid; grid-template-columns: minmax(105px, .75fr) minmax(150px, 1.25fr) minmax(110px, .8fr) minmax(95px, .65fr); gap: 8px; width: 100%; min-width: 0; align-items: center; padding: 8px 9px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); text-align: left; font: inherit; font-size: 12px; }
.reception-confirmation-row:first-child { border-top: 0; }
.reception-confirmation-row:not(.reception-confirmation-head) { cursor: pointer; }
.reception-confirmation-row:not(.reception-confirmation-head):hover, .reception-confirmation-row.selected { background: #eef4fb; }
.reception-confirmation-head { position: sticky; top: 0; z-index: 1; background: #e9eff7; color: #2c384c; font-size: 11px; }
.reception-confirmation-row > span, .reception-confirmation-row > strong { min-width: 0; overflow-wrap: anywhere; }
.reception-global-row, .reception-global-head { grid-template-columns: minmax(105px, .75fr) minmax(150px, 1.25fr) minmax(110px, .8fr); }
.confirmation-status { font-weight: 800; }
.confirmation-status-sin_analizar { color: #8a5a18; }
.confirmation-status-con_errores, .confirmation-status-error_analisis { color: var(--danger); }
.confirmation-status-ok { color: #26673a; }
.manual-reception-upload { display: grid; gap: 7px; margin-top: 12px; padding: 10px; border: 1px solid var(--soft-line); background: #fbfcfe; }
.comparison-issues { display: grid; gap: 7px; margin-top: 14px; padding: 12px; border-left: 3px solid var(--danger); background: #fff7f7; }
.comparison-issues h3 { margin: 0; color: var(--danger); font-size: 14px; }
.comparison-issues p { margin: 0; color: var(--danger); font-size: 12px; }
.warehouse-panel { display: grid; gap: 14px; }
.warehouse-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.warehouse-tabs button { min-width: 150px; }
.warehouse-tabs button span { margin-left: 5px; }
.warehouse-list, .warehouse-history-section .history-list { display: grid; gap: 8px; max-height: 430px; overflow-y: auto; padding-right: 4px; }
.warehouse-placeholder { min-height: 100px; display: grid; place-items: center; padding: 20px; border: 1px dashed var(--line); color: var(--muted); font-weight: 800; text-align: center; }
.warehouse-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .55fr); gap: 16px; padding: 11px 13px; border: 1px solid var(--line); background: #fff; }
.warehouse-card h2 { margin-bottom: 4px; font-size: 15px; }
.warehouse-card p { margin: 2px 0; color: var(--muted); font-size: 12px; }
.warehouse-main { min-width: 0; }
.warehouse-meta-row { font-size: 12px; }
.warehouse-pdf-link, .history-extra a { color: var(--accent); font-weight: 800; }
.warehouse-state { display: grid; align-content: center; gap: 5px; min-width: 280px; }
.warehouse-state strong { color: #111; }
.warehouse-state .warehouse-date { margin: 0; color: #111; font-size: 12px; font-weight: 400; }
.warehouse-state .warehouse-date strong { color: #111; font-weight: 800; }
.warehouse-state span { color: #111; font-weight: 800; }
.warehouse-status { margin: 0 0 2px; color: #111 !important; font-size: 12px !important; font-weight: 400; }
.warehouse-status strong { font-weight: 800; }
.warehouse-detail .warehouse-date { color: #111; font-size: 12px; font-weight: 400; }
.warehouse-detail .warehouse-date strong { font-weight: 800; }
.warehouse-panel .flow-ok { color: #111; }
.warehouse-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.warehouse-detail { display: grid; gap: 14px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.warehouse-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr); gap: 16px; }
.warehouse-detail-grid > section { padding: 14px; border: 1px solid var(--line); background: #fbfcfe; }
.warehouse-detail-grid h3 { margin-bottom: 8px; font-size: 15px; }
.warehouse-lines { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 12px; }
.warehouse-lines th, .warehouse-lines td { padding: 7px; border-bottom: 1px solid var(--line); text-align: left; }
.warehouse-lines th { background: #e7edf6; }
.history-section { margin-top: 16px; }
.history-list { display: grid; gap: 12px; }
.history-card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); background: #fbfcfe; }
.warehouse-history-row { padding: 11px 13px; border-color: var(--line); background: #fff; }
.history-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.history-card-head h3 { margin: 0 0 4px; font-size: 16px; }
.history-card-head span { color: var(--muted); font-size: 12px; }
.history-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; }
.history-facts div { min-width: 0; padding: 8px; border: 1px solid var(--soft-line); background: #fff; }
.history-facts dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.history-facts dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.history-extra { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 8px; border-top: 1px solid var(--soft-line); color: #111; font-size: 12px; font-weight: 400; }
.history-extra strong { color: #111; font-weight: 800; }
.history-facts .date-fact dt { color: #111; font-size: 12px; font-weight: 800; text-transform: none; }
.history-facts .date-fact dd { color: #111; font-weight: 400; }
.history-flow { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #287a43; font-size: 12px; font-weight: 800; }
.provider-order-generation { display: grid; gap: 10px; padding-top: 10px; border-top: 1px solid var(--soft-line); }
.provider-order-generation-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.erp-debug-box { display: grid; gap: 7px; border: 1px solid #202020; border-radius: 4px; background: #0b0b0b; padding: 12px; }
.erp-debug-title { color: #f5f5f5; font-size: 11px; font-weight: 800; }
.erp-debug-content { max-height: 360px; margin: 0; overflow: auto; color: #f5f5f5; font: 12px/1.45 Consolas, "Courier New", monospace; white-space: pre-wrap; }
.erp-technical-trace, .erp-raw-details { display: grid; gap: 10px; margin-top: 12px; }
.erp-technical-trace > summary, .erp-raw-details > summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.generation-complete { font-weight: 800; color: #26673a; }
.provider-generated-order { display: grid; gap: 10px; padding: 10px; border: 1px solid var(--line); background: #fff; }
.provider-generated-order h4, .provider-generated-items h5 { margin: 0; color: var(--ink); }
.provider-confirmation-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.provider-confirmation-facts div { min-width: 0; padding: 7px 8px; border: 1px solid var(--soft-line); }
.provider-confirmation-facts dt { font-size: 10px; font-weight: 800; text-transform: uppercase; }
.provider-confirmation-facts dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.provider-generated-items { display: grid; gap: 5px; }
.provider-generated-items table { width: 100%; border-collapse: collapse; font-size: 12px; }
.provider-generated-items th, .provider-generated-items td { padding: 6px 8px; border: 1px solid var(--soft-line); text-align: left; }
.provider-generated-items th:last-child, .provider-generated-items td:last-child { width: 100px; text-align: right; }
.warehouse-history-section .history-flow { color: #111; }
.history-detail { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.history-detail p { margin: 0; font-size: 12px; }
.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(19, 28, 42, .46); z-index: 20; }
.modal { width: min(620px, 100%); max-height: 90vh; overflow: auto; position: relative; background: #fff; border-radius: 4px; padding: 22px; box-shadow: 0 18px 50px rgba(11, 18, 30, .28); }
.close { position: absolute; top: 12px; right: 12px; width: 32px; min-height: 32px; padding: 0; background: #edf1f6; color: var(--ink); }

@media (max-width: 900px) {
  .topbar { padding: 12px 16px; }
  .brand-logo { width: 170px; height: 50px; }
  main, .admin-page { padding: 16px; }
  .two, .zone-grid, .zone-grid.side, .config-layout, .opening-grid, .settings-grid, .email-settings-grid, .inline-form, .excel-sheet, .review-grid, .batch-summary, .preparation-facts { grid-template-columns: 1fr; }
  .detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-side { border-left: 0; border-top: 1px solid #202020; }
  .sheet-title { justify-content: space-between; padding: 10px; }
  .sheet-title h3 { font-size: 21px; }
  .sheet-title button { position: static; }
  .pedido-table { display: grid; gap: 10px; padding: 10px; }
  .pedido-head { display: none; }
  .pedido-row { grid-template-columns: 1fr; border: 1px solid #202020; background: #fff; }
  .pedido-row > strong { min-height: 34px; justify-content: start; padding-left: 10px; border-right: 0; border-bottom: 1px solid #202020; font-weight: 700; }
  .pedido-row label { display: grid; grid-template-columns: minmax(120px, .85fr) 1fr; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .pedido-row label span { display: block; padding-left: 10px; font-weight: 700; }
  .pedido-row input { text-align: left; border-left: 1px solid var(--line); }
  .admin-tabs { display: grid; grid-template-columns: 1fr; overflow: hidden; transition: grid-template-rows .22s ease, border-color .22s ease; }
  .admin-tabs .tab { display: none; position: relative; height: 52px; border-right: 0; border-bottom: 1px solid var(--line); transition: background-color .18s ease, color .18s ease; }
  .admin-tabs .tab.active { display: flex; align-items: center; justify-content: center; order: -1; }
  .admin-tabs.open .tab { display: flex; align-items: center; justify-content: center; animation: tabReveal .18s ease; }
  .tab-arrow { display: inline-block; width: 9px; height: 9px; margin-left: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
  .admin-tabs.open .tab.active .tab-arrow { transform: rotate(225deg) translate(-1px, -1px); }
  .data-table { border: 0; display: grid; gap: 10px; overflow: visible; background: transparent; }
  .table-head { display: none; }
  .table-row, .data-table.no-select .table-row, .provider-table .table-row, .data-table.provider-table.no-select .table-row, .batch-order-table .table-row, .data-table.batch-order-table.no-select .table-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; min-height: 0; padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
  .table-row > * { display: grid; grid-template-columns: minmax(92px, .8fr) minmax(0, 1fr); gap: 8px; align-items: center; min-height: 30px; padding: 0; border-right: 0; }
  .table-row > *::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
  .table-row > *:not([data-label])::before { content: ""; display: none; }
  .table-row strong, .table-row span, .table-row em, .table-row a, .table-row button { min-width: 0; }
  .table-row em { justify-self: start; white-space: normal; }
  .table-row button.small, .table-row .pdf-link { display: inline-flex; width: auto; min-width: 118px; justify-self: start; }
  .table-row button.small::before, .table-row .pdf-link::before { content: ""; display: none; }
  .table-row > [data-label="Estado"], .table-row > [data-label="Acciones"], .table-row > [data-label="PDF"] { grid-column: 1 / -1; }
  .table-row > [data-label="Estado"] { grid-template-columns: minmax(92px, .35fr) minmax(0, 1fr); }
  .table-row > [data-label="Estado"] { order: -2; }
  .table-row > [data-label="Ref."] { order: -1; }
  .select-cell { display: flex; grid-column: 1 / -1; justify-content: flex-start; min-height: 32px; }
  .select-cell span { display: inline; font-weight: 700; color: var(--ink); }
  .event-list article { grid-template-columns: 1fr; }
}

@keyframes tabReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 620px) {
  body { overflow-x: hidden; }
  .provider-validation-page .reception-layout { grid-template-columns: 1fr; }
  .warehouse-card, .warehouse-detail-grid { grid-template-columns: 1fr; }
  .warehouse-state { min-width: 0; }
  .history-facts { grid-template-columns: 1fr; }
  h1 { font-size: 25px; }
  .work-card { padding: 14px; }
  .section-title { align-items: stretch; flex-direction: column; }
  .section-title button { width: 100%; }
  .table-row, .data-table.no-select .table-row, .provider-table .table-row, .data-table.provider-table.no-select .table-row, .batch-order-table .table-row, .data-table.batch-order-table.no-select .table-row { grid-template-columns: 1fr; }
  .detail-summary { grid-template-columns: 1fr; }
  .table-row > * { grid-template-columns: minmax(104px, 38%) minmax(0, 1fr); }
  .table-row > [data-label="Acciones"], .table-row > [data-label="PDF"] { grid-template-columns: 1fr; }
  .table-row > [data-label="Acciones"]::before, .table-row > [data-label="PDF"]::before { display: none; }
  .table-row button.small, .table-row .pdf-link { width: 100%; justify-content: center; }
  .modal-backdrop { align-items: start; padding: 10px; }
  .modal { max-height: calc(100vh - 20px); padding: 16px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button, .download-link, .technical-review button { width: 100%; }
  .choice-line { flex-direction: column; gap: 8px; }
  .provider-order-generation-actions { display: grid; grid-template-columns: 1fr; }
  .provider-order-generation-actions button { width: 100%; }
  .provider-confirmation-facts { grid-template-columns: 1fr; }
}

@media (max-width: 1023px) {
  .data-table.launched-table { display: grid; min-width: 0; gap: 10px; overflow: visible; border: 0; background: transparent; }
  .data-table.launched-table .table-head { display: none; }
  .data-table.launched-table .table-row, .data-table.no-select.launched-table .table-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "ref state"
      "client client"
      "type type"
      "entry age"
      "springs springs"
      "select action";
    gap: 6px 12px;
    min-width: 0;
    min-height: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
  }
  .data-table.launched-table .table-row > * { min-width: 0; min-height: 0; padding: 0; border: 0; text-align: left; white-space: normal; overflow-wrap: normal; }
  .data-table.launched-table .table-row > *::before { content: none; }
  .data-table.launched-table .table-row > [data-label="Ref."] { grid-area: ref; font-size: 14px; justify-content: flex-start; }
  .data-table.launched-table .table-row > [data-label="Cliente"] { grid-area: client; justify-content: flex-start; }
  .data-table.launched-table .table-row > [data-label="Tipo"] { grid-area: type; justify-content: flex-start; color: var(--muted); }
  .data-table.launched-table .table-row > [data-label="Fecha de entrada"] { grid-area: entry; }
  .data-table.launched-table .table-row > [data-label="Edad"] { grid-area: age; }
  .data-table.launched-table .table-row > [data-label="Muelles"] { grid-area: springs; }
  .data-table.launched-table .table-row > [data-label="Fecha de entrada"], .data-table.launched-table .table-row > [data-label="Edad"], .data-table.launched-table .table-row > [data-label="Muelles"] { display: grid; grid-template-columns: auto 1fr; gap: 5px; align-items: center; font-size: 12px; }
  .data-table.launched-table .table-row > [data-label="Fecha de entrada"]::before, .data-table.launched-table .table-row > [data-label="Edad"]::before, .data-table.launched-table .table-row > [data-label="Muelles"]::before { content: attr(data-label) ":"; display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
  .data-table.launched-table .table-row > [data-label="Estado"] { grid-area: state; justify-self: end; align-self: start; }
  .data-table.launched-table .table-row > [data-label="Acciones"] { grid-area: action; grid-column: auto; justify-self: end; width: auto; min-width: 104px; }
  .data-table.launched-table .select-cell { grid-area: select; grid-column: auto; min-height: 34px; justify-content: flex-start; }
  .data-table.launched-table .select-cell::before { content: none; }
  .data-table.launched-table .select-cell span { display: inline; padding: 0; font-weight: 700; }
}
