/* Asistente de Vida — sistema visual. Mobile-first, modo claro/oscuro. */
:root {
  --bg: #f4f5f8; --bg2: #eceef3; --card: #ffffff; --card2: #f7f8fb; --line: #e3e6ee;
  --text: #141824; --muted: #5d6578; --faint: #8a91a3;
  --brand: #3d5afe; --brand2: #5c76ff; --brand-soft: #e8ecff; --on-brand: #fff;
  --gold: #c98a12; --gold-soft: #fff4dc; --ok: #138a5e; --ok-soft: #e1f5ec; --warn: #b4540a; --warn-soft: #fdeedd;
  --bad: #c62f3b; --bad-soft: #fde6e8; --info: #2f6fcf; --info-soft: #e5efff;
  --shadow: 0 1px 2px rgba(20,24,36,.05), 0 6px 24px rgba(20,24,36,.06);
  --radius: 18px; --radius-s: 12px;
  --nav-h: 68px; --safe-b: env(safe-area-inset-bottom, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c0f16; --bg2: #121622; --card: #161b27; --card2: #1b2130; --line: #252c3d;
  --text: #edf0f7; --muted: #a2aabd; --faint: #737c91;
  --brand: #7b8cff; --brand2: #95a3ff; --brand-soft: #1e2546; --on-brand: #0c0f16;
  --gold: #f5b544; --gold-soft: #2f2614; --ok: #3ccf91; --ok-soft: #12291f; --warn: #f59e57; --warn-soft: #2d1f12;
  --bad: #ff6b76; --bad-soft: #301519; --info: #6ea8ff; --info-soft: #142238;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 1.55rem; font-weight: 700; } h2 { font-size: 1.15rem; font-weight: 650; } h3 { font-size: 1rem; font-weight: 650; }
p { margin: .3em 0; }
small, .small { font-size: .84rem; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--brand2); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100%; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; padding: 14px 14px calc(var(--nav-h) + var(--safe-b) + 24px); max-width: 980px; margin: 0 auto; width: 100%; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 2px 14px; }
.topbar .title { display: flex; flex-direction: column; }
.topbar .actions { display: flex; gap: 8px; align-items: center; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--faint); font-size: .7rem; font-weight: 600; padding: 6px 0; }
.bottomnav a svg { width: 24px; height: 24px; }
.bottomnav a.active { color: var(--brand); }
.bottomnav .fab-slot { display: flex; justify-content: center; }
.fab { width: 60px; height: 60px; border-radius: 50%; border: 0; background: linear-gradient(145deg, var(--brand), var(--brand2)); color: var(--on-brand); display: grid; place-items: center; box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 45%, transparent); cursor: pointer; transform: translateY(-14px); transition: transform .15s; }
.fab:active { transform: translateY(-12px) scale(.96); }
.fab svg { width: 28px; height: 28px; }
@media (min-width: 900px) {
  .sidebar { display: flex; flex-direction: column; gap: 4px; width: 248px; flex-shrink: 0; padding: 20px 14px; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: var(--card); overflow-y: auto; }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.05rem; padding: 4px 10px 16px; }
  .sidebar .brand img { width: 32px; height: 32px; border-radius: 9px; }
  .sidebar a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 560; font-size: .95rem; }
  .sidebar a svg { width: 20px; height: 20px; }
  .sidebar a:hover { background: var(--card2); color: var(--text); }
  .sidebar a.active { background: var(--brand-soft); color: var(--brand); }
  .sidebar .spacer { flex: 1; }
  .bottomnav { display: none; }
  .main { padding: 28px 32px 60px; }
  .desk-fab { display: grid !important; position: fixed; right: 28px; bottom: 28px; transform: none; z-index: 30; }
  .desk-fab:active { transform: scale(.96); }
}
.desk-fab { display: none !important; }

/* ---------- Componentes ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card, .stack > * + * { margin-top: 12px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-h h2, .card-h h3 { display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 12px; }
.grid > .card + .card { margin-top: 0; }
@media (min-width: 700px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; transition: background .15s, transform .1s; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--card2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand2); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .86rem; border-radius: 10px; }
.btn.icon { width: 44px; padding: 0; }
.btn.icon.small { width: 36px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: var(--card2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip.alto { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.chip.medio { background: var(--info-soft); color: var(--info); border-color: transparent; }
.chip.bajo { background: var(--card2); color: var(--faint); }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
button.chip { cursor: pointer; font-family: inherit; }
.tabs { display: flex; gap: 6px; background: var(--bg2); padding: 4px; border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 9px 12px; border-radius: 10px; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.tabs button.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* Formularios */
label.f { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; min-height: 44px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); }
input[type="range"] { padding: 0; min-height: 30px; background: none; border: 0; accent-color: var(--brand); }
.inline-input { display: flex; gap: 8px; align-items: stretch; }
.inline-input input { flex: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-weight: 500; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { flex: 1; min-height: 42px; border: 0; background: var(--card2); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--brand); color: var(--on-brand); }

/* Listas de actividades */
.task { display: flex; align-items: flex-start; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--faint); background: transparent; flex-shrink: 0; cursor: pointer; display: grid; place-items: center; margin-top: 1px; color: transparent; }
.task .tick:hover { border-color: var(--brand); }
.task.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.task.done .t-title { text-decoration: line-through; color: var(--faint); }
.task .t-body { flex: 1; min-width: 0; cursor: pointer; }
.task .t-title { font-weight: 600; }
.task .t-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; align-items: center; font-size: .8rem; color: var(--muted); }
.top3 { display: grid; gap: 10px; }
.top3 .item { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, var(--gold-soft), transparent 80%); border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line)); }
.top3 .rank { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--gold); color: #fff; font-weight: 800; flex-shrink: 0; }
:root[data-theme="dark"] .top3 .rank { color: #1b1404; }
.top3 .item.done { opacity: .6; }
.top3 .item.done .t-title { text-decoration: line-through; }

/* Panel principal */
.hero { background: linear-gradient(140deg, var(--brand) 0%, var(--brand2) 100%); color: var(--on-brand); border: 0; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.1); }
.hero .muted { color: color-mix(in srgb, var(--on-brand) 78%, transparent); }
.hero h1 { font-size: 1.45rem; }
.hero .clock { font-size: 2.1rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-size: 1.3rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .78rem; color: var(--muted); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.kpis .stat { background: var(--card2); border-radius: 14px; padding: 12px; }
.reco { border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 14px; padding: 12px 14px; }
.reco .basis { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.voicebig { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 18px; border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--card); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.voicebig .mic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); flex-shrink: 0; }
.voicebig .mic svg { width: 26px; height: 26px; }

/* Progreso */
.bar { height: 8px; border-radius: 99px; background: var(--bg2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .4s ease; }
.bar.gold > i { background: var(--gold); } .bar.ok > i { background: var(--ok); } .bar.bad > i { background: var(--bad); } .bar.warn > i { background: var(--warn); }
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .lbl { position: absolute; font-weight: 750; font-size: .95rem; font-variant-numeric: tabular-nums; }

/* Objetivos */
.goal { padding: 12px 0 12px 0; border-bottom: 1px solid var(--line); }
.goal:last-child { border-bottom: 0; }
.goal .children { margin-left: 14px; padding-left: 12px; border-left: 2px solid var(--line); }
.goal-head { display: flex; align-items: center; gap: 10px; }
.lvl { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 750; color: var(--faint); }

/* Finanzas */
.money-in { color: var(--ok); } .money-out { color: var(--bad); }
.tx { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.tx .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; }
.tx .ic.in { background: var(--ok-soft); color: var(--ok); } .tx .ic.out { background: var(--bad-soft); color: var(--bad); }
.tx .amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.bigmic { width: 132px; height: 132px; border-radius: 50%; border: 0; margin: 6px auto; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, var(--brand2), var(--brand)); color: var(--on-brand); cursor: pointer; box-shadow: 0 12px 40px color-mix(in srgb, var(--brand) 40%, transparent); transition: transform .15s; }
.bigmic svg { width: 56px; height: 56px; }
.bigmic:active { transform: scale(.96); }
.listening { animation: pulse 1.3s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); } 70% { box-shadow: 0 0 0 22px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.rec-btn { width: 100%; min-height: 76px; border-radius: 20px; border: 0; background: linear-gradient(135deg, #e5484d, #f06a52); color: #fff; font: inherit; font-size: 1.05rem; font-weight: 800; letter-spacing: .02em; display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; box-shadow: 0 10px 30px rgba(229,72,77,.3); }
.rec-btn svg { width: 26px; height: 26px; }
.rec-live { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #e5484d; animation: blink 1s infinite; }
.rec-dot.paused { animation: none; background: var(--warn); }
@keyframes blink { 50% { opacity: .25; } }
.timer { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.transcript { white-space: pre-wrap; background: var(--card2); border-radius: 12px; padding: 12px; max-height: 320px; overflow-y: auto; font-size: .94rem; }
.quote { border-left: 3px solid var(--line); padding: 4px 10px; color: var(--muted); font-style: italic; font-size: .88rem; margin-top: 6px; }

/* Calendario */
.week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.week .day { background: var(--card2); border-radius: 14px; padding: 8px; min-height: 160px; border: 2px solid transparent; }
.week .day.today { border-color: var(--brand); }
.week .day.drop { background: var(--brand-soft); }
.week .day h4 { font-size: .8rem; color: var(--muted); margin-bottom: 6px; text-transform: capitalize; }
.week .ev { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font-size: .8rem; margin-bottom: 6px; cursor: grab; }
.week .ev.alto { border-left: 3px solid var(--gold); } .week .ev.done { opacity: .5; text-decoration: line-through; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month .dow { font-size: .72rem; font-weight: 700; color: var(--faint); text-align: center; padding: 4px 0; text-transform: uppercase; }
.month .cell { aspect-ratio: 1 / 1; min-height: 44px; background: var(--card2); border-radius: 10px; padding: 4px 6px; font-size: .8rem; cursor: pointer; border: 2px solid transparent; display: flex; flex-direction: column; justify-content: space-between; }
.month .cell.out { opacity: .35; } .month .cell.today { border-color: var(--brand); } .month .cell.sel { background: var(--brand-soft); }
.month .dots { display: flex; gap: 3px; flex-wrap: wrap; }
.month .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); } .month .dots i.alto { background: var(--gold); } .month .dots i.done { background: var(--ok); }
.timeline .slot { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: start; }
.timeline .slot .h { font-size: .8rem; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 12px; }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--brand); color: var(--on-brand); border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.assistant ul { margin: 4px 0; padding-left: 20px; }
.msg .mode { display: block; font-size: .7rem; color: var(--faint); margin-top: 6px; }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); margin: 0 2px; animation: typing 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.composer { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); display: flex; gap: 8px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); margin-top: 12px; }
.composer textarea { min-height: 44px; max-height: 140px; border: 0; background: transparent; resize: none; padding: 10px 6px; }
.composer textarea:focus { box-shadow: none; }
@media (min-width: 900px) { .composer { bottom: 16px; } }
.action-card { background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; align-self: stretch; }

/* Hábitos */
.heat { display: grid; grid-template-columns: repeat(35, 1fr); gap: 2px; margin-top: 8px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--bg2); }
.heat i.on { background: var(--ok); }

/* Hojas, modales, avisos */
dialog.modal { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; margin: auto 0 0 0; color: var(--text); }
dialog.modal::backdrop { background: rgba(8,10,16,.5); backdrop-filter: blur(2px); }
dialog.modal .sheet { background: var(--card); border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); max-height: 90vh; overflow-y: auto; animation: up .2s ease; }
dialog.modal .sheet .grab { width: 40px; height: 5px; border-radius: 99px; background: var(--line); margin: -6px auto 12px; }
@keyframes up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) { dialog.modal { margin: auto; max-width: 560px; } dialog.modal .sheet { border-radius: 22px; } dialog.modal .sheet .grab { display: none; } }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 18px); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-weight: 550; font-size: .92rem; box-shadow: var(--shadow); animation: up .2s ease; pointer-events: auto; }
.toast.error { background: var(--bad); color: #fff; }
.banner { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 90; width: min(94vw, 480px); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: 0 12px 40px rgba(0,0,0,.2); display: flex; gap: 12px; align-items: flex-start; animation: up .2s; }
.banner .k { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--brand); flex-shrink: 0; }
.banner .k.urgent { background: var(--bad); } .banner .k.finance { background: var(--gold); } .banner .k.ai { background: var(--info); }
.notice { background: var(--info-soft); color: var(--text); border-radius: 14px; padding: 12px 14px; font-size: .9rem; }
.notice.warn { background: var(--warn-soft); } .notice.ok { background: var(--ok-soft); } .notice.bad { background: var(--bad-soft); }
.empty { text-align: center; padding: 22px 10px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--faint); margin-bottom: 6px; }
.skeleton { background: linear-gradient(90deg, var(--card2), var(--bg2), var(--card2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; height: 18px; margin: 8px 0; }
@keyframes sk { to { background-position: -200% 0; } }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.auth { max-width: 420px; margin: 6vh auto; padding: 0 16px; }
.auth .logo { width: 64px; height: 64px; border-radius: 18px; margin-bottom: 14px; }
.bubble-q { background: var(--card); border: 1px solid var(--line); padding: 12px 14px; border-radius: 18px 18px 18px 6px; max-width: 90%; }
.bubble-a { background: var(--brand-soft); padding: 10px 14px; border-radius: 18px 18px 6px 18px; max-width: 90%; align-self: flex-end; white-space: pre-wrap; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
details > summary { cursor: pointer; font-weight: 650; list-style: none; padding: 6px 0; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "›"; display: inline-block; margin-right: 8px; transition: transform .15s; }
details[open] > summary::before { transform: rotate(90deg); }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th, table.t td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.t th { color: var(--muted); font-weight: 650; font-size: .8rem; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* ajustes tras revisión visual */
h1 svg, h2 svg, h3 svg, .chip svg, .tick svg { width: 18px; height: 18px; flex-shrink: 0; }
h2 svg { color: var(--brand); }
.task .tick svg { width: 15px; height: 15px; }
.cap { display: inline-block; }
.cap::first-letter { text-transform: uppercase; }
:root[data-theme="dark"] .hero { background: linear-gradient(140deg, #24308f 0%, #3d4fd0 100%); color: #fff; }
:root[data-theme="dark"] .hero .muted { color: rgba(255,255,255,.75); }
.main { overflow-x: clip; }
.kpis .stat { min-width: 0; overflow-wrap: anywhere; }
.timeline .slot { grid-template-columns: 96px 1fr; }
@media (max-width: 420px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); } .stat .v { font-size: 1.1rem; } }
