/* Equipo Ágil
 * Tinta azul noche para la estructura, cobalto para los datos y ámbar solo para las
 * alertas (lo que no cuadra). Bricolage Grotesque en títulos, Manrope en el texto. */

:root {
    --tinta: #141a2e;
    --tinta-2: #2a3352;
    --texto: #3c4560;
    --suave: #6b7591;
    --papel: #f3f5fa;
    --blanco: #ffffff;
    --linea: #dde2ee;
    --cobalto: #3557e6;
    --cobalto-claro: #e6ebff;
    --cobalto-medio: #7d93ff;
    --ambar: #f5a524;
    --ambar-claro: #fff3dc;
    --verde: #1c9a6c;
    --rojo: #c8372d;

    --titulos: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
    --cuerpo: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --ancho: 1160px;
    --radio: 18px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
    margin: 0;
    background: var(--papel);
    color: var(--texto);
    font-family: var(--cuerpo);
    font-size: 1.02rem;
    line-height: 1.6;
}

h1, h2, h3 { margin: 0; color: var(--tinta); font-family: var(--titulos); line-height: 1.08; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--cobalto); }
img { max-width: 100%; display: block; }

.wrap { width: min(100% - 32px, var(--ancho)); margin-inline: auto; }
.narrow { max-width: 720px; padding-block: 56px 80px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 14px; background: var(--tinta); color: #fff; border-radius: 8px; }
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--cobalto); outline-offset: 2px; }

/* Botones */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 22px;
    border: 2px solid var(--tinta);
    border-radius: 12px;
    background: var(--tinta);
    color: #fff;
    font: 700 1rem var(--cuerpo);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease;
}

.btn:hover { transform: translateY(-1px); background: var(--tinta-2); border-color: var(--tinta-2); }
.btn--ghost { background: transparent; color: var(--tinta); }
.btn--ghost:hover { background: var(--blanco); color: var(--tinta); border-color: var(--tinta); }
.btn--small { min-height: 38px; padding: 6px 14px; font-size: 0.92rem; border-radius: 10px; }
.btn--light { background: var(--ambar); border-color: var(--ambar); color: var(--tinta); }
.btn--light:hover { background: #ffb840; border-color: #ffb840; }

/* Encabezado */

.top {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(243, 245, 250, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--linea);
}

.top-inner { display: flex; align-items: center; gap: 16px; min-height: 66px; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--tinta);
    font: 800 1.2rem var(--titulos);
    text-decoration: none;
    white-space: nowrap;
}

.top-nav { display: none; gap: 4px; margin-left: 12px; }
.top-nav a { padding: 8px 12px; border-radius: 10px; color: var(--texto); font-weight: 600; text-decoration: none; }
.top-nav a:hover { background: var(--blanco); color: var(--tinta); }

.top-account { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.top-account form { margin: 0; }
.who { display: none; align-items: center; gap: 8px; font-weight: 700; color: var(--tinta); }
.who img { border-radius: 50%; }

/* Portada */

.hero { padding-block: 40px 56px; }
.hero-inner { display: grid; gap: 40px; align-items: center; }

.hero h1 { font-size: clamp(2.5rem, 9vw, 4.4rem); font-weight: 800; max-width: 13ch; }
.hero-lead { margin-top: 20px; max-width: 54ch; font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 0.92rem; color: var(--suave); }

/* La pieza memorable: el registro de horas por día, con la alerta en ámbar. */
.ledger {
    margin: 0;
    padding: 22px 20px 18px;
    border: 1px solid var(--linea);
    border-radius: 22px;
    background: var(--blanco);
    box-shadow: 0 30px 60px -36px rgba(20, 26, 46, 0.45);
}

.ledger-head { display: grid; gap: 2px; margin-bottom: 16px; }
.ledger-head strong { font: 700 1.15rem var(--titulos); color: var(--tinta); }
.ledger-head span { font-size: 0.88rem; color: var(--suave); }

.ledger-grid { display: grid; gap: 8px; }
.ledger-row { display: grid; grid-template-columns: 54px repeat(5, minmax(0, 1fr)) 50px; gap: 6px; align-items: end; }
.ledger-row--days span { font-size: 0.78rem; font-weight: 700; color: var(--suave); text-align: center; }
.ledger-name { align-self: center; font-weight: 800; color: var(--tinta); font-size: 0.92rem; }

.ledger-cell {
    position: relative;
    display: flex;
    align-items: flex-end;
    height: 64px;
    border-radius: 8px;
    background: var(--papel);
    overflow: hidden;
}

.ledger-cell i { display: block; width: 100%; background: var(--cobalto-medio); border-radius: 6px 6px 0 0; }
.ledger-cell b { position: absolute; left: 0; right: 0; top: 4px; font-size: 0.74rem; text-align: center; color: var(--tinta); }
.ledger-cell.is-flag { box-shadow: inset 0 0 0 2px var(--ambar); background: var(--ambar-claro); }
.ledger-cell.is-flag i { background: var(--ambar); }
.ledger-total { align-self: center; text-align: right; font-weight: 800; color: var(--tinta); font-size: 0.88rem; }

.ledger-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--ambar-claro);
    color: #5b3d00;
    font-size: 0.92rem;
    line-height: 1.45;
}

.ledger-alert-dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--ambar); box-shadow: 0 0 0 4px rgba(245, 165, 36, 0.25); }
.ledger-foot { margin-top: 10px; font-size: 0.78rem; color: var(--suave); }

/* Franja del problema */

.band { padding-block: 56px; background: var(--tinta); }
.band-title { color: #fff; font-size: clamp(1.7rem, 5vw, 2.6rem); max-width: 26ch; }
.pains { display: grid; gap: 14px; margin-top: 32px; }
.pain { padding: 20px 22px; border-radius: var(--radio); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); }
.pain h3 { color: #fff; font-size: 1.2rem; }
.pain p { margin-top: 8px; color: #c3cae0; }

/* Secciones */

.section { padding-block: 64px; }
.section--alt { background: var(--blanco); border-block: 1px solid var(--linea); }
.section-title { font-size: clamp(1.9rem, 5.5vw, 2.8rem); }
.section-lead { margin-top: 14px; max-width: 46ch; font-size: 1.1rem; }

.steps { display: grid; gap: 16px; margin: 32px 0 0; padding: 0; list-style: none; counter-reset: paso; }
.steps li { position: relative; padding: 22px 22px 22px 74px; border-radius: var(--radio); background: var(--blanco); border: 1px solid var(--linea); counter-increment: paso; }
.steps li::before {
    content: counter(paso);
    position: absolute;
    left: 20px;
    top: 20px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--cobalto-claro);
    color: var(--cobalto);
    font: 800 1.1rem var(--titulos);
}
.steps h3 { font-size: 1.2rem; }
.steps p { margin-top: 6px; }

.features { display: grid; gap: 14px; margin-top: 32px; }
.feature { padding: 22px; border-radius: var(--radio); background: var(--papel); }
.feature h3 { font-size: 1.2rem; }
.feature p { margin-top: 8px; }
.feature--wide { background: var(--cobalto-claro); }

.security { display: grid; gap: 28px; }
.checks { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.checks li { position: relative; padding: 16px 18px 16px 50px; border-radius: 14px; background: var(--blanco); border: 1px solid var(--linea); }
.checks li::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 20px;
    width: 16px;
    height: 9px;
    border-left: 3px solid var(--verde);
    border-bottom: 3px solid var(--verde);
    transform: rotate(-45deg);
}
.checks strong { color: var(--tinta); }

/* Demo */

.section--ink { background: var(--tinta); color: #c3cae0; }
.demo { display: grid; gap: 28px; }
.demo-copy h2 { color: #fff; font-size: clamp(1.9rem, 5.5vw, 2.8rem); }
.demo-copy p { margin-top: 12px; max-width: 42ch; font-size: 1.08rem; }
.demo-done { padding: 26px; border-radius: var(--radio); background: rgba(255, 255, 255, 0.08); }
.demo-done h3 { color: #fff; font-size: 1.4rem; }
.demo-done p { margin-top: 8px; }

.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 0.95rem; }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form select, .form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--linea);
    border-radius: 12px;
    background: var(--blanco);
    color: var(--tinta);
    font: 500 1rem var(--cuerpo);
}
.form textarea { resize: vertical; }
.form-row { display: grid; gap: 16px; }
.demo-form label { color: #fff; }
.optional { font-weight: 500; color: #9aa3bf; }
.form-error { padding: 12px 14px; border-radius: 12px; background: #fde4e1; color: #8d2018; font-weight: 700; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Pie */

.foot { padding-block: 36px 44px; border-top: 1px solid var(--linea); font-size: 0.92rem; color: var(--suave); }
.foot-inner { display: grid; gap: 8px; }
.foot-brand { display: flex; align-items: center; gap: 8px; font: 800 1.05rem var(--titulos); color: var(--tinta); }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.foot-links a { color: var(--texto); }
.is-home .foot { background: var(--tinta); border-color: var(--tinta); color: #9aa3bf; }
.is-home .foot-brand { color: #fff; }
.is-home .foot-links a { color: #c3cae0; }

/* Área con sesión */

.app { padding-block: 28px 72px; }
.app-nav { display: flex; gap: 4px; margin-bottom: 24px; padding: 4px; border-radius: 14px; background: var(--blanco); border: 1px solid var(--linea); overflow-x: auto; width: fit-content; max-width: 100%; }
.app-nav a { padding: 8px 14px; border-radius: 10px; color: var(--texto); font-weight: 700; text-decoration: none; white-space: nowrap; }
.app-nav a[aria-current] { background: var(--tinta); color: #fff; }
.app-head { margin-bottom: 22px; }
.app-head h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); }
.app-head p { margin-top: 6px; color: var(--suave); }
.app-company { font-weight: 800; color: var(--cobalto); }
.flash { margin-bottom: 18px; padding: 12px 16px; border-radius: 12px; background: #dff4ea; color: #145c40; font-weight: 700; }

.empty { padding: 32px 26px; border-radius: 22px; background: var(--blanco); border: 1px solid var(--linea); }
.empty h1 { font-size: clamp(1.7rem, 5vw, 2.3rem); }
.empty p { margin-top: 12px; max-width: 60ch; }
.empty .btn { margin-top: 6px; }
.muted { color: var(--suave); font-size: 0.9rem; }

.connect { display: grid; gap: 20px; padding: 24px; border-radius: 22px; background: var(--tinta); color: #c3cae0; }
.connect h2 { color: #fff; font-size: 1.6rem; }
.connect p { margin-top: 10px; }
.connect-soon { color: var(--ambar); font-weight: 700; }
.connect-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.connect-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); color: #fff; font-weight: 600; }
.connect-list span { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--cobalto); font-weight: 800; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.tile { display: grid; gap: 2px; padding: 16px 18px; border-radius: 16px; background: var(--blanco); border: 1px solid var(--linea); }
.tile span { font-size: 0.85rem; font-weight: 700; color: var(--suave); }
.tile strong { font: 800 1.9rem var(--titulos); color: var(--tinta); }
.tile small { color: var(--suave); }

.table-wrap { overflow-x: auto; border-radius: 16px; background: var(--blanco); border: 1px solid var(--linea); }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--linea); vertical-align: top; }
.table th { font-size: 0.82rem; color: var(--suave); }
.table tr:last-child td { border-bottom: 0; }
.table-text { min-width: 220px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--cobalto-claro); color: var(--cobalto); font-weight: 700; font-size: 0.82rem; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 22px; }
.inline-form label { flex: 1 1 260px; }
.assign { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.assign select { padding: 8px 10px; border: 1px solid var(--linea); border-radius: 10px; font: 600 0.92rem var(--cuerpo); background: var(--blanco); }

/* Tablero: sprint y conexión con Azure */

.app-head--row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
.alert { margin-bottom: 18px; padding: 12px 16px; border-radius: 12px; background: var(--ambar-claro); color: #6b4300; font-weight: 600; border: 1px solid #f3d38c; }
.alert a { color: inherit; font-weight: 800; }
.panel { margin-bottom: 18px; padding: 22px; border-radius: 20px; background: var(--blanco); border: 1px solid var(--linea); }
.panel h2 { font-size: 1.3rem; margin-bottom: 12px; }
.panel p + p { margin-top: 6px; }
.panel code { padding: 1px 6px; border-radius: 6px; background: var(--papel); font-size: 0.9em; }

.conn-row { display: flex; gap: 14px; align-items: flex-start; }
.conn-row h2 { margin-bottom: 4px; }
.conn-dot { flex: none; width: 14px; height: 14px; margin-top: 7px; border-radius: 50%; }
.conn-dot--ok { background: var(--verde); box-shadow: 0 0 0 5px #dff4ea; }
.conn-dot--error { background: var(--ambar); box-shadow: 0 0 0 5px var(--ambar-claro); }
.conn-status .alert { margin: 14px 0 0; }
.conn-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-top: 16px; }
.conn-danger summary { list-style: none; cursor: pointer; }
.conn-danger summary::-webkit-details-marker { display: none; }
.conn-danger form { margin-top: 10px; max-width: 46ch; padding: 14px; border-radius: 14px; background: var(--papel); }
.conn-danger p { margin-bottom: 10px; font-size: 0.92rem; }
.btn--danger { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.btn--danger:hover { background: #a02a22; border-color: #a02a22; }

.project-pick { margin-bottom: 14px; max-width: 420px; font-weight: 700; }
.project-pick select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--linea); border-radius: 12px; font: 600 1rem var(--cuerpo); background: var(--blanco); color: var(--tinta); }
.team-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.team-list label { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--linea); cursor: pointer; font-weight: 600; }
.team-list input { width: 18px; height: 18px; accent-color: var(--cobalto); }
.team-list label:has(input:checked) { border-color: var(--cobalto); background: var(--cobalto-claro); }

.daily-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 12px; }
.daily-form label { display: grid; gap: 6px; font-weight: 700; }
.daily-form input { padding: 8px 12px; border: 1px solid var(--linea); border-radius: 10px; font: 600 1rem var(--cuerpo); color: var(--tinta); background: var(--blanco); }
.team-hint { margin: -4px 0 14px; }
.connect-form { display: grid; gap: 22px; }
.connect-form small { display: block; font-weight: 500; color: var(--suave); font-size: 0.85rem; }
.howto { margin: 0; padding: 18px 18px 18px 38px; border-radius: 16px; background: var(--papel); display: grid; gap: 10px; font-size: 0.94rem; align-content: start; }

.sprint { margin-top: 26px; padding: 22px; border-radius: 22px; background: var(--blanco); border: 1px solid var(--linea); }
.sprint .tiles { margin-top: 0; }
.sprint .tile { background: var(--papel); border-color: transparent; }
.sprint-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 18px; }
.sprint-head h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); }
.sprint-team { font-weight: 800; color: var(--cobalto); }
.sprint-team span { font-weight: 600; color: var(--suave); }
.sprint-dates { display: grid; gap: 4px; min-width: 200px; font-weight: 700; color: var(--tinta); }
.sprint-dates small { color: var(--suave); font-weight: 600; }
.sprint-bar, .mini-bar { display: block; height: 8px; border-radius: 999px; background: var(--linea); overflow: hidden; }
.sprint-bar i, .mini-bar i { display: block; height: 100%; border-radius: 999px; background: var(--cobalto); }
.tile strong em { font-style: normal; font-size: 1rem; color: var(--suave); }
.sprint-sub { margin: 22px 0 10px; font-size: 1.1rem; }
.sprint .table-wrap { border-radius: 14px; }
.table--num td:not(:first-child), .table--num th:not(:first-child) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.col-bar { width: 120px; }
.mini-bar { width: 96px; margin-left: auto; margin-top: 6px; }
.sprint-note { margin-top: 12px; font-size: 0.9rem; color: var(--suave); max-width: 70ch; }

/* Horas por día y señales */

.ledger-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--linea); background: var(--blanco); }
.day-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.day-table th, .day-table td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--linea); white-space: nowrap; }
.day-table thead th { font-size: 0.78rem; font-weight: 700; color: var(--suave); }
.day-table thead th.day-col { text-transform: capitalize; }
.day-table tbody tr:last-child th, .day-table tbody tr:last-child td { border-bottom: 2px solid var(--linea); }
.day-table tfoot th, .day-table tfoot td { border-bottom: 0; font-weight: 700; color: var(--tinta); }
.day-name { position: sticky; left: 0; z-index: 1; min-width: 132px; max-width: 180px; padding-left: 14px !important; text-align: left !important; background: var(--blanco); font-weight: 700; color: var(--tinta); overflow: hidden; text-overflow: ellipsis; box-shadow: 1px 0 0 var(--linea); }
.day-table thead .day-name { color: var(--suave); }
.day { min-width: 46px; }
.day-table td.day { position: relative; }
.day-table td.lv1, .day-table td.lv2, .day-table td.lv3, .day-table td.lv4, .day-table td.is-neg, .day-table td.is-empty { background-clip: padding-box; }
.day.lv1 { background: #eef1ff; color: var(--tinta); }
.day.lv2 { background: #c9d3ff; color: var(--tinta); }
.day.lv3 { background: #8fa3ff; color: var(--tinta); font-weight: 700; }
.day.lv4 { background: var(--cobalto); color: #fff; font-weight: 700; }
.day.is-neg { color: var(--rojo); font-weight: 700; }
.day.is-empty { background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(107, 117, 145, 0.12) 5px 7px); }
.day.is-future { background: var(--papel); }
.day-table .is-weekend { color: var(--suave); }
.day-table th.is-today { color: var(--cobalto); }
.day-table td.is-today { box-shadow: inset 2px 0 0 var(--cobalto), inset -2px 0 0 var(--cobalto); }
.day-sum { min-width: 84px; padding-inline: 12px !important; text-align: right !important; }
.day-table tbody td.day-sum, .day-table tfoot td.day-sum { color: var(--tinta); }
.day-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; font-size: 0.85rem; color: var(--suave); }
.day-key { display: inline-block; width: 18px; height: 14px; border-radius: 4px; border: 1px solid var(--linea); margin-left: 6px; }
.day-key.lv2 { background: #c9d3ff; }
.day-key.is-neg { background: #fde4e1; }
.day-key.is-empty { background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(107, 117, 145, 0.25) 4px 6px); }

.sprint--empty { padding-block: 16px; }
.sprint--empty .sprint-head { margin-bottom: 6px; }
.sprint--empty h2 { font-size: 1.15rem; }
.sprint-note--top { margin: -4px 0 10px; }
.day-table td.day a { display: block; margin: -8px -6px; padding: 8px 6px; color: inherit; text-decoration: none; }
.day-table td.day a:hover, .day-table td.day a:focus-visible { outline: 2px solid var(--tinta); outline-offset: -2px; }
.day-name a { color: inherit; text-decoration: none; }
.day-name a:hover { text-decoration: underline; }
.day-key.is-today-key { border: 2px solid var(--cobalto); }

.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--cobalto-claro); color: var(--cobalto); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.chip--muted { background: var(--papel); color: var(--suave); }
.chip--warn { background: var(--ambar-claro); color: #6b4300; }
.chip--done { background: #dff4ea; color: #145c40; }

.people-detail { display: grid; gap: 10px; }
.person { border: 1px solid var(--linea); border-radius: 16px; background: var(--blanco); }
.person > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.person > summary::-webkit-details-marker { display: none; }
.person > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--suave); border-bottom: 2px solid var(--suave); transform: rotate(-45deg); transition: transform 0.15s; flex: none; }
.person[open] > summary::before { transform: rotate(45deg); }
.person[open] > summary { border-bottom: 1px solid var(--linea); }
.person-name { font-weight: 800; color: var(--tinta); }
.person-total { color: var(--suave); font-weight: 600; font-size: 0.92rem; }
.person-rubros { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; padding-left: 20px; }
.day-detail { padding: 12px 16px 14px; border-bottom: 1px solid var(--linea); scroll-margin-top: 88px; }
.day-detail--zero { padding-block: 8px; }
.day-detail--zero h4 { font-size: 0.9rem; font-weight: 600; color: var(--suave); }
.person { scroll-margin-top: 88px; }
.day-detail:last-child { border-bottom: 0; }
.day-detail.is-target { animation: resaltar 1.6s ease-out; }
@keyframes resaltar { from { background: var(--cobalto-claro); } to { background: transparent; } }
.day-detail h4 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 0.98rem; color: var(--tinta); }
.day-detail-total { font-weight: 700; color: var(--cobalto); font-variant-numeric: tabular-nums; }
.day-detail-total.is-zero { color: var(--suave); font-weight: 600; }
.task-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.task { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--papel); }
.task-main { min-width: 0; display: grid; gap: 4px; }
.task-title { font-weight: 700; color: var(--tinta); overflow-wrap: anywhere; }
.task-title a { color: inherit; }
.task-id { margin-left: 4px; font-weight: 600; color: var(--suave); font-size: 0.85rem; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.86rem; color: var(--texto); }
.task-parent { overflow-wrap: anywhere; }
.task-progress { font-size: 0.86rem; color: var(--suave); }
.task-progress .chip { margin-left: 4px; }
.task-hours { flex: none; font: 800 1.15rem var(--titulos); color: var(--cobalto); font-variant-numeric: tabular-nums; }
.task-hours.is-neg { color: var(--rojo); }

/* Detalle por persona y por día */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; font-size: 0.9rem; color: var(--suave); }
.crumbs a { color: var(--cobalto); font-weight: 700; }
.crumbs [aria-current] { color: var(--tinta); font-weight: 700; }
.detail-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.detail-head h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.person-pick select { padding: 8px 12px; border: 1px solid var(--linea); border-radius: 10px; font: 700 0.95rem var(--cuerpo); color: var(--tinta); background: var(--blanco); max-width: 240px; }
.tiles--detail { margin: 0 0 16px; }
.tile--rubros .person-rubros { padding: 6px 0 0; }
.day-strip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 12px; scrollbar-width: thin; }
.day-chip { flex: none; display: grid; gap: 2px; min-width: 62px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--linea); background: var(--blanco); color: var(--tinta); text-align: center; text-decoration: none; }
.day-chip span { font-size: 0.78rem; font-weight: 700; color: var(--suave); text-transform: capitalize; }
.day-chip strong { font-size: 0.95rem; font-variant-numeric: tabular-nums; }
a.day-chip:hover { border-color: var(--cobalto); }
.day-chip[aria-current] { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.day-chip[aria-current] span { color: #c3cae0; }
.day-chip.is-empty { background: repeating-linear-gradient(135deg, var(--blanco) 0 5px, rgba(107, 117, 145, 0.1) 5px 7px); }
.day-chip.is-future { background: var(--papel); color: var(--suave); border-style: dashed; }
.day-chip--all { min-width: 70px; }
.day-pager .btn, .pager .btn { white-space: nowrap; }
.day-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.day-pager-team { font-weight: 700; color: var(--cobalto); font-size: 0.92rem; text-align: center; }
.detail-days { border: 1px solid var(--linea); border-radius: 18px; background: var(--blanco); overflow: hidden; }
.detail-days .day-detail h2 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 1.02rem; color: var(--tinta); }
.detail-days .day-detail h2 a { color: inherit; }
.detail-days .day-detail--zero h2 { font-size: 0.92rem; font-weight: 600; color: var(--suave); }
.detail-days + .sprint-note { margin-top: 12px; }
.detail-links { margin-top: 8px; font-size: 0.92rem; color: var(--suave); }
.detail-links a { font-weight: 700; color: var(--cobalto); }
.day-table thead th a { color: inherit; text-decoration: none; }
.day-table thead th a:hover { color: var(--cobalto); text-decoration: underline; }

/* Gráficas */

.panel--chart h2, .panel--chart h3 { font-size: 1.05rem; margin-bottom: 10px; }
.chart-grid { display: grid; gap: 14px; margin: 4px 0 14px; }
.chart-grid .panel, .chart-pair .panel { margin-bottom: 0; }
.chart-pair { display: grid; gap: 14px; margin-bottom: 16px; }
.chart-sub { margin: 8px 0 6px; font-size: 0.85rem; font-weight: 700; color: var(--suave); }
.chart-box { position: relative; }
.stack-chart { display: grid; gap: 8px; }
.stack { display: flex; gap: 2px; height: 22px; border-radius: 6px; overflow: hidden; background: var(--blanco); }
.stack--thin { height: 16px; border-radius: 4px; }
.stack-seg { min-width: 3px; cursor: default; outline: none; }
.stack-seg:hover, .stack-seg:focus-visible { filter: brightness(0.9); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 0.85rem; color: var(--texto); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; vertical-align: middle; }
.legend-name { font-weight: 700; color: var(--tinta); }
.legend-value { color: var(--suave); font-variant-numeric: tabular-nums; }
.legend--top { margin-bottom: 10px; }
.legend-line { display: inline-block; width: 16px; height: 2px; border-radius: 2px; background: var(--cobalto); }
.legend-line--ideal { background: #a9a8a1; }
.burndown { display: block; width: 100%; height: auto; overflow: visible; }
.burndown .grid { stroke: #e3e6ef; stroke-width: 1; }
.burndown .tick { fill: #898781; font: 600 11px var(--cuerpo); }
.burndown .ideal { stroke: #a9a8a1; stroke-width: 2; stroke-linecap: round; }
.burndown .real { fill: none; stroke: var(--cobalto); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.burndown .real-area { fill: var(--cobalto); opacity: 0.1; }
.burndown .real-dot { fill: var(--cobalto); stroke: var(--blanco); stroke-width: 2; }
.burndown .end-label { fill: var(--tinta); font: 700 12px var(--cuerpo); }
.burndown .hit { fill: transparent; outline: none; }
.burndown .crosshair { stroke: var(--tinta); stroke-width: 1; opacity: 0; pointer-events: none; }
.burndown.is-hover .crosshair { opacity: 0.35; }
.chart-box + .legend, .burndown + .legend { margin-top: 6px; }
.people-bars { display: grid; gap: 8px; }
.people-bar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 10px; align-items: center; }
.people-bar-name { font-weight: 700; color: var(--tinta); text-decoration: none; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-bar-name:hover { text-decoration: underline; }
.people-bar-track { min-width: 0; }
.people-bar-total { font-size: 0.85rem; font-weight: 700; color: var(--texto); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.tip { position: fixed; z-index: 90; max-width: 260px; padding: 7px 10px; border-radius: 8px; background: var(--tinta); color: #fff; font-size: 0.82rem; font-weight: 600; pointer-events: none; box-shadow: 0 8px 20px rgba(20, 26, 46, 0.25); }
.kind-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 700; color: var(--texto); }

/* Boards */

.wrap.app--wide { width: min(100% - 32px, 1680px); }
.board-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 6px; font-size: 0.92rem; color: var(--suave); font-weight: 600; }
.board-links a { padding: 5px 12px; border-radius: 999px; background: var(--blanco); border: 1px solid var(--linea); color: var(--tinta); font-weight: 700; text-decoration: none; }
.board-links a:hover { border-color: var(--cobalto); }
.board-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.board-tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--linea); background: var(--blanco); color: var(--tinta); font-weight: 700; text-decoration: none; }
.board-tabs a[aria-current] { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.panel--chart { margin-top: 14px; }
.board-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 16px 0 12px; }
.board-search input { width: min(100%, 340px); padding: 10px 12px; border: 1px solid var(--linea); border-radius: 12px; font: 500 0.95rem var(--cuerpo); background: var(--blanco); }
.board-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.92rem; }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.board-col { flex: 0 0 280px; display: flex; flex-direction: column; max-height: 75vh; border-radius: 16px; background: #e9ecf4; }
.board-col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 14px 8px; }
.board-col-head h2 { font-size: 0.95rem; }
.board-col-head span { font-size: 0.78rem; font-weight: 700; color: var(--suave); white-space: nowrap; }
.board-cards { display: grid; gap: 8px; padding: 0 8px 10px; overflow-y: auto; }
.card { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--blanco); border: 1px solid transparent; color: var(--texto); text-decoration: none; box-shadow: 0 1px 2px rgba(20, 26, 46, 0.06); }
.card:hover, .card:focus-visible { border-color: var(--cobalto); }
.card[hidden] { display: none; }
.card-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card-id { font-size: 0.78rem; font-weight: 700; color: var(--suave); }
.card-title { font-weight: 700; color: var(--tinta); line-height: 1.3; overflow-wrap: anywhere; }
.card-teams { display: flex; flex-wrap: wrap; gap: 4px; }
.chip--team { background: #e3f6ee; color: #11704d; }
.card-work { display: grid; gap: 4px; font-size: 0.8rem; color: var(--suave); }
.mini-bar--wide { width: 100%; margin: 0; height: 6px; }
.card-who { font-size: 0.78rem; color: var(--suave); }

.hu-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.hu-who { font-size: 0.88rem; color: var(--suave); }
.hu-grid { display: grid; gap: 14px; margin-top: 16px; }
.hu-side .panel, .hu-main .panel { margin-bottom: 14px; }
.rich { color: var(--texto); line-height: 1.6; overflow-wrap: anywhere; }
.rich p, .rich ul, .rich ol, .rich table { margin: 0 0 10px; }
.rich ul, .rich ol { padding-left: 22px; }
.rich table { border-collapse: collapse; font-size: 0.9rem; }
.rich td, .rich th { border: 1px solid var(--linea); padding: 4px 8px; }
.linked-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.linked-list li { display: grid; gap: 3px; justify-items: start; }

@media (min-width: 860px) {
    .chart-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
    .chart-pair { grid-template-columns: 1fr 1fr; }
    .hu-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
}
@media (max-width: 639px) {
    .people-bar { grid-template-columns: 88px 1fr auto; gap: 8px; }
    .board-col { flex-basis: 84vw; max-height: none; }
}

/* Backlog clasificado y métricas */

.kind-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--linea); background: var(--blanco); color: var(--tinta); font: 700 0.85rem var(--cuerpo); cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.backlog { display: grid; gap: 8px; }
.hu-row { border: 1px solid var(--linea); border-radius: 14px; background: var(--blanco); }
.hu-row[hidden] { display: none; }
.hu-row > summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.hu-row > summary::-webkit-details-marker { display: none; }
.hu-row[open] > summary { border-bottom: 1px solid var(--linea); }
.hu-row-title { min-width: 0; flex: 1 1 320px; color: var(--tinta); overflow-wrap: anywhere; }
.hu-row-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hu-row-hours { font-size: 0.85rem; font-weight: 700; color: var(--texto); font-variant-numeric: tabular-nums; }
.hu-row .table-wrap { border: 0; border-radius: 0 0 14px 14px; }
.hu-row-empty, .hu-row-link { padding: 10px 14px; margin: 0; font-size: 0.9rem; }
.hu-row-link a { font-weight: 700; color: var(--cobalto); }
.hu-row--outside { background: #fbfcfe; }
.stack--mini { display: inline-flex; width: 72px; height: 10px; border-radius: 3px; }
.backlog-table tr[hidden] { display: none; }

.rank-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rank-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--linea); font-size: 0.92rem; }
.rank-list li:last-child { border-bottom: 0; }
.rankings { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.rank-card { margin: 0; }
.rank-card h3 { font-size: 1rem; }
.rank-help { margin: 4px 0 10px; font-size: 0.82rem; color: var(--suave); }
.rank-rows { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rank-rows li { display: grid; grid-template-columns: 20px minmax(70px, 1fr) 1fr auto; gap: 8px; align-items: center; font-size: 0.88rem; }
.rank-pos { font-weight: 800; color: var(--suave); text-align: center; }
.rank-rows li:first-child .rank-pos { color: var(--cobalto); }
.rank-name { color: var(--tinta); font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name:hover { text-decoration: underline; }
.rank-bar { height: 8px; border-radius: 4px; background: var(--papel); overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--cobalto); border-radius: 4px; }
.rank-value { font-weight: 700; color: var(--texto); font-variant-numeric: tabular-nums; text-align: right; min-width: 48px; }
.profiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.profile { margin: 0; display: grid; gap: 10px; align-content: start; }
.profile h3 a { color: var(--tinta); }
.profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.profile-stats div { padding: 8px; border-radius: 10px; background: var(--papel); }
.profile-stats dt { font-size: 0.72rem; font-weight: 700; color: var(--suave); }
.profile-stats dd { margin: 2px 0 0; font-weight: 800; color: var(--tinta); font-size: 0.95rem; }
.profile-label { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.profile-label--good { color: #11704d; }
.profile-label--improve { color: #8a5a00; }
.profile-list { margin: -4px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 0.9rem; }

/* Backlog en árbol */

.tree-actions { display: flex; gap: 8px; margin-left: auto; }
.tree-wrap { border-radius: 14px; }
.tree { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tree th { position: sticky; top: 0; z-index: 1; padding: 10px 10px; text-align: left; font-size: 0.78rem; color: var(--suave); background: var(--blanco); border-bottom: 1px solid var(--linea); white-space: nowrap; }
.tree td { padding: 8px 10px; border-bottom: 1px solid var(--linea); vertical-align: middle; white-space: nowrap; }
.tree .num { text-align: right; font-variant-numeric: tabular-nums; }
.tree-row--l0 { background: var(--blanco); }
.tree-row--l0 td { font-weight: 600; }
.tree-row--l1, .tree-row--l2, .tree-row--l3 { background: #fbfcfe; }
.tree-row:hover { background: var(--cobalto-claro); }
.tree-row.is-done .tree-name { color: var(--suave); }
.tree-title { min-width: 320px; max-width: 560px; white-space: normal !important; }
td.tree-title { padding-left: calc(10px + var(--level, 0) * 26px) !important; }
.tree-cell { display: flex; align-items: center; gap: 8px; }
.tree-toggle { flex: none; width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; position: relative; padding: 0; }
.tree-toggle::before { content: ""; position: absolute; left: 7px; top: 6px; width: 7px; height: 7px; border-right: 2px solid var(--tinta); border-bottom: 2px solid var(--tinta); transform: rotate(-45deg); transition: transform 0.15s; }
.tree-toggle[aria-expanded="true"]::before { transform: rotate(45deg); left: 7px; top: 4px; }
.tree-toggle:hover { background: var(--papel); }
.tree-toggle--leaf::before { display: none; }
.type-badge { flex: none; display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 4px; border-radius: 5px; font: 800 0.68rem var(--cuerpo); color: #fff; }
.type--story { background: #2a78d6; }
.type--task { background: #c98500; }
.type--bug { background: #d03b3b; }
.type--issue { background: #6250d6; }
.type--feature { background: #6b7591; }
.tree-text { display: grid; min-width: 0; }
.tree-name { color: var(--tinta); overflow-wrap: anywhere; line-height: 1.3; }
.tree-row--l0 .tree-name { font-weight: 800; }
.tree-sub { font-size: 0.76rem; font-weight: 600; color: var(--suave); }
.tree-sub a { color: var(--cobalto); }
.chip--tiny { padding: 0 6px; font-size: 0.7rem; }
.state-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--papel); font-size: 0.78rem; font-weight: 700; color: var(--texto); }
.state-pill--done { background: #dff4ea; color: #145c40; }
@media (max-width: 639px) {
    .tree-actions { margin-left: 0; }
    .tree-title { min-width: 240px; }
    td.tree-title { padding-left: calc(6px + var(--level, 0) * 16px) !important; }
}

/* Pantalla de espera (formularios con data-loading) */

body.is-loading { overflow: hidden; }
.loading { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(20, 26, 46, 0.62); backdrop-filter: blur(3px); cursor: progress; outline: none; }
.loading-box { width: min(100%, 420px); padding: 30px 26px; border-radius: 22px; background: var(--blanco); text-align: center; box-shadow: 0 24px 60px rgba(20, 26, 46, 0.35); }
.loading-spinner { display: block; width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 50%; border: 4px solid var(--cobalto-claro); border-top-color: var(--cobalto); animation: girar 0.9s linear infinite; }
.loading-title { font: 800 1.25rem var(--titulos); color: var(--tinta); }
.loading-text { margin-top: 8px; color: var(--texto); }
.loading-time { min-height: 1.4em; margin-top: 10px; font-size: 0.88rem; color: var(--suave); }
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .loading-spinner { animation-duration: 2.4s; }
}

@media (max-width: 639px) {
    .sprint { padding: 18px; }
    .day-name { min-width: 104px; max-width: 120px; padding-left: 10px !important; white-space: normal; line-height: 1.25; }
    .table--cards thead { display: none; }
    .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; width: 100%; }
    .table--cards tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--linea); }
    .table--cards tr:last-child { border-bottom: 0; }
    .table--cards td { padding: 0; border: 0; }
    .table--cards .cell-name { grid-column: 1 / -1; font-size: 1.02rem; }
    .table--cards td[data-label] { display: flex; justify-content: space-between; gap: 8px; text-align: right; }
    .table--cards td[data-label]::before { content: attr(data-label); color: var(--suave); font-size: 0.85rem; text-align: left; }
    .table--cards .col-bar { grid-column: 1 / -1; width: auto; }
    .table--cards .mini-bar { width: 100%; margin: 6px 0 0; }
    .table--num.table--cards td:not(:first-child) { text-align: right; }
}

@media (min-width: 860px) {
    .connect-form { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}

.prose h1 { font-size: 2.4rem; margin-bottom: 16px; }
.prose h2 { margin-top: 28px; font-size: 1.4rem; }
.prose p { margin-top: 10px; }

@media (min-width: 720px) {
    .top-nav { display: flex; }
    .who { display: inline-flex; }
    .pains { grid-template-columns: repeat(3, 1fr); }
    .steps { grid-template-columns: repeat(3, 1fr); }
    .steps li { padding: 74px 22px 24px; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr 1fr; }
    .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .connect { grid-template-columns: 1.3fr 1fr; align-items: center; padding: 30px; }
}

@media (min-width: 980px) {
    .hero { padding-block: 64px 80px; }
    .hero-inner { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
    .features { grid-template-columns: repeat(3, 1fr); }
    .feature--wide { grid-column: span 2; }
    .security { grid-template-columns: 1fr 1fr; align-items: start; }
    .demo { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn { transition: none; }
}

/* Tabla cruzada rubro × tipo de trabajo (tablero) */
.cross-wrap { overflow-x: auto; margin-top: 12px; }
.cross { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 0.92rem; }
.cross th, .cross td { padding: 9px 10px; text-align: right; white-space: nowrap; }
.cross thead th { font-size: 0.8rem; font-weight: 700; color: var(--suave); text-transform: none; border-bottom: 1px solid var(--linea); }
.cross th[scope="row"], .cross thead th:first-child { text-align: left; white-space: normal; min-width: 150px; }
.cross th[scope="row"] a { color: var(--tinta); font-weight: 700; text-decoration: none; }
.cross th[scope="row"] a:hover { color: var(--cobalto); text-decoration: underline; }
.cross .legend-key { vertical-align: -1px; }
.cross-cell { border-radius: 6px; background: #f7f8fc; color: var(--suave); font-variant-numeric: tabular-nums; }
.cross-cell a { display: block; margin: -9px -10px; padding: 9px 10px; color: inherit; text-decoration: none; border-radius: 6px; }
.cross-cell a:hover { outline: 2px solid var(--tinta); outline-offset: -2px; }
.cross-cell.lv1 { background: #eef1ff; color: var(--tinta); }
.cross-cell.lv2 { background: #c9d3ff; color: var(--tinta); }
.cross-cell.lv3 { background: #8fa3ff; color: var(--tinta); font-weight: 700; }
.cross-cell.lv4 { background: var(--cobalto); color: #fff; font-weight: 700; }
.cross-total { color: var(--tinta); font-weight: 700; font-variant-numeric: tabular-nums; }
.cross-total a { color: var(--tinta); text-decoration: none; }
.cross-total a:hover { color: var(--cobalto); text-decoration: underline; }
.cross-total small { display: block; color: var(--suave); font-weight: 500; font-size: 0.76rem; }
.cross tfoot th, .cross tfoot td { border-top: 1px solid var(--linea); }

.rubro-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px;
    background: var(--cobalto-claro); color: var(--tinta); font-size: 0.86rem; }
.rubro-chip button { border: 0; background: var(--blanco); color: var(--tinta); width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 0.8rem; }
.rubro-chip button:hover { background: var(--tinta); color: #fff; }
.rubro-chip[hidden] { display: none; }
.chart-grid > * { min-width: 0; }
@media (min-width: 900px) {
    .chart-grid--cross { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
}
@media (max-width: 600px) {
    .cross { font-size: 0.84rem; }
    .cross th, .cross td { padding: 7px 6px; }
    .cross-cell a { margin: -7px -6px; padding: 7px 6px; }
    .cross th[scope="row"], .cross thead th:first-child { min-width: 96px; }
}

/* Marcas de vínculo: en el backlog (sprint) y en un board, con enlace a Azure */
.link-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.link-group { display: inline-flex; align-items: center; gap: 2px; }
.link-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 999px;
    font-size: 0.72rem; font-weight: 700; line-height: 1.5; text-decoration: none; border: 1px solid transparent; white-space: nowrap; }
.link-badge svg { flex: none; }
.link-badge--backlog.is-on { background: var(--cobalto-claro); color: #2440b8; }
.link-badge--board.is-on { background: #dff3ea; color: #136b4b; }
.link-badge.is-weak { background: var(--ambar-claro); color: #8a5a00; border-color: #f0c66e; border-style: dashed; }
.link-badge.is-off { background: transparent; color: var(--suave); border-color: var(--linea); border-style: dashed; }
a.link-badge:hover { filter: brightness(0.94); text-decoration: underline; }
.azure-link { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px;
    color: var(--suave); vertical-align: middle; }
.azure-link:hover { background: var(--cobalto-claro); color: var(--cobalto); }
.link-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 10px 0 0; font-size: 0.82rem; color: var(--suave); }
.link-legend li { display: inline-flex; align-items: center; gap: 6px; }

/* Tarjeta del board: el título es el enlace y cubre la tarjeta; las marcas quedan encima */
.card { position: relative; }
.card-link { text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.card:hover, .card:focus-within { border-color: var(--cobalto); }
.card .link-badges { position: relative; z-index: 1; }
@media (min-width: 1100px) { .tiles--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.link-badge.is-na { background: #eef0f5; color: var(--suave); }

/* Filtros (backlog, boards, métricas) */
.filters { display: grid; gap: 10px; margin: 16px 0 12px; padding: 14px; border-radius: 14px; background: var(--blanco); border: 1px solid var(--linea); }
.filters-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.filters-row--status { align-items: center; padding-top: 10px; border-top: 1px solid var(--linea); }
.filter-field { display: grid; gap: 4px; font-size: 0.78rem; font-weight: 700; color: var(--suave); }
.filter-field select, .filter-field input { min-width: 180px; padding: 9px 12px; border: 1px solid var(--linea); border-radius: 10px;
    font: 600 0.92rem var(--cuerpo); color: var(--tinta); background: var(--blanco); }
.filter-field--grow { flex: 1 1 220px; }
.filter-field--grow input { width: 100%; min-width: 0; }
.filter-field select:focus, .filter-field input:focus { outline: 2px solid var(--cobalto); outline-offset: 1px; }
.filters .board-check { padding-bottom: 9px; }
.filter-summary { margin: 0; font-size: 0.9rem; color: var(--texto); }
.filter-summary strong { color: var(--tinta); }
.filters-row--status .tree-actions { margin-left: auto; }
@media (max-width: 600px) {
    .filter-field, .filter-field select { width: 100%; min-width: 0; }
    .filters-row--status .tree-actions { margin-left: 0; }
}
.person-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; font-size: 0.9rem; font-weight: 700; }
.filters--inline .filters-row { align-items: center; }
.rank-rows li.is-focus { background: var(--cobalto-claro); border-radius: 8px; box-shadow: inset 3px 0 0 var(--cobalto); }
.rank-rows li.is-focus .rank-name { font-weight: 800; }
.profile[hidden] { display: none; }
.board-col.is-empty { opacity: 0.55; }
.tree-row--origin { background: var(--cobalto-claro); }
.tree-row--origin .tree-sub { white-space: normal; max-width: 60ch; }

/* Velocidad */
.velo-key--committed { background: #b9cdf1; }
.velo-key--delivered { background: #2a78d6; }
.velo-chart { display: flex; gap: 10px; align-items: stretch; height: 240px; padding: 22px 0 0; border-bottom: 1px solid var(--linea); overflow-x: auto; }
.velo-col { flex: 1 0 78px; display: grid; grid-template-rows: 1fr auto; gap: 6px; text-decoration: none; color: var(--texto); border-radius: 10px; padding: 0 4px; }
.velo-col:hover, .velo-col.is-selected { background: var(--cobalto-claro); }
.velo-bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; }
.velo-bar { position: relative; width: 26px; min-height: 2px; border-radius: 4px 4px 0 0; }
.velo-bar b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 0.72rem; color: var(--texto); padding-bottom: 2px; white-space: nowrap; }
.velo-bar--committed { background: #b9cdf1; }
.velo-bar--delivered { background: #2a78d6; }
.velo-bar--delivered b { color: var(--tinta); font-weight: 800; }
.velo-label { font-size: 0.78rem; font-weight: 700; text-align: center; padding-bottom: 6px; color: var(--tinta); }
.velo-label small, .velo-table th small { display: block; font-weight: 600; color: var(--suave); font-size: 0.7rem; }
.velo-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.velo-table th, .velo-table td { padding: 8px 10px; border-bottom: 1px solid var(--linea); text-align: left; }
.velo-table .num { text-align: right; }
.velo-table td a { color: var(--tinta); text-decoration: none; display: block; }
.velo-table td a:hover strong { color: var(--cobalto); text-decoration: underline; }
.velo-table td small { display: block; color: var(--suave); font-size: 0.74rem; }
.velo-table tr.is-focus { background: var(--cobalto-claro); }
.velo-hus { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.velo-hus th, .velo-hus td { padding: 8px 10px; border-bottom: 1px solid var(--linea); text-align: left; vertical-align: top; }
.velo-hus th { font-size: 0.78rem; color: var(--suave); }
.velo-hus .num { text-align: right; }
.velo-hus tr.is-muted td { color: var(--suave); }
.velo-hus tr.is-muted .tree-name { font-weight: 500; }
.board-tabs--small { margin: 8px 0 12px; }
.velo-rules summary { cursor: pointer; font-weight: 800; color: var(--tinta); }
.velo-rules ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; }

/* Cierre por sprint (Métricas) */
.sprint-close { margin-top: 8px; }
.sprint-close-head { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-end; justify-content: space-between; }
.sprint-close-head h2 { font-size: 1.35rem; }
.sprint-close-head .chart-sub { max-width: 70ch; }
.close-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.close-table th, .close-table td { padding: 9px 10px; border-bottom: 1px solid var(--linea); text-align: left; vertical-align: middle; }
.close-table thead th { font-size: 0.76rem; color: var(--suave); }
.close-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.close-table td small { display: block; color: var(--suave); font-size: 0.74rem; }
.close-table th[scope="row"] a { color: var(--tinta); font-weight: 700; text-decoration: none; }
.close-table th[scope="row"] a:hover { color: var(--cobalto); text-decoration: underline; }
.close-table tr.is-focus { background: var(--cobalto-claro); }
.close-bar-col { width: 30%; min-width: 180px; }
.close-bar { position: relative; display: flex; gap: 2px; height: 14px; background: #f1f3f8; border-radius: 4px; }
.close-bar i { display: block; height: 100%; }
.close-done { background: #2a78d6; border-radius: 4px 0 0 4px; }
.close-left { background: #b9cdf1; border-radius: 0 4px 4px 0; }
.close-plan { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--tinta); border-radius: 1px; margin-left: -1px; }
.close-key--plan { width: 3px !important; background: var(--tinta); }
.trend-grid { display: grid; gap: 14px; }
@media (min-width: 900px) { .trend-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.trend-card { margin-top: 0; }
.velo-chart--small { height: 170px; gap: 4px; }
.velo-chart--small .velo-col { flex-basis: 44px; padding: 0 2px; }
.velo-chart--small .velo-bar { width: 14px; }
.velo-chart--small .velo-bar b { font-size: 0.64rem; }
.velo-chart--small .velo-label { font-size: 0.68rem; }
.metrics-now { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--linea); }
.day.is-off { background: #eef0f5; }
.day-off { font-size: 0.68rem; font-weight: 700; color: var(--suave); letter-spacing: 0.02em; }
.day-key.is-off { background: #eef0f5; }
.team-tabs-main { margin: 14px 0 4px; }
.board-col--done { opacity: 0.85; }
.board-col--done .board-col-head h2::after { content: " ✓"; color: var(--verde); }
.board-col-empty { margin: 4px 0; font-size: 0.82rem; color: var(--suave); text-align: center; padding: 10px; border: 1px dashed var(--linea); border-radius: 10px; }
.card-azure { position: relative; z-index: 1; margin-left: auto; }
