:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #f6f7fc;
  --text: #0f172a;
  --muted: #667085;
  --border: #e7e9f2;
  --brand: #6d5dfc;
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --grad: linear-gradient(135deg, #6d5dfc 0%, #a855f7 55%, #ec4899 100%);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px rgba(15, 23, 42, .06);
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d17;
    --surface: #141726;
    --surface-2: #1a1e31;
    --text: #e8eaf6;
    --muted: #8d95b3;
    --border: #262b42;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
svg { flex: none; }

/* ── Layout ─────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #120e30 0%, #1d1650 60%, #2b1b60 100%);
  color: #cfd0ff; padding: 22px 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 11px; color: #fff; font-weight: 800; font-size: 15px; line-height: 1.25; padding: 4px 8px 24px; letter-spacing: -.01em; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 8px 22px rgba(168, 85, 247, .45); }
.nav-btn {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px; border: 0; background: transparent;
  color: #b4b6ec; font-weight: 600; font-size: 14.5px; text-align: left; transition: .15s;
}
.nav-btn:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-btn.active { background: rgba(255, 255, 255, .11); color: #fff; box-shadow: inset 3px 0 0 #b07cff; }
.nav-badge { margin-left: auto; background: #ef4444; color: #fff; border-radius: 999px; font-size: 11px; padding: 2px 7px; font-weight: 700; }
.side-foot { margin-top: auto; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); font-size: 12.5px; line-height: 1.5; }
.side-foot b { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 16px 32px;
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 20px; margin: 0; font-weight: 800; letter-spacing: -.02em; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.user-meta { line-height: 1.25; font-size: 13.5px; font-weight: 600; }
.user-meta small { display: block; color: var(--muted); font-weight: 500; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); display: grid; place-items: center; transition: .15s; }
.icon-btn:hover { color: var(--text); border-color: var(--brand); }
.content { padding: 28px 32px 56px; max-width: 1440px; width: 100%; }

/* ── Hero ───────────────────────────────────────────── */
.hero {
  background: var(--grad); color: #fff; border-radius: 24px; padding: 28px 30px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  position: relative; overflow: hidden; box-shadow: 0 18px 40px rgba(109, 93, 252, .28);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.hero::before { width: 300px; height: 300px; right: -70px; top: -120px; }
.hero::after { width: 160px; height: 160px; right: 180px; bottom: -100px; background: rgba(255, 255, 255, .08); }
.hero h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.hero p { margin: 0; opacity: .9; }
.hero-actions { margin-left: auto; display: flex; gap: 10px; position: relative; z-index: 1; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1px solid transparent; font-weight: 650; font-size: 14px; transition: .15s; white-space: nowrap; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(109, 93, 252, .35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(109, 93, 252, .45); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-white { background: #fff; color: #4c1d95; }
.btn-white:hover { transform: translateY(-1px); }
.btn-glass { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .32); }
.btn-glass:hover { background: rgba(255, 255, 255, .26); }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* ── KPIs & cards ───────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 18px; margin: 24px 0; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; gap: 16px; align-items: center; transition: transform .2s; }
.kpi:hover { transform: translateY(-2px); }
.kpi-icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #fff; flex: none; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi .value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.g1 { background: linear-gradient(135deg, #6d5dfc, #8f82ff); box-shadow: 0 8px 18px rgba(109, 93, 252, .35); }
.g2 { background: linear-gradient(135deg, #0891b2, #22d3ee); box-shadow: 0 8px 18px rgba(34, 211, 238, .3); }
.g3 { background: linear-gradient(135deg, #059669, #34d399); box-shadow: 0 8px 18px rgba(16, 185, 129, .3); }
.g4 { background: linear-gradient(135deg, #ea580c, #fbbf24); box-shadow: 0 8px 18px rgba(245, 158, 11, .3); }
.g5 { background: linear-gradient(135deg, #db2777, #f472b6); box-shadow: 0 8px 18px rgba(236, 72, 153, .3); }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.span-7 { grid-column: span 7; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-12 { grid-column: span 12; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.card-head h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.card-head small { color: var(--muted); font-weight: 500; }
.chart-box { position: relative; height: 290px; }
.link { background: none; border: 0; color: var(--brand); font-weight: 700; font-size: 13px; padding: 0; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .s { color: var(--muted); font-size: 12.5px; }
.dot { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.dot.in { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.dot.out { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.dot.adj { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.dot.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.b-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: #d97706; }
.b-danger { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.b-brand { background: color-mix(in srgb, var(--brand) 13%, transparent); color: var(--brand); }
.chip { display: inline-block; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; }
.qty-in { color: var(--ok); font-weight: 800; } .qty-out { color: var(--danger); font-weight: 800; } .qty-adj { color: var(--brand); font-weight: 800; }

/* ── Toolbar, inputs ────────────────────────────────── */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.search { flex: 1; min-width: 220px; position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input, .search input, .select {
  border: 1px solid var(--border); background: var(--surface); border-radius: 12px;
  padding: 11px 14px; outline: none; width: 100%; transition: .15s;
}
.search input { padding-left: 42px; }
.select { width: auto; min-width: 170px; }
.input:focus, .search input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }

/* ── Table ──────────────────────────────────────────── */
.table-card { padding: 6px 0 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; padding: 12px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.prod { display: flex; align-items: center; gap: 12px; }
.prod-ava { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 14px; flex: none; }
.prod b { font-weight: 700; }
.prod small { display: block; color: var(--muted); font-size: 12px; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; width: 110px; margin-top: 7px; border: 1px solid var(--border); }
.bar > i { display: block; height: 100%; border-radius: 99px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.mini { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--muted); transition: .15s; }
.mini:hover { color: var(--brand); border-color: var(--brand); }
.mini.in:hover { color: var(--ok); border-color: var(--ok); }
.mini.out:hover, .mini.del:hover { color: var(--danger); border-color: var(--danger); }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .ico { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 12px 30px rgba(109, 93, 252, .35); }
.empty h3 { color: var(--text); margin: 0 0 6px; }
.empty p { margin: 0 0 18px; }

/* ── Modal ──────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(10, 8, 30, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .2s ease; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); animation: pop .28s cubic-bezier(.2, .9, .3, 1.2); }
.modal-head { padding: 22px 24px 4px; display: flex; align-items: center; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 18px; flex: 1; }
.modal-body { padding: 16px 24px; }
.modal-foot { padding: 4px 24px 22px; display: flex; justify-content: flex-end; gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 650; color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--surface-2); padding: 5px; border-radius: 13px; border: 1px solid var(--border); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 9px; font-weight: 700; font-size: 13.5px; color: var(--muted); transition: .15s; }
.seg input:checked + span { background: var(--surface); box-shadow: var(--shadow); color: var(--brand); }
.preview { margin-top: 4px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; gap: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.preview .arrow { color: var(--muted); }
.preview .new { font-size: 20px; }
.err-text { color: var(--danger); font-size: 13px; font-weight: 600; min-height: 18px; margin-top: 8px; }

/* ── Toasts ─────────────────────────────────────────── */
#toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.toast { background: #17123a; color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: 0 14px 34px rgba(0, 0, 0, .3); display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; animation: slide .3s ease; max-width: 360px; }
.toast.ok svg { color: #34d399; }
.toast.err { background: #7f1d1d; }

/* ── Login ──────────────────────────────────────────── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: #0c0a24; position: relative; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .65; animation: float 16s ease-in-out infinite; }
.blob.b1 { width: 520px; height: 520px; background: #6d5dfc; top: -160px; left: -140px; }
.blob.b2 { width: 460px; height: 460px; background: #ec4899; bottom: -160px; right: -120px; animation-delay: -5s; }
.blob.b3 { width: 320px; height: 320px; background: #22d3ee; top: 45%; left: 55%; opacity: .35; animation-delay: -10s; }
.login-card { position: relative; width: min(440px, 100%); padding: 42px 36px 34px; border-radius: 28px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); color: #fff; text-align: center; box-shadow: 0 40px 90px rgba(0, 0, 0, .45); }
.login-card .brand-mark { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 20px; }
.login-card h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.03em; }
.login-card p { margin: 0 0 28px; color: #c9c6ff; line-height: 1.55; }
.ms-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; border-radius: 14px; border: 0; background: #fff; color: #1f1f1f; font-weight: 700; font-size: 15px; transition: .15s; }
.ms-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .35); }
.demo-link { display: inline-block; margin-top: 16px; color: #d8d4ff; font-weight: 600; font-size: 14px; background: none; border: 0; text-decoration: underline; text-underline-offset: 4px; }
.features { display: flex; justify-content: center; gap: 18px; margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 12.5px; color: #c9c6ff; flex-wrap: wrap; }
.features span { display: inline-flex; align-items: center; gap: 6px; }
.notice { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: rgba(245, 158, 11, .15); border: 1px solid rgba(245, 158, 11, .35); color: #fde68a; font-size: 13px; text-align: left; line-height: 1.5; }

/* ── Misc ───────────────────────────────────────────── */
.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius); }
.center-card { max-width: 640px; margin: 40px auto; }
.center-card ol { line-height: 1.8; padding-left: 20px; }
.center-card code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.demo-pill { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.fade-in { animation: rise .35s ease both; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes slide { from { opacity: 0; transform: translateX(30px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, 30px) scale(1.08); } }

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 20; flex-direction: row; justify-content: space-around; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
  .brand, .side-foot { display: none; }
  .nav-btn { flex-direction: column; gap: 4px; font-size: 11px; padding: 8px 14px; }
  .nav-btn.active { box-shadow: none; }
  .nav-badge { position: absolute; top: 2px; right: 6px; margin: 0; }
  .topbar { padding: 12px 16px; }
  .user-meta { display: none; }
  .content { padding: 18px 16px 110px; }
  .span-7, .span-5, .span-6 { grid-column: span 12; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 22px; }
  .hero h2 { font-size: 22px; }
  .hero-actions { margin-left: 0; }
  .select { flex: 1; }
  #toasts { left: 16px; right: 16px; bottom: 96px; }
}

/* ── Equipos: ID, usuarios, adjuntos ────────────────── */
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--brand); }
.code.big { font-size: 18px; padding: 6px 12px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 10%, transparent); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.code-input { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 800; letter-spacing: .06em; color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); cursor: default; }
.hint { font-weight: 500; opacity: .75; font-size: 12px; }
.uchip { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.uava { width: 26px; height: 26px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.uava.lg { width: 36px; height: 36px; font-size: 13px; border-radius: 11px; }
.b-neutral { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); }
.mini.pdf { color: #ef4444; }
.mini.pdf:hover { border-color: #ef4444; color: #ef4444; }
.mini.rep:hover { color: #a855f7; border-color: #a855f7; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.clickable { cursor: pointer; border-radius: 12px; transition: background .12s; }
.clickable:hover { background: var(--surface-2); }
textarea.input { resize: vertical; min-height: 64px; }
.seg.two { grid-template-columns: 1fr 1fr; }
.modal.wide { width: min(760px, 100%); }
.modal-head h3 small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }

.drop { display: flex; align-items: center; gap: 12px; padding: 16px; border: 2px dashed var(--border); border-radius: 14px; cursor: pointer; color: var(--muted); font-size: 14px; transition: .15s; background: var(--surface-2); }
.drop:hover, .drop.over { border-color: var(--brand); color: var(--text); }
.drop.ok { border-color: var(--ok); border-style: solid; color: var(--text); }
.drop.bad { border-color: var(--danger); color: var(--danger); }
.drop-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; }
#dropTxt { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ── Informe ────────────────────────────────────────── */
.report-id { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.info { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.info span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.info b { font-size: 14px; overflow-wrap: anywhere; }
.report-note { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 10%, transparent); font-size: 14px; }
.report-h { margin: 22px 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stack { display: flex; height: 16px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.stack i { display: block; height: 100%; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 13px; font-weight: 600; }
.stack-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stack-legend i { width: 10px; height: 10px; border-radius: 3px; }
.timeline { position: relative; padding-left: 4px; }
.tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 16px; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 0; width: 2px; background: var(--border); }
.tl-dot { width: 36px; height: 36px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; box-shadow: 0 0 0 4px var(--surface); }
.tl-item.current .tl-dot { box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px color-mix(in srgb, var(--ok) 50%, transparent); }
.tl-body { flex: 1; min-width: 0; padding-top: 2px; }
.tl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-top .chip { margin-left: auto; }
.tl-dates { color: var(--muted); font-size: 13px; margin-top: 3px; }
.tl-note { font-size: 13px; margin-top: 4px; }
.report-foot { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }

@media (max-width: 880px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Impresión del informe ──────────────────────────── */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  #app, #toasts, .no-print { display: none !important; }
  .overlay { position: static; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; display: block; animation: none; }
  .modal { width: 100% !important; max-height: none; overflow: visible; box-shadow: none; border: 0; animation: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tl-item { break-inside: avoid; }
}
