/* ============================================================
   Dental Partners — B2B Area
   Visual style reference · Graphite × Terracotta (Light)
   Fonts: Host Grotesk (UI) + JetBrains Mono (numerals, labels)
   Mobile-first. PC breakpoint activates at ≥1024px.
   ============================================================ */

:root {
  /* Surfaces — light & slightly warm */
  --bg: #FFFFFF;
  --surface: #FBF8F3;
  --surface-2: #F5F0E7;
  --surface-3: #EDE5D7;
  --border: rgba(43, 36, 32, 0.08);
  --border-strong: rgba(43, 36, 32, 0.16);

  /* Text */
  --text: #1A1412;
  --text-2: #5A4A42;
  --muted: #9B8B7D;

  /* Terracotta palette */
  --terracotta: #B04A2E;
  --terracotta-deep: #8E3920;
  --terracotta-soft: #F5D4C4;
  --terracotta-foreground: #FFE9DA;
  --ochre: #C9821F;
  --ochre-soft: #F6E2BD;
  --petrol: #2C5F5D;
  --petrol-soft: #BCD1CF;
  --success: #5D8A2E;
  --danger: #B04A2E;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --touch-target: 44px;

  --font-ui: "Host Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #EDE5D7; min-height: 100vh; }

body {
  font-family: var(--font-ui);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss03", "cv11";
  display: grid;
  place-items: center;
  padding: 24px 12px 60px;
}

button { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* --- mockup stage (sólo referencia visual, se elimina en prod) --- */
.stage { width: 100%; max-width: 420px; }
.stage-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.stage-label span { color: var(--terracotta); }

.app {
  background: var(--bg);
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(43, 36, 32, 0.06),
    0 30px 60px -20px rgba(176, 74, 46, 0.18),
    0 12px 30px -10px rgba(43, 36, 32, 0.14);
  /* La card debe llenar el viewport disponible aunque la vista no
     tenga contenido. body padding mobile = 24px + 60px = 84px. */
  width: 100%;
  max-width: 420px;
  min-height: calc(100dvh - 84px);
  display: flex;
  flex-direction: column;
}

/* Contenedor del bloque content: crece y empuja el tabbar al fondo
   en vistas con poco contenido (p. ej. liquidaciones vacía). */
.app-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  z-index: 1;
}

/* Empty state aislado: se centra en el espacio sobrante de la card
   en lugar de quedar flotando justo bajo el hero. */
.app-main > .empty-state:last-child {
  margin-top: auto;
  margin-bottom: auto;
}

/* Ambient warmth — subtle terracotta haze at top */
.app::before {
  content: "";
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 320px; height: 280px;
  background:
    radial-gradient(ellipse at 45% 60%, rgba(176, 74, 46, 0.09), transparent 60%),
    radial-gradient(ellipse at 70% 40%, rgba(201, 130, 31, 0.06), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  position: relative;
  z-index: 2;
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--ochre) 100%);
  display: grid;
  place-items: center;
  color: var(--terracotta-foreground);
  font-weight: 700;
  font-size: 13px;
  box-shadow:
    0 0 0 1px rgba(176, 74, 46, 0.25),
    0 6px 16px -4px rgba(176, 74, 46, 0.35);
}
.brand-mark--img {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: transparent;
  box-shadow: 0 4px 14px -6px rgba(46, 38, 34, 0.35);
  object-fit: contain;
  display: block;
}
.brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-name em {
  color: var(--muted);
  font-style: normal;
  font-weight: 400;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.icon-btn:hover { border-color: var(--border-strong); background: var(--bg); }
.icon-btn svg { width: 18px; height: 18px; stroke-width: 1.8; }
.dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 10px rgba(176, 74, 46, 0.7);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  padding: 18px 20px 24px;
}
.hero-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--terracotta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-kicker::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 8px rgba(176, 74, 46, 0.6);
}
.hero-title {
  font-size: clamp(26px, 8vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(90deg, var(--terracotta), var(--ochre));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}
.hero-sub {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

/* ============================================================
   KPI ROW
   ============================================================ */
.kpi-row {
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 14px 16px;
  position: relative;
  overflow: hidden;
}
a.kpi {
  display: block;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
a.kpi:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -10px rgba(43, 36, 32, 0.18);
}
a.kpi:active { transform: translateY(0); }
.kpi-primary {
  grid-column: span 2;
  background:
    radial-gradient(circle at top right, rgba(176, 74, 46, 0.09), transparent 55%),
    var(--surface);
  border-color: rgba(176, 74, 46, 0.22);
}
.kpi-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.kpi-primary .kpi-label { color: var(--terracotta); }
.kpi-value {
  font-family: var(--font-ui);
  font-feature-settings: "tnum", "lnum";
  font-size: clamp(18px, 5.6vw, 26px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 4px;
  color: var(--text);
  min-width: 0;
}
.kpi-primary .kpi-value {
  font-size: clamp(28px, 9vw, 38px);
  flex-wrap: nowrap;
}
.kpi-unit {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ochre);
  padding: 3px 7px;
  background: var(--ochre-soft);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(201, 130, 31, 0.24);
}
.kpi-delta.danger {
  color: var(--terracotta);
  background: var(--terracotta-soft);
  border-color: rgba(176, 74, 46, 0.24);
}
.kpi-delta.success {
  color: var(--success);
  background: rgba(93, 138, 46, 0.1);
  border-color: rgba(93, 138, 46, 0.24);
}
.kpi-meta {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-2);
}
.kpi-meta .hl { color: var(--terracotta); font-weight: 600; }

.progress-bar {
  margin-top: 14px;
  height: 4px;
  background: var(--surface-3);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  width: 62%;
  background: linear-gradient(90deg, var(--terracotta), var(--ochre));
  border-radius: 4px;
  position: relative;
  box-shadow: 0 0 8px rgba(176, 74, 46, 0.3);
}
.progress-fill::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 8px; height: 100%;
  background: rgba(255, 250, 240, 0.7);
  filter: blur(4px);
}

/* ============================================================
   ALERT (CAE)
   ============================================================ */
.alert {
  margin: 14px 20px 0;
  padding: 14px 14px 14px 16px;
  background:
    linear-gradient(90deg, var(--ochre-soft), rgba(246, 226, 189, 0.2)),
    var(--surface);
  border: 1px solid rgba(201, 130, 31, 0.3);
  border-left: 3px solid var(--ochre);
  border-radius: var(--radius-md);
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.alert.danger {
  background: linear-gradient(90deg, var(--terracotta-soft), rgba(245, 212, 196, 0.2)), var(--surface);
  border-color: rgba(176, 74, 46, 0.3);
  border-left-color: var(--terracotta);
}
.alert.danger .alert-icon { background: rgba(176, 74, 46, 0.18); color: var(--terracotta); }
.alert.danger .alert-cta { color: var(--terracotta); }

.alert-icon {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(201, 130, 31, 0.2);
  color: var(--ochre);
  display: grid;
  place-items: center;
}
.alert-icon svg { width: 16px; height: 16px; stroke-width: 2; }

.alert-body { flex: 1; min-width: 0; }
.alert-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  letter-spacing: -0.005em;
}
.alert-sub {
  font-size: 11.5px;
  color: var(--text-2);
  font-family: var(--font-mono);
}

.alert-cta {
  font-size: 12px;
  color: var(--ochre);
  font-weight: 700;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ============================================================
   SECTION HEAD
   ============================================================ */
.section-head {
  padding: 26px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.section-title {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section-link {
  font-size: 12px;
  color: var(--terracotta);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

/* ============================================================
   RESERVAS LIST
   ============================================================ */
.reservas {
  padding: 0 20px;
  position: relative;
  z-index: 1;
}
.reserva {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  color: inherit;
  min-height: var(--touch-target);
}
.reserva:hover {
  border-color: var(--border-strong);
  transform: translateX(2px);
}
.r-date-block {
  width: 48px;
  aspect-ratio: 1;
  background: var(--bg);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.r-day {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  font-feature-settings: "tnum";
  letter-spacing: -0.02em;
  color: var(--text);
}
.r-month {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--terracotta);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.r-body { min-width: 0; }
.r-time {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  font-feature-settings: "tnum";
  color: var(--text);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}
.r-place {
  font-size: 11.5px;
  color: var(--text-2);
}
.r-place span {
  color: var(--petrol);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 6px;
  background: var(--petrol-soft);
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 500;
}
.r-arrow {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
}
.r-arrow svg { width: 10px; height: 10px; stroke-width: 2.5; }

/* ============================================================
   CTA
   ============================================================ */
.cta-wrap {
  padding: 22px 20px 24px;
  position: relative;
  z-index: 1;
}
.cta {
  width: 100%;
  min-height: 52px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--ochre) 100%);
  color: var(--terracotta-foreground);
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow:
    0 0 0 1px rgba(255, 248, 236, 0.15) inset,
    0 10px 30px -8px rgba(176, 74, 46, 0.4),
    0 2px 8px -2px rgba(43, 36, 32, 0.14);
  transition: transform 0.2s ease;
}
.cta:active { transform: translateY(1px); }
.cta svg { width: 18px; height: 18px; stroke-width: 2.2; }

.cta-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cta-meta strong { color: var(--terracotta); font-weight: 700; }

/* ============================================================
   ALTA EN CURSO (proceso de alta del colaborador en el dashboard)
   ============================================================ */
.alta-en-curso {
  padding: 0 20px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}
.alta-en-curso__head {
  padding: 26px 0 12px;
}
.alta-en-curso__kicker {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}
.alta-en-curso__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-top: 4px;
}
.alta-en-curso__estado {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 12px;
}
.alta-en-curso__estado strong {
  color: var(--terracotta);
  font-weight: 700;
}
.alta-en-curso__pendientes,
.alta-en-curso__ok {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.alta-en-curso__pendientes > p {
  font-size: 13px;
  color: var(--text-2);
  margin: 0 0 12px;
}
.alta-en-curso__pendientes ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.alta-en-curso__pendientes li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;
}
.alta-en-curso__pendientes li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ochre);
}
.alta-en-curso__ok {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.4;
  border-left: 3px solid var(--terracotta);
}

/* ============================================================
   TAB BAR (bottom navigation)
   ============================================================ */
.tabbar {
  padding: 12px 8px 22px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  position: relative;
  z-index: 1;
}
.tab {
  padding: 10px 0 6px;
  background: transparent;
  border: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--radius-md);
  position: relative;
  min-height: var(--touch-target);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.tab svg { width: 20px; height: 20px; stroke-width: 1.8; }
.tab.active {
  color: var(--terracotta);
  background: var(--bg);
}
.tab.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 20px;
  height: 2px;
  background: var(--terracotta);
  border-radius: 0 0 2px 2px;
  box-shadow: 0 0 6px rgba(176, 74, 46, 0.5);
}

/* ============================================================
   PC breakpoint (≥1024px)
   ============================================================ */
@media (min-width: 1024px) {
  body { padding: 48px 24px; }
  .stage { max-width: 680px; }
  .app {
    border-radius: 28px;
    max-width: 680px;
    /* body padding PC = 48px × 2 = 96px */
    min-height: calc(100dvh - 96px);
  }
  .hero-title { font-size: 36px; }
  .kpi-primary .kpi-value { font-size: 44px; }
  .kpi-value { font-size: 26px; }
}

/* ============================================================
   Form primitives (base para futuros paso_NN)
   ============================================================ */
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.form-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--terracotta);
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(176, 74, 46, 0.12);
}
.form-help { font-size: 12px; color: var(--text-2); }

/* Button variants */
.btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--ochre) 100%);
  color: var(--terracotta-foreground);
  box-shadow: 0 6px 18px -6px rgba(176, 74, 46, 0.35);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-strong); background: var(--bg); }
.btn-ghost { background: transparent; color: var(--terracotta); }
.btn-ghost:hover { background: var(--terracotta-soft); }

/* Badges */
.badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-terracotta { background: var(--terracotta-soft); color: var(--terracotta-deep); }
.badge-ochre { background: var(--ochre-soft); color: var(--ochre); }
.badge-petrol { background: var(--petrol-soft); color: var(--petrol); }
.badge-neutral { background: var(--surface-2); color: var(--text-2); }
.badge-success { background: rgba(93, 138, 46, 0.12); color: var(--success); }

/* Utility */
.hidden { display: none !important; }
.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;
}

/* Selection */
::selection { background: rgba(176, 74, 46, 0.25); color: var(--text); }

/* Focus visible — accessibility */
:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

/* ============================================================
   CTA activar Web Push (dashboard) — oculto hasta que el JS decide
   ============================================================ */
.push-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 20px 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--terracotta);
  border-radius: var(--radius-md);
}
/* Respeta el atributo hidden por encima del display:flex de arriba. */
.push-cta[hidden] { display: none; }
.push-cta-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.push-cta-text strong { font-size: 14px; color: var(--text); }
.push-cta-text span { font-size: 12px; color: var(--text-2); line-height: 1.35; }
.push-cta-btn {
  flex-shrink: 0;
  min-height: var(--touch-target);
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--ochre) 100%);
  color: var(--terracotta-foreground);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.push-cta-btn:active { transform: translateY(1px); }
.push-cta-btn:disabled { opacity: 0.6; cursor: default; }

/* ============================================================
   Calendario de disponibilidad (paso_11)
   ============================================================ */
.calendario-mes {
  padding: 0 20px 8px;
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0 12px;
}
.calendar-nav .btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 12px;
}
.calendar-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.calendar-title-mes {
  font-weight: 600;
  font-size: 15px;
  text-transform: capitalize;
  letter-spacing: -0.01em;
}
.calendar-title-anio {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-header-cell {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 0 8px;
}

.calendar-day {
  aspect-ratio: 1;
  min-height: var(--touch-target);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: transform 0.08s ease, background 0.12s ease, border-color 0.12s ease;
}
.calendar-day[role="button"]:hover {
  border-color: var(--border-strong);
  background: var(--bg);
}
.calendar-day[role="button"]:active {
  transform: scale(0.96);
}

.calendar-day--fuera_mes {
  background: transparent;
  border-color: transparent;
  cursor: default;
}
.calendar-day--pasado {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--surface-2);
}
.calendar-day--libre {
  background: var(--bg);
}
.calendar-day--reservado {
  background: var(--petrol-soft);
  color: var(--petrol);
  border-color: rgba(44, 95, 93, 0.28);
}
.calendar-day--disponible_extra {
  background: var(--ochre-soft);
  color: #7a5310;
  border-color: rgba(201, 130, 31, 0.32);
}
.calendar-day--cerrado {
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
  border-color: rgba(176, 74, 46, 0.32);
  text-decoration: line-through;
}
.calendar-day--apertura_propuesta {
  background: repeating-linear-gradient(
    -45deg,
    var(--ochre-soft) 0 6px,
    #fdefd0 6px 12px
  );
  color: #7a5310;
  border: 1px dashed var(--ochre);
}
.calendar-day--cierre_propuesto {
  background: repeating-linear-gradient(
    -45deg,
    var(--terracotta-soft) 0 6px,
    #f9dfd1 6px 12px
  );
  color: var(--terracotta-deep);
  border: 1px dashed var(--terracotta);
  text-decoration: line-through;
}
/* Pendiente de gestor: comunicación enviada, aún sin resolver. Mismo
   color base que la propuesta del borrador, pero con un punto en
   lugar de rayas y sin tachado para diferenciarlo. */
.calendar-day--apertura_pendiente {
  background: var(--ochre-soft);
  color: #7a5310;
  border: 1px dotted var(--ochre);
}
.calendar-day--cierre_pendiente {
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
  border: 1px dotted var(--terracotta);
}
.calendar-day--en-borrador {
  box-shadow: 0 0 0 2px rgba(176, 74, 46, 0.15);
}

.calendar-day-num {
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.calendar-day-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  opacity: 0.75;
}

/* --- Día partido: mañana arriba, tarde abajo --- */
/* Cuando estado_manana != estado_tarde, el template añade
   .calendar-day--partido y dos hijos .calendar-day-half que ocupan
   cada uno la mitad de la celda con el color de su turno. El número
   del día va superpuesto en el centro vía position:absolute. */
.calendar-day--partido {
  position: relative;
  background: transparent;
  border-color: var(--border);
  padding: 0;
  overflow: hidden;
}
.calendar-day-half {
  display: block;
  width: 100%;
  flex: 1 1 50%;
  pointer-events: none;
}
.calendar-day-half--manana {
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}
.calendar-day-num--partido {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 14px 0 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid var(--border);
}
.legend-swatch--reservado { background: var(--petrol-soft); border-color: rgba(44, 95, 93, 0.28); }
.legend-swatch--disponible_extra { background: var(--ochre-soft); border-color: rgba(201, 130, 31, 0.32); }
.legend-swatch--cerrado { background: var(--terracotta-soft); border-color: rgba(176, 74, 46, 0.32); }
.legend-swatch--apertura_propuesta {
  background: repeating-linear-gradient(-45deg, var(--ochre-soft) 0 3px, #fdefd0 3px 6px);
  border: 1px dashed var(--ochre);
}
.legend-swatch--cierre_propuesto {
  background: repeating-linear-gradient(-45deg, var(--terracotta-soft) 0 3px, #f9dfd1 3px 6px);
  border: 1px dashed var(--terracotta);
}
.legend-swatch--apertura_pendiente {
  background: var(--ochre-soft);
  border: 1px dotted var(--ochre);
}
.legend-swatch--cierre_pendiente {
  background: var(--terracotta-soft);
  border: 1px dotted var(--terracotta);
}

/* --- Borrador de comunicación --- */
.borrador {
  margin: 12px 20px 24px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.borrador-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.borrador-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.borrador-contador {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--terracotta-deep);
  font-weight: 600;
}
.borrador-lista {
  list-style: none;
  margin: 8px 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.borrador-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.borrador-item--apertura { border-color: rgba(201, 130, 31, 0.35); }
.borrador-item--cierre { border-color: rgba(176, 74, 46, 0.35); }
.borrador-fecha {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.borrador-tipo {
  font-weight: 600;
}
.borrador-acciones {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.borrador-empty {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 2px;
}

/* --- Borrador: chip de turno en cada item --- */
.borrador-turno {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.borrador-turno--completo {
  background: var(--surface);
  border-color: var(--border-strong);
}
.borrador-turno--M {
  background: #fff8e6;
  border-color: rgba(201, 130, 31, 0.32);
  color: #7a5310;
}
.borrador-turno--T {
  background: #f0e8ff;
  border-color: rgba(120, 80, 180, 0.32);
  color: #4a3270;
}
.borrador-turno--custom {
  background: var(--terracotta-soft);
  border-color: rgba(176, 74, 46, 0.35);
  color: var(--terracotta-deep);
  font-family: var(--font-mono);
  text-transform: none;
  letter-spacing: 0;
}

/* ============================================================
   Bottom-sheet selector de turno (paso_11.1)
   ============================================================ */
.dia-selector-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.dia-selector-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 14, 0.45);
  cursor: pointer;
  pointer-events: auto;
  animation: dia-selector-fade 0.16s ease-out;
}
.dia-selector-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  background: var(--bg);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.18);
  padding: 16px 20px 24px;
  pointer-events: auto;
  animation: dia-selector-rise 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
  max-height: 85vh;
  overflow-y: auto;
}
@media (min-width: 720px) {
  .dia-selector-root {
    align-items: center;
  }
  .dia-selector-sheet {
    border-radius: 14px;
    padding: 20px 24px;
    max-width: 480px;
  }
}
@keyframes dia-selector-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes dia-selector-rise {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.dia-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.dia-selector-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.dia-selector-titulo {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: capitalize;
}
.dia-selector-cerrar {
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dia-selector-cerrar:hover {
  background: var(--surface-2);
  color: var(--text);
}

.dia-selector-actual {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.dia-selector-actual-kicker {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.dia-selector-actual-lista {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.dia-selector-actual-item--apertura strong { color: #7a5310; }
.dia-selector-actual-item--cierre strong { color: var(--terracotta-deep); }

.dia-selector-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dia-selector-legend {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.dia-selector-tipo {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dia-selector-tipo-opcion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.dia-selector-tipo-opcion:has(input:checked) {
  border-color: var(--terracotta);
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
}
.dia-selector-tipo-opcion input {
  accent-color: var(--terracotta);
  width: 18px;
  height: 18px;
}
.dia-selector-aviso-citas {
  background: rgba(201, 130, 31, 0.10);
  border-left: 3px solid var(--ochre, #c9821f);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin: 8px 0 4px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}
.dia-selector-aviso-citas strong { color: var(--ochre, #c9821f); }

.dia-selector-turnos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.dia-selector-turno-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 78px;
  padding: 10px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: transform 0.08s ease, background 0.12s ease,
              border-color 0.12s ease;
}
.dia-selector-turno-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg);
}
.dia-selector-turno-btn:active {
  transform: scale(0.97);
}
.dia-selector-turno-btn--completo:hover { border-color: var(--terracotta); }
.dia-selector-turno-btn--manana:hover { border-color: var(--ochre); }
.dia-selector-turno-btn--tarde:hover { border-color: rgba(120, 80, 180, 0.6); }
.dia-selector-turno-icon {
  font-size: 22px;
  line-height: 1;
}
.dia-selector-turno-btn--completo .dia-selector-turno-icon { color: var(--terracotta); }
.dia-selector-turno-btn--manana .dia-selector-turno-icon { color: var(--ochre); }
.dia-selector-turno-btn--tarde .dia-selector-turno-icon { color: #6b4ba5; }
.dia-selector-turno-label {
  font-size: 12px;
  text-align: center;
}
.dia-selector-turno-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.dia-selector-acciones-secundarias {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

/* --- Acordeón "Personalizar horario" (Fase 2) --- */
.dia-selector-custom {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.dia-selector-custom[open] {
  border-color: var(--terracotta);
  background: var(--bg);
}
.dia-selector-custom-summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}
.dia-selector-custom-summary::-webkit-details-marker { display: none; }
.dia-selector-custom-summary::before {
  content: "▸";
  font-size: 11px;
  color: var(--muted);
  width: 12px;
  display: inline-block;
  transition: transform 0.15s ease;
}
.dia-selector-custom[open] .dia-selector-custom-summary::before {
  transform: rotate(90deg);
}
.dia-selector-custom-icon {
  font-size: 16px;
  line-height: 1;
}
.dia-selector-custom-label { flex: 1; }
.dia-selector-custom-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 400;
}
.dia-selector-custom-body {
  padding: 4px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dia-selector-custom-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dia-selector-custom-input {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dia-selector-custom-input span {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.dia-selector-custom-input input[type="time"] {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.dia-selector-custom-input input[type="time"]:focus {
  outline: 2px solid var(--terracotta);
  outline-offset: 1px;
  border-color: var(--terracotta);
}
.dia-selector-custom-aplicar {
  min-height: 44px;
  padding: 10px 14px;
  background: var(--terracotta);
  color: #fff;
  border: 1px solid var(--terracotta-deep);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.08s ease, background 0.12s ease;
}
.dia-selector-custom-aplicar:hover {
  background: var(--terracotta-deep);
}
.dia-selector-custom-aplicar:active {
  transform: scale(0.98);
}
.dia-selector-custom-nota {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}
.dia-selector-custom-nota em {
  color: var(--text-2);
  font-style: normal;
  font-weight: 500;
}

/* ============================================================
   Panel de gestión B2B (gestores + admin)
   ============================================================ */
.gestion-section {
  padding: 0 20px 24px;
}

.gestion-totales {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0 14px;
}
@media (min-width: 520px) {
  .gestion-totales { grid-template-columns: repeat(4, 1fr); }
}
.gestion-total {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}
.gestion-total-valor {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--terracotta-deep);
}
.gestion-total-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.gestion-search {
  display: flex;
  gap: 8px;
  margin: 12px 0 14px;
}
.gestion-search .form-input {
  flex: 1;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--font-ui);
}
.gestion-search .btn-sm { min-height: 40px; }

.gestion-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gestion-list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.gestion-list-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
  transition: background 0.12s ease;
}
.gestion-list-link:hover {
  background: var(--surface-2);
}
.gestion-list-info { flex: 1; min-width: 0; }
.gestion-list-nombre {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gestion-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--text-2);
  margin-top: 3px;
}
.gestion-list-cif {
  font-family: var(--font-mono);
  color: var(--muted);
  letter-spacing: 0.02em;
}
.gestion-list-chips {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.gestion-chip {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gestion-chip--warn { background: var(--terracotta-soft); color: var(--terracotta-deep); }
.gestion-chip--info { background: var(--petrol-soft); color: var(--petrol); }

.gestion-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

/* --- Detalle colaborador --- */
.gestion-detalle-back {
  margin-top: 10px;
}
.gestion-detalle {
  padding: 0 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gestion-detalle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.gestion-detalle-title {
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 10px;
}
.gestion-detalle-kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  font-size: 13px;
  margin: 0;
}
.gestion-detalle-kv dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  align-self: center;
}
.gestion-detalle-kv dd {
  color: var(--text);
  margin: 0;
}
.gestion-detalle-kv .mono,
.hero-sub .mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

.gestion-detalle-lista {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gestion-detalle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.gestion-detalle-row:last-child { border-bottom: 0; }
.gestion-detalle-row-main { font-weight: 500; }
.gestion-detalle-row-meta {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.gestion-detalle-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 0;
}

/* ============================================================
   RECRUITMENT B2B — Colaboraciones (público móvil)
   Añadido por la mini-app dentalpartners_recruitment.
   ============================================================ */

.recruit-public-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--surface-3, #EDE5D7);
  background: var(--bg, #FFFFFF);
}
.recruit-public-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
}
.recruit-public-brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #B04A2E 0%, #C9821F 100%);
  color: #FFE9DA; display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
}
.recruit-public-brand-text {
  font-weight: 600; font-size: 16px;
  font-family: "Host Grotesk", system-ui, sans-serif;
}
.recruit-public-claim {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: #B04A2E;
}

.recruit-public-main {
  max-width: 720px; margin: 0 auto; padding: 24px 20px 80px;
}

.recruit-public-hero {
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--surface-3, #EDE5D7);
}
.recruit-public-hero h1 {
  font-size: 28px; font-weight: 700; margin-bottom: 10px;
  color: #1A1412;
}
.recruit-public-lead {
  font-size: 16px; color: #5A4A42; line-height: 1.5;
}

.recruit-public-grid {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  margin-top: 18px;
}
@media (min-width: 720px) {
  .recruit-public-grid { grid-template-columns: 1fr 1fr; }
}

.recruit-oferta-card {
  display: block; padding: 16px;
  background: var(--bg, #FFFFFF);
  border: 1px solid var(--surface-3, #EDE5D7);
  border-left: 3px solid #B04A2E;
  border-radius: 10px;
  text-decoration: none; color: inherit;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.recruit-oferta-card:active { transform: scale(0.99); }
.recruit-oferta-card-kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: #9B8B7D; margin-bottom: 6px;
}
.recruit-oferta-card h2 {
  font-size: 17px; font-weight: 600; margin-bottom: 6px;
  color: #1A1412;
}
.recruit-oferta-card-desc {
  font-size: 14px; color: #5A4A42; line-height: 1.45;
}
.recruit-oferta-card-cta {
  margin-top: 10px; font-size: 13px; font-weight: 600;
  color: #B04A2E;
}

.recruit-public-empty {
  margin-top: 30px; padding: 24px; text-align: center;
  color: #9B8B7D;
  background: var(--surface, #FBF8F3);
  border-radius: 10px;
}

/* --- Detalle / artículo --- */
.recruit-public-article h1 {
  font-size: 26px; font-weight: 700; margin: 8px 0 14px;
  color: #1A1412;
}
.recruit-public-back {
  display: inline-block; font-size: 13px; color: #B04A2E;
  text-decoration: none; margin-bottom: 8px;
}
.recruit-public-kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: #9B8B7D;
}
.recruit-public-section {
  padding: 16px 0; border-top: 1px solid var(--surface-3, #EDE5D7);
}
.recruit-public-section h2 {
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em;
  color: #2C5F5D; margin-bottom: 8px;
}
.recruit-public-section p {
  font-size: 15px; line-height: 1.6; color: #1A1412; margin-bottom: 8px;
}
.recruit-public-cta-section {
  margin-top: 24px; padding: 20px;
  background: var(--surface, #FBF8F3); border-radius: 10px;
  text-align: center;
}
.recruit-public-cta {
  display: inline-block; padding: 14px 28px;
  background: #B04A2E; color: #FFE9DA;
  border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 15px;
  border: none; cursor: pointer; min-height: 48px;
  font-family: inherit;
}
.recruit-public-cta:hover { background: #8E3920; }
.recruit-public-cta--ghost {
  background: transparent; color: #B04A2E;
  border: 1px solid #B04A2E;
}
.recruit-public-cta-note {
  font-size: 12px; color: #9B8B7D; margin-top: 12px; line-height: 1.45;
}

/* --- Form de candidatura --- */
.recruit-form fieldset {
  border: 1px solid var(--surface-3, #EDE5D7);
  border-radius: 10px; padding: 16px;
  margin: 16px 0; background: var(--bg, #FFFFFF);
}
.recruit-form legend {
  padding: 0 8px; font-size: 13px; font-weight: 600;
  color: #2C5F5D; text-transform: uppercase; letter-spacing: 0.05em;
}
.recruit-field {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px;
}
.recruit-field label {
  font-size: 13px; font-weight: 600; color: #1A1412;
}
.recruit-field small {
  font-size: 12px; color: #9B8B7D;
}
.recruit-field.has-error label { color: #B04A2E; }
.recruit-error { color: #B04A2E !important; }
.recruit-input,
.recruit-form input[type="text"],
.recruit-form input[type="email"],
.recruit-form input[type="url"],
.recruit-form input[type="tel"],
.recruit-form input[type="number"],
.recruit-form input[type="file"],
.recruit-form select,
.recruit-form textarea {
  padding: 10px 12px; font-size: 15px; min-height: 44px;
  border: 1px solid var(--surface-3, #EDE5D7);
  border-radius: 8px; background: var(--surface, #FBF8F3);
  color: #1A1412; font-family: inherit;
  -webkit-appearance: none; appearance: none;
  width: 100%;
}
.recruit-form input:focus, .recruit-form select:focus, .recruit-form textarea:focus {
  outline: none; border-color: #B04A2E;
  background: var(--bg, #FFFFFF);
}

.recruit-consent {
  background: rgba(176, 74, 46, 0.06);
  border-color: rgba(176, 74, 46, 0.18);
}
.recruit-consent-row {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; line-height: 1.4; color: #1A1412;
  padding: 8px 0; cursor: pointer;
}
.recruit-consent-row input[type="checkbox"] {
  margin-top: 3px; min-width: 18px; min-height: 18px;
  accent-color: #B04A2E;
}

.recruit-public-confirmation { text-align: center; padding-top: 30px; }
.recruit-public-confirmation h1 {
  color: #5D8A2E;
}
.recruit-public-rgpd {
  font-size: 12px; color: #9B8B7D; line-height: 1.5;
  margin-top: 18px; padding: 14px;
  background: var(--surface, #FBF8F3); border-radius: 8px;
}

.recruit-public-messages { list-style: none; margin: 12px 0; padding: 0; }
.recruit-public-message {
  padding: 10px 14px; border-radius: 8px; margin-bottom: 6px;
  font-size: 14px; background: var(--surface, #FBF8F3);
}
.recruit-public-message--error {
  background: rgba(176, 74, 46, 0.12);
  color: #B04A2E;
  border-left: 3px solid #B04A2E;
}

/* ============================================================
   Utilidades — extraídas de inline style="..." en templates
   (Fase 1 calidad — 2026-04-27).
   ============================================================ */

/* Section padding patterns */
.dp-section          { padding: 0 20px 24px; }
.dp-section--sm      { padding: 0 20px 8px; }

/* Buttons */
.btn--block          { width: 100%; }
.btn--mt-10          { margin-top: 10px; }
.btn--mt-18          { margin-top: 18px; }
.btn--mt-20          { margin-top: 20px; }

/* Link rows below forms */
.dp-link-row         { text-align: center; margin-top: 14px; }
.dp-link-row--lg     { text-align: center; margin-top: 18px; }

/* Section head spacing */
.section-head--mt    { margin-top: 20px; }

/* Form errors */
.form-help--error    { color: var(--terracotta); }

/* Alert spacing */
.alert--mb           { margin-bottom: 18px; }

/* Mini KPIs (perfil) — strip de 2 columnas con label/valor apilados */
.mini-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 18px;
}
.mini-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 0;
}
.mini-kpi-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.mini-kpi-value {
  font-family: var(--font-ui);
  font-feature-settings: "tnum", "lnum";
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.15;
  overflow-wrap: break-word;
}
.mini-kpi-value--md { font-size: 16px; }

/* Definition list (perfil) — bloque por campo con separador hairline */
.dp-dl {
  margin: 0;
  padding: 4px 0 20px;
  display: flex;
  flex-direction: column;
}
.dp-dl dt {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.dp-dl > dt:first-of-type {
  padding-top: 6px;
  border-top: none;
}
.dp-dl-dd {
  margin: 6px 0 14px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
}
.dp-dl-dd--tight {
  margin: 4px 0 12px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--text);
}
.dp-dl-dd--mono {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.02em;
}
.dp-text-muted { color: var(--muted); }
.badge--ml-sm  { margin-left: 6px; }

/* Hero CAE-bloqueado variant */
.hero--blocked                   { background: var(--terracotta-soft); }
.hero--blocked .hero-kicker,
.hero--blocked .hero-title       { color: var(--terracotta-deep); }
.hero--blocked .hero-sub         { color: var(--text); }

/* CAE bloqueado — listado de documentos críticos */
.cae-doc-list { margin-top: 16px; }
.cae-doc-block {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  background: var(--surface);
}
.cae-doc-block .form-help { margin-top: 4px; }

/* Banner permanente de colaboración en cierre (EN_LIQUIDACION). Va entre el
   topbar y el contenido, en todas las pantallas a las que aún llega. */
.dp-banner-cierre {
  margin: 12px 20px 0;
  padding: 12px 16px;
  border: 1px solid var(--ochre);
  border-radius: var(--radius-md);
  background: var(--ochre-soft);
}
.dp-banner-cierre-titulo {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
}
.dp-banner-cierre-texto {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
}
.dp-banner-cierre-lista {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
}

/* Bloque informativo genérico (pantallas de acceso cerrado: fin de
   colaboración, avisos sin acción asociada). Mismo cuerpo que
   .cae-doc-block pero sin atarse al dominio CAE. */
.dp-info-block {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  background: var(--surface);
}
.dp-info-block .form-help { margin-top: 4px; }

/* Empty list (e.g. dashboard reservas) */
.dp-empty {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ============================================================
   Generic helpers used by documentos/auth/upload templates
   ============================================================ */

/* Small button modifier — used for inline / toolbar actions */
.btn-sm {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* Danger badge variant (CAE crítico, alertas) */
.badge-danger {
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
}

/* Mensajes de Django (messages framework) */
.messages {
  list-style: none;
  margin: 0 20px 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.message {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.message--success {
  background: rgba(93, 138, 46, 0.08);
  border-color: rgba(93, 138, 46, 0.28);
  color: var(--success);
}
.message--error,
.message--warning {
  background: var(--terracotta-soft);
  border-color: rgba(176, 74, 46, 0.32);
  color: var(--terracotta-deep);
}
.message--info {
  background: var(--petrol-soft);
  border-color: rgba(44, 95, 93, 0.28);
  color: var(--petrol);
}

/* Empty state (genérico) */
.empty-state {
  margin: 0 20px;
  padding: 22px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

/* ============================================================
   DOCUMENTOS — listado + tarjetas
   ============================================================ */

.doc-toolbar {
  padding: 4px 20px 14px;
  display: flex;
  justify-content: flex-start;
}

.doc-faltantes {
  padding: 14px 20px 20px;
}
.doc-faltantes .section-title {
  margin-bottom: 10px;
  display: block;
}
.doc-faltantes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.doc-faltante {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ochre);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  color: var(--text);
  min-height: var(--touch-target);
}
.doc-faltante-nombre {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.doc-list {
  padding: 14px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc-list .section-title {
  margin-bottom: 10px;
  display: block;
}

/* Tarjeta de documento subido */
.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.doc-card--aprobado { border-left: 3px solid var(--success); }
.doc-card--pendiente { border-left: 3px solid var(--ochre); }
.doc-card--rechazado { border-left: 3px solid var(--terracotta); }
.doc-card--vencido { border-left: 3px solid var(--terracotta-deep); background: var(--terracotta-soft); }

.doc-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.doc-card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.doc-card-tipo {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.doc-card-estado {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.doc-card-estado--aprobado { background: rgba(93, 138, 46, 0.12); color: var(--success); }
.doc-card-estado--pendiente { background: var(--ochre-soft); color: #7a5310; }
.doc-card-estado--rechazado { background: var(--terracotta-soft); color: var(--terracotta-deep); }
.doc-card-estado--vencido { background: var(--terracotta-soft); color: var(--terracotta-deep); }

.doc-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  margin: 0;
}
.doc-card-meta div { display: flex; flex-direction: column; gap: 2px; }
.doc-card-meta dt {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.doc-card-meta dd {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.doc-card-rechazo {
  font-size: 12.5px;
  color: var(--terracotta-deep);
  background: var(--terracotta-soft);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  line-height: 1.4;
}
.doc-card-rechazo strong { font-weight: 600; }

.doc-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============================================================
   DOCUMENTOS / FACTURAS — formulario upload (compartido)
   ============================================================ */
.doc-form,
.fac-form {
  padding: 4px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.doc-form .form-row,
.fac-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.doc-form .form-row label,
.fac-form .form-row label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.doc-form .form-row--2col,
.fac-form .form-row--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.doc-form input[type="text"],
.doc-form input[type="number"],
.doc-form input[type="date"],
.doc-form input[type="file"],
.doc-form select,
.doc-form textarea,
.fac-form input[type="text"],
.fac-form input[type="number"],
.fac-form input[type="date"],
.fac-form input[type="file"],
.fac-form select,
.fac-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: -0.005em;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.doc-form input[type="file"],
.fac-form input[type="file"] {
  padding: 8px 12px;
  line-height: 1.3;
}
.doc-form input[type="file"]::file-selector-button,
.fac-form input[type="file"]::file-selector-button,
.doc-form input[type="file"]::-webkit-file-upload-button,
.fac-form input[type="file"]::-webkit-file-upload-button {
  margin-right: 12px;
  padding: 8px 14px;
  background: var(--terracotta);
  color: var(--terracotta-foreground);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease;
}
.doc-form input[type="file"]::file-selector-button:hover,
.fac-form input[type="file"]::file-selector-button:hover,
.doc-form input[type="file"]::-webkit-file-upload-button:hover,
.fac-form input[type="file"]::-webkit-file-upload-button:hover {
  background: var(--terracotta-deep);
}
.doc-form input:focus,
.doc-form select:focus,
.doc-form textarea:focus,
.fac-form input:focus,
.fac-form select:focus,
.fac-form textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(176, 74, 46, 0.12);
}
.doc-form .form-help,
.fac-form .form-help {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.4;
}
.doc-form .form-errors,
.doc-form .errorlist,
.fac-form .form-errors,
.fac-form .errorlist {
  list-style: none;
  margin: 0;
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--terracotta-deep);
  background: var(--terracotta-soft);
  border-radius: var(--radius-sm);
}
.doc-form .form-actions,
.fac-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}
.fac-form .form-actions .btn { min-width: 110px; }

/* ============================================================
   Topbar dropdowns (campana + menú ⋮)
   ============================================================ */
.topbar-dropdown {
  position: relative;
  display: flex;
}
.topbar-dropdown[data-open="true"] .icon-btn {
  border-color: var(--border-strong);
  background: var(--bg);
}

.topbar-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 280px;
  max-width: min(340px, calc(100vw - 32px));
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow:
    0 16px 40px -12px rgba(43, 36, 32, 0.22),
    0 4px 12px -4px rgba(43, 36, 32, 0.10);
  padding: 6px;
  overflow: hidden;
}
.topbar-panel[hidden] { display: none; }

.topbar-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.topbar-panel-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.topbar-panel-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--terracotta-foreground);
  background: var(--terracotta);
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.topbar-panel-empty {
  padding: 18px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}
.topbar-panel-empty svg { color: var(--success); }

/* --- Notificaciones --- */
.topbar-notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
}
.topbar-notif {
  border-bottom: 1px solid var(--border);
}
.topbar-notif:last-child { border-bottom: none; }

.topbar-notif-link {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 10px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
  transition: background 0.12s ease;
  min-height: var(--touch-target);
}
.topbar-notif-link:hover { background: var(--surface); }

.topbar-notif-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 7px;
  background: var(--muted);
}
.topbar-notif--warning .topbar-notif-mark { background: var(--ochre); }
.topbar-notif--danger  .topbar-notif-mark { background: var(--terracotta); }
.topbar-notif--info    .topbar-notif-mark { background: var(--petrol); }

.topbar-notif-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.topbar-notif-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.topbar-notif-sub {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.35;
}

/* --- Menú de acciones --- */
.topbar-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 10px;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  text-decoration: none;
  min-height: var(--touch-target);
  transition: background 0.12s ease, color 0.12s ease;
}
.topbar-menu-item:hover { background: var(--surface); }
.topbar-menu-item svg { flex-shrink: 0; color: var(--text-2); }
.topbar-menu-item--danger { color: var(--terracotta); }
.topbar-menu-item--danger:hover { background: var(--terracotta-soft); }
.topbar-menu-item--danger svg { color: var(--terracotta); }

.topbar-menu-form { margin: 0; padding: 0; }

.topbar-menu-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 4px;
}

/* ============================================================
   Tarifario móvil (Bloque A — anexo dinámico del contrato)
   ============================================================ */

/* Variantes adicionales de CTA usadas en el tarifario */
.cta--secondary {
  background: transparent;
  color: var(--terracotta);
  border: 1px solid var(--terracotta);
}
.cta--secondary:hover { background: var(--terracotta-soft); }
.cta--ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.cta--ghost:hover { color: var(--text); background: var(--surface-2); }

/* Wrap con margen lateral para todo el contenido bajo el hero.
   Sin esto las cards llegaban flush al borde de la app card y se
   sentían apretadas en pantallas estrechas. */
.tarif-content {
  padding: 0 16px 16px;
}

/* Cabecera de metadatos de la versión vigente */
.tarif-meta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 14px 0 12px;
  display: grid;
  gap: 6px;
}
.tarif-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.tarif-meta-row--ok { color: var(--success, #5d8a2e); }
.tarif-meta-row--pendiente { color: var(--ochre, #c9821f); font-weight: 600; }
.tarif-meta-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  margin-left: 6px;
  text-transform: lowercase;
}
.tarif-banner-pendiente--vigencia {
  background: rgba(44, 95, 93, 0.08);
  border-left-color: var(--petrol, #2c5f5d);
  color: var(--text);
}
.tarif-meta-label {
  color: var(--text-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tarif-meta-hash {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 3px;
}

/* Banner aceptación pendiente (no bloqueante) */
.tarif-banner-pendiente {
  background: rgba(201, 130, 31, 0.10);
  border-left: 3px solid var(--ochre, #c9821f);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin: 10px 0 14px;
  font-size: 13.5px;
  color: var(--text);
}
.tarif-banner-detalle {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 13px;
}
.tarif-banner-detalles-toggle {
  margin-top: 10px;
}
.tarif-banner-detalles-toggle summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ochre, #c9821f);
  padding: 6px 0;
}
.tarif-form-aceptar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding: 10px;
  background: var(--bg);
  border-radius: var(--radius-md);
}
.tarif-check {
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  cursor: pointer;
}

/* Acciones bajo el bloque de metadatos */
.tarif-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 14px;
}
.tarif-actions .cta { flex: 1; min-width: 0; font-size: 13px; padding: 10px 12px; }

/* Bloque de filtros: select de área + buscador de tratamiento.
   Stack en móvil (más cómodo para tocar), fila en PC (≥1024px,
   cuando la card es ya 680px y caben los dos). */
.tarif-filtros {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.tarif-filtro {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tarif-filtro-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.tarif-select {
  width: 100%;
  padding: 10px 36px 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-ui);
  font-size: 14px;
  min-height: 44px;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23766F66'><path d='M5 8l5 5 5-5H5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}
.tarif-select:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(176, 74, 46, 0.15);
}

/* Buscador */
.tarif-buscador {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-ui);
  font-size: 14px;
  min-height: 44px;
}
.tarif-buscador:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(176, 74, 46, 0.15);
}

/* Áreas plegables */
.tarif-area {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
}
.tarif-area-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14px;
  list-style: none;
}
.tarif-area-head::-webkit-details-marker { display: none; }
.tarif-area-head::after {
  content: "▾";
  color: var(--text-2);
  transition: transform 0.2s;
}
.tarif-area[open] .tarif-area-head::after {
  transform: rotate(180deg);
}
.tarif-area-codigo {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 3px;
}
.tarif-area-desc { font-weight: 600; }
.tarif-area-count {
  color: var(--text-2);
  font-size: 12px;
}

/* Lista de tratamientos */
.tarif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.tarif-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.tarif-item:last-child { border-bottom: none; }
.tarif-item-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 6px;
}
.tarif-item-codigo {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}
.tarif-item-nombre {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
/* Móvil: cada métrica ocupa toda la fila, label a la izquierda y
   valor a la derecha. Mucho más legible en pantalla estrecha que
   tres columnas con labels largos (`% coste asumido`) en vertical. */
.tarif-item-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}
.tarif-cell {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 10px;
  background: var(--surface);
  border-radius: 4px;
  margin: 0;
}
.tarif-cell-label {
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.02em;
  margin: 0;
}
.tarif-cell-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin: 0;
  text-align: right;
}

/* PC ≥1024px: volvemos al grid de 3 columnas, que ahí sí caben
   sin apretarse y permite escanear con vista los porcentajes. */
@media (min-width: 1024px) {
  .tarif-item-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }
  .tarif-cell {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 6px 8px;
  }
  .tarif-cell-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .tarif-cell-value { text-align: left; }

  /* En PC los filtros caben lado a lado: select compacto a la
     izquierda y buscador ocupando el resto. */
  .tarif-filtros {
    flex-direction: row;
    align-items: flex-end;
  }
  .tarif-filtro { flex: 0 0 auto; min-width: 220px; }
  .tarif-filtro--grow { flex: 1 1 auto; min-width: 0; }
}

/* Aviso legal y estado vacío */
.tarif-aviso-legal {
  font-size: 11.5px;
  color: var(--text-2);
  margin-top: 16px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 4px;
  line-height: 1.5;
}
.tarif-sin-version {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-2);
}
.tarif-sin-version h2 {
  color: var(--text);
  font-size: 18px;
  margin-bottom: 8px;
}

/* Histórico */
.tarif-historico { list-style: none; margin: 0; padding: 0; }
.tarif-historico-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.tarif-historico-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.tarif-historico-meta {
  color: var(--text-2);
  font-size: 12px;
}
.tarif-historico-detalle {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.tarif-historico-notas {
  font-size: 12.5px;
  color: var(--text);
  margin: 6px 0;
  padding: 6px 8px;
  background: var(--bg);
  border-left: 2px solid var(--terracotta);
  border-radius: 2px;
}
.tarif-volver { display: block; margin-top: 16px; }

/* Login: el nombre de la clínica en la que se está entrando. Es el dato que
   distingue dos PWA idénticas para quien colabora con dos clínicas. */
.login-clinica {
  color: var(--terracotta-deep);
  font-weight: 600;
}

/* Banners en detalle de liquidación (Bloque B) */
.liq-banner-validacion,
.liq-banner-pago {
  margin: 10px 20px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
}
.liq-banner-validacion {
  background: rgba(93, 138, 46, 0.10);
  border: 1px solid rgba(93, 138, 46, 0.28);
  border-left: 3px solid var(--success, #5d8a2e);
}
.liq-banner-pago {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--petrol, #2c5f5d);
}

/* ============================================================
   Liquidaciones — listado mensual (móvil colaborador)
   ============================================================ */
.liq-list {
  list-style: none;
  margin: 0;
  padding: 0 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.liq-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.liq-row:hover { border-color: var(--border-strong); transform: translateX(2px); }
.liq-row--enviada_colaborador,
.liq-row--en_revision {
  border-color: rgba(176, 74, 46, 0.28);
  background:
    radial-gradient(circle at top right, rgba(176, 74, 46, 0.07), transparent 60%),
    var(--surface);
}
.liq-row--rechazada {
  border-color: rgba(176, 74, 46, 0.35);
}
.liq-row-link {
  display: block;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  min-height: var(--touch-target);
}
.liq-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.liq-row-periodo {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}
.liq-row-estado {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  white-space: nowrap;
}
.liq-row-estado--enviada_colaborador,
.liq-row-estado--en_revision {
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
}
.liq-row-estado--aceptada,
.liq-row-estado--facturada {
  background: var(--ochre-soft);
  color: var(--ochre);
}
.liq-row-estado--pagada {
  background: rgba(93, 138, 46, 0.12);
  color: var(--success);
}
.liq-row-estado--rechazada {
  background: rgba(176, 74, 46, 0.14);
  color: var(--terracotta-deep);
}
.liq-row-importe {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-family: var(--font-ui);
  font-feature-settings: "tnum", "lnum";
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
}
.liq-row-importe strong { font-weight: 600; }
.liq-row-importe small {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.liq-row-fecha {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
/* Llamada a subir factura en las liquidaciones ya aceptadas: fuera del
   enlace de la fila (no se pueden anidar dos <a>). */
.liq-row-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border);
}
.liq-row-cta-texto {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-2);
  flex: 1 1 140px;
}
.liq-row-cta .btn { flex: 0 0 auto; }

/* ============================================================
   Liquidaciones — detalle (desglose, líneas, acciones)
   ============================================================ */
.liq-desglose,
.liq-lineas,
.liq-factura,
.liq-acciones { padding: 0 20px 24px; }

/* Acciones de PDF (compartir + descargar) — reutilizable en el portal
   colaborador (liquidaciones, adjuntos, documentos, tarifario). */
.pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.pdf-actions .btn { flex: 1 1 auto; }
.pdf-actions [aria-busy="true"] { opacity: 0.6; pointer-events: none; }
/* Variante para embeber los botones en un flex ya existente (tarifario):
   el wrapper desaparece y sus hijos participan del layout del contenedor. */
.pdf-actions--contents { display: contents; }
/* Histórico de tarifario: fila de acciones (compartir + descargar) por versión. */
.tarif-historico-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.tarif-historico-actions [aria-busy="true"] { opacity: 0.6; pointer-events: none; }

/* Detalle: factura pendiente de subir (liquidación aceptada, sin factura). */
.liq-factura-pendiente {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ochre);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.liq-factura-pendiente--vencida {
  border-left-color: var(--terracotta);
  background: rgba(176, 74, 46, 0.07);
}
.liq-factura-texto {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.liq-desglose .section-title,
.liq-lineas .section-title,
.liq-factura .section-title,
.liq-acciones .section-title { padding: 18px 0 10px; }

.liq-desglose-dl {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.liq-desglose-dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}
.liq-desglose-dl dt { color: var(--text-2); margin: 0; }
.liq-desglose-dl dd {
  margin: 0;
  font-family: var(--font-ui);
  font-feature-settings: "tnum", "lnum";
  color: var(--text);
}
.liq-desglose-total {
  margin-top: 4px !important;
  padding-top: 8px;
  border-top: 1px solid var(--border-strong);
  font-size: 15px !important;
}
.liq-desglose-total dt { font-weight: 600; color: var(--text) !important; }
.liq-desglose-total dd strong { color: var(--terracotta-deep); font-size: 17px; }

.liq-lineas-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.liq-linea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.liq-linea-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.liq-linea-fecha {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--terracotta);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.liq-linea-tratamiento {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
}
.liq-linea-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.liq-linea-importes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-family: var(--font-ui);
  font-feature-settings: "tnum", "lnum";
  font-size: 12.5px;
  color: var(--text-2);
}
.liq-linea-neto { color: var(--text); }
.liq-linea-neto strong { color: var(--terracotta-deep); }

.liq-form-aceptar,
.liq-form-rechazar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.liq-form-aceptar label,
.liq-form-rechazar label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.liq-rechazar-details {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.liq-rechazar-details summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  font-weight: 600;
}

/* ============================================================
   Ajustes de la app en el Perfil — instalar / avisos / biometría
   ============================================================ */
.dp-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.dp-setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
  min-height: var(--touch-target);
}
a.dp-setting-row:hover { border-color: var(--border-strong); }
.dp-setting-row--block { flex-direction: column; align-items: stretch; }
.dp-setting-head { display: flex; align-items: center; gap: 12px; }
.dp-setting-ico {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  color: var(--terracotta);
}
.dp-setting-ico svg { width: 100%; height: 100%; }
.dp-setting-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.dp-setting-label { font-weight: 600; font-size: 14px; }
.dp-setting-sub { font-size: 12px; color: var(--muted); }
.dp-setting-chev { color: var(--muted); font-size: 20px; line-height: 1; }

/* Switch tipo iOS para los avisos */
.dp-switch {
  flex: 0 0 auto;
  width: 46px; height: 28px;
  border-radius: 999px;
  border: none;
  background: var(--border-strong);
  position: relative;
  cursor: pointer;
  transition: background .18s ease;
}
.dp-switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .18s ease;
}
.dp-switch.on { background: var(--success); }
.dp-switch.on::after { transform: translateX(18px); }
.dp-switch:disabled { opacity: .5; cursor: not-allowed; }

/* Lista de passkeys registradas */
.dp-passkey-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dp-passkey-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.dp-passkey-label { font-weight: 600; font-size: 13px; flex: 1 1 auto; min-width: 0; }
.dp-passkey-date { font-size: 11px; color: var(--muted); }
.dp-passkey-revoke {
  flex: 0 0 auto;
  border: none; background: none;
  color: var(--danger);
  font-size: 12px; font-weight: 600;
  cursor: pointer; padding: 4px 6px;
}
.dp-passkey-revoke:hover { text-decoration: underline; }

.dp-btn-secondary {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--terracotta);
  background: var(--terracotta-foreground);
  color: var(--terracotta-deep);
  border-radius: var(--radius-md);
  font-weight: 600; font-size: 14px;
  cursor: pointer;
  font-family: var(--font-ui);
}
.dp-btn-secondary:hover { background: var(--terracotta-soft); }
.dp-btn-secondary:disabled { opacity: .5; cursor: not-allowed; }

.dp-setting-status { margin: 10px 2px 0; font-size: 12px; color: var(--text); }
.dp-setting-status[data-kind="error"] { color: var(--danger); }
.dp-setting-status[data-kind="ok"] { color: var(--success); }

/* Banda de bienvenida por instancia (cabecera dashboard) */
.dp-instance-band {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: var(--accent, var(--terracotta));
  color: #fff;
  font-size: 12px; font-weight: 600;
  letter-spacing: .02em;
}
.dp-instance-band .dp-instance-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.85);
}

/* ============================================================
   Guía de instalación de la PWA (/instalar/)
   ============================================================ */
.dp-install-already {
  padding: 14px;
  background: var(--petrol-soft);
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 14px;
}
.dp-install-platform {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 12px;
}
.dp-install-head {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--terracotta);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.dp-install-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
}
.dp-install-steps li { padding-left: 4px; }
.dp-install-switch {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.dp-install-switch button {
  border: 1px solid var(--border-strong);
  background: var(--bg);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}
.dp-install-switch button:hover { border-color: var(--terracotta); color: var(--terracotta); }

/* ============================================================
   Pantalla de desbloqueo biométrico (/desbloquear/)
   ============================================================ */
.dp-unlock-card {
  margin-top: 18px;
  padding: 28px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.dp-unlock-ico {
  width: 56px; height: 56px;
  color: var(--terracotta);
  display: flex; align-items: center; justify-content: center;
  background: var(--terracotta-foreground);
  border-radius: 50%;
  padding: 12px;
}
.dp-unlock-ico svg { width: 100%; height: 100%; }
.dp-unlock-text { font-size: 14px; color: var(--text); line-height: 1.45; margin: 0; max-width: 32ch; }
.dp-unlock-card .dp-btn-secondary { margin-top: 4px; max-width: 280px; }
.dp-unlock-foot { margin-top: 18px; text-align: center; font-size: 13px; }
.dp-unlock-foot a { color: var(--muted); text-decoration: underline; }

/* ------------------------------------------------------------------
   Utilidades de espaciado
   Sustituyen a los `style="margin-top:Npx"` inline de las plantillas
   del portal (regla de proyecto: nada de CSS inline; guard en
   tests/test_calidad_20260427.py).
   ------------------------------------------------------------------ */
.u-mt-12 { margin-top: 12px; }
.u-mt-24 { margin-top: 24px; }
