/* Personal OS · Hoy, captura rápida (⌘K), recurrentes y cierre del día */

kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 6px; background: rgba(255,255,255,.08); border: 1px solid var(--line-strong);
  font: 600 11px/1 var(--font); color: var(--text-2);
}
.btn kbd { margin-left: 4px; background: rgba(0,0,0,.18); border-color: transparent; color: inherit; opacity: .75; }
.badge.muted { background: rgba(255,255,255,.06); color: var(--text-3); }
.card h3 .muted { font-weight: 400; color: var(--text-3); font-size: 13px; }
.empty.small { padding: 14px 4px; text-align: left; }
.icon-btn svg path[d^="M8 5.5"] { fill: currentColor; }

/* Botón de la barra lateral */
.qc-trigger {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 16px; padding: 10px 12px 10px 14px;
  border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); color: var(--text-2);
  font-size: 14px; font-weight: 500; transition: background .15s, color .15s, border-color .15s;
}
.qc-trigger:hover { background: var(--accent-soft); color: var(--text); border-color: rgba(139,124,246,.4); }
.qc-trigger svg { width: 17px; height: 17px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.qc-trigger kbd { margin-left: auto; }

/* ---------- Hoy ---------- */
.hoy-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; }
.hoy-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hoy-card { padding: 24px 26px; }
.hoy-card h3 { margin-bottom: 18px; }
.hoy-card h3 a.link-btn, .hoy-card h3 .link-btn { font-size: 13px; font-weight: 500; text-decoration: none; }
.h3-acts { display: flex; gap: 14px; }

.hoy-banner {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 20px;
  border-radius: var(--radius); background: var(--accent-soft); border: 1px solid rgba(139,124,246,.25); color: #d6d0ff;
}
.hoy-banner > svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.hoy-banner > div { flex: 1; min-width: 0; }
.hoy-banner b { color: var(--text); font-weight: 600; }
.hoy-banner.done { background: var(--blue-soft); border-color: rgba(76,201,240,.2); color: #a9e3f7; }
.hoy-banner.done > svg { stroke: var(--blue); stroke-width: 2.4; }

/* Casilla redonda */
.tick { position: relative; width: 22px; height: 22px; flex: none; cursor: pointer; }
.tick input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.tick i {
  position: absolute; inset: 0; border-radius: 50%; border: 1.6px solid var(--text-3);
  display: grid; place-items: center; transition: background .15s, border-color .15s; pointer-events: none;
}
.tick i svg { width: 13px; height: 13px; fill: none; stroke: #0b0b10; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.tick input:checked + i { background: var(--accent); border-color: var(--accent); }
.tick input:checked + i svg { opacity: 1; }
.tick input:disabled + i { opacity: .35; }
.tick input:focus-visible + i { box-shadow: 0 0 0 3px var(--accent-soft); }
.tick:hover input:not(:disabled):not(:checked) + i { border-color: var(--accent); }

/* Prioridades */
.prios { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.prios li { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.prios li + li { border-top: 1px solid var(--line); }
.prio-in {
  flex: 1; min-width: 0; height: 36px; background: transparent; border: 0; border-radius: 8px; padding: 0 8px; margin-left: -8px;
  font-size: 15px; font-weight: 500;
}
.prio-in::placeholder { color: var(--text-3); font-weight: 400; }
.prio-in:hover { background: rgba(255,255,255,.03); }
.prio-in:focus { outline: none; background: rgba(118,118,128,.14); }
.prios li.done .prio-in { color: var(--text-3); text-decoration: line-through; }

/* Tareas */
.tg + .tg { margin-top: 16px; }
.tg-t, .tg summary { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.tg-t span, .tg summary span { color: var(--text-3); margin-left: 4px; }
.tg-t.late { color: var(--alert); }
.tg ul { list-style: none; margin: 0; padding: 0; }
.hoy-task { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.hoy-task:last-child { border-bottom: 0; }
.hoy-task .tt { flex: 1; min-width: 0; color: var(--text); text-decoration: none; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hoy-task .tt:hover { color: #c3baff; }
.hoy-task.done .tt { color: var(--text-3); text-decoration: line-through; }
.hoy-task .meta { display: flex; gap: 8px; align-items: center; color: var(--text-3); font-size: 12px; flex: none; }
.hoy-task .meta span { white-space: nowrap; }
.due { padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--text-2); font-size: 12px; font-weight: 500; }
.due.today { background: rgba(232,197,71,.12); color: #e8c547; }
.due.late { background: var(--alert-soft); color: var(--alert); }
.prio { color: var(--alert); font-weight: 600; }
.tg.done-g { margin-top: 14px; }
.tg.done-g summary { cursor: pointer; list-style: none; }
.tg.done-g summary::-webkit-details-marker { display: none; }
.tg.done-g summary::before { content: '›'; display: inline-block; margin-right: 6px; transition: transform .15s; }
.tg.done-g[open] summary::before { transform: rotate(90deg); }

/* Hábitos */
.hoy-habits { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.hoy-habit {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px;
  border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.02); color: var(--text-2);
  font-size: 13px; font-weight: 600; transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.hoy-habit .hb-i { width: 24px; height: 24px; color: var(--c); }
.hoy-habit:hover { border-color: var(--c); color: var(--text); }
.hoy-habit:active { transform: scale(.96); }
.hoy-habit.on { background: var(--c); border-color: var(--c); color: #0b0b10; }
.hoy-habit.on .hb-i { color: #0b0b10; }
.hoy-habits.small { grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.hoy-habits.small .hoy-habit { padding: 10px 4px 9px; font-size: 12px; }
.hoy-habits.small .hoy-habit .hb-i { width: 20px; height: 20px; }
.hoy-hstats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; color: var(--text-2); font-size: 13px; }
.hoy-hstats span { display: inline-flex; align-items: center; gap: 5px; }
.hoy-hstats b { color: var(--text); }
.hoy-hstats svg { width: 15px; height: 15px; fill: var(--text-3); stroke: none; }
.hoy-hstats .lit svg { fill: var(--accent); }
.hoy-xp { height: 5px; margin-top: 10px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.hoy-xp i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--blue)); }

/* Dinero */
.hoy-money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hoy-money .l { color: var(--text-2); font-size: 12px; }
.hoy-money .v { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; white-space: nowrap; }
.hoy-mood { margin-top: 16px; padding: 10px 14px; border-radius: 12px; font-size: 13px; }
.hoy-mood.great { background: var(--accent-soft); color: #c3baff; }
.hoy-mood.ok { background: var(--blue-soft); color: #9adcf5; }
.hoy-mood.bad { background: var(--alert-soft); color: var(--alert); }
.hoy-sub { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 4px; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.hoy-sub .link-btn { text-transform: none; letter-spacing: 0; font-weight: 500; text-decoration: none; }
.hoy-money-acts { display: flex; gap: 8px; margin-top: 18px; }
.up-list { list-style: none; margin: 0; padding: 0; }
.up-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.up-list li:last-child { border-bottom: 0; }
.up-date { width: 82px; flex: none; color: var(--text-2); font-size: 13px; }
.up-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-list .num { font-weight: 600; }

/* ---------- Recurrentes ---------- */
.rec-kpis .per { font-size: 15px; font-weight: 600; color: var(--text-3); margin-left: 2px; }
.rec-kpis .hint b { font-weight: 600; }
.rec-grid { grid-template-columns: 1fr; }
.rec-grid .up-list { columns: 2; column-gap: 40px; }
.rec-grid .up-list li { break-inside: avoid; }
.rec-name { font-weight: 600; color: var(--text); }
tr.paused td { opacity: .5; }
tr.paused td.acts { opacity: 1; }
.rec-sugg { margin-bottom: 20px; padding: 22px 26px; border-color: rgba(139,124,246,.25); }
.rec-sugg h3 { margin-bottom: 8px; }
.rec-sugg ul { list-style: none; margin: 0; padding: 0; }
.rec-sugg li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rec-sugg li:last-child { border-bottom: 0; }
.rec-sugg .tx-main { flex: 1; min-width: 0; }
.rec-sugg .tx-main .t { font-weight: 600; }
.rec-sugg .tx-main .s { color: var(--text-3); font-size: 12px; margin-top: 2px; }
.rec-sugg .tx-amt { font-weight: 600; margin-right: 6px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin: 2px 0 10px; cursor: pointer; }
.check-row input { accent-color: var(--accent); width: 16px; height: 16px; }
.hint-p { font-size: 12px; color: var(--text-3) !important; margin: 0 0 4px !important; }

/* ---------- Captura rápida ---------- */
.backdrop:has(.qc-modal) { place-items: start center; padding-top: 14vh; }
.modal.qc-modal { max-width: 620px; padding: 0; overflow: hidden; }
.qc-input { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.qc-input svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.qc-input input { flex: 1; min-width: 0; background: transparent; border: 0; font-size: 19px; font-weight: 500; }
.qc-input input:focus { outline: none; }
.qc-input input::placeholder { color: var(--text-3); }
.qc-kinds { display: flex; gap: 6px; padding: 14px 22px 0; }
.qc-kinds button { height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); font-size: 12px; font-weight: 600; }
.qc-kinds button.on { background: var(--accent); border-color: var(--accent); color: #0b0b10; }
.qc-kinds button.forced::after { content: ' ·'; }
.qc-preview { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 22px; min-height: 58px; align-items: center; }
.qc-chip { padding: 4px 10px; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--text-2); font-size: 13px; }
.qc-chip.strong { background: var(--card-2); color: var(--text); font-weight: 600; }
.qc-chip.pos { color: var(--blue); }
.qc-err { color: var(--alert); font-size: 13px; }
.qc-ph { color: var(--text-3); font-size: 13px; }
.qc-help { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 22px 16px; color: var(--text-3); font-size: 12px; }
.qc-ex { border: 0; background: transparent; color: #a99cff; font-size: 12px; padding: 2px 6px; border-radius: 6px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.qc-ex:hover { background: var(--accent-soft); }
.qc-foot { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 22px; border-top: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--text-3); font-size: 12px; }
.qc-foot span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Cerrar el día ---------- */
.modal.cd-modal { max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; }
.cd-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 6px; }
.cd-sum div { background: rgba(255,255,255,.04); border-radius: 12px; padding: 12px 14px; }
.cd-sum b { display: block; font-size: 20px; letter-spacing: -0.02em; }
.cd-sum span { color: var(--text-2); font-size: 12px; }
.cd-sec { margin-top: 20px; }
.cd-t { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.cd-t .muted { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-3); }
.cd-t .link-btn { text-transform: none; letter-spacing: 0; font-weight: 500; }
.cd-pend { list-style: none; margin: 0; padding: 0; }
.cd-pend li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.cd-pend li:last-child { border-bottom: 0; }
.cd-pend .tt { flex: 1; min-width: 0; font-weight: 500; }
.cd-pend select, .cd-add, .cd-prio, #cd-note {
  background: rgba(118,118,128,.18); border: 1px solid transparent; border-radius: 10px;
}
.cd-pend select { height: 32px; padding: 0 10px; font-size: 13px; appearance: none; -webkit-appearance: none; }
.cd-add, .cd-prio { width: 100%; height: 38px; padding: 0 12px; margin-top: 8px; }
.cd-prio:first-of-type { margin-top: 0; }
#cd-note { width: 100%; padding: 10px 12px; resize: vertical; }
.cd-pend select:focus, .cd-add:focus, .cd-prio:focus, #cd-note:focus { outline: none; border-color: var(--accent); }
.cd-add-prev { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cd-add-prev:empty { display: none; }
.tx-list.mini li { padding: 8px 0; gap: 12px; }
.tx-list.mini .tx-icon { width: 30px; height: 30px; font-size: 13px; }

@media (max-width: 1100px) {
  .hoy-grid, .rec-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .nav a { flex: none; }
  .qc-trigger { display: none; }
  .hoy-card h3 .muted { display: none; }
  .rec-grid .up-list { columns: 1; }
  .hoy-card { padding: 20px 18px; }
  .hoy-money .v { font-size: 16px; }
  .hoy-banner { flex-wrap: wrap; }
  .hoy-task .meta span:not(.due) { display: none; }
  .backdrop:has(.qc-modal) { padding-top: 16px; }
  .qc-foot span:nth-child(n+2) { display: none; }
}
