
/* Layout: aplicación de escritorio con barra lateral oscura; el detalle de cada inmueble usa dos columnas (trabajo + resumen fijo).
   En móvil la barra lateral se vuelve una franja superior y todo pasa a una columna. */
:root {
  --bg: #F3F5F8; --panel: #FFFFFF; --panel-2: #F0F3F7; --line: #DFE5EC; --line-2: #E9EEF3;
  --fg: #102030; --muted: #5F6E7D; --faint: #8A97A5;
  --side: #0B2236; --side-2: #12304A; --side-fg: #E3ECF5; --side-muted: #8EA4BA;
  --accent: #0D9488; --accent-2: #0B7C72; --accent-fg: #FFFFFF; --accent-soft: #DAF3EF;
  --ok: #17804A; --ok-soft: #DFF3E8; --warn: #A15C00; --warn-soft: #FCEFD7; --bad: #BE3A33; --bad-soft: #FBE4E2;
  --info: #2B5E93; --info-soft: #E0EBF7; --violet: #6A4FB3; --violet-soft: #ECE6F8;
  --font: "Onest", "Segoe UI", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 12px; --r-s: 8px;
  --shadow: 0 1px 2px rgba(16,32,48,.05), 0 6px 20px rgba(16,32,48,.06);
  --shadow-lg: 0 10px 40px rgba(11,34,54,.18);
  --ease: cubic-bezier(.2,.8,.2,1);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0B141D; --panel: #121F2B; --panel-2: #172735; --line: #233647; --line-2: #1D2F3E;
  --fg: #E7EEF5; --muted: #98A9B9; --faint: #6F8396;
  --side: #08111A; --side-2: #10202E; --side-fg: #DCE6F0; --side-muted: #7D93A8;
  --accent: #2DBFB1; --accent-2: #26A89C; --accent-fg: #04201D; --accent-soft: #11393A;
  --ok: #4CC487; --ok-soft: #133426; --warn: #E9B04F; --warn-soft: #382B12; --bad: #F2857C; --bad-soft: #3B1E1C;
  --info: #7FB3E6; --info-soft: #172E45; --violet: #B5A2F0; --violet-soft: #2A2342;
  --shadow: 0 1px 2px rgba(0,0,0,.35); --shadow-lg: 0 10px 40px rgba(0,0,0,.5); color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0B141D; --panel: #121F2B; --panel-2: #172735; --line: #233647; --line-2: #1D2F3E;
  --fg: #E7EEF5; --muted: #98A9B9; --faint: #6F8396;
  --side: #08111A; --side-2: #10202E; --side-fg: #DCE6F0; --side-muted: #7D93A8;
  --accent: #2DBFB1; --accent-2: #26A89C; --accent-fg: #04201D; --accent-soft: #11393A;
  --ok: #4CC487; --ok-soft: #133426; --warn: #E9B04F; --warn-soft: #382B12; --bad: #F2857C; --bad-soft: #3B1E1C;
  --info: #7FB3E6; --info-soft: #172E45; --violet: #B5A2F0; --violet-soft: #2A2342;
  --shadow: 0 1px 2px rgba(0,0,0,.35); --shadow-lg: 0 10px 40px rgba(0,0,0,.5); color-scheme: dark }

* { box-sizing: border-box }
html, body { height: 100% }
body { background: var(--bg); color: var(--fg); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px }
.mono { font-family: var(--mono); font-size: .92em; font-variant-numeric: tabular-nums }
.num { font-variant-numeric: tabular-nums }
.muted { color: var(--muted) }
h1 { font-size: 24px; line-height: 1.2; margin: 0; letter-spacing: -.015em; text-wrap: balance; font-weight: 650 }
h2 { font-size: 15px; margin: 0; font-weight: 600 }
h3 { font-size: 13px; margin: 0; font-weight: 600 }
p { margin: 0 }

/* ---------- Login ---------- */
.login { min-height: 100%; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr) }
.login .brandside { background: var(--side); color: var(--side-fg); padding-block: 48px; padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: 40px;
  display: flex; flex-direction: column; gap: 28px; position: relative; overflow: hidden }
.login .brandside::before { content: ""; position: absolute; inset: auto -20% -40% auto; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(45,191,177,.22), transparent) }
.login .claim { font-size: 34px; line-height: 1.12; font-weight: 650; letter-spacing: -.02em; max-width: 14ch; position: relative }
.login .claim em { font-style: normal; color: #5FD6CA }
.login .bullets { display: flex; flex-direction: column; gap: 10px; color: var(--side-muted); position: relative; max-width: 40ch }
.login .bullets > span { display: flex; gap: 10px; align-items: flex-start }
.login .bullets b { color: var(--side-fg); font-weight: 500 }
.flow { position: relative; width: 100%; max-width: 440px }
.flow svg { width: 100%; height: auto; display: block }
.formside { display: grid; place-items: center; padding-block: 40px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)) }
.card-login { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px }
.demo-accounts { display: grid; gap: 8px }
.acct { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--panel);
  text-align: left; transition: border-color .15s, transform .15s var(--ease) }
.acct:hover { border-color: var(--accent); transform: translateY(-1px) }
.acct[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.acct small { display: block; color: var(--muted) }
.lbl { font-size: 12.5px; font-weight: 500; color: var(--muted); display: block; margin-bottom: 5px }
.inp { width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-s); padding: 9px 11px; transition: border-color .15s, box-shadow .15s }
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.office { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: var(--panel); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow) }
.office .row { display: flex; gap: 14px; align-items: center }
.logo { width: 52px; height: 52px; border-radius: 12px; background: linear-gradient(135deg, #0D9488, #0B4F73); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 18px; flex: none; letter-spacing: -.02em }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px }
.facts div { background: var(--panel-2); border-radius: var(--r-s); padding: 8px 10px }
.facts b { display: block; font-size: 18px; font-variant-numeric: tabular-nums }
.facts span { font-size: 11.5px; color: var(--muted) }
.checks { display: flex; flex-direction: column; gap: 7px; font-size: 13px }
.checks > span { display: flex; gap: 8px; align-items: center; opacity: 0; transform: translateY(4px); animation: rise .35s var(--ease) forwards }
.tick { width: 18px; height: 18px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; flex: none }
.tick svg { width: 12px; height: 12px }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--panel-2) 0%, var(--line-2) 50%, var(--panel-2) 100%); background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0,1fr); min-height: 100% }
.side { background: var(--side); color: var(--side-fg); display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100vh;
  padding-block: 18px; padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: 14px; overflow-y: auto }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px }
.brand .mk { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; flex: none; color: #fff }
.brand b { font-size: 14.5px; letter-spacing: -.01em; display: block; line-height: 1.15 }
.brand span { font-size: 11.5px; color: var(--side-muted) }
.officebadge { background: var(--side-2); border-radius: 10px; padding: 10px; display: flex; gap: 10px; align-items: center; font-size: 12.5px }
.officebadge .logo { width: 34px; height: 34px; border-radius: 9px; font-size: 12px }
.officebadge small { color: var(--side-muted); display: block; font-size: 11px }
.verif { color: #5FD6CA; font-size: 11px; display: inline-flex; gap: 4px; align-items: center }
.verif svg { width: 12px; height: 12px }
.navgroup { display: flex; flex-direction: column; gap: 2px }
.navlabel { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--side-muted); padding: 6px 10px 4px }
.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--side-fg); background: none; border: 0; text-align: left;
  width: 100%; position: relative; transition: background .15s }
.nav:hover { background: rgba(255,255,255,.06) }
.nav[aria-current="page"] { background: rgba(45,191,177,.16); color: #fff }
.nav[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #5FD6CA }
.nav svg { opacity: .85; flex: none }
.nav .count { margin-left: auto; font-size: 11px; background: var(--bad); color: #fff; border-radius: 999px; padding: 0 7px; font-variant-numeric: tabular-nums }
.me { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; background: var(--side-2) }
.me small { display: block; color: var(--side-muted); font-size: 11.5px }
.me button { margin-left: auto; background: none; border: 0; color: var(--side-muted); font-size: 12px }
.av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; flex: none }

.main { min-width: 0; display: flex; flex-direction: column }
.top { display: flex; align-items: center; gap: 10px; background: var(--bg);
  border-bottom: 1px solid var(--line); padding-block: 10px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px));
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; flex-wrap: wrap }
.search { flex: 1; min-width: 180px; max-width: 420px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 9px;
  padding: 7px 10px; color: var(--muted); text-align: left }
.search > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0 }
.search kbd { margin-left: auto; font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px }
.spacer { flex: 1 }
.syncpill { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: 5px 11px; white-space: nowrap }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2.2s infinite }
.iconbtn { position: relative; border: 1px solid var(--line); background: var(--panel); border-radius: 9px; width: 38px; height: 36px; display: grid; place-items: center }
.iconbtn .dot { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 11px;
  display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bg) }
.proto { font-size: 11.5px; color: var(--warn); background: var(--warn-soft); border-radius: 999px; padding: 4px 10px; white-space: nowrap }

.content { padding-block: 24px 64px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 18px; max-width: 1240px; width: 100% }
.content.enter > * { animation: rise .32s var(--ease) both }
.content.enter > *:nth-child(2) { animation-delay: .04s } .content.enter > *:nth-child(3) { animation-delay: .08s } .content.enter > *:nth-child(4) { animation-delay: .12s }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap }
.sub { color: var(--muted); margin-top: 4px; max-width: 72ch }
.eyebrow { font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 6px }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0 }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap }
.pb { padding: 16px 18px }
.grid { display: grid; gap: 16px }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)) }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)) }
.g21 { grid-template-columns: minmax(0,2fr) minmax(0,1fr) }
.detail { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 18px; align-items: start }
.sticky { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)) }

.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; text-align: left; border: 1px solid var(--line); background: var(--panel);
  border-radius: var(--r); box-shadow: var(--shadow); transition: transform .18s var(--ease), border-color .18s; position: relative; overflow: hidden }
button.kpi:hover { transform: translateY(-2px); border-color: var(--accent) }
.kpi .v { font-size: 30px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -.02em }
.kpi .l { color: var(--muted); font-size: 12.5px; padding-right: 30px }
.kpi .ic { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center }
.kpi.bad .v { color: var(--bad) } .kpi.bad .ic { background: var(--bad-soft); color: var(--bad) }
.kpi.warn .v { color: var(--warn) } .kpi.warn .ic { background: var(--warn-soft); color: var(--warn) }
.kpi.ok .v { color: var(--ok) } .kpi.ok .ic { background: var(--ok-soft); color: var(--ok) }
.kpi.info .ic { background: var(--info-soft); color: var(--info) }

.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 8px 13px; display: inline-flex; align-items: center; gap: 7px; font-weight: 500;
  white-space: nowrap; transition: border-color .15s, background .15s, transform .1s }
.btn:hover { border-color: var(--accent) }
.btn:active { transform: scale(.98) }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent) }
.btn.primary:hover { background: var(--accent-2) }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none }
.btn.small { padding: 5px 10px; font-size: 12.5px; border-radius: 8px }
.btn.ghost { border-color: transparent; background: none; color: var(--accent); padding-left: 4px; padding-right: 4px }
.btn.block { width: 100%; justify-content: center; padding: 11px }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; border-radius: 999px; padding: 2px 9px; white-space: nowrap; font-weight: 500; line-height: 1.6 }
.chip svg { width: 12px; height: 12px }
.chip.bad { background: var(--bad-soft); color: var(--bad) } .chip.warn { background: var(--warn-soft); color: var(--warn) }
.chip.ok { background: var(--ok-soft); color: var(--ok) } .chip.info { background: var(--info-soft); color: var(--info) }
.chip.violet { background: var(--violet-soft); color: var(--violet) } .chip.neutral { background: var(--panel-2); color: var(--muted) }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.filters { display: flex; gap: 6px; flex-wrap: wrap }
.fchip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--muted) }
.fchip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg) }
.fchip .n { font-variant-numeric: tabular-nums; opacity: .7; margin-left: 4px }

.tablewrap { overflow-x: auto }
table { width: 100%; border-collapse: collapse }
th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-weight: 500; padding: 10px 14px; border-bottom: 1px solid var(--line-2); white-space: nowrap }
td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle }
tr:last-child td { border-bottom: 0 }
tr.click { cursor: pointer; transition: background .12s } tr.click:hover td { background: var(--panel-2) }

.ring { --p: 0; --c: var(--accent); width: 44px; height: 44px; flex: none; position: relative }
.ring svg { transform: rotate(-90deg); display: block }
.ring circle { fill: none; stroke-width: 4 }
.ring .bg { stroke: var(--panel-2) }
.ring .fgc { stroke: var(--c); stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: calc(113.1 * (1 - var(--p) / 100)); transition: stroke-dashoffset .7s var(--ease) }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-variant-numeric: tabular-nums }
.ring.big { width: 96px; height: 96px } .ring.big b { font-size: 22px; font-weight: 650 }

.listing { display: flex; gap: 14px; align-items: center }
.thumb { width: 60px; height: 46px; border-radius: 8px; flex: none }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); overflow-x: auto; padding: 0 10px }
.tab { border: 0; background: none; padding: 12px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center;
  transition: color .15s, border-color .15s }
.tab:hover { color: var(--fg) }
.tab[aria-selected="true"] { color: var(--fg); border-color: var(--accent); font-weight: 600 }
.tab .badge { background: var(--bad); color: #fff; border-radius: 999px; font-size: 10.5px; padding: 0 6px; font-variant-numeric: tabular-nums }

.groupt { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); margin: 18px 0 4px; font-weight: 600 }
.groupt:first-child { margin-top: 0 }
.field { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.5fr) 76px; gap: 12px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 8px; transition: background .3s }
.field + .field { border-top: 1px dashed var(--line-2) }
.field .k { font-size: 13.5px } .field .k small { display: block; color: var(--muted); font-size: 11.5px }
.field .val { min-width: 0 }
.field .val input, .field .val select, .field .val textarea { width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 7px 10px; transition: border-color .15s, box-shadow .15s }
.field .val input:focus, .field .val select:focus, .field .val textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.field.missing .val input, .field.missing .val select, .field.missing .val textarea { border-color: var(--bad); background: var(--bad-soft) }
.field.flash { background: var(--warn-soft) }
.field .tag { justify-self: end }

.drop { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 22px; text-align: center; color: var(--muted); cursor: pointer; display: block; transition: all .2s var(--ease) }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--fg) }
.drop b { color: var(--fg) }
.reqdocs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px }
.doc { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(0,190px) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2);
  animation: rise .25s var(--ease) both }
.doc:last-child { border-bottom: 0 }
.doc .name { overflow-wrap: anywhere; font-size: 13px; font-weight: 500 }
.ficon { width: 32px; height: 40px; border-radius: 5px; background: var(--bad-soft); color: var(--bad); font-size: 9.5px; font-weight: 700; display: grid; place-items: center }

.map { display: grid; grid-template-columns: minmax(0,1fr) 24px minmax(0,1.2fr); gap: 8px; align-items: center; padding: 8px 0; font-size: 13.5px; border-bottom: 1px solid var(--line-2) }
.map:last-child { border-bottom: 0 }
.map .from { color: var(--muted) } .map .arrow { color: var(--faint); text-align: center }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 10px }
.ph-img { aspect-ratio: 4/3; border-radius: 9px; max-width: 100%; display: flex; align-items: flex-end; padding: 6px 8px; color: #fff; font-size: 11px; font-weight: 500 }
.ph-img:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto }

.summary { display: flex; flex-direction: column; gap: 16px }
.summary .ringrow { display: flex; gap: 16px; align-items: center }
.missing-list { display: flex; flex-direction: column; gap: 2px }
.missing-list button { display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 7px; font-size: 13px }
.missing-list button:hover { background: var(--bad-soft) }
.missing-list .x { width: 16px; height: 16px; border-radius: 50%; background: var(--bad-soft); color: var(--bad); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none }
.who { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--panel-2) }
.who .row { display: flex; gap: 10px; align-items: center }
.who small { color: var(--muted); display: block; font-size: 11.5px }

.stepper { display: flex; align-items: center; overflow-x: auto; padding-bottom: 2px }
.step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); white-space: nowrap }
.step .dotx { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--panel) }
.step.done { color: var(--fg) } .step.done .dotx { background: var(--accent); border-color: var(--accent); color: var(--accent-fg) }
.step.now { color: var(--fg); font-weight: 600 } .step.now .dotx { border-color: var(--accent); color: var(--accent) }
.step + .step::before { content: ""; width: 34px; height: 2px; background: var(--line); margin-right: 2px }
.step.done + .step::before { background: var(--accent) }

.timeline { display: flex; flex-direction: column }
.tl { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 10px; align-items: start; padding-bottom: 14px; position: relative }
.tl:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line-2) }
.tl .b { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center }
.tl .b svg { width: 14px; height: 14px }
.tl b { font-weight: 600; font-size: 13.5px } .tl small { color: var(--muted); display: block; font-size: 12.5px }
.tl time { font-family: var(--mono); font-size: 11.5px; color: var(--faint) }

.task { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2) }
.task:last-child { border-bottom: 0 }
.task .t { flex: 1; min-width: 0 } .task .t small { display: block; color: var(--muted); font-size: 12.5px }

.toggle { position: relative; width: 40px; height: 23px; flex: none }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1 }
.toggle span { position: absolute; inset: 0; border-radius: 12px; background: var(--line); transition: background .2s }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s var(--ease) }
.toggle input:checked + span { background: var(--accent) }
.toggle input:checked + span::after { transform: translateX(17px) }
.toggle input:disabled { cursor: not-allowed } .toggle input:disabled + span { opacity: .55 }
.toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px }
.cfg { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2) }
.cfg:last-child { border-bottom: 0 }
.cfg .t { flex: 1; min-width: 0 } .cfg .t small { display: block; color: var(--muted); font-size: 12px }
.fill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums }
.fill i { display: block; width: 46px; height: 5px; border-radius: 3px; background: var(--panel-2); position: relative; overflow: hidden }
.fill i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--accent); border-radius: 3px }

.link-card { display: grid; grid-template-columns: minmax(0,1fr) 34px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-2) }
.link-card:last-child { border-bottom: 0 }
.person { display: flex; gap: 10px; align-items: center; min-width: 0 }
.person > div { min-width: 0 } .person b { display: block; font-size: 13.5px; overflow-wrap: anywhere } .person small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; display: block }
.plat { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600 }
.plat.xp { color: var(--violet) } .plat.ws { color: var(--info) }
.linkicon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); color: var(--faint) }
.linkicon.on { background: var(--ok-soft); color: var(--ok) } .linkicon.half { background: var(--warn-soft); color: var(--warn) }
.setterbox { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); cursor: pointer }

.notice { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; align-items: flex-start }
.notice .ni { flex: none; margin-top: 1px }
.notice.bad { background: var(--bad-soft) } .notice.bad .ni { color: var(--bad) }
.notice.ok { background: var(--ok-soft) } .notice.ok .ni { color: var(--ok) }
.notice.info { background: var(--info-soft) } .notice.info .ni { color: var(--info) }
.notice.violet { background: var(--violet-soft) } .notice.violet .ni { color: var(--violet) }
.notice b { display: block; margin-bottom: 1px }

.scrim { position: fixed; inset: 0; background: rgba(6,16,26,.42); z-index: 25; animation: fade .2s both }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); z-index: 26;
  display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px);
  animation: slidein .28s var(--ease) both }
.drawer .dh { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line-2); gap: 10px }
.drawer .db { overflow-y: auto; padding: 6px 18px 18px; display: flex; flex-direction: column }
.noti { padding: 14px 0; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 10px minmax(0,1fr); gap: 10px; font-size: 13.5px }
.noti .u { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px }
.noti.read .u { background: transparent } .noti.read { color: var(--muted) }
.noti small { color: var(--faint); font-size: 12px }
.palette { position: fixed; left: 50%; top: 12vh; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); z-index: 26; overflow: hidden; animation: pop .2s var(--ease) both }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line-2); padding: 16px 18px; font-size: 15px; background: none }
.palette input:focus { outline: none }
.palette .res { max-height: 340px; overflow-y: auto; padding: 6px }
.palette .res button { display: flex; width: 100%; gap: 10px; align-items: center; border: 0; background: none; padding: 9px 12px; border-radius: 8px; text-align: left }
.palette .res button:hover, .palette .res button.sel { background: var(--panel-2) }
.toasts { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px;
  align-items: center; width: max-content; max-width: calc(100% - 32px) }
.toast { background: var(--side); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; display: flex; gap: 10px; align-items: center;
  animation: toastin .3s var(--ease) both }
.toast.out { animation: toastout .25s ease both }
.toast svg { color: #5FD6CA; flex: none }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 39 }

.dev-banner { display: flex; gap: 10px; align-items: center; border: 1px dashed var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 10px 14px; font-size: 13px }
.dev .side { background: #0A0F14 }
.menuitem { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2) }
.menuitem:last-child { border-bottom: 0 }
.grip { color: var(--faint); font-family: var(--mono); user-select: none }
.empty { color: var(--muted); padding: 26px; text-align: center }
.perm td:not(:first-child), .perm th:not(:first-child) { text-align: center }
.yes { color: var(--ok); font-weight: 600 } .no { color: var(--faint) }

@keyframes rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes fade { from { opacity: 0 } }
@keyframes slidein { from { transform: translateX(30px); opacity: 0 } }
@keyframes pop { from { transform: translate(-50%, 8px) scale(.98); opacity: 0 } }
@keyframes toastin { from { transform: translateY(14px); opacity: 0 } }
@keyframes toastout { to { transform: translateY(10px); opacity: 0 } }
@keyframes shimmer { to { background-position: -200% 0 } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(23,128,74,.45) } 70% { box-shadow: 0 0 0 8px rgba(23,128,74,0) } 100% { box-shadow: 0 0 0 0 rgba(23,128,74,0) } }
@keyframes dash { to { stroke-dashoffset: -40 } }

@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)) } .detail { grid-template-columns: minmax(0,1fr) } .sticky { position: static } }
@media (max-width: 860px) { .g21, .g2 { grid-template-columns: minmax(0,1fr) } .login { grid-template-columns: minmax(0,1fr) } .login .brandside { padding-block: 32px } .flow { display: none } }
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0,1fr); grid-template-rows: auto 1fr }
  .side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; gap: 6px; padding-block: 10px; padding-right: max(14px, env(safe-area-inset-right, 0px)) }
  .side .brand span, .navlabel, .officebadge, .me small, .me > div { display: none }
  .navgroup { flex-direction: row } .nav { width: auto; white-space: nowrap } .nav[aria-current="page"]::before { display: none }
  .me { margin-top: 0; padding: 4px; background: none }
  .field { grid-template-columns: minmax(0,1fr) auto } .field .val { grid-column: 1 / -1; grid-row: 2 }
  .doc { grid-template-columns: auto minmax(0,1fr) auto } .doc select { grid-column: 2 / -1 }
  .link-card { grid-template-columns: minmax(0,1fr) } .linkicon { transform: rotate(90deg) }
  .search kbd, .syncpill .txt { display: none }
}
@media (max-width: 460px) { .g4 { grid-template-columns: minmax(0,1fr) } .proto { display: none } h1 { font-size: 21px } .login .claim { font-size: 27px } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important } .checks > span { opacity: 1; transform: none } }

/* ---------- Específico de la aplicación ---------- */
.flash-msg { padding: 11px 14px; border-radius: 10px; font-size: 13.5px }
.flash-msg.error { background: var(--bad-soft); color: var(--bad) }
.flash-msg.ok { background: var(--ok-soft); color: var(--ok) }
.form { display: flex; flex-direction: column; gap: 14px }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted) }
.check input { margin-top: 3px }
.check a, .legal a { color: var(--accent) }
.code { font-family: var(--mono); font-size: 26px; letter-spacing: .5em; text-align: center }
.wizard { max-width: 760px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 18px;
  padding-block: 32px 64px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)) }
.wsteps { display: flex; gap: 6px; overflow-x: auto }
.wsteps span { flex: 1; min-width: 90px; font-size: 12px; color: var(--faint); border-top: 3px solid var(--line); padding-top: 8px; white-space: nowrap }
.wsteps span.done { border-color: var(--accent); color: var(--muted) } .wsteps span.now { border-color: var(--accent); color: var(--fg); font-weight: 600 }
.opcion { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer }
.opcion:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.legal { max-width: 760px; margin: 0 auto; padding-block: 32px 64px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); line-height: 1.65 }
.legal h1 { margin-bottom: 8px } .legal h2 { margin-top: 26px; margin-bottom: 6px; font-size: 17px }
.legal blockquote { margin: 0; padding: 10px 14px; background: var(--warn-soft); border-radius: 10px }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: girar .8s linear infinite }
@keyframes girar { to { transform: rotate(360deg) } }
.topbar-simple { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; background: var(--side); color: var(--side-fg);
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)) }
.topbar-simple a { color: var(--side-fg) }

/* ---------- Ajustes de la aplicación real ---------- */
a.btn { text-decoration: none; color: var(--fg) }
a.btn.primary { color: var(--accent-fg) }
a.btn.ghost { color: var(--accent) }
a.kpi { color: inherit; text-decoration: none; transition: transform .18s var(--ease), border-color .18s }
a.kpi:hover { transform: translateY(-2px); border-color: var(--accent) }
a.task { color: inherit; text-decoration: none; border-radius: 10px; padding: 12px 10px; margin: 0 -10px; transition: background .15s; border-bottom: 0 }
a.task + a.task { border-top: 1px solid var(--line-2) }
a.task:hover { background: var(--panel-2) }
.task .chev { color: var(--faint); font-size: 22px; line-height: 1; transition: transform .15s var(--ease), color .15s; flex: none }
a.task:hover .chev { transform: translateX(3px); color: var(--accent) }
.task .t b { display: block; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }
.qbadge { width: 44px; height: 44px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none }
.task-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px }
.me { gap: 6px }
.me-link { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; flex: 1; min-width: 0; border-radius: 8px; padding: 2px }
.me-link:hover { background: rgba(255,255,255,.06) }
.me-link small { display: block; color: var(--side-muted); font-size: 11.5px }
.me form { margin-left: auto }
img.av { object-fit: cover; display: block }
.nav { text-decoration: none }
@media (max-width: 760px) {
  /* En el celular la navegación principal va abajo, al alcance del pulgar */
  .side { position: sticky; top: 0; z-index: 7 }
  .side .navgroup { display: contents }
  .side nav.navgroup:first-of-type ~ nav.navgroup { display: none }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; background: var(--side);
    padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
    border-top: 1px solid rgba(255,255,255,.08) }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--side-muted); font-size: 10.5px; text-decoration: none; padding: 4px 0; position: relative }
  .tabbar a[aria-current="page"] { color: #fff }
  .tabbar a .count { position: absolute; top: 0; left: calc(50% + 6px); font-size: 10px; background: var(--bad); color: #fff; border-radius: 999px; padding: 0 5px }
  .content { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)) }
  .side > nav, .side .navlabel { display: none !important }
  .me small, .me-link span { display: none }
  .top .search { min-width: 0 }
  .head h1 { font-size: 21px }
  .detail .sticky { order: -1 }
  .kpi .v { font-size: 24px }
}
@media (min-width: 761px) { .tabbar { display: none } }
@media (max-width: 760px) {
  .side .me { display: none }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)) !important; gap: 10px }
  .kpi { padding: 12px 14px } .kpi .ic { display: none } .kpi .l { padding-right: 0; font-size: 12px }
  .side { justify-content: space-between }
}
/* La página siempre es visible: la entrada solo desliza, nunca parte de opacidad 0 */
@keyframes deslizar { from { transform: translateY(6px) } to { transform: none } }
.content.enter > *, .doc, .checks > span { animation-name: deslizar !important; opacity: 1 !important }

a.fchip { text-decoration: none }
.pasos-lista { display: grid; gap: 4px }
.pasos-lista a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px; color: inherit; text-decoration: none }
.pasos-lista a:hover { background: var(--panel-2) }
.pasos-lista .ok-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; flex: none; border: 2px solid var(--line) }
.pasos-lista .hecho .ok-dot { background: var(--ok); border-color: var(--ok); color: #fff }
.pasos-lista .hecho span:last-child { color: var(--muted); text-decoration: line-through }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px }
.galeria img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; display: block }

/* ======================= Versión 0.3: menú desplegable, notificaciones, sincronización, dashboard ======================= */
.notice.warn { background: var(--warn-soft) } .notice.warn .ni { color: var(--warn) }
.plat.wasi { color: var(--info) }
.linkbtn { background: none; border: 0; color: var(--accent); font-size: 12.5px; padding: 0 }
.btn.warnbtn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn) }

/* Menú lateral desplegable por grupos y modo compacto */
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.colapsar { background: none; border: 0; color: var(--side-muted); border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; flex: none }
.colapsar:hover { background: rgba(255,255,255,.08); color: var(--side-fg) }
.navhead { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; color: var(--side-muted);
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px 4px; border-radius: 6px }
.navhead:hover { color: var(--side-fg) }
.navhead svg { width: 14px; height: 14px; transition: transform .25s var(--ease) }
.navgroup.cerrado .navhead svg { transform: rotate(-90deg) }
.navitems { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .28s var(--ease), opacity .2s }
.navitems > div { overflow: hidden; display: flex; flex-direction: column; gap: 2px }
.navgroup.cerrado .navitems { grid-template-rows: 0fr; opacity: .35 }
.app { transition: grid-template-columns .28s var(--ease) }
.app.compacta { grid-template-columns: 76px minmax(0,1fr) }
.app.compacta .side { padding-left: 10px; padding-right: 10px }
.app.compacta .side-top { flex-direction: column }
.app.compacta .brand b, .app.compacta .brand span, .app.compacta .officebadge > div, .app.compacta .navhead span, .app.compacta .nav .nt,
.app.compacta .me-link > span, .app.compacta .navhead svg { display: none }
.app.compacta .officebadge { justify-content: center; padding: 8px }
.app.compacta .nav { justify-content: center; padding: 10px 0 }
.app.compacta .nav .count { position: absolute; top: 2px; right: 4px; font-size: 10px; padding: 0 5px }
.app.compacta .navgroup.cerrado .navitems { grid-template-rows: 1fr; opacity: 1 }
.app.compacta .navhead { justify-content: center; padding: 4px 0; border-top: 1px solid rgba(255,255,255,.08); border-radius: 0; min-height: 6px }
.app.compacta .me { flex-direction: column; padding: 8px 4px }

/* Notificaciones desplegables */
.notimenu { position: relative }
.notipanel { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 30; overflow: hidden; animation: caer .18s var(--ease) }
@keyframes caer { from { transform: translateY(-6px); opacity: .4 } to { transform: none; opacity: 1 } }
.notihead { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2) }
.notilista { max-height: min(420px, 60vh); overflow-y: auto }
.notiitem { display: grid; grid-template-columns: 10px minmax(0,1fr); gap: 10px; padding: 11px 14px; color: inherit; text-decoration: none; font-size: 13px;
  border-bottom: 1px solid var(--line-2); transition: background .15s }
.notiitem:hover { background: var(--panel-2) }
.notiitem .u { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px }
.notiitem.read { color: var(--muted) } .notiitem.read .u { background: transparent }
.notiitem small { display: block; color: var(--faint); font-size: 11.5px; margin-top: 2px }
.notiitem .tx { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden }
.notifoot { display: block; text-align: center; padding: 10px; font-size: 13px; color: var(--accent); text-decoration: none; background: var(--panel-2) }

/* Barra de sincronización */
.syncbar { position: sticky; top: 57px; z-index: 5; background: var(--panel); border-bottom: 1px solid var(--line); padding: 8px 20px 0; animation: caer .2s var(--ease) }
.syncbar-in { display: flex; align-items: center; gap: 10px; font-size: 13px }
.syncbar .pct { margin-left: auto; color: var(--muted); font-size: 12px }
.syncbar .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: girar .8s linear infinite; flex: none }
.syncbar.hecho .spin { animation: none; border-color: var(--ok); background: var(--ok) }
.syncbar .track { height: 3px; margin: 8px -20px 0; background: var(--line-2); overflow: hidden; position: relative }
.syncbar .track i { position: absolute; inset: 0 auto 0 0; width: 5%; background: linear-gradient(90deg, var(--accent), #5FD6CA); transition: width .6s var(--ease) }
.syncbar .track i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: brillo 1.4s linear infinite }
@keyframes brillo { from { transform: translateX(-100%) } to { transform: translateX(100%) } }
.autosync { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 8px 10px 8px 12px; font-size: 13px }
.autosync small { display: block; color: var(--muted); font-size: 11.5px }

/* Página de acceso restringido */
.bloqueo { min-height: 100%; display: grid; place-items: center; padding: 32px 16px; background: var(--side); position: relative; overflow: hidden }
.bloqueo-fondo span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; animation: flotar 12s ease-in-out infinite alternate }
.bloqueo-fondo span:nth-child(1) { width: 380px; height: 380px; background: #0D9488; top: -80px; left: -60px }
.bloqueo-fondo span:nth-child(2) { width: 300px; height: 300px; background: #2B5E93; bottom: -60px; right: -40px; animation-delay: -4s }
.bloqueo-fondo span:nth-child(3) { width: 220px; height: 220px; background: #6A4FB3; top: 40%; left: 60%; animation-delay: -8s }
@keyframes flotar { to { transform: translate(40px, -30px) scale(1.12) } }
.bloqueo-tarjeta { position: relative; max-width: 560px; width: 100%; background: var(--panel); border-radius: 18px; padding: 30px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 12px; animation: subir .5s var(--ease) both }
@keyframes subir { from { transform: translateY(18px) } to { transform: none } }
.bloqueo-marca .brand b { color: var(--fg) } .bloqueo-marca .brand span { color: var(--muted) }
.candado { color: var(--warn); width: 72px; height: 72px; border-radius: 20px; background: var(--warn-soft); display: grid; place-items: center }
.candado .arco { animation: abrir 2.4s var(--ease) infinite; transform-origin: 42px 28px }
@keyframes abrir { 0%, 55%, 100% { transform: none } 70% { transform: translateY(-4px) rotate(-14deg) } 85% { transform: none } }
.bloqueo-pasos { display: grid; gap: 10px; margin: 6px 0 }
.bloqueo-pasos > div { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: var(--panel-2); font-size: 13px; color: var(--muted) }
.bloqueo-pasos b { display: block; color: var(--fg); margin-bottom: 2px }
.bloqueo-pasos .n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-weight: 700; flex: none; font-size: 13px }
.bloqueo-acciones { display: flex; gap: 8px; flex-wrap: wrap }

/* Ingreso: lado izquierdo animado */
.brandside.animada { overflow: hidden }
.brandside .orbe { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .5; pointer-events: none; animation: flotar 14s ease-in-out infinite alternate }
.brandside .o1 { width: 340px; height: 340px; background: #0D9488; top: -120px; right: -80px }
.brandside .o2 { width: 260px; height: 260px; background: #2B5E93; bottom: -90px; left: -60px; animation-delay: -6s }
.rotador { display: inline-grid; vertical-align: top }
.rotador em { grid-area: 1 / 1; font-style: normal; color: #5FD6CA; opacity: 0; transform: translateY(14px); animation: rotar 12s var(--ease) infinite }
.rotador em:nth-child(2) { animation-delay: 3s } .rotador em:nth-child(3) { animation-delay: 6s } .rotador em:nth-child(4) { animation-delay: 9s }
@keyframes rotar { 0% { opacity: 0; transform: translateY(14px) } 4%, 21% { opacity: 1; transform: none } 25%, 100% { opacity: 0; transform: translateY(-14px) } }
.flujo { display: flex; align-items: center; gap: 6px; position: relative; max-width: 440px }
.flujo .nodo { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); font-size: 12px; min-width: 78px; animation: latir 3s ease-in-out infinite }
.flujo .nodo small { color: var(--side-muted); font-size: 10.5px }
.flujo .nodo.bis { background: rgba(13,148,136,.25); border-color: rgba(95,214,202,.5); color: #5FD6CA; animation-delay: .5s }
.flujo .nodo.wasi { animation-delay: 1s }
@keyframes latir { 0%, 100% { transform: none } 50% { transform: translateY(-3px) } }
.flujo .via { flex: 1; height: 2px; background: rgba(255,255,255,.12); position: relative; overflow: hidden; border-radius: 2px }
.flujo .via i { position: absolute; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: #5FD6CA; box-shadow: 0 0 8px #5FD6CA; animation: viajar 2.4s linear infinite }
.flujo .via i:nth-child(2) { animation-delay: .8s } .flujo .via i:nth-child(3) { animation-delay: 1.6s }
@keyframes viajar { from { left: -8px } to { left: 100% } }
.brandside.animada .bullets > span { animation: entrar .7s var(--ease) both; animation-delay: var(--d, 0s) }
@keyframes entrar { from { opacity: 0; transform: translateX(-14px) } to { opacity: 1; transform: none } }
.bullets .ico { color: #5FD6CA; flex: none; animation: girar 8s linear infinite; display: inline-block }
.cifras-vivas { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; max-width: 440px; position: relative }
.cifras-vivas > div { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.05) }
.cifras-vivas b { display: block; font-size: 24px; color: #fff; font-variant-numeric: tabular-nums }
.cifras-vivas small { color: var(--side-muted); font-size: 11.5px; line-height: 1.3; display: block }
.aviso-red { display: flex; gap: 12px; padding: 14px; border-radius: 12px; background: var(--warn-soft); font-size: 13px; animation: subir .4s var(--ease) both }
.aviso-red-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--warn); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none }
.aviso-red p { margin: 4px 0 6px; color: var(--muted) } .aviso-red ul { margin: 0; padding-left: 18px; color: var(--muted) }

/* Licencia */
.licencia-resumen { display: flex; flex-direction: column; gap: 10px }
.licencia-resumen > div:first-child b { display: block; font-size: 26px; letter-spacing: -.02em }
.licencia-resumen ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; display: grid; gap: 4px }

/* Comparación de coincidencias */
.comparar { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px }
.cand { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); display: flex; flex-direction: column }
.cand.red { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft) }
.cand-foto { width: 100%; aspect-ratio: 16 / 10; max-height: 170px; object-fit: cover; background: var(--panel-2); display: block }
.cand-foto.sin { display: grid; place-items: center; color: var(--faint); font-size: 13px; aspect-ratio: auto; height: 64px }
.cand-cuerpo { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1 }
.cand dl { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 2px 10px; margin: 4px 0 0; font-size: 12.5px }
.cand dt { color: var(--muted) } .cand dd { margin: 0 } .cand dd.igual { color: var(--ok); font-weight: 600 }
.cand-acc { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px }

/* Subpestañas (configuración, equipo) */
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none }
.subtabs a { padding: 9px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; margin-bottom: -1px }
.subtabs a:hover { color: var(--fg) }
.subtabs a[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent) }
.requisito { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--info-soft); font-size: 13px }
.requisito p { margin-top: 4px; color: var(--muted) }
.req-ic { display: flex; gap: 6px; align-items: center; flex: none; background: var(--panel); border-radius: 10px; padding: 8px 10px }

/* Dashboard */
.dash-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.dash-filtros .filters { flex: 1 } .dash-filtros select { width: auto; min-width: 170px }
.dash-filtros button.fchip { cursor: pointer }
.dash-cifras { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px }
.dash-kpi { border-radius: var(--r); animation: subir .45s var(--ease) both; animation-delay: calc(var(--i) * 40ms) }
.dash-kpi .l { padding-right: 0 }
.dash-kpi details { margin-top: 6px; font-size: 12.5px } .dash-kpi summary { color: var(--accent); cursor: pointer }
.dash-kpi ul { margin: 6px 0 0; padding-left: 16px; max-height: 180px; overflow-y: auto } .dash-kpi li a { color: inherit }
.dash-graficas { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px }
.barras { display: grid; gap: 8px }
.barra { display: grid; grid-template-columns: minmax(90px, 34%) minmax(0,1fr) auto; gap: 10px; align-items: center; font-size: 12.5px }
.barra .et { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted) }
.barra .pista { height: 10px; background: var(--panel-2); border-radius: 6px; overflow: hidden }
.barra .pista i { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 6px; animation: crecer .8s var(--ease) both; animation-delay: calc(var(--i) * 50ms) }
@keyframes crecer { from { width: 0 } }
.barras.columnas { grid-template-columns: repeat(12, minmax(0,1fr)); align-items: end; height: 170px; gap: 6px }
.barras.columnas .barra { display: flex; flex-direction: column-reverse; height: 100%; gap: 4px; text-align: center }
.barras.columnas .barra .et { font-size: 10.5px }
.barras.columnas .barra .pista { flex: 1; height: auto; width: 100%; display: flex; align-items: flex-end; background: none }
.barras.columnas .barra .pista i { width: 100%; height: var(--w); animation-name: subircol }
@keyframes subircol { from { height: 0 } }
.widget-opciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px }
.widget-opciones .opcion { align-items: flex-start; font-size: 13px }
.widget-opciones .opcion small { display: block; color: var(--muted); font-size: 12px }
.widget-opciones .opcion .chip { margin-left: auto; flex: none }

@media (max-width: 760px) {
  .side .navgroup, .side .colapsar { display: none !important }
  .syncbar { top: 0 }
  .autosync { width: 100% }
  .flujo .nodo { min-width: 0; padding: 8px } .cifras-vivas, .brandside.animada .bullets { display: none }
  .login .brandside.animada { gap: 16px; padding-block: 22px }
  .barras.columnas { height: 140px } .barras.columnas .barra .et { font-size: 9px }
}
@media (prefers-reduced-motion: reduce) { .rotador em { animation: none } .rotador em:first-child { opacity: 1; transform: none } }

/* Entorno de pruebas: imposible confundirlo con el real */
.banda-pruebas { position: sticky; top: 0; z-index: 40; background: repeating-linear-gradient(135deg, #A15C00 0 14px, #8A4F00 14px 28px); color: #fff;
  font-size: 12.5px; text-align: center; padding: 6px 12px; letter-spacing: .01em }
body.entorno-pruebas .side { top: 31px; height: calc(100vh - 31px) }
body.entorno-pruebas .top { top: 31px }
