/* Forjado Studio · interfaz interna. Neutros cálidos, Geist + Geist Mono, acento naranja industrial solo para alertas. */
:root {
  --bg: #F7F6F3; --panel: #FFFFFF; --soft: #F2F0EC; --line: #E7E5E0; --line-2: #F0EEEA;
  --fg: #1C1B19; --fg-2: #3A3834; --muted: #5F5B53; --muted-2: #6B6862;
  --warn: #8A2C07; --warn-bg: #FCF1EA; --danger: #B42318;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: #A3360A; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(194, 65, 12, .35); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.k { font-size: 13.5px; color: var(--muted-2); }
.eyebrow { font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
h1 { margin: 0; font-size: 32px; font-weight: 650; letter-spacing: -0.025em; text-wrap: balance; }
h2 { margin: 0; font-size: 18px; font-weight: 650; }
h3 { margin: 0; font-size: 16.5px; font-weight: 650; }

/* layout */
.top { background: var(--panel); border-bottom: 1px solid var(--line); }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 24px; }
.top .wrap { padding-block: 12px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { width: 34px; height: 34px; border-radius: 8px; background: var(--fg); color: var(--bg); display: flex; align-items: center; justify-content: center; }
.brand b { display: block; font-size: 17px; letter-spacing: -0.01em; }
.brand small { display: block; font-size: 12.5px; color: var(--muted-2); }
.nav { display: flex; gap: 6px; flex: 1 1 auto; flex-wrap: wrap; }
.navb { min-height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: #4A4843; font-size: 15px; font-weight: 500; }
.navb:hover { background: #ECEAE5; color: var(--fg); }
.navb.on { background: var(--fg); color: #fff; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #DCD6CC; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
main.wrap { padding-block: 32px 80px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.head p { margin: 6px 0 0; font-size: 16px; color: var(--muted); }
.row-wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.row-wrap > * { min-width: 0; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid #DEDBD5; background: var(--panel); color: var(--fg); font-size: 14.5px; font-weight: 500; white-space: nowrap; text-decoration: none; }
.btn:hover { background: #F4F3F0; }
.btn.p { background: var(--fg); border-color: var(--fg); color: #fff; }
.btn.p:hover { background: #3A3834; }
.btn.s { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn.danger { color: var(--warn); }
.btn.solid-danger { background: #A3360A; border-color: #A3360A; color: #fff; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid #DEDBD5; background: var(--panel); font-size: 14px; color: var(--fg-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip:hover { border-color: #B9B5AD; }
.chip.on { background: var(--fg); color: #fff; border-color: var(--fg); }
.chip .mono { font-size: 12.5px; opacity: .7; }
.inp { min-height: 42px; border: 1px solid #DEDBD5; border-radius: 8px; padding: 0 12px; font-size: 15px; background: var(--panel); width: 100%; }
textarea.inp { padding: 10px 12px; line-height: 1.5; resize: vertical; }
.inp.err { border-color: var(--danger); }
label.lbl { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.errmsg { font-size: 13.5px; color: var(--danger); margin-top: 6px; }
.search { position: relative; flex: 0 1 320px; min-width: 240px; }
.search svg { position: absolute; left: 13px; top: 13px; }
.search .inp { padding-left: 38px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 12px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.card.hov:hover { border-color: #C9C5BD; }
.plain { display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; color: inherit; font: inherit; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 24px; }
.mcard { overflow: hidden; }
.mcard .img { display: block; width: 100%; height: 280px; object-fit: cover; background: #F2F1EE; border-bottom: 1px solid #EFEDE9; }
.mcard .noimg { display: flex; height: 280px; align-items: center; justify-content: center; flex-direction: column; gap: 8px; background: #F2F1EE; border-bottom: 1px solid #EFEDE9; color: var(--muted-2); font-size: 14px; }
.mcard .body { display: block; padding: 20px 22px 22px; }
.mcard .t { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mcard .name { font-size: 20px; font-weight: 650; letter-spacing: -0.015em; }
.mcard .counts { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 13.5px; color: #4A4843; }
.mcard .counts b { font-family: var(--mono); color: var(--fg); }
.alert-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; color: var(--warn); }
.addcard { min-height: 280px; border: 1.5px dashed #CFCBC4; border-radius: 12px; background: transparent; color: #4A4843; font-size: 15px; font-weight: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.addcard span { width: 44px; height: 44px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }

.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 11px; border-radius: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag { font-size: 12px; font-weight: 600; color: #4A4843; background: #EFEDE9; border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.svc { font-size: 13.5px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; color: var(--fg-2); }

/* detail */
.back { align-self: flex-start; border: 0; background: transparent; padding: 4px 0; color: var(--muted); font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }
.meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { min-height: 48px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 15px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.tab:hover { color: var(--fg); }
.tab.on { color: var(--fg); border-bottom-color: var(--fg); font-weight: 600; }
.tab .n { font-family: var(--mono); font-size: 12.5px; color: var(--muted); background: #EFEDE9; border-radius: 5px; padding: 1px 7px; }
.hero { flex: 1.3 1 480px; overflow: hidden; position: relative; min-height: 420px; }
.hero img { display: block; width: 100%; height: 100%; min-height: 420px; object-fit: cover; background: #F2F1EE; }
.hero .badge { position: absolute; right: 14px; bottom: 14px; font-size: 13px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; }
.specs { flex: 1 1 380px; padding: 24px; display: flex; flex-direction: column; gap: 22px; }
.dims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.dims div { border: 1px solid #EFEDE9; border-radius: 10px; padding: 14px; }
.dims .v { font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: -0.02em; margin-top: 4px; }
dl.kv { margin: 10px 0 0; }
dl.kv > div { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 1.3fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid #F4F2EF; }
dl.kv dt { color: var(--muted); font-size: 14.5px; }
dl.kv dd { margin: 0; font-size: 15px; font-weight: 500; }
dl.kv dd small { display: block; font-size: 13px; font-weight: 400; color: var(--warn); }
.sec-h { padding: 20px 24px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pend { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 14px 24px; border-bottom: 1px solid #F4F2EF; }
.pend .prio { align-self: start; text-align: center; font-size: 12px; font-weight: 600; padding: 3px 0; border-radius: 5px; }
.pend b { display: block; font-size: 15px; }
.pend span { display: block; font-size: 14.5px; color: #4A4843; line-height: 1.55; margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stats .card { padding: 16px 18px; }
.stats .v { font-family: var(--mono); font-size: 24px; font-weight: 500; margin-top: 4px; }
.table { overflow-x: auto; }
.table > div { min-width: 980px; }
.tr { display: grid; align-items: start; column-gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.tr.h { align-items: center; padding-block: 12px; border-bottom-color: var(--line); font-size: 13px; color: var(--muted); font-weight: 600; background: #FBFAF8; }
.tr.total { background: #FBFAF8; font-weight: 600; border-bottom: 0; }
.right { text-align: right; }
.cols-piezas { grid-template-columns: 96px minmax(170px, 1.2fr) 56px minmax(150px, 1fr) minmax(130px, .9fr) minmax(170px, 1.1fr) 120px; }
.cols-cuts { grid-template-columns: 96px minmax(150px, 1fr) 70px 110px 120px; }
.note { margin: 16px 24px 20px; padding: 12px 14px; border-radius: 8px; font-size: 14.5px; line-height: 1.55; background: var(--soft); color: var(--fg-2); }
.note.warn { background: var(--warn-bg); color: #7A2806; }
.file { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 24px; border-bottom: 1px solid #F4F2EF; }
.file .ext { height: 42px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; font-weight: 600; }
.file .nm { display: block; font-family: var(--mono); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .ds { display: block; font-size: 13.5px; color: var(--muted); }
.viewer-box { position: relative; }
.viewer-box img { display: block; width: 100%; height: 420px; object-fit: cover; background: #ECEAE6; }
.viewer-box .over { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 22px; background: rgba(22, 21, 19, .8); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.features div { padding: 16px 20px; border-right: 1px solid var(--line-2); }
.features b { display: block; font-size: 15px; }
.features span { font-size: 14px; color: var(--muted); }
.gal { display: grid; gap: 16px; }
.gal .card { overflow: hidden; }
.gal img { display: block; width: 100%; object-fit: cover; background: #F2F1EE; }
.gal .cap { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; font-size: 15px; font-weight: 500; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 20px; }
.plan { overflow: hidden; display: flex; flex-direction: column; }
.plan img { display: block; width: 100%; height: 250px; object-fit: contain; background: #fff; padding: 8px; border-bottom: 1px solid var(--line-2); }
.plan .b { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.plan .b .t { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.plan .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; }
.missing { border: 1.5px dashed #D9B9A6; border-radius: 12px; background: #FDF8F4; padding: 24px; display: flex; flex-direction: column; justify-content: center; gap: 8px; min-height: 300px; }
.missing .eyebrow { color: var(--warn); }
.proc-n { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #E3E1DC; background: #FBFAF8; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 14px; font-weight: 600; flex: none; }
.steps { margin: 0; padding: 8px 24px 12px; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; }
.steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid #F4F2EF; }
.steps b { display: block; font-size: 15px; }
.steps span { font-size: 14px; color: #4A4843; }
.empty { padding: 48px 24px; text-align: center; }
.empty b { display: block; font-size: 17px; }
.empty span { display: block; font-size: 15px; color: var(--muted-2); margin-top: 6px; }

/* suppliers */
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-radius: 10px; background: var(--soft); font-size: 14.5px; color: var(--fg-2); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.scard { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.scard .nm { display: block; font-size: 18px; font-weight: 650; }
.scard .sub { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.scard .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 14px; color: #4A4843; }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; }
.drawer .scrim { position: absolute; inset: 0; border: 0; background: rgba(28, 27, 25, .28); }
.drawer aside { position: relative; width: 600px; max-width: 100%; height: 100%; background: var(--panel); display: flex; flex-direction: column; box-shadow: -16px 0 40px rgba(28, 27, 25, .10); }
.drawer .dh { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 26px; border-bottom: 1px solid var(--line-2); }
.drawer .dh h2 { margin-top: 4px; font-size: 22px; }
.iconbtn { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); display: flex; align-items: center; justify-content: center; flex: none; }
.drawer .db { flex: 1; overflow-y: auto; padding: 22px 26px; display: flex; flex-direction: column; gap: 22px; }
.drawer .df { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px; border-top: 1px solid var(--line-2); }
.form { display: flex; flex-direction: column; gap: 16px; }
dl.datos { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
dl.datos dd { margin: 3px 0 0; font-size: 15px; font-weight: 500; word-break: break-word; }
.qform { border: 1px solid #E3E1DC; border-radius: 10px; padding: 16px; background: #FBFAF8; display: flex; flex-direction: column; gap: 12px; }
.quote { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.quote .t { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.quote .m { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.link-danger { align-self: flex-end; border: 0; background: transparent; color: var(--warn); font-size: 13.5px; padding: 2px 0; }
.confirm { padding: 14px 16px; border-radius: 10px; background: var(--warn-bg); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: #7A2806; }
.dashed { padding: 18px; border: 1px dashed #DEDBD5; border-radius: 10px; font-size: 14.5px; color: var(--muted-2); }

/* lightbox + toast */
.lb { position: fixed; inset: 0; z-index: 80; background: #161513; display: flex; flex-direction: column; color: #EDEBE6; }
.lb .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; }
.lb .bar button { width: 42px; height: 40px; border-radius: 8px; border: 1px solid #3A3834; background: transparent; color: #EDEBE6; display: inline-flex; align-items: center; justify-content: center; }
.lb .stage { flex: 1; min-height: 0; padding: 0 22px 22px; display: flex; align-items: center; justify-content: center; }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 90; display: flex; align-items: center; gap: 10px; background: var(--fg); color: var(--bg); padding: 13px 16px; border-radius: 10px; font-size: 14.5px; box-shadow: 0 10px 30px rgba(28, 27, 25, .25); }
.foot-note { margin: 0; font-size: 13.5px; color: var(--muted-2); }

@media (max-width: 640px) {
  h1 { font-size: 26px; }
  .wrap { padding-inline: 16px; }
  .hero, .hero img { min-height: 280px; }
  .dims .v { font-size: 20px; }
  dl.kv > div { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- v3: ficha reorganizada ---------- */
.title-xl { font-size: 34px; }
.lead { margin: 10px 0 0; font-size: 16px; line-height: 1.65; max-width: 68ch; color: #2E2D2A; }
.hero { flex: 1.25 1 460px; }
.hero-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted-2); text-align: center; padding: 24px; }
.hero-empty b { color: var(--fg); font-size: 16px; }
.side-col { flex: 1 1 360px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.specs { flex: none; }
dl.kv.compact { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
dl.kv.compact > div { grid-template-columns: 1fr; gap: 1px; padding: 10px 0; }
dl.kv.compact dt { font-size: 13px; }
.iso { overflow: hidden; }
.iso .zoom img { height: 340px; object-fit: contain; background: #fff; padding: 12px; }
.zoom { position: relative; display: block; width: 100%; }
.zoom img { display: block; width: 100%; }
.zoom .badge { position: absolute; right: 12px; bottom: 12px; font-size: 13px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; }

.v3d { position: relative; height: min(70vh, 620px); min-height: 380px; background: #fff; touch-action: none; }
.v3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.v3d-canvas:active { cursor: grabbing; }
.v3d-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted-2); font-size: 15px; }
.v3d-bar { position: absolute; left: 14px; top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.v3d-hint { position: absolute; left: 14px; bottom: 12px; font-size: 13px; color: var(--muted-2); pointer-events: none; }
.exploded .zoom img { max-height: 760px; object-fit: contain; background: #fff; }
.file-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.pz { display: grid; grid-template-columns: 56px minmax(0, 1fr) 130px; gap: 14px; align-items: center; padding: 14px 24px; border-bottom: 1px solid #F4F2EF; }
.pz:last-child { border-bottom: 0; }
.pz-code { font-size: 14px; font-weight: 500; }
.pz-main b { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 600; }
.pz-main > span { display: block; font-size: 14px; color: var(--muted); margin-top: 1px; }
.pz-q { font-size: 15px; font-weight: 600; color: var(--muted); }
.pz-act { display: flex; justify-content: flex-end; }
.nop { font-size: 13px; }
.dot-warn { width: 8px; height: 8px; border-radius: 50%; background: #C2410C; display: inline-block; }

.plan-big .zoom img { max-height: 720px; object-fit: contain; background: #fff; padding: 12px; }
.acc { border-bottom: 1px solid #F4F2EF; }
.acc:last-child { border-bottom: 0; }
.acc summary, .missing-row { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 14px; align-items: center; padding: 16px 24px; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { background: #FAF9F7; }
.acc summary b, .missing-row b { display: block; font-size: 15.5px; }
.acc summary .k, .missing-row .k { display: block; }
.acc .chev { display: flex; color: var(--muted); transition: transform .2s; }
.acc[open] .chev { transform: rotate(90deg); }
.acc-body { padding: 0 24px 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.acc-body .zoom { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.acc-body .zoom img { max-height: 560px; object-fit: contain; background: #fff; padding: 8px; }
.missing-row { cursor: default; background: #FDF8F4; }
.missing-row .k { color: var(--warn); }

.fab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 20px; align-items: start; }
.fab-card { overflow: hidden; }
.fab-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.fab-prev img { height: 240px; object-fit: contain; background: #fff; padding: 10px; border-bottom: 1px solid var(--line-2); }
.fab-file { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 20px; }
.fab-file .ext { height: 40px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; font-weight: 600; }
.fab-file .nm { font-family: var(--mono); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cuts > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 13px 20px; border-bottom: 1px solid #F4F2EF; font-size: 14.5px; }
.cuts .tot { background: #FBFAF8; font-weight: 600; border-bottom: 0; }

.seq .zoom img { background: #fff; }
.steps .num { width: 28px; height: 28px; border-radius: 50%; background: var(--fg); color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.steps li { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .top .wrap { gap: 10px 14px; padding-block: 10px; }
  .brand small { display: none; }
  .nav { order: 3; flex: 1 1 100%; }
  .navb { flex: 1 1 0; padding: 0 10px; font-size: 14.5px; }
  main.wrap { padding-block: 20px 64px; }
  .stack { gap: 18px; }
  .head p { font-size: 15px; }
  .title-xl { font-size: 26px; }
  .tabs { gap: 20px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .cards { gap: 16px; }
  .mcard .img, .mcard .noimg { height: 240px; }
  .hero, .hero img { min-height: 300px; }
  .specs { padding: 18px; }
  .iso .zoom img { height: 280px; }
  .sec-h { padding: 16px 18px; }
  .pend { padding: 12px 18px; grid-template-columns: 60px minmax(0, 1fr); }
  .pz { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "q main" "q act"; gap: 8px 10px; padding: 14px 18px; align-items: start; }
  .pz-q { grid-area: q; padding-top: 2px; } .pz-main { grid-area: main; } .pz-act { grid-area: act; justify-content: flex-start; }
  .acc summary, .missing-row { grid-template-columns: minmax(0, 1fr) 24px; padding: 14px 18px; }
  .missing-row { grid-template-columns: 1fr; }
  .acc-body { padding: 0 18px 16px; }
  .file { grid-template-columns: 44px minmax(0, 1fr); padding: 14px 18px; }
  .file .file-act { grid-column: 1 / -1; justify-content: flex-start; }
  .fab-file { grid-template-columns: 44px minmax(0, 1fr); }
  .fab-file .btn { grid-column: 1 / -1; }
  .v3d { height: 62vh; min-height: 340px; }
  .v3d-hint { display: none; }
  .scard { padding: 18px; }
  .drawer .dh, .drawer .db, .drawer .df { padding-inline: 18px; }
  dl.datos { grid-template-columns: 1fr; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
  .lb .bar { padding: 12px 14px; }
  .lb .stage { padding: 0 8px 12px; }
}

/* ---------- hovers y bordes de cards ---------- */
.card.hov { transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.card.hov:hover { border-color: #BDB8AF; box-shadow: 0 10px 28px rgba(28, 27, 25, .09); transform: translateY(-2px); }
.card.hov:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(28, 27, 25, .08); }
.mcard .img { transition: transform .5s ease; }
.mcard:hover .img { transform: scale(1.03); }
.mcard .name { transition: color .18s ease; }
.mcard:hover .name { color: #A3360A; }
.gal .card img, .plan img { transition: transform .4s ease; }
.gal .card:hover img { transform: scale(1.02); }
.addcard { transition: border-color .18s ease, background .18s ease, color .18s ease; }
.addcard:hover { border-color: #8F8A80; background: #FBFAF8; color: var(--fg); }
.zoom .badge { transition: background .18s ease; }
.zoom:hover .badge { background: var(--fg); color: #fff; border-color: var(--fg); }

.scard { border: 1px solid #D9D5CE; border-top-width: 4px; }
.scard:hover { border-color: #BDB8AF; }
.scard .nm { transition: color .18s ease; }
.scard:hover .nm { color: #A3360A; }
.pz, .acc summary, .file { transition: background .15s ease; }
.pz:hover, .file:hover { background: #FAF9F7; }
.update-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 95; display: flex; align-items: center; gap: 12px; background: var(--fg); color: var(--bg); padding: 10px 12px 10px 16px; border-radius: 10px; font-size: 14.5px; box-shadow: 0 10px 30px rgba(28, 27, 25, .25); }
.update-bar .btn { min-height: 34px; }
@media (hover: none) { .card.hov:hover { transform: none; box-shadow: none; } .mcard:hover .img { transform: none; } }
@media (prefers-reduced-motion: reduce) { .card.hov, .mcard .img { transition: none; } .card.hov:hover { transform: none; } }

/* ---------- bordes más claros, visor activable, acordeón animado ---------- */
.card { border-color: #DAD6CF; }
.v3d { border: 2px solid #CFCBC4; border-radius: 12px; margin: 14px; height: min(64vh, 580px); transition: border-color .18s ease, box-shadow .18s ease; }
.v3d.active { border-color: #1C1B19; box-shadow: 0 0 0 4px rgba(28, 27, 25, .08); }
.v3d-canvas { border-radius: 10px; }
.v3d-cover { position: absolute; inset: 0; z-index: 2; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .0); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 22px; cursor: pointer; }
.v3d-cover span { display: inline-flex; align-items: center; gap: 8px; background: var(--fg); color: #fff; font-size: 14.5px; font-weight: 500; padding: 10px 16px; border-radius: 999px; box-shadow: 0 6px 20px rgba(28, 27, 25, .2); transition: transform .18s ease; }
.v3d-cover:hover span { transform: translateY(-2px); }
.v3d-bar { z-index: 3; }
.v3d-done { position: absolute; right: 14px; top: 14px; z-index: 3; }
.lb .stage { cursor: zoom-out; }
.lb .stage img { cursor: default; }
.acc { border-bottom-color: #E9E6E0; }
.acc[open] { background: #FCFBF9; }
.acc[open] summary { background: #F5F3EF; }
.acc[open] .acc-body { animation: accOpen .32s ease both; }
@keyframes accOpen { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .acc[open] .acc-body { animation: none; } }
@media (max-width: 760px) { .v3d { margin: 10px; height: 58vh; } }

/* ---------- hover con borde marcado ---------- */
.card.hov:hover { border-color: #1C1B19; box-shadow: 0 0 0 1px #1C1B19, 0 12px 28px rgba(28, 27, 25, .10); }
.scard:hover { border-color: #1C1B19; }
.addcard:hover { border-color: #1C1B19; border-style: solid; }
.zoom { border-radius: 8px; transition: box-shadow .18s ease; }
.zoom:hover { box-shadow: inset 0 0 0 2px #1C1B19; }
.acc summary:hover { box-shadow: inset 3px 0 0 #1C1B19; }
.chip:hover, .btn:hover { border-color: #1C1B19; }
.btn.p:hover { border-color: #3A3834; }
@media (hover: none) { .card.hov:hover { box-shadow: none; border-color: #DAD6CF; } }
