/* Casa Abierta — pizarra, azul petróleo, crema y dorado */
:root {
  --bg: #EDF0F1;
  --surface: #FFFFFF;
  --surface-2: #F7F5F0;          /* crema */
  --hover: #F2F5F6;
  --line: #E1E5E8;
  --line-strong: #CCD3D8;
  --ink: #1B232A;
  --ink-2: #4A5761;
  --ink-3: #82909A;
  --teal: #3B6A7C;               /* azul petróleo, acción principal */
  --teal-hover: #2F5868;
  --teal-deep: #213F4B;
  --teal-soft: #E2ECEF;
  --gold: #C9A044;               /* dorado, llamado a la acción */
  --gold-hover: #B98F35;
  --gold-ink: #1E1705;
  --gold-soft: #F7EFD9;
  --green: #2E8A6F;
  --green-soft: #DFF1EA;
  --red: #C1503B;
  --red-soft: #F8E1DB;
  --amber: #C08A1C;
  --amber-soft: #FBF0D6;
  --rail: #1A2127;
  --rail-2: #232C33;
  --rail-ink: #D3DCE1;
  --shadow-sm: 0 1px 2px rgba(20, 30, 38, .06);
  --shadow: 0 1px 2px rgba(20, 30, 38, .05), 0 8px 24px rgba(20, 30, 38, .07);
  --shadow-lg: 0 24px 64px rgba(10, 16, 20, .35);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1'%3E%3Cpath d='M0 60 L80 0 L200 70 L240 40'/%3E%3Cpath d='M0 180 L90 120 L160 200 L240 150'/%3E%3Cpath d='M80 0 L90 120 L200 70 L160 200'/%3E%3Cpath d='M0 60 L90 120 L0 180'/%3E%3Cpath d='M200 70 L240 150'/%3E%3Cpath d='M90 120 L120 240 M160 200 L240 240'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161A; --surface: #182026; --surface-2: #1D262C; --hover: #1F2930; --line: #2A353C; --line-strong: #3A4750;
    --ink: #E5ECEF; --ink-2: #AEBBC3; --ink-3: #7D8B94;
    --teal: #6FA6BA; --teal-hover: #86B8CA; --teal-deep: #CFE3EA; --teal-soft: #1F343D;
    --gold: #D7B45A; --gold-hover: #E3C26C; --gold-ink: #1C1504; --gold-soft: #33301F;
    --green: #5CC09F; --green-soft: #183229; --red: #EB8670; --red-soft: #3A221D; --amber: #E2B04B; --amber-soft: #352B16;
    --rail: #0D1114; --rail-2: #161C21; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-sm: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11161A; --surface: #182026; --surface-2: #1D262C; --hover: #1F2930; --line: #2A353C; --line-strong: #3A4750;
  --ink: #E5ECEF; --ink-2: #AEBBC3; --ink-3: #7D8B94;
  --teal: #6FA6BA; --teal-hover: #86B8CA; --teal-deep: #CFE3EA; --teal-soft: #1F343D;
  --gold: #D7B45A; --gold-hover: #E3C26C; --gold-ink: #1C1504; --gold-soft: #33301F;
  --green: #5CC09F; --green-soft: #183229; --red: #EB8670; --red-soft: #3A221D; --amber: #E2B04B; --amber-soft: #352B16;
  --rail: #0D1114; --rail-2: #161C21; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-sm: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
body {
  background: var(--bg); color: var(--ink);
  font: 14.5px/1.5 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--teal); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
[hidden] { display: none !important; }
.num, .price, .stat-value, .when b { font-variant-numeric: tabular-nums; }

/* ---------- Estructura ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.rail {
  background: var(--rail) var(--pattern); color: var(--rail-ink);
  position: sticky; top: 0; height: 100vh; padding: 20px 12px;
  display: flex; flex-direction: column; gap: 2px; border-right: 1px solid rgba(255,255,255,.04);
}
.brand { display: flex; gap: 11px; align-items: center; padding: 2px 10px 22px; }
.brand-mark { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 4px 10px rgba(201,160,68,.25)); }
.brand b { font-size: 16.5px; font-weight: 700; letter-spacing: -.015em; display: block; line-height: 1.15; color: #fff; }
.brand small { font-size: 12px; opacity: .65; }
.nav a {
  display: flex; gap: 11px; align-items: center; padding: 9px 12px; border-radius: 10px; position: relative;
  color: inherit; text-decoration: none; font-weight: 500; opacity: .78; transition: background .15s, opacity .15s;
}
.nav a:hover { opacity: 1; background: rgba(255, 255, 255, .05); }
.nav a[aria-current="page"] { opacity: 1; background: rgba(255, 255, 255, .08); color: #fff; font-weight: 600; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--gold); color: var(--gold-ink); border-radius: 99px; padding: 0 7px; line-height: 19px; }
.rail .rail-call { margin: 18px 4px 0; }
.rail-foot { margin-top: auto; font-size: 12px; opacity: .6; padding: 8px 12px; }

main { padding: 26px clamp(16px, 3vw, 40px) 110px; min-width: 0; max-width: 1320px; width: 100%; }
.tabbar, .fab { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  main { padding: 16px 16px 128px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px;
    font-size: 10.5px; font-weight: 600; color: var(--ink-3); text-decoration: none; position: relative; border-radius: 10px;
  }
  .tabbar a[aria-current="page"] { color: var(--teal); }
  .tabbar a[aria-current="page"] svg { stroke-width: 2.4; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .count { position: absolute; top: 2px; left: 56%; background: var(--gold); color: var(--gold-ink); border-radius: 99px; font-size: 10px; font-weight: 700; padding: 0 5px; line-height: 16px; }
  .fab {
    display: inline-flex; position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 31;
    align-items: center; gap: 8px; border: 0; cursor: pointer; font-weight: 700;
    background: var(--gold); color: var(--gold-ink); padding: 14px 18px; border-radius: 99px;
    box-shadow: 0 10px 28px rgba(150, 110, 20, .35);
  }
  .fab svg { width: 20px; height: 20px; }
}

/* ---------- Encabezados ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(24px, 3vw, 30px); line-height: 1.1; letter-spacing: -.025em; margin: 0; font-weight: 700; }
.page-head p { margin: 5px 0 0; color: var(--ink-2); }
.back { display: inline-flex; gap: 4px; align-items: center; color: var(--ink-3); text-decoration: none; font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.back svg { width: 16px; height: 16px; }
.back:hover { color: var(--teal); }
h2.section { font-size: 14px; margin: 0 0 12px; display: flex; align-items: baseline; gap: 8px; font-weight: 650; letter-spacing: -.005em; }
h2.section small { color: var(--ink-3); font-weight: 500; font-size: 12.5px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s; box-shadow: var(--shadow-sm);
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-hover); border-color: var(--teal-hover); }
:root[data-theme="dark"] .btn.primary { color: #0D1A20; }
.btn.gold, .btn.mostaza { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn.gold:hover, .btn.mostaza:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.icon-btn {
  width: 34px; height: 34px; flex: none; display: inline-grid; place-items: center; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; text-decoration: none;
  transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: var(--teal); border-color: var(--teal); background: var(--teal-soft); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.wa:hover { color: #1D9E5B; border-color: #1D9E5B; background: #E3F5EA; }

/* ---------- Paneles y listas ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 18px 14px; box-shadow: var(--shadow-sm); }
.panel + .panel { margin-top: 16px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cols > div > .panel + .panel { margin-top: 16px; }
@media (max-width: 1000px) { .cols { grid-template-columns: 1fr; } }
.cols3 { display: grid; grid-template-columns: 290px minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.cols3 > div > .panel + .panel { margin-top: 16px; }
@media (max-width: 1240px) { .cols3 { grid-template-columns: 280px minmax(0, 1fr); } .cols3 > .c3 { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; } .cols3 > .c3 > .panel + .panel { margin-top: 0; } }
@media (max-width: 860px) { .cols3 { grid-template-columns: 1fr; } }

.list { list-style: none; margin: 0 -8px; padding: 0; }
.list > li { display: flex; gap: 12px; align-items: center; padding: 10px 8px; border-radius: 10px; transition: background .12s; }
.list > li + li { border-top: 1px solid var(--line); }
.list > li:hover { background: var(--hover); }
.list > li:hover + li { border-top-color: transparent; }
.list .t { font-weight: 600; overflow-wrap: anywhere; }
.list .s { font-size: 12.5px; color: var(--ink-2); }
.list a.row-link { color: inherit; text-decoration: none; display: block; }
.list a.row-link:hover .t { color: var(--teal); }
.empty { padding: 20px 6px; color: var(--ink-3); font-size: 13.5px; text-align: center; }
.list > li.empty:hover { background: none; }
.empty .btn { margin-top: 10px; }
.more { display: block; text-align: center; font-size: 13px; font-weight: 600; padding-top: 10px; text-decoration: none; }
@media (max-width: 600px) {
  .list > li { flex-wrap: wrap; row-gap: 8px; }
  .list > li > .grow { flex: 1 1 calc(100% - 60px); }
  .list > li > .grow ~ * { order: 2; }
  .list > li > .grow + * { margin-left: 50px; }
  .list > li > .check ~ .grow + *, .list > li > .when ~ .grow + * { margin-left: 92px; }
  .page-head > .row { width: 100%; }
}

.avatar {
  width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; position: relative;
  font-weight: 650; font-size: 13.5px; background: var(--teal-soft); color: var(--teal-deep); letter-spacing: .02em;
}
.avatar.unknown { background: var(--surface-2); color: var(--ink-3); border: 1px dashed var(--line-strong); }
.avatar svg { width: 17px; height: 17px; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
/* Semáforo de inactividad sobre el avatar */
.heat { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); }
.heat.ok { background: var(--green); }
.heat.warn { background: var(--amber); }
.heat.cold { background: var(--red); }

/* Estado: punto + palabra */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.activo { color: var(--green); }
.status.seguimiento { color: var(--amber); }
.status.cierre { color: var(--teal); }
.status.descartado { color: var(--ink-3); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.tag.teal, .tag.ocre { background: var(--teal-soft); border-color: transparent; color: var(--teal-deep); }
.tag.gold, .tag.mostaza { background: var(--gold-soft); border-color: transparent; color: #7A5B12; }
:root[data-theme="dark"] .tag.gold, :root[data-theme="dark"] .tag.mostaza { color: var(--gold); }
.tag.olive, .tag.green { background: var(--green-soft); border-color: transparent; color: var(--green); }
.tag.brick, .tag.red { background: var(--red-soft); border-color: transparent; color: var(--red); }
button.tag { cursor: pointer; font-family: inherit; }
button.tag:hover { border-color: var(--teal); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1080px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px 12px;
  text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s; position: relative; overflow: hidden; min-width: 0;
}
a.kpi:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.kpi .k-label { font-size: 12.5px; color: var(--ink-2); font-weight: 550; display: flex; align-items: center; gap: 7px; }
.kpi .k-label i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.kpi .stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.kpi .k-foot { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.trend { font-weight: 650; }
.trend.up { color: var(--green); }
.trend.down { color: var(--red); }
.spark { position: absolute; right: 14px; top: 18px; width: 42%; max-width: 130px; height: 38px; }
@media (max-width: 560px) { .spark { display: none; } }

/* ---------- ¿Quién llama? ---------- */
.dial {
  background: linear-gradient(135deg, #4C7D8F 0%, #3B6A7C 45%, #2D5565 100%); color: #fff; border-radius: 20px;
  padding: 18px 22px 16px; margin-bottom: 18px; position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.dial::before { content: ""; position: absolute; inset: 0; background: var(--pattern); opacity: 1.6; pointer-events: none; }
.dial > * { position: relative; z-index: 1; }
.dial label { font-size: 12.5px; font-weight: 600; opacity: .85; display: flex; align-items: center; gap: 7px; }
.dial label svg { width: 15px; height: 15px; }
.dial input {
  display: block; width: 100%; background: transparent; border: 0; border-bottom: 2px solid rgba(255, 255, 255, .22);
  color: #fff; font-size: clamp(28px, 4.4vw, 38px); font-weight: 650; font-variant-numeric: tabular-nums;
  letter-spacing: .01em; padding: 4px 0 6px; outline: none;
}
.dial input::placeholder { color: rgba(255, 255, 255, .32); }
.dial input:focus { border-bottom-color: var(--gold); }
.dial-results { margin-top: 10px; }
.dial-results .hit {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .1); margin-top: 6px; color: inherit; text-decoration: none; backdrop-filter: blur(4px);
}
.dial-results .hit:hover { background: rgba(255, 255, 255, .17); }
.dial-results .hit .s { font-size: 12.5px; opacity: .85; }
.dial-results .avatar { background: var(--gold); color: var(--gold-ink); }
.dial-results .none { font-size: 13.5px; opacity: .9; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Agenda ---------- */
.when { flex: none; width: 56px; text-align: center; }
.when b { display: block; font-size: 14.5px; font-weight: 650; }
.when span { font-size: 11px; color: var(--ink-3); text-transform: capitalize; }
.when.late b { color: var(--red); }
.check {
  appearance: none; width: 22px; height: 22px; flex: none; border: 2px solid var(--line-strong); border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: var(--surface); transition: background .15s, border-color .15s;
}
.check:hover { border-color: var(--green); }
.check:checked { background: var(--green); border-color: var(--green); }
.check:checked::after { content: ""; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
li.done .t { text-decoration: line-through; opacity: .55; }

.cal-wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .cal-wrap { grid-template-columns: 1fr; } }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; font-size: 11.5px; color: var(--ink-3); padding: 2px 0 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.cal button {
  min-height: 62px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; padding: 6px 7px; text-align: left; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: border-color .15s, background .15s;
}
.cal button:hover { border-color: var(--teal); }
.cal button.out { opacity: .38; }
.cal button.today { border-color: var(--gold); background: var(--gold-soft); }
.cal button.sel { background: var(--teal); border-color: var(--teal); color: #fff; }
.cal .dots { display: flex; gap: 3px; margin-top: auto; flex-wrap: wrap; }
.cal .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.cal .dots i.visita { background: var(--gold); }
.cal .dots i.firma { background: var(--green); }
.cal .dots i.fu { background: var(--amber); }
.cal button.sel .dots i { background: #fff; }
@media (max-width: 560px) { .cal button { min-height: 44px; font-size: 13px; padding: 4px; } }

/* ---------- Bitácora ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 42px; }
.timeline li::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot {
  position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2);
}
.timeline .dot svg { width: 16px; height: 16px; }
.timeline .ch-llamada .dot { background: var(--teal-soft); color: var(--teal); }
.timeline .ch-whatsapp .dot { background: #E1F4E8; color: #1D9E5B; }
.timeline .ch-visita .dot { background: var(--gold-soft); color: #8C6814; }
.timeline .ch-correo .dot { background: #E7E6F5; color: #5A55A0; }
.timeline .ch-nota .dot, .timeline .ch-otro .dot { background: var(--surface-2); color: var(--ink-3); }
:root[data-theme="dark"] .timeline .ch-whatsapp .dot { background: #173426; }
:root[data-theme="dark"] .timeline .ch-correo .dot { background: #25243A; color: #A9A5E6; }
:root[data-theme="dark"] .timeline .ch-visita .dot { color: var(--gold); }
.timeline .meta { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; min-height: 32px; }
.timeline .meta b { color: var(--ink); font-weight: 600; }
.timeline .meta a { color: var(--ink); font-weight: 600; text-decoration: none; }
.timeline .meta a:hover { color: var(--teal); }
.dir { font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 99px; }
.dir.in { background: var(--gold-soft); color: #7A5B12; }
.dir.out { background: var(--teal-soft); color: var(--teal-deep); }
:root[data-theme="dark"] .dir.in { color: var(--gold); }
.timeline .c { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.timeline .del { opacity: 0; border: 0; background: var(--surface); color: var(--ink-3); cursor: pointer; font-size: 12px; padding: 2px 6px; position: absolute; right: 0; top: 6px; border-radius: 6px; }
.timeline .del:hover { color: var(--red); }
@media (hover: none) { .timeline .del { opacity: .7; position: static; } }
.timeline li:hover .del, .timeline .del:focus { opacity: 1; }

/* ---------- Propiedades ---------- */
.table-panel { padding: 6px; }
.ptable { width: 100%; border-collapse: separate; border-spacing: 0; }
.ptable th { text-align: left; font-size: 11.5px; font-weight: 650; color: var(--ink-3); padding: 10px 12px; text-transform: uppercase; letter-spacing: .04em; }
.ptable td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.ptable tbody tr { cursor: pointer; transition: background .12s; }
.ptable tbody tr:hover td { background: var(--hover); }
.ptable tbody tr:hover td:first-child { border-radius: 10px 0 0 10px; }
.ptable tbody tr:hover td:last-child { border-radius: 0 10px 10px 0; }
.ptable tr.inactive td { opacity: .55; }
.ptable .num { text-align: right; white-space: nowrap; }
.ptable .t { font-weight: 600; }
.ptype { display: inline-flex; align-items: center; gap: 8px; }
.ptype i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); flex: none; }
.ptype i svg { width: 16px; height: 16px; }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; color: var(--ink-3); }
.count-pill { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--teal-soft); color: var(--teal-deep); font-weight: 650; font-size: 12px; }
.count-pill.zero { background: transparent; color: var(--ink-3); }
.pcards { display: none; }
@media (max-width: 760px) { .ptable { display: none; } .pcards { display: block; } }
.price { font-weight: 650; }
.price small { font-weight: 500; color: var(--ink-3); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 18px; margin: 0; }
.facts.stack { grid-template-columns: 1fr; gap: 12px; }
.facts div { min-width: 0; }
.facts dt { font-size: 11.5px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.6; margin: 0; color: var(--ink-2); }
.prose.clip { max-height: 9.6em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.hero-prop { display: flex; gap: 16px; align-items: center; }
.hero-prop .icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #4C7D8F, #2D5565); color: #fff; flex: none; }
.hero-prop .icon svg { width: 26px; height: 26px; }

/* ---------- Filtros ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.search-wrap { position: relative; flex: 1; min-width: 220px; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.search { width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; padding: 9px 12px 9px 36px; box-shadow: var(--shadow-sm); }
.search:focus, .select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.select { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; padding: 9px 10px; box-shadow: var(--shadow-sm); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 11px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-2); border-radius: 7px; transition: background .12s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--teal-deep); box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--teal-soft); color: var(--ink); }
.chipbar { display: flex; gap: 6px; flex-wrap: wrap; }
.chipbar button {
  border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
}
.chipbar button span { color: var(--ink-3); font-weight: 600; }
.chipbar button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.chipbar button[aria-pressed="true"] span { color: rgba(255,255,255,.75); }

/* ---------- Formularios y diálogos ---------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }
.f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.f input, .f select, .f textarea {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px;
  padding: 10px 12px; font-weight: 400; color: var(--ink); width: 100%; font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.f textarea { min-height: 84px; resize: vertical; }
.f .hint { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.f.big input { font-size: 22px; font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: .01em; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 99px; padding: 6px 12px;
  font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); transition: background .12s;
}
.chips button:hover { border-color: var(--teal); }
.chips button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.chips button[data-v="cierre"][aria-pressed="true"] { background: var(--teal-deep); border-color: var(--teal-deep); }
:root[data-theme="dark"] .chips button[aria-pressed="true"] { color: #0D1A20; }
.checkline { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 500; color: var(--ink); }
.checkline input { width: 18px; height: 18px; accent-color: var(--teal); }

dialog {
  border: 0; padding: 0; border-radius: 18px; width: min(600px, calc(100vw - 20px)); max-height: calc(100dvh - 24px);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
dialog::backdrop { background: rgba(12, 18, 22, .55); backdrop-filter: blur(2px); }
.dlg-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.dlg-h h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.dlg-b { padding: 18px 20px; }
.dlg-f { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface-2); }
.dlg-f .left { margin-right: auto; }
.match { margin-top: 2px; padding: 10px 12px; border-radius: 10px; background: var(--gold-soft); font-size: 13.5px; border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
@media (max-width: 560px) {
  dialog { width: 100vw; max-width: 100vw; max-height: 94dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
}

/* ---------- Avisos ---------- */
.toasts { position: fixed; z-index: 60; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
@media (max-width: 860px) { .toasts { left: 16px; right: 16px; bottom: calc(140px + env(safe-area-inset-bottom)); } }
.toast { background: var(--rail); color: #fff; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: tin .18s ease-out; border-left: 3px solid var(--gold); }
.toast.err { border-left-color: var(--red); }
@keyframes tin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); color: var(--ink); font-size: 13.5px; margin-bottom: 14px; }

/* ---------- Inicio de sesión ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #1E2328 var(--pattern); }
.login-card { width: min(860px, 100%); display: grid; grid-template-columns: 1fr 1fr; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); }
.login-side {
  background: linear-gradient(150deg, #5E8B9B 0%, #46717F 50%, #36606E 100%); color: #fff; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 28px; min-height: 420px;
}
.login-side::before { content: ""; position: absolute; inset: 0; background: var(--pattern); opacity: 2; }
.login-side > * { position: relative; }
.login-side .brand-mark { width: 74px; height: 74px; margin-bottom: 16px; }
.login-side b { font-size: 30px; font-weight: 700; letter-spacing: -.03em; display: block; }
.login-side small { font-size: 15px; opacity: .85; }
.login-form { background: #F6F2E9; color: #1B232A; padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.login-form h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.025em; font-weight: 700; }
.login-form p { margin: 0 0 22px; color: #4A5761; }
.login-form .f { color: #4A5761; }
.login-form .f input { background: #FFFDF8; border: 1.5px solid #5A8494; border-radius: 99px; padding: 11px 16px; color: #1B232A; }
.login-form .f input:focus { box-shadow: 0 0 0 3px rgba(90, 132, 148, .2); }
.login-form .f + .f { margin-top: 14px; }
.pw { position: relative; }
.pw input { padding-right: 46px !important; width: 100%; }
.pw button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #3B6A7C; cursor: pointer; padding: 6px; border-radius: 99px; display: grid; }
.pw button svg { width: 19px; height: 19px; }
.login-form .btn { margin-top: 22px; border-radius: 99px; padding: 12px; font-size: 15px; box-shadow: 0 8px 20px rgba(150, 110, 20, .3); }
.login-links { margin-top: 18px; text-align: center; font-size: 13px; }
.login-links button { background: none; border: 0; color: #3B6A7C; text-decoration: underline; cursor: pointer; padding: 0; }
.login-help { margin-top: 10px; font-size: 13px; color: #4A5761; text-align: center; }
.err-text { color: #B0412C; font-size: 13.5px; margin-top: 10px; min-height: 1em; text-align: center; }
@media (max-width: 720px) {
  .login-card { grid-template-columns: 1fr; }
  .login-side { min-height: 0; padding: 28px 20px; flex-direction: row; gap: 14px; text-align: left; }
  .login-side .brand-mark { width: 48px; height: 48px; margin: 0; }
  .login-side b { font-size: 22px; }
  .login-form { padding: 28px 22px; }
}

.loading { padding: 48px; text-align: center; color: var(--ink-3); }

/* Filas clicables con enlace en el nombre (permite botones dentro) */
.list > li.clickable { cursor: pointer; }
.list .t a { color: inherit; text-decoration: none; }
.list li.clickable:hover .t a { color: var(--teal); }
.list .t .tag { margin-left: 4px; vertical-align: 1px; }
.icon-btn.ok:hover { color: var(--green); border-color: var(--green); background: var(--green-soft); }

/* =================== v3 =================== */
/* ---------- Color del menú (elegido por la cuenta) ---------- */
:root, :root[data-rail="petroleo"] { --rail: #1E4250; --rail-2: #26505F; }
:root[data-rail="marino"] { --rail: #1C2B4B; --rail-2: #24365A; }
:root[data-rail="bosque"] { --rail: #1E3B32; --rail-2: #27493E; }
:root[data-rail="vino"] { --rail: #4A1E2B; --rail-2: #5A2735; }
:root[data-rail="ciruela"] { --rail: #3A2449; --rail-2: #472D58; }
.rail { background: linear-gradient(180deg, var(--rail-2) 0%, var(--rail) 55%) , var(--rail); background-image: var(--pattern), linear-gradient(180deg, var(--rail-2) 0%, var(--rail) 60%); }
.brand { align-items: center; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.brand-initials { width: 42px; height: 42px; border-radius: 12px; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; font-weight: 700; flex: none; }
.brand b { font-size: 16px; }
.rail-tools { margin: 14px 4px 0; display: flex; flex-direction: column; gap: 2px; }
.priv-toggle, .rail-news {
  display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 12px; border-radius: 10px; border: 0; background: none;
  color: inherit; font: inherit; font-size: 13.5px; font-weight: 500; opacity: .8; cursor: pointer; text-decoration: none; position: relative; text-align: left;
}
.priv-toggle:hover, .rail-news:hover { opacity: 1; background: rgba(255,255,255,.06); }
.priv-toggle svg, .rail-news svg { width: 17px; height: 17px; flex: none; }
.priv-toggle[aria-pressed="true"] { opacity: 1; background: var(--gold); color: var(--gold-ink); }
.news-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--rail); display: inline-block; margin-left: auto; }
.top-news .news-dot { position: absolute; top: 4px; right: 4px; margin: 0; }
.priv-toggle.btn { width: auto; opacity: 1; padding: 9px 14px; border: 1px solid var(--line-strong); color: var(--ink); }
.priv-toggle.btn[aria-pressed="true"] { color: var(--gold-ink); border-color: var(--gold); }

/* Barra superior en el celular: su marca siempre visible */
.topbar { display: none; }
@media (max-width: 860px) {
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 25;
    background: var(--rail); background-image: var(--pattern); color: #fff; padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
  }
  .topbar .brand { padding: 0; gap: 10px; min-width: 0; }
  .topbar .brand b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .brand small { display: none; }
  .topbar .brand-logo { width: 36px; height: 36px; }
  .topbar .priv-toggle.icon-only span { display: none; }
  .topbar .priv-toggle, .top-news { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; color: #fff; opacity: .9; display: inline-grid; place-items: center; position: relative; }
  .topbar .priv-toggle[aria-pressed="true"] { color: var(--gold-ink); }
  .top-news svg { width: 20px; height: 20px; }
}

/* ---------- Tamaño de letra ---------- */
:root[data-font="l"] main, :root[data-font="l"] dialog, :root[data-font="l"] .popover, :root[data-font="l"] .nudge, :root[data-font="l"] .tour-bubble, :root[data-font="l"] .toasts { zoom: 1.12; }
:root[data-font="xl"] main, :root[data-font="xl"] dialog, :root[data-font="xl"] .popover, :root[data-font="xl"] .nudge, :root[data-font="xl"] .tour-bubble, :root[data-font="xl"] .toasts { zoom: 1.25; }
:root[data-font="xl"] .rail { font-size: 15.5px; }
.font-seg button { min-width: 64px; font-size: 14px; }
.font-seg .fs-l { font-size: 16px; }
.font-seg .fs-xl { font-size: 18px; }

/* ---------- Modo privado ---------- */
.privado .pii, .privado .pii-zone { filter: blur(7px); user-select: none; pointer-events: none; transition: filter .2s; }
.privado .pii-zone .pii { filter: none; }
.privado a[href^="tel:"], .privado a[href*="wa.me"], .privado .dial { visibility: hidden; }
.priv-bar {
  position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); top: calc(10px + env(safe-area-inset-top));
  display: flex; gap: 10px; align-items: center; background: var(--gold); color: var(--gold-ink); padding: 8px 8px 8px 14px; border-radius: 99px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 13.5px; max-width: calc(100vw - 20px);
}
.priv-bar svg { width: 18px; height: 18px; flex: none; }
.priv-bar button { border: 0; background: var(--gold-ink); color: #fff; border-radius: 99px; padding: 7px 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.priv-bar span { flex: 1; min-width: 0; }
@media (max-width: 600px) { .priv-bar { width: calc(100vw - 20px); border-radius: 14px; font-size: 13px; } }

/* ---------- Avisos con acción (Deshacer) ---------- */
.toast { display: flex; align-items: center; gap: 12px; }
.toast span { flex: 1; }
.toast button { border: 0; background: var(--gold); color: var(--gold-ink); font-weight: 700; border-radius: 8px; padding: 7px 12px; cursor: pointer; white-space: nowrap; font-size: 13.5px; }
.confirm-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--teal-soft); color: var(--teal-deep); font-size: 13.5px; }
.confirm-note svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

/* ---------- Menú flotante ---------- */
.popover {
  position: fixed; z-index: 80; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 6px; min-width: 190px; display: flex; flex-direction: column; animation: tin .12s ease-out;
}
.popover button { border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14.5px; color: var(--ink); }
.popover button:hover, .popover button:focus-visible { background: var(--hover); outline: none; }
.popover button[aria-current="true"] { background: var(--teal-soft); }
.popover button.danger { color: var(--red); }
.popover hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* ---------- Interesados interactivo ---------- */
.status-btn { border: 1px solid transparent; background: none; padding: 2px 8px 2px 6px; border-radius: 99px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 650; margin-left: -6px; }
.status-btn:hover { background: var(--hover); border-color: var(--line); }
.fu-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line-strong); background: var(--surface); color: var(--ink-3);
  border-radius: 99px; padding: 6px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.fu-btn svg { width: 15px; height: 15px; }
.fu-btn:hover { border-color: var(--teal); color: var(--teal); }
.fu-btn.set { border-style: solid; color: var(--teal-deep); background: var(--teal-soft); border-color: transparent; }
.fu-btn.late { border-style: solid; color: var(--red); background: var(--red-soft); border-color: transparent; }
.last-comment { font-size: 13px; color: var(--ink-2); font-style: italic; margin: 3px 0 2px; overflow-wrap: anywhere; }
.attn { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.attn button {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; box-shadow: var(--shadow-sm);
}
.attn button b { font-size: 16px; font-variant-numeric: tabular-nums; }
.attn .attn-sinresp b { color: var(--red); }
.attn .attn-vencidos b { color: var(--amber); }
.attn .attn-frios b { color: var(--teal); }
.attn button[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-deep); }
.attn button:disabled { opacity: .5; cursor: default; box-shadow: none; }

/* ---------- Donde lo dejaste ---------- */
.resume { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--r-lg); padding: 14px 18px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.resume-h { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.resume-h svg { width: 16px; height: 16px; color: var(--gold); }
.resume-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 20px; align-items: start; }
@media (max-width: 760px) { .resume-body { grid-template-columns: 1fr; } }
.resume-main { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.resume-main:hover { background: var(--gold-soft); }
.resume-main .t { font-weight: 650; font-size: 16px; display: flex; gap: 8px; align-items: center; }
.resume-main .t svg { width: 17px; height: 17px; color: var(--teal); flex: none; }
.resume-go { font-size: 13px; font-weight: 650; color: var(--teal); display: inline-flex; gap: 4px; align-items: center; }
.resume-go svg { width: 15px; height: 15px; }
.resume-last { font-size: 14px; display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.resume-last a { font-weight: 650; text-decoration: none; color: var(--ink); }
.resume-chips { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.resume-chips a { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; background: var(--surface); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-chips a svg { width: 13px; height: 13px; flex: none; }
.resume-chips a:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- Bitácora: editar ---------- */
.timeline .del { display: none; }
.edit-entry {
  margin-left: auto; display: inline-flex; gap: 5px; align-items: center; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.edit-entry svg { width: 13px; height: 13px; }
.edit-entry:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }

/* ---------- Fotos ---------- */
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.photo-grid li { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.ph-img { display: block; width: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; }
.ph-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.ph-cover { position: absolute; top: 8px; left: 8px; display: inline-flex; gap: 4px; align-items: center; background: var(--gold); color: var(--gold-ink); font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.ph-cover svg { width: 12px; height: 12px; }
.ph-tools { display: flex; justify-content: space-between; gap: 4px; padding: 6px; }
.ph-tools .icon-btn { width: 32px; height: 32px; }
.ph-tools .icon-btn:disabled { opacity: .35; pointer-events: none; }
.icon-btn.danger:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.photo-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--line-strong); border-radius: 14px;
  color: var(--ink-2); cursor: pointer; text-align: center;
}
.photo-empty svg { width: 32px; height: 32px; color: var(--gold); }
.photo-empty span { font-size: 13px; color: var(--ink-3); }
.photo-empty:hover { border-color: var(--gold); background: var(--gold-soft); }
.viewer img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; background: #000; }

/* ---------- Compartir ficha ---------- */
.share-safe { display: flex; gap: 10px; align-items: flex-start; background: var(--green-soft); color: var(--ink); padding: 10px 12px; border-radius: 12px; font-size: 13.5px; margin-bottom: 14px; }
.share-safe svg { width: 18px; height: 18px; color: var(--green); flex: none; margin-top: 2px; }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; background: var(--surface-2); font-size: 13.5px; }
.wa-btn { background: #1F9D57; border-color: #1F9D57; color: #fff; }
.wa-btn:hover { background: #17864A; border-color: #17864A; }
.linkish { border: 0; background: none; color: var(--teal); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }

/* ---------- Cierres ---------- */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.deal {
  text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
.deal:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.deal .t { font-weight: 650; font-size: 15.5px; }
.deal .s { font-size: 12.5px; color: var(--ink-2); }
.deal-top { display: flex; justify-content: space-between; align-items: center; }
.deal-status { font-size: 11.5px; font-weight: 700; }
.deal-status.en_proceso { color: var(--amber); }
.deal-status.cobrado { color: var(--green); }
.deal-status.caido { color: var(--ink-3); }
.deal.caido { opacity: .65; }
.progress { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); border-radius: 99px; }
.deal.cobrado .progress i { background: var(--green); }
.deal-money { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; font-size: 13px; }
.deal-money b { font-size: 17px; color: var(--green); }
.deal-mini { display: flex; flex-direction: column; gap: 10px; }
.stages { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.stage { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); flex-wrap: wrap; }
.stage label { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; }
.stage input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--green); }
.stage.done { background: var(--green-soft); }
.stage.done span { font-weight: 650; }
.stage input[type="date"] { border: 1px solid var(--line-strong); border-radius: 8px; padding: 5px 8px; background: var(--surface); font-size: 13px; width: auto; }
.deal-calc { background: var(--gold-soft); border-radius: 12px; padding: 10px 14px; }
.calc-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink); font-weight: 500; }
.calc-row.mine b { font-size: 18px; color: var(--green); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .9; } }

/* ---------- Yulexy ---------- */
.mia { width: 48px; height: 48px; display: block; }
.mia-modal { position: fixed; inset: 0; z-index: 85; background: rgba(12,18,22,.55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: tin .2s ease-out; }
.mia-card { background: var(--surface); color: var(--ink); border-radius: 22px; padding: 26px 26px 22px; max-width: 440px; width: 100%; text-align: center; box-shadow: var(--shadow-lg); }
.mia-hero .mia { width: 96px; height: 96px; margin: -6px auto 4px; animation: bob 2.4s ease-in-out infinite; }
.mia-card h2 { margin: 4px 0 8px; font-size: 22px; letter-spacing: -.02em; }
.mia-card p { margin: 0 0 8px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.mia-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.mia-actions .btn { padding: 12px; font-size: 15px; border-radius: 12px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.tour { position: fixed; inset: 0; z-index: 88; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(10,16,20,.6); outline: 3px solid var(--gold); transition: all .25s ease; pointer-events: none; }
.tour-spot[hidden] + .tour-bubble { box-shadow: 0 0 0 9999px rgba(10,16,20,.6), var(--shadow-lg); }
.tour-bubble { position: fixed; width: min(380px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border-radius: 18px; padding: 16px 18px 14px; box-shadow: var(--shadow-lg); }
.tour-bubble.center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
.tour-bubble.sheet { left: 12px !important; right: 12px; width: auto; bottom: calc(12px + env(safe-area-inset-bottom)); top: auto !important; }
.tour-bubble.sheet.top { top: calc(12px + env(safe-area-inset-top)) !important; bottom: auto; }
.tb-head { display: flex; align-items: center; gap: 10px; }
.tb-head .mia { width: 44px; height: 44px; }
.tour-bubble h3 { margin: 8px 0 6px; font-size: 18px; letter-spacing: -.01em; }
.tour-bubble p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.tb-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.tb-actions [data-t="exit"] { margin-right: auto; }

.nudge {
  position: fixed; z-index: 45; left: 252px; bottom: 20px; width: min(400px, calc(100vw - 32px)); display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 16px;
  padding: 12px 14px; box-shadow: var(--shadow-lg); transform: translateY(16px); opacity: 0; transition: transform .25s ease, opacity .25s ease;
}
.nudge.in { transform: none; opacity: 1; }
.nudge-mia .mia { width: 46px; height: 46px; }
.nudge-body p { margin: 2px 0 10px; font-size: 14.5px; line-height: 1.45; padding-right: 18px; }
.nudge-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.nudge-x { position: absolute; top: 8px; right: 8px; border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 4px; border-radius: 6px; display: grid; }
.nudge-x svg { width: 16px; height: 16px; }
@media (max-width: 860px) { .nudge { left: 12px; right: 12px; width: auto; bottom: auto; top: calc(64px + env(safe-area-inset-top)); transform: translateY(-12px); } .nudge.in { transform: none; } }

/* ---------- Novedades ---------- */
.news-hero { display: flex; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.news-hero .mia { width: 84px; height: 84px; flex: none; animation: bob 2.4s ease-in-out infinite; }
.news-hero h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; }
.news-hero p { margin: 0 0 12px; color: var(--ink-2); }
@media (max-width: 600px) { .news-hero { flex-direction: column; text-align: center; } }
.release-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.release-h h2 { margin: 0; font-size: 18px; }
.release-items { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.release-items li { display: flex; gap: 12px; align-items: flex-start; }
.release-items b { font-size: 15px; }
.release-items p { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; }
.ri-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; flex: none; }
.ri-icon svg { width: 18px; height: 18px; }
.tag svg { width: 12px; height: 12px; }

/* ---------- Ajustes: marca ---------- */
.brand-edit { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-box { width: 96px; height: 96px; border-radius: 16px; display: grid; place-items: center; padding: 10px; background-image: var(--pattern) !important; flex: none; }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 99px; padding: 5px 12px 5px 5px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); }
.swatches i { width: 24px; height: 24px; border-radius: 50%; background: var(--sw); display: block; }
.swatches button[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }

/* ---------- Más ---------- */
.mas-link { display: flex !important; gap: 12px; align-items: center; }
.mas-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; flex: none; }
.mas-ic svg { width: 19px; height: 19px; }

/* ---------- Entrada con marca ---------- */
.login-side.branded { background: var(--rail); background-image: var(--pattern), linear-gradient(160deg, var(--rail-2), var(--rail)); }
.login-logo { width: 120px; height: 120px; object-fit: contain; margin-bottom: 14px; filter: drop-shadow(0 6px 16px rgba(0,0,0,.3)); }
@media (max-width: 720px) { .login-logo { width: 56px; height: 56px; margin: 0; } }

/* =================== v4 =================== */
.brand-logo { width: 48px; height: 48px; }
/* Modo privado: precios y comisiones también */
.privado .price, .privado .prop-price b, .privado .deal-money, .privado .kpi .stat-value.money, .privado .calc-row b { filter: blur(7px); user-select: none; }

/* ---------- Formulario de propiedad ---------- */
.form-sec { margin: 10px 0 -4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--teal); font-weight: 700; border-top: 1px solid var(--line); padding-top: 14px; }
.form-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.amen-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.amen-pick button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 99px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.amen-pick button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.amen-pick button[aria-pressed="true"]::before { content: "✓ "; }
.amen-add { display: inline-flex; border: 1px dashed var(--line-strong); border-radius: 99px; overflow: hidden; }
.amen-add input { border: 0; padding: 7px 10px; width: 110px; font-size: 13px; background: transparent; }
.amen-add button { border: 0 !important; border-radius: 0 !important; background: var(--gold) !important; color: var(--gold-ink) !important; padding: 0 12px !important; font-weight: 800; }

/* ---------- Ficha de propiedad ---------- */
.prop-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
@media (max-width: 900px) { .prop-hero { grid-template-columns: 1fr; } }
.prop-cover { position: relative; min-height: 260px; background: linear-gradient(135deg, #4C7D8F, #2D5565); background-image: var(--pattern), linear-gradient(135deg, #4C7D8F, #2D5565); display: grid; place-items: center; }
.prop-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prop-cover .icon { color: rgba(255,255,255,.75); }
.prop-cover .icon svg { width: 64px; height: 64px; }
.cover-btn { position: absolute; left: 14px; bottom: 14px; display: inline-flex; gap: 8px; align-items: center; background: rgba(15,22,26,.72); color: #fff; padding: 10px 14px; border-radius: 99px; font-weight: 650; font-size: 13.5px; cursor: pointer; backdrop-filter: blur(6px); }
.prop-hero:not(.has-cover) .cover-btn { left: 50%; bottom: 50%; transform: translate(-50%, 50%); background: var(--gold); color: var(--gold-ink); padding: 14px 20px; font-size: 15px; }
.cover-btn svg { width: 18px; height: 18px; }
.prop-main { padding: 20px 22px; min-width: 0; }
.prop-main h1 { margin: 0; font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.02em; line-height: 1.15; }
.prop-price { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; }
.prop-price > div { display: flex; flex-direction: column; }
.prop-price b { font-size: 22px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.prop-price b small { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.feat { display: flex; gap: 10px; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 9px 11px; min-width: 0; }
.feat svg { width: 21px; height: 21px; color: var(--gold-hover); flex: none; }
.feat b { display: block; font-size: 14.5px; line-height: 1.2; overflow-wrap: anywhere; }
.feat span { font-size: 11.5px; color: var(--ink-3); }
.amen-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.amen-list span { font-size: 12.5px; font-weight: 600; background: var(--teal-soft); color: var(--teal-deep); padding: 4px 10px; border-radius: 99px; }
.linkish-banner { border: 1px dashed var(--gold); cursor: pointer; width: 100%; text-align: left; font: inherit; font-size: 13px; }
.linkish-banner svg { width: 15px; height: 15px; }
.prop-actions { gap: 8px; margin-top: 4px; }
.pthumb { width: 54px; height: 42px; object-fit: cover; border-radius: 8px; flex: none; }
.pthumb.lg { width: 76px; height: 58px; border-radius: 10px; }

/* ---------- Estudio de fotos ---------- */
.studio { margin-bottom: 16px; position: relative; }
.studio.dragging { outline: 3px dashed var(--gold); outline-offset: -6px; }
.studio-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.drop { border: 2px dashed var(--line-strong); border-radius: 16px; padding: 18px; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface-2); }
.mia-coach { display: flex; gap: 14px; align-items: flex-start; max-width: 640px; }
.mia-coach .mia { width: 56px; height: 56px; flex: none; }
.mia-coach b { font-size: 16px; }
.mia-coach ol { margin: 6px 0 6px; padding-left: 20px; font-size: 14.5px; line-height: 1.55; }
.big-up { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.up-progress { display: flex; gap: 12px; align-items: center; margin: 4px 0 14px; font-size: 14px; font-weight: 600; }
.up-progress .bar { flex: 1; height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.up-progress .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width .3s; }
.review { border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); background: var(--gold-soft); border-radius: 16px; padding: 14px; margin-bottom: 16px; }
.mia-say { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.mia-say .mia { width: 44px; height: 44px; flex: none; }
.mia-say p { margin: 4px 0 0; font-size: 15px; line-height: 1.5; }
.review-grid li { background: var(--surface); }
.review-grid .ph-img { position: relative; }
.keep-badge, .drop-badge { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.keep-badge { background: var(--green); }
.drop-badge { background: var(--red); display: none; }
.keep-badge svg, .drop-badge svg { width: 17px; height: 17px; }
.review-grid li.drop-it .keep-badge { display: none; }
.review-grid li.drop-it .drop-badge { display: grid; }
.review-grid li.drop-it img { opacity: .4; filter: grayscale(.7); }
.pflags { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; }
.pflag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.pflag.ok { background: var(--green-soft); color: var(--green); }
.pflag.bad { background: var(--red-soft); color: var(--red); }
.pflag.info { background: var(--teal-soft); color: var(--teal-deep); }
.review-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; position: sticky; bottom: 8px; background: var(--surface); padding: 10px 12px; border-radius: 12px; box-shadow: var(--shadow); }
.review-bar .btn { padding: 12px 18px; font-size: 15px; }
#phGrid li { cursor: grab; }
#phGrid li.dragging { opacity: .4; }
.ph-cap { position: absolute; top: 8px; right: 8px; background: rgba(15,22,26,.7); color: #fff; font-size: 11.5px; font-weight: 650; padding: 3px 8px; border-radius: 99px; }
.gone { margin-top: 14px; }
.gone summary { cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.small-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; margin-top: 10px !important; }
.small-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; opacity: .7; }

.editor { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr); gap: 18px; }
@media (max-width: 760px) { .editor { grid-template-columns: 1fr; } }
.ed-view { position: relative; background: #111; border-radius: 12px; display: grid; place-items: center; min-height: 240px; overflow: hidden; }
.ed-view img { max-width: 100%; max-height: 62vh; display: block; }
.ed-busy { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 99px; }
.ed-compare { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); user-select: none; -webkit-user-select: none; touch-action: none; }
.ed-side { display: flex; flex-direction: column; gap: 12px; }
.ed-quick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.slider { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.slider span { display: flex; justify-content: space-between; }
.slider b { font-variant-numeric: tabular-nums; color: var(--ink); }
.slider input { width: 100%; accent-color: var(--gold); height: 28px; }

/* ---------- Yulexy flotante ---------- */
.mia-fab {
  position: fixed; z-index: 44; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px 5px 5px; cursor: pointer;
  box-shadow: 0 10px 28px rgba(20,30,38,.18); font-weight: 700; color: var(--ink); transition: transform .2s;
}
.mia-fab:hover { transform: translateY(-2px); }
.mia-fab .mia { width: 42px; height: 42px; }
.mia-fab-label { font-size: 14px; }
.mia-fab.wave .mia { animation: bob 1.2s ease-in-out infinite; }
@media (max-width: 860px) {
  .mia-fab { right: auto; left: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); padding: 4px; }
  .mia-fab-label { display: none; }
}
.mia-peek {
  position: fixed; z-index: 46; right: 22px; bottom: 84px; width: min(320px, calc(100vw - 24px)); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px 16px 4px 16px; padding: 12px 14px; box-shadow: var(--shadow-lg); animation: tin .25s ease-out;
}
.mia-peek p { margin: 0 0 10px; font-size: 15px; line-height: 1.45; }
@media (max-width: 860px) { .mia-peek { right: auto; left: 12px; bottom: calc(136px + env(safe-area-inset-bottom)); border-radius: 16px 16px 16px 4px; } }
.mia-panel {
  position: fixed; z-index: 75; right: 22px; bottom: 22px; width: min(420px, calc(100vw - 24px)); height: min(640px, calc(100dvh - 44px));
  background: var(--surface); color: var(--ink); border-radius: 20px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(16px); opacity: 0; transition: transform .2s ease, opacity .2s ease; border: 1px solid var(--line);
}
.mia-panel.in { transform: none; opacity: 1; }
@media (max-width: 700px) { .mia-panel { inset: 0; width: 100%; height: 100dvh; border-radius: 0; } }
.mia-panel header { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--rail); background-image: var(--pattern); color: #fff; }
.mia-panel header .mia { width: 40px; height: 40px; }
.mia-panel header div { flex: 1; }
.mia-panel header b { font-size: 16px; display: block; }
.mia-panel header small { opacity: .75; font-size: 12px; }
.mia-panel header .icon-btn { background: rgba(255,255,255,.1); border-color: transparent; color: #fff; }
.mia-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.mm { max-width: 88%; display: flex; flex-direction: column; gap: 6px; }
.mm p { margin: 0; padding: 10px 13px; border-radius: 16px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.mia-m { align-self: flex-start; }
.mia-m p { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.me-m { align-self: flex-end; }
.me-m p { background: var(--teal); color: #fff; border-bottom-right-radius: 4px; }
.mm-links { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-links svg { width: 14px; height: 14px; }
.mm .btn.gold { align-self: flex-start; }
.typing p { display: flex; gap: 5px; padding: 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.mia-sugg { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 8px; background: var(--bg); }
.mia-sugg button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 99px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); text-align: left; }
.mia-sugg button:hover { border-color: var(--gold); }
.mia-input { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.mia-input textarea { flex: 1; resize: none; border: 1px solid var(--line-strong); border-radius: 14px; padding: 10px 12px; font-size: 15px; background: var(--surface); max-height: 120px; }
.mia-input textarea:focus { outline: none; border-color: var(--teal); }
.mia-input .btn { border-radius: 14px; padding: 0 14px; }
:root[data-font="l"] .mia-panel { zoom: 1.1; }
:root[data-font="xl"] .mia-panel { zoom: 1.2; }

/* ---------- WhatsApp ---------- */
.wa-howto { margin: 0 0 16px; padding-left: 22px; font-size: 15px; line-height: 1.6; }
.wa-howto li { margin-bottom: 6px; }
.wa-who { display: flex; flex-direction: column; gap: 8px; }
.wa-who .btn { padding: 14px; font-size: 16px; justify-content: flex-start; }
.deal-missing { display: flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; color: #7A5B12; background: var(--gold-soft); border-radius: 8px; padding: 6px 9px; }
.deal-missing svg { width: 14px; height: 14px; }
:root[data-theme="dark"] .deal-missing { color: var(--gold); }

/* =================== Entrada (diseño Gemini) =================== */
.lg2 {
  --lg-gold: #D4A340; --lg-gold-2: #C19030; --lg-slate: #2B4D59;
  --lg-card: rgba(255,255,255,.88); --lg-form-bg: rgba(255,255,255,.5); --lg-ink: #0F172A; --lg-ink-2: #475569; --lg-ink-3: #94A3B8;
  --lg-field: rgba(241,245,249,.85); --lg-field-line: #E2E8F0; --lg-line: #E2E8F0;
  position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; max-width: none; width: 100%;
  background: #0F172A; overflow: hidden; font-family: "Plus Jakarta Sans", var(--font); color: var(--lg-ink);
}
.lg2[data-lt="dark"] {
  --lg-card: rgba(15,23,42,.86); --lg-form-bg: rgba(15,23,42,.4); --lg-ink: #F1F5F9; --lg-ink-2: #94A3B8; --lg-ink-3: #64748B;
  --lg-field: rgba(30,41,59,.65); --lg-field-line: #334155; --lg-line: #1E293B;
}
.lg2[data-lt="light"] { background: #E8EEF1; }
.lg2-bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lg2-theme {
  position: fixed; top: 18px; right: 18px; z-index: 5; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.14); color: #F1F5F9; border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(10px); cursor: pointer; transition: transform .2s;
}
.lg2[data-lt="light"] .lg2-theme { background: rgba(255,255,255,.8); color: var(--lg-gold-2); border-color: #E2E8F0; }
.lg2-theme:hover { transform: scale(1.08); }
.lg2-theme svg { width: 20px; height: 20px; }
.lg2-card {
  position: relative; z-index: 2; width: min(1020px, 100%); min-height: 600px; display: grid; grid-template-columns: 5fr 7fr;
  border-radius: 26px; overflow: hidden; background: var(--lg-card); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 80px rgba(0,0,0,.45); animation: tin .35s ease-out;
}
.lg2-brand {
  position: relative; overflow: hidden; color: #fff; padding: 44px 42px 30px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, rgba(43,77,89,.96) 0%, rgba(20,42,50,.98) 100%);
}
.lg2-brand .glow { position: absolute; width: 290px; height: 290px; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.lg2-brand .g1 { top: -96px; left: -96px; background: rgba(20,184,166,.22); }
.lg2-brand .g2 { bottom: -96px; right: -96px; background: rgba(245,158,11,.22); }
.lg2-brand > *:not(.glow) { position: relative; z-index: 1; }
.lg2-logo { display: flex; align-items: center; gap: 14px; }
.lg2-mark { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; flex: none; animation: lgfloat 6s ease-in-out infinite; }
.lg2-mark .brand-mark { width: 54px; height: 54px; filter: drop-shadow(0 8px 18px rgba(212,163,64,.3)); }
.lg2-mark img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
/* v5.0.3 · logo VAIPA CRM en la entrada neutral */
.lg2-logo .lg2-crm { display: block; width: 240px; max-width: 100%; height: auto; flex: none; filter: drop-shadow(0 8px 18px rgba(0,0,0,.28)); }
@media (max-width: 420px) { .lg2-logo .lg2-crm { width: 200px; } }
.lg2-brand .lg2-crm-sm { display: block; width: 150px; max-width: 60%; height: auto; margin: 16px 0 2px; opacity: .95; }
.lg2-logo.pending { visibility: hidden; min-height: 54px; }
.lg2-logo b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.lg2-logo small { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #FCD34D; }
@keyframes lgfloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.lg2-hero { margin: 40px 0; }
.lg2-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); color: #FCD34D; font-size: 12px; font-weight: 650; backdrop-filter: blur(8px); }
.lg2-pill i { width: 8px; height: 8px; border-radius: 50%; background: #FBBF24; animation: lgpulse 1.8s ease-in-out infinite; }
@keyframes lgpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.lg2-hero h2 { font-size: clamp(28px, 3.2vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; margin: 22px 0 0; }
.lg2-hero p { margin: 14px 0 0; color: #CBD5E1; font-size: 14.5px; line-height: 1.6; }
.lg2-hero ul { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lg2-hero li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: #E2E8F0; }
.lg2-hero li svg { width: 18px; height: 18px; color: #FBBF24; flex: none; }
.lg2-brand footer { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12px; color: #94A3B8; }
.lg2-brand footer button { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; padding: 0; }
.lg2-brand footer button:hover { color: #FCD34D; }

.lg2-form { display: flex; align-items: center; justify-content: center; padding: 48px 56px; background: var(--lg-form-bg); }
.lg2-form form { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 22px; }
.lg2-form h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.03em; color: var(--lg-ink); }
.lg2-sub { margin: -14px 0 4px; color: var(--lg-ink-2); font-size: 14.5px; }
.lg2-alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: 16px; font-size: 14px; line-height: 1.45; }
.lg2-alert svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.lg2-alert.error { background: rgba(239,68,68,.12); color: #DC2626; }
.lg2-alert.ok { background: rgba(34,197,94,.12); color: #16A34A; }
.lg2-alert.info { background: rgba(245,158,11,.12); color: #B45309; }
.lg2[data-lt="dark"] .lg2-alert.error { color: #F87171; }
.lg2[data-lt="dark"] .lg2-alert.ok { color: #4ADE80; }
.lg2[data-lt="dark"] .lg2-alert.info { color: #FBBF24; }
.lg2-field { position: relative; }
.lg2-ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--lg-ink-3); pointer-events: none; display: grid; }
.lg2-ico svg { width: 19px; height: 19px; }
.lg2-field input {
  width: 100%; padding: 22px 48px 10px 50px; border-radius: 18px; background: var(--lg-field); border: 1px solid var(--lg-field-line);
  color: var(--lg-ink); font: 600 15.5px "Plus Jakarta Sans", var(--font); transition: border-color .15s, box-shadow .15s;
}
.lg2-field input:focus { outline: none; border-color: var(--lg-gold); box-shadow: 0 0 0 4px rgba(212,163,64,.22); }
.lg2-field label { position: absolute; left: 50px; top: 50%; transform: translateY(-50%); font-size: 14.5px; color: var(--lg-ink-2); pointer-events: none; transition: all .18s ease-out; transform-origin: left top; }
.lg2-field input:focus ~ label, .lg2-field input:not(:placeholder-shown) ~ label { top: 9px; transform: translateY(0) scale(.82); color: var(--lg-gold); font-weight: 650; }
.lg2-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--lg-ink-3); cursor: pointer; padding: 6px; border-radius: 99px; display: grid; }
.lg2-eye:hover { color: var(--lg-gold); }
.lg2-eye svg { width: 20px; height: 20px; }
.lg2-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: -4px; }
.lg2-check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--lg-ink-2); cursor: pointer; user-select: none; }
.lg2-check input { width: 18px; height: 18px; accent-color: var(--lg-gold); }
.lg2-link { background: none; border: 0; padding: 0; cursor: pointer; font: 700 14px "Plus Jakarta Sans", var(--font); color: #D97706; }
.lg2[data-lt="dark"] .lg2-link { color: #FBBF24; }
.lg2-link:hover { text-decoration: underline; }
.lg2-submit {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 17px 22px; border: 0; border-radius: 18px; cursor: pointer;
  background: linear-gradient(90deg, #F59E0B, #D97706); color: #0B1220; font: 800 15.5px "Plus Jakarta Sans", var(--font);
  box-shadow: 0 12px 28px rgba(245,158,11,.28); transition: box-shadow .2s, transform .1s, filter .2s;
}
.lg2-submit:hover { box-shadow: 0 14px 34px rgba(245,158,11,.42); filter: brightness(1.04); }
.lg2-submit:active { transform: scale(.99); }
.lg2-submit svg { width: 17px; height: 17px; transition: transform .2s; }
.lg2-submit:hover svg { transform: translateX(4px); }
.lg2-submit.loading svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lg2-submit:disabled { cursor: wait; opacity: .85; }
.lg2-foot { margin: 6px 0 0; padding-top: 18px; border-top: 1px solid var(--lg-line); text-align: center; font-size: 13.5px; color: var(--lg-ink-2); }
.lg2-foot .lg2-link { font-size: 13.5px; }
@media (max-width: 900px) {
  .lg2 { place-items: start center; padding: 70px 14px 20px; }
  .lg2-card { grid-template-columns: 1fr; min-height: 0; }
  .lg2-brand { padding: 24px 24px 20px; }
  .lg2-hero { margin: 16px 0 4px; }
  .lg2-hero h2 { font-size: 22px; margin-top: 14px; }
  .lg2-hero p, .lg2-hero ul, .lg2-brand footer { display: none; }
  .lg2-form { padding: 28px 22px 26px; }
  .lg2-form h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .lg2-mark, .lg2-pill i { animation: none; } }

/* =====================================================================
   v4.2 · Estilo «Moderno» (el de la pantalla de entrada) en toda la app.
   Se activa con <html class="modern"> (por defecto). «Clásico» lo quita.
   ===================================================================== */
html.modern:not([data-theme="dark"]) {
  --bg: #E9EEF1;
  --surface: #FFFFFF;
  --surface-2: #F4F7F9;
  --hover: rgba(43, 77, 89, .06);
  --line: rgba(15, 23, 42, .08);
  --line-strong: #D5DDE3;
  --ink: #0F172A; --ink-2: #475569; --ink-3: #8A97A8;
  --teal: #2B6175; --teal-hover: #234F60; --teal-deep: #1A3E4B; --teal-soft: #E2EEF2;
  --gold: #D4A340; --gold-hover: #C19030; --gold-ink: #1E1705; --gold-soft: #FBF1DA;
  --glass: rgba(255, 255, 255, .74);
  --glass-line: rgba(255, 255, 255, .85);
  --glow-1: rgba(20, 184, 166, .16); --glow-2: rgba(245, 158, 11, .16); --glow-3: rgba(43, 77, 89, .14);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 10px 30px rgba(15, 23, 42, .07);
  --shadow-lg: 0 30px 80px rgba(15, 23, 42, .28);
}
html.modern[data-theme="dark"] {
  --bg: #0B1222; --surface: #131C2E; --surface-2: #18233A; --hover: rgba(255,255,255,.05);
  --line: rgba(148, 163, 184, .14); --line-strong: #334155;
  --ink: #F1F5F9; --ink-2: #A3B1C6; --ink-3: #6B7A90;
  --teal: #6FB3C6; --teal-hover: #8CC6D6; --teal-deep: #CFE8EF; --teal-soft: rgba(111, 179, 198, .14);
  --gold: #D4A340; --gold-hover: #E0B456; --gold-ink: #1C1504; --gold-soft: rgba(212, 163, 64, .16);
  --green-soft: rgba(92, 192, 159, .14); --red-soft: rgba(235, 134, 112, .14); --amber-soft: rgba(226, 176, 75, .14);
  --glass: rgba(19, 28, 46, .72); --glass-line: rgba(148, 163, 184, .12);
  --glow-1: rgba(20, 184, 166, .16); --glow-2: rgba(245, 158, 11, .13); --glow-3: rgba(59, 130, 246, .10);
  --shadow-sm: none; --shadow: 0 10px 30px rgba(0,0,0,.35); --shadow-lg: 0 30px 80px rgba(0,0,0,.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html.modern:not([data-theme="light"]) {
    --bg: #0B1222; --surface: #131C2E; --surface-2: #18233A; --hover: rgba(255,255,255,.05);
    --line: rgba(148, 163, 184, .14); --line-strong: #334155;
    --ink: #F1F5F9; --ink-2: #A3B1C6; --ink-3: #6B7A90;
    --teal: #6FB3C6; --teal-hover: #8CC6D6; --teal-deep: #CFE8EF; --teal-soft: rgba(111, 179, 198, .14);
    --gold: #D4A340; --gold-hover: #E0B456; --gold-ink: #1C1504; --gold-soft: rgba(212, 163, 64, .16);
    --green-soft: rgba(92, 192, 159, .14); --red-soft: rgba(235, 134, 112, .14); --amber-soft: rgba(226, 176, 75, .14);
    --glass: rgba(19, 28, 46, .72); --glass-line: rgba(148, 163, 184, .12);
    --glow-1: rgba(20, 184, 166, .16); --glow-2: rgba(245, 158, 11, .13); --glow-3: rgba(59, 130, 246, .10);
    --shadow-sm: none; --shadow: 0 10px 30px rgba(0,0,0,.35); --shadow-lg: 0 30px 80px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
html.modern { --font: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --r: 14px; --r-lg: 22px; }
html.modern body {
  background:
    radial-gradient(900px 600px at -10% -10%, var(--glow-1), transparent 60%),
    radial-gradient(800px 600px at 110% 110%, var(--glow-2), transparent 60%),
    radial-gradient(700px 500px at 70% -20%, var(--glow-3), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font-feature-settings: normal; letter-spacing: -.003em;
}
/* Puntos dorados muy suaves de fondo (como la entrada, pero quietos) */
html.modern body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: radial-gradient(rgba(212,163,64,.35) 1px, transparent 1.4px);
  background-size: 46px 46px; mask-image: radial-gradient(1200px 800px at 50% 0%, #000 0%, transparent 75%);
}
html.modern .shell, html.modern .topbar { position: relative; z-index: 1; }

/* Menú lateral: el panel de marca de la entrada */
html.modern .rail {
  background: linear-gradient(160deg, var(--rail-2) 0%, var(--rail) 55%, color-mix(in srgb, var(--rail) 80%, #000) 100%);
  overflow: hidden; border-right: 0; box-shadow: 8px 0 40px rgba(15,23,42,.12);
}
html.modern .rail::before, html.modern .rail::after {
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; filter: blur(60px); pointer-events: none;
}
html.modern .rail::before { top: -90px; left: -90px; background: rgba(20,184,166,.22); }
html.modern .rail::after { bottom: -90px; right: -110px; background: rgba(245,158,11,.20); }
html.modern .rail > * { position: relative; z-index: 1; }
html.modern .brand b { font-weight: 800; letter-spacing: -.02em; }
html.modern .rail .brand small { color: #FCD34D; opacity: .9; font-weight: 600; font-size: 12px; }
html.modern .nav a { border-radius: 14px; padding: 10px 12px; }
html.modern .nav a[aria-current="page"] { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); backdrop-filter: blur(8px); }
html.modern .nav a[aria-current="page"]::before { left: auto; right: 10px; top: 50%; bottom: auto; width: 7px; height: 7px; border-radius: 50%; transform: translateY(-50%); box-shadow: 0 0 10px #FBBF24; background: #FBBF24; }
html.modern .rail .rail-call { box-shadow: 0 10px 24px rgba(212,163,64,.35); }

/* Encabezados */
html.modern .page-head h1 { font-weight: 800; letter-spacing: -.035em; }
html.modern h2.section { font-weight: 750; letter-spacing: -.01em; }

/* Tarjetas de vidrio */
html.modern .panel, html.modern .kpi, html.modern .resume, html.modern .deal, html.modern .prop-card, html.modern .prop-row {
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow);
}
html.modern .panel { border-radius: 22px; padding: 20px 20px 16px; }
html.modern .kpi { border-radius: 20px; }
html.modern .kpi .stat-value { font-weight: 800; }
html.modern a.kpi:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
html.modern .kpi { transition: transform .2s, border-color .2s, box-shadow .2s; }
html.modern .resume { border-left: 0; position: relative; overflow: hidden; }
html.modern .resume::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--gold), #F59E0B); }
html.modern .list > li { border-radius: 14px; }

/* Botones */
html.modern .btn { border-radius: 12px; font-weight: 650; padding: 10px 15px; }
html.modern .btn.sm { border-radius: 10px; padding: 6px 11px; }
html.modern .btn:not(.gold):not(.primary):not(.ghost):not(.mostaza) { background: var(--glass); backdrop-filter: blur(10px); }
html.modern .btn.gold, html.modern .btn.mostaza, html.modern .fab {
  background: linear-gradient(135deg, #DDB04E 0%, #D4A340 45%, #C19030 100%); border-color: transparent; color: #1E1705;
  box-shadow: 0 8px 20px rgba(212,163,64,.30);
}
html.modern .btn.gold:hover, html.modern .btn.mostaza:hover { filter: brightness(1.05); box-shadow: 0 10px 26px rgba(212,163,64,.42); transform: translateY(-1px); }
html.modern .btn.primary { background: linear-gradient(135deg, #3B6F82 0%, #2B4D59 100%); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(43,77,89,.25); }
html.modern[data-theme="dark"] .btn.primary { color: #fff; }
html.modern .btn { transition: background .15s, border-color .15s, box-shadow .2s, transform .15s, filter .15s; }
html.modern .icon-btn { border-radius: 12px; background: var(--glass); }

/* Campos (como la entrada) */
html.modern .f input, html.modern .f select, html.modern .f textarea {
  background: color-mix(in srgb, var(--surface-2) 85%, transparent); border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 12px 14px;
}
html.modern .f input:focus, html.modern .f select:focus, html.modern .f textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212,163,64,.18); background: var(--surface);
}
html.modern .seg { border-radius: 14px; padding: 4px; background: color-mix(in srgb, var(--surface-2) 80%, transparent); }
html.modern .seg button { border-radius: 10px; padding: 7px 12px; }
html.modern .seg button[aria-pressed="true"] { color: var(--ink); box-shadow: 0 2px 8px rgba(15,23,42,.08); }
html.modern .chips button { padding: 7px 13px; }
html.modern .chips button[aria-pressed="true"] { background: linear-gradient(135deg, #3B6F82, #2B4D59); border-color: transparent; }
html.modern[data-theme="dark"] .chips button[aria-pressed="true"] { background: var(--teal); color: #0B1222; }
html.modern .tag { border-radius: 99px; }

/* Ventanas */
html.modern dialog {
  border-radius: 26px; background: var(--glass); backdrop-filter: blur(24px) saturate(1.3); -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--glass-line); box-shadow: var(--shadow-lg);
}
html.modern dialog::backdrop { background: rgba(11, 18, 34, .5); backdrop-filter: blur(6px); }
html.modern .dlg-h, html.modern .dlg-f { background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(12px); }
html.modern .dlg-h h3 { font-weight: 800; letter-spacing: -.02em; }

/* Barra de abajo (celular), carita y avisos */
html.modern .tabbar { background: var(--glass); backdrop-filter: blur(18px) saturate(1.3); border-top: 1px solid var(--glass-line); }
html.modern .tabbar a[aria-current="page"] { color: var(--teal); }
html.modern .tabbar a[aria-current="page"]::after { content: ""; position: absolute; top: 2px; width: 22px; height: 3px; border-radius: 3px; background: var(--gold); }
html.modern .topbar { background: var(--glass) !important; backdrop-filter: blur(18px); }
html.modern .mia-fab, html.modern .mia-peek, html.modern .mia-panel {
  background: var(--glass); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); border-color: var(--glass-line);
}
html.modern .mia-panel { border-radius: 26px; }
html.modern .mia-panel header { background: linear-gradient(135deg, rgba(43,77,89,.98) 0%, rgba(20,42,50,.98) 100%); position: relative; overflow: hidden; }
html.modern .mia-panel header::after { content: ""; position: absolute; width: 180px; height: 180px; right: -60px; top: -90px; border-radius: 50%; background: rgba(245,158,11,.25); filter: blur(40px); pointer-events: none; }
html.modern .mia-panel header > * { position: relative; z-index: 1; }
html.modern .mia-msgs, html.modern .mia-sugg { background: transparent; }
html.modern .mia-input { background: transparent; }
html.modern .mia-m p { background: var(--surface); border-color: var(--line); }
html.modern .me-m p { background: linear-gradient(135deg, #3B6F82, #2B4D59); }
html.modern .toast { background: rgba(15, 23, 42, .92); backdrop-filter: blur(12px); border-radius: 16px; border-left: 0; box-shadow: 0 16px 40px rgba(0,0,0,.3), inset 3px 0 0 var(--gold); }
html.modern .dial { border-radius: 24px; background: linear-gradient(135deg, rgba(59,111,130,.98) 0%, rgba(43,77,89,.98) 50%, rgba(20,42,50,.98) 100%); }
html.modern .dial::after { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; bottom: -120px; border-radius: 50%; background: rgba(245,158,11,.22); filter: blur(60px); pointer-events: none; }
@supports not (backdrop-filter: blur(1px)) {
  html.modern .panel, html.modern .kpi, html.modern dialog, html.modern .mia-panel { background: var(--surface); }
}

/* =====================================================================
   v4.2 · Yulexy: globito, sugerencias, copiar
   ===================================================================== */
.mia-peek { display: flex; flex-direction: column; gap: 6px; opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .2s, transform .2s; }
.mia-peek.in { opacity: 1; transform: none; }
.mia-peek .mp-head { display: flex; align-items: center; gap: 8px; }
.mia-peek .mp-head .mia { width: 30px; height: 30px; }
.mia-peek .mp-head b { flex: 1; font-size: 13.5px; }
.mp-x { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 2px; border-radius: 8px; display: grid; place-items: center; }
.mp-x svg { width: 16px; height: 16px; }
.mia-peek p { margin: 0 0 4px; }
.mia-peek.party { border-color: color-mix(in srgb, var(--gold) 60%, transparent); box-shadow: 0 20px 50px rgba(212,163,64,.3); }
.mia-peek.party::before { content: "🎉"; position: absolute; top: -14px; right: 14px; font-size: 26px; animation: bob 1.2s ease-in-out infinite; }
.mm-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.mm-sugg button { border: 1px dashed color-mix(in srgb, var(--gold) 70%, transparent); background: var(--gold-soft); color: var(--ink); border-radius: 99px; padding: 6px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left; }
.mm-sugg button:hover { border-style: solid; }
.copy-btn { align-self: flex-start; }
.btn.wa { background: #1FA855; border-color: #1FA855; color: #fff; }
.btn.wa svg { width: 15px; height: 15px; }
.mm p { white-space: normal; }

/* =====================================================================
   v4.2 · Estudio de fotos guiado y editor nuevo
   ===================================================================== */
.studio h2.section svg { width: 18px; height: 18px; color: var(--gold); vertical-align: -3px; }
.yx-guide { border-radius: 18px; padding: 14px 16px; margin-bottom: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--gold-soft) 90%, transparent), color-mix(in srgb, var(--teal-soft) 80%, transparent)); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.yx-steps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; counter-reset: s; }
.yx-steps li { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; color: var(--ink-3); padding: 4px 10px 4px 4px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.yx-steps li i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line-strong); }
.yx-steps li i svg { width: 14px; height: 14px; }
.yx-steps li.done { color: var(--green); }
.yx-steps li.done i { background: var(--green); border-color: var(--green); color: #fff; }
.yx-steps li.now { color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.yx-steps li.now i { background: linear-gradient(135deg, #DDB04E, #C19030); border-color: transparent; color: #1E1705; }
.yx-say { display: flex; gap: 12px; align-items: flex-start; }
.yx-say > .mia { width: 48px; height: 48px; flex: none; animation: bob 3s ease-in-out infinite; }
.yx-say > div { flex: 1; min-width: 0; }
.yx-say b { font-size: 13px; color: var(--ink-2); }
.yx-say p { margin: 2px 0 8px; font-size: 15px; line-height: 1.5; }
.yx-pick { width: 110px; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 3px var(--gold), var(--shadow); flex: none; }
@media (max-width: 600px) { .yx-pick { display: none; } }
.drop { border-radius: 20px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.drop-art { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); flex: none; }
.drop-art svg { width: 26px; height: 26px; }
.drop > div:nth-child(2) { flex: 1; min-width: 200px; }
.photo-grid li { border-radius: 16px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
#phGrid li:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ph-cap.ask { background: rgba(212,163,64,.92); color: #1E1705; }
.ph-tip { position: absolute; left: 8px; bottom: 52px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(15,23,42,.72); color: #FCD34D; }
.ph-tip svg { width: 15px; height: 15px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { width: 38px; height: 22px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.switch.dark { color: #fff; }
.switch.dark span { background: rgba(255,255,255,.25); }

dialog.dlg-editor { width: min(1180px, calc(100vw - 20px)) !important; }
dialog.dlg-editor .dlg-b { padding: 0; }
.ed2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: min(72vh, 720px); }
@media (max-width: 900px) { .ed2 { grid-template-columns: 1fr; } }
.ed2-stage {
  position: relative; display: grid; place-items: center; padding: 56px 18px 64px; overflow: hidden;
  background: radial-gradient(600px 400px at 30% 20%, rgba(20,184,166,.14), transparent 60%), radial-gradient(500px 400px at 80% 90%, rgba(245,158,11,.12), transparent 60%), #0B1222;
}
.ed2-stage img { max-width: 100%; max-height: 60vh; display: block; border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.ed2-top { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ed2 .ed-busy { position: static; display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); color: #fff; font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 99px; }
.ed2 .ed-busy i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #FCD34D; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ed2-compare {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.12); backdrop-filter: blur(10px); color: #fff; font-weight: 650; font-size: 13px;
  padding: 9px 16px; border-radius: 99px; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none;
}
.ed2-compare svg { width: 16px; height: 16px; }
.ed2-compare.on { background: var(--gold); color: #1E1705; }
.ed2-side { display: flex; flex-direction: column; gap: 14px; padding: 18px; max-height: min(72vh, 720px); overflow-y: auto; border-left: 1px solid var(--line); }
@media (max-width: 900px) { .ed2-side { max-height: none; border-left: 0; } }
.ed2-tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 16px; background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.ed2-tip .mia { width: 38px; height: 38px; flex: none; }
.ed2-tip p { margin: 0; font-size: 14px; line-height: 1.45; }
.ed2-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.ed2-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; padding: 9px 6px; border-radius: 10px; font-weight: 650; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.ed2-tabs button svg { width: 16px; height: 16px; }
.ed2-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(15,23,42,.1); }
.ed2-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ed2-presets button { border: 2px solid transparent; background: var(--surface-2); border-radius: 14px; padding: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--ink); font-weight: 650; font-size: 12.5px; transition: border-color .15s, transform .15s; }
.ed2-presets button:hover { transform: translateY(-1px); }
.ed2-presets img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; background: #1a2333; }
.ed2-presets span { padding: 0 4px 2px; }
.ed2-presets button[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 6px 18px rgba(212,163,64,.3); }
.ed2-auto { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 14px; padding: 12px; cursor: pointer; color: var(--ink); }
.ed2-auto > svg { width: 22px; height: 22px; color: var(--ink-3); flex: none; }
.ed2-auto span { flex: 1; display: flex; flex-direction: column; }
.ed2-auto small { color: var(--ink-3); font-size: 12px; }
.ed2-auto i { width: 38px; height: 22px; border-radius: 99px; background: var(--line-strong); position: relative; flex: none; transition: background .2s; }
.ed2-auto i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.ed2-auto.on { border-color: color-mix(in srgb, var(--gold) 60%, transparent); background: var(--gold-soft); }
.ed2-auto.on > svg { color: var(--gold); }
.ed2-auto.on i { background: var(--gold); }
.ed2-auto.on i::after { transform: translateX(16px); }
.ed2-slider { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.ed2-slider span { display: flex; align-items: center; gap: 7px; }
.ed2-slider span svg { width: 15px; height: 15px; color: var(--ink-3); }
.ed2-slider b { margin-left: auto; min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink); background: var(--surface-2); border-radius: 99px; padding: 1px 8px; font-size: 12px; }
.ed2-slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; cursor: pointer; }
.ed2-slider input::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--line-strong) 0%, var(--line-strong) 50%, var(--line-strong) 100%); background: linear-gradient(90deg, var(--line-strong) min(50%, var(--v)), var(--gold) min(50%, var(--v)), var(--gold) max(50%, var(--v)), var(--line-strong) max(50%, var(--v))); }
.ed2-slider input::-moz-range-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--line-strong) min(50%, var(--v)), var(--gold) min(50%, var(--v)), var(--gold) max(50%, var(--v)), var(--line-strong) max(50%, var(--v))); }
.ed2-slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--gold); margin-top: -8px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.ed2-slider input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--gold); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.ed2-crops { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.ed2-crops button { display: flex; align-items: center; gap: 10px; border: 2px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 10px; cursor: pointer; font-size: 12.5px; font-weight: 650; color: var(--ink); text-align: left; }
.ed2-crops i { width: 30px; border: 2px solid var(--ink-3); border-radius: 4px; flex: none; }
.ed2-crops i.free { border-style: dashed; }
.ed2-crops button[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); }
.ed2-crops button[aria-pressed="true"] i { border-color: var(--gold); }
.ed2-cap { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.ed2-cap .chips button { font-size: 12.5px; padding: 5px 10px; }
#phGrid .ph-cap { top: auto; right: auto; left: 8px; bottom: 52px; }
#phGrid .ph-tip { left: auto; right: 8px; top: 8px; bottom: auto; }
@media (min-width: 861px) { .toasts { right: auto; left: calc(50% + 118px); transform: translateX(-50%); align-items: center; } }

/* =====================================================================
   v4.2 · Importar contactos
   ===================================================================== */
.privacy-card { display: flex; gap: 16px; align-items: flex-start; border-left: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--teal-soft) 85%, transparent), color-mix(in srgb, var(--surface) 70%, transparent)) !important; }
.privacy-card ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.privacy-card b { color: var(--ink); }
.pc-ico, .imp-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, #3B6F82, #2B4D59); color: #FCD34D; }
.pc-ico svg, .imp-ico svg { width: 24px; height: 24px; }
.imp-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 16px 0; }
.imp-options .panel + .panel { margin-top: 0; }
.imp-opt { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.imp-opt h2.section { margin: 4px 0 0; font-size: 16px; }
.imp-steps { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.6; }
.imp-how { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.imp-how summary { cursor: pointer; font-weight: 650; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.imp-how summary svg { width: 16px; height: 16px; color: var(--teal); }
.imp-how ol { margin: 8px 0 4px; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.imp-drop { justify-content: flex-start; margin-bottom: 16px; }
.imp-drop.over { border-color: var(--gold); background: var(--gold-soft); }
.imp-map select { min-width: 0; }
.imp-bar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 16px; }
.imp-bar.sticky { position: sticky; bottom: 12px; background: var(--glass, var(--surface)); backdrop-filter: blur(14px); padding: 10px 14px; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); justify-content: space-between; z-index: 5; }
@media (max-width: 860px) { .imp-bar.sticky { bottom: calc(76px + env(safe-area-inset-bottom)); } }
.imp-bar .btn { padding: 12px 18px; font-size: 15px; }
.imp-sum { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.imp-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.imp-tools input { flex: 1; min-width: 200px; border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; background: var(--surface); font-size: 15px; }
.imp-list-wrap { padding-top: 6px; }
.imp-row { display: flex; gap: 12px; align-items: center; width: 100%; cursor: pointer; }
.imp-list li.off { opacity: .55; }
.imp-list .tag { flex: none; }
@media (max-width: 600px) { .imp-row { flex-wrap: wrap; } .imp-row .tag { margin-left: 34px; } }
.imp-done { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.imp-done h1 { margin: 6px 0 0; font-size: 28px; font-weight: 800; }
.imp-done p { margin: 0; max-width: 520px; font-size: 15px; }
.imp-done-ico { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.imp-done-ico svg { width: 40px; height: 40px; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--gold); animation: spin .8s linear infinite; margin: 0 auto; }
.imp-list .s svg { width: 13px; height: 13px; vertical-align: -2px; color: var(--teal); }
@media (max-width: 600px) {
  .imp-row { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 6px; }
  .imp-row .tag { grid-column: 2; justify-self: start; margin-left: 0; }
  .imp-tools input { min-width: 0; flex-basis: 100%; }
}
body:has(.imp-bar.sticky) .fab { display: none; }

/* =====================================================================
   v4.3 · Cerrar sesión visible
   ===================================================================== */
button.top-news { border: 0; background: none; color: inherit; cursor: pointer; font: inherit; }
.rail-out { margin-top: 6px; border-top: 1px solid rgba(255,255,255,.08) !important; border-radius: 0 0 10px 10px; padding-top: 10px !important; }
.mas-out { justify-content: center; color: var(--red); font-size: 15px; padding: 12px; }

/* =====================================================================
   v4.3 · El asistente: más grande, movible y con globos que resaltan
   ===================================================================== */
.mia-fab { touch-action: none; user-select: none; -webkit-user-select: none; }
@media (min-width: 861px) { .mia-fab { right: auto; left: 256px; } }
.mia-fab.big { padding: 6px 18px 6px 6px; border: 2px solid var(--gold); box-shadow: 0 12px 34px rgba(20,30,38,.28), 0 0 0 4px rgba(212,163,64,.18); }
.mia-fab.big .mia { width: 62px; height: 62px; }
.mia-fab.big .mia-fab-label { font-size: 17px; }
@media (max-width: 860px) { .mia-fab.big { padding: 4px; } .mia-fab.big .mia { width: 58px; height: 58px; } }
.mia-fab.dragging { cursor: grabbing; transform: scale(1.08); box-shadow: 0 24px 50px rgba(0,0,0,.35), 0 0 0 6px rgba(212,163,64,.35); transition: none; z-index: 90; }
.mia-fab .mia { background: #fff; border-radius: 50%; }

.mia-peek {
  right: auto; bottom: auto; width: min(360px, calc(100vw - 24px));
  background: linear-gradient(160deg, #234B5A 0%, #13303A 100%) !important; color: #fff !important;
  border: 2px solid #D4A340 !important; border-radius: 20px !important; padding: 14px 16px !important;
  box-shadow: 0 24px 60px rgba(8,20,26,.45), 0 0 0 5px rgba(212,163,64,.18) !important;
}
.mia-peek p { font-size: 16px !important; line-height: 1.5; color: #fff; }
.mia-peek .mp-head b { color: #FCD34D; font-size: 15px; }
.mia-peek .mp-head .mia { background: #fff; border-radius: 50%; width: 36px !important; height: 36px !important; padding: 2px; }
.mia-peek .mp-x { color: rgba(255,255,255,.75); }
.mia-peek .btn.ghost { color: #fff; }
.mia-peek .btn.ghost:hover { background: rgba(255,255,255,.12); }
.mia-peek .btn.sm { font-size: 14px; padding: 8px 13px; }
:root[data-theme="dark"] .mia-peek {
  background: linear-gradient(160deg, #FFFBF0 0%, #FBF1DA 100%) !important; color: #1B232A !important;
}
:root[data-theme="dark"] .mia-peek p { color: #1B232A; }
:root[data-theme="dark"] .mia-peek .mp-head b { color: #8C6814; }
:root[data-theme="dark"] .mia-peek .btn.ghost, :root[data-theme="dark"] .mia-peek .mp-x { color: #1B232A; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mia-peek { background: linear-gradient(160deg, #FFFBF0 0%, #FBF1DA 100%) !important; color: #1B232A !important; }
  :root:not([data-theme="light"]) .mia-peek p, :root:not([data-theme="light"]) .mia-peek .btn.ghost, :root:not([data-theme="light"]) .mia-peek .mp-x { color: #1B232A; }
  :root:not([data-theme="light"]) .mia-peek .mp-head b { color: #8C6814; }
}
@media (max-width: 860px) { .mia-peek { border-radius: 20px !important; } }
.mia-panel { z-index: 80; }
.mia-panel header svg.mia { background: #fff; border-radius: 50%; padding: 2px; }

/* Selector de asistente */
.asst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.asst-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 14px 10px 12px; border-radius: 18px; cursor: pointer;
  border: 2px solid var(--line); background: color-mix(in srgb, var(--surface-2) 70%, transparent); color: var(--ink); font: inherit; transition: transform .15s, border-color .15s, box-shadow .15s;
}
.asst-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.asst-card .mia { width: 76px; height: 76px; }
.asst-card b { font-size: 16px; }
.asst-card small { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.asst-card[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 10px 26px rgba(212,163,64,.25); }
.asst-card[aria-pressed="true"]::after { content: "✓ Elegido"; font-size: 12px; font-weight: 800; color: #8C6814; }
:root[data-theme="dark"] .asst-card[aria-pressed="true"]::after { color: var(--gold); }
.asst-opts { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
#asstPanel p svg { width: 14px; height: 14px; vertical-align: -2px; }

/* =====================================================================
   v4.3 · Tiempos, visitas y vendidas
   ===================================================================== */
.time-panel h2.section svg { width: 17px; height: 17px; color: var(--gold); vertical-align: -3px; }
.time-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.time-grid div { background: color-mix(in srgb, var(--surface-2) 80%, transparent); border-radius: 14px; padding: 10px 8px; text-align: center; display: flex; flex-direction: column; }
.time-grid b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.time-grid span { font-size: 11.5px; color: var(--ink-2); line-height: 1.3; }
.market-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.market-bar > * { display: flex; flex-direction: column; gap: 1px; padding: 10px 14px 10px 40px; position: relative; border-radius: 16px; background: var(--glass, var(--surface)); border: 1px solid var(--line); text-decoration: none; color: inherit; min-width: 0; }
.market-bar svg { position: absolute; left: 12px; top: 13px; width: 18px; height: 18px; color: var(--gold); }
.market-bar span { font-size: 12px; color: var(--ink-2); }
.market-bar b { font-size: 15px; }
.sold-txt { color: var(--green); font-weight: 650; }
.sold-txt svg { width: 13px; height: 13px; vertical-align: -2px; }
.visit-chip {
  position: fixed; z-index: 70; left: 50%; top: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px);
  background: linear-gradient(160deg, #234B5A, #13303A); color: #fff; border: 2px solid #D4A340; border-radius: 99px; padding: 6px 8px 6px 16px; box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
@media (min-width: 861px) { .visit-chip { left: calc(50% + 118px); } }
.vc-dot { width: 10px; height: 10px; border-radius: 50%; background: #F87171; box-shadow: 0 0 0 0 rgba(248,113,113,.6); animation: rec 1.6s infinite; flex: none; }
@keyframes rec { 0% { box-shadow: 0 0 0 0 rgba(248,113,113,.6); } 70% { box-shadow: 0 0 0 10px rgba(248,113,113,0); } 100% { box-shadow: 0 0 0 0 rgba(248,113,113,0); } }
.vc-info { display: flex; flex-direction: column; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; min-width: 0; font: inherit; }
.vc-info small { font-size: 11px; color: #FCD34D; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.vc-info b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.vc-time { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 64px; text-align: center; }
.visit-chip .icon-btn { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.visit-sum { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); }
.visit-sum svg { width: 26px; height: 26px; color: var(--gold); flex: none; }
.visit-sum div { display: flex; flex-direction: column; }
.vf-new { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .vf-new { grid-template-columns: 1fr; } .vc-info b { max-width: 26vw; } }

/* =====================================================================
   v4.4
   ===================================================================== */
.popover .pop-head { padding: 8px 12px 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.fu-btn span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.fu-btn .fu-prop { font-size: 11px; font-weight: 600; opacity: .85; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-int { font-weight: 650; color: var(--teal-deep); }
.fu-int svg { width: 12px; height: 12px; vertical-align: -1px; color: var(--gold); }
.cap-other { margin-top: 8px; width: 100%; border: 1.5px solid var(--gold); border-radius: 12px; padding: 10px 12px; font-size: 15px; background: var(--surface); color: var(--ink); }

/* v4.4 · Letra grande: las ventanas siempre caben en la pantalla y los
   botones (Guardar, Borrar…) quedan siempre a la vista. */
:root { --z: 1; }
:root[data-font="l"] { --z: 1.12; }
:root[data-font="xl"] { --z: 1.25; }
dialog { max-height: calc((100dvh - 24px) / var(--z)) !important; width: min(600px, calc((100vw - 20px) / var(--z))); }
dialog.dlg-editor { width: min(1180px, calc((100vw - 20px) / var(--z))) !important; }
dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog .dlg-h, dialog .dlg-f { flex: none; position: static; }
dialog .dlg-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
dialog .dlg-f .btn { flex: 0 1 auto; }
@media (max-width: 560px) {
  dialog .dlg-f { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 6px; }
  dialog .dlg-f .left { margin-right: 0; order: 9; flex-basis: 100%; }
}
:root[data-font="l"] .mia-panel { height: min(640px, calc((100dvh - 44px) / 1.1)); }
:root[data-font="xl"] .mia-panel { height: min(640px, calc((100dvh - 44px) / 1.2)); }
@media (max-width: 560px) {
  dialog { width: calc(100vw / var(--z)) !important; max-width: none; max-height: calc(94dvh / var(--z)) !important; }
}

/* v4.4 · Cierres */
.deal { padding: 0; cursor: default; overflow: hidden; }
.deal-main { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 12px; width: 100%; }
.deal-main:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.deal-top { gap: 8px; }
.deal-days { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.deal .s svg { width: 13px; height: 13px; vertical-align: -2px; }
.deal-steps { display: flex; gap: 4px; margin: 2px 0; }
.deal-steps i { flex: 1; height: 7px; border-radius: 99px; background: var(--line-strong); }
.deal-steps i.on { background: var(--teal); }
.deal.cobrado .deal-steps i.on { background: var(--green); }
.deal-steps i.now { background: repeating-linear-gradient(90deg, var(--gold) 0 6px, color-mix(in srgb, var(--gold) 45%, transparent) 6px 12px); animation: stepPulse 1.6s ease-in-out infinite; }
@keyframes stepPulse { 50% { opacity: .55; } }
.deal-late { display: flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 650; color: var(--red); background: var(--red-soft); border-radius: 8px; padding: 6px 9px; }
.deal-late svg { width: 14px; height: 14px; }
.deal.is-late { border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.deal-actions { display: flex; gap: 6px; align-items: center; padding: 10px 16px 12px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.deal-actions .btn.gold { flex: 1; justify-content: center; white-space: normal; text-align: center; }
.deal-ask { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 10px 16px 12px; border-top: 1px solid var(--line); background: var(--gold-soft); }
.deal-ask span { flex: 1 1 100%; font-size: 13.5px; font-weight: 650; }
.deal-ask .btn { flex: 1; justify-content: center; }
.deal-chart { margin-top: 18px; }
.deal-chart h2 svg { width: 16px; height: 16px; color: var(--gold); vertical-align: -3px; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 170px; padding-top: 10px; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar i { width: 100%; max-width: 34px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #DDB04E, #C19030); }
.bar.future i { background: var(--line); }
.bar.now i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold); }
.bar b { font-size: 11px; color: var(--ink-3); font-weight: 650; text-transform: capitalize; }
.bar span { font-size: 10.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 560px) { .bar span { display: none; } .bars { gap: 3px; height: 130px; } }
html.privado .bar span { filter: blur(6px); }
.pick .search-wrap { margin-bottom: 10px; }
.pick-list { max-height: none; }
.pick-row { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 4px; border-radius: 12px; }
.pick-row:hover, .pick-row:focus-visible { background: var(--hover); }
.pick-row img, .pick-row .pick-ic { width: 52px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); }
.pick-row .pick-ic svg { width: 20px; height: 20px; }
.pick-row b { display: block; font-size: 15px; }
.pick-row small { display: block; color: var(--ink-3); font-size: 12.5px; }
.pick-row > svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }

/* v4.4 · Hoy */
.empty-cta { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 8px 8px; color: var(--ink-2); }
.empty-cta > svg { width: 30px; height: 30px; color: var(--gold); }
.empty-cta p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.empty-cta b { color: var(--ink); }
.empty-cta .btn { margin-top: 4px; }
.qa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 16px; }
.qa { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center;
  min-height: 96px; padding: 12px 6px; border-radius: 20px; font-weight: 700; font-size: 13.5px; line-height: 1.2; color: var(--ink);
  background: var(--glass, var(--surface)); border: 1px solid var(--glass-line, var(--line)); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.qa span { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-deep); }
.qa span svg { width: 22px; height: 22px; }
.qa.gold { background: linear-gradient(135deg, #DDB04E, #C19030); color: #1E1705; border-color: transparent; }
.qa.gold span { background: rgba(255,255,255,.35); color: #1E1705; }
.qa:active { transform: scale(.97); }
.qa:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.later-h { display: flex; align-items: center; gap: 8px; margin: 22px 2px 10px; font-size: 13px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.later-h::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.later-h svg { width: 15px; height: 15px; }
.more-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.more-links a { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 14px; background: var(--glass, var(--surface)); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 650; font-size: 14px; }
.more-links svg { width: 18px; height: 18px; color: var(--teal); }
body:has(.qa-grid) .fab { display: none !important; }  /* en Hoy ya está "Registrar llamada" arriba */
.flash { animation: flash 1.1s ease-in-out 2; }
@keyframes flash { 50% { box-shadow: 0 0 0 4px var(--gold), var(--shadow); } }
.sum-panel:empty { display: none; }
.sum-panel { padding: 16px 16px 14px; }
.sum-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sum-head h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.sum-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.sum-hico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); flex: none; }
.sum-hico svg { width: 20px; height: 20px; }
.sum-mia .mia { width: 54px; height: 54px; }
.sum-seg button { padding: 6px 10px; }
.sum-cheer { margin: 12px 0; padding: 10px 12px; border-radius: 14px; background: var(--gold-soft); font-size: 14.5px; line-height: 1.45; }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sum-tile { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--surface-2) 75%, transparent); border: 1px solid var(--line); }
.sum-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-deep); flex: none; }
.sum-ic svg { width: 17px; height: 17px; }
.sum-tile b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.sum-tile span:not(.sum-ic):not(.sd) { display: block; font-size: 12.5px; color: var(--ink-2); line-height: 1.3; }
.sum-tile small { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.sd { font-size: 11.5px; font-weight: 700; margin-left: 6px; color: var(--ink-3); }
.sd.up { color: var(--green); }
.sd.down { color: var(--red); }
.sum-top { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--teal-soft); color: var(--ink); text-decoration: none; font-size: 13.5px; }
.sum-top svg { width: 16px; height: 16px; color: var(--gold); flex: none; }
.sum-top svg:last-child { margin-left: auto; color: var(--teal); }
.sum-card { width: min(720px, calc(100vw - 24px)); text-align: left; max-height: calc(100dvh - 30px); overflow-y: auto; }
.sum-card .mia-actions { justify-content: flex-end; }
.mia-peek p { white-space: pre-line; }

/* v4.4 · Fondo con vida: la ciudad (y el mar) en línea fina, muy suave,
   detrás del contenido. No compite con el texto: las tarjetas son de vidrio. */
html.modern body::after {
  content: ""; position: fixed; z-index: 0; pointer-events: none;
  left: 236px; right: 0; bottom: 0; height: min(46vh, 380px);
  background: url("/img/skyline.svg") center bottom / auto 100% repeat-x;
  opacity: .16; mask-image: linear-gradient(to top, #000 35%, transparent 100%);
}
html.modern[data-theme="dark"] body::after { opacity: .2; filter: brightness(1.5); }
@media (prefers-color-scheme: dark) { html.modern:not([data-theme="light"]) body::after { opacity: .2; filter: brightness(1.5); } }
@media (max-width: 860px) { html.modern body::after { left: 0; height: 34vh; opacity: .12; } }
html.modern:not([data-theme="dark"]) body {
  background:
    radial-gradient(1000px 650px at 0% 0%, rgba(20, 184, 166, .16), transparent 60%),
    radial-gradient(900px 700px at 100% 100%, rgba(245, 158, 11, .16), transparent 60%),
    radial-gradient(800px 500px at 75% -10%, rgba(43, 97, 117, .14), transparent 60%),
    linear-gradient(180deg, #EEF3F5 0%, #F4EFE6 100%);
  background-attachment: fixed;
}
html.modern main { position: relative; z-index: 1; }
.sum-head .grow { min-width: min(100%, 240px); flex: 1 1 240px; }
.sum-head .sum-seg { flex: 0 0 auto; margin-left: auto; }
@media (max-width: 1240px) { .sum-panel .sum-head .sum-seg { margin-left: 0; } }

/* ---- v4.6: crédito VAIPA ---- */
.vaipa { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2, #64748B); }
.vaipa-mark { display: inline-flex; align-items: center; }
.vaipa-word { font-weight: 800; letter-spacing: .16em; color: var(--ink, #0F172A); font-size: 14px; }
.vaipa-sub { font-weight: 600; letter-spacing: .04em; }
.vaipa-mark { gap: 7px; }
.vaipa-logo { height: 24px; width: auto; object-fit: contain; display: block; }
.vaipa-full { display: block; width: 100%; max-width: 280px; height: auto; border-radius: 14px; margin: 2px 0 12px; }
.vaipa-line { margin-top: 10px; font-size: 12px; }
.lg2-brand .vaipa { color: #94A3B8; }
.lg2-brand .vaipa-word { color: #E2E8F0; }
:root[data-theme="dark"] .vaipa-word { color: var(--ink, #E2E8F0); }

/* ================= v4.7: login con la paleta de VAIPA (teal sobre pizarra) ================= */
.lg2 {
  --lg-gold: #137783; --lg-gold-2: #0F6471; --lg-slate: #243441; --lg-teal: #4FB8C2; --lg-teal-2: #2E95A1;
  background: #16212A;
}
.lg2[data-lt="dark"] {
  --lg-gold: #62CBD5; --lg-gold-2: #62CBD5;
  --lg-card: rgba(18,28,36,.9); --lg-form-bg: rgba(18,28,36,.45); --lg-ink: #EAF2F5; --lg-ink-2: #A3B6C0; --lg-ink-3: #7A909B;
  --lg-field: rgba(30,45,56,.72); --lg-field-line: #34495A; --lg-line: #22333F;
}
.lg2[data-lt="light"] { background: #E3ECEF; --lg-ink: #10202A; --lg-ink-2: #3F5663; --lg-ink-3: #7B8F99; --lg-field-line: #CBD8DE; --lg-line: #D5E0E5; }
.lg2-brand { background: linear-gradient(135deg, #243441 0%, #16212A 100%); }
.lg2-brand .g1 { background: rgba(79,184,194,.30); }
.lg2-brand .g2 { background: rgba(79,184,194,.14); }
.lg2-logo small, .lg2-pill { color: #8FDCE4; }
.lg2-pill i { background: #4FB8C2; }
.lg2-hero li svg { color: #4FB8C2; }
.lg2-brand footer button:hover { color: #8FDCE4; }
.lg2-submit { background: linear-gradient(90deg, #5BC6D0, #2E95A1); color: #04181D; box-shadow: 0 12px 28px rgba(46,149,161,.30); }
.lg2-submit:hover { box-shadow: 0 14px 34px rgba(46,149,161,.46); }
.lg2-link { color: #137783; }
.lg2[data-lt="dark"] .lg2-link { color: #7AD6DF; }
.lg2-field input:focus { border-color: var(--lg-gold); box-shadow: 0 0 0 4px rgba(79,184,194,.26); }
.lg2-check input { accent-color: #2E95A1; }
.lg2[data-lt="light"] .lg2-theme { color: #137783; }
.lg2-mark .brand-mark { filter: drop-shadow(0 8px 18px rgba(79,184,194,.28)); }

/* VAIPA en la entrada: más grande */
.lg2-brand .vaipa-line { margin-top: 14px; gap: 10px; font-size: 12.5px; }
.lg2-brand .vaipa-logo { height: 40px; }
.lg2-brand .vaipa-word { font-size: 18px; letter-spacing: .18em; }
.lg2-brand .vaipa-sub { font-size: 13px; }
.vaipa-m { display: none; justify-content: center; margin-top: 4px; }
.vaipa-m .vaipa-logo { height: 30px; }
.vaipa-m .vaipa-word { font-size: 15px; }
@media (max-width: 900px) { .vaipa-m { display: flex; } #lgVaipa { display: none; } }

/* VAIPA en el menú lateral: una placa oscura fija, para que se lea con cualquier color que elija el cliente */
.rail-vaipa { margin: 14px 4px 4px; padding: 10px 12px; border-radius: 14px; background: rgba(12,20,27,.62); border: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.rail-vaipa .vaipa-label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(226,238,242,.62); }
.rail-vaipa .vaipa-mark { gap: 8px; }
.rail-vaipa .vaipa-logo { height: 30px; }
.rail-vaipa .vaipa-word { color: #E9F6F8; font-size: 15px; letter-spacing: .2em; }
.rail-vaipa .vaipa-sub { color: #8FDCE4; font-size: 11.5px; }
.rail-vaipa.vaipa { flex-wrap: wrap; }
.rail-vaipa .vaipa-sub { margin-top: -2px; }
.rail-foot { margin-top: 0; }
.rail-vaipa { margin-top: auto; }
@media (max-width: 900px) { .rail-vaipa { display: none; } }

/* =====================================================================
   v4.8 · Look premium (todo menos la entrada), modo claro/oscuro a un
   toque, calculadora de inversión, tarjetas de módulos y sugerencias.
   ===================================================================== */
html.modern {
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --hair: color-mix(in srgb, var(--ink) 9%, transparent);
  --ring-gold: color-mix(in srgb, var(--gold) 55%, transparent);
  --lift: 0 1px 0 rgba(255,255,255,.75) inset, 0 1px 2px rgba(15,23,42,.04), 0 12px 32px -12px rgba(15,23,42,.14);
  --lift-hover: 0 1px 0 rgba(255,255,255,.8) inset, 0 2px 4px rgba(15,23,42,.05), 0 22px 48px -18px rgba(15,23,42,.22);
  --pos: #1F8A68; --neg: #C2412D;
}
html.modern[data-theme="dark"] {
  --hair: rgba(148,163,184,.16);
  --lift: 0 1px 0 rgba(255,255,255,.05) inset, 0 18px 40px -18px rgba(0,0,0,.6);
  --lift-hover: 0 1px 0 rgba(255,255,255,.07) inset, 0 26px 56px -20px rgba(0,0,0,.75);
  --pos: #5DD3A8; --neg: #F28B74;
}
@media (prefers-color-scheme: dark) {
  html.modern:not([data-theme="light"]) {
    --hair: rgba(148,163,184,.16);
    --lift: 0 1px 0 rgba(255,255,255,.05) inset, 0 18px 40px -18px rgba(0,0,0,.6);
    --lift-hover: 0 1px 0 rgba(255,255,255,.07) inset, 0 26px 56px -20px rgba(0,0,0,.75);
    --pos: #5DD3A8; --neg: #F28B74;
  }
}

/* ---- Títulos con carácter editorial ---- */
html.modern main .page-head h1 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: clamp(28px, 3.3vw, 38px); line-height: 1.05; font-variation-settings: "opsz" 72; }
html.modern main .page-head h1::after { content: ""; display: block; width: 38px; height: 3px; border-radius: 3px; margin-top: 10px; background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 20%, transparent)); }
html.modern main .page-head p { margin-top: 8px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--gold) 70%, var(--ink)); margin-bottom: 6px; }
.eyebrow svg { width: 14px; height: 14px; }
html.modern h2.section { font-size: 14.5px; }

/* ---- Superficies: vidrio con filo de luz arriba ---- */
html.modern .panel, html.modern .kpi, html.modern .resume, html.modern .deal, html.modern .prop-card, html.modern .prop-row {
  border-color: var(--hair); box-shadow: var(--lift);
}
html.modern .panel { padding: 22px 22px 18px; }
html.modern .kpi { position: relative; overflow: hidden; padding: 16px 18px; }
html.modern .kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--ring-gold), transparent); opacity: 0; transition: opacity .25s; }
html.modern a.kpi:hover, html.modern .kpi:hover { box-shadow: var(--lift-hover); }
html.modern a.kpi:hover::before { opacity: 1; }
html.modern .kpi .stat-value { font-family: var(--display); font-weight: 600; font-size: 32px; letter-spacing: -.01em; }
html.modern .list > li + li { border-top-color: var(--hair); }
html.modern .btn:not(.gold):not(.primary):not(.ghost):not(.mostaza) { border-color: var(--hair); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 1px 2px rgba(15,23,42,.05); }
html.modern[data-theme="dark"] .btn:not(.gold):not(.primary):not(.ghost):not(.mostaza) { box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
html.modern .btn.gold, html.modern .fab { background: linear-gradient(180deg, #E4BB5C 0%, #D4A340 52%, #C08E2F 100%); box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 8px 20px -6px rgba(192,142,47,.55); }
html.modern .tag { font-weight: 650; }

/* ---- Menú lateral ---- */
html.modern .rail { overflow-y: auto; scrollbar-width: none; }
html.modern .rail::-webkit-scrollbar { display: none; }
html.modern .rail .brand { border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 12px; padding-bottom: 16px; }
html.modern .nav a { padding: 9px 12px; }
html.modern .nav a[aria-current="page"] { background: linear-gradient(90deg, rgba(255,255,255,.16), rgba(255,255,255,.06)); }
.rail-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.rail-duo .rail-news { padding: 8px 10px; gap: 8px; font-size: 12.5px; }
.rail-duo .rail-news span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theme-toggle svg { width: 17px; height: 17px; flex: none; }

/* VAIPA en el menú: «VAIPA Software» en una sola línea, al lado de la V */
.rail-vaipa { display: grid !important; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; row-gap: 5px; text-decoration: none; transition: background .2s, border-color .2s, transform .2s; }
.rail-vaipa .vaipa-label { grid-column: 1 / -1; }
.rail-vaipa .vaipa-mark { gap: 7px; }
.rail-vaipa .vaipa-logo { height: 26px; }
.rail-vaipa .vaipa-word { font-size: 14px; letter-spacing: .18em; }
.rail-vaipa .vaipa-sub { margin: 0 !important; font-size: 11.5px; align-self: center; white-space: nowrap; }
.rail-vaipa:hover { background: rgba(12,20,27,.78); border-color: rgba(143,220,228,.35); }

/* ---- Celular: barra superior con el color de su marca ---- */
@media (max-width: 860px) {
  html.modern .topbar {
    background: linear-gradient(135deg, var(--rail-2), var(--rail)) !important; color: #fff;
    box-shadow: 0 10px 30px -14px rgba(0,0,0,.45); border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .topbar .row { flex-wrap: nowrap; }
  .topbar .brand b { color: #fff; max-width: 46vw; }
  .topbar .top-news, .topbar .priv-toggle, .topbar .theme-toggle { color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center; padding: 0; cursor: pointer; opacity: 1; }
  .topbar .theme-toggle span { display: none; }
  .topbar .top-news svg, .topbar .theme-toggle svg { width: 19px; height: 19px; }
  /* Barra de abajo flotante */
  html.modern .tabbar {
    left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); border-radius: 22px; padding: 5px;
    border: 1px solid var(--hair); box-shadow: 0 18px 40px -12px rgba(15,23,42,.35);
  }
  html.modern .tabbar a { border-radius: 16px; padding: 7px 2px 6px; }
  html.modern .tabbar a[aria-current="page"] { background: color-mix(in srgb, var(--teal) 12%, transparent); }
  html.modern .tabbar a[aria-current="page"]::after { top: auto; bottom: 2px; width: 16px; }
  html.modern .fab { bottom: calc(88px + env(safe-area-inset-bottom)); }
  html.modern main { padding-bottom: 150px; }
  html.modern main .page-head h1 { font-size: 30px; }
}

/* Más (celular): el botón de sugerencias se ve como los enlaces */
button.mas-link { border: 0; background: none; font: inherit; color: inherit; text-align: left; width: 100%; cursor: pointer; padding: 0; display: flex; gap: 12px; align-items: center; }
.theme-toggle.btn { display: flex; justify-content: center; gap: 8px; align-items: center; }

/* ---- Venta / alquiler en Cierres ---- */
.bar .stack { width: 100%; max-width: 34px; display: flex; flex-direction: column; border-radius: 8px 8px 3px 3px; overflow: hidden; min-height: 2px; }
.bar .stack i { width: 100%; max-width: none; border-radius: 0; flex: 1 1 auto; }
.bar .stack i.v { background: linear-gradient(180deg, #E1B655, #C19030); }
.bar .stack i.a { background: linear-gradient(180deg, #5FBFC8, #2E8F9B); }
.bar .stack i:not(.v):not(.a) { background: var(--line); }
.bar.now .stack { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold); }
.bar-legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); font-weight: 600; margin: -4px 0 6px; }
.bar-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bar-legend i.v { background: #D4A340; } .bar-legend i.a { background: #3FA5B0; }
.lease-days { display: grid; place-items: center; min-width: 54px; height: 48px; border-radius: 14px; background: var(--teal-soft); color: var(--teal-deep); line-height: 1; flex: none; }
.lease-days b { font-size: 18px; font-weight: 800; }
.lease-days small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
.lease-days.soon { background: var(--amber-soft); color: var(--amber); }
.lease-days.late { background: var(--red-soft); color: var(--red); }
.lease-panel { margin-bottom: 16px; }
.lease-panel .row-link { display: flex; gap: 12px; align-items: center; text-align: left; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.deal-lease { display: flex; align-items: center; gap: 6px; }
.deal-lease svg { width: 14px; height: 14px; }
.deal-lease.soon { color: var(--amber); font-weight: 600; }
.deal-lease.late { color: var(--red); font-weight: 600; }
.lease-box .row { gap: 10px; }
.chips.mini button { padding: 5px 10px; font-size: 12px; }

/* ---- Calculadora de inversión ---- */
.inv-tabs button { display: inline-flex; align-items: center; gap: 7px; }
.inv-tabs svg { width: 16px; height: 16px; flex: none; }
.inv-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.inv-name { display: flex; gap: 8px; align-items: center; flex: 1 1 320px; min-width: 0; flex-wrap: wrap; }
.inv-name input { flex: 1 1 260px; min-width: 0; border: 1.5px solid var(--line-strong); background: var(--glass, var(--surface)); border-radius: 14px; padding: 11px 14px; font-weight: 650; font-size: 15px; color: var(--ink); }
.inv-name input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212,163,64,.16); }
.count-pill { background: var(--teal-soft); color: var(--teal-deep); border-radius: 99px; padding: 0 7px; font-size: 11px; font-weight: 800; line-height: 18px; }
.inv-mode { margin-bottom: 16px; }
.inv-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .inv-layout { grid-template-columns: 1fr; } }
.inv-form { display: flex; flex-direction: column; gap: 12px; }
.inv-group { background: var(--glass, var(--surface)); border: 1px solid var(--hair, var(--line)); border-radius: 20px; box-shadow: var(--lift, var(--shadow-sm)); overflow: hidden; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.inv-group summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; user-select: none; }
.inv-group summary::-webkit-details-marker { display: none; }
.inv-group summary > svg { width: 18px; height: 18px; margin-left: auto; color: var(--ink-3); transition: transform .2s; flex: none; }
.inv-group[open] summary > svg { transform: rotate(90deg); }
.inv-group summary b { font-size: 14.5px; }
.inv-group summary small { color: var(--ink-3); font-size: 12.5px; font-weight: 600; margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 18%, transparent), color-mix(in srgb, var(--gold) 14%, transparent)); color: var(--teal); flex: none; }
.ig-ic svg { width: 18px; height: 18px; }
.ig-body { padding: 4px 16px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ig-body > .inv-switch, .ig-body > .inv-fin { grid-column: 1 / -1; }
.inv-fin { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inv-fin[hidden] { display: none; }
.inv-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.inv-f > span { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.inv-f small { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; }
.inv-in { display: flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: 13px; background: color-mix(in srgb, var(--surface-2) 85%, transparent); transition: border-color .15s, box-shadow .15s; overflow: hidden; }
.inv-in:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212,163,64,.16); background: var(--surface); }
.inv-in input { flex: 1; min-width: 0; border: 0; background: none; padding: 11px 10px; font-weight: 650; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.inv-in input::-webkit-outer-spin-button, .inv-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.inv-in input:focus { outline: none; }
.inv-in input::placeholder { color: var(--ink-3); font-weight: 500; }
.inv-in i { font-style: normal; color: var(--ink-3); font-size: 12.5px; font-weight: 700; padding: 0 10px; white-space: nowrap; }
.inv-in i:first-child { padding-right: 0; }
.inv-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 2px 0; }
.inv-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.inv-switch .sw { width: 42px; height: 24px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .2s; flex: none; }
.inv-switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .2s; }
.inv-switch input:checked + .sw { background: linear-gradient(135deg, #3B8E9A, #2B6175); }
.inv-switch input:checked + .sw::after { transform: translateX(18px); }
.inv-switch input:focus-visible + .sw { outline: 2px solid var(--gold); outline-offset: 2px; }
.inv-switch b { font-size: 14px; font-weight: 650; }
.inv-out { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (min-width: 1001px) { .inv-out { position: sticky; top: 18px; } }
.inv-horizon { background: var(--glass, var(--surface)); border: 1px solid var(--hair, var(--line)); border-radius: 20px; padding: 14px 18px 12px; box-shadow: var(--lift, var(--shadow-sm)); }
.ih-top { display: flex; justify-content: space-between; align-items: baseline; }
.ih-top span { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.ih-top b { font-family: var(--display, inherit); font-size: 22px; font-weight: 600; }
.inv-horizon input[type=range] { width: 100%; margin: 10px 0 4px; accent-color: var(--gold); height: 22px; }
.ih-ticks { display: flex; justify-content: space-between; }
.ih-ticks button { border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--ink-3); padding: 4px 6px; border-radius: 8px; cursor: pointer; font-variant-numeric: tabular-nums; }
.ih-ticks button[aria-pressed="true"] { background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 65%, var(--ink)); }
.inv-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 34px 22px; border-radius: 22px; border: 1.5px dashed var(--line-strong); color: var(--ink-2); }
.inv-empty svg { width: 34px; height: 34px; color: var(--gold); }
.inv-empty b { font-size: 16px; color: var(--ink); }
.inv-verdict { border-radius: 24px; padding: 20px 22px; color: #fff; position: relative; overflow: hidden; box-shadow: 0 24px 48px -24px rgba(15,23,42,.5); }
.inv-verdict::after { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -120px; border-radius: 50%; background: rgba(255,255,255,.14); filter: blur(30px); pointer-events: none; }
.inv-verdict.good { background: linear-gradient(135deg, #1F7A64 0%, #155A4A 60%, #0F3F35 100%); }
.inv-verdict.ok { background: linear-gradient(135deg, #B9862A 0%, #8E6418 60%, #614310 100%); }
.inv-verdict.bad { background: linear-gradient(135deg, #B4473A 0%, #8A3127 60%, #5E2019 100%); }
.inv-verdict > * { position: relative; z-index: 1; }
.iv-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); border-radius: 99px; padding: 5px 12px 5px 8px; font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.iv-badge svg { width: 18px; height: 18px; }
.inv-verdict p { margin: 10px 0 14px; font-size: 14px; opacity: .92; max-width: 56ch; }
.iv-big { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.iv-big div { display: flex; flex-direction: column; gap: 2px; }
.iv-big span { font-size: 12px; opacity: .8; font-weight: 600; }
.iv-big b { font-family: var(--display, inherit); font-size: clamp(28px, 4.2vw, 40px); font-weight: 600; line-height: 1.05; letter-spacing: -.01em; }
.iv-vs { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.18); font-size: 13px; }
.iv-vs b { font-weight: 800; }
.iv-vs .up, .iv-vs .down { font-weight: 800; background: rgba(255,255,255,.14); border-radius: 99px; padding: 1px 10px; }
.inv-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.inv-k { background: var(--glass, var(--surface)); border: 1px solid var(--hair, var(--line)); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--lift, var(--shadow-sm)); min-width: 0; }
.inv-k span { font-size: 12px; font-weight: 650; color: var(--ink-2); }
.inv-k b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.inv-k small { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; }
.inv-k.pos b { color: var(--pos); } .inv-k.neg b { color: var(--neg); }
.inv-reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.inv-reasons li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--green) 9%, transparent); color: var(--ink); }
.inv-reasons li.bad { background: color-mix(in srgb, var(--red) 9%, transparent); }
.inv-reasons svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--pos); }
.inv-reasons li.bad svg { color: var(--neg); }
.inv-card { background: var(--glass, var(--surface)); border: 1px solid var(--hair, var(--line)); border-radius: 22px; padding: 16px 18px; box-shadow: var(--lift, var(--shadow-sm)); }
.inv-card h3, .inv-card summary { margin: 0 0 10px; font-size: 14.5px; font-weight: 750; display: flex; align-items: center; gap: 8px; }
.inv-card h3 svg, .inv-card summary svg { width: 17px; height: 17px; color: var(--gold); }
.inv-table summary { cursor: pointer; margin: 0; list-style: none; }
.inv-table summary::-webkit-details-marker { display: none; }
.inv-table[open] summary { margin-bottom: 10px; }
.inv-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.inv-table th { text-align: right; font-size: 11.5px; color: var(--ink-3); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--hair, var(--line)); }
.inv-table th:first-child, .inv-table td:first-child { text-align: left; }
.inv-table td { text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--hair, var(--line)); white-space: nowrap; }
.num.neg, td.neg, b.neg { color: var(--neg, var(--red)); }
td.pos { color: var(--pos, var(--green)); font-weight: 700; }
.inv-verdict b.neg { color: #FFD5CC; }
.inv-chart { width: 100%; height: auto; display: block; overflow: visible; }
.inv-chart text { fill: var(--ink-3); font-size: 11px; font-weight: 600; font-family: var(--font); }
.inv-chart .g { stroke: var(--hair, var(--line)); stroke-width: 1; }
.inv-chart .zero { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 4; opacity: .6; }
.inv-chart .prof { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.inv-chart .alt { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-dasharray: 6 6; stroke-linecap: round; }
.inv-chart .pt { fill: var(--surface); stroke: var(--teal); stroke-width: 2.5; }
.inv-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); font-weight: 600; margin-top: 6px; }
.inv-legend i { display: inline-block; width: 18px; height: 3px; border-radius: 3px; margin-right: 6px; vertical-align: 3px; }
.inv-legend i.prof { background: var(--teal); }
.inv-legend i.alt { background: repeating-linear-gradient(90deg, var(--gold) 0 5px, transparent 5px 9px); }
.inv-what { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.iw { border: 1px solid var(--hair, var(--line)); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.iw span { font-size: 12px; font-weight: 650; color: var(--ink-2); }
.iw b { font-size: 18px; font-weight: 800; }
.iw small { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.iw.up small { color: var(--pos); } .iw.down small { color: var(--neg); }
.inv-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.inv-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.inv-actions { gap: 8px; }
.inv-sticky { display: none; }
@media (max-width: 1000px) {
  .inv-sticky {
    position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 29;
    display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; text-align: left; font: inherit;
    padding: 11px 14px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #2B4D59, #1A3440);
    box-shadow: 0 16px 36px -12px rgba(0,0,0,.5); font-size: 13px;
  }
  .inv-sticky .dot { width: 10px; height: 10px; border-radius: 50%; background: #9FB3BC; flex: none; box-shadow: 0 0 0 4px rgba(255,255,255,.12); }
  .inv-sticky.good .dot { background: #5DD3A8; } .inv-sticky.ok .dot { background: #F2C25B; } .inv-sticky.bad .dot { background: #F28B74; }
  .inv-sticky b { font-weight: 800; }
  .inv-sticky span:not(.dot) { opacity: .85; white-space: nowrap; }
  .inv-sticky .num { margin-left: auto; font-weight: 800; opacity: 1 !important; }
  .inv-sticky svg { width: 16px; height: 16px; flex: none; transform: rotate(90deg); opacity: .8; }
  body:has(.inv-sticky) .fab { display: none; }
  .ig-body, .inv-fin { grid-template-columns: 1fr 1fr; gap: 10px; }
  .iv-big { grid-template-columns: 1fr 1fr; }
  .inv-kpis { grid-template-columns: 1fr 1fr; }
  .inv-what { grid-template-columns: 1fr 1fr; }
  .inv-actions .btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
}
@media (max-width: 420px) {
  .inv-sticky span:not(.dot):not(.num) { display: none; }
  .inv-sticky b + span { display: inline !important; }
}
/* Comisión */
.inv-com { border-radius: 24px; padding: 22px; color: #fff; background: linear-gradient(135deg, #2B6175 0%, #1C4352 55%, #122E39 100%); position: relative; overflow: hidden; box-shadow: 0 24px 48px -24px rgba(15,23,42,.55); }
.inv-com::after { content: ""; position: absolute; width: 240px; height: 240px; right: -80px; bottom: -120px; border-radius: 50%; background: rgba(212,163,64,.35); filter: blur(50px); pointer-events: none; }
.inv-com > * { position: relative; z-index: 1; }
.ic-l { font-size: 12.5px; font-weight: 700; opacity: .8; text-transform: uppercase; letter-spacing: .1em; }
.ic-big { display: block; font-family: var(--display, inherit); font-weight: 600; font-size: clamp(38px, 6vw, 54px); line-height: 1.05; margin: 4px 0 14px; color: #F6D88E; }
.ic-rows { display: flex; flex-direction: column; gap: 6px; }
.ic-rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.12); }
.ic-rows div.tot { font-weight: 800; }
.ic-goal { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; background: rgba(255,255,255,.1); border-radius: 16px; padding: 12px 14px; font-size: 14px; }
.ic-goal svg { width: 20px; height: 20px; color: #F6D88E; flex: none; }
#comForm { padding: 18px; display: flex; flex-direction: column; gap: 14px; }

/* ---- Ajustes: tu plan ---- */
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan-head h2 { margin: 0; }
.plan-count { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.plan-count b { color: var(--ink); font-size: 15px; }
.plan-bar { height: 6px; border-radius: 99px; background: var(--surface-2); margin: 10px 0 14px; overflow: hidden; border: 1px solid var(--hair, var(--line)); }
.plan-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #3FA5B0, var(--gold)); }
.mod-grid { display: flex; flex-direction: column; gap: 8px; }
.mod-card { border: 1px solid var(--hair, var(--line)); border-radius: 18px; background: color-mix(in srgb, var(--surface) 70%, transparent); transition: border-color .2s, box-shadow .2s, transform .2s, background .2s; }
.mod-card summary, button.mod-card { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; width: 100%; font: inherit; color: inherit; text-align: left; }
.mod-card summary::-webkit-details-marker { display: none; }
.mod-card:hover { border-color: var(--ring-gold, var(--gold)); box-shadow: var(--lift, var(--shadow)); }
.mod-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--hair, var(--line)); }
.mod-ic svg { width: 20px; height: 20px; }
.mod-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mod-t b { font-size: 14.5px; font-weight: 750; }
.mod-t small { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.mod-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 99px; white-space: nowrap; flex: none; background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--hair, var(--line)); }
.mod-badge svg { width: 13px; height: 13px; }
.mod-card.on, .mod-card.core { background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 9%, var(--surface)), color-mix(in srgb, var(--gold) 6%, var(--surface))); border-color: color-mix(in srgb, var(--teal) 30%, transparent); }
.mod-card.on .mod-ic, .mod-card.core .mod-ic { background: linear-gradient(135deg, #3FA5B0, #2B6175); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px rgba(43,97,117,.7); }
.mod-card.on .mod-badge, .mod-card.core .mod-badge { background: var(--green-soft); color: var(--green); border-color: transparent; }
.mod-card.avail .mod-badge { background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 65%, var(--ink)); border-color: transparent; }
.mod-card.soon { opacity: .9; }
.mod-body { padding: 0 14px 14px 66px; }
.mod-body ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.mod-body li { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); }
.mod-body li svg { width: 14px; height: 14px; color: var(--pos, var(--green)); flex: none; }
.mod-card[open] { box-shadow: var(--lift, var(--shadow)); }
button.mod-card.custom { border: 1.5px dashed color-mix(in srgb, var(--gold) 60%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 10%, transparent), color-mix(in srgb, var(--teal) 6%, transparent)); border-radius: 18px; }
button.mod-card.custom .mod-ic { background: linear-gradient(135deg, #E4BB5C, #C08E2F); color: #1E1705; border-color: transparent; }
button.mod-card.custom .mod-badge { background: linear-gradient(180deg, #E4BB5C, #C8952F); color: #1E1705; border-color: transparent; }
button.mod-card.custom:hover { transform: translateY(-1px); }
@media (max-width: 560px) {
  .mod-body { padding-left: 14px; }
  .mod-t small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---- Ajustes: acerca de VAIPA ---- */
.about-vaipa { text-align: center; }
.about-vaipa h2.section { justify-content: center; }
.about-logo { display: block; width: min(100%, 300px); margin: 4px auto 14px; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 40px -18px rgba(12,20,27,.6); transition: transform .25s, box-shadow .25s; }
.about-logo:hover { transform: translateY(-2px); box-shadow: 0 26px 50px -18px rgba(12,20,27,.7); }
.about-logo img { display: block; width: 100%; height: auto; }
/* v5.0.3 · los dos logos: VAIPA CRM (producto) y VAIPA (empresa) */
.about-logos { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 4px 0 16px; }
.about-logos .about-logo { margin: 0 auto; }
.about-logo-crm, .about-logo-co { width: min(100%, 300px); }   /* mismo tamaño y formato: se ven uniformes */
.about-by { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3, var(--ink-2)); }
.about-lead { font-size: 15px; margin: 0 0 8px; }
.about-text { font-size: 13.5px; color: var(--ink-2); margin: 0 auto 10px; max-width: 46ch; line-height: 1.55; }
.about-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0 14px; }
.about-tags span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; padding: 5px 10px; border-radius: 99px; background: color-mix(in srgb, #4FB8C2 12%, transparent); color: color-mix(in srgb, #2E95A1 75%, var(--ink)); border: 1px solid color-mix(in srgb, #4FB8C2 25%, transparent); }
.about-tags svg { width: 13px; height: 13px; }
.about-cta { display: inline-flex; gap: 8px; }
.about-cta svg { width: 16px; height: 16px; }
.about-note { display: flex; gap: 6px; align-items: center; justify-content: center; margin: 14px 0 0; }
.about-note svg { width: 14px; height: 14px; flex: none; }
.fb-panel h2 svg { width: 17px; height: 17px; color: var(--gold); }

/* ---- Ventana de sugerencias ---- */
.fb { display: flex; flex-direction: column; gap: 14px; }
.fb-lead { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, #4FB8C2 10%, transparent); font-size: 13.5px; }
.fb-lead svg { width: 20px; height: 20px; color: #2E95A1; flex: none; }
.fb-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fb-kinds button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; transition: border-color .15s, background .15s; }
.fb-kinds button svg { width: 20px; height: 20px; }
.fb-kinds button[aria-checked="true"] { border-color: var(--gold); background: var(--gold-soft); color: var(--ink); }
.fb textarea { width: 100%; resize: vertical; min-height: 110px; }
.fb-count { margin: -6px 0 0; text-align: right; }

/* ---- Imprimir el análisis ---- */
@media print {
  .rail, .topbar, .tabbar, .fab, .inv-sticky, .mia-fab, .mia-peek, .inv-bar, .inv-mode, .inv-actions, .inv-tabs, #visitChip, .toasts { display: none !important; }
  .shell { display: block; }
  html.modern body, html.modern body::before { background: #fff !important; }
  .inv-layout { grid-template-columns: 1fr 1.3fr; }
  .inv-group { break-inside: avoid; }
  .inv-group:not([open]) .ig-body { display: grid !important; }
  .inv-card, .inv-k, .inv-verdict { break-inside: avoid; box-shadow: none !important; }
  .inv-verdict, .inv-com { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
h2.section > svg { width: 17px; height: 17px; color: var(--gold); flex: none; align-self: center; }
.rail-duo { display: contents; }
.rail-duo .rail-news { padding: 8px 12px; gap: 10px; font-size: 13.5px; }
/* Barra de años: pista clara y botón dorado */
.inv-horizon input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; }
.inv-horizon input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--gold) 0 var(--p, 14%), var(--surface-2) var(--p, 14%)); border: 1px solid var(--hair, var(--line)); }
.inv-horizon input[type=range]::-moz-range-track { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--hair, var(--line)); }
.inv-horizon input[type=range]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--gold); }
.inv-horizon input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; margin-top: -9px; background: radial-gradient(circle at 35% 30%, #F3D27F, #C8952F); border: 3px solid var(--surface); box-shadow: 0 4px 12px rgba(150,110,20,.45); cursor: grab; }
.inv-horizon input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F3D27F, #C8952F); border: 3px solid var(--surface); box-shadow: 0 4px 12px rgba(150,110,20,.45); cursor: grab; }
/* Celular: nada se sale de la pantalla (los grupos de botones bajan de línea) */
@media (max-width: 1000px) { .cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .panel .seg { flex-wrap: wrap; max-width: 100%; } .panel .seg button { flex: 1 1 auto; } }
@media (max-width: 860px) {
  .topbar .brand { flex: 1 1 auto; min-width: 0; overflow: hidden; }
  .topbar .brand > div { min-width: 0; }
  .topbar .brand b { max-width: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar > .row { flex: none; gap: 5px !important; }
}
@media (max-width: 1000px) {
  .inv-sticky { top: calc(62px + env(safe-area-inset-top)); bottom: auto; transition: opacity .2s, transform .2s; }
  .inv-sticky.away { opacity: 0; transform: translateY(-8px); pointer-events: none; }
  .inv-sticky svg { transform: rotate(90deg); }
  body:has(.inv-sticky) .fab { display: inline-flex; }
}
@media (min-width: 861px) and (max-width: 1000px) { .inv-sticky { top: 12px; } }

/* ================= v4.9 · Redes sociales ================= */
#rsTab button { display: inline-flex; align-items: center; gap: 7px; }
#rsTab svg { width: 16px; height: 16px; }
.rs-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 22px; }
.rs-empty > svg { width: 38px; height: 38px; color: var(--gold); }
.rs-empty b { font-size: 16px; }
.rs-empty span { color: var(--ink-2); max-width: 46ch; }
.rs-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.rs-card { flex: 0 0 auto; width: 230px; display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 18px; border: 1.5px solid var(--hair, var(--line)); background: var(--glass, var(--surface)); cursor: pointer; text-align: left; font: inherit; color: inherit; scroll-snap-align: start; transition: border-color .15s, box-shadow .15s, transform .15s; box-shadow: var(--lift, var(--shadow-sm)); }
.rs-card:hover { transform: translateY(-1px); }
.rs-card.on { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent), var(--lift, var(--shadow-sm)); }
.rs-thumb { position: relative; width: 64px; height: 64px; border-radius: 13px; overflow: hidden; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.rs-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rs-thumb svg { width: 24px; height: 24px; }
.rs-rib { position: absolute; left: 0; right: 0; bottom: 0; font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-align: center; padding: 2px 0; background: #D4A340; color: #1E1705; }
.rs-rib.alquilada { background: #fff; color: #1E4250; }
.rs-meta { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.rs-meta b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-meta small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-days { display: inline-flex; align-items: center; gap: 4px; color: color-mix(in srgb, var(--gold) 70%, var(--ink)) !important; font-weight: 700; }
.rs-days svg { width: 12px; height: 12px; }
.rs-studio { display: grid; grid-template-columns: minmax(260px, 430px) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .rs-studio { grid-template-columns: 1fr; } }
.rs-preview { position: sticky; top: 18px; }
@media (max-width: 900px) { .rs-preview { position: static; } }
.rs-frame { position: relative; border-radius: 22px; overflow: hidden; background: linear-gradient(135deg, var(--surface-2), color-mix(in srgb, var(--teal) 10%, var(--surface-2))); box-shadow: 0 30px 60px -28px rgba(15,23,42,.55); aspect-ratio: 4 / 5; margin: 0 auto; }
.rs-preview.story .rs-frame { aspect-ratio: 9 / 16; max-width: 340px; }
.rs-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .25s; }
.rs-frame.loading img { opacity: .35; }
.rs-load { position: absolute; inset: auto 0 18px; margin: auto; width: max-content; display: none; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px; background: rgba(15,23,42,.75); color: #fff; font-size: 12.5px; font-weight: 700; }
.rs-load svg { width: 14px; height: 14px; }
.rs-frame.loading .rs-load { display: inline-flex; }
.rs-note { display: flex; gap: 6px; align-items: center; justify-content: center; margin: 10px 0 0; }
.rs-note svg { width: 14px; height: 14px; flex: none; }
.rs-controls { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rs-controls .panel + .panel { margin-top: 0; }
.rs-controls .panel { display: flex; flex-direction: column; gap: 14px; }
.rs-seg button { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 7px 16px; }
.rs-seg small { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.rs-styles { display: flex; gap: 8px; flex-wrap: wrap; }
.rs-sw { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.rs-sw i { width: 34px; height: 22px; border-radius: 7px; display: block; position: relative; overflow: hidden; }
.rs-sw.oscuro i { background: #142228; } .rs-sw.oscuro i::after { content: ""; position: absolute; inset: 8px 4px; background: #E7C26A; border-radius: 2px; }
.rs-sw.blanco i { background: #fff; border: 1px solid var(--line-strong); } .rs-sw.blanco i::after { content: ""; position: absolute; inset: 8px 4px; background: #1E4250; border-radius: 2px; }
.rs-sw.marca i { background: var(--rail, #1E4250); } .rs-sw.marca i::after { content: ""; position: absolute; inset: 8px 4px; background: #fff; border-radius: 2px; }
.rs-sw[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); color: var(--ink); }
.rs-caption textarea { width: 100%; resize: vertical; min-height: 180px; border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--surface-2) 85%, transparent); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.5; }
.rs-caption textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212,163,64,.16); }
.rs-cap-h { display: flex; gap: 10px; align-items: center; }
.rs-cap-h > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rs-cap-h b { font-size: 14px; }
.rs-cap-h small { font-size: 12px; color: var(--ink-3); }
.rs-mia { width: 40px; height: 40px; flex: none; }
.rs-mia svg { width: 100%; height: 100%; }
.rs-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rs-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.rs-actions .btn.gold { flex: 1 1 220px; justify-content: center; font-size: 15px; padding: 13px 18px; }
.rs-tip { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.rs-tip svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.rs-count { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rs-count div { border-radius: 16px; padding: 12px 14px; background: color-mix(in srgb, var(--gold) 9%, transparent); border: 1px solid var(--hair, var(--line)); display: flex; flex-direction: column; }
.rs-count b { font-family: var(--display, inherit); font-size: 30px; font-weight: 600; line-height: 1.1; }
.rs-count span { font-size: 12.5px; color: var(--ink-2); font-weight: 650; }
@media (max-width: 560px) {
  .rs-card { width: 200px; }
  .rs-actions .btn:not(.gold) { flex: 1 1 calc(50% - 8px); justify-content: center; }
}

/* ---------- v5.0: calculadora de intereses ---------- */
.loan-hero { border-radius: 24px; padding: 22px 24px; color: #fff; position: relative; overflow: hidden; background: linear-gradient(135deg, #2B6175 0%, #1F4A5A 60%, #163641 100%); box-shadow: 0 24px 48px -24px rgba(15,23,42,.5); display: flex; flex-direction: column; gap: 4px; }
.loan-hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -120px; border-radius: 50%; background: rgba(255,255,255,.12); filter: blur(30px); pointer-events: none; }
.loan-hero > * { position: relative; z-index: 1; }
.lh-l { font-size: 12.5px; font-weight: 700; opacity: .82; letter-spacing: .03em; text-transform: uppercase; }
.lh-big { font-family: var(--display, inherit); font-size: clamp(36px, 6vw, 52px); font-weight: 600; line-height: 1.05; letter-spacing: -.01em; }
.lh-s { font-size: 13.5px; opacity: .88; }
.lh-note { margin: 10px 0 0; font-size: 13.5px; opacity: .95; }
.loan-split { display: flex; height: 12px; border-radius: 99px; overflow: hidden; margin-top: 14px; background: rgba(255,255,255,.18); }
.loan-split i { display: block; height: 100%; }
.loan-split-l { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; font-weight: 650; margin-top: 8px; opacity: .95; }
.loan-split-l i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lc-p { fill: var(--teal); background: #6FC3D8; }
.lc-i { fill: var(--gold); background: #E8B84E; }
.lc-o { background: #C9D3D8; }
.inv-legend i.lc-p, .inv-legend i.lc-i { height: 10px; width: 10px; border-radius: 3px; vertical-align: -1px; }
.inv-legend i.lc-p { background: var(--teal); } .inv-legend i.lc-i { background: var(--gold); }
.ln-down { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ln-chips { margin-top: -2px; }
.ln-chips button { font-size: 12.5px; padding: 5px 10px; }
.loan-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.loan-t th { text-align: right; font-size: 11.5px; color: var(--ink-3); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--hair, var(--line)); }
.loan-t td { text-align: right; padding: 8px; border-bottom: 1px solid var(--hair, var(--line)); white-space: nowrap; }
.loan-t th:first-child, .loan-t td:first-child { text-align: left; }
.loan-t tr[data-years] { cursor: pointer; }
.loan-t tr[data-years]:hover td, .loan-t tr[data-years]:focus-visible td { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.loan-t tr.cur td { font-weight: 800; background: color-mix(in srgb, var(--teal) 10%, transparent); }
.loan-extra p { margin: 0; font-size: 14px; }
.loan-extra.soft { border-style: dashed; }
.pos { color: var(--pos, var(--green)); }
.inv-cmp table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.inv-cmp th { text-align: right; font-size: 12px; color: var(--ink-3); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--hair, var(--line)); }
.inv-cmp th.me { color: var(--teal); }
.inv-cmp td { text-align: right; padding: 8px; border-bottom: 1px solid var(--hair, var(--line)); white-space: nowrap; }
.inv-cmp th:first-child, .inv-cmp td:first-child { text-align: left; white-space: normal; }
.inv-cmp p { margin: 10px 0; }
.inv-cmp .btn { margin-top: 2px; }
@media (max-width: 520px) { .ln-down { grid-template-columns: 1fr; } .loan-hero { padding: 18px; } }
.ig-body > [data-by], .ig-body > .ln-chips { grid-column: 1 / -1; }
.ig-body > [data-by][hidden] { display: none; }
[data-by] > .inv-f { margin-bottom: 0; }
.ln-chips { display: flex; }

/* ---------- v5.1: uso del plan ---------- */
.plan-usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 18px; margin: 12px 0 4px; }
.plan-usage .pu-t { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 5px; }
.plan-usage .pu-t b { color: var(--ink); }
.plan-usage .plan-bar { margin: 0; }
.plan-bar.hot i { background: linear-gradient(90deg, #E0A33A, #D4573F); }

/* =====================================================================
   v5.0.9 · Entrada con la paleta del logo de VAIPA CRM: azul noche, dorado y blanco.
   (Solo la pantalla de entrada; dentro de la app cada cuenta conserva su color.)
   ===================================================================== */
.lg2 {
  --lg-gold: #9A7A12; --lg-gold-2: #7E6209;
  --lg-ink: #14202A; --lg-ink-2: #4A5660; --lg-ink-3: #86909A;
  --lg-field-line: #D8D0B8; --lg-line: #E1DAC6;
  background: #06131B;
}
.lg2[data-lt="dark"] {
  --lg-gold: #D4AF37; --lg-gold-2: #E3C25A;
  --lg-card: rgba(9,24,34,.9); --lg-form-bg: rgba(9,24,34,.45);
  --lg-ink: #F6F2E7; --lg-ink-2: #AEB8BE; --lg-ink-3: #7C8A93;
  --lg-field: rgba(18,34,46,.72); --lg-field-line: #2C4150; --lg-line: #1B2C38;
}
.lg2[data-lt="light"] { background: #EFEBDD; }
.lg2-brand { background: linear-gradient(135deg, #0C202B 0%, #06131B 100%); }
.lg2-brand .g1 { background: rgba(212,175,55,.26); }
.lg2-brand .g2 { background: rgba(255,255,255,.07); }
.lg2-logo small, .lg2-pill { color: #E8CF73; }
.lg2-pill { background: rgba(212,175,55,.10); border-color: rgba(212,175,55,.28); }
.lg2-pill i { background: #D4AF37; }
.lg2-hero li svg { color: #D4AF37; }
.lg2-hero p { color: #C3CBD0; }
.lg2-brand footer button:hover { color: #E8CF73; }
.lg2-submit { background: linear-gradient(90deg, #E8CF73, #C79A24); color: #1A1405; box-shadow: 0 12px 28px rgba(212,175,55,.28); }
.lg2-submit:hover { box-shadow: 0 14px 34px rgba(212,175,55,.42); }
.lg2-link { color: #8A6A0E; }
.lg2[data-lt="dark"] .lg2-link { color: #E3C25A; }
.lg2-field input:focus { border-color: var(--lg-gold); box-shadow: 0 0 0 4px rgba(212,175,55,.24); }
.lg2-check input { accent-color: #C79A24; }
.lg2[data-lt="light"] .lg2-theme { color: #8A6A0E; }
.lg2[data-lt="dark"] .lg2-theme { color: #E3C25A; }
/* Logo de VAIPA CRM un poco más grande */
.lg2-logo .lg2-crm { width: 300px; }
@media (max-width: 420px) { .lg2-logo .lg2-crm { width: 240px; } }
