/* AIon CRM — estilos de la demo. El color del cliente entra por --brand
   (lo pone app.js) y todo lo demás se deriva de ahí con color-mix. */
:root {
  --brand: #1F6F5C;
  --brand-ink: color-mix(in oklab, var(--brand) 82%, black);
  --brand-soft: color-mix(in oklab, var(--brand) 10%, white);
  --brand-line: color-mix(in oklab, var(--brand) 28%, white);
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --ink: #14161A;
  --ink-2: #3A3F47;
  --mute: #6B717B;
  --line: #E6E8EC;
  --line-2: #D9DCE2;
  --ok: #17803D;
  --danger: #C2312F;
  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .22);
  --side-w: 248px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
.muted { color: var(--mute); }
.empty { color: var(--mute); padding: 6px 0; margin: 0; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.side {
  width: var(--side-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh; height: 100dvh;
  background: #101216; color: #C9CDD4; display: flex; flex-direction: column; padding: 18px 14px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 6px 16px -6px var(--brand);
}
.brand-mark.has-logo { background: #fff; overflow: hidden; }
.brand-mark.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text b { color: #fff; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #7D838D; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-right: -6px; padding-right: 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; font-weight: 500; transition: background .2s, color .2s; position: relative; }
.nav-link:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-link.is-active { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-link.is-active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-link.is-active .ic { color: color-mix(in oklab, var(--brand) 55%, white); }
.nav-sep { height: 1px; background: rgba(255, 255, 255, .07); margin: 10px 4px; }
.side-foot { margin-top: auto; padding: 12px 8px 2px; border-top: 1px solid rgba(255, 255, 255, .07); }
.powered { font-size: 12px; color: #7D838D; }
.powered b { color: #C9CDD4; font-weight: 600; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 28px;
  background: rgba(245, 246, 248, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.top .menu-btn { display: none; }
.top-search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 9px; background: var(--card); border: 1px solid var(--line); color: var(--mute); transition: border-color .2s, box-shadow .2s; }
.top-search:focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }
.top-search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--ink); }
.search-ic { display: flex; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.demo-switch { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 4px 0 12px; border-radius: 9px; background: var(--card); border: 1px solid var(--line); }
.demo-switch span { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); }
.demo-switch select { border: 0; background: transparent; font-weight: 500; padding: 6px 4px; outline: 0; cursor: pointer; }
.me { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #1C1F25; color: #fff; font-size: 12px; font-weight: 600; }

.view { padding: 28px; max-width: 1440px; width: 100%; }
.fade-in { animation: fadeIn .35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- encabezado de página ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 24px; font-weight: 650; }
.page-sub { margin: 4px 0 0; color: var(--mute); }
.page-sub b { color: var(--ink); font-weight: 600; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid transparent; font-weight: 550; cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, transform .15s, box-shadow .2s; }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .12), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost { background: var(--card); border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { border-color: #C3C8D0; background: #FAFBFC; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: color-mix(in oklab, var(--danger) 30%, white); }
.btn-danger-ghost:hover { background: color-mix(in oklab, var(--danger) 7%, white); }
.btn-wa { background: #1FA855; color: #fff; }
.btn-wa:hover { background: #178C46; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn-icon { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; color: var(--ink-2); transition: background .2s; }
.btn-icon:hover { background: #F1F3F5; }
.link { color: var(--brand-ink); font-weight: 550; font-size: 13px; }
.link:hover { text-decoration: underline; }

/* ---------- tarjetas ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { font-size: 15px; font-weight: 600; }
.card-head .muted { font-size: 12.5px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { color: var(--mute); font-weight: 500; font-size: 13px; }
.kpi-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.kpi-ic .ic { width: 16px; height: 16px; }
.kpi-val { font-size: 28px; font-weight: 650; letter-spacing: -.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12.5px; color: var(--mute); }

.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; margin-bottom: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* gráfico */
.chart { width: 100%; height: auto; display: block; }
.chart .grid line { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .bar rect { fill: color-mix(in oklab, var(--brand) 22%, white); transition: fill .2s; }
.chart .bar.is-last rect, .chart .bar:hover rect { fill: var(--brand); }
.chart .bar-val { font-size: 11px; font-weight: 600; fill: var(--ink-2); }
.chart .bar-lbl { font-size: 11.5px; fill: var(--mute); }

/* embudo */
.funnel { display: flex; flex-direction: column; gap: 13px; }
.funnel-row { display: grid; grid-template-columns: 1fr 72px; grid-template-areas: "label val" "bar bar"; gap: 6px 10px; }
.funnel-label { grid-area: label; display: flex; gap: 8px; font-weight: 500; }
.funnel-val { grid-area: val; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.funnel-bar { grid-area: bar; height: 8px; border-radius: 99px; background: #EEF0F3; overflow: hidden; }
.funnel-bar span { display: block; height: 100%; border-radius: 99px; background: var(--brand); }

/* listas */
.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; margin: 0 -8px; border-radius: 9px; cursor: pointer; transition: background .15s; }
.list-row:hover { background: #F5F6F8; }
.list-main { min-width: 0; }
.list-title { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .muted { font-size: 12.5px; }
.date-chip { width: 42px; height: 42px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1.05; }
.date-chip b { font-size: 16px; }
.date-chip span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

.avatar { --h: 200; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; font-size: 11.5px; font-weight: 650; color: hsl(var(--h) 45% 30%); background: hsl(var(--h) 60% 92%); }
.avatar-lg { width: 52px; height: 52px; font-size: 17px; }

/* tareas */
.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.task { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; cursor: pointer; }
.task input { position: absolute; opacity: 0; pointer-events: none; }
.task-box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; color: transparent; transition: background .2s, border-color .2s; }
.task-box .ic { width: 12px; height: 12px; stroke-width: 2.6; }
.task input:checked + .task-box { background: var(--brand); border-color: var(--brand); color: #fff; }
.task input:focus-visible + .task-box { box-shadow: 0 0 0 3px var(--brand-soft); }
.task.is-done span:last-child { color: var(--mute); text-decoration: line-through; }
.task-add { display: flex; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.task-add input { flex: 1; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; outline: 0; }
.task-add input:focus { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- pipeline ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(208px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: #ECEEF1; border-radius: var(--r); padding: 12px; min-height: 420px; transition: background .2s, box-shadow .2s; }
.col.is-over { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand-line); }
.col-head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.col-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.col-won .col-dot { opacity: 1 !important; background: var(--ok); }
.col-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-count { font-size: 12px; color: var(--mute); background: rgba(255, 255, 255, .8); padding: 1px 8px; border-radius: 99px; }
.col-sum { font-size: 12.5px; color: var(--mute); margin: 3px 0 12px 16px; font-variant-numeric: tabular-nums; }
.col-body { display: flex; flex-direction: column; gap: 8px; }
.col-empty { border: 1.5px dashed var(--line-2); border-radius: 10px; padding: 22px; text-align: center; color: var(--mute); font-size: 13px; }
.deal { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; box-shadow: var(--shadow); cursor: grab; transition: box-shadow .2s, transform .2s, opacity .2s; }
.deal:hover { box-shadow: 0 6px 16px -6px rgba(16, 24, 40, .18); transform: translateY(-1px); }
.deal.is-drag { opacity: .4; }
.deal-title { font-weight: 600; margin-bottom: 9px; }
.deal-meta { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; }
.deal-meta .avatar { width: 24px; height: 24px; font-size: 9.5px; }
.deal-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
.deal-foot .muted { font-size: 12px; }
.col-won .deal-foot b { color: var(--ok); }

/* ---------- contactos ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 9px; background: var(--card); border: 1px solid var(--line); color: var(--mute); min-width: 280px; }
.search:focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }
.search input { border: 0; outline: 0; flex: 1; background: transparent; color: var(--ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-2); transition: all .15s; }
.chip:hover { border-color: #C3C8D0; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.table-card { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #FAFBFC; white-space: nowrap; }
.table td { padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { cursor: pointer; transition: background .15s; }
.table tbody tr:hover { background: #FAFBFC; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .muted { font-size: 12.5px; }
.cell-person { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.cell-person b { font-weight: 600; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 6px; background: #F0F2F5; color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.stage { display: inline-block; padding: 3px 9px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; font-weight: 600; white-space: nowrap; }

/* ---------- agenda ---------- */
.seg { display: flex; align-items: center; gap: 4px; }
.seg-label { height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); font-weight: 550; cursor: pointer; min-width: 132px; }
.cal { padding: 0; overflow: hidden; }
.cal-head, .cal-body { display: grid; grid-template-columns: 58px repeat(7, minmax(92px, 1fr)); }
.cal-head { border-bottom: 1px solid var(--line); background: #FAFBFC; }
.cal-day { padding: 10px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cal-day span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); font-weight: 600; }
.cal-day b { font-size: 18px; font-weight: 600; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.is-today b { background: var(--brand); color: #fff; }
.cal-day.is-today span { color: var(--brand-ink); }
.cal-body { max-height: 590px; overflow-y: auto; position: relative; }
.cal-hours { border-right: 1px solid var(--line); }
.cal-hour { height: 52px; position: relative; }
.cal-hour span { position: absolute; top: -8px; right: 8px; font-size: 11px; color: var(--mute); font-variant-numeric: tabular-nums; }
.cal-hour:first-child span { display: none; }
.cal-col { position: relative; border-right: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 52px; height: calc(52px * 13); }
.cal-col:last-child { border-right: 0; }
.cal-ev { position: absolute; left: 4px; right: 4px; border: 0; border-left: 3px solid var(--brand); border-radius: 6px; background: var(--brand-soft); color: var(--brand-ink); text-align: left; padding: 4px 7px; font-size: 12px; line-height: 1.3; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .15s; }
.cal-ev:hover { box-shadow: 0 6px 14px -6px rgba(16, 24, 40, .25); z-index: 2; }
.cal-ev b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.is-past { opacity: .55; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

/* ---------- catálogo ---------- */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s; }
.item:hover { box-shadow: 0 14px 30px -14px rgba(16, 24, 40, .25); transform: translateY(-2px); }
.item-cover { --h: 200; position: relative; height: 128px; display: grid; place-items: center; color: color-mix(in oklab, var(--brand) 70%, white);
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in oklab, var(--brand) 26%, white) 0%, transparent 55%), linear-gradient(135deg, var(--brand-soft), color-mix(in oklab, var(--brand) 16%, white)); }
.item-cover .ic { width: 44px; height: 44px; stroke-width: 1.3; }
.item-badge { position: absolute; top: 10px; left: 10px; background: rgba(255, 255, 255, .9); color: var(--ink); font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 6px; }
.item-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.item-body h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.item-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; }
.item-specs dt { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.item-specs dd { margin: 2px 0 0; font-weight: 550; font-size: 13px; }
.item-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.item-foot b { font-size: 15px; }
.item-foot .muted { font-size: 12px; }

/* ---------- configuración ---------- */
.cfg { display: flex; flex-direction: column; gap: 14px; }
.cfg-block { display: grid; grid-template-columns: 280px 1fr; gap: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px 24px; }
.cfg-intro h2 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.cfg-intro p { margin: 0; color: var(--mute); font-size: 13px; }
.cfg-fields { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cfg-fields.terms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.rubros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rubro { --c: #333; text-align: left; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 14px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; }
.rubro:hover { border-color: var(--line-2); background: #FAFBFC; }
.rubro.is-on { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in oklab, var(--c) 14%, white); }
.rubro-ic { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in oklab, var(--c) 11%, white); }
.rubro b { font-weight: 600; }
.rubro > span:last-child { color: var(--mute); font-size: 12.5px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
.field input, .field select, .field textarea, .stages-edit input, .note-add textarea {
  height: 38px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 11px; background: #fff; outline: 0; transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field textarea, .note-add textarea { height: auto; padding: 9px 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .stages-edit input:focus, .note-add textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field .is-error { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in oklab, var(--danger) 12%, white); }
.cfg-fields > .field { max-width: 420px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer; position: relative; transition: transform .15s; }
.swatch:hover { transform: scale(1.08); }
.swatch.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.swatch-custom { display: grid; place-items: center; background: conic-gradient(#e44, #ea4, #4c4, #4ae, #84e, #e44); color: #fff; overflow: hidden; }
.swatch-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swatch-custom .ic { width: 16px; height: 16px; stroke-width: 2.4; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.stages-edit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.stages-edit li { display: flex; align-items: center; gap: 10px; }
.stage-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; font-size: 12px; flex-shrink: 0; }
.stages-edit li:last-child .stage-n { background: color-mix(in oklab, var(--ok) 14%, white); color: var(--ok); }
.cfg-fields .btn-sm { align-self: flex-start; }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle > span:last-child { display: flex; flex-direction: column; }
.toggle .muted { font-size: 12.5px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-ui { width: 38px; height: 22px; border-radius: 99px; background: #D5D9DF; position: relative; flex-shrink: 0; transition: background .2s; }
.toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.toggle input:checked + .toggle-ui { background: var(--brand); }
.toggle input:checked + .toggle-ui::after { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-ui { box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- panel lateral ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; background: rgba(16, 18, 22, .32); opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer.is-open { opacity: 1; pointer-events: auto; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--card); box-shadow: var(--shadow-lg); padding: 24px; overflow-y: auto; transform: translateX(24px); transition: transform .35s var(--ease); }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.drawer-head h2 { font-size: 19px; font-weight: 650; }
.drawer-head p { margin: 2px 0 0; font-size: 13px; }
.drawer-close { margin-left: auto; align-self: flex-start; }
.quick { display: flex; gap: 8px; margin-bottom: 18px; }
.quick .btn { flex: 1; }
.kv { margin: 0 0 6px; display: grid; gap: 10px; padding: 14px; border-radius: 10px; background: #F7F8FA; }
.kv div { display: flex; justify-content: space-between; gap: 12px; }
.kv dt { color: var(--mute); }
.kv dd { margin: 0; font-weight: 550; text-align: right; word-break: break-all; }
.drawer-h { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); font-weight: 600; margin: 22px 0 10px; }
.mini-deal { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; font-variant-numeric: tabular-nums; transition: border-color .2s; }
.mini-deal:hover { border-color: var(--brand-line); }
.mini-deal div { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.mini-deal > span { font-weight: 600; white-space: nowrap; }
.mini-ev { display: flex; align-items: center; gap: 9px; padding: 8px 0; color: var(--ink-2); }
.mini-ev .ic { color: var(--brand-ink); width: 16px; height: 16px; }
.drawer .btn-sm { margin-top: 4px; }
.note-add { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.notes { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.notes li { padding: 11px 13px; border-radius: 10px; background: #FBF8EE; border: 1px solid #F0E8CF; }
.notes p { margin: 0 0 4px; }
.notes .muted { font-size: 12px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(16, 18, 22, .4); opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal-card { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--card); border-radius: 14px; box-shadow: var(--shadow-lg); transform: translateY(10px) scale(.98); transition: transform .3s var(--ease); }
.modal.is-open .modal-card { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
.modal-head h2 { font-size: 17px; font-weight: 650; }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid var(--line); }
.modal-foot > div { display: flex; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span-2 { grid-column: span 2; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 10px; background: #14161A; color: #fff; font-weight: 500; box-shadow: var(--shadow-lg); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .35s var(--ease), opacity .25s; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast .ic { color: #6EE7A0; width: 16px; height: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .cfg-block { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 860px) {
  .side { position: fixed; left: 0; z-index: 40; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .nav-open .side { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 35; background: rgba(16, 18, 22, .4); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .nav-open .scrim { opacity: 1; pointer-events: auto; }
  .top .menu-btn { display: inline-grid; }
  .top { padding: 0 16px; gap: 10px; }
  .demo-switch span, .me { display: none; }
  .top-search { min-width: 0; }
  .demo-switch { padding-left: 4px; }
  .demo-switch select { max-width: 132px; text-overflow: ellipsis; }
  .view { padding: 20px 16px; }
  .rubros, .cfg-fields.terms { grid-template-columns: 1fr; }
  .search { min-width: 0; flex: 1 1 100%; }
  .cal-head, .cal-body { grid-template-columns: 46px repeat(7, minmax(84px, 1fr)); }
  .cal { overflow-x: auto; }
  .cal-head, .cal-body { min-width: 640px; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi-val { font-size: 22px; }
  .page-head h1 { font-size: 21px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .top-search input::placeholder { color: transparent; }
  .quick { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =============================================================
   Módulos nuevos: barra superior del tablero, tareas, vendedores
   y contable. --task es el color de las tareas en el calendario.
   ============================================================= */
:root { --task: #B45309; --task-soft: #FEF3E2; --in: #17803D; --out: #C2312F; }

/* Tablero: la barra para correrse de costado va arriba y queda fija */
.board-scroll {
  position: sticky; top: 60px; z-index: 15; overflow-x: auto; overflow-y: hidden; height: 16px; margin: -6px 0 10px;
  background: var(--bg); scrollbar-color: #B8BEC7 #E4E7EB;
}
.board-scroll.is-off { display: none; }
.board-scroll-inner { height: 1px; }
.board-scroll::-webkit-scrollbar { height: 12px; }
.board-scroll::-webkit-scrollbar-track { background: #E4E7EB; border-radius: 99px; }
.board-scroll::-webkit-scrollbar-thumb { background: #B8BEC7; border-radius: 99px; border: 2px solid #E4E7EB; }
.board-scroll::-webkit-scrollbar-thumb:hover { background: #959CA7; }
.board { scrollbar-width: none; }
.board::-webkit-scrollbar { display: none; }
.deal-seller { font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: #F0F2F5; padding: 2px 8px; border-radius: 99px; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Leyenda */
.legend { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font-size: 12.5px; color: var(--mute); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.legend-ev { background: var(--brand); }
.legend-task { background: var(--task); }
.legend-in { background: var(--in); }
.legend-out { background: var(--out); }

/* Calendario: tareas */
.cal-task { background: var(--task-soft); border-left-color: var(--task); color: var(--task); }
.cal-task b { display: flex; align-items: center; gap: 4px; }
.cal-task .ic { width: 12px; height: 12px; stroke-width: 2.4; flex-shrink: 0; }
.cal-task.is-done { opacity: .5; }
.cal-task.is-done b { text-decoration: line-through; }
.cal-allday { display: grid; grid-template-columns: 58px repeat(7, minmax(92px, 1fr)); border-bottom: 1px solid var(--line); background: #FFFCF6; }
.cal-allday-label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--task); padding: 8px 6px; text-align: right; border-right: 1px solid var(--line); }
.cal-allday-col { padding: 5px 4px; display: flex; flex-direction: column; gap: 3px; border-right: 1px solid var(--line); min-width: 0; }
.cal-allday-col:last-child { border-right: 0; }
.cal-task-chip { display: flex; align-items: center; gap: 4px; border: 0; border-radius: 5px; padding: 3px 6px; background: var(--task-soft); color: var(--task); font-size: 11.5px; font-weight: 600; text-align: left; cursor: pointer; min-width: 0; box-shadow: inset 2px 0 0 var(--task); }
.cal-task-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-task-chip .ic { width: 11px; height: 11px; stroke-width: 2.6; flex-shrink: 0; }
.cal-task-chip.is-done { opacity: .5; text-decoration: line-through; }

/* Tareas */
.chip-n { display: inline-block; margin-left: 4px; font-size: 11.5px; opacity: .6; }
.task-groups { display: flex; flex-direction: column; gap: 14px; }
.task-group h2.is-late { color: var(--danger); }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-row { display: flex; align-items: flex-start; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.task-row:first-child { border-top: 0; padding-top: 2px; }
.tasks .task-row { padding: 7px 0; border-top: 0; }
.task-row .task { padding: 0; margin-top: 1px; }
.task-main { min-width: 0; flex: 1; }
.task-text { border: 0; background: none; padding: 0; text-align: left; font-weight: 550; cursor: pointer; color: var(--ink); line-height: 1.4; }
.task-text:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; }
.task-row.is-done .task-text { color: var(--mute); text-decoration: line-through; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 3px; font-size: 12.5px; color: var(--mute); }
.task-date, .task-who { display: inline-flex; align-items: center; gap: 5px; }
.task-date .ic, .task-who .ic { width: 13px; height: 13px; }
.task-date.is-late { color: var(--danger); font-weight: 600; }
.task-who .avatar { width: 18px; height: 18px; font-size: 8px; }
.task-who.is-link { cursor: pointer; }
.task-who.is-link:hover { color: var(--brand-ink); }
.form-hint { display: flex; align-items: center; gap: 7px; margin: 0; padding: 9px 11px; border-radius: 8px; background: var(--task-soft); color: var(--task); font-size: 12.5px; font-weight: 500; }
.form-hint .ic { width: 15px; height: 15px; }
.field small { font-weight: 400; color: var(--mute); }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

/* Vendedores */
.seg-tabs { display: inline-flex; padding: 3px; border-radius: 10px; background: #E9ECEF; }
.seg-tabs button { border: 0; background: none; height: 32px; padding: 0 12px; border-radius: 8px; font-weight: 550; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg-tabs button.is-on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.sellers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 14px; }
.seller { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.seller:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(16, 24, 40, .25); }
.seller.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.seller-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.seller-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.seller-name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seller-name .muted { font-size: 12.5px; }
.seller-rank { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: #92600A; background: #FDF2D0; padding: 4px 9px; border-radius: 99px; }
.seller-rank .ic { width: 14px; height: 14px; }
.seller-pos { font-size: 12px; font-weight: 700; color: var(--mute); background: #F0F2F5; padding: 4px 9px; border-radius: 99px; }
.seller-total { font-size: 26px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.seller-sub { font-size: 12.5px; margin-top: 2px; }
.goal { margin-top: 14px; }
.goal-bar { height: 7px; border-radius: 99px; background: #EEF0F3; overflow: hidden; }
.goal-bar span { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.goal-txt { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--mute); }
.goal-txt b { color: var(--ink); }
.seller-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.seller-stats dt { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.seller-stats dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.seller-edit { position: absolute; top: 18px; right: 64px; border: 0; background: none; color: var(--brand-ink); font-weight: 600; font-size: 12.5px; cursor: pointer; opacity: 0; transition: opacity .2s; }
.seller:hover .seller-edit, .seller.is-on .seller-edit, .seller-edit:focus-visible { opacity: 1; }
.card-head.pad { padding: 14px 18px 0; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
button.link { border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Contable */
.kpi.is-in .kpi-ic { background: color-mix(in oklab, var(--in) 12%, white); color: var(--in); }
.kpi.is-out .kpi-ic { background: color-mix(in oklab, var(--out) 11%, white); color: var(--out); }
.kpi.is-out .kpi-val { color: var(--out); }
.chart-conta .b-in { fill: var(--in); opacity: .85; }
.chart-conta .b-out { fill: var(--out); opacity: .7; }
.funnel-bar.is-out span { background: var(--out); opacity: .75; }
.amt-in { color: var(--in); }
.amt-out { color: var(--out); }
.estado { border: 0; cursor: pointer; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap; transition: filter .15s; }
.estado:hover { filter: brightness(.95); }
.estado.is-ok { background: color-mix(in oklab, var(--in) 12%, white); color: var(--in); }
.estado.is-warn { background: var(--task-soft); color: var(--task); }
.btn-icon-sm { width: 28px; height: 28px; border-color: transparent; background: transparent; color: var(--mute); }
.btn-icon-sm .ic { width: 15px; height: 15px; }
.btn-icon-sm:hover { background: color-mix(in oklab, var(--danger) 8%, white); color: var(--danger); }
@media (max-width: 860px) {
  .cal-allday { grid-template-columns: 46px repeat(7, minmax(84px, 1fr)); min-width: 640px; }
}
.cal-task b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-head, .cal-allday { overflow-y: hidden; scrollbar-gutter: stable; }
.cal-body { scrollbar-gutter: stable; }

/* Contable: pestañas Resumen / Movimientos / Mensuales */
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin: -6px 0 18px; overflow-x: auto; }
.subtab { position: relative; border: 0; background: none; padding: 10px 14px 12px; font-weight: 600; color: var(--mute); cursor: pointer; white-space: nowrap; transition: color .2s; }
.subtab:hover { color: var(--ink); }
.subtab.is-on { color: var(--ink); }
.subtab.is-on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 3px 3px 0 0; background: var(--brand); }
.form-card { margin-bottom: 14px; padding: 20px 22px 22px; }
.form-card .card-head { flex-wrap: wrap; gap: 4px 14px; margin-bottom: 16px; }
.form-card .card-head .muted { font-size: 12.5px; }
.form-grid-mov { gap: 14px 18px; }
.form-actions { display: flex; justify-content: flex-start; margin-top: 18px; }
.grid-even { grid-template-columns: 1fr 1fr; margin-top: 0; }
.date-chip.is-late { background: color-mix(in oklab, var(--danger) 10%, white); color: var(--danger); }
.late { color: var(--danger); font-weight: 600; }
.list-amt { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 10px; }
.mov-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.mov-ic .ic { width: 16px; height: 16px; }
.mov-ic.is-in { background: color-mix(in oklab, var(--in) 12%, white); color: var(--in); }
.mov-ic.is-out { background: color-mix(in oklab, var(--out) 10%, white); color: var(--out); }
.cell-sub { display: block; color: var(--mute); font-size: 12px; margin-top: 2px; }
.cell-clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tipo-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.tipo-dot.is-in { background: var(--in); }
.tipo-dot.is-out { background: var(--out); }
.mensual-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.mensual-sum > div:not(.mensual-bar) { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; border-right: 1px solid var(--line); }
.mensual-sum > div:nth-child(3) { border-right: 0; }
.mensual-sum b { font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mensual-sum .muted { font-size: 12.5px; }
.mensual-bar { grid-column: 1 / -1; height: 5px; background: color-mix(in oklab, var(--out) 14%, white); }
.mensual-bar span { display: block; height: 100%; background: var(--in); transition: width .5s var(--ease); }
@media (max-width: 860px) {
  .grid-even, .mensual-sum { grid-template-columns: 1fr; }
  .mensual-sum > div:not(.mensual-bar) { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* =============================================================
   Equipo: login, usuario arriba, Mi espacio y Mensajes
   ============================================================= */
:root { --me: #5B5BD6; --me-soft: #EEEEFD; }
.legend-me { background: var(--me); }

/* Login: pantalla completa por encima de todo */
.is-locked .app { visibility: hidden; }
.auth { position: fixed; inset: 0; z-index: 100; display: none; grid-template-columns: minmax(320px, 0.9fr) 1.1fr; background: var(--bg); overflow-y: auto; }
.auth.is-on { display: grid; }
.auth-brand { --b: #1F6F5C; position: relative; color: #fff; padding: 48px clamp(28px, 4vw, 64px); display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in oklab, var(--b) 70%, white) 0%, transparent 55%), linear-gradient(160deg, var(--b), color-mix(in oklab, var(--b) 55%, black)); }
.auth-brand-in { max-width: 420px; }
.auth-mark { width: 52px; height: 52px; font-size: 18px; border-radius: 14px; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.auth-brand h1 { font-size: clamp(28px, 3.2vw, 40px); font-weight: 700; letter-spacing: -.02em; margin: 22px 0 12px; }
.auth-brand p { margin: 0 0 26px; font-size: 15.5px; line-height: 1.55; color: rgba(255, 255, 255, .82); }
.auth-brand ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-brand li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.auth-brand li .ic { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(255, 255, 255, .16); stroke-width: 2.4; }
.auth-powered { position: absolute; left: clamp(28px, 4vw, 64px); bottom: 26px; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.auth-powered b { color: #fff; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; gap: 18px; }
.auth-card { width: min(560px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px -30px rgba(16, 24, 40, .35); padding: 30px 30px 28px; }
.auth-card.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.auth-title { font-size: 22px; font-weight: 650; }
.auth-sub { margin: 6px 0 22px; color: var(--mute); }
.auth-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.auth-user { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px 10px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.auth-user:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); transform: translateY(-2px); }
.auth-user .avatar { margin-bottom: 6px; }
.auth-user b { font-weight: 600; }
.auth-user span { font-size: 12.5px; color: var(--mute); line-height: 1.3; }
.auth-new { border-style: dashed; }
.auth-plus { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); margin-bottom: 6px; }
.auth-back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--mute); font-weight: 550; cursor: pointer; padding: 0; margin-bottom: 18px; }
.auth-back:hover { color: var(--ink); }
.auth-back .ic { width: 16px; height: 16px; }
.auth-who { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.auth-who h2 { font-size: 21px; font-weight: 650; }
.auth-who p { margin: 2px 0 0; color: var(--mute); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-error { margin: 0; padding: 10px 12px; border-radius: 9px; background: color-mix(in oklab, var(--danger) 9%, white); color: var(--danger); font-weight: 550; font-size: 13px; }
.btn-block { width: 100%; height: 44px; font-size: 15px; }
.auth-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; color: var(--mute); font-size: 13px; }
.auth-foot > span { display: inline-flex; align-items: center; gap: 6px; }
.auth-foot .ic { width: 15px; height: 15px; color: var(--brand); }
.auth-foot b { color: var(--ink); }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 30px 22px 54px; }
  .auth-brand ul, .auth-brand p { display: none; }
  .auth-brand h1 { margin: 14px 0 0; font-size: 26px; }
  .auth-powered { bottom: 16px; left: 22px; }
  .auth-panel { justify-content: flex-start; padding: 20px 14px 30px; }
  .auth-card { padding: 22px 18px; }
}

/* Usuario arriba a la derecha */
.me-wrap { position: relative; }
.me-btn { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.me-btn .avatar { width: 30px; height: 30px; font-size: 11px; }
.me-name { font-weight: 600; font-size: 13.5px; }
.me-chev { width: 14px; height: 14px; transform: rotate(90deg); color: var(--mute); }
.me-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 30; }
.me-wrap.is-open .me-menu { display: block; }
.me-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.me-head .avatar-lg { width: 42px; height: 42px; font-size: 14px; }
.me-head div { display: flex; flex-direction: column; min-width: 0; }
.me-head span { font-size: 12.5px; color: var(--mute); }
.me-menu a, .me-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; font-weight: 500; text-align: left; }
.me-menu a:hover, .me-menu button:hover { background: #F3F4F6; }
.me-menu button { color: var(--danger); }
.me-menu .ic { width: 16px; height: 16px; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
@media (max-width: 860px) { .me-name, .me-chev { display: none; } .me-btn { padding: 0 3px; } }

/* Agenda: eventos personales */
.cal-personal { background: var(--me-soft); border-left-color: var(--me); color: var(--me); }
.cal-personal span { color: color-mix(in oklab, var(--me) 70%, black); }
.cal-task-chip.is-me { background: var(--me-soft); color: var(--me); box-shadow: inset 2px 0 0 var(--me); }
.form-hint.is-me { background: var(--me-soft); color: var(--me); }

/* Mi espacio */
.yo-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.yo-hero-l { display: flex; align-items: center; gap: 16px; }
.yo-hero .avatar-lg { width: 60px; height: 60px; font-size: 20px; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line); }
.yo-hero h1 { font-size: 24px; font-weight: 650; }
.yo-hero p { margin: 3px 0 0; color: var(--mute); }
.yo-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; margin-bottom: 14px; }
.cap::first-letter { text-transform: uppercase; }
.seg-sm { min-width: 0; height: 34px; }
.mc-head, .mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.mc-head span { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; padding-bottom: 8px; }
.mc-grid { gap: 4px; }
.mc-day { aspect-ratio: 1 / .82; border: 0; border-radius: 10px; background: #F7F8FA; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 550; transition: background .15s, box-shadow .15s; }
.mc-day:hover { background: #EEF0F3; }
.mc-day.is-out { background: transparent; color: #B4B9C1; }
.mc-day.is-today span { color: var(--brand-ink); font-weight: 700; }
.mc-day.is-today { box-shadow: inset 0 0 0 1.5px var(--brand); }
.mc-day.is-sel { background: var(--ink); color: #fff; box-shadow: none; }
.mc-day.is-sel span { color: #fff; }
.mc-dots { display: flex; gap: 3px; height: 6px; }
.mc-dots b { width: 6px; height: 6px; border-radius: 50%; }
.dot-personal { background: var(--me); }
.dot-tarea { background: var(--task); }
.dot-evento { background: var(--brand); }
.mc-day.is-sel .mc-dots b { box-shadow: 0 0 0 1.5px var(--ink); }
.mc-legend { margin: 14px 0 0; }
.yo-day { display: flex; flex-direction: column; }
.day-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.day-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #F7F8FA; border-left: 3px solid var(--brand); }
.day-item.k-personal { border-left-color: var(--me); background: var(--me-soft); }
.day-item.k-tarea { border-left-color: var(--task); background: var(--task-soft); }
.day-item.is-done .day-main b { text-decoration: line-through; color: var(--mute); }
.day-hora { width: 44px; flex-shrink: 0; font-size: 12px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; line-height: 1.2; }
.day-main { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; }
.day-main b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-main span { font-size: 12.5px; color: var(--mute); }
.day-tag { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); }
.day-item .task { padding: 0; }
.day-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 30px 10px; color: var(--mute); text-align: center; }
.day-empty .ic { width: 26px; height: 26px; color: var(--me); }
.day-empty b { color: var(--ink); }
.day-add { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; flex-wrap: wrap; }
.yo-notas { width: 100%; min-height: 170px; resize: vertical; border: 1px solid #F0E8CF; border-radius: 10px; padding: 12px 14px; background: #FFFCF2; line-height: 1.55; outline: 0; }
.yo-notas:focus { border-color: #E3C98A; box-shadow: 0 0 0 3px #FBF1D6; }
.kv-plain { background: none; padding: 0; margin-bottom: 14px; }
@media (max-width: 1180px) { .yo-grid { grid-template-columns: 1fr; } }

/* =============================================================
   Mensajes — estilo propio del CRM (color de la marca del cliente)
   ============================================================= */
.view[data-vista="mensajes"] { padding: 16px; max-width: none; }
.ch { display: grid; grid-template-columns: minmax(290px, 340px) 1fr; height: calc(100vh - 60px - 32px); height: calc(100dvh - 60px - 32px);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.ch-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); background: #FBFBFC; }
.ch-side-head { display: flex; align-items: center; gap: 6px; padding: 18px 14px 12px 18px; }
.ch-side-head div { flex: 1; min-width: 0; }
.ch-side-head h2 { font-size: 19px; font-weight: 650; }
.ch-side-head span { font-size: 12.5px; color: var(--mute); }
.ch-icon { width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; display: grid; place-items: center; color: var(--ink-2); cursor: pointer; flex-shrink: 0; transition: background .15s; }
.ch-icon:hover { background: #EEF0F3; }
.ch-icon .ic { width: 19px; height: 19px; }
.ch-icon-brand { background: var(--brand); color: #fff; }
.ch-icon-brand:hover { background: var(--brand-ink); }
.ch-icon-sm { width: 28px; height: 28px; color: var(--mute); }
.ch-icon-sm:hover { background: color-mix(in oklab, var(--danger) 9%, white); color: var(--danger); }
.ch-search { padding: 4px 14px 10px; }
.ch-search label { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--mute); transition: border-color .2s, box-shadow .2s; }
.ch-search label:focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }
.ch-search .ic { width: 16px; height: 16px; }
.ch-search input { flex: 1; border: 0; outline: 0; background: none; min-width: 0; color: var(--ink); }
.ch-filters { display: flex; gap: 6px; padding: 0 14px 10px; }
.ch-filters .chip { height: 30px; font-size: 12.5px; }
.ch-list { flex: 1; overflow-y: auto; padding: 0 8px 10px; }
.ch-sec { padding: 14px 10px 6px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); }
.ch-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; transition: background .15s; }
.ch-row:hover { background: #F0F2F5; }
.ch-row.is-on { background: var(--brand-soft); }
.ch-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ch-row-main > b, .ch-row-top b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-row-main > span { font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-row-top, .ch-row-bot { display: flex; align-items: center; gap: 8px; }
.ch-row-top b { flex: 1; }
.ch-row-top time { font-size: 11.5px; color: var(--mute); flex-shrink: 0; text-transform: capitalize; }
.ch-row.is-unread .ch-row-top time { color: var(--brand-ink); font-weight: 650; }
.ch-row-bot span { flex: 1; min-width: 0; font-size: 13px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; }
.ch-row.is-unread .ch-row-bot span { color: var(--ink-2); font-weight: 500; }
.ch-row-bot em { color: var(--brand-ink); font-style: normal; font-weight: 600; }
.ch-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 11.5px; font-style: normal; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.ch-row-action b { color: var(--brand-ink); }
.ch-row-sm { padding: 8px; }
.ch-row.is-picked { background: var(--brand-soft); }
.ch-tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; flex-shrink: 0; transition: all .15s; }
.ch-tick .ic { width: 13px; height: 13px; stroke-width: 2.8; }
.ch-row.is-picked .ch-tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.ch-empty { color: var(--mute); text-align: center; padding: 26px 14px; margin: 0; font-size: 13px; }

/* Avatares de chat */
.ch-av { width: 42px; height: 42px; font-size: 14px; }
.ch-av-xl { width: 76px; height: 76px; font-size: 26px; }
.ch-av-group { --c: var(--brand); border-radius: 14px; background: var(--c); color: #fff; font-weight: 650; }
.ch-av-group.ch-av-xl { border-radius: 22px; }
.ch-av-group .ic { width: 22px; height: 22px; color: #fff; }
.ch-av-xl.ch-av-group .ic { width: 34px; height: 34px; }
.ch-av-new { border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink); }
.ch-av-new .ic { width: 20px; height: 20px; }

/* Paneles: nuevo chat / nuevo grupo */
.ch-panel-head { display: flex; align-items: center; gap: 8px; padding: 16px 14px 10px; }
.ch-panel-head b { font-size: 16px; font-weight: 650; }
.ch-steps { display: flex; align-items: center; gap: 6px; padding: 0 18px 12px; font-size: 12.5px; color: var(--mute); }
.ch-steps b, .ch-steps i { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; }
.ch-steps b { background: var(--brand); color: #fff; }
.ch-steps i { background: #E6E8EC; color: var(--mute); }
.ch-steps span { opacity: .5; }
.ch-picked { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.ch-pick { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 3px; border-radius: 99px; border: 0; background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.ch-pick .ch-av { width: 24px; height: 24px; font-size: 9px; }
.ch-pick .ic { width: 12px; height: 12px; stroke-width: 2.6; }
.ch-panel-foot { padding: 12px 14px 14px; border-top: 1px solid var(--line); background: #FBFBFC; }
.ch-panel-foot .btn[disabled] { opacity: .45; cursor: not-allowed; }
.ch-group-form { display: flex; flex-direction: column; gap: 14px; padding: 4px 18px 18px; overflow-y: auto; }
.ch-group-preview { display: flex; justify-content: center; padding: 6px 0 4px; }
.ch-members-mini { display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.ch-members-mini .ch-av { width: 30px; height: 30px; font-size: 10px; margin-right: -6px; box-shadow: 0 0 0 2px #FBFBFC; }
.ch-members-mini span { margin-left: 14px; font-size: 12.5px; color: var(--mute); }
.ch-form-row { display: flex; gap: 8px; justify-content: flex-end; }

/* Conversación */
.ch-main { position: relative; display: flex; min-width: 0; min-height: 0; background: #F6F7F9; }
.ch-conv { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ch-head { display: flex; align-items: center; gap: 8px; height: 66px; padding: 0 14px 0 10px; background: #fff; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.ch-head-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; cursor: pointer; padding: 6px; border-radius: 12px; }
.ch-head-who:hover { background: #F5F6F8; }
.ch-head-txt { display: flex; flex-direction: column; min-width: 0; }
.ch-head-txt b { font-weight: 650; font-size: 15px; }
.ch-head-txt span { font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-head-txt em { color: var(--brand-ink); font-style: normal; font-weight: 600; }
.ch-back { display: none; }
.ch-body { flex: 1; overflow-y: auto; padding: 18px clamp(14px, 4vw, 48px) 12px; display: flex; flex-direction: column;
  background-image: radial-gradient(color-mix(in oklab, var(--brand) 9%, transparent) 1px, transparent 1px); background-size: 22px 22px; }
.ch-day { display: flex; align-items: center; gap: 12px; margin: 16px 0 6px; color: var(--mute); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.ch-day::before, .ch-day::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.ch-sys { align-self: center; margin: 8px 0; padding: 5px 12px; border-radius: 99px; background: #E9ECF0; color: var(--ink-2); font-size: 12px; text-align: center; }
.ch-msg { display: flex; align-items: flex-end; gap: 8px; margin-top: 3px; }
.ch-msg.is-first { margin-top: 12px; }
.ch-msg.is-out { justify-content: flex-end; }
.ch-msg .ch-av { width: 30px; height: 30px; font-size: 10.5px; align-self: flex-start; }
.ch-av-gap { width: 30px; flex-shrink: 0; }
.ch-bubble { max-width: min(68%, 560px); padding: 9px 13px 7px; border-radius: 18px; background: #fff; border: 1px solid var(--line); font-size: 14px; line-height: 1.45; word-wrap: break-word; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.is-in.is-first .ch-bubble { border-top-left-radius: 6px; }
.is-out .ch-bubble { background: var(--brand); border-color: transparent; color: #fff; }
.is-out.is-first .ch-bubble { border-top-right-radius: 6px; }
.ch-author { display: block; font-size: 12.5px; font-weight: 650; margin-bottom: 2px; }
.ch-text { white-space: pre-wrap; }
.ch-meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 3px; font-size: 10.5px; color: var(--mute); }
.is-out .ch-meta { color: rgba(255, 255, 255, .72); }
.ch-check { width: 16px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.ch-check.is-read { opacity: 1; stroke: #fff; filter: drop-shadow(0 0 0 #fff); }
.is-out .ch-check.is-read { stroke-width: 2.1; }
.ch-row-bot .ch-check { color: var(--mute); stroke: var(--mute); }
.ch-row-bot .ch-check.is-read { stroke: var(--brand); opacity: 1; }
.ch-emojis { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 2px; padding: 10px 14px; background: #fff; border-top: 1px solid var(--line); max-height: 150px; overflow-y: auto; }
.ch-emojis[hidden] { display: none; }
.ch-emojis button { border: 0; background: none; font-size: 22px; height: 40px; border-radius: 10px; cursor: pointer; }
.ch-emojis button:hover { background: #F0F2F5; }
.ch-foot { display: flex; align-items: flex-end; gap: 10px; padding: 12px 16px 14px; background: #fff; border-top: 1px solid var(--line); flex-shrink: 0; }
.ch-compose { flex: 1; display: flex; align-items: flex-end; gap: 4px; padding: 3px 6px 3px 4px; border: 1px solid var(--line-2); border-radius: 22px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.ch-compose:focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }
.ch-compose .ch-icon { border-radius: 50%; color: var(--mute); }
.ch-input { flex: 1; resize: none; border: 0; outline: 0; padding: 8px 4px; background: none; font-size: 14.5px; line-height: 20px; max-height: 120px; min-height: 36px; }
.ch-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; box-shadow: 0 6px 16px -8px var(--brand); transition: transform .15s, background .2s; }
.ch-send:hover { background: var(--brand-ink); }
.ch-send:active { transform: scale(.94); }
.ch-send .ic { width: 20px; height: 20px; }
.ch-welcome { margin: auto; text-align: center; max-width: 420px; padding: 30px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ch-welcome-ic { width: 84px; height: 84px; border-radius: 26px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 8px; }
.ch-welcome-ic .ic { width: 40px; height: 40px; stroke-width: 1.5; }
.ch-welcome h2 { font-size: 22px; font-weight: 650; }
.ch-welcome p { margin: 0; color: var(--mute); line-height: 1.55; }
.ch-welcome-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; justify-content: center; }
.ch-lock { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 12.5px; color: var(--mute); }
.ch-lock .ic { width: 14px; height: 14px; color: var(--brand); }

/* Info del grupo / perfil */
.ch-info { width: 320px; flex-shrink: 0; border-left: 1px solid var(--line); background: #fff; overflow-y: auto; display: flex; flex-direction: column; }
.ch-info-head { display: flex; align-items: center; justify-content: space-between; height: 66px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.ch-info-head b { font-weight: 650; }
.ch-info-top { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 22px 18px 18px; border-bottom: 1px solid var(--line); }
.ch-info-top h3 { font-size: 18px; font-weight: 650; margin-top: 8px; }
.ch-info-top p { margin: 0; color: var(--mute); font-size: 13px; }
.ch-info-top .ch-info-desc { color: var(--ink-2); margin-top: 6px; }
.ch-info-top .btn { margin-top: 10px; }
.ch-info .ch-group-form { padding: 18px; border-bottom: 1px solid var(--line); }
.ch-info-sec { padding: 14px 10px; }
.ch-info-sec h4 { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); margin: 0 8px 6px; }
.ch-member { cursor: default; }
.ch-member:hover { background: none; }
.ch-admin { font-size: 11px; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); padding: 2px 8px; border-radius: 99px; }
.ch-info-foot { margin: auto 18px 8px; font-size: 12px; color: var(--mute); }
.ch-leave { display: flex; align-items: center; gap: 8px; margin: 8px 12px 16px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--danger); font-weight: 600; cursor: pointer; }
.ch-leave:hover { background: color-mix(in oklab, var(--danger) 7%, white); }
.ch-leave .ic { width: 16px; height: 16px; }

@media (max-width: 1100px) {
  .ch-info { position: absolute; right: 0; top: 0; bottom: 0; z-index: 5; box-shadow: var(--shadow-lg); }
}
@media (max-width: 860px) {
  .view[data-vista="mensajes"] { padding: 0; }
  .ch { grid-template-columns: 1fr; border-radius: 0; border: 0; height: calc(100vh - 61px); height: calc(100dvh - 61px); }
  .ch.has-chat:not(.has-panel) .ch-side { display: none; }
  .ch:not(.has-chat) .ch-main, .ch.has-panel .ch-main { display: none; }
  .ch-back { display: grid; }
  .ch-bubble { max-width: 82%; }
  .ch-body { padding: 12px; }
  .ch-info { width: 100%; }
}

/* Barra superior: que no se desborde con nombres largos de rubro o usuario */
.top-search { min-width: 0; flex: 1 1 160px; }
.top-right { min-width: 0; flex-shrink: 1; }
.demo-switch select { max-width: 180px; text-overflow: ellipsis; }
@media (max-width: 860px) { .demo-switch select { max-width: 120px; } .top-right { gap: 6px; } }
@media (max-width: 1100px) { .me-name { display: none; } }
@media (max-width: 520px) { .demo-switch select { max-width: 90px; } .top { gap: 8px; } }

/* Contable con contraseña */
.conta-lock { max-width: 440px; margin: 30px auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 32px 28px; }
.conta-lock h2 { font-size: 19px; font-weight: 650; margin-top: 6px; }
.conta-lock p { margin: 0 0 6px; }
.conta-lock-ic { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.conta-lock-ic .ic { width: 26px; height: 26px; }
.conta-lock-form { width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.conta-lock-err { margin: 0; padding: 8px 11px; border-radius: 8px; background: color-mix(in oklab, var(--danger) 9%, white); color: var(--danger); font-weight: 600; font-size: 13px; }
.card.shake { animation: shake .4s; }

/* =============================================================
   Mi espacio: agenda personal estilo Calendario del iPhone
   ============================================================= */
.ios-wrap { --ios-red: #FF3B30; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 14px; margin-bottom: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif; }
.ios-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 18px 14px; min-width: 0; }
.ios-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.ios-anio { color: var(--ios-red); font-weight: 600; font-size: 15px; }
.ios-titulo { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.ios-acts { display: flex; align-items: center; gap: 2px; }
.ios-link { border: 0; background: none; color: var(--ios-red); font-size: 16px; font-weight: 500; padding: 6px 8px; cursor: pointer; border-radius: 8px; }
.ios-ic { width: 34px; height: 34px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: var(--ios-red); cursor: pointer; }
.ios-ic:hover, .ios-link:hover { background: #FFF0EF; }
.ios-ic .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.ios-mas { background: var(--ios-red); color: #fff; margin-left: 6px; }
.ios-mas:hover { background: #E5352B; }
.ios-sem, .ios-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ios-sem span { text-align: center; font-size: 12px; font-weight: 600; color: #8E8E93; padding-bottom: 6px; }
.ios-grid { border-top: 1px solid #E5E5EA; }
.ios-d { border: 0; border-bottom: 1px solid #E5E5EA; background: none; padding: 6px 0 4px; min-height: 56px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font: inherit; color: #1C1C1E; }
.ios-d:hover .ios-n { background: #F2F2F7; }
.ios-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; font-weight: 400; transition: background .15s; }
.ios-d.is-out { color: #C7C7CC; }
.ios-d.is-hoy .ios-n { color: var(--ios-red); font-weight: 600; }
.ios-d.is-sel .ios-n { background: #1C1C1E; color: #fff; font-weight: 600; }
.ios-d.is-sel.is-hoy .ios-n { background: var(--ios-red); color: #fff; }
.ios-dots { display: flex; gap: 3px; height: 6px; }
.ios-dots i { width: 6px; height: 6px; border-radius: 50%; }
.ios-cals { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 12.5px; color: #636366; }
.ios-cals span { display: inline-flex; align-items: center; gap: 6px; }
.ios-cals i { width: 10px; height: 10px; border-radius: 50%; }
.ios-priv { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 12px; color: #8E8E93; }
.ios-priv .ic { width: 13px; height: 13px; }
.ios-dia { display: flex; flex-direction: column; padding-bottom: 0; }
.ios-tira { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; padding-bottom: 8px; border-bottom: 1px solid #E5E5EA; }
.ios-w { border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; color: #1C1C1E; padding: 2px 0; }
.ios-w small { font-size: 11px; color: #8E8E93; font-weight: 600; }
.ios-w span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; }
.ios-w.is-hoy span { color: var(--ios-red); font-weight: 600; }
.ios-w.is-sel span { background: #1C1C1E; color: #fff; font-weight: 600; }
.ios-w.is-sel.is-hoy span { background: var(--ios-red); }
.ios-fecha { text-align: center; font-size: 15px; font-weight: 600; padding: 10px 0; border-bottom: 1px solid #E5E5EA; }
.ios-fecha::first-letter { text-transform: uppercase; }
.ios-todo { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid #E5E5EA; align-items: start; }
.ios-todo > span { font-size: 10.5px; color: #8E8E93; text-align: right; padding-top: 6px; white-space: nowrap; }
.ios-todo > div { display: flex; flex-direction: column; gap: 3px; }
.ios-chip { border: 0; text-align: left; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; padding: 5px 9px; border-radius: 6px; background: color-mix(in srgb, var(--c) 18%, white); color: color-mix(in srgb, var(--c) 75%, black); }
.ios-chip.is-hecho, .ios-ev.is-hecho { opacity: .45; text-decoration: line-through; }
.ios-scroll { height: 430px; overflow-y: auto; margin: 0 -18px; padding: 8px 18px 14px; }
.ios-horario { position: relative; margin-left: 52px; }
.ios-h { position: absolute; left: 0; right: 0; border-top: 1px solid #E5E5EA; }
.ios-h span { position: absolute; left: -52px; top: -8px; width: 44px; text-align: right; font-size: 11px; color: #8E8E93; font-variant-numeric: tabular-nums; }
.ios-eventos { position: absolute; inset: 0; }
.ios-ev { position: absolute; border: 0; text-align: left; cursor: pointer; font: inherit; border-radius: 6px; padding: 4px 8px 4px 9px; overflow: hidden; display: flex; flex-direction: column; gap: 1px;
  background: color-mix(in srgb, var(--c) 18%, white); color: color-mix(in srgb, var(--c) 70%, black); box-shadow: inset 3px 0 0 var(--c); transition: filter .15s; }
.ios-ev:hover { filter: brightness(.97); z-index: 2; }
.ios-ev b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ios-ev span { font-size: 11.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ios-ev.is-corto { flex-direction: row; align-items: center; gap: 6px; padding-top: 2px; padding-bottom: 2px; }
.ios-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--ios-red); z-index: 3; }
.ios-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ios-red); }
.ios-now span { position: absolute; left: -52px; top: -8px; width: 44px; text-align: right; font-size: 11px; font-weight: 700; color: var(--ios-red); background: #fff; }
.ios-vacio { text-align: center; color: #8E8E93; font-size: 13px; margin: 0; padding: 0 0 14px; }

/* Ventana de evento estilo iPhone */
.modal-card.is-ios { background: #F2F2F7; width: min(460px, 100%); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif; }
.modal-card.is-ios .modal-head { padding-bottom: 6px; }
.modal-card.is-ios .modal-head h2 { font-size: 17px; font-weight: 600; width: 100%; text-align: center; }
.modal-card.is-ios .modal-foot { border-top: 0; background: #F2F2F7; }
.modal-card.is-ios .btn-primary { background: #FF3B30; }
.ios-form { display: flex; flex-direction: column; gap: 18px; }
.ios-g { background: #fff; border-radius: 12px; overflow: hidden; }
.ios-g > input, .ios-g > textarea { display: block; width: 100%; border: 0; border-bottom: 1px solid #E5E5EA; padding: 12px 14px; font: inherit; font-size: 16px; outline: 0; background: transparent; resize: vertical; }
.ios-g > :last-child { border-bottom: 0; }
.ios-g > input.is-error { box-shadow: inset 3px 0 0 #FF3B30; }
.ios-r { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 0 14px; border-bottom: 1px solid #E5E5EA; font-size: 16px; }
.ios-r[hidden] { display: none; }
.ios-r:last-child { border-bottom: 0; }
.ios-r input[type=date], .ios-r input[type=time], .ios-r select { border: 0; background: #F2F2F7; border-radius: 7px; padding: 6px 10px; font: inherit; font-size: 15px; color: #1C1C1E; outline: 0; }
.ios-r select { background: none; color: #8E8E93; text-align: right; cursor: pointer; }
.ios-sw { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 99px; background: #E9E9EB; position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.ios-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .25s; }
.ios-sw:checked { background: #34C759; }
.ios-sw:checked::after { transform: translateX(20px); }
.ios-calsel { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 12px; }
.ios-calsel label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; background: #F2F2F7; cursor: pointer; font-size: 14px; }
.ios-calsel input { position: absolute; opacity: 0; pointer-events: none; }
.ios-calsel i { width: 11px; height: 11px; border-radius: 50%; }
.ios-calsel label:has(input:checked) { background: #1C1C1E; color: #fff; }
@media (max-width: 1180px) { .ios-wrap { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .ios-card { padding: 14px 12px 12px; border-radius: 14px; }
  .ios-titulo { font-size: 26px; }
  .ios-d { min-height: 48px; }
  .ios-n { width: 30px; height: 30px; font-size: 16px; }
  .ios-scroll { margin: 0 -12px; padding: 8px 12px 12px; }
}
.ios-g > .ios-r:has(+ .ios-calsel) { border-bottom: 0; }

/* Notas (estilo app Notas del iPhone) */
.nt-card { --nt: #E5A500; display: flex; flex-direction: column; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif; }
.nt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.nt-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.nt-head .muted { font-size: 12.5px; }
.nt-nueva { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--nt); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.nt-nueva:hover { background: #FFF6DB; }
.nt-nueva .ic { width: 21px; height: 21px; stroke-width: 2; }
.nt-buscar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; margin-bottom: 8px; border-radius: 9px; background: #EFEFF0; color: #8E8E93; }
.nt-buscar .ic { width: 15px; height: 15px; }
.nt-buscar input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: #1C1C1E; }
.nt-sec { font-size: 13px; font-weight: 700; color: #1C1C1E; margin: 8px 2px 4px; }
.nt-list { list-style: none; margin: 0; padding: 0; background: #F7F7F8; border-radius: 12px; overflow: hidden; max-height: 300px; overflow-y: auto; }
.nt-list li + li .nt-row { border-top: 1px solid #E5E5EA; }
.nt-row { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 12px; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; }
.nt-row:hover { background: #EFEFF1; }
.nt-row b { display: flex; align-items: center; gap: 5px; font-size: 15px; font-weight: 600; color: #1C1C1E; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-row span { font-size: 13px; color: #8E8E93; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-row em { font-style: normal; color: #3C3C43; margin-right: 8px; }
.nt-pin { display: inline-flex; color: var(--nt); }
.nt-pin .ic { width: 13px; height: 13px; }
.nt-vacio { padding: 22px 10px; text-align: center; color: #8E8E93; font-size: 13.5px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: #F7F7F8; border-radius: 12px; }
.nt-vacio .link { color: #B98500; }
.modal-card.is-nota { width: min(620px, 100%); background: #FFFDF6; }
.modal-card.is-nota .modal-head { padding-top: 12px; }
.modal-card.is-nota .modal-foot { border-top-color: #F1E9CC; background: #FFFDF6; }
.modal-card.is-nota .btn-primary { background: #E5A500; color: #1C1C1E; }
.modal-card.is-nota .btn-primary:hover { background: #D19700; }
.nt-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.nt-acts .ic { width: 14px; height: 14px; }
.nt-edit-fecha { text-align: center; font-size: 12px; color: #8E8E93; margin: -6px 0 8px; }
.nt-edit textarea { width: 100%; min-height: 320px; border: 0; outline: 0; resize: vertical; background: transparent; font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif; color: #1C1C1E; }
.nt-edit textarea::first-line { font-weight: 700; font-size: 20px; }
.subtabs { overflow-y: hidden; scrollbar-width: none; } .subtabs::-webkit-scrollbar { display: none; }

/* =============================================================
   Ventas: próxima acción, estancamiento, "Tu día", alta rápida,
   plantillas de WhatsApp
   ============================================================= */
.deal-prox, .deal-sin { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12px; font-weight: 600; }
.deal-prox { color: var(--ink-2); }
.deal-prox .ic, .deal-sin .ic { width: 13px; height: 13px; flex-shrink: 0; }
.deal-prox.is-vencida { color: #C2312F; }
.deal-sin { border: 0; background: #FEF3E2; color: #B45309; padding: 4px 8px; border-radius: 7px; cursor: pointer; font-family: inherit; width: 100%; text-align: left; }
.deal-sin:hover { background: #FDE8C4; }
.deal.is-ambar { box-shadow: inset 3px 0 0 #F59E0B, var(--shadow); }
.deal.is-roja { box-shadow: inset 3px 0 0 #DC2626, var(--shadow); }
.deal.is-roja .deal-sin { background: #FEE2E2; color: #B91C1C; }
.qs-motivo { display: flex; align-items: center; gap: 6px; margin: -4px 0 12px; font-size: 13px; }
.qs-motivo .ic { width: 14px; height: 14px; color: #16A34A; }
.qs-acciones { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.qs-acciones input { position: absolute; opacity: 0; pointer-events: none; }
.qs-acciones span { display: inline-block; padding: 8px 13px; border-radius: 99px; border: 1.5px solid var(--line-2); cursor: pointer; font-weight: 600; font-size: 13.5px; }
.qs-acciones input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.qs-acciones input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }
.qs-rapidas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.qs-rapidas button { border: 0; background: #F3F4F6; border-radius: 99px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer; }
.qs-rapidas button:hover { background: #E5E7EB; }

.mi-dia { margin-bottom: 14px; }
.mi-dia.is-ok { display: flex; align-items: center; gap: 12px; }
.mi-dia.is-ok > .ic { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: #DCFCE7; color: #16A34A; flex-shrink: 0; }
.mi-dia.is-ok div { display: flex; flex-direction: column; }
.md-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.md-grid h3 { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 650; margin-bottom: 8px; }
.md-grid h3 .ic { width: 16px; height: 16px; color: var(--brand); }
.md-n { font-size: 12px; color: var(--mute); background: #F3F4F6; padding: 1px 8px; border-radius: 99px; }
.md-venc { font-size: 11.5px; color: #C2312F; font-weight: 700; }
.md-ops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.md-op { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; border-radius: 10px; background: #F7F8FA; }
.md-op.is-ambar { box-shadow: inset 3px 0 0 #F59E0B; }
.md-op.is-roja { box-shadow: inset 3px 0 0 #DC2626; }
.md-op > button:first-child { flex: 1; min-width: 0; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; display: flex; flex-direction: column; }
.md-op b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-op span { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-qs { flex-shrink: 0; border: 0; border-radius: 99px; padding: 5px 10px; background: var(--brand-soft); color: var(--brand-ink); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.md-qs:hover { background: var(--brand-line); }

.alta { position: relative; }
.alta-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px -6px var(--brand); transition: transform .15s; }
.alta-btn:hover { transform: scale(1.06); }
.alta-btn .ic { width: 20px; height: 20px; stroke-width: 2.4; transition: transform .2s; }
.alta.is-open .alta-btn .ic { transform: rotate(45deg); }
.alta-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: none; z-index: 40; }
.alta.is-open .alta-menu { display: block; }
.alta-tit { display: block; padding: 6px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.alta-menu a, .alta-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; text-align: left; font: inherit; font-weight: 500; cursor: pointer; color: var(--ink); }
.alta-menu a:hover, .alta-menu button:hover { background: #F3F4F6; }
.alta-menu .ic { width: 17px; height: 17px; color: var(--brand); }

.wa-pl { margin: -6px 0 16px; }
.wa-pl > span { display: block; font-size: 12px; color: var(--mute); margin-bottom: 6px; }
.wa-pl > div { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-pl a { padding: 6px 12px; border-radius: 99px; background: #E8F7EE; color: #128C4B; font-size: 13px; font-weight: 600; }
.wa-pl a:hover { background: #D3F0DF; }
@media (max-width: 1080px) { .md-grid { grid-template-columns: 1fr; gap: 14px; } }

/* =============================================================
   App instalable (js/pwa.js)
   ============================================================= */
.pwa-btn { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 70; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px 0 16px; border: 0; border-radius: 99px; background: #08090B; color: #fff; font: inherit; font-weight: 600; font-size: 14.5px; box-shadow: 0 14px 30px -12px rgba(0,0,0,.55); cursor: pointer; animation: pwaSube .5s cubic-bezier(.16,1,.3,1); }
.pwa-btn svg { width: 18px; height: 18px; fill: none; stroke: #C8FF4D; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pwaSube { from { transform: translate(-50%, 80px); opacity: 0; } }
.pwa-ios { position: fixed; inset: 0; z-index: 90; background: rgba(8,9,11,.55); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.pwa-ios-card { width: 100%; max-width: 420px; background: var(--card, #fff); border-radius: 20px; padding: 20px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); animation: pwaSube2 .4s cubic-bezier(.16,1,.3,1); }
.pwa-ios-card b { font-size: 17px; }
.pwa-ios-card ol { margin: 12px 0 16px; padding-left: 20px; display: grid; gap: 8px; font-size: 14.5px; }
.pwa-ios-card .btn { width: 100%; justify-content: center; }
.pwa-ic { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #EEF0F3; font-weight: 600; }
@keyframes pwaSube2 { from { transform: translateY(40px); opacity: 0; } }
/* Abierta como app: respeta la muesca del iPhone */
.es-app .top { padding-top: env(safe-area-inset-top); }
/* Aviso de versión nueva (js/pwa.js) */
.version-nueva { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 95; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 99px; background: #08090B; color: #fff; font-size: 14px; box-shadow: 0 14px 30px -12px rgba(0,0,0,.55); max-width: calc(100vw - 24px); }
.version-nueva button { border: 0; border-radius: 99px; padding: 8px 14px; background: #C8FF4D; color: #0B0F02; font: inherit; font-weight: 700; cursor: pointer; }

.version-nueva.is-off { background: #7A2E0E; }
.version-nueva.is-off button { background: #fff; color: #7A2E0E; }
.auth-hotel { text-decoration: none; color: inherit; }
.auth-hotel-link { margin-top: 14px; text-align: center; }
.auth-hotel-link a { color: var(--brand-ink); font-weight: 600; }
