/* =============================================================
   SSA · Sistema de Seguimiento de Actividades
   Lenguaje visual basado en el Brandbook Bertonati
   Azul 534c #132d7d · Salmón 7416c #ea6852 · Gris 25 #d0d0d0
   Tipografías: Prompt (corporativa) + Quicksand (digital)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700;800;900&family=Quicksand:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand */
  --brand-blue: #132d7d;
  --brand-blue-deep: #0d2266;
  --brand-blue-ink: #081544;
  --brand-blue-soft: #eaeefb;
  --brand-blue-tint: #f4f6fc;
  --brand-salmon: #ea6852;
  --brand-salmon-deep: #c8472f;
  --brand-salmon-soft: #fde8e2;
  --brand-gris: #d0d0d0;

  /* Semantic */
  --ink: #0a1428;
  --ink-2: #1a2540;
  --muted: #5d6a85;
  --muted-2: #8893ac;
  --line: #e3e8f1;
  --line-soft: #eef1f7;
  --bg: #f4f6fb;
  --panel: #ffffff;
  --ok: #128a5a;
  --ok-soft: #e1f4eb;
  --warn: #c47700;
  --warn-soft: #fff1d6;
  --danger: #c4321f;
  --danger-soft: #fde2dd;
  --yellow-mark: #ffd862;

  /* Tokens */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(13, 34, 102, .06), 0 2px 6px rgba(13, 34, 102, .05);
  --shadow-2: 0 4px 14px rgba(13, 34, 102, .08), 0 1px 3px rgba(13, 34, 102, .06);
  --shadow-3: 0 18px 40px rgba(13, 34, 102, .14), 0 4px 12px rgba(13, 34, 102, .08);
  --shadow-hero: 0 24px 60px rgba(8, 21, 68, .35);

  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --display: "Prompt", "Segoe UI", system-ui, sans-serif;
  --sans: "Quicksand", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p {
  margin: 0;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.12;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

h3 {
  font-size: 15px;
  font-weight: 600;
}

p {
  font-weight: 500;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
}

.mark {
  display: inline;
  padding: 0 6px;
  background: var(--yellow-mark);
  color: var(--brand-blue-ink);
  font-family: var(--display);
  font-weight: 700;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  border-radius: 3px;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* =============================================================
   App shell + topbar
   ============================================================= */

.app {
  position: relative;
  min-height: 100vh;
  max-width: 1320px;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--line);
}

.app.phone {
  max-width: 440px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 22px 10px 16px;
  color: #fff;
  background:
    radial-gradient(120% 200% at 100% -40%, rgba(234, 104, 82, .22), transparent 55%),
    linear-gradient(180deg, var(--brand-blue) 0%, var(--brand-blue-deep) 100%);
  box-shadow: 0 4px 14px rgba(8, 21, 68, .22);
}

/* Hamburger / drawer toggle */
.nav-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 0;
  cursor: pointer;
  transition: background .15s ease;
  border: 1px solid rgba(255, 255, 255, .14);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'><line x1='4' y1='7' x2='18' y2='7'/><line x1='4' y1='12' x2='18' y2='12'/><line x1='4' y1='17' x2='18' y2='17'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
}

.nav-toggle:hover {
  background-color: rgba(255, 255, 255, .2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: var(--brand-blue);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--brand-salmon);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.brand-text strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-text span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  opacity: .78;
}

.topbar .brand strong:not(.brand-text strong) {
  /* legacy support: when brand has bare <strong><span> */
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Legacy brand block (strong + span direct children) */
.brand > strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand > span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  opacity: .78;
}

.brand {
  flex-direction: row;
}

.brand:has(> strong + span) {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.topbar-spacer {
  flex: 1;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, .15);
  margin-left: auto;
}

.user-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #6dd99c;
  box-shadow: 0 0 0 2px rgba(109, 217, 156, .25);
}

/* =============================================================
   Drawer (overlay, no empuja el contenido)
   ============================================================= */

.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: min(300px, 86vw);
  height: 100vh;
  padding: 84px 14px 20px;
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: 24px 0 60px rgba(8, 21, 68, .25);
  transform: translateX(-100%);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
  overflow-y: auto;
}

.nav-check:checked ~ .side-nav {
  transform: translateX(0);
}

.nav-check:checked ~ .side-nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

.side-nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(8, 21, 68, .35);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.side-nav .nav-brand {
  position: absolute;
  top: 18px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-blue);
}

.side-nav .nav-brand b {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  background: none;
  width: auto;
  height: auto;
  color: var(--brand-blue);
}

.side-nav .nav-brand span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--muted);
}

.side-nav .nav-section {
  margin: 18px 12px 8px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.side-nav a b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.side-nav a:hover {
  background: var(--brand-blue-tint);
}

.side-nav a.active {
  background: linear-gradient(90deg, rgba(19, 45, 125, .08), rgba(19, 45, 125, 0));
  color: var(--brand-blue);
  box-shadow: inset 3px 0 0 var(--brand-salmon);
}

.side-nav a.active b {
  background: var(--brand-blue);
  color: #fff;
}

/* =============================================================
   Content
   ============================================================= */

.content {
  padding: 26px 28px 60px;
  min-width: 0;
}

.app.phone .content {
  padding: 18px 16px 80px;
}

/* =============================================================
   Hero
   ============================================================= */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
  align-items: end;
  gap: 22px;
  padding: 32px 32px 30px;
  margin: -26px -28px 26px;
  color: #fff;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(234, 104, 82, .28), transparent 60%),
    radial-gradient(70% 90% at -10% 120%, rgba(234, 104, 82, .12), transparent 60%),
    linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-deep) 60%, var(--brand-blue-ink) 100%);
  overflow: hidden;
}

.hero::before {
  /* ISO ring (Brandbook complemento gráfico) */
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: var(--brand-salmon);
  opacity: .85;
  filter: blur(0);
}

.hero::after {
  content: "";
  position: absolute;
  right: 90px;
  top: 30px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, .25);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero.compact {
  grid-template-columns: 1fr;
  padding: 28px 32px 26px;
}

.hero-copy {
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  width: fit-content;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, .18);
}

.hero .eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand-salmon);
  box-shadow: 0 0 0 3px rgba(234, 104, 82, .25);
}

.hero h1 {
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.hero p {
  color: rgba(255, 255, 255, .88);
  max-width: 640px;
  font-size: 15px;
}

.hero-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-panel strong {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
}

.hero-panel p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .82);
}

/* Mobile hero variant */
.mobile-hero {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 24px 20px 22px;
  margin: -18px -16px 18px;
  color: #fff;
  background:
    radial-gradient(80% 90% at 100% 0%, rgba(234, 104, 82, .35), transparent 55%),
    linear-gradient(160deg, var(--brand-blue) 0%, var(--brand-blue-deep) 100%);
  overflow: hidden;
}

.mobile-hero::before {
  content: "";
  position: absolute;
  right: -50px;
  top: -50px;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: var(--brand-salmon);
  opacity: .55;
}

.mobile-hero > * {
  position: relative;
  z-index: 1;
}

.mobile-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px 4px 7px;
  width: fit-content;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .15);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, .2);
}

.mobile-hero .eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--brand-salmon);
  box-shadow: 0 0 0 2px rgba(234, 104, 82, .35);
}

.mobile-hero h1 {
  color: #fff;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
}

.mobile-hero p {
  color: rgba(255, 255, 255, .85);
  font-size: 13.5px;
}

.mobile-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.mobile-stat {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .09);
  backdrop-filter: blur(4px);
}

.mobile-stat > span:first-child {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  opacity: .8;
}

.mobile-stat strong {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mobile-stat > span:last-child {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .78);
}

/* =============================================================
   Screen header (no-hero)
   ============================================================= */

.screen-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.screen-title h1 {
  font-size: 26px;
}

.screen-title p {
  margin-top: 4px;
  font-size: 13.5px;
}

/* =============================================================
   Sections
   ============================================================= */

.section {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.section-head h2 {
  font-size: 18px;
}

.section-head p {
  font-size: 13px;
}

/* =============================================================
   Metric cards
   ============================================================= */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 118px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-blue);
}

.metric.good::before { background: var(--ok); }
.metric.warn::before { background: var(--warn); }
.metric.alert::before { background: var(--brand-salmon); }

.metric > span:first-child {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.metric strong {
  font-family: var(--display);
  color: var(--ink);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.metric p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

/* =============================================================
   Tiles (used on sync page)
   ============================================================= */

.tile {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
}

.tile > span:first-child {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}

.tile strong {
  width: fit-content;
}

.tile > span:nth-child(3) {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--muted);
}

/* =============================================================
   Generic card / toolbar / panels
   ============================================================= */

.card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
}

.card h2 {
  font-size: 16px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
}

.toolbar input,
.toolbar select {
  flex: 1 1 200px;
  min-height: 42px;
}

.form-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
}

.rule-panel {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(234, 104, 82, .2), transparent 55%),
    linear-gradient(150deg, var(--brand-blue) 0%, var(--brand-blue-deep) 100%);
  color: #fff;
  overflow: hidden;
}

.rule-panel::before {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .18);
}

.rule-panel::after {
  content: "";
  position: absolute;
  right: 70px;
  bottom: -30px;
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: var(--brand-salmon);
  opacity: .7;
}

.rule-panel > * {
  position: relative;
  z-index: 1;
}

.rule-panel h2 {
  color: #fff;
  font-family: var(--display);
  font-size: 18px;
}

.rule-panel ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.rule-panel li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .92);
}

.rule-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-salmon);
}

.rule-panel strong {
  color: #fff;
  font-weight: 700;
}

/* =============================================================
   Principles (green cards on supervisor home)
   ============================================================= */

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.principle {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 18px 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.principle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-salmon);
}

.principle span {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  width: fit-content;
}

.principle h3 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
}

.principle p {
  color: var(--muted);
  font-size: 13.5px;
}

/* =============================================================
   Workbench layout
   ============================================================= */

.workbench {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(0, 1.5fr);
  gap: 16px;
  align-items: start;
}

/* Queue */

.queue {
  display: grid;
  gap: 10px;
}

.queue-item {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease;
}

.queue-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: var(--brand-blue);
}

.queue-item.alert::before {
  background: var(--brand-salmon);
}

.queue-item.selected {
  background: #fbfcff;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 1px var(--brand-blue), var(--shadow-2);
}

.queue-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-left: 10px;
}

.queue-item-head strong {
  font-family: var(--display);
  font-size: 14.5px;
  font-weight: 600;
}

.queue-item .meta {
  padding-left: 10px;
}

/* =============================================================
   Task board (kanban-ish columns)
   ============================================================= */

.task-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.board-col {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f7f9fd 0%, #f2f4fb 100%);
}

.board-col h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0 8px;
  margin-bottom: 2px;
  color: var(--brand-blue);
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  border-bottom: 1px dashed rgba(19, 45, 125, .18);
}

.board-col h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-salmon);
}

.visual-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 12.5px;
  box-shadow: 0 1px 2px rgba(13, 34, 102, .05);
  transition: transform .12s ease, box-shadow .15s ease;
}

.visual-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

.visual-card strong {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* =============================================================
   Bar list (capacity by center)
   ============================================================= */

.bar-list {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
}

.bar-list.compact {
  gap: 12px;
  padding: 0;
  border: none;
  box-shadow: none;
}

.bar-row {
  display: grid;
  grid-template-columns: 130px minmax(120px, 1fr) 48px;
  gap: 14px;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
}

.bar-row > span:first-child {
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-2);
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--brand-blue-soft);
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-blue) 0%, #2b48a8 100%);
}

.bar-row strong {
  font-family: var(--mono);
  text-align: right;
  font-size: 13px;
  color: var(--ink);
}

/* =============================================================
   State notes
   ============================================================= */

.state-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.state-note {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 13px;
}

.state-note strong {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
}

.state-note.ok {
  border-color: rgba(18, 138, 90, .25);
  background: var(--ok-soft);
}

.state-note.ok strong { color: var(--ok); }

.state-note.warn {
  border-color: rgba(196, 119, 0, .3);
  background: var(--warn-soft);
}

.state-note.warn strong { color: var(--warn); }

.state-note.danger {
  border-color: rgba(196, 50, 31, .3);
  background: var(--danger-soft);
}

.state-note.danger strong { color: var(--danger); }

/* =============================================================
   Timeline
   ============================================================= */

.timeline {
  display: grid;
  gap: 10px;
  position: relative;
}

.timeline-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.timeline-step b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
}

.timeline-step div {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
}

.timeline-step strong {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
}

/* =============================================================
   KV list
   ============================================================= */

.kv {
  display: grid;
  grid-template-columns: minmax(120px, .7fr) minmax(0, 1.3fr);
  gap: 10px 14px;
  font-size: 13px;
}

.kv span:nth-child(odd) {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  align-self: center;
}

.kv strong {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
}

/* =============================================================
   Tables
   ============================================================= */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13.5px;
}

th {
  background: var(--brand-blue-tint);
  color: var(--muted);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--brand-blue-tint);
}

td strong {
  font-family: var(--display);
  font-weight: 600;
}

/* =============================================================
   Mobile cards
   ============================================================= */

.list {
  display: grid;
  gap: 12px;
}

.mobile-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.mobile-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-blue);
}

.mobile-card.done::before { background: var(--ok); }
.mobile-card.warn::before { background: var(--warn); }
.mobile-card.cancel::before { background: var(--brand-salmon); }
.mobile-card.np::before { background: var(--brand-salmon); }

.mobile-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.mobile-card-head h3 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.mobile-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-meta span {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--brand-blue-tint);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.mobile-meta strong {
  font-family: var(--display);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

/* Mini tabs (mobile) */

.mini-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.mini-tabs span {
  flex: 1;
  padding: 9px 10px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.mini-tabs .active {
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 2px 6px rgba(19, 45, 125, .25);
}

/* =============================================================
   Task cards (supervisor)
   ============================================================= */

.task-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px 18px 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.task-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-blue);
}

.task-card.np::before { background: var(--brand-salmon); }

.task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.task-head h2 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
}

/* Detail band (mobile) */

.detail-band {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px 16px 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f7f9fe 0%, #fff 100%);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.detail-band::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-blue);
}

/* =============================================================
   Meta chips strip
   ============================================================= */

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta > span {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--brand-blue-tint);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.meta > span.mono {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-weight: 600;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* =============================================================
   Badges
   ============================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: .85;
}

.badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.alert {
  background: var(--brand-salmon-soft);
  color: var(--brand-salmon-deep);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

/* =============================================================
   Progress
   ============================================================= */

.progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--brand-blue-soft);
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-blue), #2b48a8);
}

/* =============================================================
   Forms
   ============================================================= */

.form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 500 14px var(--sans);
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(19, 45, 125, .15);
}

textarea {
  min-height: 96px;
  resize: vertical;
  font-family: var(--sans);
}

input.mono,
input[inputmode="numeric"],
input[inputmode="decimal"] {
  font-family: var(--mono);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--brand-blue) 50%),
    linear-gradient(135deg, var(--brand-blue) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

/* =============================================================
   Buttons
   ============================================================= */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--brand-blue);
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(19, 45, 125, .25);
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}

.button:hover {
  background: var(--brand-blue-deep);
  box-shadow: 0 4px 12px rgba(19, 45, 125, .3);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button.secondary {
  background: #fff;
  color: var(--brand-blue);
  border-color: var(--line);
  box-shadow: var(--shadow-1);
}

.button.secondary:hover {
  background: var(--brand-blue-tint);
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-2);
}

.button.alert {
  background: var(--brand-salmon);
  color: #fff;
  box-shadow: 0 2px 6px rgba(234, 104, 82, .35);
}

.button.alert:hover {
  background: var(--brand-salmon-deep);
  box-shadow: 0 4px 14px rgba(234, 104, 82, .4);
}

/* =============================================================
   Photo placeholders
   ============================================================= */

.photo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.photo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px dashed rgba(19, 45, 125, .25);
  border-radius: 10px;
  background:
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(19, 45, 125, .04) 8px 16px),
    linear-gradient(135deg, #eef2fb 0%, #f6f8fc 100%);
  color: var(--brand-blue);
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  padding: 8px;
}

.photo::before {
  content: "+";
  position: absolute;
  top: 8px;
  right: 10px;
  color: var(--brand-blue);
  font-size: 16px;
  font-weight: 600;
  opacity: .35;
}

/* =============================================================
   Split row
   ============================================================= */

.split-row {
  display: grid;
  grid-template-columns: 1.2fr .7fr .7fr;
  gap: 12px;
  align-items: end;
}

/* =============================================================
   Bottom nav (mobile)
   ============================================================= */

.bottom-nav {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: #fff;
}

.bottom-nav span {
  display: grid;
  place-items: center;
  min-height: 56px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.bottom-nav .active {
  color: var(--brand-blue);
  box-shadow: inset 0 3px 0 var(--brand-salmon);
}

/* =============================================================
   Grids
   ============================================================= */

.grid {
  display: grid;
  gap: 14px;
}

.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* =============================================================
   Login shell
   ============================================================= */

.login-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(60% 50% at 15% 20%, rgba(234, 104, 82, .14), transparent 60%),
    radial-gradient(60% 60% at 90% 90%, rgba(19, 45, 125, .12), transparent 60%),
    linear-gradient(180deg, #fafbfe 0%, #eef2fb 100%);
  overflow: hidden;
}

.login-shell::before {
  content: "";
  position: absolute;
  right: -200px;
  top: -200px;
  width: 540px;
  height: 540px;
  border-radius: 999px;
  background:
    radial-gradient(closest-side, rgba(19, 45, 125, .12), transparent 70%);
}

.login-shell::after {
  content: "";
  position: absolute;
  left: -150px;
  bottom: -150px;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  background:
    radial-gradient(closest-side, rgba(234, 104, 82, .14), transparent 70%);
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 36px 32px 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-3);
}

.iso-cluster {
  position: absolute;
  top: -28px;
  right: 28px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  z-index: 2;
  pointer-events: none;
}

.iso-dot {
  display: block;
  border-radius: 999px;
}

.iso-dot.blue {
  width: 28px;
  height: 28px;
  background: var(--brand-blue);
  box-shadow: 0 6px 16px rgba(19, 45, 125, .35);
  margin-bottom: 6px;
}

.iso-dot.salmon {
  width: 56px;
  height: 56px;
  background: var(--brand-salmon);
  box-shadow: 0 10px 24px rgba(234, 104, 82, .4);
}

.login-mark {
  margin-bottom: 24px;
}

.login-mark strong {
  display: block;
  color: var(--brand-blue);
  font-family: var(--display);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: 6px;
}

.login-mark p {
  color: var(--muted);
  font-size: 13.5px;
}

/* =============================================================
   Hero card (homepage map)
   ============================================================= */

.hero.compact h1 {
  font-size: 32px;
}

/* Pretty section cards on index */

section.section > h2 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
}

/* Override task-card on index (homepage map) */

.content section.section > .grid > a.task-card {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.content section.section > .grid > a.task-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-2);
}

.content section.section > .grid > a.task-card::before {
  background: var(--brand-blue);
}

.content section.section > .grid > a.task-card h3 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  color: var(--brand-blue);
}

/* =============================================================
   Responsive
   ============================================================= */

@media (max-width: 980px) {
  .metric-grid,
  .metric-grid.five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .workbench {
    grid-template-columns: 1fr;
  }
  .task-board,
  .principles,
  .state-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .content {
    padding: 18px 16px 60px;
  }
  .hero {
    margin: -18px -16px 18px;
    padding: 24px 20px 22px;
  }
  .hero h1 {
    font-size: 24px;
  }
  .metric-grid,
  .metric-grid.five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }
  .screen-title,
  .task-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .kv {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }
  .kv span:nth-child(odd) {
    margin-top: 6px;
  }
  .split-row {
    grid-template-columns: 1fr;
  }
  .user-chip {
    display: none;
  }
  table {
    min-width: 580px;
  }
}

/* =============================================================
   NEW COMPONENTS · v2
   ============================================================= */

/* Compact search bar (mis tareas) */

.search-bar {
  position: sticky;
  top: 64px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin: -4px -16px 14px;
  background: rgba(244, 246, 251, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.app:not(.phone) .search-bar {
  margin-left: 0;
  margin-right: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-1);
}

.search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-input-wrap::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2716%27%20height%3D%2716%27%20viewBox%3D%270%200%2016%2016%27%20fill%3D%27none%27%20stroke%3D%27%235d6a85%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%3E%3Ccircle%20cx%3D%277%27%20cy%3D%277%27%20r%3D%275%27%2F%3E%3Cline%20x1%3D%2710.6%27%20y1%3D%2710.6%27%20x2%3D%2714%27%20y2%3D%2714%27%2F%3E%3C%2Fsvg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

.search-input-wrap input {
  flex: 1;
  min-height: 40px;
  padding: 8px 12px 8px 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 13.5px;
}

.app.phone .search-input-wrap input {
  border-color: transparent;
  background: #fff;
  box-shadow: 0 1px 3px rgba(13, 34, 102, .08);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(13, 34, 102, .05);
}

.filter-chip::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .55;
}

.filter-chip:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.filter-chip.active {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}

.chip-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 8px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: none;
}

.chip-scroll::-webkit-scrollbar {
  display: none;
}

.chip-scroll .chip-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.chip-scroll .chip-pill.active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

/* Day strip (week tracker) */

.day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
}

.day-cell {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 8px 4px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  transition: background .15s ease;
}

.day-cell .dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--line-soft);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.day-cell.done .dot {
  background: var(--ok);
  color: #fff;
  box-shadow: 0 2px 6px rgba(18, 138, 90, .3);
}

.day-cell.partial .dot {
  background: var(--warn);
  color: #fff;
}

.day-cell.today {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

.day-cell.today .dot {
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(19, 45, 125, .4);
}

.day-cell.future .dot {
  background: #fff;
  border: 1.5px dashed var(--line);
  color: var(--muted-2);
}

/* Stat tile (compact, no top bar) */

.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.stat-tile {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.stat-tile .stat-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
}

.stat-tile.alert .stat-icon {
  background: var(--brand-salmon-soft);
  color: var(--brand-salmon-deep);
}

.stat-tile.ok .stat-icon {
  background: var(--ok-soft);
  color: var(--ok);
}

.stat-tile .stat-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.stat-tile .stat-value {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat-tile .stat-foot {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.stat-tile .stat-bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand-blue-soft);
  overflow: hidden;
}

.stat-tile .stat-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-blue), #2b48a8);
  border-radius: inherit;
}

/* Quick link card */

.quick-link {
  display: grid;
  grid-template-columns: 40px 1fr 24px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
  color: inherit;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}

.quick-link:hover {
  transform: translateY(-1px);
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-2);
}

.quick-link .ql-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
}

.quick-link .ql-body {
  display: grid;
  gap: 2px;
}

.quick-link .ql-title {
  font-family: var(--display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.quick-link .ql-sub {
  font-size: 12px;
  color: var(--muted);
}

.quick-link .ql-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--brand-blue);
  border-bottom: 2px solid var(--brand-blue);
  transform: rotate(-45deg);
}

/* Month grouping (details/summary) */

.month-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.month-group + .month-group {
  margin-top: 10px;
}

.month-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: linear-gradient(90deg, #fff 0%, var(--brand-blue-tint) 100%);
  transition: background .15s ease;
}

.month-group > summary::-webkit-details-marker {
  display: none;
}

.month-group > summary:hover {
  background: var(--brand-blue-tint);
}

.month-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.month-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.month-count {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
}

.month-totals {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

.month-totals b {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink-2);
}

.month-chevron {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s ease;
  flex-shrink: 0;
}

.month-group[open] .month-chevron {
  transform: rotate(-135deg);
}

.month-body {
  padding: 14px 18px 18px;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--brand-blue-tint) 0%, #fff 18px);
}

/* Profile layout */

.profile-shell {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.6fr);
  gap: 18px;
  align-items: start;
}

.profile-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 96px;
  background:
    radial-gradient(70% 100% at 100% 0%, rgba(234, 104, 82, .35), transparent 60%),
    linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-deep) 100%);
  z-index: 0;
}

.profile-card > * {
  position: relative;
  z-index: 1;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-blue);
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 24px rgba(8, 21, 68, .25), 0 0 0 4px rgba(255, 255, 255, .9);
  margin-top: 32px;
}

.profile-name {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.profile-name h2 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
}

.profile-name p {
  color: var(--muted);
  font-size: 13px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  width: fit-content;
}

.role-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand-salmon);
}

.role-pill.supervisor { background: linear-gradient(120deg, var(--brand-blue), #2b48a8); }
.role-pill.admin { background: linear-gradient(120deg, #1a1a2e, #3a3a55); }
.role-pill.trabajador { background: var(--brand-blue); }

.profile-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.profile-meta > div {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--brand-blue-tint);
}

.profile-meta .ml {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-meta .mv {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.profile-detail {
  display: grid;
  gap: 18px;
}

.profile-section {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-1);
}

.profile-section h3 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
}

.profile-section .sec-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-section .sec-head p {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--brand-blue-tint);
}

.toggle-row + .toggle-row {
  margin-top: 6px;
}

.toggle-row .tr-text {
  display: grid;
  gap: 2px;
}

.toggle-row strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: 13.5px;
}

.toggle-row span {
  color: var(--muted);
  font-size: 12px;
}

.toggle-switch {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand-blue);
  flex-shrink: 0;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.toggle-switch.off {
  background: #c0cad8;
}

.toggle-switch.off::after {
  right: 21px;
}

/* Session list */

.session-list {
  display: grid;
  gap: 8px;
}

.session-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.session-row.current {
  border-color: var(--ok);
  background: var(--ok-soft);
}

.session-row .sess-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
}

.session-row.current .sess-icon {
  background: var(--ok);
  color: #fff;
}

.session-row .sess-body {
  display: grid;
  gap: 2px;
}

.session-row strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: 13.5px;
}

.session-row span {
  color: var(--muted);
  font-size: 11.5px;
}

/* Support / FAQ accordion */

.faq {
  border-top: 1px solid var(--line);
}

.faq:first-child {
  border-top: none;
}

.faq > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 4px;
  cursor: pointer;
  list-style: none;
}

.faq > summary::-webkit-details-marker {
  display: none;
}

.faq-q {
  font-family: var(--display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.faq-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  transition: transform .2s ease, background .15s ease, color .15s ease;
}

.faq[open] .faq-icon { background: var(--brand-blue); color: #fff; transform: rotate(45deg); }

.faq-a {
  padding: 0 4px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* Support contact cards */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.contact-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
}

.contact-card .cc-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
}

.contact-card.salmon .cc-icon {
  background: var(--brand-salmon-soft);
  color: var(--brand-salmon-deep);
}

.contact-card.green .cc-icon {
  background: var(--ok-soft);
  color: var(--ok);
}

.contact-card h3 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
}

.contact-card p {
  font-size: 12.5px;
  color: var(--muted);
}

.contact-card .cc-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}

/* Responsive overrides for new components */

@media (max-width: 720px) {
  .profile-shell {
    grid-template-columns: 1fr;
  }
  .month-totals {
    display: none;
  }
  .search-bar {
    top: 64px;
  }
}

@media (min-width: 1100px) {
  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* =============================================================
   ACTION SHEET pattern · contextual actions
   ============================================================= */

.action-banner {
  position: sticky;
  top: 64px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  background: linear-gradient(180deg, #f4f6fb 0%, rgba(244, 246, 251, .95) 100%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin: -26px -28px 22px;
}

.app.phone .action-banner {
  margin: -18px -16px 18px;
  padding: 10px 16px;
  gap: 10px;
}

.action-banner-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand-blue);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-1);
  white-space: nowrap;
}

.action-banner-back::before {
  content: "";
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.action-banner-back:hover {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}

.action-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  flex-wrap: wrap;
}

.action-crumb b {
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--brand-blue);
}

.action-crumb span.sep {
  opacity: .55;
}

.action-crumb .current {
  color: var(--ink);
  font-weight: 700;
}

.action-banner-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.action-banner-close:hover {
  border-color: var(--brand-salmon);
  color: var(--brand-salmon-deep);
}

/* Sheet header for action context */

.action-hero {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 100% at 100% 0%, rgba(234, 104, 82, .12), transparent 60%),
    linear-gradient(180deg, #fff 0%, #f7f9fd 100%);
  box-shadow: var(--shadow-2);
}

.action-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-blue);
  border-radius: 4px 0 0 4px;
}

.action-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px 4px 8px;
  width: fit-content;
  border-radius: var(--radius-pill);
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.action-hero .eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand-salmon);
}

.action-hero h1 {
  font-size: 24px;
  color: var(--ink);
}

.action-hero p {
  color: var(--muted);
  font-size: 13.5px;
  max-width: 720px;
}

/* Result picker — radio cards for cerrar actividad */

.result-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.result-picker label {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px 18px 16px 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}

.result-picker label::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 19px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
}

.result-picker label::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 25px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

.result-picker input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.result-picker label:hover {
  transform: translateY(-1px);
  border-color: var(--brand-blue);
}

.result-picker input[type="radio"]:checked + .opt::before {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
}

.result-picker input[type="radio"]:checked + .opt::after {
  background: #fff;
}

.result-picker input[type="radio"]:checked + .opt {
  background: var(--brand-blue-tint);
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 1px var(--brand-blue), var(--shadow-2);
}

.result-picker .opt strong {
  font-family: var(--display);
  font-size: 14.5px;
  font-weight: 600;
}

.result-picker .opt span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.result-picker .opt.warn::before,
.result-picker .opt.danger::before {
  border-color: var(--line);
}

.result-picker input:checked + .opt.warn::before { border-color: var(--warn); background: var(--warn); }
.result-picker input:checked + .opt.warn { background: var(--warn-soft); border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn), var(--shadow-2); }
.result-picker input:checked + .opt.danger::before { border-color: var(--danger); background: var(--danger); }
.result-picker input:checked + .opt.danger { background: var(--danger-soft); border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger), var(--shadow-2); }

/* =============================================================
   VALIDACIÓN DE ACTA · proyecto picker + book spine + tabla
   ============================================================= */

.acta-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  transition: grid-template-columns .25s ease;
}

.acta-shell[data-proj] {
  grid-template-columns: 56px minmax(0, 1fr);
}

/* Empty state placeholder when no project selected */

.acta-shell:not([data-proj]) .proj-spine,
.acta-shell:not([data-proj]) .acta-content {
  display: none;
}

.acta-shell[data-proj] .proj-picker,
.acta-shell[data-proj] .acta-empty {
  display: none;
}

/* Project picker · expanded */

.proj-picker {
  display: grid;
  gap: 14px;
}

.proj-picker > header {
  display: grid;
  gap: 4px;
}

.proj-picker h2 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
}

.proj-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.proj-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
  overflow: hidden;
}

.proj-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-blue);
}

.proj-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-2);
}

.proj-card strong {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.proj-card .pc-client {
  color: var(--muted);
  font-size: 12.5px;
}

.proj-card .pc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

/* Book spine · collapsed state */

.proj-spine {
  position: sticky;
  top: 82px;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 56px;
  min-height: 320px;
  padding: 16px 8px;
  border: 1px solid var(--line);
  border-right: 4px solid var(--brand-blue);
  border-radius: var(--radius) 4px 4px var(--radius);
  background:
    repeating-linear-gradient(180deg, transparent 0 28px, rgba(19, 45, 125, .04) 28px 30px),
    linear-gradient(180deg, #fff 0%, var(--brand-blue-tint) 100%);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(13, 34, 102, .08);
  transition: width .2s ease, background .15s ease, transform .12s ease;
  font: inherit;
  color: var(--brand-blue);
  text-align: center;
}

.proj-spine:hover {
  background: linear-gradient(180deg, #fff 0%, #e8edf8 100%);
  transform: translateX(2px);
}

.spine-back {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  position: relative;
}

.spine-back::before {
  content: "";
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(2px, -2px);
}

.spine-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.spine-current {
  margin-top: auto;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--brand-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 220px;
}

/* Empty state */

.acta-empty {
  display: grid;
  place-items: center;
  padding: 60px 20px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff, var(--brand-blue-tint));
  color: var(--muted);
  text-align: center;
}

.acta-empty .ae-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 14px;
}

/* KPIs above table */

.acta-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
  align-items: end;
}

.acta-kpis .kpi {
  display: grid;
  gap: 2px;
}

.acta-kpis .kpi-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.acta-kpis .kpi-value {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.acta-kpis .kpi-value.adj {
  color: var(--brand-blue);
}

.acta-kpis .kpi-foot {
  font-size: 11px;
  color: var(--muted);
}

.acta-kpis .kpi-cta {
  display: flex;
  justify-content: flex-end;
}

/* Acta table */

.acta-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
}

table.acta-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

table.acta-table th,
table.acta-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

table.acta-table th {
  background: var(--brand-blue-tint);
  color: var(--muted);
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 1;
}

table.acta-table th.num,
table.acta-table td.num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

table.acta-table th.center,
table.acta-table td.center {
  text-align: center;
}

table.acta-table tbody tr {
  transition: background .12s ease;
}

table.acta-table tbody tr:hover {
  background: var(--brand-blue-tint);
}

table.acta-table tbody tr.validated {
  background: rgba(18, 138, 90, .04);
}

table.acta-table tbody tr.validated:hover {
  background: rgba(18, 138, 90, .08);
}

table.acta-table tbody tr:last-child td {
  border-bottom: none;
}

table.acta-table tfoot td {
  background: var(--brand-blue-tint);
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  border-top: 2px solid var(--brand-blue);
  border-bottom: none;
}

table.acta-table tfoot td.num {
  font-family: var(--mono);
  font-weight: 600;
}

/* Editable cells */

.cell-input {
  width: 100%;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: 500 13px var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.cell-input:hover {
  background: #fff;
  border-color: var(--line);
}

.cell-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(19, 45, 125, .14);
}

.cell-input::after {
  content: "";
}

/* Hint pill on editable column header */

th.editable-hint {
  position: relative;
}

th.editable-hint::after {
  content: "Editable";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
}

/* =============================================================
   CASCADE NAVIGATION · Proyecto › OF › OFD › Actividad
   ============================================================= */

.cascade {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.cascade-col {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 360px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f7f9fd 0%, #f2f4fb 100%);
}

.cascade-col header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 10px;
  border-bottom: 1px dashed rgba(19, 45, 125, .18);
  margin-bottom: 4px;
}

.cascade-col .col-step {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
}

.cascade-col h3 {
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--brand-blue);
  line-height: 1;
}

.cascade-col p {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.casc-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  box-shadow: 0 1px 2px rgba(13, 34, 102, .05);
  transition: transform .12s ease, border-color .15s ease, box-shadow .12s ease;
}

.casc-item:hover {
  transform: translateY(-1px);
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-2);
}

.casc-item strong {
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 600;
}

.casc-item .casc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 11px;
  color: var(--muted);
}

.casc-item.selected {
  background: var(--brand-blue-tint);
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 1px var(--brand-blue), var(--shadow-2);
}

.casc-item.alert {
  border-left: 3px solid var(--brand-salmon);
  padding-left: 9px;
}

.casc-item .casc-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.casc-item .mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  border: none;
  font: 700 11px var(--sans);
  cursor: pointer;
}

.casc-item .mini-btn.secondary {
  background: #fff;
  color: var(--brand-blue);
  border: 1px solid var(--line);
}

.casc-item .mini-btn.alert {
  background: var(--brand-salmon);
  color: #fff;
}

.casc-col-foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed rgba(19, 45, 125, .18);
}

.casc-empty {
  padding: 14px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  display: grid;
  gap: 8px;
}

.casc-empty.ofd-cta {
  border-style: solid;
  background: linear-gradient(135deg, var(--brand-salmon-soft), #fff);
  color: var(--brand-salmon-deep);
}

@media (max-width: 1100px) {
  .cascade {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .cascade {
    grid-template-columns: 1fr;
  }
}

/* Cascade reveal animation */

@keyframes casc-reveal {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes casc-item-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.cascade-col.hidden {
  display: none;
}

.cascade-col.revealing {
  animation: casc-reveal .28s cubic-bezier(.2,.8,.2,1) both;
}

.cascade-col.revealing > header + *,
.cascade-col.revealing > .casc-item {
  animation: casc-item-reveal .22s ease both;
  animation-delay: .08s;
}

.cascade-col .casc-item.new-np {
  animation: casc-item-reveal .35s cubic-bezier(.2,.8,.2,1) both;
  border-left: 3px solid var(--brand-salmon);
  padding-left: 9px;
  background: linear-gradient(135deg, var(--brand-salmon-soft), #fff);
}

/* Empty placeholder when no parent picked */

.casc-empty.pick {
  border-style: dashed;
  color: var(--muted);
  background: linear-gradient(135deg, #fff, var(--brand-blue-tint));
}

.casc-empty.pick strong {
  font-family: var(--display);
  font-size: 12.5px;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}

/* Help button + popover */

.help-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  border: 1px solid var(--brand-blue-soft);
  cursor: pointer;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  position: relative;
  transition: background .15s ease, transform .12s ease;
}

.help-btn:hover {
  background: var(--brand-blue);
  color: #fff;
}

.help-btn .help-pop {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  width: min(340px, 80vw);
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-3);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 50;
}

.help-btn .help-pop::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.help-btn:hover .help-pop,
.help-btn:focus .help-pop,
.help-btn:focus-within .help-pop,
.help-btn.open .help-pop {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.help-pop strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-blue);
}

.help-pop.right {
  left: auto;
  right: 0;
  transform: translateY(-4px);
}

.help-btn.open .help-pop.right,
.help-btn:hover .help-pop.right {
  transform: translateY(0);
}

.help-pop.right::before {
  left: auto;
  right: 14px;
  transform: rotate(45deg);
}

/* =============================================================
   CENTER GROUPS · vista 08 agrupada por centro
   ============================================================= */

.center-group {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.center-group + .center-group {
  margin-top: 14px;
}

.center-group > summary,
.center-group > .cg-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(90deg, #fff 0%, var(--brand-blue-tint) 100%);
  user-select: none;
  border-bottom: 1px solid var(--line-soft);
}

.center-group > summary::-webkit-details-marker {
  display: none;
}

.center-group .cg-name {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.center-group .cg-dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--brand-blue);
  color: #fff;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.center-group h2 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
}

.center-group .cg-count {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
}

.center-group .cg-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.center-group .cg-chevron {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s ease;
  flex-shrink: 0;
}

.center-group[open] .cg-chevron {
  transform: rotate(-135deg);
}

.center-group .cg-body {
  padding: 14px 18px 18px;
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, var(--brand-blue-tint) 0%, #fff 18px);
}

.center-group .cg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.center-group .act-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px 14px 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(13, 34, 102, .05);
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}

.center-group .act-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand-blue);
}

.center-group .act-card.alert::before { background: var(--brand-salmon); }
.center-group .act-card.warn::before { background: var(--warn); }
.center-group .act-card.ok::before { background: var(--ok); }
.center-group .act-card.muted::before { background: var(--line); }

.center-group .act-card:hover {
  transform: translateY(-1px);
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-2);
}

.center-group .act-card strong {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
}

.center-group .act-card .ac-sub {
  color: var(--muted);
  font-size: 11.5px;
}

.center-group .act-card .ac-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 11px;
  color: var(--muted);
}

.center-group .act-card .ac-meta .mono {
  color: var(--brand-blue);
  font-weight: 600;
}

.center-group .act-card .ac-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.center-group .act-card .ac-actions a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  font: 700 11.5px var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.center-group .act-card .ac-actions a.primary {
  background: var(--brand-blue);
  color: #fff;
}

.center-group .act-card .ac-actions a.secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand-blue);
}

.center-group .act-card .ac-actions a.alert {
  background: var(--brand-salmon);
  color: #fff;
}

.cg-empty {
  padding: 18px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  background: var(--brand-blue-tint);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

/* Checkbox cells */

table.acta-table .cb-cell {
  width: 40px;
  text-align: center;
}

.cb {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--brand-blue);
  vertical-align: middle;
  flex-shrink: 0;
}

.cb:disabled {
  cursor: not-allowed;
}

.cb.locked-validated {
  accent-color: var(--ok);
}

.cb.locked-empty {
  accent-color: #c0cad8;
}

.cb.std {
  accent-color: var(--muted);
}

.val-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ok);
}

.val-pill.pending {
  color: var(--muted);
}

/* Dialog */

dialog.ssa-dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(440px, 92vw);
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(8, 21, 68, .35);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

dialog.ssa-dialog::backdrop {
  background: rgba(8, 21, 68, .35);
  backdrop-filter: blur(6px);
}

.dialog-head {
  position: relative;
  padding: 22px 24px 16px;
  background:
    radial-gradient(60% 100% at 100% 0%, rgba(234, 104, 82, .2), transparent 60%),
    linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-deep) 100%);
  color: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.dialog-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.dialog-head .eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--brand-salmon);
}

.dialog-head h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.dialog-body {
  padding: 18px 24px 22px;
  display: grid;
  gap: 14px;
}

.dialog-body p {
  font-size: 13.5px;
  color: var(--ink-2);
}

.dialog-summary {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--brand-blue-tint);
}

.dialog-summary .ds-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
}

.dialog-summary .ds-row b {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink);
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

