:root {
  --bg: #f3f6f7; --panel: #ffffff; --ink: #0f1a1f; --ink-2: #33434b; --muted: #66757d; --line: #e2e8eb;
  --brand: #0f9d8a; --brand-ink: #0a6f62; --brand-soft: #e2f4f1;
  --pend: #55677a; --pend-bg: #edf1f5; --prog: #b45309; --prog-bg: #fff3dc;
  --done: #0f766e; --done-bg: #dcf3ee; --inv: #4f46e5; --inv-bg: #ecebff; --urg: #c2410c; --urg-bg: #ffe9dd;
  --radius: 14px; --shadow: 0 1px 2px rgba(15, 26, 31, .05), 0 4px 16px rgba(15, 26, 31, .05);
  color-scheme: light;
  font: 15px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
small { display: block; color: var(--muted); font-size: 12.5px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12.5px; color: var(--ink-2); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; flex: none; }
.r { text-align: right; }

/* Barra de demo */
.demobar { background: #0b0f14; color: #d6dde2; font-size: 13px; position: sticky; top: 0; z-index: 30; }
.db-in { display: flex; align-items: center; gap: 14px; padding: 8px 16px; flex-wrap: wrap; }
.db-kide { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; }
.db-note { color: #8e9aa3; flex: 1; min-width: 0; }
.db-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.seg { display: inline-flex; background: #1a222b; border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px; border: 0; background: none; color: #aeb9c1; cursor: pointer; font-size: 13px; }
.seg a[aria-current="true"], .seg button[aria-pressed="true"] { background: #fff; color: #0b0f14; font-weight: 600; }
.seg .ic { width: 15px; height: 15px; }
.seg-sm button { padding: 5px 8px; }
.db-reset { border: 1px solid #2a343e; background: none; color: #aeb9c1; border-radius: 9px; padding: 5px 10px; cursor: pointer; display: inline-flex; gap: 6px; }
.db-reset:hover { color: #fff; border-color: #44515c; }
.seg-light { background: var(--panel); border: 1px solid var(--line); }
.seg-light button { color: var(--ink-2); }
.seg-light button:hover { background: var(--bg); }

/* Marca */
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { display: block; font-size: 16px; letter-spacing: -.01em; }
.brand small { font-size: 12px; }

/* Oficina */
.office { display: grid; grid-template-columns: 236px 1fr; min-height: calc(100vh - 42px); }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 42px; height: calc(100vh - 42px); }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: var(--ink-2); font-weight: 500; }
.side nav a:hover { background: var(--bg); }
.side nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.badge { margin-left: auto; background: var(--brand); color: #fff; font-size: 11.5px; border-radius: 20px; padding: 1px 7px; }
.side-foot { margin-top: auto; font-size: 12.5px; color: var(--muted); background: var(--bg); border-radius: 12px; padding: 12px; }
.side-foot a { color: var(--brand-ink); font-weight: 600; }
.main { min-width: 0; padding: 0 28px 40px; }
.top { display: flex; align-items: center; gap: 16px; padding: 22px 0 18px; }
.top h1 { font-size: 24px; flex: 1; }
.top-brand { display: none; }
.top-act { display: flex; gap: 8px; }
.content { display: flex; flex-direction: column; gap: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: #c9d3d8; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); }
.btn.warn { background: #fff3dc; border-color: #f3d39b; color: #8a4407; }
.btn.ghost { border-style: dashed; color: var(--ink-2); }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.big { padding: 14px 18px; font-size: 16px; border-radius: 12px; }
.btn.block { display: flex; width: 100%; }
.btn .count { background: var(--bg); border-radius: 20px; padding: 0 7px; font-size: 12px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card h2 { font-size: 15px; margin-bottom: 14px; }
h2.sec { font-size: 15px; margin-top: 6px; }
.empty { color: var(--muted); font-size: 13.5px; margin: 6px 0; }
.empty.pad { padding: 26px; text-align: center; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi-l { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi b { display: block; font-size: 28px; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; display: inline-block; box-shadow: 0 0 0 0 rgba(245, 158, 11, .6); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.tip { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 11px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); font-size: 13.5px; }
.tip .ic { margin-top: 1px; }
.grid2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
.lanes { display: grid; gap: 14px; }
.lane-h { display: flex; align-items: center; gap: 2px; margin-bottom: 6px; }
.lane-h small { margin-left: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; border: 1px solid transparent; }
.row:hover { background: var(--bg); border-color: var(--line); }
.row-time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); width: 44px; flex: none; }
.row-main { flex: 1; min-width: 0; }
.row-main b, .row-main small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.closed { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-bottom: 1px solid var(--line); }
.closed:last-child { border-bottom: 0; }
.closed:hover { background: var(--bg); }
.closed-main { flex: 1; min-width: 0; }
.closed-main b, .closed-main small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sig-mini { width: 62px; height: 22px; object-fit: contain; background: #fafbfc; border: 1px solid var(--line); border-radius: 6px; flex: none; }
.amt { font-weight: 600; font-variant-numeric: tabular-nums; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.st-pending { background: var(--pend-bg); color: var(--pend); }
.st-progress { background: var(--prog-bg); color: var(--prog); }
.st-done { background: var(--done-bg); color: var(--done); }
.st-invoiced { background: var(--inv-bg); color: var(--inv); }
.chip.urgent { background: var(--urg-bg); color: var(--urg); }
.chip.ghost { background: none; border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; }

/* Lista */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { border: 1px solid var(--line); background: var(--panel); border-radius: 20px; padding: 6px 12px; cursor: pointer; font-size: 13px; font-weight: 500; }
.fchip span { color: var(--muted); margin-left: 3px; }
.fchip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.fchip[aria-pressed="true"] span { color: #b9c4ca; }
.search { flex: 0 1 300px; min-width: 200px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--panel); }
.search:focus, .fld input:focus, .fld select:focus, .fld textarea:focus, textarea:focus, .addmat :is(input, select):focus, .sig-row input:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.active-filter { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.active-filter button { border: 0; background: var(--line); border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.active-filter .ic { width: 13px; height: 13px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 11px 14px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr[data-href] { cursor: pointer; }
.tbl tbody tr:hover { background: #f8fafb; }
.tbl td small { display: block; }
.tbl th.r, .tbl td.r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .cb { width: 36px; }
.tbl input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); }
.muted-tbl td { color: var(--ink-2); }
.bill-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; border-top: 1px solid var(--line); background: #fafbfc; flex-wrap: wrap; }
.bill-foot div { display: flex; gap: 8px; flex-wrap: wrap; }

/* Detalle */
.backlink { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; font-size: 13.5px; margin-top: -6px; }
.backlink:hover { color: var(--ink); }
.detail { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.d-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 60px; }
.d-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card .d-title { font-size: 22px; margin: 12px 0 14px; }
.d-client { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 12px 14px; background: var(--bg); border-radius: 12px; }
.d-client span { color: var(--ink-2); }
.d-client a { display: inline-flex; align-items: center; gap: 5px; color: var(--brand-ink); font-weight: 600; margin-left: auto; font-size: 13.5px; }
.card h3, .t-card h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 20px 0 8px; display: flex; align-items: center; gap: 7px; }
.card p { margin: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 16px 0 0; }
.kv dt { color: var(--muted); font-size: 13.5px; }
.kv dd { margin: 0; }
.kv.sm { font-size: 13.5px; margin-top: 12px; gap: 5px 14px; }
.entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.entries b { margin-left: 6px; color: var(--ink); }
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.photos img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.sig { margin: 0; display: inline-block; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; background: #fcfdfd; }
.sig img { display: block; width: 260px; max-width: 100%; height: auto; }
.sig figcaption { font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 6px; }
.fld { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; flex: 1; min-width: 0; }
.fld input, .fld select, .fld textarea { font-weight: 400; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--panel); width: 100%; font-size: 14.5px; }
.fld :disabled { background: var(--bg); color: var(--muted); }
.fld-row { display: flex; gap: 12px; }
.costs { width: 100%; border-collapse: collapse; font-size: 14px; }
.costs td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.costs td small { display: inline; }
.costs td.r { font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 10px; }
.costs .sub td { color: var(--ink-2); padding-top: 10px; }
.costs .tot td { font-weight: 700; font-size: 17px; border-bottom: 0; padding-top: 10px; }
.d-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

/* Planificación */
.hint { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 13.5px; }
.plan-wrap { overflow-x: auto; }
.plan { display: grid; grid-template-columns: 150px repeat(5, minmax(150px, 1fr)); min-width: 900px; }
.ph { padding: 12px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.ph b { display: block; text-transform: capitalize; }
.ph.is-today { background: var(--brand-soft); color: var(--brand-ink); }
.pt { padding: 14px 12px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; }
.pt small { width: 100%; padding-left: 16px; margin-top: 2px; }
.ph b::first-letter { text-transform: uppercase; }
.ph b { text-transform: none; }
.cell { padding: 8px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 120px; display: flex; flex-direction: column; gap: 6px; transition: background .15s; }
.cell:last-child { border-right: 0; }
.cell.is-today { background: #f6fbfa; }
.cell.over { background: var(--brand-soft); outline: 2px dashed var(--brand); outline-offset: -4px; }
.pcard { display: block; border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 9px; padding: 7px 9px; background: var(--panel); font-size: 12.5px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.pcard[draggable="true"] { cursor: grab; }
.pcard span { color: var(--muted); font-variant-numeric: tabular-nums; }
.pcard b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard.st-b-done, .pcard.st-b-invoiced { opacity: .62; }
.pcard.st-b-progress { background: #fffaf0; }

/* Clientes */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ccard h3 { font-size: 16px; text-transform: none; letter-spacing: -.01em; color: var(--ink); margin: 12px 0 2px; }
.ccard .btn { margin-top: 14px; }
.avatar { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; }

/* Técnico */
.tech-wrap { display: flex; justify-content: center; gap: 48px; padding: 28px 16px 40px; align-items: flex-start; }
.phone { width: 100%; max-width: 410px; background: var(--bg); border-radius: 34px; border: 10px solid #0b0f14; box-shadow: 0 30px 60px -20px rgba(15, 26, 31, .35); overflow: hidden; min-height: 760px; position: relative; }
.tech-aside { max-width: 340px; padding-top: 40px; position: sticky; top: 70px; }
.tech-aside .eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--brand-ink); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.tech-aside p { font-size: 17px; color: var(--ink-2); line-height: 1.55; }
.tech-aside p.muted { font-size: 14px; color: var(--muted); }
.tech-aside ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.tech-aside li { display: flex; gap: 9px; align-items: center; font-weight: 600; }
.tech-aside li .ic { color: var(--brand); }
.t-head { background: var(--panel); padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.t-head.slim { padding: 12px 14px; position: sticky; top: 0; z-index: 2; }
.t-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.t-row .mono { margin-left: auto; }
.t-sel { border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: var(--bg); font-weight: 600; font-size: 13.5px; }
.t-hello { font-size: 22px; font-weight: 700; margin: 16px 0 10px; }
.t-hello span { display: block; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.t-hello span::first-letter, .urow span::first-letter { text-transform: uppercase; }
.t-prog { height: 6px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.t-prog div { height: 100%; background: var(--brand); border-radius: 6px; }
.t-prog-l { margin-top: 5px; }
.t-body { padding: 16px 14px 28px; display: flex; flex-direction: column; gap: 12px; }
.t-body > h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 6px; }
.jcard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow); border-left: 4px solid var(--pend); }
.jcard.st-b-progress { border-left-color: #f59e0b; }
.jcard.st-b-done, .jcard.st-b-invoiced { border-left-color: var(--done); opacity: .7; }
.jcard b { font-size: 16px; }
.jcard > span { color: var(--ink-2); }
.jcard small { display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.jcard small .ic { width: 14px; height: 14px; }
.j-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.j-time { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-variant-numeric: tabular-nums; margin-right: auto; }
.j-time .ic { width: 15px; height: 15px; color: var(--muted); }
.urow { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.urow span { color: var(--muted); font-size: 13px; width: 116px; flex: none; }
.urow b { flex: 1; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urow .ic { color: var(--muted); }
.t-back { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--brand-ink); }
.t-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.t-card h3:first-child { margin-top: 0; }
.t-card .btn.block { margin-top: 12px; }
.t-title { font-size: 19px; margin: 2px 0 8px; }
.t-card p { margin: 2px 0 0; }
.timer { text-align: center; }
.timer.on { border-color: #f3d39b; background: #fffbf3; }
.t-state { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.big-time { font-size: 40px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 4px 0 12px !important; }
.timer .btn { width: 100%; }
.mats { list-style: none; margin: 0 0 10px; padding: 0; }
.mats li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.mats li span { flex: 1; }
.mats button, .ph-i button { border: 0; background: var(--bg); border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--muted); }
.mats .ic, .ph-i .ic { width: 14px; height: 14px; }
.addmat { display: flex; gap: 6px; }
.addmat select { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 9px 8px; background: var(--panel); }
.addmat input { width: 64px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 8px; }
.addmat .btn { padding: 9px 12px; }
textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical; background: var(--panel); font-size: 14.5px; }
.ph-i { position: relative; }
.ph-i button { position: absolute; top: 4px; right: 4px; background: rgba(255, 255, 255, .9); }
.sigpad { position: relative; height: 150px; border: 1.5px dashed #c9d3d8; border-radius: 12px; background: #fcfdfd; touch-action: none; }
.sigpad canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.sig-ph { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #a9b5bb; font-size: 13px; pointer-events: none; border-top: 1px solid #e3e8eb; margin: 0 24px; padding-top: 6px; }
.sigpad.inked .sig-ph { opacity: .35; }
.sig-row { display: flex; gap: 8px; margin-top: 8px; }
.sig-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
.close-btn { margin-top: 4px; }
.t-ok { display: flex; align-items: center; gap: 8px; background: var(--done-bg); color: var(--done); padding: 12px 14px; border-radius: 12px; font-weight: 600; margin: 0; }

/* Modal y toast */
.modal-bg { position: fixed; inset: 0; background: rgba(11, 15, 20, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 18px; padding: 22px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
.modal h2 { font-size: 19px; margin-bottom: 16px; }
.m-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; background: #0b0f14; color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); font-weight: 500; animation: tin .2s ease-out; }
.toast .ic { color: #5eead4; }
.toast.err .ic { color: #fca5a5; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
#print { display: none; }

/* Responsive */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid2, .detail { grid-template-columns: 1fr; }
  .d-side { position: static; }
  .tech-aside { display: none; }
}
@media (max-width: 820px) {
  .db-note { display: none; }
  .db-in { gap: 8px; padding: 7px 12px; }
  .db-reset span, .db-kide span { display: none; }
  .office { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; z-index: 20; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); }
  .side > .brand, .side-foot { display: none; }
  .side nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .side nav a { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; flex: 1; position: relative; text-align: center; }
  .badge { position: absolute; top: 2px; right: 18%; margin: 0; font-size: 10px; padding: 0 5px; }
  .main { padding: 0 16px 90px; }
  .top { flex-wrap: wrap; padding: 16px 0 12px; }
  .top-brand { display: block; width: 100%; }
  .top h1 { font-size: 21px; }
  .top-act .btn span { display: none; }
  .top-act .btn { padding: 9px 11px; }
  .hide-m { display: none; }
  .search { flex: 1 1 100%; }
  .tech-wrap { padding: 0; }
  .phone { max-width: none; border: 0; border-radius: 0; box-shadow: none; min-height: calc(100vh - 40px); }
}
@media (max-width: 480px) {
  .kpis { gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi b { font-size: 22px; }
  .hide-s { display: none; }
  .seg a span { display: none; }
  .fld-row { flex-direction: column; gap: 0; }
  .tbl td, .tbl th { padding: 10px; }
}

/* Impresión */
@media print {
  body > *:not(#print) { display: none !important; }
  #print { display: block !important; }
  body { background: #fff; }
  .sheet { font-size: 12.5px; color: #000; }
  .sheet header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #0f9d8a; padding-bottom: 14px; margin-bottom: 18px; }
  .sheet .s-id { text-align: right; }
  .sheet h1 { font-size: 20px; }
  .sheet .s-id p { margin: 2px 0; }
  .sheet h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #555; margin: 18px 0 6px; }
  .sheet .costs { max-width: 420px; margin-left: auto; }
  .s-sig { margin-top: 26px; width: 260px; border-top: 1px solid #999; padding-top: 6px; }
  .s-sig img { width: 240px; }
  .sheet footer { margin-top: 40px; font-size: 10.5px; color: #777; border-top: 1px solid #ddd; padding-top: 8px; }
  @page { margin: 16mm; }
}
