/* =========================================================
   LIA9017 — Proyectos, tareas y modales
   ========================================================= */

/* ---------- Vistas ---------- */
.view { display: flex; flex-direction: column; gap: 22px; }
.view[hidden] { display: none; }
.view.anim .gauge .value { animation: gauge-in 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes gauge-in { from { stroke-dashoffset: var(--full); } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 14px; border-radius: 12px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  text-decoration: none; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .1s;
}
.btn:hover { background: rgba(255,255,255,.08); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(47,123,224,.3); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: #FF8F8F; border-color: rgba(255,107,107,.35); }
.btn.danger:hover { background: rgba(255,107,107,.1); }
.del-warn { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: rgba(255,107,107,.08); border: 1px solid rgba(255,107,107,.3); margin-bottom: 14px; }
.del-warn > svg { flex: none; color: #FF8F8F; width: 20px; height: 20px; margin-top: 2px; }
.del-warn ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; color: var(--silver-2); }
.del-warn b { color: #fff; font-weight: 500; }
.btn.sm { padding: 6px 10px; font-size: 12.5px; border-radius: 10px; }
.btn svg { width: 16px; height: 16px; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 10px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.icon-btn.danger { color: #FF8F8F; }
.icon-btn.wa { color: var(--c-whatsapp); }
a.icon-btn { color: inherit; }
.icon-btn:disabled { opacity: .4; cursor: default; }

/* ---------- Dashboard: relojes clicables ---------- */
a.ring-card, button.ring-card { color: inherit; text-decoration: none; cursor: pointer; font: inherit; }
a.ring-card:focus-visible, .pcard-link:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 2px; }
.ring-card.add {
  border-style: dashed; border-color: var(--line-strong); background: transparent;
  justify-content: center; gap: 4px;
}
.ring-card.add::before { display: none; }
.ring-card.add:hover { border-color: var(--blue-300); background: rgba(108,205,247,.05); }
.add-ic {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(108,205,247,.12); color: var(--blue-300); margin-bottom: 6px;
}
.add-ic svg { width: 26px; height: 26px; }
.ring-meta .mini, .ring-meta svg { width: 12px; height: 12px; vertical-align: -1px; margin: 0 2px 0 2px; }
a.task-title { color: inherit; text-decoration: none; }
a.task-title:hover { text-decoration: underline; text-decoration-color: var(--line-strong); }

.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px 2px 7px; border-radius: 99px; font-size: 12px; font-weight: 500;
  color: var(--sc); background: color-mix(in srgb, var(--sc) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--sc) 30%, transparent);
}
.status-pill svg, .task-meta .status-pill svg { width: 12px; height: 12px; }

/* ---------- Lista de proyectos ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.pcard {
  --pc: var(--blue-500);
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background:
    radial-gradient(240px 120px at 0% 0%, color-mix(in srgb, var(--pc) 18%, transparent), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
  transition: transform .2s, border-color .2s;
}
.pcard:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pc) 50%, transparent); }
.pcard-link { display: flex; gap: 16px; align-items: center; color: inherit; text-decoration: none; }
.pcard .gauge.sm { width: 88px; max-width: 88px; flex-shrink: 0; }
.pcard-info { min-width: 0; }
.pcard h3 { font-size: 17px; font-weight: 600; }
.pcard-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 2px; font-size: 13px; color: var(--muted); }
.pcard-stats span { display: inline-flex; align-items: center; gap: 4px; }
.pcard-stats b { color: var(--pc); font-weight: 600; }
.pcard-stats svg { width: 13px; height: 13px; }
.ring-meta.overdue { color: var(--danger); }
.pcard.add {
  align-items: center; justify-content: center; text-align: center; min-height: 128px;
  border-style: dashed; border-color: var(--line-strong); background: transparent; box-shadow: none;
  color: inherit; font: inherit; cursor: pointer;
}
.pcard.add:hover { border-color: var(--blue-300); }
.pcard .btn-ghost { align-self: flex-start; }

.empty { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 16px 4px; font-size: 14px; }
.empty.big { flex-direction: column; justify-content: center; padding: 80px 20px; text-align: center; }
.empty.big svg { width: 42px; height: 42px; color: var(--faint); }

/* ---------- Cabecera de proyecto ---------- */
.guest-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 14px; font-size: 14px;
  background: rgba(181,140,255,.12); border: 1px solid rgba(181,140,255,.35); color: #D9C7FF;
}
.guest-banner span { flex: 1; min-width: 200px; }
.guest-banner b { color: #fff; font-weight: 500; }
.guest-banner .btn-ghost { color: #D9C7FF; border-color: rgba(181,140,255,.4); }
body.guest .sidebar { display: none; }
body.guest .app { grid-template-columns: minmax(0, 1fr) var(--assistant-w); }
body.guest #chips button[data-q="Mi agenda de hoy"] { display: none; }
@media (max-width: 1100px) {
  body.guest .app { grid-template-columns: minmax(0, 1fr); }
  body.guest .lia-fab { right: 18px; }
}

.proj-head { --pc: var(--blue-500); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.proj-badge {
  width: 58px; height: 58px; border-radius: 18px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pc) 85%, #000), var(--pc));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--pc) 40%, transparent), inset 0 1px 0 rgba(255,255,255,.25);
}
.proj-badge svg { width: 28px; height: 28px; }
.proj-title { flex: 1; min-width: 220px; }
.proj-title .eyebrow { color: var(--pc); }
.proj-title h1 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; margin-top: 2px; }
.proj-title .sub { display: flex; align-items: center; gap: 6px; color: var(--muted); margin-top: 4px; font-size: 14px; }
.proj-title .sub svg { width: 15px; height: 15px; }
.proj-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Resumen ---------- */
.proj-summary { display: flex; gap: 26px; align-items: center; }
.proj-summary .gauge { width: 120px; max-width: 120px; flex-shrink: 0; }
.proj-summary .gauge .value { stroke: var(--pc); }
.gauge-sub { font-size: 12px; color: var(--muted); }
.sum-grid { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr); gap: 14px; }
.sum { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.sum span { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sum strong { font-size: 22px; font-weight: 600; }
.sum.bad strong { color: var(--danger); }
.pace { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.pace.ok { background: rgba(52,211,153,.15); color: var(--ok); }
.pace.warn { background: rgba(245,165,36,.15); color: var(--warn); }
.pace.bad { background: rgba(255,107,107,.15); color: var(--danger); }
.tl { position: relative; height: 10px; border-radius: 99px; background: rgba(255,255,255,.07); margin: 6px 0 2px; }
.tl i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, rgba(201,207,216,.25), rgba(201,207,216,.45)); }
.tl b {
  position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--pc); box-shadow: 0 0 0 3px var(--navy-700), 0 0 12px var(--pc);
}
.sum small { color: var(--faint); font-size: 11.5px; }

/* ---------- Layout del proyecto ---------- */
.proj-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.proj-side { display: flex; flex-direction: column; gap: 22px; }
.proj-side .card { padding: 18px; }
.proj-side .card-head { margin-bottom: 12px; }
.proj-side h2 { font-size: 17px; }
.lia-sub { display: flex; align-items: center; gap: 6px; }
.lia-sub svg { width: 14px; height: 14px; color: var(--blue-300); }

.quick-add {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 6px 4px 14px; margin-bottom: 14px;
  border-radius: 14px; border: 1px dashed var(--line-strong); background: rgba(255,255,255,.02);
}
.quick-add:focus-within { border-style: solid; border-color: var(--blue-300); }
.quick-add svg { color: var(--blue-300); }
.quick-add input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14.5px; padding: 10px 0; }
.quick-add input::placeholder { color: var(--faint); }

.status-filter { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; scrollbar-width: none; }
.status-filter::-webkit-scrollbar { display: none; }
.status-filter button {
  --sc: var(--blue-300);
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 99px; font-size: 12.5px;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
}
.status-filter button b { font-weight: 600; color: var(--text); font-size: 11.5px; }
.status-filter button[data-empty] { opacity: .5; }
.status-filter button.active { color: #fff; border-color: var(--sc); background: color-mix(in srgb, var(--sc) 18%, transparent); }
.status-filter button[data-filter="all"].active { background: rgba(108,205,247,.15); border-color: var(--blue-300); }
.sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }

/* ---------- Filas de tareas del proyecto ---------- */
.ptask-list { display: flex; flex-direction: column; gap: 8px; }
.ptask {
  --sc: var(--muted);
  position: relative;
  display: grid; grid-template-columns: 26px 22px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface-2);
  border-left: 3px solid var(--sc);
  transition: background .2s;
}
.ptask:hover { background: rgba(255,255,255,.06); }
.ptask.is-urgent { box-shadow: inset 0 0 0 1px rgba(255,107,107,.3); }
.ptask .task-rank { padding-top: 2px; }
.ptask .check { margin-top: 1px; }
.ptask:nth-child(-n+3) .task-rank { color: var(--blue-300); }
.ptask-body { min-width: 0; cursor: pointer; outline: none; border-radius: 8px; }
.ptask-body:focus-visible { box-shadow: 0 0 0 2px var(--blue-300); }
.ptask-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-weight: 500; font-size: 15px; }
.ptask.is-done .ptask-title span:first-child { text-decoration: line-through; color: var(--muted); }
.ptask.is-done .check { background: var(--sc); border-color: var(--sc); }
.ptask.is-done .check svg { opacity: 1; }
.ptask .check:disabled { cursor: default; }
.lia-why {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 7px;
  font-size: 12px; color: var(--blue-300);
  padding: 3px 9px; border-radius: 8px; background: rgba(108,205,247,.08);
}
.lia-why svg { width: 13px; height: 13px; }
.ptask-list.done .ptask { opacity: .75; border-left-color: var(--faint); }
.ptask-list.done .task-rank { visibility: hidden; }
.done-wrap.archive summary { display: flex; align-items: center; gap: 8px; }
.done-wrap.archive summary svg { width: 15px; height: 15px; }

.status-select {
  position: relative; display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 6px 2px 7px; border-radius: 99px; font-size: 12px; font-weight: 500;
  color: var(--sc); background: color-mix(in srgb, var(--sc) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--sc) 30%, transparent);
  cursor: pointer;
}
.task-meta .status-select svg { width: 12px; height: 12px; }
.status-select select {
  appearance: none; -webkit-appearance: none; border: 0; outline: 0; background: transparent;
  color: inherit; font: inherit; cursor: pointer; padding-right: 14px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 6px) 55%, calc(100% - 2px) 55%; background-size: 4px 4px; background-repeat: no-repeat;
}
.status-select select option { background: var(--navy-700); color: var(--text); }
.status-select:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--sc) 50%, transparent); }

/* ---------- Equipo y contactos ---------- */
.people { display: flex; flex-direction: column; gap: 4px; }
.people li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 12px; }
.people li.hint { display: block; }
.pav {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: rgba(201,207,216,.12); color: var(--silver-2); border: 1px solid var(--line-strong);
}
.pav.owner { background: var(--grad); border-color: transparent; color: #fff; }
.pav.c { background: rgba(108,205,247,.12); color: var(--blue-300); border-color: rgba(108,205,247,.25); border-radius: 11px; }
.pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.pinfo strong { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinfo span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinfo.as-btn { border: 0; background: transparent; padding: 0; color: inherit; }
.pinfo.as-btn:not(:disabled):hover strong { text-decoration: underline; }
.cacts { display: flex; gap: 4px; flex-shrink: 0; }
.mstate { font-style: normal; font-weight: 500; }
.mstate.activo { color: var(--ok); }
.mstate.pendiente { color: var(--warn); }
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; }
.hint svg { width: 14px; height: 14px; margin-top: 2px; flex-shrink: 0; color: var(--blue-300); }

/* =========================================================
   MODALES
   ========================================================= */
.modal {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--line-strong); border-radius: 22px;
  background: linear-gradient(180deg, #16284F, #0F1D3D);
  color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.6);
  overflow: hidden;
}
.modal.wide { width: min(760px, calc(100vw - 24px)); }
.modal[open] { display: flex; flex-direction: column; animation: modal-in .22s ease; }
.modal::backdrop { background: rgba(4,9,22,.65); backdrop-filter: blur(4px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-form { display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 34px); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 20px; font-weight: 600; }
.proj-eyebrow { display: flex; align-items: center; gap: 6px; color: var(--pc); margin-bottom: 2px; letter-spacing: .08em; }
.proj-eyebrow svg { width: 14px; height: 14px; }
.modal-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 18px 22px; display: flex; flex-direction: column; gap: 16px;
  border: 0; margin: 0; min-width: 0;
}
.modal-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); background: rgba(0,0,0,.12); }
.spacer { flex: 1; }
.kav.resp { background: color-mix(in srgb, var(--blue-500) 30%, transparent); color: #fff; box-shadow: 0 0 0 1.5px var(--blue-300); }
.kav.resp.me { background: color-mix(in srgb, #2ED3A0 30%, transparent); box-shadow: 0 0 0 1.5px #2ED3A0; }
.resp-picker .cchip.me b { background: color-mix(in srgb, #2ED3A0 30%, transparent); color: #fff; }
.resp-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; align-items: center; }
.resp-filter { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); }
.resp-filter svg { width: 15px; height: 15px; }
.resp-filter select { background: transparent; border: 0; color: var(--text); font: inherit; font-size: 13.5px; padding: 4px; }
.resp-names { color: var(--blue-300); }
.tf-set { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.rem-field > span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rem-field > span svg { width: 15px; height: 15px; color: #F7BC5A; }
.rem-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rem-row select { flex: 0 1 170px; }
.rem-row input { flex: 1 1 200px; min-width: 0; }
.rem-hint:empty { display: none; }
.rem-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #F7BC5A; }
.rem-badge svg { width: 13px; height: 13px; }
.fu-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #B58CFF; }
.fu-badge.ok { color: #2ED3A0; }
.fu-badge svg { width: 13px; height: 13px; }

/* ---------- Tareas rápidas: falta fecha y prioridad ---------- */
.need-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; min-height: 24px;
  border-radius: 999px; border: 1px dashed rgba(247, 188, 90, .7); background: rgba(247, 188, 90, .1);
  color: #F7BC5A; font: inherit; font-size: 12px; cursor: pointer;
}
.need-badge:hover, .need-badge:focus-visible { background: rgba(247, 188, 90, .22); outline: none; }
.need-badge svg { width: 13px; height: 13px; }
.tri-count { font-size: 13px; font-weight: 500; color: var(--text-dim, #AEB8CC); margin-left: 6px; }
.tri-task { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-strong); }
.tri-task strong { display: block; font-size: 16px; }
.tri-task span { font-size: 13px; color: var(--text-dim, #AEB8CC); }
.tri-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); flex: none; }
.tri-q { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-weight: 600; }
.tri-q svg { width: 17px; height: 17px; color: #6CCDF7; }
.tri-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tri-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .03);
  color: inherit; font: inherit; font-size: 14px; cursor: pointer;
}
.tri-chip small { font-size: 12px; color: var(--text-dim, #AEB8CC); }
.tri-chip svg { width: 15px; height: 15px; }
.tri-chip:hover, .tri-chip:focus-visible, .tri-chip:focus-within { border-color: rgba(108, 205, 247, .6); outline: none; }
.tri-chip.on { background: rgba(26, 71, 168, .55); border-color: #6CCDF7; }
.tri-chip.on small { color: inherit; }
.tri-chip input[type=date] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.tri-chip.prio-urgente svg { color: #FF6B6B; }
.tri-chip.prio-importante svg { color: #F7BC5A; }

/* ---------- Tarjeta «¿Le hago seguimiento?» ---------- */
.fu-card {
  position: fixed; left: 50%; bottom: 76px; z-index: 70; /* el aviso de «completada» queda debajo */
  width: min(440px, calc(100vw - 32px));
  transform: translate(-50%, 24px); opacity: 0; transition: opacity .22s, transform .22s;
  background: var(--navy-600); border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: var(--shadow); padding: 14px 16px 16px;
}
.fu-card.show { opacity: 1; transform: translate(-50%, 0); }
.fu-card.strong { border-color: rgba(181, 140, 255, .55); }
.fu-title { display: flex; align-items: center; gap: 8px; margin: 0 28px 4px 0; font-size: 14px; color: var(--text-dim, #AEB8CC); }
.fu-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-title b { color: #2ED3A0; font-weight: 600; }
.fu-title svg { width: 16px; height: 16px; color: #2ED3A0; flex: none; }
.fu-q { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.fu-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fu-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid rgba(108, 205, 247, .45); background: rgba(26, 71, 168, .35);
  color: inherit; font: inherit; font-size: 14px; cursor: pointer;
}
.fu-chip:hover, .fu-chip:focus-visible { background: rgba(26, 71, 168, .7); outline: none; }
.fu-chip.ghost { background: transparent; border-color: var(--line-strong); }
.fu-chip svg { width: 15px; height: 15px; }
.fu-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; opacity: .7; }
.fu-x:hover { opacity: 1; background: rgba(255, 255, 255, .06); }
.fu-x svg { width: 16px; height: 16px; }
.fu-pick { display: flex; gap: 8px; margin-top: 10px; }
.fu-pick[hidden] { display: none; }
.fu-pick input { flex: 1; min-width: 0; min-height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, .2); color: inherit; font: inherit; color-scheme: dark; }
@media (max-width: 700px) { .fu-card { bottom: calc(72px + env(safe-area-inset-bottom)); } }

/* ---------- Campos ---------- */
.field { display: flex; flex-direction: column; gap: 7px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: 13px; color: var(--muted); font-weight: 500; padding: 0; }
.field small { font-weight: 400; color: var(--faint); }
.field.inline { flex-direction: row; align-items: center; gap: 10px; }
.field input:not([type=radio]):not([type=checkbox]):not([type=color]), .field select, .field textarea, .invite-row input, .invite-row select {
  width: 100%; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.04);
  color: var(--text); font: inherit; font-size: 14.5px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field.inline select { width: auto; }
.field input:focus, .field select:focus, .field textarea:focus, .invite-row input:focus {
  border-color: var(--blue-300); box-shadow: 0 0 0 3px rgba(108,205,247,.15);
}
.field textarea { resize: vertical; min-height: 76px; }
.field select option, .invite-row select option { background: var(--navy-700); }
input[type="date"], input[type="datetime-local"] { color-scheme: dark; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.three { grid-template-columns: 1fr 1fr 1.1fr; }
.form-error { color: #FF8F8F; font-size: 13px; background: rgba(255,107,107,.1); padding: 8px 12px; border-radius: 10px; }
fieldset:disabled .dropzone, fieldset:disabled .att-x, fieldset:disabled .inline-add { display: none; }

.dur { display: flex; align-items: center; gap: 6px; }
.dur input { text-align: center; padding-left: 6px !important; padding-right: 6px !important; }
.dur em { font-style: normal; color: var(--muted); font-size: 13px; }

.toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.toggle input, .status-picker input, .swatch input, .icon-opt input, .seg-radio input, .cchip input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 9px 12px; border-radius: 12px; font-size: 13.5px;
  border: 1px solid var(--line-strong); color: var(--muted); transition: all .15s;
}
.toggle svg { width: 15px; height: 15px; }
.toggle.urgent input:checked + span { background: rgba(255,107,107,.16); border-color: #FF6B6B; color: #FF9E9E; }
.toggle.imp input:checked + span { background: rgba(245,165,36,.16); border-color: #F5A524; color: #F7BC5A; }
.toggle input:focus-visible + span, .status-picker input:focus-visible + span, .seg-radio input:focus-visible + span,
.icon-opt input:focus-visible + span, .swatch input:focus-visible + span, .cchip input:focus-visible + span { outline: 2px solid var(--blue-300); outline-offset: 2px; }

.status-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.status-picker label span {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 7px 11px; border-radius: 99px; font-size: 13px;
  border: 1px solid var(--line-strong); color: var(--muted); transition: all .15s;
}
.status-picker svg { width: 14px; height: 14px; color: var(--sc); }
.status-picker input:checked + span {
  color: #fff; border-color: var(--sc); background: color-mix(in srgb, var(--sc) 22%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--sc) 25%, transparent);
}

/* ---------- ¿Qué hay que hacer? gestionar / contactar ---------- */
.act-seg, .chan-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.act-seg input, .chan-chips input { position: absolute; opacity: 0; pointer-events: none; }
.act-seg label span {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 40px;
  padding: 0 16px; border-radius: 12px; font-size: 14px;
  border: 1px solid var(--line-strong); color: var(--muted); transition: all .15s;
}
.act-seg svg { width: 16px; height: 16px; }
.act-seg input:checked + span { color: #fff; border-color: var(--blue-300); background: rgba(108,205,247,.14); }
.chan-chips label span {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 7px 12px; border-radius: 99px; font-size: 13px;
  border: 1px solid var(--line-strong); color: var(--muted); transition: all .15s;
}
.chan-chips svg { width: 14px; height: 14px; }
.chan-chips input:checked + span { color: #fff; border-color: #2ED3A0; background: rgba(46,211,160,.14); }
.act-seg input:focus-visible + span, .chan-chips input:focus-visible + span { outline: 2px solid var(--blue-300); outline-offset: 2px; }
.act-box { margin-top: 10px; padding: 12px 14px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.025); }
.act-box[hidden] { display: none; }
.act-q { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--silver-2); }
.act-q:not(:first-child) { margin-top: 14px; }
.act-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.act-info { flex: 1; min-width: 160px; display: flex; flex-direction: column; line-height: 1.3; }
.act-info strong { font-weight: 600; font-size: 15px; }
.act-info small { font-size: 12.5px; color: var(--muted); }
.act-go { display: flex; flex-wrap: wrap; gap: 6px; }
.act-go .btn svg { width: 14px; height: 14px; }
.act-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(0,0,0,.18); }
.act-search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.act-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: inherit; font: inherit; outline: none; }
.act-hits { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.cchip-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 99px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--silver-2); font: inherit; font-size: 13px; cursor: pointer;
}
.cchip-btn b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; background: rgba(201,207,216,.12); }
.cchip-btn small { color: var(--faint); font-size: 11.5px; }
.cchip-btn:hover, .cchip-btn:focus-visible { border-color: var(--blue-300); background: rgba(108,205,247,.1); outline: none; }
.cchip-btn.new { padding-left: 12px; color: var(--blue-300); border-style: dashed; }
.cchip-btn.new svg { width: 14px; height: 14px; }
.act-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #2ED3A0; text-decoration: none; }
a.act-badge:hover { text-decoration: underline; }
.act-badge svg { width: 13px; height: 13px; }

.contact-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.cchip span {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 5px 11px 5px 5px; border-radius: 99px; font-size: 13px;
  border: 1px solid var(--line-strong); color: var(--muted); transition: all .15s;
}
.cchip b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; background: rgba(201,207,216,.12); color: var(--silver-2); }
.cchip small { color: var(--faint); font-size: 11.5px; }
.cchip input:checked + span { border-color: var(--blue-300); background: rgba(108,205,247,.12); color: #fff; }
.cchip input:checked + span b { background: var(--grad); color: #fff; }
.inline-add { border: 1px dashed var(--line-strong); border-radius: 12px; }
.inline-add summary { display: flex; align-items: center; gap: 7px; cursor: pointer; padding: 9px 12px; font-size: 13.5px; color: var(--blue-300); list-style: none; }
.inline-add summary::-webkit-details-marker { display: none; }
.inline-add summary svg { width: 15px; height: 15px; }
.inline-add-body { display: flex; flex-direction: column; gap: 10px; padding: 4px 12px 12px; }
.inline-add-body .btn { align-self: flex-start; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check-line input { accent-color: var(--blue-500); width: 16px; height: 16px; }

.dropzone {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 14px 16px; border-radius: 14px; font-size: 13.5px; color: var(--muted);
  border: 1.5px dashed var(--line-strong); background: rgba(255,255,255,.02);
  transition: all .15s;
}
.dropzone svg { width: 22px; height: 22px; color: var(--blue-300); flex-shrink: 0; }
.dropzone u { color: var(--blue-300); }
.dropzone:hover, .dropzone.over, .dropzone:focus-visible { border-color: var(--blue-300); background: rgba(108,205,247,.06); outline: none; }
kbd { font: inherit; font-size: 11.5px; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.06); }

.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.att-grid:empty { display: none; }
.att { position: relative; }
.att-open {
  display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: inherit; text-decoration: none;
}
.att-open:hover { border-color: var(--blue-300); }
.att-thumb, .att-ic {
  height: 78px; border-radius: 8px; background: rgba(255,255,255,.05) center / cover no-repeat;
  display: grid; place-items: center;
}
.att-ic svg { width: 28px; height: 28px; color: var(--blue-300); }
.att-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att small { font-size: 11px; color: var(--faint); }
.att-x {
  position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; padding: 0;
  display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--navy-700); color: var(--muted);
}
.att-x:hover { color: #FF8F8F; border-color: #FF6B6B; }
.att-x svg { width: 13px; height: 13px; }

/* ---------- Editor de proyecto ---------- */
.proj-preview { --pc: var(--blue-500); display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--pc) 10%, transparent); border: 1px solid color-mix(in srgb, var(--pc) 30%, transparent); }
.proj-preview .proj-badge { width: 48px; height: 48px; border-radius: 15px; }
.proj-preview .proj-badge svg { width: 24px; height: 24px; }
.proj-preview strong { display: block; font-size: 16px; font-weight: 600; }
.proj-preview span { font-size: 12.5px; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; cursor: pointer; }
.swatch span { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--c); border: 2px solid transparent; box-shadow: inset 0 0 0 2px rgba(0,0,0,.15); transition: transform .15s; }
.swatch input:checked + span { border-color: #fff; transform: scale(1.1); box-shadow: 0 0 0 3px var(--c); }
.swatch.custom { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; border: 2px dashed var(--line-strong); }
.swatch.custom input[type=color] { width: 44px; height: 44px; margin: -8px; border: 0; padding: 0; cursor: pointer; background: none; }
.swatch.custom:has(input[type=radio]:checked) { border: 2px solid #fff; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.icon-opt span {
  height: 44px; display: grid; place-items: center; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); color: var(--muted); transition: all .15s;
}
.icon-opt span:hover { color: var(--text); border-color: var(--line-strong); }
.icon-opt input:checked + span { color: #fff; border-color: var(--blue-300); background: rgba(108,205,247,.15); }
.seg-radio { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); align-self: flex-start; }
.seg-radio span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg-radio svg { width: 15px; height: 15px; }
.seg-radio input:checked + span { background: var(--grad); color: #fff; }
.collab-box { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 14px; background: rgba(108,205,247,.05); border: 1px solid rgba(108,205,247,.2); }
.collab-box[hidden] { display: none; }

/* ---------- Invitaciones ---------- */
.invite-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.invite-row select { width: auto; }
.invites li { border: 1px solid var(--line); background: var(--surface-2); padding: 8px 10px; flex-wrap: wrap; }
.invites li.hint { border: 0; background: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1440px) {
  .proj-grid { grid-template-columns: minmax(0, 1fr); }
  .proj-side { display: grid; grid-template-columns: 1fr 1fr; }
  .sum-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sum.timeline-box { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .proj-head { position: relative; padding-right: 48px; gap: 12px; }
  .proj-head > .icon-btn:first-child { order: -1; }
  .proj-badge { width: 48px; height: 48px; border-radius: 15px; }
  .proj-title { min-width: 0; flex-basis: calc(100% - 120px); }
  .proj-actions { width: 100%; }
  .proj-actions .btn { flex: 1; }
  .proj-summary { flex-direction: column; align-items: stretch; gap: 16px; }
  .proj-summary .gauge { align-self: center; }
  .sum-grid { grid-template-columns: 1fr 1fr; }
  .sum strong { font-size: 19px; }
  .proj-side { grid-template-columns: 1fr; }
  .ptask { grid-template-columns: 22px minmax(0, 1fr); padding: 12px; }
  .ptask .task-rank { display: none; }
  .ptask > .btn-ghost { grid-column: 2; justify-self: start; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .modal { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .modal-form { max-height: 100dvh; height: 100%; }
  .invite-row { grid-template-columns: 1fr 1fr; }
  .invite-row input { grid-column: 1 / -1; }
  .pgrid { grid-template-columns: 1fr; }
  .topbar > .btn.primary { width: 100%; }
}

/* =========================================================
   Tablero de tareas por etapas (kanban)
   ========================================================= */
.tasks-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tasks-head-actions .segmented button { display: inline-flex; align-items: center; gap: 6px; }
.tasks-head-actions .segmented svg { width: 15px; height: 15px; }

/* en modo tablero, las tareas usan todo el ancho y equipo/contactos van abajo */
.proj-grid.board-mode { grid-template-columns: minmax(0, 1fr); }
.proj-grid.board-mode .proj-side { display: grid; grid-template-columns: 1fr 1fr; }

.kboard {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr);
  gap: 12px; overflow-x: auto; padding: 4px 2px 10px; margin-top: 4px;
  scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.kcol {
  --sc: var(--muted);
  display: flex; flex-direction: column; min-height: 340px; scroll-snap-align: start;
  border-radius: 16px; background: rgba(255,255,255,.025); border: 1px solid var(--line);
  border-top: 3px solid var(--sc); transition: background .15s, border-color .15s, box-shadow .15s;
}
.kcol.is-empty { min-width: 0; }
.kboard.is-dragging .kcol { border-style: dashed; border-top-style: solid; }
.kcol.over { background: color-mix(in srgb, var(--sc) 12%, transparent); border-color: var(--sc); box-shadow: inset 0 0 0 1px var(--sc); }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px; }
.kcol-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--sc); background: color-mix(in srgb, var(--sc) 16%, transparent); }
.kcol-ic svg { width: 14px; height: 14px; }
.kcol-head strong { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcol-head b { font-size: 12px; font-weight: 600; color: var(--muted); padding: 1px 8px; border-radius: 99px; background: rgba(255,255,255,.06); }
.kcol-head .icon-btn { width: 26px; height: 26px; border-radius: 8px; }
.kcol-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 2px 8px 10px; }
.kcol-empty { flex: 1; min-height: 80px; display: grid; place-items: center; text-align: center; font-size: 12.5px; color: var(--faint); border: 1.5px dashed var(--line); border-radius: 12px; }
.kboard.is-dragging .kcol-empty { border-color: var(--line-strong); }

/* tarjeta */
.kcard {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 10px 10px 10px 12px; border-radius: 12px; cursor: grab;
  background: var(--navy-700); border: 1px solid var(--line-strong); border-left: 3px solid var(--sc);
  box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .12s, box-shadow .12s, border-color .12s, opacity .15s;
  grid-template-columns: none;
}
.kcard:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.32); border-color: color-mix(in srgb, var(--sc) 55%, transparent); border-left-color: var(--sc); }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .35; transform: rotate(2deg) scale(.98); }
.kcard.is-urgent { box-shadow: inset 0 0 0 1px rgba(255,107,107,.35), 0 2px 6px rgba(0,0,0,.2); }
.kcard.is-done { opacity: .7; border-left-color: #34D399; }
.kcard.is-done .kcard-title { text-decoration: line-through; color: var(--muted); }
.kcard-top { display: flex; align-items: flex-start; gap: 9px; }
.kcard .check { margin-top: 1px; flex-shrink: 0; }
.kcard.is-done .check { background: #34D399; border-color: #34D399; }
.kcard.is-done .check svg { opacity: 1; }
.kcard-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; line-height: 1.3; cursor: pointer; outline: none; border-radius: 6px; word-break: break-word; }
.kcard-title:focus-visible { box-shadow: 0 0 0 2px var(--blue-300); }
.krank { font-size: 11px; font-weight: 700; color: var(--blue-300); background: rgba(108,205,247,.12); padding: 2px 7px; border-radius: 99px; flex-shrink: 0; }
.kflags { display: flex; flex-wrap: wrap; gap: 4px; }
.kflags .badge { font-size: 10px; padding: 2px 7px; }
.kmeta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.kmeta span { display: inline-flex; align-items: center; gap: 4px; }
.kmeta svg { width: 12px; height: 12px; }
.kmeta .due.overdue { color: var(--danger); font-weight: 500; }
.kmeta .due.soon { color: var(--warn); }
.kpeople { display: flex; }
.kav { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 600; margin-right: -6px;
  background: rgba(108,205,247,.18); color: var(--blue-300); border: 2px solid var(--navy-700); }

/* mover sin arrastrar (pantallas táctiles o teclado) */
.kmove {
  display: none; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 9px; font-size: 12px;
  border: 1px solid var(--line-strong); color: var(--muted); background: rgba(255,255,255,.03); cursor: pointer;
}
.kmove svg { width: 13px; height: 13px; }
.kmove select { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.kmove select option { background: var(--navy-700); }
.kcard:focus-within .kmove { display: flex; }
@media (hover: none) { .kmove { display: flex; } .kcard { cursor: default; } }

@media (max-width: 1100px) {
  .proj-grid.board-mode .proj-side { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .kboard { grid-auto-columns: 82%; scroll-snap-type: x mandatory; }
  .tasks-head-actions { width: 100%; }
  .tasks-head-actions .segmented { flex: 1; }
  .tasks-head-actions .segmented button { flex: 1; justify-content: center; }
}

/* ---------- Avisos de tarjetas fuera de la vista ---------- */
.kboard-wrap { position: relative; }
.kedge {
  position: absolute; top: 4px; bottom: 10px; z-index: 3; width: 74px; padding: 0; border: 0; cursor: pointer;
  display: flex; align-items: flex-start; padding-top: 54px;
  font: inherit; color: var(--text);
}
.kedge[hidden] { display: none; }
.kedge.right { right: 0; justify-content: flex-end; border-radius: 0 16px 16px 0;
  background: linear-gradient(90deg, transparent, rgba(20,37,74,.92) 55%); }
.kedge.left { left: 0; justify-content: flex-start; border-radius: 16px 0 0 16px;
  background: linear-gradient(270deg, transparent, rgba(20,37,74,.92) 55%); }
.kedge-pill {
  position: relative; display: inline-flex; align-items: center; gap: 4px; margin: 0 4px;
  padding: 8px 9px; border-radius: 14px; flex-direction: column;
  background: var(--grad); box-shadow: 0 8px 20px rgba(47,123,224,.4); color: #fff;
  transition: transform .15s;
  animation: kedge-nudge 2.4s ease-in-out infinite;
}
.kedge.left .kedge-pill { animation-name: kedge-nudge-left; }
.kedge:hover .kedge-pill, .kedge:focus-visible .kedge-pill { transform: scale(1.06); animation-play-state: paused; }
.kedge:focus-visible { outline: none; }
.kedge:focus-visible .kedge-pill { box-shadow: 0 0 0 3px var(--blue-300), 0 8px 20px rgba(47,123,224,.4); }
.kedge-pill b { font-size: 16px; font-weight: 700; line-height: 1; }
.kedge-pill small { font-size: 10.5px; opacity: .9; line-height: 1; }
.kedge-pill svg { width: 16px; height: 16px; }
.kedge-dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--danger); box-shadow: 0 0 0 2px #14254A, 0 0 10px var(--danger); }
.kedge.alert .kedge-pill { background: linear-gradient(135deg, #1A47A8, #2F7BE0 60%, #FF6B6B); }
@keyframes kedge-nudge { 0%, 70%, 100% { transform: translateX(0); } 80% { transform: translateX(4px); } 90% { transform: translateX(0); } }
@keyframes kedge-nudge-left { 0%, 70%, 100% { transform: translateX(0); } 80% { transform: translateX(-4px); } 90% { transform: translateX(0); } }
.kboard.is-dragging ~ .kedge .kedge-pill, .kboard-wrap:has(.kboard.is-dragging) .kedge-pill { animation: none; box-shadow: 0 0 0 2px #fff, 0 8px 20px rgba(47,123,224,.5); }
@media (max-width: 760px) {
  .kedge { width: 58px; padding-top: 44px; }
  .kedge-pill { padding: 7px 7px; }
}

/* =========================================================
   EMPRESAS (calugas que agrupan proyectos)
   ========================================================= */
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 16px; }
.co-grid:empty { display: none; }
.co-grid.list { margin-bottom: 8px; }
.co-card {
  --pc: var(--blue-500);
  position: relative; display: flex; align-items: center; gap: 14px; min-width: 0;
  padding: 16px 14px 16px 16px; border-radius: 18px; text-decoration: none; color: inherit; cursor: pointer; text-align: left; font: inherit;
  background: radial-gradient(220px 120px at 0% 0%, color-mix(in srgb, var(--pc) 24%, transparent), transparent 70%), var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--pc) 35%, var(--line));
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.co-card::before { content: ""; position: absolute; left: 0; top: 16%; bottom: 16%; width: 4px; border-radius: 0 4px 4px 0; background: var(--pc); }
.co-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pc) 70%, transparent); box-shadow: 0 10px 28px rgba(0,0,0,.25); }
.co-card.drop-in { border-color: var(--pc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 45%, transparent); transform: scale(1.02); }
.co-badge { flex: none; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--pc) 22%, transparent); color: var(--pc); }
.co-badge svg { width: 26px; height: 26px; }
.co-info { flex: 1; min-width: 0; display: grid; gap: 5px; }
.co-info strong { font-size: 16.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-meta { font-size: 12.5px; color: var(--muted); }
.co-bar { display: block; height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.co-bar i { display: block; height: 100%; border-radius: 99px; background: var(--pc); }
.co-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.co-foot b { font-weight: 600; }
.co-dots { display: flex; gap: 4px; }
.co-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; box-shadow: 0 0 0 1.5px rgba(0,0,0,.25); }
.co-alert { font-style: normal; display: inline-flex; align-items: center; gap: 4px; color: #FF8F8F; }
.co-alert svg { width: 13px; height: 13px; }
.co-go { flex: none; width: 18px; height: 18px; color: var(--muted); }
.co-card.add { border-style: dashed; background: transparent; --pc: var(--muted); }
.co-card.add .co-badge { background: rgba(255,255,255,.06); color: var(--muted); }
.rings-label, .list-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 4px 2px 10px; }
.list-label { margin-top: 18px; }
/* vista de la empresa */
.co-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 18px; }
.co-rings { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.co-move { margin-top: 14px; }
.co-move summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.co-move summary svg { width: 16px; height: 16px; }
.co-move-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip-btn { --pc: var(--blue-500); display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; font: inherit; font-size: 13.5px; cursor: pointer;
  color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--pc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--pc) 40%, transparent); }
.chip-btn svg { width: 15px; height: 15px; color: var(--pc); }
@media (min-width: 901px) { .co-contacts { grid-column: 1; } .co-general { grid-column: 2; grid-row: 1 / span 3; } }
.co-member { display: flex; align-items: center; gap: 8px; }
.co-member .co-person { flex: 1; min-width: 0; }
.pav.team { background: color-mix(in srgb, #B58CFF 30%, transparent); color: #fff; }
.co-add-member { margin-top: 12px; }
.co-member-form { display: grid; gap: 10px; }
.co-member-new { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.cchip.team b { background: color-mix(in srgb, #B58CFF 35%, transparent); color: #fff; }
@media (min-width: 901px) { .co-team { grid-column: 1; } }
.co-people { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.co-person { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.co-person:hover { border-color: var(--line-strong); }
.co-pinfo { display: grid; min-width: 0; }
.co-pinfo small { color: var(--muted); font-size: 12.5px; }
.link-chip b { background: color-mix(in srgb, var(--sc) 30%, transparent) !important; color: #fff; }
.link-chip b svg { width: 13px; height: 13px; }
.co-tasks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.co-tasks li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: center; padding: 9px 10px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.co-tasks li.hint { display: block; text-align: center; }
.co-tasks li .due { grid-column: 2; font-size: 12.5px; }
.co-task-title { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.co-crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--pc); text-decoration: none; }
.co-crumb svg { width: 13px; height: 13px; }
.co-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.co-pick .cchip b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: #fff; }
.co-pick .cchip b svg { width: 13px; height: 13px; }
i.mini, svg.mini { width: 14px; height: 14px; vertical-align: -2px; }
@media (max-width: 900px) { .co-layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .co-grid { grid-template-columns: 1fr; } }

/* ---------- Empresa: tareas recurrentes ---------- */
@media (min-width: 901px) { .co-rec { grid-column: 2; } }
.co-rec .card-head h2 { display: flex; align-items: center; gap: 8px; }
.co-rec .card-head h2 svg { width: 18px; height: 18px; color: var(--blue-300); }
.co-rec-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.co-rec-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.co-rec-list li.hint { display: block; background: none; border: 0; padding: 4px 2px; }
.co-rec-list li.late { border-color: rgba(255,107,107,.45); }
.co-rec-list li.done .co-rec-info strong { text-decoration: line-through; opacity: .6; }
.co-rec-list .check-gap { width: 28px; flex: none; }
.co-rec-list .check.on { background: #2ED3A0; border-color: #2ED3A0; color: #0E1A33; }
.co-rec-info { flex: 1; min-width: 0; display: grid; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.co-rec-info strong { font-weight: 500; overflow-wrap: anywhere; }
.co-rec-info small { color: var(--muted); font-size: 12.5px; }
.co-rec-when { flex: none; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.co-rec-when.today { color: #F7BC5A; font-weight: 600; }
.co-rec-when.late { color: #FF6B6B; font-weight: 600; }
.rec-tpls { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.rec-tpl { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; border: 1px dashed var(--line-strong); background: transparent; color: var(--silver-2); font: inherit; font-size: 13px; cursor: pointer; }
.rec-tpl svg { width: 14px; height: 14px; color: var(--blue-300); }
.rec-tpl:hover, .rec-tpl:focus-visible, .rec-tpl.on { border-style: solid; border-color: var(--blue-300); background: rgba(108,205,247,.1); outline: none; }
.rec-co { color: var(--blue-300); }
