/* MarkU Projects · interfaz 2026
   Concepto: el panel de instrumentos de un laboratorio. Riel índigo de la marca (#191730) con órbitas
   doradas (#F2B950); área de trabajo sobre papel cuadriculado frío; cada Growth Lab con su color
   (Brand coral, UX violeta, Growth verde azulado). La firma visual es la semana de "Mis tareas":
   una línea de tiempo viva con la hora actual, tus tareas y lo que ya está ocupado en Outlook. */

/* Tipografías servidas desde la app (licencia SIL OFL, ver /static/fonts). */
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 200 1000; src: url('/static/fonts/nunito-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-display: swap; font-weight: 300 700; src: url('/static/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2'); }

:root {
  --ink: #191730;
  --ink-2: #2b2858;
  --ink-3: #4a4775;
  --muted: #6a6890;
  --line: #e2e1ee;
  --line-2: #eceBf5;
  --paper: #f3f3f9;
  --grid: rgba(25, 23, 48, .035);
  --surface: #ffffff;
  --gold: #f2b950;
  --gold-2: #f7d083;
  --gold-ink: #7a5300;
  --gold-soft: #fff4dc;
  --focus: #5b4fe0;

  --lab-brand: #e8546f;
  --lab-brand-soft: #fde9ed;
  --lab-ux: #6e5bf0;
  --lab-ux-soft: #eeebfe;
  --lab-growth: #12a08a;
  --lab-growth-soft: #e1f5f1;

  --ok: #1f9d6b;
  --ok-soft: #e2f4ec;
  --warn: #d99a14;
  --warn-soft: #fdf2d8;
  --bad: #d2463b;
  --bad-soft: #fce7e4;

  --s-por_arrancar: #9a99b3;
  --s-en_el_lab: #4a6fd6;
  --s-review_interna: #8a55c9;
  --s-review_cliente: #e0a32a;
  --s-ajustes: #d66a4a;
  --s-aprobado: #1f9d6b;

  --r-lg: 18px;
  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(25, 23, 48, .06), 0 8px 24px -12px rgba(25, 23, 48, .18);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: 'Space Grotesk', 'Nunito', system-ui, sans-serif;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.5; font-size: 15px; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--focus); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.25rem; margin-top: 1.8em; }
h3 { font-size: 1.02rem; letter-spacing: -0.01em; }
p { max-width: 72ch; }
.num, time, .time, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 800; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* Íconos */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.i.lg { width: 22px; height: 22px; }

/* ---------- Estructura ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: radial-gradient(120% 60% at 0% 0%, #2b2860 0%, var(--ink) 55%) var(--ink);
  color: #e9e8f6; padding: 20px 14px 14px; display: flex; flex-direction: column; gap: 6px; isolation: isolate;
}
.rail-orbit { position: absolute; width: 300px; height: 300px; left: -150px; bottom: 74px; z-index: -1; pointer-events: none; opacity: .8; }
.rail-orbit circle { fill: none; stroke: rgba(242, 185, 80, .14); stroke-width: 1; }
.rail-orbit .ro-spin { transform-origin: 150px 150px; animation: spin 90s linear infinite; }
.rail-orbit .ro-spin circle { fill: var(--gold); stroke: none; opacity: .55; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-mark .bm-ring { fill: none; stroke: rgba(242, 185, 80, .5); stroke-width: 1.4; }
.brand-mark .bm-ring2 { fill: rgba(242, 185, 80, .14); stroke: none; }
.brand-mark .bm-sat { fill: var(--gold); transform-origin: 20px 20px; animation: spin 14s linear infinite; }
.brand-mark .bm-u { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-word { font-weight: 900; font-size: 1.45rem; letter-spacing: -0.03em; }
.brand-word span { color: var(--gold); }
.brand-sub { font-family: var(--display); font-size: .78rem; opacity: .7; margin-top: 3px; letter-spacing: .02em; }
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.rail a.nav {
  position: relative; color: #d9d8ec; text-decoration: none; padding: 9px 12px; border-radius: 10px; font-weight: 700;
  display: flex; gap: 12px; align-items: center; transition: background .2s var(--ease), color .2s var(--ease);
}
.rail a.nav .i { opacity: .8; }
.rail a.nav:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.rail a.nav[aria-current="page"] { background: linear-gradient(90deg, rgba(242, 185, 80, .2), rgba(242, 185, 80, .04)); color: var(--gold); }
.rail a.nav[aria-current="page"]::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); box-shadow: 0 0 14px var(--gold); }
.rail a.nav[aria-current="page"] .i { opacity: 1; }
.rail .spacer { flex: 1; }
.badge { margin-left: auto; background: var(--gold); color: var(--ink); border-radius: 999px; font-size: .74rem; padding: 0 8px; font-weight: 900; min-width: 22px; text-align: center; animation: pop .5s var(--ease) both; }
.push-cta { display: flex; gap: 10px; align-items: center; text-align: left; background: rgba(242, 185, 80, .1); border: 1px dashed rgba(242, 185, 80, .5); color: var(--gold-2); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.push-cta:hover { background: rgba(242, 185, 80, .18); }
.who { display: flex; align-items: center; gap: 10px; padding: 12px 6px 4px; border-top: 1px solid rgba(255, 255, 255, .1); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, var(--gold), #e89b3a); color: var(--ink); font-weight: 900; font-size: .8rem; }
.who-text { display: flex; flex-direction: column; min-width: 0; font-size: .84rem; line-height: 1.25; }
.who-text strong { color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-text span { color: #a9a7c8; font-size: .76rem; }
.who form { margin-left: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.rail .icon-btn { color: #c9c7e3; }
.rail .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

main {
  padding: 30px 40px 72px; width: 100%; min-width: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px; background-attachment: local;
  animation: enter .45s var(--ease) both;
}
main > * { max-width: 1320px; }
main:focus { outline: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-title { display: flex; gap: 14px; align-items: center; }
.page-title h1 { margin: 0; }
.page-title p { margin: .25em 0 0; color: var(--muted); }
.glyph { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--gold); background: var(--ink); box-shadow: inset 0 0 0 1px rgba(242, 185, 80, .35), 0 6px 18px -8px rgba(25, 23, 48, .6); }
.glyph .i { width: 22px; height: 22px; }
.crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .86rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .i { width: 14px; height: 14px; }

/* ---------- Mensajes ---------- */
.flash { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); animation: drop .4s var(--ease) both; }
.flash > .i { margin-top: 2px; }
.flash.ok { border-color: #bfe5d2; } .flash.ok > .i { color: var(--ok); }
.flash.error { border-color: #f3c3bd; } .flash.error > .i { color: var(--bad); }
.flash ul { margin: .4em 0 0; padding-left: 1.2em; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; background: var(--warn-soft); color: #6b4a00; }
.banner.info { background: var(--lab-ux-soft); color: #3b2fa0; }

.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 60; width: min(360px, calc(100vw - 36px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; background: var(--ink); color: #fff; border-radius: 14px; padding: 13px 14px; box-shadow: 0 18px 40px -16px rgba(25, 23, 48, .7); text-decoration: none; animation: toast-in .45s var(--ease) both; border: 1px solid rgba(242, 185, 80, .25); }
.toast:hover { color: #fff; }
.toast .t-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(242, 185, 80, .16); color: var(--gold); flex: none; }
.toast strong { display: block; font-family: var(--display); }
.toast span { font-size: .86rem; color: #d6d4ec; }
.toast.out { animation: toast-out .3s ease both; }

/* ---------- Controles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff;
  padding: 9px 18px; border-radius: 999px; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s;
}
.btn:hover { background: var(--ink-2); color: #fff; box-shadow: 0 6px 16px -8px rgba(25, 23, 48, .6); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover { background: var(--gold-2); color: var(--ink); box-shadow: 0 6px 18px -8px rgba(242, 185, 80, .9); }
.btn.ghost { background: rgba(255, 255, 255, .7); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: #fff; border-color: var(--ink-3); box-shadow: none; }
.btn.danger { background: transparent; color: var(--bad); border-color: #efb4ad; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.small { padding: 6px 13px; font-size: .85rem; }
.btn.small .i { width: 16px; height: 16px; }
.btn.teams { background: #5059c9; border-color: #5059c9; }
.btn.teams:hover { background: #444cb5; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg a { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: .86rem; color: var(--ink-3); }
.seg a:hover { background: var(--paper); color: var(--ink); }
.seg a.on { background: var(--ink); color: #fff; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }
label { display: block; font-weight: 800; font-size: .88rem; margin-bottom: 5px; }
.field { margin-bottom: 15px; }
.hint { font-size: .82rem; color: var(--muted); margin: 4px 0 0; }
input[type=text], input[type=email], input[type=url], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px;
  transition: border-color .15s, box-shadow .15s;
}
select[multiple] { min-height: 150px; padding: 6px; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 4px rgba(91, 79, 224, .14); }
textarea { min-height: 96px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.check { display: flex; gap: 9px; align-items: center; font-weight: 700; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: 0 1px 2px rgba(25, 23, 48, .04); }
.panel + .panel { margin-top: 16px; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-head h3 { margin: 0; display: flex; gap: 8px; align-items: center; }
.panel.dark { background: var(--ink); color: #eceaf8; border-color: var(--ink); }
.panel.dark h3 { color: #fff; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr); gap: 22px; align-items: start; }
details.disclose summary { cursor: pointer; font-weight: 800; }
details.disclose[open] summary { margin-bottom: 12px; }

/* ---------- Tablas ---------- */
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: .8rem; color: var(--muted); font-weight: 800; background: #fafafd; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #fbfbfe; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
td select { min-width: 130px; }

/* ---------- Estados ---------- */
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: .84rem; white-space: nowrap; }
.status::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--muted)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, var(--muted)) 20%, transparent); }
.status.por_arrancar, .c-por_arrancar { --dot: var(--s-por_arrancar); }
.status.en_el_lab, .c-en_el_lab { --dot: var(--s-en_el_lab); }
.status.review_interna, .c-review_interna { --dot: var(--s-review_interna); }
.status.review_cliente, .c-review_cliente { --dot: var(--s-review_cliente); }
.status.ajustes, .c-ajustes { --dot: var(--s-ajustes); }
.status.aprobado, .c-aprobado { --dot: var(--s-aprobado); }
.sem { display: inline-block; width: 13px; height: 13px; border-radius: 50%; vertical-align: -1px; background: var(--muted); }
.sem.verde { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.sem.amarillo { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.sem.rojo { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); animation: beacon 2.4s ease-in-out infinite; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .77rem; font-weight: 800; background: #ecebf4; color: var(--ink-3); white-space: nowrap; }
.pill .i { width: 13px; height: 13px; }
.pill.sync-ok { background: var(--ok-soft); color: var(--ok); }
.pill.sync-pendiente { background: var(--gold-soft); color: var(--gold-ink); }
.pill.sync-error, .pill.sync-sin_agenda, .pill.bad { background: var(--bad-soft); color: var(--bad); }
.lab-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 800; padding: 2px 10px 2px 8px; border-radius: 999px; background: var(--lab-soft, #eee); color: var(--lab, var(--ink)); white-space: nowrap; }
.lab-dot { width: 8px; height: 8px; border-radius: 3px; background: var(--lab, var(--ink)); transform: rotate(45deg); }
.lab-brand { --lab: var(--lab-brand); --lab-soft: var(--lab-brand-soft); }
.lab-ux { --lab: var(--lab-ux); --lab-soft: var(--lab-ux-soft); }
.lab-growth { --lab: var(--lab-growth); --lab-soft: var(--lab-growth-soft); }
.meta-row { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .88rem; }
.meta-row > span { display: inline-flex; gap: 6px; align-items: center; }
.meta-row .i { width: 15px; height: 15px; }

/* ---------- Mis tareas: semana ---------- */
.week-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.week-label { font-family: var(--display); font-weight: 700; font-size: 1.05rem; margin: 0 4px; }
.week-scroll { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.week { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(128px, 1fr)); min-width: calc(56px + var(--days) * 128px); position: relative; }
.week .corner { border-bottom: 1px solid var(--line); }
.week .dayhead { padding: 10px 10px 8px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line-2); display: flex; align-items: baseline; gap: 8px; }
.week .dayhead b { font-family: var(--display); font-size: 1.5rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.week .dayhead span { color: var(--muted); font-weight: 700; font-size: .84rem; text-transform: capitalize; }
.week .dayhead.today { background: linear-gradient(180deg, var(--gold-soft), #fff); box-shadow: inset 0 3px 0 var(--gold); }
.week .dayhead.today b { color: var(--gold-ink); }
.week .allday { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(var(--days), minmax(128px, 1fr)); border-bottom: 1px solid var(--line); }
.week .allday-label { font-size: .7rem; color: var(--muted); text-align: right; padding: 6px 6px 0 0; border-bottom: 1px solid var(--line); }
.week .allday > div { border-left: 1px solid var(--line-2); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-height: 28px; }
.chip-ev { font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: repeating-linear-gradient(135deg, #ecebf6 0 6px, #f5f4fb 6px 12px); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week .hours { position: relative; }
.week .hour { height: 48px; font-size: .72rem; color: var(--muted); text-align: right; padding-right: 8px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.week .daycol { position: relative; border-left: 1px solid var(--line-2); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, var(--line-2) 47px, var(--line-2) 48px); }
.week .daycol.today { background-color: #fffcf4; }
.week .daycol .worktime { position: absolute; left: 0; right: 0; background: rgba(25, 23, 48, .018); pointer-events: none; }
.now-line { position: absolute; left: -1px; right: 0; height: 2px; background: var(--bad); z-index: 4; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 0 rgba(210, 70, 59, .5); animation: ping 2s ease-out infinite; }
.block {
  position: absolute; left: 4px; right: 4px; border-radius: 9px; padding: 5px 8px 5px 10px; font-size: .78rem; line-height: 1.25; text-decoration: none; overflow: hidden;
  background: var(--lab-soft, #ecebf9); color: var(--ink); border-left: 4px solid var(--lab, var(--ink)); z-index: 2;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--n, 0) * 35ms);
}
.block:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(25, 23, 48, .45); z-index: 5; }
.block strong { display: block; font-weight: 800; }
.block .b-meta { color: var(--ink-3); display: flex; gap: 4px; align-items: center; }
.block .b-meta .i { width: 12px; height: 12px; }
.block.hecha { opacity: .5; }
.block.hecha strong { text-decoration: line-through; }
.block.warn { background: var(--bad-soft); border-left-color: var(--bad); }
.block.busy { background: repeating-linear-gradient(135deg, #eeedf7 0 7px, #f7f6fc 7px 14px); border-left: 3px solid #b3b1cf; color: var(--ink-3); z-index: 1; left: 2px; right: 2px; }
.block.busy:hover { transform: none; box-shadow: none; }
.block.meeting { background: #ebecfb; border-left-color: #5059c9; }
.block.meeting .join { display: inline-flex; gap: 4px; align-items: center; margin-top: 3px; font-weight: 800; color: #5059c9; }
.week-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin: 10px 2px 0; }
.week-legend span { display: inline-flex; align-items: center; gap: 6px; }
.week-legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }

/* Lista de tareas compacta */
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line-2); }
.task-list li:last-child { border-bottom: 0; }
.task-list .when { font-variant-numeric: tabular-nums; font-size: .82rem; color: var(--muted); min-width: 92px; }
.task-list .when b { display: block; color: var(--ink); font-family: var(--display); font-size: .95rem; }
.task-list .what a { font-weight: 800; text-decoration: none; }
.task-list .what a:hover { text-decoration: underline; }
.task-list .what small { display: block; color: var(--muted); }
.task-list select { min-width: 120px; padding: 5px 8px; font-size: .85rem; }

/* ---------- Radar ---------- */
.lab-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.lab-filter a { display: inline-flex; gap: 8px; align-items: center; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 800; font-size: .88rem; color: var(--ink-3); }
.lab-filter a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.lab-filter a b { font-family: var(--display); font-variant-numeric: tabular-nums; opacity: .7; }
.radar { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
  overflow: hidden; animation: rise .5s var(--ease) both; animation-delay: calc(var(--n, 0) * 50ms);
}
.card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--lab, var(--ink)); }
.card:hover { border-color: #cfcde3; box-shadow: var(--shadow); }
.card h3 { margin: 0; font-size: 1.1rem; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ''; position: absolute; inset: 0; }
.card .meta { color: var(--muted); font-size: .86rem; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gauge { display: flex; align-items: center; gap: 14px; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: radial-gradient(closest-side, #fff 76%, transparent 77% 100%), conic-gradient(var(--ok) calc(var(--p) * 1%), #ecebf4 0); }
.ring b { font-family: var(--display); font-size: .95rem; font-variant-numeric: tabular-nums; }
.progress { position: relative; height: 10px; background: #ecebf4; border-radius: 999px; overflow: visible; }
.progress .fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #1b8b60, var(--ok)); border-radius: 999px; transform-origin: left; animation: grow .9s var(--ease) both; }
.progress .target { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--ink); border-radius: 2px; }
.kpis { display: flex; gap: 20px; flex-wrap: wrap; font-size: .84rem; color: var(--muted); }
.kpis b { font-family: var(--display); font-size: 1.25rem; display: block; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpis .alert b { color: var(--bad); }
.kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.kpi .k-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--paper); color: var(--ink-3); flex: none; }
.kpi b { font-family: var(--display); font-size: 1.45rem; line-height: 1; display: block; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .82rem; color: var(--muted); }
.kpi.alert .k-ico { background: var(--bad-soft); color: var(--bad); }
.kpi.alert b { color: var(--bad); }

/* ---------- Proyecto: componentes ---------- */
.project-hero { position: relative; background: var(--ink); color: #eceaf8; border-radius: 22px; padding: 22px 26px; margin-bottom: 18px; overflow: hidden; isolation: isolate; }
.project-hero::after { content: ''; position: absolute; right: -80px; top: -120px; width: 340px; height: 340px; border-radius: 50%; border: 1px solid rgba(242, 185, 80, .22); box-shadow: 0 0 0 40px rgba(242, 185, 80, .03), 0 0 0 80px rgba(242, 185, 80, .025); z-index: -1; }
.project-hero h1 { color: #fff; margin: 4px 0 8px; }
.project-hero .crumbs, .project-hero .crumbs a { color: #b9b7d6; }
.project-hero .meta-row { color: #c9c7e3; }
.project-hero .btn.ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .2); }
.project-hero .btn.ghost:hover { background: rgba(255, 255, 255, .16); }
.hero-row { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: flex-end; }
.components { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.component {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; overflow: hidden;
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--n, 0) * 60ms);
}
.component-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--line-2); background: linear-gradient(180deg, var(--lab-soft, #f6f6fb), #fff); }
.component-head .row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.component-head h3 { margin: 6px 0 4px; font-size: 1.12rem; }
.component-head p { margin: 0; font-size: .86rem; color: var(--muted); }
.component-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--lab, var(--ink)); color: #fff; flex: none; box-shadow: 0 8px 18px -10px var(--lab, var(--ink)); }
.component .stats { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); margin-top: 10px; }
.component .stats b { color: var(--ink); font-family: var(--display); }
.component .bar { height: 5px; border-radius: 99px; background: #ecebf4; overflow: hidden; margin-top: 8px; }
.component .bar span { display: block; height: 100%; background: var(--lab, var(--ok)); border-radius: 99px; transform-origin: left; animation: grow .9s var(--ease) both; }
.component-body { padding: 6px 18px 8px; flex: 1; }
.component-body .task-list li { grid-template-columns: auto 1fr auto; padding: 9px 0; }
.component-body .empty-mini { color: var(--muted); font-size: .88rem; padding: 14px 0; }
.quick-add { border-top: 1px dashed var(--line); padding: 12px 18px 16px; background: #fcfcfe; }
.quick-add summary { cursor: pointer; font-weight: 800; color: var(--ink-3); display: flex; gap: 6px; align-items: center; list-style: none; }
.quick-add summary::-webkit-details-marker { display: none; }
.quick-add summary:hover { color: var(--ink); }
.quick-add[open] summary { margin-bottom: 10px; }
.quick-add .grid-4 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 0 10px; }
.mini-avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ink); color: var(--gold); font-size: .68rem; font-weight: 900; flex: none; }
.done-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c9c7dc; display: inline-grid; place-items: center; color: transparent; flex: none; }
.done-dot.haciendo { border-color: var(--warn); background: conic-gradient(var(--warn) 50%, transparent 0); }
.done-dot.hecha { border-color: var(--ok); background: var(--ok); color: #fff; }
.done-dot .i { width: 12px; height: 12px; stroke-width: 3; }

/* ---------- Project Calendar ---------- */
.pc { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.pc th, .pc td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 6px 8px; }
.pc th.wk { min-width: 64px; text-align: center; font-size: .75rem; }
.pc th.wk.current { background: var(--gold-soft); color: var(--gold-ink); }
.pc td.name { position: sticky; left: 0; background: #fff; min-width: 240px; z-index: 1; }
.pc td.cell { padding: 3px; }
.pc .mark { height: 22px; border-radius: 6px; }
.pc .mark.work { background: repeating-linear-gradient(45deg, #e4e3f1 0 6px, #f1f0f8 6px 12px); }
.pc .mark.due { background: var(--dot, var(--muted)); }
.pc tr.phase td { background: #fafafd; font-weight: 800; font-family: var(--display); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; margin: 10px 0; }
.legend .sw { display: inline-block; width: 18px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; background: var(--dot); }

/* ---------- Pestañas ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px; width: fit-content; max-width: 100%; }
.tabs a { display: inline-flex; gap: 7px; align-items: center; padding: 8px 14px; text-decoration: none; font-weight: 800; color: var(--muted); border-radius: 10px; white-space: nowrap; font-size: .9rem; }
.tabs a:hover { color: var(--ink); background: var(--paper); }
.tabs a[aria-current="page"] { color: #fff; background: var(--ink); }
.tabs a[aria-current="page"] .i { color: var(--gold); }
.tabs .i { width: 16px; height: 16px; }

/* ---------- Listas, notificaciones ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); align-items: flex-start; animation: rise .4s var(--ease) both; animation-delay: calc(var(--n, 0) * 25ms); }
.feed li:last-child { border-bottom: 0; }
.feed li.unread { background: linear-gradient(90deg, var(--gold-soft), #fff 60%); }
.feed .f-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: var(--ink-3); }
.feed .k-aviso .f-ico { background: var(--ink); color: var(--gold); }
.feed .k-reunion .f-ico { background: #ebecfb; color: #5059c9; }
.feed .k-vencimiento .f-ico { background: var(--bad-soft); color: var(--bad); }
.feed strong { font-family: var(--display); display: block; }
.feed p { margin: 2px 0 0; }
.feed time { font-size: .8rem; color: var(--muted); white-space: nowrap; }

.meeting-card { display: grid; grid-template-columns: 74px 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.meeting-card:last-child { border-bottom: 0; }
.date-tile { border-radius: 14px; background: var(--ink); color: #fff; text-align: center; padding: 8px 4px; }
.date-tile b { display: block; font-family: var(--display); font-size: 1.6rem; line-height: 1; color: var(--gold); }
.date-tile span { font-size: .74rem; text-transform: capitalize; color: #c9c7e3; }
.people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.person { display: inline-flex; gap: 6px; align-items: center; font-size: .78rem; background: var(--paper); padding: 2px 9px 2px 2px; border-radius: 999px; font-weight: 700; }
.person .mini-avatar { width: 22px; height: 22px; font-size: .6rem; }
.pick-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; max-height: 260px; overflow: auto; padding: 8px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.pick-people label { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: .88rem; padding: 6px 8px; border-radius: 8px; margin: 0; cursor: pointer; }
.pick-people label:hover { background: var(--paper); }
.pick-people input { accent-color: var(--ink); }
.audience { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.audience label { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; margin: 0; transition: border-color .15s, box-shadow .15s; }
.audience label:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(25, 23, 48, .08); }
.audience input { position: absolute; opacity: 0; pointer-events: none; }
.audience .a-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--paper); }
.audience label:has(input:checked) .a-ico { background: var(--ink); color: var(--gold); }
.audience span { font-weight: 600; font-size: .82rem; color: var(--muted); }

/* ---------- Estado vacío ---------- */
.empty { color: var(--muted); padding: 18px 0; }
.empty-state { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 20px; color: var(--muted); }
.empty-state p { max-width: 46ch; margin: 12px 0 14px; }
.orbit-ill { width: 120px; height: 120px; }
.orbit-ill .ring { fill: none; stroke: #d9d7ea; stroke-dasharray: 3 5; }
.orbit-ill .core { fill: var(--ink); }
.orbit-ill .sat { transform-origin: 60px 60px; fill: var(--gold); }
.orbit-ill .s1 { animation: spin 16s linear infinite; }
.orbit-ill .s2 { animation: spin 11s linear infinite reverse; fill: var(--lab-ux); }
.empty-icon { position: absolute; top: 30px; width: 120px; height: 120px; display: grid; place-items: center; color: var(--gold); pointer-events: none; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--ink); }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; color: #e9e8f6;
  background: radial-gradient(80% 70% at 30% 40%, #2d2a66 0%, var(--ink) 70%); }
.login-art .brand-word { color: #fff; font-size: 2rem; }
.login-art h2 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); color: #fff; max-width: 15ch; margin: 0; letter-spacing: -0.03em; }
.login-art p { color: #bebcdb; max-width: 40ch; }
.system { width: min(520px, 90%); align-self: center; margin: 10px 0; }
.system .orb { fill: none; stroke: rgba(242, 185, 80, .22); stroke-width: 1.2; }
.system .orb.dash { stroke-dasharray: 2 7; stroke: rgba(255, 255, 255, .18); }
.system .core { fill: var(--gold); }
.system .core-glow { fill: rgba(242, 185, 80, .16); animation: breathe 5s ease-in-out infinite; transform-origin: 260px 260px; }
.system .u { fill: none; stroke: var(--ink); stroke-width: 9; stroke-linecap: round; }
.system .lab { transform-origin: 260px 260px; }
.system .lab-1 { animation: spin 46s linear infinite; }
.system .lab-2 { animation: spin 62s linear infinite reverse; }
.system .lab-3 { animation: spin 80s linear infinite; }
.system .planet-brand { fill: var(--lab-brand); }
.system .planet-ux { fill: var(--lab-ux); }
.system .planet-growth { fill: var(--lab-growth); }
.system text { fill: #fff; font: 700 15px var(--display); }
.system .lab text { transform-box: fill-box; transform-origin: center; }
.system .lab-1 text { animation: spin 46s linear infinite reverse; }
.system .lab-2 text { animation: spin 62s linear infinite; }
.system .lab-3 text { animation: spin 80s linear infinite reverse; }
.login-form { display: grid; place-items: center; padding: 32px; background: var(--paper); }
.box { background: #fff; border-radius: 22px; padding: 34px; width: min(430px, 100%); box-shadow: var(--shadow); animation: rise .6s var(--ease) both; }
.box h1 { font-size: 1.6rem; }
.login .ms { width: 100%; justify-content: center; margin: 18px 0 6px; padding: 12px 18px; }
.login hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.ms-logo { width: 18px; height: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.ms-logo i { display: block; }

/* ---------- Animaciones ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(210, 70, 59, .55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(210, 70, 59, 0); } }
@keyframes beacon { 50% { box-shadow: 0 0 0 7px rgba(210, 70, 59, .12); } }
@keyframes breathe { 50% { transform: scale(1.12); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 46vh; padding: 28px; }
  .system { width: min(340px, 80%); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: sticky; z-index: 20; height: auto; flex-direction: row; align-items: center; padding: 8px 10px; gap: 4px; }
  .rail .brand { padding: 0 6px 0 0; }
  .rail .brand-text, .rail .spacer, .rail .push-cta, .rail-orbit, .who-text, .who .avatar { display: none; }
  .nav-list { flex-direction: row; overflow-x: auto; scrollbar-width: none; flex: 1; }
  .rail a.nav { padding: 8px 10px; }
  .rail a.nav span:not(.badge) { display: none; }
  .rail a.nav[aria-current="page"]::before { left: 8px; right: 8px; top: auto; bottom: -8px; width: auto; height: 3px; }
  .who { border: 0; padding: 0; }
  main { padding: 18px 16px 56px; }
  .split, .grid-2, .grid-3, .quick-add .grid-4 { grid-template-columns: 1fr; }
  .components { grid-template-columns: 1fr; }
  .meeting-card { grid-template-columns: 60px 1fr; }
  .task-list li { grid-template-columns: auto 1fr; }
  .task-list li > form, .task-list li > .mini-avatar { grid-column: 2; justify-self: start; }
  .task-list .when { min-width: 0; }
  .kpi-strip { grid-template-columns: 1fr 1fr; }
  .project-hero { padding: 18px; border-radius: 18px; }
  .meeting-card > :last-child { grid-column: 1 / -1; }
  h1 { font-size: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.feed p a { text-decoration: none; }
.feed p a:hover { text-decoration: underline; }
