:root {
  --ink: #142336;
  --navy: #262f42;
  --navy-2: #465774;
  --muted: #657188;
  --line: #d6deea;
  --soft-line: #e8edf4;
  --surface: #ffffff;
  --page: #f2f5f9;
  --locked: #eef2f6;
  --accent: #4c6388;
  --lime: #b7cb39;
  --danger: #a84646;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, 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; }
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; }
.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.small { min-height: 30px; padding: 0 10px; font-size: 12px; }
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; }
.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); }
.table-head { background: #e8eef6; color: #2b374b; 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; }
.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; }
.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 { 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; }
  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; }
}
