/* Paneles: la paleta y las letras de Draconis App (draconis/docs/design.md). Oscuro por defecto, claro si el PC lo pide. */

@font-face { font-family: "Space Grotesk"; src: url("fonts/space_grotesk.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains_mono.ttf") format("truetype"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("fonts/cinzel.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }

:root {
  --bg: #0E0F11;
  --raised: #18191C;
  --line: #292A2F;
  --text: #E8E6E3;
  --muted: #9A9BA1;
  --primary: #93B8F0;
  --on-primary: #0E1A2B;
  --mine: #232B37;
  --arcane: #6FD8CB;
  --error: #FF9C8F;
  /* Lo que se pasa sin ser un fallo (un día de más de 8 h, un aviso de la propuesta). */
  --warn: #E2B65B;
  --radius: 14px;
  /* La IA probable: el color principal, más claro; el mismo en la barra, su número y la leyenda. */
  --likely: color-mix(in srgb, var(--primary) 55%, transparent);
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F4F6FA;
    --raised: #FFFFFF;
    --line: #D3D9E3;
    --text: #1A1C20;
    --muted: #5D6270;
    --primary: #2456A6;
    --on-primary: #FFFFFF;
    --mine: #DCE6FA;
    --arcane: #00756B;
    --error: #B3261E;
    --warn: #8A5A00;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

h1, h2, h3, button, .eyebrow { font-family: var(--sans); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.error { color: var(--error); }
[hidden] { display: none !important; }

button {
  font-size: 15px;
  font-weight: 500;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}
button:hover { border-color: var(--primary); }
button.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
button.link { border: 0; padding: 4px 0; color: var(--primary); border-radius: 4px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Entrar */
.center { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: min(420px, 100%); text-align: center; display: grid; gap: 18px; justify-items: center; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; }
.wordmark { font-family: "Cinzel", serif; font-weight: 600; letter-spacing: .22em; font-size: 22px; margin: 0; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0; }
.qr { background: #FFFFFF; border-radius: 18px; padding: 16px; width: min(280px, 72vw); aspect-ratio: 1; display: grid; place-items: center; }
.qr svg { width: 100%; height: 100%; display: block; }
.code { font-family: var(--mono); font-size: 34px; letter-spacing: .08em; margin: 0; }
.hint { margin: 0; max-width: 34ch; }
.small { font-size: 13px; }

/* El panel */
.bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.bar img { width: 28px; height: 28px; }
.bar .title { font-family: var(--sans); font-weight: 600; font-size: 17px; margin: 0; }
/* Las anclas a cada sección: en una pantalla estrecha se desplazan dentro de la barra, sin ensanchar la página. */
.jump { display: flex; gap: 4px 16px; min-width: 0; overflow-x: auto; scrollbar-width: none; margin-left: 12px; }
.jump::-webkit-scrollbar { display: none; }
.jump button.link { color: var(--muted); font-size: 14px; white-space: nowrap; }
.jump button.link:hover { color: var(--primary); }
.bar .remaining { margin-left: auto; font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.grid {
  display: grid; gap: 20px;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1320px; margin: 0 auto; padding: 24px;
  align-items: stretch;
}
/* Por filas: Hoy, Correo y Notas se reparten una (sin columnas vacías) con la misma altura; lo ancho va aparte. */
@media (min-width: 760px) {
  .grid.cols-2, .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 > .card:not(.wide):nth-child(3 of :not(.wide)) { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.cols-3 > .card:not(.wide):nth-child(3 of :not(.wide)) { grid-column: auto; }
}
@media (max-width: 600px) {
  .bar { padding: 10px 16px; flex-wrap: wrap; row-gap: 4px; }
  /* Las anclas, en su propia línea bajo el título. */
  .jump { order: 1; flex-basis: 100%; margin-left: 0; }
  .grid { padding: 16px; gap: 16px; }
}
.card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; scroll-margin-top: 72px; }
.card h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 4px; }
.card .sub { margin: 0 0 14px; font-family: var(--sans); font-size: 19px; font-weight: 600; }
.empty { color: var(--muted); margin: 6px 0; }
button.link.more { margin-top: 6px; font-size: 14px; }

/* Hoy */
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.item { display: grid; grid-template-columns: 96px 10px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); align-items: baseline; }
.item:first-child { border-top: 0; }
.item .when { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); align-self: center; }
.item .what { min-width: 0; overflow-wrap: anywhere; }
.item .where, .item .extra { display: block; font-size: 13px; color: var(--muted); }
.warn { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* Notas */
.search { width: 100%; font: inherit; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); margin-bottom: 10px; }
.notes { list-style: none; margin: 0; padding: 0; }
.notes button { width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 10px 2px; display: grid; gap: 2px; font-family: inherit; }
.notes li:first-child button { border-top: 0; }
.notes .ntitle { font-family: var(--sans); font-weight: 600; }
.notes .npreview { font-size: 14px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: pre-line; }
.note h3 { font-size: 19px; margin: 6px 0 12px; overflow-wrap: anywhere; }
.note .body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
/* El código parte las líneas largas en vez de esconderlas a la derecha; la sangría se queda. */
.note pre.body { font-family: var(--mono); font-size: 14px; line-height: 1.5; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.notehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.copy { padding: 4px 14px; font-size: 13px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.checks .box { font-family: var(--mono); color: var(--primary); }
.checks .done { text-decoration: line-through; color: var(--muted); }

/* Correo: los 5 últimos importantes, una fila por correo, los no leídos en negrita; lo que escribió otro, siempre como texto */
.mailhead { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.mails { list-style: none; margin: 0; padding: 0; }
.mails li { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.mails li:first-child { border-top: 0; }
.mails .mtext { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mails .mfrom { font-family: var(--sans); }
.mails li.unread .mtext { font-weight: 700; }
.mails .mside { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.mails .mwhen { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.chip.urgent { color: var(--error); border-color: var(--error); }
@media (max-width: 600px) {
  .mails li { flex-direction: column; gap: 4px; }
}

/* Documentos: lo enviado desde la app, arriba y a lo ancho, cada uno en su pastilla */
.docstrip { padding: 14px 20px; }
.docs { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.docs li { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); max-width: 100%; }
.docs .dname { min-width: 0; overflow-wrap: anywhere; }
.docs .dsize { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.docs button { padding: 4px 14px; font-size: 14px; }

/* Contraseñas: una tarjeta que se va sola */
.secrets { position: fixed; right: 20px; top: 72px; z-index: 3; display: grid; gap: 12px; width: min(380px, calc(100vw - 32px)); }
@media (max-width: 600px) { .secrets { right: 16px; } }
.secret { background: var(--raised); border: 1px solid var(--primary); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.secret .stitle { font-family: var(--sans); font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.secret .value { font-family: var(--mono); font-size: 18px; overflow-wrap: anywhere; margin: 0; }
.secret .row { display: flex; gap: 8px; align-items: center; }
.secret .left { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.secret .meter { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.secret .meter span { display: block; height: 100%; background: var(--primary); transition: width 1s linear; }

/* Productividad: ocupa todo el ancho; lo de sus herramientas se pinta siempre como texto */
.card.wide { grid-column: 1 / -1; }
/* Arriba: el título, cómo está cada herramienta (una pastilla con su punto) y «Renovar» */
.glhead { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.glhead h2 { margin: 0; }
.glhead .refresh { margin-left: auto; }
.glhead .refresh[disabled] { cursor: default; color: var(--muted); border-color: var(--line); }
.glstatus { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; min-width: 0; }
.glstatus li { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); max-width: 100%; overflow-wrap: anywhere; }
.glstatus li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--arcane); }
.glstatus .warn { color: var(--error); border-color: color-mix(in srgb, var(--error) 45%, transparent); }
.glstatus .warn::before { background: var(--error); }
.glfail { color: var(--error); font-size: 14px; margin: 0 0 12px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tab { padding: 6px 14px; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.tab.on { background: var(--mine); border-color: var(--primary); color: var(--text); }
.tab .badge { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--primary); color: var(--on-primary); }
.glinst + .glinst { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.glinst h3 { font-size: 17px; margin: 0 0 8px; }
.productivity h4 { font-family: var(--sans); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 16px 0 6px; }
.gllist { list-style: none; margin: 0; padding: 0; }
.glrow { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.gllist > li:first-child, .gllist > li:first-child .person { border-top: 0; }
.glmain { flex: 1; min-width: 0; display: grid; gap: 2px; }
.glside { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.gltitle { overflow-wrap: anywhere; }
a.gltitle { color: var(--text); text-decoration: none; }
a.gltitle:hover { color: var(--primary); text-decoration: underline; }
.glsub { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; margin: 0; }
.glwhen, .glsha { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.glhandle { font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--muted); }
a.glhandle { text-decoration: none; }
a.glhandle:hover { color: var(--primary); text-decoration: underline; }
.chip { font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; white-space: nowrap; }
a.chip:hover { border-color: var(--primary); color: var(--primary); }
/* La ventana de fechas: las flechas y su nombre a la izquierda, los atajos a la derecha, y debajo de cuándo son los datos */
.window { margin-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.window .glsub { flex-basis: 100%; }
.window .lag { color: var(--error); }
.weeknav { display: flex; align-items: center; gap: 10px; }
.weeknav button { padding: 4px 14px; font-size: 18px; line-height: 1.2; }
.weeknav button.ghost { visibility: hidden; }
.weeklabel { text-align: center; font-family: var(--sans); font-weight: 600; min-width: 18ch; }
.shortcuts { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.person { width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 10px 2px; display: grid; gap: 2px; font-family: inherit; font-weight: 400; }
.person .gltitle { font-family: var(--sans); font-weight: 600; }
.productivity h3 .glsub { display: inline; }

/*
 * Equipo: una fila por persona. En el PC, como una tabla (nombre, commits, horas, líneas, IA) con sus títulos encima;
 * en el móvil, en dos líneas: el nombre con sus commits y sus horas, y debajo sus líneas y su IA.
 */
.members { list-style: none; margin: 0; padding: 0; }
.member, .memberhead {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name commits hours" "lines lines ai";
  column-gap: 16px; row-gap: 4px; align-items: center;
}
.member { width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 10px 6px; font-family: inherit; font-weight: 400; }
.member:hover { background: var(--mine); border-color: var(--line); }
.members > li:nth-child(2) .member { border-top: 0; }
.memberhead { display: none; padding: 0 6px 6px; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.mname { grid-area: name; font-family: var(--sans); font-weight: 600; overflow-wrap: anywhere; }
.mcommits { grid-area: commits; font-family: var(--mono); font-size: 13px; text-align: right; white-space: nowrap; }
.mhours { grid-area: hours; font-family: var(--mono); font-size: 13px; text-align: right; white-space: nowrap; }
.mlines { grid-area: lines; font-family: var(--mono); font-size: 13px; }
.member > .aimeter { grid-area: ai; }
/* En la tabla, «IA» ya está en el título de la columna. */
@media (min-width: 900px) {
  .member .ailabel { display: none; }
}
@media (min-width: 900px) {
  .member, .memberhead { grid-template-columns: minmax(0, 1fr) 110px 80px 170px 230px; grid-template-areas: "name commits hours lines ai"; }
  .memberhead { display: grid; }
  .memberhead span:nth-child(2), .memberhead span:nth-child(3) { text-align: right; }
}
.lines .added { color: var(--arcane); }
.lines .removed { color: var(--error); }
.aimeter { display: inline-flex; align-items: center; gap: 8px; justify-self: end; }
@media (min-width: 900px) {
  .member > .aimeter { justify-self: start; }
}
.ailabel { font-size: 12px; color: var(--muted); }
.aibar { display: flex; width: 120px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.aibar .sure, .swatch.sure { background: var(--primary); }
.aibar .likely, .swatch.likely { background: var(--likely); }
.aival { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.aival .sure { color: var(--primary); }
.aival .likely { color: var(--likely); }
.aival .none { color: var(--muted); }
.ailegend { margin-top: 14px; display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.ailegend p { margin: 0; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }

/* Mi trabajo: una tarjeta por proyecto tuyo, con tus últimos commits; y los demás proyectos como accesos */
/* Apiladas por columnas, cada una con su altura: ni huecos entre filas ni tarjetas estiradas y vacías. */
.workcards { list-style: none; margin: 0; padding: 0; columns: 3 300px; column-gap: 10px; }
.workcard { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; align-content: start; break-inside: avoid; margin-bottom: 10px; }
.workhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.workhead .gltitle { font-family: var(--sans); font-weight: 600; }
.workcard .gllist { margin-top: 4px; }
.workcard .glrow { padding: 6px 0; }
.workcard .glrow .gltitle { font-size: 14px; line-height: 1.4; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
/* Un nombre largo se corta con «…» en vez de empujar la página a lo ancho en el móvil. */
.chips > li { max-width: 100%; }
.chips .chip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }

/* El detalle de una persona */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 8px; }
.figure { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; align-content: start; }
.fvalue { font-family: var(--mono); font-size: 18px; }
.figure .aimeter { justify-self: start; }
.flabel { font-size: 12px; color: var(--muted); }
.total { font-size: 13px; margin: 12px 0; }

@media (max-width: 600px) {
  .glrow { flex-direction: column; gap: 4px; }
  .glside { justify-content: flex-start; }
  .aibar { width: 64px; }
}

/* Horas de ClickUp por día: una barra por día sobre la franja de 7 a 8 h; los fines de semana, más claros */
.hoursbyday { margin: 14px 0 6px; }
.daybars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; max-width: 640px; }
.dbday { display: grid; grid-template-rows: auto 72px auto; gap: 4px; justify-items: center; }
.dbvalue { font-family: var(--mono); font-size: 12px; min-height: 1.2em; }
.dbtrack {
  position: relative; width: 100%; max-width: 44px; height: 72px; border-radius: 6px;
  background: linear-gradient(to top, transparent var(--band-from), color-mix(in srgb, var(--arcane) 22%, transparent) var(--band-from),
    color-mix(in srgb, var(--arcane) 22%, transparent) var(--band-to), transparent var(--band-to)), var(--bg);
  border: 1px solid var(--line); overflow: hidden;
}
.dbar { position: absolute; left: 0; right: 0; bottom: 0; background: var(--primary); border-radius: 4px 4px 0 0; }
.dblabel { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dbday.weekend .dbar { background: var(--likely); }
.dbday.weekend .dblabel { opacity: .7; }

/*
 * Vacaciones: la tira del equipo (draconis/docs/productividad.md, «Fase K5-K6: el contrato», «El panel»), una fila por
 * persona y una columna por día de lunes a viernes. Las aceptadas en relleno, las pendientes rayadas, «Ausente» en gris,
 * los festivos como columna marcada y hoy resaltado. En una pantalla estrecha se desplaza de lado con los nombres fijos.
 */
.vhead { margin: 0 0 12px; font-family: var(--sans); font-weight: 600; }
.vscroll { overflow-x: auto; max-width: 100%; }
.vstrip { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.vstrip th, .vstrip td { padding: 0; text-align: center; font-weight: 400; }
.vstrip .vname { position: sticky; left: 0; z-index: 1; width: 1%; background: var(--raised); text-align: left; padding: 6px 12px 6px 0; }
.vstrip .vn { display: block; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--sans); font-weight: 600; }
.vstrip tr.me .vn { color: var(--primary); }
.vweek { font-size: 12px; color: var(--muted); text-align: left; padding: 0 6px 4px; white-space: nowrap; }
.vd { min-width: 30px; height: 32px; }
.vd.wk, .vweek { border-left: 1px solid var(--line); }
thead .vd { font-family: var(--mono); font-size: 12px; color: var(--muted); height: auto; padding-bottom: 6px; }
.vstrip tbody th, .vstrip tbody td { border-top: 1px solid var(--line); }
.vd.holiday { background: color-mix(in srgb, var(--warn) 16%, transparent); }
thead .vd.holiday { color: var(--warn); }
td.vd.today { background: color-mix(in srgb, var(--primary) 12%, transparent); }
thead .vd.today span { display: inline-block; min-width: 22px; padding: 1px 5px; border-radius: 999px; background: var(--primary); color: var(--on-primary); }
.vmark { display: block; height: 18px; margin: 0 3px; border-radius: 4px; }
.vmark.vacation, .vswatch.vacation { background: var(--primary); }
.vmark.pending, .vswatch.pending { background: repeating-linear-gradient(135deg, var(--primary) 0 2px, transparent 2px 6px); box-shadow: inset 0 0 0 1px var(--primary); }
.vmark.away, .vswatch.away { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.vswatch.holiday { background: color-mix(in srgb, var(--warn) 40%, transparent); }
.vlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.vkey { display: inline-flex; align-items: center; gap: 6px; }
.vswatch { display: inline-block; width: 16px; height: 10px; border-radius: 2px; }
@media (max-width: 600px) {
  .vstrip .vn { max-width: 8rem; }
  .vd { min-width: 26px; }
}

/* Imputar horas: la propuesta, solo para ver (draconis/docs/productividad.md, «Imputar horas en el panel») */
.tshead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 20px; margin-bottom: 12px; }
.tstitle { font-size: 19px; margin: 0 0 2px; }
.tstotals { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tssum { font-family: var(--mono); font-size: 14px; }
.chip.status { font-size: 13px; padding: 3px 11px; color: var(--text); }
.chip.status.ready { border-color: var(--arcane); color: var(--arcane); }
.chip.status.proposing, .chip.status.applying { border-color: var(--primary); color: var(--primary); }
.tsbusy { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--primary); border-radius: 10px; background: var(--mine); }
.tsbusy .glsub { flex-basis: 100%; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* El calendario: una semana por fila y una columna por día */
.tsweek + .tsweek { margin-top: 14px; }
.tsdays { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tsday { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.tsdayhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.tsdate { font-family: var(--sans); font-weight: 600; text-transform: capitalize; }
.tstotal { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.tsday.ok .tsdayhead { border-bottom-color: var(--arcane); }
.tsday.ok .tstotal { color: var(--arcane); }
.tsday.low .tsdayhead { border-bottom-color: var(--error); }
.tsday.low .tstotal { color: var(--error); }
.tsday.high .tsdayhead { border-bottom-color: var(--warn); }
.tsday.high .tstotal { color: var(--warn); }
.tslogged { margin: 0; font-size: 13px; color: var(--muted); }
.tsentries { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tsentry { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.tsentry:first-child { border-top: 0; padding-top: 2px; }
.tsentryhead { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: baseline; }
.tsmins { font-family: var(--mono); font-size: 13px; white-space: nowrap; color: var(--primary); }
.tsname { font-family: var(--sans); font-weight: 600; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; color: var(--text); }
a.tsname { text-decoration: none; }
a.tsname:hover { color: var(--primary); text-decoration: underline; }
.tsentry .glsub { padding-left: 0; }
.tsentry.done .tsmins { color: var(--arcane); }
.tsentry.failed .tsmins { color: var(--error); }
.tsfold summary { cursor: pointer; font-size: 13px; color: var(--primary); width: fit-content; }
.tsfold summary:hover { text-decoration: underline; }
.tsreason, .tsguide { margin: 4px 0 0; font-size: 13px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Debajo: las tareas, los avisos, la conversación, las directrices */
.tstasks .tstask { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.tstasks .tstask:first-child { border-top: 0; }
.tswarnings { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; color: var(--warn); }
.tschat { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 860px; }
.tsmsg { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); max-width: 92%; }
.tsmsg.me { justify-self: end; background: var(--mine); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.tswho { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.tstext { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.productivity > .tsfold { margin-top: 16px; }
.productivity > .tsfold > summary { font-family: var(--sans); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tsnote { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
@media (max-width: 600px) {
  .tstasks .tstask { flex-direction: column; gap: 4px; }
  .tsmsg { max-width: 100%; }
}
