/* Esencia · Agenda Asistente — estilos. Tokens en :root; modo oscuro por defecto del sistema y conmutador manual. */
:root {
  color-scheme: light;
  --bg: #f4f2ee; --bg2: #ebe8e2; --card: #ffffff; --card2: #f8f6f2; --line: #e3dfd7; --line2: #d4cfc4;
  --text: #1d1b19; --text2: #5e5a53; --muted: #8b867c;
  --accent: #5b5bd6; --accent-2: #7c6cf0; --accent-ink: #fff; --accent-soft: #e9e8fb;
  --ok: #138a36; --warn: #b26b00; --bad: #d1343b; --ok-soft: #e3f4e8; --warn-soft: #fbefd9; --bad-soft: #fde7e7;
  --a-trabajo: #257de0; --a-clientes: #f47230; --a-salud: #00b894; --a-mente: #f2a600; --a-personal: #ee7fac; --a-social: #008a17; --a-espiritual: #6a4ce2;
  --series-1: #257de0; --series-3: #00b894; --series-8: #ec4647;
  --m-focus: #c4513f; --m-short: #2b8a80; --m-long: #3e5fa3; --m-watch: #6b4fc2;
  --avatar-empty: #e9e5dd; --avatar-line: #c9c3b6; --shadow-ink: #2a2236;
  --radius: 14px; --radius-s: 10px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --nav-h: 64px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #111015; --bg2: #18171e; --card: #1c1b22; --card2: #23222a; --line: #2e2c36; --line2: #3b3945;
  --text: #f1eff5; --text2: #b8b4c2; --muted: #8a8696;
  --accent: #8b87ff; --accent-2: #a597ff; --accent-ink: #12111a; --accent-soft: #2a2843;
  --ok: #3ccf6a; --warn: #f0a93b; --bad: #ff6b6b; --ok-soft: #173322; --warn-soft: #3a2c12; --bad-soft: #3d1a1d;
  --a-trabajo: #338ced; --a-clientes: #e76624; --a-salud: #00a888; --a-mente: #d28e05; --a-personal: #e24d8b; --a-social: #0aac23; --a-espiritual: #9887ef;
  --series-1: #338ced; --series-3: #00a888; --series-8: #eb6263;
  --avatar-empty: #2a2832; --avatar-line: #4a4756; --shadow-ink: #6b5a85;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
} }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111015; --bg2: #18171e; --card: #1c1b22; --card2: #23222a; --line: #2e2c36; --line2: #3b3945;
  --text: #f1eff5; --text2: #b8b4c2; --muted: #8a8696;
  --accent: #8b87ff; --accent-2: #a597ff; --accent-ink: #12111a; --accent-soft: #2a2843;
  --ok: #3ccf6a; --warn: #f0a93b; --bad: #ff6b6b; --ok-soft: #173322; --warn-soft: #3a2c12; --bad-soft: #3d1a1d;
  --a-trabajo: #338ced; --a-clientes: #e76624; --a-salud: #00a888; --a-mente: #d28e05; --a-personal: #e24d8b; --a-social: #0aac23; --a-espiritual: #9887ef;
  --series-1: #338ced; --series-3: #00a888; --series-8: #eb6263;
  --avatar-empty: #2a2832; --avatar-line: #4a4756; --shadow-ink: #6b5a85;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-size: 28px; letter-spacing: -.02em; } h2 { font-size: 19px; letter-spacing: -.01em; } h3 { font-size: 15px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.serif { font-family: var(--serif); }

/* ---------- Estructura ---------- */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.app > div { min-width: 0; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg2); border-right: 1px solid var(--line); padding: 18px 12px 24px; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; font-weight: 700; font-size: 17px; }
.brand img { width: 30px; height: 30px; border-radius: 9px; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; border: 0; background: none; text-align: left; width: 100%; color: var(--text2); font-weight: 500; }
.nav-item:hover { background: var(--card); color: var(--text); }
.nav-item.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.nav-item .ic { width: 22px; text-align: center; font-size: 17px; }
.nav-item .count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 12px 4px; }
.main { min-width: 0; padding: 28px clamp(16px, 4vw, 44px) 120px; max-width: 1180px; width: 100%; }
.topbar { display: none; }
.bottom { display: none; }

@media (max-width: 899px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding: 12px 16px calc(var(--nav-h) + 96px); }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 0; }
  .topbar .brand { padding: 0; font-size: 16px; }
  .bottom { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bottom button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); font-weight: 600; }
  .bottom button .ic { font-size: 21px; line-height: 1; filter: grayscale(.6); opacity: .8; }
  .bottom button.on { color: var(--text); } .bottom button.on .ic { filter: none; opacity: 1; transform: translateY(-1px); }
  h1 { font-size: 24px; }
}

/* ---------- Piezas ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card h2 { margin-bottom: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 899px) { .g2, .g3 { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 6px 0 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--text2); }
.section { margin-top: 22px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px 4px; }
.section-title .hint { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line2); background: var(--card); padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--card2); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 12px 20px; font-size: 16px; border-radius: 12px; }
.btn.icon { padding: 7px; width: 36px; height: 36px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-size: 12px; color: var(--text2); white-space: nowrap; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.acc { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.seg { display: inline-flex; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--text2); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 70px; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text2); }
.form { display: grid; gap: 12px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 6px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 899px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.kpi .v { font-size: 26px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi .s { font-size: 12px; color: var(--text2); margin-top: 2px; }
.bar { height: 8px; background: var(--card2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }

/* ---------- Encabezado Mi día ---------- */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 22px; color: #fff; margin-bottom: 18px;
  background: linear-gradient(135deg, #3a2f8f, #6b4fc2 45%, #c4513f); box-shadow: var(--shadow); }
.hero.g-aurora { background: linear-gradient(135deg, #24306b, #5b4bc4 45%, #1f8f86); }
.hero.g-atardecer { background: linear-gradient(135deg, #5a2a6e, #c4513f 55%, #f2a600); }
.hero.g-bosque { background: linear-gradient(135deg, #12372a, #2b8a60 55%, #9cc46b); }
.hero.g-oceano { background: linear-gradient(135deg, #0f2640, #2b6fb3 55%, #3fc1c9); }
.hero.g-noche { background: linear-gradient(135deg, #0d0c18, #2a2450 55%, #5b4bc4); }
.hero.g-cafe { background: linear-gradient(135deg, #3b2a20, #8a5a3c 55%, #d6a76c); }
.hero h1 { color: #fff; font-size: 30px; }
.hero .date { opacity: .85; font-weight: 600; }
.hero .date::first-letter, .cap::first-letter { text-transform: uppercase; }
.cap { display: block; }
.hero .quote { margin-top: 14px; font-family: var(--serif); font-size: 17px; line-height: 1.4; max-width: 640px; opacity: .95; }
.hero .quote small { display: block; font-family: var(--font); font-size: 12px; opacity: .8; margin-top: 4px; }
.hero .stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.hero .stats div { background: rgba(255,255,255,.14); border-radius: 12px; padding: 8px 12px; backdrop-filter: blur(6px); }
.hero .stats b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.hero .stats span { font-size: 12px; opacity: .85; }
.hero .motto { position: absolute; top: 18px; right: 20px; font-size: 12px; font-weight: 700; background: rgba(0,0,0,.2); padding: 4px 10px; border-radius: 99px; }
@media (max-width: 899px) { .hero .motto { position: static; display: inline-block; margin-bottom: 8px; } .hero h1 { font-size: 24px; } }

/* ---------- Tareas (estilo lista) ---------- */
.tasks { display: flex; flex-direction: column; gap: 6px; }
.task { display: flex; align-items: flex-start; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; cursor: pointer; transition: transform .12s, border-color .12s; position: relative; }
.task:hover { border-color: var(--line2); }
.task.done .t-title { text-decoration: line-through; color: var(--muted); }
.task .check { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); background: none; margin-top: 1px; display: grid; place-items: center; padding: 0; transition: .15s; }
.task .check:hover { border-color: var(--accent); background: var(--accent-soft); }
.task.done .check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.task .check svg { width: 12px; height: 12px; opacity: 0; } .task.done .check svg, .task .check:hover svg { opacity: 1; }
.task .t-body { flex: 1; min-width: 0; }
.task .t-title { font-weight: 550; word-break: break-word; }
.task .t-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 3px; font-size: 12px; color: var(--muted); align-items: center; }
.task .t-meta .late { color: var(--bad); font-weight: 600; }
.task .t-actions { display: flex; gap: 2px; align-items: center; }
.task .t-actions button { border: 0; background: none; padding: 4px 6px; border-radius: 8px; color: var(--muted); font-size: 16px; }
.task .t-actions button:hover { background: var(--card2); color: var(--text); }
.task .star.on { color: #e0a100; }
.task .area-bar { position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; }
.task.urgente { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.task .play { color: var(--accent) !important; }
.task.running { border-color: var(--m-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--m-focus) 20%, transparent); }
.quick-add { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 6px 4px 14px; margin-bottom: 8px; }
.quick-add input { border: 0; background: none; padding: 9px 0; box-shadow: none !important; }
.quick-add .plus { color: var(--accent); font-size: 20px; font-weight: 700; }
.bucket-head { display: flex; align-items: baseline; gap: 8px; margin: 18px 4px 8px; }
.bucket-head h3 { font-size: 14px; }
.bucket-head .hint { font-size: 12px; color: var(--muted); }
.bucket-head .n { margin-left: auto; font-size: 12px; color: var(--muted); }
.collapse-toggle { border: 0; background: none; color: var(--text2); font-weight: 700; font-size: 13px; padding: 6px 4px; display: flex; gap: 6px; align-items: center; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 240px; }
.kcol h3 { display: flex; justify-content: space-between; padding: 4px 6px 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text2); }
.kcol.drop { outline: 2px dashed var(--accent); outline-offset: -4px; }
.kcol .task { margin-bottom: 8px; }
.task.dragging { opacity: .5; }
@media (max-width: 899px) { .kanban { grid-template-columns: repeat(3, 82vw); scroll-snap-type: x mandatory; } .kcol { scroll-snap-align: start; } }

/* ---------- Línea de tiempo ---------- */
.timeline { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.tl-inner { min-width: 760px; position: relative; }
.tl-head { display: grid; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.tl-head div { font-size: 11px; color: var(--muted); text-align: center; padding: 6px 0; border-left: 1px solid var(--line); }
.tl-head div.today { color: var(--accent); font-weight: 700; }
.tl-row { display: grid; grid-template-columns: 220px 1fr; border-bottom: 1px solid var(--line); min-height: 40px; align-items: center; }
.tl-row:last-child { border-bottom: 0; }
.tl-name { padding: 8px 12px; font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.tl-track { position: relative; height: 40px; }
.tl-bar { position: absolute; top: 11px; height: 18px; border-radius: 6px; opacity: .9; }
.tl-mark { position: absolute; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); opacity: .5; }

/* ---------- Panel de detalle ---------- */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; opacity: 0; pointer-events: none; transition: .2s; }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--bg); z-index: 51; transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); overflow-y: auto; border-left: 1px solid var(--line); padding: 18px 18px 120px; }
.drawer.open { transform: none; }
.drawer .title-input { font-size: 20px; font-weight: 700; border: 0; background: none; padding: 4px 0; }
.steps { display: flex; flex-direction: column; gap: 4px; }
.step { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }
.step input[type=text] { border: 0; background: none; padding: 2px; box-shadow: none !important; }
.step.done input[type=text] { text-decoration: line-through; color: var(--muted); }
.step button { border: 0; background: none; color: var(--muted); }
.lvl { display: flex; gap: 6px; }
.lvl button { flex: 1; border: 1px solid var(--line); background: var(--card2); padding: 7px 4px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--text2); }
.lvl button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(10,8,20,.55); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; padding: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.4); animation: pop .2s cubic-bezier(.2,.9,.3,1.2); }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 899px) { .modal-bg { place-items: end center; padding: 0; } .modal { border-radius: 20px 20px 0 0; max-height: 94vh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); } }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(16px) scale(.98); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 30px); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; z-index: 80; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); animation: pop .2s; }
.toast button { background: none; border: 0; color: var(--accent-2); font-weight: 700; }
@media (min-width: 900px) { .toast { bottom: 30px; } }

/* ---------- FAB y mini temporizadores ---------- */
.fab { position: fixed; right: 22px; bottom: 26px; z-index: 35; width: 58px; height: 58px; border-radius: 18px; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 30px; box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 45%, transparent); display: grid; place-items: center; }
@media (max-width: 899px) { .fab { bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); right: 16px; width: 54px; height: 54px; } }
.mini-timers { position: fixed; left: 50%; transform: translateX(-50%); bottom: 26px; z-index: 34; display: flex; gap: 8px; max-width: calc(100vw - 120px); overflow-x: auto; }
@media (max-width: 899px) { .mini-timers { bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); left: 16px; transform: none; max-width: calc(100vw - 96px); } }
@media (min-width: 900px) { .mini-timers { left: calc(50% + 132px); } }
.mini { display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 99px; color: #fff; font-weight: 700; font-size: 13px; border: 0; white-space: nowrap; box-shadow: var(--shadow); }
.mini .ring { width: 22px; height: 22px; }
.mini .lbl { max-width: 120px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; opacity: .9; }

/* ---------- Enfoque (Pomodoro) ---------- */
.focus-page { --mode: var(--m-focus); }
.focus-stage { background: var(--mode); border-radius: 24px; padding: 22px; color: #fff; transition: background .6s; box-shadow: var(--shadow); }
.focus-stage .seg { background: rgba(0,0,0,.15); border: 0; }
.focus-stage .seg button { color: rgba(255,255,255,.8); }
.focus-stage .seg button.on { background: rgba(255,255,255,.22); color: #fff; box-shadow: none; }
.big-timer { display: grid; place-items: center; margin: 18px auto 8px; position: relative; width: min(320px, 78vw); aspect-ratio: 1; }
.big-timer svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.big-timer .time { font-size: clamp(56px, 16vw, 92px); font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.big-timer .lbl { position: absolute; bottom: 22%; font-weight: 600; opacity: .85; max-width: 70%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.big-timer .round { position: absolute; top: 24%; font-size: 13px; font-weight: 700; opacity: .8; }
.focus-controls { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 8px; }
.focus-controls .start { background: #fff; color: var(--mode); border: 0; font-weight: 800; font-size: 20px; letter-spacing: .08em; padding: 14px 44px; border-radius: 14px; box-shadow: 0 6px 0 rgba(0,0,0,.18); text-transform: uppercase; transition: transform .08s, box-shadow .08s; }
.focus-controls .start:active, .focus-controls .start.on { transform: translateY(6px); box-shadow: none; }
.focus-controls .round-btn { background: rgba(255,255,255,.16); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 14px; font-size: 18px; }
.focus-task { text-align: center; margin-top: 14px; }
.focus-task select { background: rgba(255,255,255,.15); border: 0; color: #fff; max-width: 360px; }
.focus-task select option { color: #000; }
.timer-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tcard { border-radius: 16px; padding: 14px; color: #fff; position: relative; cursor: pointer; border: 2px solid transparent; }
.tcard.sel { border-color: var(--text); }
.tcard .t { font-size: 34px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tcard .n { font-weight: 600; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard .m { font-size: 12px; opacity: .85; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tcard .acts { display: flex; gap: 6px; margin-top: 8px; }
.tcard .acts button { background: rgba(255,255,255,.2); border: 0; color: #fff; border-radius: 8px; padding: 5px 10px; font-weight: 700; font-size: 13px; }
.tcard .bar { background: rgba(255,255,255,.2); border: 0; height: 5px; margin-top: 8px; } .tcard .bar i { background: #fff; }
.add-timer { border: 2px dashed var(--line2); border-radius: 16px; display: grid; place-items: center; min-height: 140px; color: var(--muted); font-weight: 700; background: none; }

/* ---------- Hábitos ---------- */
.habit { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.habit .hic { font-size: 24px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); flex: none; }
.habit .hbody { flex: 1; min-width: 0; }
.habit .week { display: flex; gap: 4px; margin-top: 6px; }
.habit .week i { width: 16px; height: 16px; border-radius: 5px; background: var(--card2); border: 1px solid var(--line); display: block; }
.habit .week i.on { background: var(--ok); border-color: var(--ok); }
.habit .week i.bad { background: var(--bad); border-color: var(--bad); }
.habit .week i.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.habit .hbtn { width: 46px; height: 46px; border-radius: 14px; border: 2px solid var(--line2); background: none; font-size: 20px; font-weight: 800; flex: none; }
.habit .hbtn.full { background: var(--ok); border-color: var(--ok); color: #fff; }
.habit.bad .hbtn { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); color: var(--bad); }
.ring-progress { flex: none; }

/* ---------- Asistente ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 50vh; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 16px; white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.msg.assistant { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg blockquote { margin: 8px 0 0; padding-left: 10px; border-left: 3px solid var(--accent); font-family: var(--serif); color: var(--text2); }
.msg .tag { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; }
.msg .plan { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.msg .plan div { display: flex; gap: 10px; font-size: 13px; padding: 6px 8px; border-radius: 8px; background: var(--card2); }
.msg .plan div b { font-variant-numeric: tabular-nums; min-width: 44px; }
.composer-wrap { position: sticky; bottom: 0; z-index: 5; padding-top: 14px; background: linear-gradient(transparent, var(--bg) 22px); }
.composer { padding: 4px 0 12px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; width: auto; min-width: 0; min-height: 46px; max-height: 160px; border-radius: 14px; }
.composer .btn { flex: none; }
@media (max-width: 899px) { .composer-wrap { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); } }
.suggest { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; }
.suggest button { flex: none; border: 1px solid var(--line); background: var(--card); padding: 7px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text2); }
.typing { display: inline-flex; gap: 4px; } .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; } .typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }

/* ---------- Nudges ---------- */
.nudge { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); margin-bottom: 8px; }
.nudge .ni { font-size: 20px; } .nudge p { margin: 0; flex: 1; } .nudge .acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.nudge.warn { background: var(--warn-soft); border-color: transparent; } .nudge.bad { background: var(--bad-soft); border-color: transparent; }

/* ---------- Avatar ---------- */
.avatar-wrap { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
@media (max-width: 899px) { .avatar-wrap { grid-template-columns: 1fr; justify-items: center; } }
.avatar .av-part { transition: fill .6s; }
.av-label { font-size: 12px; font-weight: 700; fill: var(--text2); }
.av-row { display: grid; grid-template-columns: 12px 90px 1fr 90px 40px; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; width: 100%; }
.av-row .av-bar { height: 7px; background: var(--card2); border-radius: 9px; overflow: hidden; } .av-row .av-bar i { display: block; height: 100%; border-radius: 9px; }
@media (max-width: 899px) { .av-row { grid-template-columns: 12px 80px 1fr 34px; } .av-row .muted { display: none; } }

/* ---------- Gráficas ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid, .chart line.grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .baseline { stroke: var(--muted); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.chart .axis, .donut .axis { fill: var(--muted); font-size: 12px; }
@media (max-width: 899px) { .chart .axis { font-size: 15px; } }
.donut-c { fill: var(--text); font-size: 22px; font-weight: 750; }
.heat { width: 100%; height: auto; max-height: 140px; }
.hit { cursor: default; } .hit:hover path, .hit:hover rect:not([fill=transparent]) { opacity: .85; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tooltip { position: fixed; z-index: 90; pointer-events: none; background: var(--text); color: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; opacity: 0; transition: opacity .1s; max-width: 280px; }
.donut-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* ---------- Diario y cierre ---------- */
.moods { display: flex; gap: 8px; flex-wrap: wrap; }
.moods button { border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: 8px 10px; font-size: 26px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; }
.moods button span { font-size: 11px; font-weight: 600; color: var(--muted); }
.moods button.on { border-color: var(--accent); background: var(--accent-soft); }
.emotions { display: flex; flex-wrap: wrap; gap: 6px; }
.emotions button { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 5px 11px; font-size: 13px; color: var(--text2); }
.emotions button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.day-card { border-radius: 20px; padding: 22px; background: linear-gradient(160deg, var(--card), var(--card2)); border: 1px solid var(--line); }
.day-card .arch { font-size: 44px; }
.evidence { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.evidence:last-child { border-bottom: 0; }
.evidence .ei { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--card2); flex: none; }
.evidence .et { font-weight: 600; }
.timeline-day { position: relative; padding-left: 18px; }
.timeline-day::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-day .evidence { position: relative; border: 0; }
.timeline-day .evidence::before { content: ''; position: absolute; left: -17px; top: 20px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }

/* ---------- Mi mundo ---------- */
.phrase { font-family: var(--serif); font-size: 19px; line-height: 1.45; padding: 16px 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); position: relative; }
.phrase button { position: absolute; top: 6px; right: 6px; border: 0; background: none; color: var(--muted); opacity: 0; }
.phrase:hover button { opacity: 1; }
.gradients { display: flex; gap: 8px; flex-wrap: wrap; }
.gradients button { width: 44px; height: 44px; border-radius: 12px; border: 3px solid transparent; }
.gradients button.on { border-color: var(--text); }
.goal { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.goal:last-child { border-bottom: 0; }

/* ---------- Clientes ---------- */
.client { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.client::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ok); }
.client.ojo::before { background: var(--warn); } .client.mal::before { background: var(--bad); }
.client .money { display: flex; justify-content: space-between; font-size: 13px; color: var(--text2); }
.status-pill { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 700; }

.list-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.list-tabs button { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text2); }
.list-tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=search] { max-width: 260px; }
.onboard h1 { font-size: 34px; }
.onboard .big-emoji { font-size: 56px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; animation: fall 1.4s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
