/* plan en el perfil */
.plan-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 6px; padding: 12px 14px; border-radius: 12px; background: rgba(108,205,247,.08); border: 1px solid rgba(108,205,247,.25); }
.plan-box > div:first-child { display: grid; gap: 2px; }
.plan-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* =========================================================
   LIA9017 — Modo hoy y Calendario
   ========================================================= */

.link-btn { border: 0; background: none; padding: 0; color: var(--blue-300); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cal-source { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-source svg { width: 14px; height: 14px; color: var(--blue-300); }
.cal-source a { color: var(--blue-300); }
.cal-source .link-btn { margin-left: 6px; }
button.task-title.as-link { border: 0; background: none; padding: 0; text-align: left; font: inherit; font-weight: 500; font-size: 15px; color: inherit; cursor: pointer; max-width: 100%; }
button.task-title.as-link:hover { text-decoration: underline; text-decoration-color: var(--line-strong); }
.event[data-dash-ev] { cursor: pointer; }
.event[data-dash-ev]:hover { filter: brightness(1.15); }

/* ---------- Modo hoy: carga ---------- */
.today-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.load-card { display: grid; grid-template-columns: minmax(220px, auto) 1fr; gap: 10px 22px; align-items: center; padding: 18px 22px; }
.load-info { display: flex; flex-direction: column; gap: 2px; }
.load-title { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.load-title svg { width: 15px; height: 15px; color: var(--blue-300); }
.load-info strong { font-size: 22px; font-weight: 600; }
.load-info strong span { font-size: 13.5px; font-weight: 400; color: var(--muted); }
.load-bar { height: 12px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.load-bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .6s ease; }
.load-card.over .load-bar i { background: linear-gradient(90deg, var(--warn), var(--danger)); }
.load-msg { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.load-msg svg { width: 16px; height: 16px; color: var(--ok); }
.load-card.over .load-msg svg { color: var(--warn); }
.load-card.over .load-msg { color: #F7C77E; }

.overdue-card { border-color: rgba(255,107,107,.3); }
.overdue-card h2 { display: flex; align-items: center; gap: 8px; }
.overdue-card h2 svg { color: var(--danger); }

/* ---------- Modo hoy: planilla ---------- */
.sheet-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sheet-toolbar .status-filter { padding-bottom: 0; margin-bottom: 0; }
.sheet-toolbar .segmented button { display: inline-flex; align-items: center; gap: 5px; }
.sheet-toolbar .segmented svg { width: 14px; height: 14px; }

.sheet-add {
  display: grid; grid-template-columns: 170px minmax(0, 1fr) 104px 100px auto auto; gap: 8px;
  padding: 8px; margin-bottom: 12px; border-radius: 14px;
  border: 1px dashed var(--line-strong); background: rgba(255,255,255,.02);
}
.sheet-add:focus-within { border-style: solid; border-color: rgba(108,205,247,.5); }
.sheet-add input, .sheet-add select {
  min-width: 0; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: var(--text); font: inherit; font-size: 14px; outline: none; color-scheme: dark;
}
.sheet-add input:focus, .sheet-add select:focus { border-color: var(--blue-300); }
.sheet-add select option, .sheet-add select optgroup { background: var(--navy-700); }
.toggle.mini span { padding: 9px 10px; height: 100%; }

.sheet { --cols: 40px 70px minmax(200px, 2.4fr) minmax(120px, 1.1fr) 150px 170px 80px 92px; display: flex; flex-direction: column; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.sheet.compact { border-radius: 12px; }
.srow {
  display: grid; grid-template-columns: var(--cols); align-items: center; gap: 0 12px;
  padding: 9px 12px; border-top: 1px solid var(--line); background: var(--surface-2);
  border-left: 3px solid var(--oc, transparent);
  transition: background .15s;
}
.srow:first-child { border-top: 0; }
.srow:hover { background: rgba(255,255,255,.055); }
.shead { background: rgba(0,0,0,.18); border-left-color: transparent; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding-top: 10px; padding-bottom: 10px; }
.shead:hover { background: rgba(0,0,0,.18); }
.srow > div { min-width: 0; }
.c-time { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; display: flex; flex-direction: column; line-height: 1.15; }
.c-time small { font-size: 10.5px; font-weight: 500; color: var(--danger); text-transform: uppercase; letter-spacing: .05em; }
.srow.live .c-time small { color: var(--ok); }
.c-what { display: flex; flex-direction: column; gap: 2px; }
.what-btn { border: 0; background: none; padding: 0; color: inherit; font: inherit; font-size: 14.5px; font-weight: 500; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.what-btn:hover { text-decoration: underline; text-decoration-color: var(--line-strong); }
.what-sub { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.what-sub svg { width: 12px; height: 12px; flex-shrink: 0; }
.origin {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  font-size: 13px; color: var(--oc); text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.origin svg { width: 14px; height: 14px; flex-shrink: 0; }
a.origin:hover { text-decoration: underline; }
.c-prio { display: flex; gap: 4px; flex-wrap: wrap; }
.c-dur { font-size: 13px; color: var(--muted); }
.c-act { display: flex; justify-content: flex-end; }
.c-act .btn-ghost { white-space: nowrap; }
.muted-dash { color: var(--faint); }
.srow.is-done .what-btn { text-decoration: line-through; color: var(--muted); }
.srow.is-done .check { background: var(--oc); border-color: var(--oc); }
.srow.is-done .check svg { opacity: 1; }
.srow.event-r.is-done { opacity: .5; }
.srow.late .c-time { color: var(--danger); }
.srow .check { --pc: var(--oc); }
.event-r { border-left-color: var(--tc); background: color-mix(in srgb, var(--tc) 6%, var(--surface-2)); }
.event-r.live { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 60%, transparent); }
.ev-dot { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in srgb, var(--tc) 22%, transparent); color: var(--tc); }
.ev-dot svg { width: 13px; height: 13px; }
.sgroup { padding: 8px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: rgba(0,0,0,.12); border-top: 1px solid var(--line); }
.sgroup span { display: flex; align-items: center; gap: 6px; }
.sgroup svg { width: 14px; height: 14px; }
.tag-move { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--warn); padding: 3px 8px; border-radius: 99px; background: rgba(245,165,36,.12); }
.sheet .empty { padding: 22px 16px; }
.sheet-card .done-wrap { margin-top: 14px; }

/* ---------- Calendario ---------- */
.cal-alert {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: 14px; font-size: 14px;
  background: rgba(108,205,247,.08); border: 1px solid rgba(108,205,247,.3);
}
.cal-alert span { flex: 1; min-width: 200px; }
.cal-alert > svg { color: var(--blue-300); }
.cal-alert.wide { grid-column: 1 / -1; }

.cal-chooser .card-head { margin-bottom: 14px; }
.chooser-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left;
  padding: 18px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface-2);
  color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, background .2s, transform .15s;
}
.choice:hover { border-color: var(--blue-300); transform: translateY(-2px); }
.choice.active { border-color: var(--blue-300); background: rgba(108,205,247,.1); box-shadow: 0 0 0 1px var(--blue-300); }
.choice strong { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.choice strong em { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--grad); }
.choice > span:last-child { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.choice-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: rgba(201,207,216,.12); color: var(--silver-2); }
.choice-ic.g { background: var(--grad); color: #fff; }
.choice-ic svg { width: 22px; height: 22px; }

.cal-setup h2 { display: flex; align-items: center; gap: 8px; }
.cal-setup h2 svg { color: var(--blue-300); }
.steps { list-style: decimal; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--silver-2); margin-bottom: 14px; }
.steps a { color: var(--blue-300); }
.steps code { font-size: 13px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.07); border: 1px solid var(--line); user-select: all; }
.cal-setup .invite-row { grid-template-columns: 1fr auto; }

.cal-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-toolbar .legend { flex: 1; justify-content: flex-end; }
.nav-group { display: flex; align-items: center; gap: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.cal-week .day { min-height: 300px; }
.cal-week .day.past-day { opacity: .6; }
.cal-week .day-head .icon-btn { opacity: 0; transition: opacity .15s; }
.cal-week .day:hover .day-head .icon-btn, .cal-week .day-head .icon-btn:focus-visible { opacity: 1; }
button.event { width: 100%; text-align: left; font: inherit; font-size: 13px; color: inherit; cursor: pointer; }
button.event:hover { filter: brightness(1.15); }

.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.mhead { padding: 8px 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); background: rgba(0,0,0,.18); }
.mcell {
  min-height: 108px; padding: 6px; display: flex; flex-direction: column; gap: 3px;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface-2); cursor: pointer;
  min-width: 0;
}
.mcell:nth-child(7n + 1) { border-left: 0; }
.mcell:hover { background: rgba(255,255,255,.05); }
.mcell.out { opacity: .4; }
.mcell.today { background: rgba(47,123,224,.14); }
.mnum { font-size: 13px; font-weight: 600; padding: 2px 4px; }
.mcell.today .mnum { color: var(--blue-300); }
.mchip {
  display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0;
  padding: 2px 6px; border-radius: 6px; border: 0; font: inherit; font-size: 11.5px; text-align: left;
  color: var(--text); background: color-mix(in srgb, var(--tc) 16%, transparent); cursor: pointer;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.mchip .sw { width: 6px; height: 6px; border-radius: 50%; background: var(--tc); flex-shrink: 0; }
.mchip.past { opacity: .55; }
.mmore { font-size: 11px; color: var(--muted); padding: 0 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1440px) {
  .sheet { --cols: 36px 62px minmax(180px, 2fr) minmax(110px, 1fr) 140px 150px 70px 86px; }
}
@media (max-width: 1280px) {
  /* la planilla pasa a filas tipo tarjeta */
  .srow.shead { display: none; }
  .srow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; }
  .c-check { order: 0; width: 24px; }
  .c-time { order: 1; width: 50px; }
  .c-what { order: 2; flex: 1 0 calc(100% - 210px); }
  .c-act { order: 3; margin-left: auto; }
  .c-origin { order: 4; margin-left: 84px; }
  .c-status { order: 5; }
  .c-prio { order: 6; }
  .c-dur { order: 7; margin-left: auto; }
  .srow .muted-dash { display: none; }
  .sheet-add { grid-template-columns: 150px minmax(0, 1fr) 100px 96px auto auto; }
  .cal-week { grid-template-columns: repeat(7, minmax(150px, 1fr)); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .cal-week .day { scroll-snap-align: start; min-height: 220px; }
}
@media (max-width: 760px) {
  .load-card { grid-template-columns: 1fr; padding: 16px; }
  .today-actions { width: 100%; }
  .today-actions .btn { flex: 1; }
  .sheet-add { grid-template-columns: 1fr 1fr; }
  .sheet-add [name=title] { grid-column: 1 / -1; order: -1; }
  .sheet-add .btn span { display: inline; }
  .c-origin { margin-left: 0; flex-basis: 100%; padding-left: 84px; }
  .c-what { flex-basis: calc(100% - 100px); }
  .chooser-grid { grid-template-columns: 1fr; }
  .cal-toolbar .legend { display: none; }
  .cal-toolbar .btn.primary { margin-left: auto; }
  .cal-week { grid-template-columns: repeat(7, 78%); }
  .cal-week .day-head .icon-btn { opacity: 1; }
  .mcell { min-height: 64px; padding: 4px; }
  .mchip { font-size: 0; padding: 0; height: 6px; background: var(--tc); }
  .mchip .sw { display: none; }
  .mmore { font-size: 10px; }
  .cal-setup .invite-row { grid-template-columns: 1fr; }
}

/* ---------- Panel de voz ---------- */
.check-line.big { font-size: 14.5px; color: var(--text); }
.voice-profiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vprof input { position: absolute; opacity: 0; pointer-events: none; }
.vprof span {
  display: flex; flex-direction: column; gap: 2px; cursor: pointer;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface-2);
  transition: border-color .15s, background .15s;
}
.vprof strong { font-weight: 600; font-size: 14.5px; }
.vprof small { font-size: 12.5px; color: var(--muted); }
.vprof input:checked + span { border-color: var(--blue-300); background: rgba(108,205,247,.12); box-shadow: 0 0 0 1px var(--blue-300); }
.vprof input:focus-visible + span { outline: 2px solid var(--blue-300); outline-offset: 2px; }
.field input[type=range] { accent-color: var(--blue-500); padding: 0; border: 0; background: none; box-shadow: none; }
@media (max-width: 760px) { .voice-profiles { grid-template-columns: 1fr; } }

/* =========================================================
   Tareas recurrentes (pantalla del dashboard)
   ========================================================= */
:root { --c-recurrente: #C9CFD8; }
[data-show][hidden] { display: none !important; }
.rec-card h2 { display: flex; align-items: center; gap: 8px; }
.rec-card h2 svg { color: var(--blue-300); }
.rec-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }

/* la «pantalla» */
.rec-screen {
  position: relative; overflow: hidden; border-radius: 18px; padding: 16px;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px),
    radial-gradient(420px 200px at 20% 0%, rgba(108,205,247,.16), transparent 70%),
    linear-gradient(180deg, #071029, #0A1636);
  border: 1px solid rgba(108,205,247,.28);
  box-shadow: inset 0 0 0 4px rgba(0,0,0,.35), inset 0 0 40px rgba(47,123,224,.12), 0 10px 30px rgba(0,0,0,.35);
}
.rs-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px dashed rgba(108,205,247,.25); }
.rs-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 12px;
  background: rgba(108,205,247,.1); border: 1px solid rgba(108,205,247,.3); color: var(--blue-300); line-height: 1; }
.rs-date b { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 0 12px rgba(108,205,247,.6); }
.rs-date small { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin-top: 2px; }
.rs-title { flex: 1; font-size: 16px; font-weight: 600; letter-spacing: .01em; }
.rs-led { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.rs-led.on { background: var(--blue-300); box-shadow: 0 0 10px var(--blue-300); animation: blink 1.6s infinite; }
.rs-led.late { background: var(--danger); box-shadow: 0 0 12px var(--danger); animation: blink 1s infinite; }
.rs-list { display: flex; flex-direction: column; gap: 8px; padding: 12px 0 4px; }
.rs-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.rs-list li.late { border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.07); }
.rs-list li.done { opacity: .55; }
.rs-list li.done strong { text-decoration: line-through; }
.rs-check { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; cursor: pointer;
  border: 1.5px solid rgba(108,205,247,.5); background: transparent; color: transparent; transition: all .15s; }
.rs-check:hover { background: rgba(108,205,247,.12); }
.rs-check svg { width: 16px; height: 16px; }
.rs-list li.done .rs-check { background: var(--blue-300); border-color: var(--blue-300); color: #0B1530; }
.rs-list li.late .rs-check { border-color: rgba(255,107,107,.6); }
.rs-txt { min-width: 0; display: flex; flex-direction: column; }
.rs-txt strong { font-weight: 500; font-size: 15px; }
.rs-txt small { font-size: 12.5px; color: var(--muted); }
.rs-list li.late small { color: #FF9E9E; }
.rs-empty { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; background: none !important; border: 0 !important; padding-left: 0 !important; }
.rs-empty svg { color: var(--ok); width: 18px; height: 18px; flex-shrink: 0; }
.rs-empty b { color: var(--text); font-weight: 500; }
.rs-next { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(108,205,247,.2); font-size: 12px; color: var(--faint); }
.rs-next > span:first-child { text-transform: uppercase; letter-spacing: .1em; margin-right: 4px; }
.rs-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.05); color: var(--silver-2); font-size: 12px; }
.rs-chip svg { width: 12px; height: 12px; color: var(--blue-300); }

/* lista de todas */
.rec-all { display: flex; flex-direction: column; gap: 6px; max-height: 330px; overflow-y: auto; scrollbar-width: thin; }
.rec-all li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.rec-ic { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: rgba(201,207,216,.1); color: var(--silver-2); }
.rec-ic svg { width: 16px; height: 16px; }
.rec-info { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; display: flex; flex-direction: column; }
.rec-info strong { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-info small { font-size: 12px; color: var(--muted); }
.rec-info:hover strong { text-decoration: underline; text-decoration-color: var(--line-strong); }
.rec-next { font-size: 12px; color: var(--blue-300); white-space: nowrap; font-weight: 500; }

/* en calendarios */
.event.rec { border-style: dashed; }
.event.rec .ev-time { color: var(--silver-2); }
.rec-when { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 900px) {
  .rec-grid { grid-template-columns: 1fr; }
  .rec-all { max-height: none; }
}
