@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --navy-950: #101b2d;
  --navy-900: #14243c;
  --navy-800: #1b3556;
  --blue-700: #175b9d;
  --blue-600: #1d70b8;
  --blue-100: #e9f2fb;
  --blue-50: #f4f8fc;
  --silver-800: #53657a;
  --silver-600: #7e91a7;
  --silver-400: #aebbc9;
  --silver-300: #cad4df;
  --silver-200: #dfe6ed;
  --silver-100: #eef2f6;
  --paper: #f4f6f9;
  --white: #fff;
  --ink: #17263b;
  --muted: #6d7d90;
  --teal: #44a4ad;
  --red: #bd4b52;
  --shadow: 0 18px 45px rgba(22, 43, 69, .08);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(48, 142, 206, .36); outline-offset: 2px; }
[hidden] { display: none !important; }

/* acceso */
.access-screen { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; position: relative; overflow: hidden; background: radial-gradient(ellipse at 12% 8%, rgba(48, 101, 153, .3), transparent 38%), radial-gradient(ellipse at 90% 85%, rgba(120, 143, 166, .16), transparent 37%), linear-gradient(135deg, #101b2d, #183354 58%, #1b426a); }
.access-screen::before, .access-screen::after { content: ""; position: absolute; width: 470px; height: 470px; border: 1px solid rgba(197, 216, 234, .11); border-radius: 50%; pointer-events: none; }
.access-screen::before { top: -300px; left: -200px; box-shadow: 0 0 0 36px rgba(197, 216, 234, .025), 0 0 0 72px rgba(197, 216, 234, .02); }
.access-screen::after { bottom: -345px; right: -190px; width: 590px; height: 590px; box-shadow: 0 0 0 45px rgba(197, 216, 234, .025), 0 0 0 90px rgba(197, 216, 234, .02); }
.access-card { width: min(100%, 440px); z-index: 1; padding: 43px 44px 31px; border: 1px solid rgba(220, 232, 244, .24); border-radius: 9px; background: linear-gradient(145deg, rgba(251, 253, 255, .98), rgba(235, 241, 247, .97)); box-shadow: 0 28px 90px rgba(3, 13, 27, .36); position: relative; }
.access-card::before { content: ""; height: 4px; position: absolute; top: 0; left: 28px; right: 28px; background: linear-gradient(90deg, var(--blue-600), #a9c0d7, var(--teal)); border-radius: 0 0 2px 2px; }
.brand-logo { width: 50px; height: 50px; flex: 0 0 auto; display: block; object-fit: contain; border: 1px solid rgba(171, 194, 215, .84); border-radius: 50%; background: #eeece8; box-shadow: 0 2px 7px rgba(8, 22, 39, .18); }
.brand-logo--large { width: 128px; height: 128px; margin: 0 auto 20px; border-color: #b9c8d6; box-shadow: 0 4px 12px rgba(22, 43, 69, .12); }
.access-card > .eyebrow, .access-card h1, .access-card .access-intro { text-align: center; }
.eyebrow { color: var(--silver-600); font-size: 9px; letter-spacing: 1.65px; line-height: 1.5; font-weight: 800; margin: 0; }
.access-card h1 { color: var(--navy-900); margin: 9px 0 8px; font-size: clamp(19px, 5vw, 25px); letter-spacing: -.9px; line-height: 1.25; font-weight: 800; }
.access-card h1 span { color: var(--blue-700); }
.access-card h1 b { color: var(--silver-600); font-size: .8em; padding-left: 3px; }
.access-intro { margin: 0 0 29px; color: var(--muted); font-size: 13px; }
.access-form label, .field label { display: block; margin-bottom: 7px; color: #40536a; font-size: 11px; line-height: 1.4; font-weight: 800; letter-spacing: .2px; }
.access-input-wrap { display: flex; align-items: center; height: 48px; border: 1px solid var(--silver-300); border-radius: 5px; background: var(--white); transition: border-color .18s ease, box-shadow .18s ease; }
.access-input-wrap:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(29, 112, 184, .11); }
.access-input-wrap > span { padding: 0 0 0 15px; color: var(--silver-600); font-size: 12px; }
.access-input-wrap input { width: 100%; height: 100%; border: 0; outline: 0; padding: 0 13px; color: var(--ink); background: transparent; font-size: 13px; }
.access-error { min-height: 17px; margin: 6px 0 8px; color: var(--red); font-size: 11px; font-weight: 700; }
.access-foot { display: flex; align-items: center; gap: 8px; margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--silver-200); color: var(--silver-800); font-size: 10px; font-weight: 700; }
.status-led { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(68, 164, 173, .12); }
.access-note { margin: 13px 0 0; color: #8896a5; font-size: 9px; line-height: 1.6; }
.access-side-note { position: absolute; right: 34px; bottom: 30px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; color: rgba(221, 234, 246, .36); font: 700 11px "DM Mono", monospace; letter-spacing: 2px; }
.access-side-note span:last-child { font-size: 9px; letter-spacing: 1px; }

/* acciones y layout */
.app-root { min-height: 100vh; }
.topbar { min-height: 76px; padding: 12px max(28px, calc((100vw - 1480px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #f2f7fb; background: linear-gradient(105deg, #12233b, #193857 73%, #1d4264); border-bottom: 1px solid rgba(189, 209, 229, .2); box-shadow: 0 5px 18px rgba(12, 30, 51, .12); }
.brand-lockup { display: flex; align-items: center; gap: 13px; min-width: 0; color: inherit; text-decoration: none; }
.brand-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.brand-copy strong { color: #f1f6fb; font-size: 14px; letter-spacing: -.25px; white-space: nowrap; }
.brand-copy strong span { color: #aabed0; padding-left: 3px; }
.brand-copy small { color: #9badc0; font-size: 8px; font-weight: 700; letter-spacing: 1.45px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.catalog-status { display: flex; align-items: center; gap: 8px; margin-right: 9px; color: #c0cfdd; font-size: 10px; font-weight: 700; white-space: nowrap; }
.catalog-status .status-led { background: #a2b0be; box-shadow: 0 0 0 3px rgba(180, 195, 210, .11); }
.catalog-status.is-online .status-led { background: #56c69e; box-shadow: 0 0 0 3px rgba(86, 198, 158, .15); }
.catalog-status.is-syncing .status-led { background: #e4bc62; box-shadow: 0 0 0 3px rgba(228, 188, 98, .16); animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .45; } }
.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid transparent; border-radius: 4px; font-size: 11px; font-weight: 800; white-space: nowrap; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button--primary { color: #fff; background: linear-gradient(135deg, #1f73b9, #175c9a); border-color: #16578f; box-shadow: 0 3px 8px rgba(23, 91, 153, .14); }
.button--primary:hover { background: linear-gradient(135deg, #286fa9, #164e80); box-shadow: 0 5px 13px rgba(23, 91, 153, .19); }
.button--wide { width: 100%; min-height: 45px; }
.button--small { min-height: 34px; padding: 0 11px; font-size: 10px; }
.button--outline { color: var(--navy-800); background: transparent; border-color: var(--silver-300); }
.button--outline:hover { background: var(--blue-50); border-color: #9cb5cd; }
.topbar .button--outline { color: #e2ecf5; border-color: rgba(205, 222, 238, .34); }
.topbar .button--outline:hover, .topbar .button--ghost:hover { background: rgba(236, 244, 250, .1); }
.button--ghost { color: #c1d0de; background: transparent; border-color: transparent; }
.button--danger-ghost { color: #a44d54; background: transparent; border-color: #e2c7c9; }
.button--danger-ghost:hover { background: #fcf1f1; }
.page-wrap { max-width: 1480px; margin: 0 auto; padding: 35px 32px 20px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 25px; }
.eyebrow-line { width: 18px; height: 2px; display: inline-block; vertical-align: middle; margin-right: 7px; background: var(--blue-600); }
.page-heading h1 { margin: 8px 0 5px; color: var(--navy-950); font-size: clamp(25px, 3vw, 34px); font-weight: 800; letter-spacing: -1.35px; line-height: 1.2; }
.page-heading h1 span { color: var(--blue-700); }
.heading-copy { margin: 0; color: var(--muted); font-size: 12px; }
.heading-stamp { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 1px solid var(--silver-200); border-radius: 4px; background: linear-gradient(110deg, #fff, #eef2f6); color: var(--silver-800); font-size: 8px; line-height: 1.55; font-weight: 800; letter-spacing: 1px; }
.stamp-ring { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #95abc0; border-radius: 50%; color: var(--blue-700); font: 500 9px "DM Mono", monospace; box-shadow: inset 0 0 0 4px #f5f8fa; }
.workspace { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); align-items: start; gap: 19px; }
.sidebar { display: flex; flex-direction: column; gap: 15px; }
.panel { border: 1px solid var(--silver-200); border-radius: 6px; background: var(--white); box-shadow: var(--shadow); }
.project-panel, .item-panel { padding: 20px; }
.panel-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--silver-100); }
.panel-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border: 1px solid #bdcbd8; border-radius: 50%; color: var(--blue-700); background: #f5f8fb; font: 500 10px "DM Mono", monospace; }
.panel-heading .eyebrow { margin-bottom: 2px; font-size: 8px; }
.panel-heading h2 { margin: 0; color: var(--navy-900); font-size: 14px; letter-spacing: -.2px; }
.field { margin-bottom: 13px; position: relative; }
.field input, .field textarea { width: 100%; min-height: 39px; padding: 9px 10px; border: 1px solid var(--silver-300); border-radius: 4px; color: var(--ink); background: #fff; font-size: 11px; line-height: 1.45; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.field input::placeholder, .field textarea::placeholder { color: #9aa7b5; }
.field input:focus, .field textarea:focus { outline: 0; border-color: #6c9bc4; box-shadow: 0 0 0 3px rgba(29, 112, 184, .09); }
.field input[readonly], .field textarea[readonly] { background: #f5f7f9; color: #53657a; }
.field textarea { resize: vertical; min-height: 68px; }
.field--search { z-index: 4; }
.search-wrap { position: relative; }
.search-wrap > span { position: absolute; z-index: 1; left: 11px; top: 50%; transform: translateY(-55%); color: var(--blue-700); font-size: 20px; line-height: 1; }
.search-wrap input { padding-left: 34px; }
.form-row { display: flex; gap: 10px; }
.field--code { flex: 1 1 54%; }
.field--unit { flex: 1 1 46%; }
.field--unit input { text-align: center; color: var(--navy-800); font-weight: 800; }
.field-hint { display: block; margin-top: 5px; color: #8492a2; font-size: 9px; }
.field-hint code { padding: 2px 4px; border: 1px solid var(--silver-200); border-radius: 3px; color: var(--blue-700); background: #f4f7fa; font: 10px "DM Mono", monospace; }
.save-caption { display: flex; align-items: center; gap: 7px; margin-top: 17px; padding-top: 12px; border-top: 1px solid var(--silver-100); color: #8291a1; font-size: 9px; }
.save-dot { width: 6px; height: 6px; border-radius: 50%; background: #50ae8e; }
.form-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.autocomplete-list { position: absolute; left: 0; right: 0; top: calc(100% + 2px); max-height: 300px; overflow-y: auto; border: 1px solid var(--silver-300); border-radius: 4px; background: #fff; box-shadow: 0 12px 26px rgba(17, 39, 63, .17); }
.autocomplete-option { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 8px; padding: 10px 11px; border: 0; border-bottom: 1px solid var(--silver-100); text-align: left; color: var(--ink); background: #fff; }
.autocomplete-option:last-child { border-bottom: 0; }
.autocomplete-option:hover, .autocomplete-option:focus { outline: 0; background: var(--blue-50); }
.autocomplete-option strong { padding: 3px 5px; border-radius: 3px; color: var(--blue-700); background: var(--blue-100); font: 500 10px "DM Mono", monospace; }
.autocomplete-option span { color: #53657a; font-size: 10px; line-height: 1.45; }
.autocomplete-option em { padding: 3px 5px; border: 1px solid var(--silver-200); border-radius: 3px; color: #65758a; background: #f7f8fa; font: 9px "DM Mono", monospace; font-style: normal; }
.no-results { padding: 12px; color: var(--muted); font-size: 10px; }

/* planilla */
.main-column { min-width: 0; }
.sheet-panel { overflow: hidden; }
.sheet-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 22px 18px; }
.sheet-toolbar h2 { margin: 4px 0 4px; color: var(--navy-900); font-size: 17px; letter-spacing: -.35px; }
.sheet-subtitle { max-width: 510px; margin: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sheet-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.summary-strip { display: flex; align-items: center; gap: 15px; min-height: 68px; padding: 12px 22px; border-top: 1px solid var(--silver-100); border-bottom: 1px solid var(--silver-200); background: linear-gradient(90deg, #f7f9fb, #f2f5f8); }
.summary-cell { display: flex; align-items: center; gap: 10px; min-width: 115px; }
.summary-icon { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #cfdeeb; border-radius: 4px; color: var(--blue-700); background: #eaf2f8; font-size: 15px; }
.summary-icon--silver { color: #64788e; border-color: #d3dce4; background: #edf1f4; }
.summary-cell strong { display: block; color: var(--navy-900); font: 500 15px "DM Mono", monospace; line-height: 1.2; }
.summary-cell small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.summary-divider { height: 31px; border-left: 1px solid var(--silver-300); }
.sheet-ref { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; color: var(--silver-600); font-size: 8px; letter-spacing: 1.1px; }
.sheet-ref strong { color: var(--silver-800); font: 500 10px "DM Mono", monospace; letter-spacing: .5px; }
.table-scroll { min-height: 250px; overflow-x: auto; position: relative; }
.materials-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.materials-table th { height: 38px; padding: 9px 10px; border-bottom: 1px solid var(--silver-300); color: #65768a; background: #fff; text-align: left; font-size: 8px; font-weight: 800; letter-spacing: .55px; text-transform: uppercase; white-space: nowrap; }
.materials-table td { padding: 11px 10px; border-bottom: 1px solid #edf0f3; color: #506176; line-height: 1.55; vertical-align: top; }
.materials-table tbody tr:nth-child(even) { background: #fbfcfd; }
.materials-table tbody tr:hover { background: #f4f8fb; }
.materials-table .col-number { width: 39px; padding-left: 17px; }
.materials-table .col-code { width: 88px; }
.materials-table .col-unit { width: 56px; }
.materials-table .col-qty { width: 78px; text-align: right; }
.materials-table th.col-qty, .materials-table td.col-qty { text-align: right; font-family: "DM Mono", monospace; }
.materials-table .col-note { min-width: 120px; }
.materials-table .col-actions { width: 122px; text-align: right; }
.code-badge { display: inline-block; padding: 3px 6px; border: 1px solid #dae6f0; border-radius: 3px; color: var(--blue-700); background: #f0f6fb; font: 500 10px "DM Mono", monospace; }
.unit-badge { display: inline-block; min-width: 28px; padding: 3px 5px; border: 1px solid var(--silver-200); border-radius: 3px; color: #64778d; background: #f4f6f8; text-align: center; font: 9px "DM Mono", monospace; }
.qty-value { color: var(--navy-900) !important; font-weight: 800; white-space: nowrap; }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.row-action { min-height: 25px; padding: 0 7px; border: 1px solid var(--silver-200); border-radius: 3px; color: #61748b; background: #fff; font-size: 9px; font-weight: 700; }
.row-action:hover { border-color: #9bb4ca; color: var(--blue-700); background: #f3f8fc; }
.row-action--delete:hover { border-color: #e3c7c9; color: var(--red); background: #fff6f6; }
.empty-state { min-height: 250px; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-logo { width: 58px; height: 58px; margin-bottom: 12px; object-fit: contain; border: 1px solid #c6d4e1; border-radius: 50%; background: #eeece8; box-shadow: 0 3px 9px rgba(22, 43, 69, .1); }
.empty-state strong { color: var(--navy-900); font-size: 12px; }
.empty-state p { max-width: 250px; margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.sheet-footer { display: flex; justify-content: space-between; gap: 15px; padding: 11px 17px; border-top: 1px solid var(--silver-100); color: #8492a0; background: #fbfcfd; font-size: 8px; }
.sheet-footer > span:first-child { display: flex; align-items: center; gap: 6px; }
.footer-led { width: 5px; height: 5px; border-radius: 50%; background: #61a995; }
.bottom-note { display: flex; align-items: center; gap: 9px; padding: 13px 5px; color: #75869a; }
.bottom-note > span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #cfdae4; border-radius: 50%; color: var(--blue-700); font: 9px "DM Mono", monospace; }
.bottom-note p { margin: 0; font-size: 9px; }
.app-footer { display: flex; justify-content: space-between; gap: 15px; padding: 20px 0 4px; border-top: 1px solid var(--silver-200); color: #8a98a7; font-size: 8px; letter-spacing: .4px; }
.app-footer span:first-child { color: #61778f; font-weight: 800; letter-spacing: .8px; }

/* modal, toast y hoja impresa */
.dialog-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(10, 24, 41, .58); backdrop-filter: blur(3px); }
.dialog { width: min(100%, 430px); padding: 25px; border: 1px solid #dce4ec; border-radius: 7px; background: #fff; box-shadow: 0 24px 70px rgba(7, 19, 33, .3); animation: dialog-in .18s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.dialog-symbol { width: 29px; height: 29px; display: grid; place-items: center; margin-bottom: 15px; border: 1px solid #d5ba7a; border-radius: 50%; color: #9d731d; background: #fff9e9; font: 700 14px "DM Mono", monospace; }
.dialog h2 { margin: 5px 0 7px; color: var(--navy-900); font-size: 18px; letter-spacing: -.5px; }
.dialog-copy { margin: 0 0 16px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.duplicate-card { padding: 13px; border: 1px solid var(--silver-200); border-radius: 4px; background: #f8fafc; }
.duplicate-card > strong { display: block; padding-bottom: 10px; color: #44576d; font-size: 11px; line-height: 1.5; }
.duplicate-numbers { display: flex; justify-content: space-between; gap: 8px; color: #738396; font-size: 9px; }
.duplicate-numbers b { display: block; margin-top: 4px; color: var(--navy-900); font: 500 11px "DM Mono", monospace; }
.duplicate-numbers span:last-child b { color: var(--blue-700); }
.duplicate-total { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--silver-300); color: #6b7b8d; font-size: 10px; }
.duplicate-total strong { color: #32856f; font: 500 13px "DM Mono", monospace; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toast-region { position: fixed; z-index: 30; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { max-width: min(370px, calc(100vw - 36px)); padding: 11px 14px; border: 1px solid #bfcedc; border-left: 3px solid var(--blue-600); border-radius: 4px; color: #314961; background: #fff; box-shadow: 0 12px 30px rgba(16, 35, 57, .17); font-size: 10px; line-height: 1.5; animation: toast-in .2s ease-out; }
.toast--error { border-left-color: var(--red); }
.toast--success { border-left-color: #46a17f; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1080px) {
  .page-wrap { padding-inline: 22px; }
  .workspace { grid-template-columns: minmax(260px, 305px) minmax(0, 1fr); gap: 13px; }
  .project-panel, .item-panel { padding: 16px; }
  .sheet-toolbar { padding: 18px 16px 15px; }
  .summary-strip { padding-inline: 16px; }
  .materials-table th, .materials-table td { padding-inline: 8px; }
}
@media (max-width: 820px) {
  .topbar { padding-inline: 18px; }
  .topbar-actions { gap: 6px; }
  .catalog-status { margin-right: 0; font-size: 9px; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); align-items: start; }
  .page-wrap { padding-top: 27px; }
}
@media (max-width: 620px) {
  .topbar { min-height: 68px; padding: 10px 14px; }
  .brand-lockup { gap: 9px; }
  .brand-logo { width: 43px; height: 43px; }
  .brand-logo--large { width: 112px; height: 112px; margin-bottom: 19px; }
  .brand-copy strong { font-size: 11px; }
  .brand-copy small { font-size: 7px; letter-spacing: 1px; }
  .topbar-actions { gap: 4px; }
  .catalog-status { max-width: 126px; white-space: normal; line-height: 1.35; }
  .topbar #syncButton { width: 34px; min-width: 34px; padding: 0; overflow: hidden; gap: 0; font-size: 0; }
  .topbar #syncButton span { font-size: 17px; }
  .topbar #logoutButton { min-width: 34px; padding-inline: 6px; font-size: 9px; }
  .page-wrap { padding: 23px 13px 15px; }
  .page-heading { margin-bottom: 18px; }
  .page-heading h1 { font-size: 25px; }
  .heading-copy { max-width: 280px; font-size: 10px; line-height: 1.6; }
  .heading-stamp { display: none; }
  .sidebar { display: flex; gap: 12px; }
  .project-panel, .item-panel { padding: 16px; }
  .sheet-toolbar { flex-direction: column; gap: 13px; padding: 17px 14px 14px; }
  .sheet-toolbar h2 { font-size: 16px; }
  .sheet-actions { width: 100%; justify-content: flex-start; }
  .sheet-actions .button { flex: 1; padding-inline: 8px; }
  .summary-strip { gap: 10px; min-height: 61px; padding: 10px 14px; }
  .summary-cell { min-width: 94px; gap: 7px; }
  .summary-icon { width: 27px; height: 27px; }
  .summary-cell strong { font-size: 13px; }
  .summary-cell small { font-size: 8px; }
  .sheet-ref { font-size: 7px; }
  .sheet-ref strong { font-size: 8px; }
  .table-scroll { min-height: 225px; }
  .materials-table { min-width: 750px; }
  .materials-table th { font-size: 8px; }
  .sheet-footer { flex-direction: column; gap: 5px; }
  .app-footer { font-size: 7px; }
  .app-footer span:nth-child(2) { text-align: center; }
  .dialog { padding: 20px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
}
@media (max-width: 420px) {
  .brand-copy small { letter-spacing: .5px; }
  .catalog-status { display: none; }
  .page-heading h1 { font-size: 23px; }
  .app-footer span:nth-child(2) { display: none; }
  .access-card { padding: 36px 27px 27px; }
}
@media print {
  @page { size: landscape; margin: 12mm; }
  :root { color-scheme: light; }
  html, body, .app-root, .page-wrap { min-height: 0; background: #fff !important; }
  body { color: #111; font-family: Arial, sans-serif; }
  .no-print, .sidebar, .bottom-note, .app-footer, .topbar, .page-heading, .sheet-actions, .col-actions, .sheet-ref { display: none !important; }
  .page-wrap { max-width: none; margin: 0; padding: 0; }
  .workspace { display: block; }
  .main-column { width: 100%; }
  .panel, .sheet-panel { overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
  .sheet-toolbar { padding: 0 0 11px; }
  .sheet-toolbar::before { content: "IEEC-INGENIEIRIA360° · CÓMPUTO TÉCNICO EMSA"; display: block; margin-bottom: 8px; color: #244563; font-size: 9pt; font-weight: bold; letter-spacing: 1px; }
  .sheet-toolbar h2 { font-size: 16pt; }
  .sheet-subtitle { white-space: normal; }
  .summary-strip { min-height: 0; padding: 7px 0; border: 0; background: #fff; }
  .table-scroll { min-height: 0; overflow: visible; }
  .materials-table { min-width: 0; font-size: 8pt; }
  .materials-table th, .materials-table td { height: auto; padding: 6px; border: 1px solid #c5cbd2; color: #222; font-size: 8pt; background: #fff !important; }
  .materials-table th { color: #243d59; }
  .code-badge, .unit-badge { color: #243d59; border-color: #d1d6dc; background: #f3f4f6; }
  .empty-state { min-height: 70px; }
  .sheet-footer { padding: 7px 0; border-top: 1px solid #ccd2d8; background: #fff; font-size: 7pt; }
}
