/* ==========================================================================
   Núcleo EntreFincas · App de clientes
   Paleta y tipografías de la guía de marca y de nucleoentrefincas.es
   ========================================================================== */
:root {
  color-scheme: light;
  --navy: #2E0F3D;          /* Texto de marca de la web: hsl(280 60% 15%) */
  --pink: #FF1493;          /* EntreFincas rosa */
  --pink-600: #E0117F;
  --pink-700: #B80D68;
  --purple: #7A166E;
  /* Degradado del icono de la web (Safari/favoritos): rosa -> magenta -> ciruela, sin azul */
  --grad: linear-gradient(120deg, #F00A7F 0%, #C60D78 34%, #950F6E 66%, #5E145E 100%);
  --grad-soft: linear-gradient(120deg, #F00A7F 0%, #C60D78 45%, #861068 100%);
  --grad-side: linear-gradient(180deg, #5E145E 0%, #7C1368 50%, #B00E73 100%);

  --bg: #F6F3F7;
  --card: #FFFFFF;
  --ink: #2E0F3D;
  --ink-2: #574162;
  --muted: #786284;
  --line: #E7E2EC;
  --line-2: #F0ECF3;
  --rose-bg: #FFF0F7;

  --ok: #17784A;  --ok-bg: #E3F5EC;
  --warn: #9A5B00; --warn-bg: #FFF2DB; --warn-mark: #D97706;
  --bad: #B4123A; --bad-bg: #FDE7EC;

  /* Gráficos (paleta validada) */
  --c-real: #E0117F;
  --c-budget: #EBDDEE;
  --c-budget-line: #2E0F3D;
  --c-over: #D97706;
  --c-balance: #4166C8;

  --r: 14px; --r-lg: 20px; --r-xl: 26px;
  --sh-1: 0 1px 2px rgba(46, 15, 61, .05), 0 1px 1px rgba(46, 15, 61, .03);
  --sh-2: 0 6px 18px -6px rgba(46, 15, 61, .14), 0 2px 6px -2px rgba(46, 15, 61, .06);
  --sh-3: 0 22px 50px -18px rgba(46, 15, 61, .35);

  --top-h: 64px;
  --tab-h: 66px;
  --side-w: 268px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh; min-height: 100dvh;
  overscroll-behavior-y: none;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
img { max-width: 100%; display: block; }
.ico { flex-shrink: 0; display: inline-block; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.accent { color: var(--pink-600); }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-cta { background: var(--grad-soft); color: #fff; box-shadow: 0 8px 20px -8px rgba(224, 17, 127, .6); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-wa { background: #25D366; color: #fff; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; }
.icon-btn.btn-cta { width: 46px; height: 46px; }
.link { display: inline-flex; align-items: center; gap: 2px; color: var(--pink-700); font-weight: 600; font-size: 13.5px; }
.link-btn { color: rgba(46, 15, 61, .7); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; margin-top: 6px; }

/* ---------------------------------------------------------------- Login */
.login { min-height: 100vh; min-height: 100dvh; position: relative; display: grid; place-items: center; padding: calc(var(--sat) + 32px) 20px calc(var(--sab) + 28px); overflow: hidden; }
.login-bg { position: absolute; inset: 0; background: var(--grad); }
.login-bg::after { content: ''; position: absolute; inset: 0; background: url('../icons/mark-white.png') right -80px bottom -40px / 420px no-repeat; opacity: .07; }
.login-inner { position: relative; width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; }
.login-logo { width: min(280px, 78%); filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .18)); }
.login-tag { color: rgba(255, 255, 255, .88); margin: 14px 0 26px; font-size: 16px; letter-spacing: .01em; }
.login-card { width: 100%; background: var(--card); border-radius: var(--r-xl); padding: 26px 22px 18px; box-shadow: var(--sh-3); display: flex; flex-direction: column; gap: 14px; align-items: stretch; text-align: left; }
.login-card h1 { font-family: var(--serif); font-size: 26px; margin-bottom: 2px; }
.login-card .link-btn { align-self: center; }
.login-err { color: var(--bad); background: var(--bad-bg); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.login-foot { color: rgba(255, 255, 255, .7); font-size: 12px; margin-top: 22px; letter-spacing: .04em; text-transform: uppercase; text-align: center; }

/* ---------------------------------------------------------------- Campos */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; border: 1.5px solid var(--line); background: #FCFBFD; border-radius: 12px;
  padding: 12px 14px; font-size: 16px; outline: none; transition: border .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.field select { background: #FCFBFD url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23786284' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center no-repeat; padding-right: 40px; }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 20, 147, .12); }

/* ---------------------------------------------------------------- Armazón */
.app { min-height: 100vh; }
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: calc(var(--top-h) + var(--sat)); padding: var(--sat) 12px 0 14px;
  display: flex; align-items: center; gap: 10px; background: var(--grad); color: #fff; box-shadow: 0 6px 20px -10px rgba(94, 20, 94, .5);
}
.top-mark { height: 30px; width: auto; flex-shrink: 0; }
.com-switch { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; text-align: left; padding: 6px 8px; border-radius: 12px; transition: background .2s; }
.com-switch:active { background: rgba(255, 255, 255, .12); }
.cs-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.cs-txt b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-txt small { font-size: 12px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; }
.top-btn:active { background: rgba(255, 255, 255, .15); }
.badge-n { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #fff; color: var(--pink-700); font-size: 11px; font-weight: 700; font-style: normal; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--pink-600); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: rgba(255, 255, 255, .18); border: 1.5px solid rgba(255, 255, 255, .55); color: #fff; flex-shrink: 0; }

.view { padding: calc(var(--top-h) + var(--sat) + 16px) 16px calc(var(--tab-h) + var(--sab) + 28px); outline: none; }
.view-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.view-inner.enter { animation: enter .28s ease backwards; }
@keyframes enter { from { opacity: .4; transform: translateY(8px); } }
.confirm h2 { font-family: var(--serif); font-size: 22px; margin-bottom: 8px; }
.confirm p { font-size: 14.5px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tab-h) + var(--sab)); padding-bottom: var(--sab);
  display: flex; background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); position: relative; }
.tabbar a.active { color: var(--pink-600); }
.tabbar a.active::before { content: ''; position: absolute; top: 0; width: 30px; height: 3px; border-radius: 0 0 3px 3px; background: var(--pink); }

.side { display: none; }

/* ---------------------------------------------------------------- Tarjetas y estructura */
.card { background: var(--card); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-1); border: 1px solid var(--line-2); }
.grid-2 { display: grid; gap: 16px; }
.grid-2 > .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sec-head h2, .card-head h2 { font-size: 16.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head .big { font-size: 20px; }
.count { background: var(--rose-bg); color: var(--pink-700); font-size: 12.5px; border-radius: 999px; padding: 1px 9px; }
.mini-h { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head h1 { font-family: var(--serif); font-size: 28px; line-height: 1.15; }
.page-head p { font-size: 13.5px; margin-top: 2px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; font-size: 14px; align-self: flex-start; padding: 4px 0; }
.empty { text-align: center; color: var(--muted); padding: 22px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .ico { color: #C9C3D3; }
.hint { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); background: #F8F6FA; border-radius: 12px; padding: 10px 12px; margin-top: 12px; }
.hint .ico { margin-top: 1px; }
.hide-mobile { display: none; }

/* ---------------------------------------------------------------- Inicio */
.hero-card { border-radius: var(--r-xl); padding: 22px 20px 18px; color: #fff; background: var(--grad); position: relative; overflow: hidden; box-shadow: var(--sh-2); }
.hero-card::after { content: ''; position: absolute; right: -40px; bottom: -30px; width: 220px; height: 160px; background: url('../icons/mark-white.png') center / contain no-repeat; opacity: .1; }
.hero-eyebrow { font-size: 13px; opacity: .85; margin-bottom: 4px; }
.hero-title { font-family: var(--serif); font-size: 27px; line-height: 1.12; }
.hero-sub { font-size: 13px; opacity: .85; margin-top: 6px; position: relative; padding-left: 18px; }
.hero-sub .ico { position: absolute; left: 0; top: 2px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; position: relative; z-index: 1; }
.hero-chips span { font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); padding: 3px 10px; border-radius: 999px; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.q { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px 6px 12px; display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; font-size: 12px; font-weight: 600; line-height: 1.2; box-shadow: var(--sh-1); color: var(--ink); transition: transform .15s; }
.q .ico { color: var(--pink-600); }
.q:active { transform: scale(.96); }
.q-accent { background: var(--grad-soft); color: #fff; border: 0; }
.q-accent .ico { color: #fff; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: #FAF8FB; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-l { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; font-weight: 500; }
.kpi b { font-size: 19px; letter-spacing: -.01em; }
.kpi small { font-size: 11.5px; color: var(--muted); }
.meter { position: relative; height: 6px; border-radius: 3px; background: var(--c-budget); margin-top: 4px; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--c-real); }
.meter em { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--navy); border-radius: 1px; }

.card-home .home-unit { display: flex; align-items: center; gap: 12px; }
.unit-badge { width: 46px; height: 46px; border-radius: 14px; background: var(--rose-bg); color: var(--pink-600); display: grid; place-items: center; }
.home-unit b { display: block; font-size: 16.5px; }
.home-unit small { color: var(--muted); font-size: 12.5px; }
.unit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.unit-row > div { background: #FAF8FB; border-radius: 12px; padding: 10px 12px; }
.unit-row small { display: block; font-size: 12px; color: var(--muted); }
.unit-row b { font-size: 16px; display: inline-flex; align-items: center; gap: 5px; }
.next-bill { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px; border-radius: 12px; border: 1.5px dashed #F3B3D3; background: #FFF8FC; }
.next-bill .ico { color: var(--pink-600); }
.next-bill div { flex: 1; min-width: 0; }
.next-bill small { display: block; color: var(--muted); font-size: 12px; }
.next-bill b { font-size: 13.5px; display: block; }

.cartera { display: flex; flex-direction: column; gap: 8px; }
.cartera-item, .sw-item { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; transition: border .15s; }
.cartera-item.active, .sw-item.on { border-color: var(--pink); background: #FFF8FC; }
.cartera-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--navy); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.cartera-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cartera-txt b { font-size: 14.5px; }
.cartera-txt small { font-size: 12px; color: var(--muted); }
.cartera-stat { text-align: center; line-height: 1.1; }
.cartera-stat b { font-size: 18px; color: var(--pink-700); display: block; }
.cartera-stat small { font-size: 11px; color: var(--muted); }

/* Eventos */
.ev-list { display: flex; flex-direction: column; gap: 8px; }
.ev { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 12px; transition: background .15s; }
.ev:active { background: #F8F5FA; }
.ev-date { width: 48px; height: 52px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; background: var(--ev-bg, #F1EEF5); color: var(--ev-c, var(--ink)); line-height: 1.05; }
.ev-date b { font-size: 19px; }
.ev-date small { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ev-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ev-txt b { font-size: 14px; line-height: 1.3; }
.ev-txt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-in { font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ev-in.soon { color: var(--pink-700); }
.ev-junta { --ev-bg: #F3E8FB; --ev-c: #6A2BA8; }
.ev-mantenimiento { --ev-bg: #E6EEFC; --ev-c: #2C4FA8; }
.ev-renovacion { --ev-bg: #FFF2DB; --ev-c: #8A5300; }
.ev-inspeccion { --ev-bg: #E1F4F2; --ev-c: #0B6E66; }
.ev-recibo { --ev-bg: #FFE9F4; --ev-c: #B80D68; }
.ev-aviso { --ev-bg: #FDE7EC; --ev-c: #B4123A; }
.dot-junta { background: #8E44C9; } .dot-mantenimiento { background: #4166C8; } .dot-renovacion { background: #D97706; }
.dot-inspeccion { background: #0F9488; } .dot-recibo { background: #E0117F; } .dot-aviso { background: #B4123A; }

/* Incidencias (mini) */
.inc-mini, .notif-mini { display: flex; flex-direction: column; }
.inc-mini a, .notif-mini a { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.inc-mini li:first-child a, .notif-mini li:first-child a { border-top: 0; padding-top: 2px; }
.inc-mini-txt, .notif-mini div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.inc-mini-txt b, .notif-mini b { font-size: 14px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inc-mini-txt small, .notif-mini small { font-size: 12px; color: var(--muted); }
.inc-mini-txt b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.inc-mini-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cat-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--rose-bg); color: var(--pink-600); display: grid; place-items: center; flex-shrink: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); flex-shrink: 0; }

/* Estados */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; letter-spacing: .01em; }
.st-recibida { background: #EAEDF4; color: #3D4663; }
.st-revision { background: var(--warn-bg); color: var(--warn); }
.st-asignada { background: #F1E6FB; color: #6A2BA8; }
.st-reparacion { background: #E4ECFC; color: #2C4FA8; }
.st-resuelta { background: var(--ok-bg); color: var(--ok); }
.st-urg { background: var(--bad-bg); color: var(--bad); }
.st-admin { background: #F1EAF4; color: var(--navy); margin-top: 8px; }

/* ---------------------------------------------------------------- Listados */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; background: #ECE7F0; border-radius: 999px; padding: 4px; gap: 2px; max-width: 100%; }
.seg button { padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button span { font-size: 11.5px; background: rgba(46, 15, 61, .08); border-radius: 999px; padding: 0 7px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.seg button.on span { background: var(--rose-bg); color: var(--pink-700); }
.seg-sm button { padding: 6px 12px; font-size: 12.5px; }
.seg-wide { display: flex; }
.seg-wide button { flex: 1; justify-content: center; }
.switch-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.switch-inline input, .toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.sw-ui { width: 42px; height: 26px; border-radius: 13px; background: #D7D1DE; position: relative; transition: background .2s; flex-shrink: 0; }
.sw-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
input:checked + .sw-ui { background: var(--pink-600); }
input:checked + .sw-ui::after { transform: translateX(16px); }
input:focus-visible + .sw-ui { outline: 3px solid rgba(255, 20, 147, .35); outline-offset: 2px; }

.inc-list { display: grid; gap: 12px; }
.inc-card { display: block; background: var(--card); border-radius: var(--r-lg); padding: 14px; border: 1px solid var(--line-2); box-shadow: var(--sh-1); transition: transform .15s; }
.inc-card:active { transform: scale(.99); }
.inc-top { display: flex; gap: 12px; }
.inc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inc-meta { font-size: 12px; color: var(--muted); font-weight: 500; }
.inc-main b { font-size: 15px; line-height: 1.3; }
.inc-main small { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 3px; }
.urg { color: var(--bad); font-weight: 700; }
.mine { color: var(--pink-700); font-weight: 700; }
.inc-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.steps-mini { display: flex; gap: 4px; }
.steps-mini i { width: 22px; height: 5px; border-radius: 3px; background: #E8E3EE; }
.steps-mini i.on { background: var(--pink); }
.steps-mini i.done { background: var(--ok); }
.fab { position: fixed; right: 18px; bottom: calc(var(--tab-h) + var(--sab) + 16px); width: 60px; height: 60px; border-radius: 50%; background: var(--grad-soft); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px -8px rgba(224, 17, 127, .7); z-index: 30; }
.fab:active { transform: scale(.94); }

/* Detalle incidencia */
.inc-head h1 { font-family: var(--serif); font-size: 23px; line-height: 1.2; margin: 4px 0 10px; }
.row-wrap { display: flex; gap: 6px; flex-wrap: wrap; }
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 18px; position: relative; }
.stepper li { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; }
.stepper li::before { content: ''; position: absolute; top: 13px; left: -50%; right: 50%; height: 3px; background: #E8E3EE; z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.cur::before { background: var(--pink); }
.stepper li.all-done::before { background: var(--ok); }
.stepper span { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2.5px solid #E1DBE8; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); position: relative; z-index: 1; }
.stepper li.done span { background: var(--pink); border-color: var(--pink); color: #fff; }
.stepper li.cur span { border-color: var(--pink); color: var(--pink-700); box-shadow: 0 0 0 5px rgba(255, 20, 147, .14); }
.stepper li.all-done span { background: var(--ok); border-color: var(--ok); color: #fff; box-shadow: none; }
.stepper small { font-size: 10.5px; font-weight: 600; color: var(--muted); }
.stepper li.cur small { color: var(--ink); }
.facts { display: grid; gap: 10px; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; text-align: right; }
.facts dd .ico { color: var(--pink-600); }
.desc { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.card .mini-h + .desc { margin-top: -4px; }
.facts + .mini-h { margin-top: 16px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.photos img { aspect-ratio: 1; object-fit: cover; border-radius: 12px; width: 100%; }
.timeline { position: relative; padding-left: 4px; }
.timeline li { display: flex; gap: 14px; position: relative; padding-bottom: 16px; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; background: #C9C1D3; margin-top: 4px; flex-shrink: 0; box-shadow: 0 0 0 4px #fff; position: relative; z-index: 1; }
.timeline li:first-child .tl-dot { background: var(--pink); box-shadow: 0 0 0 4px #FFE3F1; }
.timeline li.tl-resuelta:first-child .tl-dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.timeline b { font-size: 14px; }
.timeline p { font-size: 13.5px; color: var(--ink-2); margin: 2px 0; }
.timeline small { font-size: 12px; color: var(--muted); }
.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.msg { display: flex; }
.msg.from-me { justify-content: flex-end; }
.bubble { max-width: 86%; padding: 10px 13px; border-radius: 16px; background: #F4F1F7; }
.from-me .bubble { background: var(--rose-bg); border-bottom-right-radius: 5px; }
.from-admin .bubble { border-bottom-left-radius: 5px; }
.bubble b { font-size: 12px; color: var(--pink-700); display: block; }
.from-admin .bubble b { color: var(--navy); }
.bubble p { font-size: 14px; }
.bubble small { font-size: 11px; color: var(--muted); }
.chat-form { display: flex; gap: 8px; margin-top: 4px; }
.chat-form input { flex: 1; min-width: 0; min-height: 46px; border-radius: 999px; border: 1.5px solid var(--line); padding: 0 16px; font-size: 16px; outline: none; background: #FCFBFD; }
.chat-form input:focus { border-color: var(--pink); }
.rate { text-align: center; }
.rate h3 { font-size: 15px; margin-bottom: 8px; }
.stars { display: flex; justify-content: center; gap: 6px; }
.stars button { color: #DCD5E3; transition: transform .15s; }
.stars button.on { color: #F5A524; }
.stars button.on svg { fill: #F5A524; }
.stars button:active { transform: scale(1.2); }
.admin-panel { border: 1.5px dashed #C6BDD3; background: #FBFAFD; display: flex; flex-direction: column; gap: 12px; }
.admin-panel h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; color: var(--navy); }

/* Formulario nueva incidencia */
.form { display: flex; flex-direction: column; gap: 18px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; padding: 0; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.cat-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cat-opt span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 14px; border: 1.5px solid var(--line); text-align: center; cursor: pointer; color: var(--ink-2); transition: all .15s; height: 100%; }
.cat-opt small { font-size: 11.5px; font-weight: 600; line-height: 1.2; }
.cat-opt input:checked + span { border-color: var(--pink); background: #FFF5FA; color: var(--pink-700); box-shadow: 0 0 0 3px rgba(255, 20, 147, .12); }
.cat-opt input:focus-visible + span { outline: 3px solid rgba(255, 20, 147, .35); }
.photo-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-add { width: 84px; height: 84px; border-radius: 14px; border: 1.5px dashed #CFC6DA; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--pink-600); cursor: pointer; }
.photo-add small { font-size: 11px; font-weight: 600; color: var(--muted); }
.thumbs { display: contents; }
.thumb { width: 84px; height: 84px; border-radius: 14px; overflow: hidden; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(46, 15, 61, .7); color: #fff; display: grid; place-items: center; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; padding: 12px 0; border-top: 1px solid var(--line-2); position: relative; }
.toggle-row:first-of-type { border-top: 0; }
.toggle-row b { font-size: 14.5px; display: block; }
.toggle-row small { font-size: 12.5px; color: var(--muted); }
.form .hint { margin-top: 0; }

/* ---------------------------------------------------------------- Cuentas */
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi-tile { background: var(--card); border-radius: var(--r); padding: 14px; border: 1px solid var(--line-2); box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kpi-tile small { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi-tile b { font-size: 20px; letter-spacing: -.01em; }
.kpi-tile span { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.tile-warn { background: #FFFBF3; border-color: #F6E2BD; }
.tile-warn span, .tile-warn b { color: var(--warn); }
.tile-ok span { color: var(--ok); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.sw-real { background: var(--c-real); }
.sw-budget { background: var(--c-budget); }
.sw-over { background: var(--c-over); }
.sw-line-budget { height: 0; border-top: 2px dashed var(--c-budget-line); border-radius: 0; width: 16px; }
.sw-proj { height: 0; border-top: 2px dotted var(--c-real); border-radius: 0; width: 16px; }
.headline { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; margin-bottom: 10px; }
.headline.warn { background: var(--warn-bg); color: #6B4100; }
.headline.ok { background: var(--ok-bg); color: #0F5B37; }
.chart-box { width: 100%; min-height: 150px; position: relative; touch-action: pan-y; }
.chart-tip { min-height: 44px; font-size: 12.5px; color: var(--muted); background: #F9F7FB; border-radius: 10px; padding: 8px 12px; margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.chart-tip strong { color: var(--ink); font-size: 13px; width: 100%; }
.tip-row { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tip-row b { color: var(--ink); }
.chart { display: block; overflow: visible; font-family: var(--font); }
.chart .grid { stroke: #EEEAF2; stroke-width: 1; }
.chart .baseline { stroke: #C9C2D2; stroke-width: 1; }
.chart .axis { font-size: 10.5px; fill: var(--muted); }
.chart .axis.muted { fill: #B2AEC0; }
.chart .axis.strong { fill: var(--ink-2); font-weight: 600; }
.chart .bar-budget { fill: var(--c-budget); }
.chart .bar-budget.future { fill: none; stroke: #D9C8DD; stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart .bar-real { fill: var(--c-real); stroke: #fff; stroke-width: 1; }
.chart .bar-real.over { fill: var(--c-over); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .col { transition: opacity .15s; }
.chart-box.has-active .col:not(.is-active) { opacity: .45; }
.chart .ref-line { stroke: var(--c-budget-line); stroke-width: 1; stroke-dasharray: 2 4; opacity: .55; }
.chart .line-budget { fill: none; stroke: var(--c-budget-line); stroke-width: 2; stroke-dasharray: 6 5; }
.chart .line-real { fill: none; stroke: var(--c-real); stroke-width: 2.5; stroke-linejoin: round; }
.chart .line-proj { fill: none; stroke: var(--c-real); stroke-width: 2; stroke-dasharray: 2 4; stroke-linecap: round; }
.chart .area-real { fill: var(--c-real); opacity: .09; }
.chart .dot-real { fill: var(--c-real); stroke: #fff; stroke-width: 2; }
.chart .dot-proj { fill: #fff; stroke: var(--c-real); stroke-width: 2; }
.chart .xhair line { stroke: var(--navy); stroke-width: 1; opacity: 0; }
.chart .xhair circle { opacity: 0; }
.chart .xhair.is-active line { opacity: .25; }
.chart .xhair.is-active circle { opacity: 1; }
.chart .area-balance { fill: var(--c-balance); opacity: .1; }
.chart .line-balance { fill: none; stroke: var(--c-balance); stroke-width: 2.5; stroke-linejoin: round; }
.chart .dot-balance { fill: var(--c-balance); stroke: #fff; stroke-width: 2; }
.chart .dot-balance.last { opacity: 1; }
.donut .seg { stroke: #fff; stroke-width: 2; cursor: pointer; transition: opacity .15s; }
.chart-box.has-active .seg:not(.is-active) { opacity: .4; }
.donut-val { font-size: 22px; font-weight: 700; fill: var(--ink); }
.donut-card { container-type: inline-size; }
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
@container (min-width: 500px) {
  .donut-wrap { flex-direction: row; align-items: center; }
  .donut-box { width: 220px; flex-shrink: 0; }
}
.donut-box { display: flex; justify-content: center; min-height: 0; }
.donut-legend { width: 100%; display: flex; flex-direction: column; gap: 2px; }
.donut-legend li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 6px 4px; border-radius: 8px; cursor: pointer; }
.donut-legend li:active { background: #F8F5FA; }
.donut-legend span { flex: 1; color: var(--ink-2); }
.table-view { margin-top: 10px; font-size: 13px; }
.table-view summary { cursor: pointer; color: var(--pink-700); font-weight: 600; padding: 4px 0; }
.table-view table, .doc-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table-view th, .table-view td { text-align: right; padding: 6px 4px; border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.table-view th:first-child, .table-view td:first-child { text-align: left; }
.table-view th { color: var(--muted); font-weight: 600; font-size: 12px; }
.exec { display: flex; flex-direction: column; gap: 14px; }
.exec-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.exec-top span { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.exec-top small { color: var(--muted); font-weight: 400; }
.exec-bar, .fund-bar { position: relative; height: 10px; border-radius: 5px; background: var(--c-budget); }
.exec-bar i, .fund-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--c-real); }
.exec-bar i.over { background: var(--c-over); }
.exec-bar em, .fund-bar em { position: absolute; top: -4px; width: 2.5px; height: 18px; border-radius: 2px; background: var(--navy); transform: translateX(-1px); }
.exec li > small { display: flex; align-items: center; gap: 4px; font-size: 12px; margin-top: 5px; font-weight: 600; }
.fund-bar i { background: var(--c-balance); }
.fund-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin: 6px 0 10px; }
.ring-row { display: flex; align-items: center; gap: 18px; }
.ring-track { fill: none; stroke: var(--c-budget); stroke-width: 12; }
.ring-fill { fill: none; stroke: var(--c-real); stroke-width: 12; stroke-linecap: round; }
.ring-val { font-size: 20px; font-weight: 700; fill: var(--ink); }
.ring-facts { flex: 1; display: grid; gap: 6px; }
.ring-row .ring { flex-shrink: 0; }
.ring-facts { min-width: 0; }
.ring-facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; }
.ring-facts dd { white-space: nowrap; }
.ring-facts dt { color: var(--muted); }
.ring-facts dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.bills, .movs { display: flex; flex-direction: column; }
.bills li, .movs li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.bills li:first-child, .movs li:first-child { border-top: 0; }
.bills li > div, .movs li > div { flex: 1; min-width: 0; }
.bills b, .movs b { font-size: 14px; display: block; }
.bills small, .movs small { font-size: 12px; color: var(--muted); }
.bill-ico { color: var(--ok); }
.bills li.pendiente .bill-ico { color: var(--warn); }
.bill-amt { text-align: right; font-variant-numeric: tabular-nums; }
.bills li.pendiente .bill-amt small { color: var(--warn); font-weight: 600; }
.movs li > span { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 14px; }

/* ---------------------------------------------------------------- Documentos */
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 0 14px; color: var(--muted); }
.search:focus-within { border-color: var(--pink); }
.search input { flex: 1; border: 0; outline: 0; min-height: 48px; background: transparent; font-size: 16px; min-width: 0; }
.folders { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.folder { background: var(--card); border-radius: var(--r-lg); padding: 14px; border: 1px solid var(--line-2); box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: 4px; position: relative; }
.folder-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--grad-soft); color: #fff; display: grid; place-items: center; margin-bottom: 6px; }
.folder b { font-size: 14px; line-height: 1.25; }
.folder small { font-size: 12px; color: var(--muted); }
.new { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--pink-600); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.folder .new { position: absolute; top: 12px; right: 12px; }
.folder-title { font-size: 19px; display: flex; align-items: center; gap: 10px; color: var(--navy); }
.folder-title .ico { color: var(--pink-600); }
.doc-list { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r-lg); border: 1px solid var(--line-2); overflow: hidden; }
.card .doc-list { border: 0; border-radius: 0; margin: 0 -4px; }
.doc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line-2); }
.doc-list li:first-child .doc { border-top: 0; }
.doc:active { background: #FAF7FB; }
.doc-ico { width: 40px; height: 46px; border-radius: 8px; background: #FDEAF3; color: var(--pink-600); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-ico em { font-style: normal; font-size: 8.5px; font-weight: 800; letter-spacing: .05em; }
.doc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doc-txt b { font-size: 14px; line-height: 1.3; }
.doc-txt small { font-size: 12px; color: var(--muted); }

/* Visor de documentos */
.doc-viewer { display: flex; flex-direction: column; height: 100%; }
.dv-bar { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 6px; border-bottom: 1px solid var(--line); background: #fff; }
.dv-title { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 6px; }
.dv-title b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-title small { font-size: 11.5px; color: var(--muted); }
.dv-scroll { flex: 1; overflow: auto; background: #E9E5EE; padding: 18px 12px calc(var(--sab) + 24px); -webkit-overflow-scrolling: touch; }
.paper { background: #fff; max-width: 720px; margin: 0 auto; padding: 26px 22px; border-radius: 6px; box-shadow: 0 8px 30px -10px rgba(46, 15, 61, .3); font-size: 13.5px; color: #2E0F3D; line-height: 1.6; }
.lh { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 3px solid transparent; border-image: var(--grad) 1; }
.lh img { width: 130px; border-radius: 6px; }
.lh b { display: block; font-size: 13.5px; color: var(--navy); }
.lh small { font-size: 11px; color: var(--muted); line-height: 1.4; display: block; }
.lh-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); margin: 8px 0 18px; text-transform: uppercase; letter-spacing: .05em; }
.doc-body h1 { font-family: var(--serif); font-size: 21px; color: var(--navy); margin-bottom: 12px; line-height: 1.25; }
.doc-body h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--pink-700); margin: 18px 0 8px; }
.doc-body p { margin-bottom: 10px; }
.doc-body ol { list-style: decimal; padding-left: 20px; margin-bottom: 10px; }
.doc-body ul { list-style: disc; padding-left: 20px; margin-bottom: 10px; }
.doc-body li { margin-bottom: 4px; }
.doc-table { font-size: 12.5px; margin: 10px 0 14px; }
.doc-table th, .doc-table td { padding: 7px 6px; border-bottom: 1px solid #ECE8F0; text-align: left; }
.doc-table th { background: #F7F4F9; font-weight: 700; color: var(--navy); }
.doc-table td:not(:first-child), .doc-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.doc-table tr.tot td { font-weight: 700; border-top: 2px solid var(--navy); }
.doc-table tr.hl td { background: #FFF2F9; font-weight: 600; }
.signs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; font-size: 12px; color: var(--muted); }
.signs div { border-top: 1px solid #CFC8D8; padding-top: 6px; }
.signs span { display: block; color: var(--ink); font-weight: 600; }
.result { font-size: 18px; font-weight: 800; color: var(--ok); letter-spacing: .05em; }
.lh-foot { margin-top: 26px; padding-top: 10px; border-top: 1px solid #ECE8F0; font-size: 10.5px; color: var(--muted); text-align: center; }

/* ---------------------------------------------------------------- Agenda */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.chip i { width: 9px; height: 9px; border-radius: 50%; opacity: .35; }
.chip.on { color: var(--ink); border-color: #CFC4DA; }
.chip.on i { opacity: 1; }
.cal-head b { display: inline-block; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head b { font-size: 16px; }
.cal-head b::first-letter { text-transform: uppercase; }
.cal-head .icon-btn:active { background: #F3EFF6; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow span { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); padding-bottom: 4px; }
.cal-cell { aspect-ratio: 1 / 1.05; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 14px; font-weight: 600; color: var(--ink-2); position: relative; }
.cal-cell.empty { visibility: hidden; }
.cal-cell.has { background: #FAF7FB; color: var(--ink); }
.cal-cell.today span:first-child { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; }
.cal-cell.sel { box-shadow: inset 0 0 0 2px var(--pink); background: #FFF5FA; }
.cal-dots { display: flex; gap: 3px; height: 6px; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; }
.month-h { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 6px; }
.card .month-h:first-of-type { margin-top: 0; }
.ev-sheet h2 { font-family: var(--serif); font-size: 23px; margin: 10px 0 14px; line-height: 1.2; }
.ev-type { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--ev-bg); color: var(--ev-c); }
.ev-facts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.ev-facts li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.ev-facts li span::first-letter { text-transform: uppercase; }
.ev-facts .ico { color: var(--pink-600); margin-top: 1px; }
.ev-facts small { color: var(--muted); }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }

/* ---------------------------------------------------------------- Notificaciones */
.notif-list { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r-lg); border: 1px solid var(--line-2); overflow: hidden; }
.notif { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-top: 1px solid var(--line-2); position: relative; }
.notif-list li:first-child .notif { border-top: 0; }
.notif.unread { background: #FFF8FC; }
.notif > div { flex: 1; min-width: 0; }
.notif b { font-size: 14px; display: block; line-height: 1.3; }
.notif p { font-size: 13.5px; color: var(--ink-2); margin: 2px 0; }
.notif small { font-size: 12px; color: var(--muted); }
.notif .dot { margin-top: 6px; }
.com-tag { font-weight: 600; color: var(--navy); }
.n-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: #F1EEF5; color: var(--navy); }
.n-incidencia { background: var(--rose-bg); color: var(--pink-600); }
.n-aviso { background: var(--bad-bg); color: var(--bad); }
.n-junta { background: #F3E8FB; color: #6A2BA8; }
.n-documento { background: #E6EEFC; color: #2C4FA8; }
.n-recibo { background: var(--ok-bg); color: var(--ok); }

/* ---------------------------------------------------------------- Contactos y perfil */
.admin-contact { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ac-logo { width: 200px; border-radius: 12px; }
.admin-contact p { color: var(--ink-2); font-size: 14px; max-width: 460px; }
.ac-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.ac-actions .btn { flex: 1 1 140px; }
.contacts { display: flex; flex-direction: column; }
.contacts li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.contacts li:first-child { border-top: 0; padding-top: 0; }
.contacts li > div { flex: 1; min-width: 0; }
.contacts b { font-size: 14px; display: block; }
.contacts small { font-size: 12px; color: var(--muted); }
.c-ico { width: 40px; height: 40px; border-radius: 12px; background: #F1EEF5; color: var(--navy); display: grid; place-items: center; flex-shrink: 0; }
.avatar-sm { font-size: 13px; font-weight: 700; background: var(--navy); color: #fff; }
.emerg .c-ico { background: var(--bad-bg); color: var(--bad); }
.call { display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 12px; justify-content: center; border-radius: 999px; background: var(--rose-bg); color: var(--pink-700); font-weight: 700; font-size: 14px; }
.emerg .call { background: var(--bad); color: #fff; }
.profile { display: flex; align-items: center; gap: 16px; }
.profile h1 { font-family: var(--serif); font-size: 22px; }
.profile p { font-size: 13.5px; }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; flex-shrink: 0; }
.row-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-top: 1px solid var(--line-2); font-weight: 600; font-size: 14.5px; text-align: left; }
.row-btn:first-of-type { border-top: 0; }
.row-btn .ico { color: var(--pink-600); }
.row-btn.danger, .row-btn.danger .ico { color: var(--bad); }
.foot-note { text-align: center; font-size: 12px; color: var(--muted); line-height: 1.6; padding: 6px 0 4px; }

/* ---------------------------------------------------------------- Hoja inferior */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(46, 15, 61, .45); opacity: 0; transition: opacity .25s; backdrop-filter: blur(2px); }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; background: #fff; border-radius: 24px 24px 0 0; padding: 10px 20px calc(var(--sab) + 22px); transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--sh-3); }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: #DDD6E4; margin: 0 auto 14px; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-full { max-width: none; height: calc(100% - var(--sat) - 10px); max-height: none; padding: 0; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; overflow: hidden; }
.sheet-full .sheet-grip { display: none; }
.switcher h2, .install-help h2 { font-family: var(--serif); font-size: 22px; }
.switcher ul { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.install-help ol { list-style: decimal; padding-left: 22px; margin: 14px 0 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }

/* ---------------------------------------------------------------- Toast */
.toast { position: fixed; left: 50%; top: calc(var(--sat) + 12px); transform: translate(-50%, -150%); z-index: 200; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 10px; box-shadow: var(--sh-3); transition: transform .3s cubic-bezier(.2, .8, .2, 1); width: max-content; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); }
.toast-ok .ico { color: #5BE0A0; }
.toast-bell { background: var(--grad-soft); }

/* ---------------------------------------------------------------- Tablet y escritorio */
@media (min-width: 640px) {
  .kpi-row { grid-template-columns: repeat(4, 1fr); }
  .folders { grid-template-columns: repeat(3, 1fr); }
  .hide-mobile { display: inline-flex; }
  .fab { display: none; }
  .view { padding-left: 24px; padding-right: 24px; }
  .chips { margin: 0; padding: 0 0 4px; }
  .paper { padding: 40px 44px; }
  .sheet { border-radius: 24px; margin-bottom: 24px; }
  .sheet-wrap { align-items: center; }
  .sheet-full { border-radius: 18px; height: calc(100% - 48px); max-width: 860px; margin: 0; }
}
@media (min-width: 760px) {
  .grid-2 { grid-template-columns: 1fr 1fr; align-items: start; }
  .quick { gap: 14px; }
  .q { flex-direction: row; justify-content: center; font-size: 14px; padding: 16px 10px; }
  .hero-card { padding: 30px 30px 24px; }
  .hero-title { font-size: 34px; }
  .page-head h1 { font-size: 32px; }
  .inc-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  :root { --top-h: 68px; }
  .side {
    display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: var(--side-w); z-index: 45;
    background: var(--grad-side); color: #fff; padding: calc(var(--sat) + 22px) 16px 18px;
  }
  .side-brand img { width: 190px; margin: 0 6px 18px; }
  .side-switch { flex: 0 0 auto; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); margin-bottom: 14px; padding: 10px 12px; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
  .side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; font-size: 14.5px; color: rgba(255, 255, 255, .78); position: relative; transition: background .15s, color .15s; }
  .side-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
  .side-nav a.active { background: rgba(255, 255, 255, .14); color: #fff; }
  .side-nav a.active::before { content: ''; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--pink); }
  .side-nav .badge-n { position: static; margin-left: auto; box-shadow: none; background: var(--pink); color: #fff; }
  .side-user { display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
  .side-user b { font-size: 13.5px; display: block; }
  .side-user small { font-size: 12px; opacity: .7; }
  .main { margin-left: var(--side-w); }
  .top { left: var(--side-w); background: rgba(246, 243, 247, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--ink); box-shadow: none; border-bottom: 1px solid var(--line); justify-content: flex-end; padding-right: 24px; }
  .top .com-switch, .top-mark { display: none; }
  .top .badge-n { background: var(--pink-600); color: #fff; box-shadow: 0 0 0 2px #fff; }
  .top-btn:hover { background: #EDE8F1; }
  .top-avatar { background: var(--grad); border: 0; }
  .tabbar { display: none; }
  .view { padding: calc(var(--top-h) + 22px) 32px 48px; }
  .toast { top: auto; bottom: 24px; transform: translate(-50%, 150%); left: calc(50% + var(--side-w) / 2); }
  .toast.show { transform: translate(-50%, 0); }
}

/* ---------------------------------------------------------------- Impresión del documento */
@media print {
  body.printing-doc > *:not(.sheet-wrap) { display: none !important; }
  body.printing-doc .sheet-wrap { position: static; display: block; }
  body.printing-doc .sheet-backdrop, body.printing-doc .dv-bar { display: none; }
  body.printing-doc .sheet { position: static; transform: none; box-shadow: none; height: auto; max-height: none; overflow: visible; }
  body.printing-doc .dv-scroll { background: #fff; padding: 0; overflow: visible; }
  body.printing-doc .paper { box-shadow: none; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
