:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --text: #111827;
  --muted: #6b7280;
  --border: #e4e7ec;
  --accent: #c2652a;
  --accent-soft: #fbeee5;
  --accent-text: #ffffff;
  --danger: #c0352b;
  --warn-bg: #fff6e0;
  --warn-border: #e8b93f;
  --side-bg: #15171c;
  --side-text: #a9afbb;
  --side-active: #23262e;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --radius: 12px;
  /* papel de los dibujos: siempre claro, como un plano */
  --paper: #fcfbf8;
  --paper-grid: #efece5;
  --ink: #34322d;
  --dim: #1f5fbf;
  --band: #e07a1f;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1014;
    --surface: #171a20;
    --surface-2: #1d2128;
    --text: #e8eaee;
    --muted: #9aa1ad;
    --border: #2a2f38;
    --accent: #e08a4f;
    --accent-soft: #3a2619;
    --accent-text: #15171c;
    --danger: #f08a80;
    --warn-bg: #33291a;
    --warn-border: #a8842c;
    --side-bg: #0a0b0e;
    --side-active: #1d2027;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14.5px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: 1.6rem; margin: .25rem 0; letter-spacing: -.02em; }
h2 { font-size: 1.05rem; margin: 0; letter-spacing: -.01em; }
h3 { font-size: .98rem; margin: 0; }
svg { flex-shrink: 0; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--side-bg); color: var(--side-text);
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.25rem .9rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: .7rem; padding: 0 .4rem; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-1, #e08a4f), var(--brand-2, #b4531f));
}
.brand-mark svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.brand-mark.has-logo { background: #fff; padding: 3px; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; }
.brand-author { font-size: .72rem; color: #6c7280; padding: 0 .65rem .5rem; }
.auth-author { margin-top: 1rem; text-align: center; font-size: .75rem; color: var(--muted); }
.brand-author a, .auth-author a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.brand-author a:hover, .auth-author a:hover { color: var(--accent); }
.color-row { display: flex; gap: .5rem; align-items: center; }
.print-head { display: none; }
.brand-name { color: #fff; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-sub { font-size: .75rem; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.menu-btn { display: none; }
.nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: .9rem .6rem .35rem; color: #6c7280; font-weight: 600; }
.nav button, .sidebar-foot button {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  background: none; border: none; color: inherit; text-align: left;
  padding: .55rem .65rem; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 500;
}
.nav button svg, .sidebar-foot button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav button:hover, .sidebar-foot button:hover { background: var(--side-active); color: #fff; }
.nav button.active { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 var(--brand-1, #e08a4f); }
.sidebar-foot { margin-top: auto; border-top: 1px solid #262931; padding-top: .9rem; display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }

.content { min-width: 0; display: flex; flex-direction: column; }
.page-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.75rem; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5;
}
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.project-name {
  font: 700 1.3rem/1.2 inherit; letter-spacing: -.02em; border: 1px solid transparent; background: transparent;
  padding: .1rem .3rem; margin-left: -.35rem; border-radius: 6px; width: min(420px, 100%);
}
.project-name:hover, .project-name:focus { border-color: var(--border); background: var(--surface-2); outline: none; }

.kpis { display: flex; flex-wrap: wrap; gap: .5rem; }
.kpi { padding: .45rem .9rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); min-width: 92px; }
.kpi-label { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kpi-value { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.kpi.accent { background: var(--accent-soft); border-color: transparent; }
.kpi.accent .kpi-value { color: var(--accent); }

main { padding: 1.5rem 1.75rem 3rem; max-width: 1500px; width: 100%; }
.tab { display: none; }
.tab.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Paneles ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.25rem; min-width: 0; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  padding: .85rem 1.1rem; border-bottom: 1px solid var(--border);
}
.panel-body { padding: 1.1rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.75rem 0 .85rem; flex-wrap: wrap; }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 1.25rem; align-items: start; }
.design-grid { display: grid; grid-template-columns: minmax(320px, 400px) 1fr; gap: 1.25rem; align-items: start; }

.hint { color: var(--muted); font-size: .85rem; margin: 0 0 .9rem; }
.muted { color: var(--muted); font-size: .85rem; }
.empty, .empty-state { color: var(--muted); text-align: center; padding: 1.5rem; }
.empty-state { border: 1.5px dashed var(--border); border-radius: var(--radius); background: var(--surface); }
.mono { font-variant-numeric: tabular-nums; white-space: nowrap; }
.c { text-align: center; }
.r { text-align: right; }

/* ---------- Controles ---------- */
input, select, button { font: inherit; color: inherit; }
input, select {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .45rem .6rem; min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }
input.swatch { width: 38px; height: 30px; padding: 2px; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
  padding: .5rem .95rem; cursor: pointer; font-weight: 500; box-shadow: var(--shadow); white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: .35rem .7rem; font-size: .85rem; }
.icon-btn { border: none; background: none; cursor: pointer; padding: .3rem .5rem; border-radius: 6px; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.danger:hover { color: var(--danger); }
.link { background: none; border: none; padding: 0; color: var(--accent); cursor: pointer; font-weight: 500; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: none; background: none; padding: .35rem .8rem; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: .88rem; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.switch { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .88rem; color: var(--muted); }
.switch input { display: none; }
.switch span { width: 34px; height: 20px; border-radius: 20px; background: var(--border); position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }

.field { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; font-weight: 500; color: var(--muted); margin-bottom: .75rem; }
.field input, .field select { color: var(--text); font-size: .95rem; font-weight: 400; width: 100%; }
.field.check { flex-direction: row; align-items: center; gap: .55rem; color: var(--text); font-size: .9rem; }
.field.check input { width: 17px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 .85rem; }
.form-grid.cols3 { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); }
.form-sub { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; color: var(--muted); margin: .4rem 0 .6rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.span2 { grid-column: 1 / -1; }
.acc-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.acc-grid .field:first-child { grid-column: 1 / -1; }
.field-note { font-size: .74rem; font-weight: 400; color: var(--muted); line-height: 1.3; }
.form-actions { display: flex; gap: .5rem; margin-top: .5rem; }
.form-actions .btn.primary { flex: 1; padding: .65rem; }
.input-unit { position: relative; }
.input-unit input { padding-right: 2.3rem; }
.input-unit span { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font-size: .75rem; color: var(--muted); pointer-events: none; }

/* ---------- Selector de plantillas ---------- */
.tpl-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-bottom: .8rem; }
.tpl-btn {
  display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .55rem .2rem;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer;
  font-size: .7rem; font-weight: 500; color: var(--muted); text-align: center; line-height: 1.15;
}
.tpl-btn svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.tpl-btn:hover:not(:disabled) { border-color: var(--accent); }
.tpl-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tpl-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Vista previa ---------- */
.preview { aspect-ratio: 4 / 3; max-height: 62vh; width: 100%; display: flex; }
.preview .dw { width: 100%; height: 100%; }
.preview-error { margin: auto; color: var(--danger); padding: 1rem; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.chip { font-size: .8rem; padding: .25rem .65rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.chip b { color: var(--text); font-weight: 600; }

/* ---------- Dibujo técnico ---------- */
.dw {
  display: block; border-radius: 10px; border: 1px solid var(--border);
  background-color: var(--paper);
  background-image: linear-gradient(var(--paper-grid) 1px, transparent 1px), linear-gradient(90deg, var(--paper-grid) 1px, transparent 1px);
  background-size: 22px 22px;
}
.dw.thumb, .dw.piece { background-image: none; }
.dw .pc { stroke: var(--ink); stroke-width: .9; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dw .cut { stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.dw .hatch { stroke: rgba(52, 50, 45, .35); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dw .hdl { stroke: none; }
.dw .hinge { fill: none; stroke: #8a8780; stroke-width: .9; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.dw .ext { stroke: var(--dim); stroke-width: .7; opacity: .7; vector-effect: non-scaling-stroke; }
.dw .dl { stroke: var(--dim); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dw .tick { stroke: var(--dim); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.dw .dim-text {
  fill: var(--dim); stroke: var(--paper); paint-order: stroke; stroke-linejoin: round;
  text-anchor: middle; dominant-baseline: central; font-weight: 600; font-family: Inter, system-ui, sans-serif;
}
.dw .band { stroke: var(--band); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dw .grain { fill: none; stroke: #7c5a3a; stroke-width: 1.4; vector-effect: non-scaling-stroke; }

/* ---------- Editor de mueble personalizado ---------- */
.preview.is-editor { aspect-ratio: auto; max-height: none; display: block; }
.ed-toolbar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .7rem; }
.ed-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); margin-right: .2rem; }
.ed-spacer { flex: 1; }
.ed-qty { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); margin-right: .4rem; }
.ed-qty input { width: 3.6rem; padding: .3rem .4rem; text-align: center; color: var(--text); font-weight: 600; }
.ed-toolbar .switch { margin-left: .4rem; }
.ed-canvas { position: relative; }
.ed-float {
  position: absolute; top: 10px; right: 10px; display: none; align-items: center; gap: .4rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .35rem .4rem .35rem .75rem;
  box-shadow: 0 6px 20px rgba(16, 24, 40, .14); z-index: 2; max-width: calc(100% - 20px); flex-wrap: wrap;
}
.ed-flash {
  position: absolute; left: 50%; top: 14px; transform: translate(-50%, -8px); opacity: 0; pointer-events: none;
  background: #b42318; color: #fff; padding: .55rem 1rem; border-radius: 10px; font-weight: 600; font-size: .9rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.2); transition: opacity .2s, transform .2s; z-index: 3; max-width: 90%; text-align: center;
}
.ed-flash.show { opacity: 1; transform: translate(-50%, 0); }
.ed-float-name { font-size: .85rem; font-weight: 600; margin-right: .2rem; }
.ed-float .btn.danger { border-color: #f2b8b5; }
.ed-float .btn.danger:hover { background: #fde8e8; }
.ed-svg { width: 100%; height: min(60vh, 600px); touch-action: none; user-select: none; }
.dw .ed-el { cursor: move; }
.dw .ed-front { fill-opacity: .6; }
.dw .pc.ed-sel { stroke: var(--accent); stroke-width: 3; fill-opacity: 1; }
.dw .pc.ed-bad { stroke: #dc2626; stroke-width: 2.5; }
.dw .ed-hit { fill: transparent; stroke: transparent; stroke-width: 16; vector-effect: non-scaling-stroke; pointer-events: all; cursor: move; }
.dw .ed-hole { fill: rgba(224, 138, 79, .22); stroke: #c2652a; stroke-width: 2.5; stroke-dasharray: 7 5; vector-effect: non-scaling-stroke; pointer-events: none; }
.dw .dim, .dw .hdl, .dw .hinge, .dw .inner, .dw .seldim { pointer-events: none; }
.dw .inner .dl, .dw .inner .ext, .dw .inner .tick { stroke: #0f766e; }
.dw .inner .dim-text { fill: #0f766e; }
.dw .seldim .dl, .dw .seldim .ext, .dw .seldim .tick { stroke: #c2410c; }
.dw .seldim .dim-text { fill: #c2410c; }
.ed-info { margin: .7rem 0 .2rem; }
.chip.hl { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip.hl b { color: var(--accent); }
.chip.bad { background: #fde8e8; border-color: #f5b5b5; color: #b42318; }
.ed-props { margin-top: .8rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.ed-props-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .7rem; }
.ed-name { flex: 1; min-width: 160px; max-width: 280px; }
.form-grid.cols4 { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.ed-edges { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: .4rem; }
.ed-edges .field { margin: 0; }
.ed-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .8rem; }

/* ---------- Ingreso y usuarios ---------- */
[hidden] { display: none !important; }
.auth-overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 30% 20%, #2a1d14, #0e0f13 60%);
}
.auth-card {
  width: min(400px, 100%); background: var(--surface); color: var(--text); border-radius: 16px; padding: 1.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45); border: 1px solid var(--border);
}
.auth-card h2 { margin: 1.25rem 0 .9rem; font-size: 1.2rem; }
.auth-brand { padding: 0; }
.auth-title { font-weight: 700; font-size: 1.15rem; }
.auth-error { color: var(--danger); font-size: .85rem; min-height: 1.2em; margin: .2rem 0 .6rem; }
.auth-submit { width: 100%; padding: .7rem; }
.user-box { padding: .4rem .4rem .7rem; margin-bottom: .4rem; border-bottom: 1px solid #262931; }
.user-chip { display: flex; align-items: center; gap: .6rem; padding: 0 .25rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-1, #e08a4f); color: #15171c; font-weight: 700; flex: 0 0 auto; }
.user-name { color: #fff; font-weight: 600; font-size: .9rem; }
.user-role { font-size: .72rem; }
.user-actions { display: flex; gap: .3rem; margin-top: .5rem; }
.user-actions button { flex: 1; justify-content: center; font-size: .8rem; padding: .35rem .4rem; border: 1px solid #2c3039 !important; }

/* ---------- Roles ---------- */
.proj-owner { font-size: .85rem; }
.quote-side.locked input, .quote-side.locked select, .quote-side.locked .logo-actions { pointer-events: none; opacity: .65; }
/* Solo lectura (taller o proyecto ajeno sin permiso): se ve todo, no se modifica nada */
body.read-only .design-grid,
body.read-only #tpl-actions, body.read-only .furn-actions [data-edit], body.read-only .furn-actions [data-del-furn],
body.read-only #piece-add, body.read-only #piece-reband, body.read-only #pieces-seg,
body.read-only #btn-new, body.read-only #btn-import, body.read-only #proj-new, body.read-only #proj-import,
body.read-only .ficha-head [data-edit], body.read-only #hw-add, body.read-only #hw-regen { display: none !important; }
body.read-only #project-name { pointer-events: none; }
body[data-role="taller"] .kpi.accent { display: none; }

/* ---------- Proyectos y guardado ---------- */
.save-status { font-size: .78rem; margin-top: .15rem; color: var(--muted); min-height: 1.1em; }
.save-status.ok { color: #15803d; }
.save-status.pending { color: var(--muted); }
.save-status.warn { color: #b45309; }
.save-status.bad { color: var(--danger); font-weight: 600; }
.proj-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.proj-toolbar input { width: min(320px, 100%); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.proj-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1rem .2rem; display: flex; flex-direction: column; gap: .35rem; }
.proj-card.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.proj-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.proj-name { font-weight: 600; font-size: 1.02rem; }
.proj-card .chips { margin-top: .3rem; }
.proj-card .furn-actions { padding: .6rem 0 1rem; }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------- Muebles del proyecto ---------- */
.furn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.furn-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.furn-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
.furn-card.editing { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.furn-thumb { height: 170px; padding: .6rem; background: var(--paper); cursor: pointer; border-bottom: 1px solid var(--border); }
.furn-thumb .dw { width: 100%; height: 100%; border: none; background: none; }
.furn-info { padding: .8rem 1rem .4rem; }
.furn-name { font-weight: 600; }
.furn-actions { display: flex; gap: .4rem; padding: .6rem 1rem 1rem; flex-wrap: wrap; }

/* ---------- Ficha técnica ---------- */
.ficha-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.views-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1rem; }
.view-card { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem; box-shadow: var(--shadow); }
.view-card figcaption { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; color: var(--muted); margin-bottom: .5rem; }
.view-card .dw { width: 100%; height: 360px; }

.piece-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; }
.piece-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; break-inside: avoid; }
.piece-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .7rem .9rem .3rem; }
.piece-name { font-weight: 600; }
.qty { background: var(--text); color: var(--surface); border-radius: 999px; padding: .05rem .55rem; font-size: .8rem; font-weight: 600; }
.piece-draw { height: 160px; margin: .3rem .7rem; padding: .4rem; background: var(--paper); border-radius: 8px; }
.piece-draw .dw { width: 100%; height: 100%; border: none; background: none; }
.piece-meta { padding: .3rem .9rem .85rem; display: flex; flex-direction: column; gap: .15rem; }
.piece-meta .cut { font-size: .92rem; }
.piece-meta .cut b { font-variant-numeric: tabular-nums; }
.tags { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.tag { font-size: .72rem; padding: .1rem .45rem; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-weight: 500; }
.tag.band { background: #fdf0e3; border-color: #f2c79c; color: #a4520f; }

/* ---------- Bisagras ---------- */
.hinge-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.hinge-card { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem; box-shadow: var(--shadow); break-inside: avoid; }
.hinge-draw { background: var(--paper); border-radius: 8px; padding: .3rem; }
.hinge-draw .dw { width: 100%; height: 100%; min-height: 320px; border: none; background: none; }
.hinge-title { font-weight: 600; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.hinge-table { margin-top: .5rem; }
.hinge-table td:first-child { color: var(--muted); white-space: nowrap; vertical-align: top; width: 1%; padding-right: .8rem; }
.alert.small { padding: .4rem .7rem; font-size: .85rem; margin: .5rem 0 0; }
@media (max-width: 600px) { .hinge-card { grid-template-columns: 1fr; } }

/* ---------- Herrajes y perforaciones ---------- */
.drill-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1rem; }
.drill-card { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem; box-shadow: var(--shadow); break-inside: avoid; }
.drill-draw { background: var(--paper); border-radius: 8px; padding: .3rem; }
.drill-draw .dw { width: 100%; height: 100%; min-height: 240px; border: none; background: none; }
.drill-list { margin: .6rem 0 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .35rem; font-size: .88rem; }
.hw-cat tr.grp td { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); background: var(--surface-2); padding-top: .6rem; }
@media (max-width: 600px) { .drill-card { grid-template-columns: 1fr; } }

/* ---------- Cotización ---------- */
.quote-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: 1rem; }
.field.inline { margin: 0; min-width: 200px; }
.quote-grid { display: grid; grid-template-columns: minmax(280px, 340px) 1fr; gap: 1.25rem; align-items: start; }
.form-grid.cols2 { grid-template-columns: 1fr 1fr; }
.logo-box { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; min-height: 64px; }
.logo-box img { max-width: 140px; max-height: 64px; object-fit: contain; background: #fff; border-radius: 6px; padding: 4px; }
.logo-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
/* La hoja siempre en claro, como papel */
.quote-paper {
  background: #fff; color: #1f2328; border-radius: 6px; box-shadow: 0 6px 30px rgba(0,0,0,.25);
  padding: 2.2rem 2.4rem; font-size: 13.5px; line-height: 1.45; max-width: 900px; width: 100%;
  --q-accent: #c2652a; --q-line: #e5e7eb; --q-muted: #6b7280;
}
.quote-paper .q-in { font: inherit; color: inherit; background: transparent; border: 1px dashed transparent; border-radius: 4px; padding: .1rem .25rem; }
.quote-paper .q-in:hover { border-color: #d1d5db; }
.quote-paper .q-in:focus { outline: none; border-color: var(--q-accent); background: #fffaf5; box-shadow: none; }
.quote-paper .q-wide { width: 100%; }
.quote-paper .q-num { width: 6.5rem; }
.quote-paper .q-unit { width: 5rem; }
.q-head { display: flex; justify-content: space-between; gap: 1.5rem; padding-bottom: 1rem; border-bottom: 3px solid var(--q-accent); margin-bottom: 1.1rem; flex-wrap: wrap; }
.q-brand { display: flex; gap: 1rem; align-items: center; }
.q-logo { max-width: 150px; max-height: 80px; object-fit: contain; }
.q-company { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; }
.q-small { font-size: .82rem; color: var(--q-muted); }
.q-meta { text-align: right; display: flex; flex-direction: column; gap: .15rem; align-items: flex-end; }
.q-title { font-size: 1.5rem; font-weight: 800; color: var(--q-accent); letter-spacing: .04em; }
.q-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--q-muted); margin: 1rem 0 .4rem; }
.q-client-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem .8rem; }
.q-items { list-style: none; margin: 0 0 .3rem; padding: 0; }
.q-items li { display: flex; align-items: center; gap: .3rem; padding: .1rem 0; }
.q-items li::before { content: "•"; color: var(--q-accent); font-weight: 700; }
.q-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.q-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--q-muted); border-bottom: 2px solid var(--q-line); padding: .35rem .3rem; }
.q-table th.r, .q-table td.r { text-align: right; }
.q-table td { padding: .2rem .3rem; border-bottom: 1px solid var(--q-line); vertical-align: middle; }
.q-sec { color: #1f2328 !important; font-size: .9rem !important; text-transform: none !important; letter-spacing: 0 !important; }
.q-sec-in { font-weight: 700; }
.q-subtotal td { font-weight: 600; border-bottom: none; background: #f9fafb; }
.q-total { display: flex; justify-content: space-between; align-items: center; margin-top: 1.2rem; padding: .8rem 1rem; background: #1f2328; color: #fff; border-radius: 6px; font-size: 1.25rem; font-weight: 800; }
.q-pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.q-pay-box { border: 1px solid var(--q-line); border-radius: 6px; padding: .6rem .8rem; }
.q-pay-amount { font-size: 1.2rem; font-weight: 800; }
.q-cuotas td { font-size: .9rem; }
.q-notes { width: 100%; resize: vertical; }
.q-foot { margin-top: 1.5rem; padding-top: .8rem; border-top: 1px solid var(--q-line); color: var(--q-muted); font-size: .82rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.quote-paper .btn { box-shadow: none; background: #f3f4f6; color: #374151; border-color: #e5e7eb; }
.quote-paper .btn:hover { border-color: var(--q-accent); }
.quote-paper .icon-btn { color: #9ca3af; }
.quote-paper .q-edit { display: block; min-height: 1.4em; white-space: normal; word-break: break-word; }
.quote-paper .q-desc { width: 55%; }
.print-only { display: none; }
@media (max-width: 1100px) { .quote-grid { grid-template-columns: 1fr; } }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
.grid-table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.grid-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; padding: .55rem .45rem; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.grid-table td { padding: .3rem .45rem; border-bottom: 1px solid var(--border); }
.grid-table tbody tr:hover td { background: var(--surface-2); }
.grid-table td input:not([type="checkbox"]):not([type="color"]), .grid-table td select { padding: .32rem .45rem; border-color: transparent; background: transparent; }
.grid-table td input:hover, .grid-table td select:hover { border-color: var(--border); }
.grid-table.compact td { padding: .35rem .45rem; }
.w-xs { width: 4.5rem; } .w-sm { width: 6.5rem; } .w-md { width: 10rem; } .w-lg { width: 15rem; }

.budget td { padding: .6rem .45rem; }
.band-det { margin-top: .3rem; }
.band-det summary { font-size: .8rem; margin-bottom: .2rem; }
.budget tr.sub td { font-weight: 600; border-top: 2px solid var(--border); }
.budget tr.total td { font-weight: 700; font-size: 1.25rem; border-top: 2px solid var(--accent); border-bottom: none; color: var(--accent); }

/* ---------- Plan de corte ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.stat-top { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .85rem; font-weight: 500; }
.swatch-dot { width: 12px; height: 12px; border-radius: 4px; border: 1px solid rgba(0,0,0,.15); }
.stat-value { font-size: 1.6rem; font-weight: 700; margin: .2rem 0 .4rem; letter-spacing: -.02em; }
.stat-value small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.bar { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; margin-bottom: .4rem; border: 1px solid var(--border); }
.bar span { display: block; height: 100%; background: var(--accent); }
.alert { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; }

.board-svg { width: 100%; height: auto; display: block; margin-bottom: .6rem; border-radius: 8px; background: var(--paper); }
.sv-board { fill: #e3ddd0; }
.sv-usable { fill: #fbf9f4; }
.sv-piece { fill-opacity: .4; stroke: #34322d; stroke-width: 1; vector-effect: non-scaling-stroke; }
.sv-edge { stroke: var(--band); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sv-text { fill: #23211d; text-anchor: middle; font-weight: 600; font-family: Inter, system-ui, sans-serif; }
.sv-dim { font-weight: 400; }
details summary { cursor: pointer; color: var(--muted); font-size: .88rem; margin-bottom: .5rem; font-weight: 500; }

/* ---------- Optimizador de cortes ---------- */
.quick-grid { display: grid; grid-template-columns: minmax(330px, 430px) 1fr; gap: 1.25rem; align-items: start; }
.preset-row { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .9rem; }
.chip-btn { border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: .3rem .75rem; font-size: .82rem; cursor: pointer; font-weight: 500; }
.chip-btn:hover { border-color: var(--accent); }
.chip-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.quick-add { display: flex; gap: .5rem; align-items: stretch; margin-bottom: .9rem; }
.quick-add textarea { flex: 1; resize: vertical; min-height: 2.6rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .45rem .6rem; }
.quick-add textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem; }
.opt-card {
  text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: .9rem 1rem; cursor: pointer; display: flex; flex-direction: column; gap: .45rem; font: inherit; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.opt-card:hover { border-color: var(--accent); }
.opt-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.opt-top { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.opt-name { font-weight: 700; }
.opt-icon svg { width: 64px; height: 50px; }
.ic-board { fill: var(--surface-2); stroke: var(--muted); stroke-width: 1.2; }
.ic-full { stroke: #dc2626; stroke-width: 2.2; fill: none; }
.ic-sec { stroke: #2563eb; stroke-width: 1.4; fill: none; stroke-dasharray: 3 2; }
.opt-desc { font-size: .82rem; color: var(--muted); line-height: 1.35; }
.opt-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem .3rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: .5rem 0; }
.opt-stats div { display: flex; flex-direction: column; }
.opt-stats b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.opt-stats span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.q-board .qcut { stroke: #2563eb; stroke-width: 2; stroke-dasharray: 7 4; vector-effect: non-scaling-stroke; }
.q-board .qcut.full { stroke: #dc2626; stroke-width: 3; stroke-dasharray: none; }
.q-board .qno circle { fill: #2563eb; }
.q-board .qno.full circle { fill: #dc2626; }
.q-board .qno text { fill: #fff; text-anchor: middle; font-weight: 700; font-family: Inter, system-ui, sans-serif; }
.q-board .sv-left { fill: rgba(22, 163, 74, .12); stroke: #16a34a; stroke-dasharray: 6 4; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .8rem; color: var(--muted); margin: .2rem 0 1rem; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.lg { display: inline-block; width: 22px; height: 0; border-top: 3px solid #dc2626; }
.lg.sec { border-top: 2px dashed #2563eb; }
.lg.left { height: 10px; border: 1px dashed #16a34a; background: rgba(22, 163, 74, .15); }
.q-table td input:not([type="checkbox"]) { width: 100%; min-width: 4.1rem; padding-left: .3rem; padding-right: .1rem; }
.q-table td:nth-child(4) input { min-width: 2.9rem; }
.q-table td:first-child input { min-width: 5rem; }
.q-table th, .q-table td { padding-left: .2rem; padding-right: .2rem; }
.q-table .icon-btn { padding: .3rem .35rem; }
.q-board .q-label { fill: var(--muted); }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.steps-grid h4 { margin: 0 0 .6rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .88rem; }
.steps li { display: flex; gap: .6rem; align-items: flex-start; padding: .35rem .5rem; border-radius: 8px; }
.steps li.step-full { background: rgba(220, 38, 38, .07); }
.cut-no { flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: #fff; background: #2563eb; }
.step-full .cut-no { background: #dc2626; }
.step-trim .cut-no { background: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .design-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: column; gap: .6rem; padding: .8rem 1rem; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .nav-label { display: none; }
  .nav button { white-space: nowrap; width: auto; }
  .nav button.active { box-shadow: inset 0 -3px 0 var(--brand-1, #e08a4f); }
  .sidebar-foot { flex-direction: row; flex-wrap: wrap; margin-top: 0; padding-top: .6rem; }
  .sidebar-foot button { width: auto; }
  .page-head { position: static; padding: 1rem; }
  main { padding: 1rem 1rem 2rem; }
  .tpl-picker { grid-template-columns: repeat(3, 1fr); }
  .view-card .dw { height: 280px; }
}

/* ---------- Celular ---------- */
@media (max-width: 640px) {
  html { -webkit-text-size-adjust: 100%; }
  /* Barra superior fija y compacta: marca + ☰ y debajo las secciones deslizables */
  .sidebar { position: sticky; top: 0; z-index: 20; padding: .5rem .75rem .35rem; gap: .35rem; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
  .brand { padding: 0; margin: 0; gap: .6rem; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  .brand-mark svg { width: 18px; height: 18px; }
  .brand-sub { display: none; }
  .brand > div:nth-child(2) { flex: 1; min-width: 0; }
  .brand-name { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-btn { display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto; border-radius: 8px; border: 1px solid #2c3039; background: none; color: inherit; cursor: pointer; }
  .menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  body.menu-open .menu-btn { background: var(--side-active); color: #fff; }
  .nav { margin: 0 -.75rem; padding: 0 .75rem; scrollbar-width: none; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 .75rem, #000 calc(100% - 2rem), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 .75rem, #000 calc(100% - 2rem), transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { padding: .5rem .7rem; font-size: .9rem; gap: .45rem; scroll-snap-align: center; }
  .nav button svg { width: 16px; height: 16px; }
  /* Usuario e importar/exportar: dentro del menú ☰ */
  .sidebar-foot { display: none; }
  body.menu-open .sidebar-foot { display: flex; flex-direction: column; flex-wrap: nowrap; border-top: 1px solid #262931; padding: .5rem 0 .3rem; }
  body.menu-open .sidebar-foot button { width: 100%; padding: .7rem .65rem; }
  .user-box { border-bottom: 1px solid #262931; }
  /* Encabezado del proyecto: nombre y números en una fila deslizable */
  .page-head { padding: .6rem .75rem; gap: .45rem; }
  .title-block { width: 100%; }
  .eyebrow { display: none; }
  .project-name { font-size: 1.1rem; width: 100%; }
  .save-status { font-size: .75rem; }
  .kpis { flex-wrap: nowrap; overflow-x: auto; width: 100%; gap: .35rem; scrollbar-width: none; }
  .kpis::-webkit-scrollbar { display: none; }
  .kpi { flex: 0 0 auto; min-width: 0; padding: .3rem .6rem; border-radius: 8px; }
  .kpi-label { font-size: .62rem; }
  .kpi-value { font-size: .92rem; }
  main { padding: .75rem .75rem 2rem; }
  .panel-head { flex-wrap: wrap; gap: .5rem; }
  .tpl-picker { grid-template-columns: repeat(3, 1fr); gap: .4rem; }
  .view-card .dw { height: 240px; }
  /* Controles cómodos para el dedo (y sin zoom automático del iPhone al tocar un campo) */
  input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea { font-size: 16px; }
  .btn { min-height: 38px; }
  /* Cotización: la hoja se adapta al ancho del teléfono */
  .quote-paper { padding: 1rem .8rem; font-size: 12.5px; }
  .q-head { gap: .8rem; }
  .quote-paper .q-desc { width: auto; }
  .q-table td input:not([type="checkbox"]) { min-width: 0; }
  .q-table td:first-child input, .q-table td:nth-child(4) input { min-width: 0; }
  .quote-paper .q-num { width: 5rem; }
  .quote-paper .q-unit { width: 3.6rem; }
  .quote-grid > * { min-width: 0; }
  .q-head > * { min-width: 0; max-width: 100%; }
  .q-brand { flex-wrap: wrap; }
  .q-meta { text-align: left; align-items: flex-start; }
  .q-client-grid { grid-template-columns: 1fr; }
  .quote-paper input { max-width: 100%; }
}
/* Ítems de la cotización como tarjetas en el teléfono (la impresión sigue en tabla) */
@media screen and (max-width: 640px) {
  .q-table thead tr { display: block; }
  .q-table thead th:not(.q-sec) { display: none; }
  .q-table thead th.q-sec { display: block; }
  .q-table tr.q-line { display: grid; grid-template-columns: 1fr 1fr 1.3fr 1.3fr 2rem; align-items: end; gap: 0 .3rem; padding: .35rem 0; border-bottom: 1px solid var(--q-line); }
  .q-table tr.q-line td { border: none; padding: 0; min-width: 0; }
  .q-table tr.q-line td.q-desc { grid-column: 1 / -1; width: auto; margin-bottom: .2rem; }
  .q-table tr.q-line td[data-l]::before { content: attr(data-l); display: block; font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; color: var(--q-muted); text-align: left; }
  .q-table tr.q-line td input { width: 100%; }
  .q-table tr.q-line td.mono { align-self: end; padding-bottom: .15rem; }
}

/* ---------- Impresión ---------- */
@media print {
  .sidebar, .page-head, .no-print, #btn-print, .link, .furn-actions { display: none !important; }
  .print-head:not(:empty) { display: flex; align-items: center; gap: 1rem; padding-bottom: .6rem; margin-bottom: 1rem; border-bottom: 2px solid #c2652a; font-size: .85rem; color: #374151; }
  .print-head img { max-height: 50px; max-width: 140px; object-fit: contain; }
  .print-head b { font-size: 1.1rem; color: #111827; }
  body.print-quote .print-head { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .panel, .view-card, .piece-card, .stat { box-shadow: none; }
  .view-card, .board-card { break-inside: avoid; }
  .views-grid { grid-template-columns: 1fr 1fr; }
  .view-card .dw { height: 300px; }
  .dw { background-image: none; }
  .tab.active { animation: none; }
  body.print-quick .quick-grid { display: block; }
  body.print-quote .quote-grid { display: block; }
  body.print-quote .quote-paper { box-shadow: none; padding: 0; max-width: none; border-radius: 0; }
  body.print-quote .q-in { border: none !important; padding: 0; }
  body.print-quote .print-only { display: inline; }
  body.print-quote .q-in::placeholder { color: transparent; }
  body.print-quote .q-total { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.print-quote .q-subtotal td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.print-quick .quick-grid > div:first-child, body.print-quick .opt-grid, body.print-quick #q-print { display: none; }
}
