/* ==========================================================
   Panel Institucional — Cuerpo de Bomberos del Cantón Paute
   Misma identidad que el sitio (cbr.css): rojo institucional,
   negro, DM Sans, cruz del emblema y énfasis en rojo.
   ========================================================== */

:root {
  --cbp-red: #800b01;
  --cbp-red-dark: #5a0801;
  --cbp-black: #0f0f0f;
  --pn-fondo: #f2f2f2;
  --pn-borde: rgba(15, 15, 15, .1);
  --pn-texto: #585959;
  --pn-lado: 270px;
}

* { box-sizing: border-box; }
body.cbp-panel {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  color: var(--pn-texto);
  background: var(--pn-fondo);
}
.cbp-panel a { text-decoration: none; }
.cbp-panel h1, .cbp-panel h2, .cbp-panel h3 { color: var(--cbp-black); font-weight: 600; letter-spacing: -0.02em; }
.cbp-enfasis { color: var(--cbp-red); font-weight: 700; }
.pn-muted { color: #868b96; }
.pn-ayuda { font-size: 14px; margin: 10px 0 0; }

/* Subtítulo con la cruz del emblema (igual que el sitio) */
.pn-sub {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cbp-red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.pn-cruz {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: var(--cbp-red);
  -webkit-mask: url(../../assets/imgs/marca/ovalo-silueta.png) center / contain no-repeat;
  mask: url(../../assets/imgs/marca/ovalo-silueta.png) center / contain no-repeat;
}

/* ---------- Estructura ---------- */
.pn-shell { display: flex; min-height: 100vh; }
.pn-side {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--pn-lado);
  display: flex;
  flex-direction: column;
  padding: 26px 18px;
  background: var(--cbp-black);
  color: rgba(255, 255, 255, .75);
  overflow-y: auto;
}
/* Cruz gigante de fondo en el menú */
.pn-side::after {
  content: "";
  position: absolute;
  left: -90px;
  bottom: -90px;
  width: 320px;
  height: 320px;
  background: #fff;
  opacity: .04;
  -webkit-mask: url(../../assets/imgs/marca/ovalo-silueta.png) center / contain no-repeat;
  mask: url(../../assets/imgs/marca/ovalo-silueta.png) center / contain no-repeat;
  pointer-events: none;
}
.pn-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; color: #fff; }
.pn-brand img { width: 48px; height: 48px; object-fit: contain; }
.pn-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.pn-brand strong { font-size: 16px; color: #fff; }
.pn-brand small { font-size: 12px; color: rgba(255, 255, 255, .55); letter-spacing: .04em; }
.pn-brand--oscuro strong { color: var(--cbp-black); }
.pn-brand--oscuro small { color: #868b96; }
.pn-nav { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pn-nav__grupo {
  margin: 18px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .35);
}
.pn-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, .78);
  font-weight: 500;
  transition: background-color .25s ease, color .25s ease;
}
.pn-nav a i { width: 20px; text-align: center; font-size: 17px; }
.pn-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.pn-nav a.is-activo { background: var(--cbp-red); color: #fff; box-shadow: 0 12px 26px -14px rgba(128, 11, 1, .9); }
.pn-side__sitio { position: relative; z-index: 1; margin-top: 20px; padding: 12px 14px; border-radius: 14px; color: rgba(255, 255, 255, .6); font-size: 14px; border: 1px solid rgba(255, 255, 255, .12); }
.pn-side__sitio:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }

.pn-main { flex: 1; min-width: 0; margin-left: var(--pn-lado); display: flex; flex-direction: column; }
.pn-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px 24px 0;
  padding: 12px 14px 12px 24px;
  border-radius: 22px;
  border: 1px solid var(--pn-borde);
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 14px 40px -24px rgba(15, 15, 15, .35);
}
.pn-top__titulo { flex: 1; min-width: 0; }
.pn-top__usuario { display: flex; align-items: center; gap: 18px; }
.pn-top__hora { font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pn-top__hora i { color: var(--cbp-red); }
.pn-top__menu {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--cbp-red);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.pn-top__menu span { width: 18px; height: 2px; border-radius: 2px; background: #fff; }
.pn-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cbp-black);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .04em;
}
.pn-avatar--chico { width: 38px; height: 38px; font-size: 13px; }
.pn-avatar--grande { width: 86px; height: 86px; font-size: 28px; background: var(--cbp-red); }
.pn-menu-usuario { position: relative; }
.pn-menu-usuario__caja {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 260px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--pn-borde);
  box-shadow: 0 24px 50px -24px rgba(15, 15, 15, .4);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pn-menu-usuario__caja strong { color: var(--cbp-black); }
.pn-menu-usuario__caja small { color: #868b96; margin-bottom: 10px; overflow-wrap: anywhere; }
.pn-menu-usuario__caja a,
.pn-menu-usuario__caja button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--cbp-black);
  font: inherit;
  text-align: left;
}
.pn-menu-usuario__caja a:hover,
.pn-menu-usuario__caja button:hover { background: rgba(128, 11, 1, .08); color: var(--cbp-red); }

.pn-contenido { flex: 1; padding: 28px 24px 40px; display: flex; flex-direction: column; gap: 24px; }
.pn-pie { padding: 0 24px 24px; font-size: 13px; color: #868b96; }
.pn-pie strong { color: var(--cbp-red); }

/* ---------- Tarjetas y rejillas ---------- */
.pn-grid { display: grid; gap: 24px; }
.pn-grid--modulos { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pn-grid--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.pn-tarjeta {
  background: #fff;
  border: 1px solid var(--pn-borde);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 30px 70px -50px rgba(15, 15, 15, .45);
}
.pn-tarjeta__cab { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.pn-h2 { font-size: 26px; margin: 0 0 6px; }
.pn-enlace { color: var(--cbp-red); font-weight: 600; font-size: 15px; }
.pn-enlace:hover { color: var(--cbp-black); }

/* Bienvenida: número del día gigante y difuminado detrás del saludo */
.pn-bienvenida { position: relative; isolation: isolate; padding: 30px 6px 4px; overflow: hidden; }
.pn-bienvenida__fondo {
  position: absolute;
  right: 0;
  top: -40px;
  z-index: -1;
  font-size: clamp(140px, 16vw, 240px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--cbp-red);
  opacity: .12;
  filter: blur(1px);
}
.pn-bienvenida h1 { font-size: clamp(30px, 3.4vw, 52px); margin: 0 0 8px; }
.pn-bienvenida p { margin: 0; font-size: 17px; }

/* Tarjeta de módulo */
.pn-modulo {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--pn-borde);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.pn-modulo:hover { transform: translateY(-6px); border-color: var(--cbp-red); box-shadow: 0 30px 60px -34px rgba(128, 11, 1, .55); }
.pn-modulo__marca {
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  background: var(--cbp-red);
  opacity: .06;
  -webkit-mask: url(../../assets/imgs/marca/hacha-silueta.png) center / contain no-repeat;
  mask: url(../../assets/imgs/marca/hacha-silueta.png) center / contain no-repeat;
  transition: transform .8s ease, opacity .4s ease;
  pointer-events: none;
}
.pn-modulo:hover .pn-modulo__marca { transform: rotate(45deg); opacity: .12; }
.pn-modulo header { display: flex; gap: 16px; align-items: flex-start; }
.pn-modulo h2 { font-size: 22px; margin: 0 0 4px; }
.pn-modulo header p { margin: 0; font-size: 15px; line-height: 1.5; }
.pn-modulo__icono {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(128, 11, 1, .08);
  color: var(--cbp-red);
  font-size: 24px;
}
.pn-modulo__cifras { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pn-modulo__cifras li { padding: 14px 12px; border-radius: 16px; background: var(--pn-fondo); }
.pn-modulo__cifras strong { display: block; font-size: 26px; font-weight: 800; color: var(--cbp-black); line-height: 1.1; }
.pn-modulo__cifras span { font-size: 12px; line-height: 1.3; display: block; margin-top: 4px; }
.pn-modulo__aviso { margin: 0; padding: 14px; border-radius: 16px; background: var(--pn-fondo); font-size: 14px; }
.pn-modulo footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.pn-vacio { grid-column: 1 / -1; text-align: center; padding: 50px 20px; background: #fff; border-radius: 24px; border: 1px dashed rgba(15, 15, 15, .2); }
.pn-vacio i { font-size: 40px; color: var(--cbp-red); }

/* Línea de tiempo de actividad */
.pn-linea { list-style: none; margin: 0; padding: 0; }
.pn-linea li { display: grid; grid-template-columns: 14px 1fr auto; gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--pn-borde); font-size: 15px; }
.pn-linea li:last-child { border-bottom: 0; }
.pn-linea strong { color: var(--cbp-black); }
.pn-linea em { font-style: normal; color: #868b96; }
.pn-linea time { font-size: 13px; color: #868b96; white-space: nowrap; }
.pn-linea__punto { width: 10px; height: 10px; border-radius: 50%; background: var(--cbp-red); box-shadow: 0 0 0 4px rgba(128, 11, 1, .12); }

/* ---------- Botones, chips, estados ---------- */
.pn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1.5px solid var(--cbp-red);
  border-radius: 40px;
  background: var(--cbp-red);
  color: #fff;
  font: 700 15px "DM Sans", sans-serif;
  cursor: pointer;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease, transform .3s ease;
}
.pn-btn:hover { background: var(--cbp-black); border-color: var(--cbp-black); color: #fff; transform: translateY(-2px); }
.pn-btn--chico { padding: 9px 18px; font-size: 14px; }
.pn-btn--bloque { width: 100%; padding: 15px; }
.pn-btn--borde { background: transparent; color: var(--cbp-black); border-color: rgba(15, 15, 15, .25); }
.pn-chip { display: inline-flex; align-items: center; padding: 4px 12px; margin: 2px 4px 2px 0; border-radius: 30px; background: var(--pn-fondo); color: var(--cbp-black); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pn-chip--rojo { background: rgba(128, 11, 1, .1); color: var(--cbp-red); }
.pn-estado { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #868b96; }
.pn-estado::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c3c6cc; }
.pn-estado.is-on { color: #1d8a4e; }
.pn-estado.is-on::before { background: #1fb463; }
.pn-icono-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--pn-borde);
  background: #fff;
  color: var(--cbp-black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
}
.pn-icono-btn:hover { background: var(--cbp-red); border-color: var(--cbp-red); color: #fff; }

/* ---------- Mensajes ---------- */
.pn-flash { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-radius: 16px; font-weight: 500; }
.pn-flash i { margin-top: 3px; }
.pn-flash span { flex: 1; }
.pn-flash button { border: 0; background: transparent; color: inherit; }
.pn-flash--ok { background: rgba(31, 180, 99, .1); color: #1d6e43; }
.pn-flash--error { background: rgba(128, 11, 1, .08); color: var(--cbp-red-dark); }
.pn-flash--info { background: rgba(15, 15, 15, .06); color: var(--cbp-black); }

/* ---------- Formularios ---------- */
.pn-form { display: flex; flex-direction: column; gap: 18px; }
.pn-form--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.pn-form--grid .pn-permisos, .pn-form--grid .pn-form__acciones { grid-column: 1 / -1; }
.pn-campo { position: relative; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.pn-campo > span { font-size: 14px; font-weight: 600; color: var(--cbp-black); }
.pn-campo input, .pn-campo select, .pn-campo textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(15, 15, 15, .14);
  border-radius: 14px;
  background: #fff;
  color: var(--cbp-black);
  font: 500 15px "DM Sans", sans-serif;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.pn-campo input:focus, .pn-campo select:focus, .pn-campo textarea:focus { outline: 0; border-color: var(--cbp-red); box-shadow: 0 0 0 4px rgba(128, 11, 1, .12); }
/* Campos con icono (login) */
.pn-campo > i { position: absolute; left: 16px; bottom: 16px; color: #9a9ea8; pointer-events: none; }
.pn-campo > i ~ input { padding-left: 44px; }
.pn-campo__ver { position: absolute; right: 8px; bottom: 7px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: #9a9ea8; }
.pn-campo__ver:hover { color: var(--cbp-red); }
.pn-error { color: var(--cbp-red); font-size: 13px; font-weight: 600; }
.pn-form__acciones { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }

.pn-permisos { margin: 6px 0 0; padding: 22px; border: 1px solid var(--pn-borde); border-radius: 20px; display: flex; flex-direction: column; gap: 16px; }
.pn-permisos legend { float: none; width: auto; padding: 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cbp-red); }
.pn-permisos__lista { display: flex; flex-direction: column; gap: 12px; transition: opacity .3s ease; }
.pn-permisos__lista.is-deshabilitado { opacity: .35; pointer-events: none; }
.pn-permiso { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; background: var(--pn-fondo); }
.pn-permiso > span { font-weight: 600; color: var(--cbp-black); }
.pn-permiso > span i { color: var(--cbp-red); width: 22px; }
.pn-segmentado { display: inline-flex; padding: 4px; border-radius: 40px; background: #fff; border: 1px solid var(--pn-borde); flex-wrap: wrap; }
.pn-segmentado input { position: absolute; opacity: 0; pointer-events: none; }
.pn-segmentado span { display: inline-block; padding: 7px 14px; border-radius: 30px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .25s ease, color .25s ease; }
.pn-segmentado input:checked + span { background: var(--cbp-red); color: #fff; }
.pn-segmentado input:focus-visible + span { outline: 2px solid var(--cbp-red); outline-offset: 2px; }
.pn-check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.pn-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--cbp-red); flex: 0 0 auto; }
.pn-check--destacado { padding: 14px 16px; border-radius: 16px; background: rgba(128, 11, 1, .06); }

/* ---------- Tablas ---------- */
.pn-tabla-envoltura { overflow-x: auto; }
.pn-tabla { width: 100%; border-collapse: collapse; font-size: 15px; }
.pn-tabla th { padding: 0 14px 12px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #868b96; text-align: left; white-space: nowrap; }
.pn-tabla td { padding: 14px; border-top: 1px solid var(--pn-borde); vertical-align: middle; }
.pn-tabla tr.is-inactivo td { opacity: .55; }
.pn-tabla tbody tr { transition: background-color .2s ease; }
.pn-tabla tbody tr:hover { background: rgba(128, 11, 1, .03); }
.pn-tabla__acciones { display: flex; gap: 6px; justify-content: flex-end; }
.pn-tabla__acciones form { margin: 0; }
.pn-persona { display: flex; align-items: center; gap: 12px; }
.pn-persona strong { display: block; color: var(--cbp-black); }
.pn-persona small { color: #868b96; }
.pn-paginas { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 20px; }
.pn-paginas a { min-width: 38px; height: 38px; padding: 0 10px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--pn-borde); color: var(--cbp-black); font-weight: 600; }
.pn-paginas a.is-activo, .pn-paginas a:hover { background: var(--cbp-red); border-color: var(--cbp-red); color: #fff; }

/* Perfil y módulo pendiente */
.pn-perfil { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pn-perfil .pn-h2 { margin-top: 14px; }
.pn-perfil__accesos { margin-top: 10px; }
.pn-pendiente { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 50px 28px; }
.pn-pendiente p { max-width: 620px; margin: 0; }
.pn-pendiente__lista { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pn-pendiente__lista li { padding: 8px 14px; border-radius: 30px; background: var(--pn-fondo); font-weight: 600; font-size: 14px; color: var(--cbp-black); }
.pn-pendiente__lista i { color: var(--cbp-red); margin-right: 4px; }

/* ==========================================================
   Login: foto con corte diagonal + formulario
   ========================================================== */
body.pn-login { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; background: #fff; }
.pn-login__foto {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 60px;
  background-size: cover;
  background-position: center;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
  color: #fff;
}
.pn-login__foto::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .78) 100%); }
.pn-login__foto-texto { position: relative; max-width: 560px; }
.pn-login__etiqueta { margin: 0 0 18px; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, .9); }
.pn-login__etiqueta strong, .pn-login__etiqueta span { display: block; }
.pn-login__etiqueta strong { color: #fff; }
.pn-login__foto h1 { color: #fff !important; font-size: clamp(36px, 4vw, 64px); font-weight: 700 !important; line-height: 1.05; letter-spacing: -0.035em !important; margin: 0 0 26px; }
.pn-login__sistemas { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pn-login__sistemas li { padding: 9px 16px; border-radius: 30px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); font-size: 14px; font-weight: 600; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pn-login__sistemas i { color: #ff5a63; margin-right: 6px; }
.pn-login__form { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.pn-login__caja { width: min(420px, 100%); display: flex; flex-direction: column; gap: 18px; }
.pn-login__caja .pn-brand { padding: 0 0 16px; }
.pn-login__caja h2 { font-size: 42px; margin: 0; }
.pn-login__nota { margin: 0; font-size: 14px; color: #868b96; }
.pn-login__nota a { color: var(--cbp-red); font-weight: 600; }
.pn-login__nota--pie { padding-top: 16px; border-top: 1px solid var(--pn-borde); }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .pn-side { transform: translateX(-100%); transition: transform .35s ease; box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .5); }
  .pn-shell.is-menu-abierto .pn-side { transform: none; }
  .pn-velo { position: fixed; inset: 0; z-index: 45; background: rgba(14, 11, 11, .5); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
  .pn-shell.is-menu-abierto .pn-velo { opacity: 1; visibility: visible; }
  .pn-main { margin-left: 0; }
  .pn-top__menu { display: inline-flex; }
}
@media (max-width: 991px) {
  .pn-grid--2 { grid-template-columns: 1fr; }
  body.pn-login { grid-template-columns: 1fr; }
  .pn-login__foto { min-height: 300px; padding: 30px 24px 50px; clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%); }
  .pn-login__foto h1 { font-size: 34px; margin-bottom: 18px; }
}
@media (max-width: 767px) {
  .pn-top { margin: 10px 10px 0; padding: 10px 10px 10px 12px; }
  .pn-top__hora { display: none; }
  .pn-contenido { padding: 20px 10px 30px; }
  .pn-tarjeta, .pn-modulo { padding: 20px; border-radius: 20px; }
  .pn-form--grid { grid-template-columns: 1fr; }
  .pn-modulo__cifras strong { font-size: 22px; }
  .pn-linea li { grid-template-columns: 14px 1fr; }
  .pn-linea time { grid-column: 2; }
  .pn-pie { padding: 0 12px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .pn-modulo, .pn-modulo__marca, .pn-btn { transition: none; }
}

/* ---------- Perfiles ---------- */
.pn-tarjeta--plana { padding: 22px 28px; }
.pn-tarjeta--plana .pn-tarjeta__cab { margin: 0; }
.pn-perfil-mods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pn-perfil-mods li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--pn-fondo); color: #9a9ea8; font-size: 14px; font-weight: 600; }
.pn-perfil-mods li em { font-style: normal; font-size: 12px; }
.pn-perfil-mods li.is-on { color: var(--cbp-black); background: rgba(128, 11, 1, .06); }
.pn-perfil-mods li.is-on i, .pn-perfil-mods li.is-on em { color: var(--cbp-red); }
.pn-perfil-tarjeta.is-admin { background: linear-gradient(135deg, var(--cbp-red) 0%, var(--cbp-red-dark) 100%); border-color: transparent; color: rgba(255, 255, 255, .9); }
.pn-perfil-tarjeta.is-admin h2 { color: #fff; }
.pn-perfil-tarjeta.is-admin .pn-modulo__icono { background: rgba(255, 255, 255, .16); color: #fff; }
.pn-perfil-tarjeta.is-admin .pn-modulo__marca { background: #fff; opacity: .12; }
.pn-perfil-tarjeta.is-admin .pn-perfil-mods li { background: rgba(255, 255, 255, .14); color: #fff; }
.pn-perfil-tarjeta.is-admin .pn-perfil-mods li i, .pn-perfil-tarjeta.is-admin .pn-perfil-mods li em { color: #fff; }

/* Selector de perfil en el formulario de usuario */
.pn-perfiles-opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pn-perfil-opcion { position: relative; cursor: pointer; margin: 0; }
.pn-perfil-opcion input { position: absolute; opacity: 0; pointer-events: none; }
.pn-perfil-opcion > span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px; border-radius: 16px; border: 1.5px solid var(--pn-borde); background: #fff; transition: border-color .25s ease, background-color .25s ease, box-shadow .25s ease; }
.pn-perfil-opcion strong { color: var(--cbp-black); }
.pn-perfil-opcion strong i { color: var(--cbp-red); }
.pn-perfil-opcion small { color: #868b96; font-size: 13px; line-height: 1.4; }
.pn-perfil-opcion:hover > span { border-color: rgba(128, 11, 1, .4); }
.pn-perfil-opcion input:checked + span { border-color: var(--cbp-red); background: rgba(128, 11, 1, .05); box-shadow: 0 0 0 4px rgba(128, 11, 1, .1); }
.pn-perfil-opcion input:focus-visible + span { outline: 2px solid var(--cbp-red); outline-offset: 2px; }

/* El escudo tiene partes negras: sobre el menú oscuro va dentro de un círculo blanco */
.pn-side .pn-brand img { width: 56px; height: 48px; }

/* Foto y formulario siempre a toda la altura de la pantalla, aunque extensiones
   del navegador inyecten elementos en <body> (crearían filas extra en la rejilla) */
body.pn-login { grid-template-rows: minmax(100vh, auto); }
.pn-login__foto, .pn-login__form { grid-row: 1; min-height: 100vh; }
@media (max-width: 991px) {
  .pn-login__foto, .pn-login__form { grid-row: auto; min-height: 0; }
  .pn-login__foto { min-height: 300px; }
}

/* ==========================================================
   Componentes de los módulos (Transparencia, Aula, Asistente)
   ========================================================== */
.pn-pestanas { display: flex; gap: 6px; overflow-x: auto; padding: 6px; border-radius: 20px; background: #fff; border: 1px solid var(--pn-borde); }
.pn-pestanas a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; color: var(--cbp-black); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background-color .25s ease, color .25s ease; }
.pn-pestanas a:hover { background: var(--pn-fondo); }
.pn-pestanas a.is-activa { background: var(--cbp-black); color: #fff; }
.pn-pestanas a i { color: var(--cbp-red); }
.pn-pestanas a.is-activa i { color: #ff5a63; }
.pn-pestanas__externo { margin-left: auto; color: #868b96 !important; }

.pn-grid--cifras { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pn-grid--2-iguales { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pn-cifra { position: relative; overflow: hidden; padding: 24px; border-radius: 22px; background: #fff; border: 1px solid var(--pn-borde); }
.pn-cifra strong { display: block; font-size: 36px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; color: var(--cbp-black); }
.pn-cifra span { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; }
.pn-cifra--rojo { background: linear-gradient(135deg, var(--cbp-red), var(--cbp-red-dark)); border-color: transparent; color: rgba(255, 255, 255, .85); }
.pn-cifra--rojo strong { color: #fff; }
.pn-cifra::after { content: ""; position: absolute; right: -36px; bottom: -40px; width: 130px; height: 130px; background: currentColor; opacity: .06;
  -webkit-mask: url(../../assets/imgs/marca/escalera-silueta.png) center / contain no-repeat; mask: url(../../assets/imgs/marca/escalera-silueta.png) center / contain no-repeat; }

.pn-barras { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pn-barras li { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 70px; align-items: center; gap: 12px; font-size: 14px; }
.pn-barras a, .pn-barras li > span:first-child { color: var(--cbp-black); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-barras a:hover { color: var(--cbp-red); }
.pn-barras__barra { height: 10px; border-radius: 10px; background: var(--pn-fondo); overflow: hidden; }
.pn-barras__barra span { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--cbp-red-dark), var(--cbp-red)); }
.pn-barras strong { text-align: right; color: var(--cbp-black); }

.pn-columnas { display: flex; align-items: flex-end; gap: 10px; height: 220px; padding-top: 24px; }
.pn-columnas__col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.pn-columnas__col span { width: 100%; max-width: 54px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--cbp-red), var(--cbp-red-dark)); transition: opacity .2s ease; }
.pn-columnas__col:hover span { opacity: .8; }
.pn-columnas__col em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--cbp-black); }
.pn-columnas__col small { font-size: 12px; color: #868b96; white-space: nowrap; }
.pn-columnas--densa { gap: 3px; }
.pn-columnas--densa .pn-columnas__col span { border-radius: 4px 4px 1px 1px; }

.pn-fila-doc { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--pn-borde); color: var(--cbp-black); }
.pn-fila-doc:last-child { border-bottom: 0; }
.pn-fila-doc > i { font-size: 20px; color: var(--cbp-red); width: 24px; text-align: center; }
.pn-fila-doc span { flex: 1; min-width: 0; }
.pn-fila-doc strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-fila-doc small { color: #868b96; }
.pn-fila-doc em { font-style: normal; font-weight: 800; color: var(--cbp-red); }
.pn-fila-doc:hover strong { color: var(--cbp-red); }

.pn-migas { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; margin-bottom: 6px; }
.pn-migas a { color: #868b96; }
.pn-migas a:hover { color: var(--cbp-red); }
.pn-migas > * + *::before { content: "›"; margin-right: 6px; color: var(--cbp-red); }
.pn-migas span { color: var(--cbp-black); font-weight: 600; }

/* Explorador */
.pn-explorador { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.pn-explorador__lado { position: sticky; top: 100px; padding: 22px 16px; }
.pn-explorador__main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.pn-lista-nav { display: flex; flex-direction: column; gap: 2px; }
.pn-lista-nav a { padding: 10px 12px; border-radius: 12px; color: var(--cbp-black); font-weight: 600; font-size: 14px; }
.pn-lista-nav a:hover { background: var(--pn-fondo); }
.pn-lista-nav a.is-activo { background: rgba(128, 11, 1, .08); color: var(--cbp-red); }
.pn-lista-nav a.is-oculto { color: #9a9ea8; font-style: italic; }
.pn-subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 18px; }
.pn-subs__item { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--pn-borde); background: #fff; color: var(--cbp-black); text-align: left; transition: all .25s ease; font: inherit; }
.pn-subs__item strong { font-size: 15px; line-height: 1.3; }
.pn-subs__item small { color: #868b96; }
.pn-subs__item:hover { border-color: var(--cbp-red); transform: translateY(-2px); }
.pn-subs__item.is-oculto { opacity: .55; }
.pn-subs__nuevo { flex-direction: row; align-items: center; justify-content: center; gap: 8px; border-style: dashed; color: var(--cbp-red); font-weight: 700; cursor: pointer; }
.pn-banner-info { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: var(--pn-fondo); }
.pn-banner-info strong { display: block; color: var(--cbp-black); }
.pn-banner-info small { color: #868b96; }

.pn-doc { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--pn-borde); }
.pn-doc:last-child { border-bottom: 0; }
.pn-doc.is-oculto { opacity: .6; }
.pn-doc__icono { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; background: rgba(128, 11, 1, .08); color: var(--cbp-red); }
.pn-doc__icono--carpeta { background: rgba(240, 170, 30, .14); color: #d18b00; }
.pn-doc__info { flex: 1; min-width: 0; }
.pn-doc__info > a, .pn-doc__titulo { display: block; color: var(--cbp-black); font-weight: 600; overflow-wrap: anywhere; }
.pn-doc__info > a:hover { color: var(--cbp-red); }
.pn-doc__info small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: #868b96; }
.pn-doc .pn-chip { margin: 0; font-size: 11px; padding: 2px 8px; }

.pn-carpeta { border-bottom: 1px solid var(--pn-borde); }
.pn-carpeta.is-oculto > summary { opacity: .6; }
.pn-carpeta summary { display: flex; align-items: center; gap: 10px; padding: 12px 4px; cursor: pointer; list-style: none; font-weight: 600; color: var(--cbp-black); }
.pn-carpeta summary::-webkit-details-marker { display: none; }
.pn-carpeta summary > i { color: #e0a020; font-size: 18px; }
.pn-carpeta summary > span:first-of-type { flex: 1; min-width: 0; }
.pn-carpeta summary em { font-style: normal; font-size: 12px; font-weight: 500; color: #868b96; white-space: nowrap; }
.pn-carpeta__acciones { display: flex; gap: 4px; opacity: 0; transition: opacity .2s ease; }
.pn-carpeta summary:hover .pn-carpeta__acciones, .pn-carpeta summary:focus-within .pn-carpeta__acciones { opacity: 1; }
.pn-carpeta__acciones .pn-icono-btn { width: 32px; height: 32px; font-size: 13px; }
.pn-carpeta__acciones form { margin: 0; }
.pn-carpeta__contenido { margin-left: 12px; padding-left: 18px; border-left: 2px solid rgba(128, 11, 1, .15); }

/* Diálogos */
.pn-dialogo { width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 24px; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .5); }
.pn-dialogo--ancho { width: min(820px, calc(100vw - 24px)); }
.pn-dialogo::backdrop { background: rgba(14, 11, 11, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.pn-dialogo[open] { animation: pn-dialogo .3s ease; }
@keyframes pn-dialogo { from { opacity: 0; transform: translateY(20px) scale(.98); } }
.pn-dialogo > form { padding: 28px; }
.pn-dialogo .pn-form--grid { display: grid; gap: 18px; }
.pn-campo--ancho { grid-column: 1 / -1; }
.pn-campo select { appearance: auto; }

.pn-subida { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 18px; border: 2px dashed rgba(128, 11, 1, .35); border-radius: 18px; background: rgba(128, 11, 1, .03); text-align: center; cursor: pointer; transition: background-color .25s ease, border-color .25s ease; }
.pn-subida:hover, .pn-subida.is-encima { background: rgba(128, 11, 1, .08); border-color: var(--cbp-red); }
.pn-subida input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pn-subida > i { font-size: 34px; color: var(--cbp-red); }
.pn-subida strong { color: var(--cbp-black); }
.pn-subida small { color: #868b96; }
.pn-subida ul { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; text-align: left; font-size: 13px; color: var(--cbp-black); }
.pn-subida ul li { padding: 4px 10px; border-radius: 8px; background: #fff; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-subida--chica { padding: 16px; }
.pn-subida--chica > i { font-size: 22px; }

.pn-editor { border: 1.5px solid rgba(15, 15, 15, .14); border-radius: 14px; overflow: hidden; }
.pn-editor:focus-within { border-color: var(--cbp-red); box-shadow: 0 0 0 4px rgba(128, 11, 1, .12); }
.pn-editor__barra { display: flex; gap: 4px; padding: 6px; background: var(--pn-fondo); border-bottom: 1px solid var(--pn-borde); }
.pn-editor__barra button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--cbp-black); }
.pn-editor__barra button:hover { background: #fff; color: var(--cbp-red); }
.pn-editor__area { min-height: 140px; max-height: 320px; overflow-y: auto; padding: 14px 16px; outline: 0; color: var(--cbp-black); }

.pn-filtros { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.pn-filtros .pn-campo { min-width: 160px; }
.pn-filtros__espacio { flex: 1; }
.pn-modulo__icono--grande { width: 84px; height: 84px; font-size: 38px; border-radius: 24px; }

@media (max-width: 1199px) {
  .pn-explorador { grid-template-columns: 1fr; }
  .pn-explorador__lado { position: static; }
  .pn-lista-nav { flex-direction: row; overflow-x: auto; }
  .pn-lista-nav a { white-space: nowrap; }
}
@media (max-width: 991px) {
  .pn-grid--2-iguales { grid-template-columns: 1fr; }
  .pn-carpeta__acciones { opacity: 1; }
}
@media (max-width: 575px) {
  .pn-carpeta summary { flex-wrap: wrap; }
  .pn-carpeta__acciones { width: 100%; justify-content: flex-end; }
  .pn-doc { flex-wrap: wrap; }
  .pn-doc .pn-tabla__acciones { width: 100%; justify-content: flex-end; }
  .pn-barras li { grid-template-columns: 100px 1fr 54px; }
  .pn-dialogo > form { padding: 20px; }
}

/* ==========================================================
   Escala general del panel al 90%. Las alturas de pantalla completa
   se dividen por la escala para que sigan cubriendo toda la ventana.
   ========================================================== */
:root { --pn-escala: .9; }
body.cbp-panel { zoom: var(--pn-escala); }
.pn-shell { min-height: calc(100vh / var(--pn-escala)); }
.pn-side { height: calc(100vh / var(--pn-escala)); bottom: auto; }
body.pn-login { grid-template-rows: minmax(calc(100vh / var(--pn-escala)), auto); }
.pn-login__foto, .pn-login__form { min-height: calc(100vh / var(--pn-escala)); }
.pn-dialogo { max-height: calc((100vh - 40px) / var(--pn-escala)); }
@media (max-width: 991px) {
  .pn-login__foto, .pn-login__form { min-height: 0; }
  .pn-login__foto { min-height: 300px; }
}

/* ---------- Selector con buscador (reemplaza listas nativas largas) ---------- */
.pn-combo__nativo { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.pn-combo { position: relative; }
.pn-combo__boton {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 16px; text-align: left;
  border: 1.5px solid rgba(15, 15, 15, .14); border-radius: 14px; background: #fff; color: var(--cbp-black); font: inherit;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.pn-combo__boton:focus, .pn-combo__boton[aria-expanded="true"] { outline: 0; border-color: var(--cbp-red); box-shadow: 0 0 0 4px rgba(128, 11, 1, .12); }
.pn-combo__boton > i { color: var(--cbp-red); transition: transform .25s ease; }
.pn-combo__boton[aria-expanded="true"] > i { transform: rotate(180deg); }
.pn-combo__valor { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pn-combo__valor strong, .pn-combo__lista strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-combo__valor small, .pn-combo__lista small { font-size: 12px; color: #868b96; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-combo__valor small:empty, .pn-combo__lista small:empty { display: none; }
.pn-combo__panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20;
  border-radius: 18px; background: #fff; border: 1px solid var(--pn-borde);
  box-shadow: 0 24px 50px -20px rgba(15, 15, 15, .4); overflow: hidden; animation: pn-dialogo .2s ease;
}
.pn-combo__buscar { position: relative; padding: 10px; border-bottom: 1px solid var(--pn-borde); }
.pn-combo__buscar i { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); color: #9a9ea8; }
.pn-combo__buscar input { width: 100%; padding: 10px 12px 10px 38px; border: 0; border-radius: 10px; background: var(--pn-fondo); font: 500 14px "DM Sans", sans-serif; color: var(--cbp-black); }
.pn-combo__buscar input:focus { outline: 2px solid rgba(128, 11, 1, .3); }
.pn-combo__lista { list-style: none; margin: 0; padding: 6px; max-height: 300px; overflow-y: auto; }
.pn-combo__lista li {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px calc(10px + var(--nivel, 0) * 14px);
  border-radius: 10px; cursor: pointer; color: var(--cbp-black);
}
.pn-combo__lista li > i { flex: 0 0 auto; color: #e0a020; font-size: 14px; }
.pn-combo__lista li > i.fa-layer-group { color: var(--cbp-red); }
.pn-combo__lista li > span { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pn-combo__lista li:hover { background: var(--pn-fondo); }
.pn-combo__lista li.is-elegido { background: rgba(128, 11, 1, .08); }
.pn-combo__lista li.is-elegido strong { color: var(--cbp-red); }
.pn-combo__lista li[hidden] { display: none; }
/* Dentro de un diálogo la lista no debe salirse: el diálogo permite ver el panel completo */
.pn-dialogo { overflow: visible; }
.pn-dialogo > form { max-height: calc((100vh - 40px) / var(--pn-escala, 1)); overflow-y: auto; border-radius: 24px; }

/* Menú lateral: la cruz decorativa no debe estirar el área de scroll */
.pn-side { overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.pn-side::after { bottom: 0; height: 230px; -webkit-mask-position: center top; mask-position: center top; -webkit-mask-size: 320px 320px; mask-size: 320px 320px; }
/* Tarjetas del tablero: misma altura y pie alineado */
.pn-grid--modulos { align-items: stretch; }
.pn-modulo header { min-height: 74px; }

/* ---------- Subidor: modos, vista previa de carpeta y progreso ---------- */
.pn-segmentado--ancho { display: flex; width: 100%; }
.pn-segmentado--ancho label { flex: 1; margin: 0; }
.pn-segmentado--ancho span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; }
.pn-subida[hidden] { display: none; }
.pn-subida[data-pn-zona="carpeta"] input { pointer-events: none; }
.pn-arbol-previo { width: 100%; text-align: left; }
.pn-arbol-previo__resumen { margin: 12px 0 6px; font-size: 14px; color: var(--cbp-black); }
.pn-arbol-previo__lista { list-style: none; margin: 0; padding: 8px; max-height: 190px; overflow-y: auto; border-radius: 12px; background: #fff; }
.pn-arbol-previo__lista li { padding: 3px 6px 3px calc(6px + var(--nivel, 0) * 16px); font-size: 13px; color: var(--cbp-black); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-arbol-previo__lista i { color: #e0a020; margin-right: 4px; }
.pn-arbol-previo__lista em { font-style: normal; color: #868b96; font-size: 12px; }
.pn-arbol-previo__aviso { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(240, 170, 30, .14); color: #7a5200; font-size: 13px; text-align: left; }
[data-pn-solo-archivos][hidden] { display: none !important; }
.pn-progreso { padding: 16px; border-radius: 16px; background: var(--pn-fondo); }
.pn-progreso[hidden] { display: none; }
.pn-progreso__barra { height: 10px; border-radius: 10px; background: #fff; overflow: hidden; }
.pn-progreso__barra span { display: block; width: 0; height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--cbp-red-dark), var(--cbp-red)); transition: width .3s ease; }
.pn-progreso p { margin: 10px 0 0; font-size: 14px; color: var(--cbp-black); }
.pn-progreso__errores { list-style: none; margin: 8px 0 0; padding: 0; max-height: 120px; overflow-y: auto; font-size: 13px; color: var(--cbp-red-dark); }
.pn-btn:disabled { opacity: .7; cursor: wait; transform: none; }
.pn-subida .pn-arbol-previo__lista li { margin: 0; padding: 3px 6px 3px calc(6px + var(--nivel, 0) * 18px); background: none; border-radius: 0; }

/* ==========================================================
   Módulo Aula Virtual
   ========================================================== */
.pn-cursos { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.pn-curso { border: 1px solid var(--pn-borde); border-radius: 20px; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: box-shadow .3s ease, transform .3s ease; }
.pn-curso:hover { box-shadow: 0 18px 40px rgba(15, 15, 15, .1); transform: translateY(-3px); }
.pn-curso.is-inactivo { opacity: .7; }
.pn-curso__img, .pn-curso-cab__img { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: var(--cbp-black) center / cover no-repeat; color: rgba(255, 255, 255, .5); font-size: 42px; }
.pn-curso__img .pn-estado { position: absolute; top: 12px; left: 12px; background: #fff; padding: 4px 10px; border-radius: 20px; }
.pn-curso__cuerpo { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pn-curso__cuerpo h3 { font-size: 18px; font-weight: 800; margin: 0; line-height: 1.3; }
.pn-curso__cuerpo h3 a { color: var(--cbp-black); }
.pn-curso__cuerpo h3 a:hover { color: var(--cbp-red); }
.pn-curso__datos { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--pn-texto); }
.pn-curso__datos i { color: var(--cbp-red); margin-right: 3px; }
.pn-curso__datos .is-falta, .pn-curso__datos .is-falta i { color: #c77700; }
.pn-curso__acciones { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 10px; }
.pn-curso__acciones .pn-btn { margin-right: auto; }
.pn-curso-cab { display: grid; grid-template-columns: 260px 1fr auto; gap: 24px; align-items: center; }
.pn-curso-cab__img { border-radius: 16px; overflow: hidden; }
.pn-curso-cab__texto .pn-h2 { margin: 8px 0 4px; }
.pn-curso-cab__acciones { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pn-lista-nav--fila { flex-direction: row; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.pn-lista-nav--fila a { background: #fff; border: 1px solid var(--pn-borde); border-radius: 30px; padding: 9px 16px; display: inline-flex; align-items: center; gap: 8px; }
.pn-lista-nav--fila a.is-activo { background: var(--cbp-red); border-color: var(--cbp-red); color: #fff; }
.pn-lista-nav a em { font-style: normal; font-size: 12px; background: rgba(15, 15, 15, .08); border-radius: 20px; padding: 1px 8px; }
.pn-lista-nav--fila a.is-activo em { background: rgba(255, 255, 255, .25); }

.pn-videos { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.pn-video { display: grid; grid-template-columns: 34px 150px 1fr auto; gap: 16px; align-items: center; padding: 12px; border: 1px solid var(--pn-borde); border-radius: 16px; }
.pn-video__orden { width: 34px; height: 34px; border-radius: 50%; background: rgba(128, 11, 1, .1); color: var(--cbp-red); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.pn-video__mini { aspect-ratio: 16 / 9; border-radius: 10px; background: var(--cbp-black) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; }
.pn-video__mini i { width: 36px; height: 36px; border-radius: 50%; background: rgba(128, 11, 1, .9); display: flex; align-items: center; justify-content: center; padding-left: 3px; }
.pn-video__info strong { display: block; color: var(--cbp-black); }
.pn-video__info small { color: #868b96; }
.pn-video__info p { margin: 4px 0 0; font-size: 14px; }
.pn-duracion { display: flex; align-items: center; gap: 6px; }
.pn-duracion input { width: 80px; }
.pn-duracion em { font-style: normal; color: #868b96; font-size: 13px; }

.pn-portada { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.pn-portada__previa { width: 240px; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--pn-fondo) center / cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 34px; color: #b9bcc3; border: 1px dashed var(--pn-borde); }
.pn-portada__previa--logo { width: 180px; aspect-ratio: 1; background-size: contain; background-color: #fff; }

.pn-evals { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.pn-eval { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--pn-borde); border-radius: 18px; color: var(--pn-texto); transition: border-color .25s ease, box-shadow .25s ease; }
.pn-eval:hover { border-color: var(--cbp-red); box-shadow: 0 14px 30px rgba(15, 15, 15, .08); }
.pn-eval.is-inactivo { opacity: .7; }
.pn-eval h3 { font-size: 18px; font-weight: 800; color: var(--cbp-black); margin: 8px 0 4px; }

.pn-grid--compacta { margin-top: 18px; margin-bottom: 0; }
.pn-preguntas { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.pn-pregunta { border: 1px solid var(--pn-borde); border-radius: 16px; padding: 16px 18px; }
.pn-pregunta.is-inactivo { opacity: .55; background: var(--pn-fondo); }
.pn-pregunta__cab { display: flex; gap: 14px; align-items: flex-start; }
.pn-pregunta__num { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--cbp-black); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.pn-pregunta__num.is-ok { background: #1fb463; }
.pn-pregunta__num.is-mal { background: var(--cbp-red); }
.pn-pregunta__texto { flex: 1; }
.pn-pregunta__texto strong { display: block; color: var(--cbp-black); line-height: 1.45; }
.pn-opciones { list-style: none; padding: 0 0 0 48px; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.pn-opciones li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--pn-fondo); font-size: 14px; }
.pn-opciones li > span { flex: 0 0 24px; height: 24px; border-radius: 50%; background: #fff; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.pn-opciones li.is-correcta { background: rgba(31, 180, 99, .12); color: #1d6e43; font-weight: 600; }
.pn-opciones li.is-correcta i { color: #1fb463; margin-left: auto; }
.pn-opciones li.is-elegida:not(.is-correcta) { background: rgba(128, 11, 1, .08); color: var(--cbp-red-dark); }
.pn-opciones li em { font-style: normal; font-size: 12px; opacity: .8; }
.pn-opciones-editor { display: flex; flex-direction: column; gap: 8px; }
.pn-op-fila { display: grid; grid-template-columns: 28px auto 1fr 36px; gap: 10px; align-items: center; }
.pn-op-fila > b { width: 28px; height: 28px; border-radius: 50%; background: var(--pn-fondo); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.pn-op-fila label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.pn-op-fila input[type="text"] { width: 100%; }
.pn-op-fila.is-correcta > b { background: #1fb463; color: #fff; }
.pn-tabla--mini { font-size: 12px; }
.pn-tabla--mini td, .pn-tabla--mini th { padding: 6px 8px; }

.pn-buscador { position: relative; display: flex; align-items: center; gap: 8px; }
.pn-buscador > i { position: absolute; left: 14px; color: #9a9ea8; pointer-events: none; }
.pn-buscador input[type="search"] { padding-left: 38px; min-width: 260px; border-radius: 30px; }
.pn-buscador select { border-radius: 30px; }
.pn-buscador__campo { position: relative; display: flex; align-items: center; flex: 1; }
.pn-buscador__campo > i { position: absolute; left: 14px; color: #9a9ea8; pointer-events: none; }
.pn-segmentado a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 30px; font-size: 13px; font-weight: 600; color: var(--cbp-black); transition: background-color .25s ease, color .25s ease; }
.pn-segmentado a.is-activo { background: var(--cbp-red); color: #fff; }
.pn-segmentado a em { font-style: normal; font-size: 12px; opacity: .75; }
.pn-avance { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.pn-avance__barra { flex: 1; height: 8px; border-radius: 10px; background: var(--pn-fondo); overflow: hidden; }
.pn-avance__barra span { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--cbp-red-dark), var(--cbp-red)); }
.pn-avance strong { font-size: 13px; min-width: 38px; text-align: right; }
.pn-tabla__check { width: 36px; }
.pn-masivo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; border-radius: 16px; background: rgba(128, 11, 1, .07); }
.pn-masivo select { width: auto; }
.pn-en-linea { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pn-en-linea select, .pn-en-linea input { width: auto; flex: 1; min-width: 180px; }
.pn-datos { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; text-align: left; width: 100%; margin: 16px 0 6px; font-size: 14px; }
.pn-datos dt { color: #868b96; font-weight: 600; }
.pn-datos dd { margin: 0; color: var(--cbp-black); word-break: break-word; }
.pn-datos i { color: #1fb463; }
.pn-paginas__salto { align-self: center; color: #9a9ea8; }
.pn-leyenda { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.pn-leyenda span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.pn-leyenda .is-r::before, .pn-columnas__barras .is-r { background: #9a9ea8; }
.pn-leyenda .is-i::before, .pn-columnas__barras .is-i { background: var(--cbp-red); }
.pn-leyenda .is-c::before, .pn-columnas__barras .is-c { background: var(--cbp-black); }
.pn-columnas__barras { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; min-height: 0; }
.pn-columnas--grupo .pn-columnas__col .pn-columnas__barras span { flex: 1; max-width: 16px; border-radius: 5px 5px 2px 2px; }
.pn-columnas--grupo { height: 260px; }

@media (max-width: 991px) {
  .pn-curso-cab { grid-template-columns: 1fr; }
  .pn-curso-cab__img { max-width: 360px; }
  .pn-curso-cab__acciones { flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
  .pn-video { grid-template-columns: 34px 110px 1fr; }
  .pn-video .pn-tabla__acciones { grid-column: 2 / -1; justify-content: flex-start; }
  .pn-buscador input[type="search"] { min-width: 0; width: 100%; }
  .pn-buscador { width: 100%; }
}
@media (max-width: 575px) {
  .pn-video { grid-template-columns: 34px 1fr; }
  .pn-video__mini { grid-column: 2; }
  .pn-video__info, .pn-video .pn-tabla__acciones { grid-column: 1 / -1; }
  .pn-opciones { padding-left: 0; }
  .pn-op-fila { grid-template-columns: 28px 1fr 36px; }
  .pn-op-fila label { grid-column: 2; grid-row: 2; }
}
.pn-fila-doc .pn-avatar { flex: 0 0 38px; }
.pn-buscador input, .pn-buscador select, .pn-en-linea input, .pn-en-linea select, .pn-masivo select {
  font: inherit; font-size: 14px; padding: 10px 16px; border: 1px solid var(--pn-borde); border-radius: 30px; background: #fff; color: var(--cbp-black); min-height: 42px;
}
.pn-buscador input[type="search"] { padding-left: 38px; }
.pn-buscador input:focus, .pn-buscador select:focus, .pn-en-linea input:focus, .pn-en-linea select:focus { outline: 0; border-color: var(--cbp-red); box-shadow: 0 0 0 4px rgba(128, 11, 1, .12); }
.pn-tarjeta p a:not([class]), .pn-tabla td > a:not([class]) { color: var(--cbp-black); font-weight: 600; }
.pn-tarjeta p a:not([class]):hover, .pn-tabla td > a:not([class]):hover { color: var(--cbp-red); }
.pn-campo [data-pn-opcion-agregar] { width: auto; align-self: flex-start; }
@media (max-width: 575px) { .pn-grid--compacta { grid-template-columns: 1fr 1fr; gap: 10px; } .pn-grid--compacta .pn-cifra strong { font-size: 26px; } }

/* ==========================================================
   Módulo Asistente virtual
   ========================================================== */
.pn-banner-info.is-ok { background: rgba(31, 180, 99, .1); color: #1d6e43; }
.pn-banner-info a { font-weight: 700; color: var(--cbp-red); }
.pn-kb-cat { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--cbp-red); margin: 26px 0 10px; display: flex; align-items: center; gap: 8px; }
.pn-kb-cat small { font-size: 12px; background: rgba(128, 11, 1, .1); border-radius: 20px; padding: 1px 9px; letter-spacing: 0; }
.pn-kb { display: flex; flex-direction: column; gap: 8px; }
.pn-kb__item { border: 1px solid var(--pn-borde); border-radius: 14px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease; }
.pn-kb__item[open] { border-color: rgba(128, 11, 1, .4); box-shadow: 0 10px 26px rgba(15, 15, 15, .06); }
.pn-kb__item.is-inactivo { opacity: .6; }
.pn-kb__item summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; }
.pn-kb__item summary::-webkit-details-marker { display: none; }
.pn-kb__item summary strong { flex: 1; color: var(--cbp-black); font-weight: 600; }
.pn-kb__prio { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--pn-fondo); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; color: var(--cbp-black); }
.pn-kb__flecha { color: #9a9ea8; transition: transform .25s ease; }
.pn-kb__item[open] .pn-kb__flecha { transform: rotate(180deg); }
.pn-kb__cuerpo { padding: 0 16px 14px 56px; }
.pn-kb__respuesta { font-size: 14px; line-height: 1.6; padding: 12px 14px; border-radius: 12px; background: var(--pn-fondo); color: var(--cbp-black); }
.pn-kb__claves { margin-top: 10px; }
.pn-kb__pie { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.pn-estrellas { color: #f5b400; font-size: 13px; white-space: nowrap; }
.pn-chat { display: flex; flex-direction: column; gap: 12px; max-height: 70vh; overflow-y: auto; padding: 6px; }
.pn-chat__msg { max-width: 82%; display: flex; flex-direction: column; gap: 4px; }
.pn-chat__msg small { font-size: 12px; color: #9a9ea8; padding: 0 6px; }
.pn-chat__texto { padding: 12px 16px; border-radius: 18px; font-size: 14px; line-height: 1.55; word-wrap: break-word; }
.pn-chat__msg.is-bot { align-self: flex-start; }
.pn-chat__msg.is-bot .pn-chat__texto { background: var(--pn-fondo); color: var(--cbp-black); border-bottom-left-radius: 6px; }
.pn-chat__msg.is-yo { align-self: flex-end; align-items: flex-end; }
.pn-chat__msg.is-yo .pn-chat__texto { background: var(--cbp-red); color: #fff; border-bottom-right-radius: 6px; }
.pn-chat__msg.is-sin .pn-chat__texto { background: #fff7e6; border: 1px dashed #e0a100; }
.pn-chat__msg.is-emergencia .pn-chat__texto { background: #fff2f3; border: 1.5px solid var(--cbp-red); color: var(--cbp-red-dark); }
.pn-codigo { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--cbp-black); }
.pn-codigo code { flex: 1; color: #fff; font-size: 12.5px; word-break: break-all; background: none; }
.pn-codigo .pn-icono-btn { background: rgba(255, 255, 255, .12); color: #fff; border-color: transparent; }
@media (max-width: 767px) { .pn-kb__cuerpo { padding-left: 16px; } .pn-chat__msg { max-width: 94%; } }
.pn-banner-info--ia { justify-content: flex-start; margin: 0 0 20px; }
.pn-banner-info--ia > i { font-size: 30px; color: var(--cbp-red); }
.pn-banner-info--ia.is-ok > i { color: #1fb463; }
.pn-banner-info--ia > div { flex: 1; color: var(--pn-texto); }
.pn-banner-info--ia strong { display: inline; }
.pn-fila-doc small a, .pn-tarjeta small a:not([class]) { color: var(--cbp-red); font-weight: 600; }

/* ==========================================================
   Módulo Portal web
   ========================================================== */
.pn-noticias { display: flex; flex-direction: column; gap: 12px; }
.pn-noticia { display: grid; grid-template-columns: 150px 1fr auto; gap: 18px; align-items: center; padding: 12px; border: 1px solid var(--pn-borde); border-radius: 18px; background: #fff; }
.pn-noticia.is-borrador { border-style: dashed; }
.pn-noticia.is-archivada { opacity: .65; }
.pn-noticia__img { aspect-ratio: 16 / 10; border-radius: 12px; background: var(--pn-fondo) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: #b9bcc3; font-size: 26px; }
.pn-noticia__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.pn-noticia h3 { font-size: 17px; font-weight: 800; margin: 0 0 4px; line-height: 1.35; }
.pn-noticia h3 a { color: var(--cbp-black); }
.pn-noticia h3 a:hover { color: var(--cbp-red); }
.pn-noticia-editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.pn-noticia-editor .pn-tarjeta + .pn-tarjeta { margin-top: 24px; }
.pn-noticia-editor__lado { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 24px; }
.pn-noticia-editor__lado .pn-tarjeta + .pn-tarjeta { margin-top: 0; }
.pn-editor--grande .pn-editor__area { min-height: 360px; font-size: 16px; line-height: 1.7; }
.pn-editor__area h3 { font-size: 20px; font-weight: 800; margin: 1em 0 .4em; }
.pn-editor__area blockquote { border-left: 4px solid var(--cbp-red); padding-left: 14px; font-style: italic; }
.pn-portada__previa--ancha { width: 100%; }
.pn-video-previa { width: 100%; border-radius: 12px; background: #000; }
.pn-galeria-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pn-galeria-edit__item { display: flex; flex-direction: column; gap: 6px; }
.pn-galeria-edit__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.pn-galeria-edit__item input[type="text"] { width: 100%; font-size: 13px; padding: 7px 10px; border: 1px solid var(--pn-borde); border-radius: 10px; }
.pn-previas { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.pn-previas img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.pn-espacios { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.pn-espacio { border: 1px solid var(--pn-borde); border-radius: 18px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.pn-espacio.is-cambiado { border-color: rgba(128, 11, 1, .4); }
.pn-espacio__vista { position: relative; aspect-ratio: 16 / 9; background: repeating-conic-gradient(#f1f1f1 0% 25%, #fafafa 0% 50%) 50% / 20px 20px; display: flex; align-items: center; justify-content: center; }
.pn-espacio__vista img, .pn-espacio__vista video { width: 100%; height: 100%; object-fit: cover; }
.pn-espacio__vista img[src$=".png"] { object-fit: contain; }
.pn-espacio__marca { position: absolute; top: 10px; left: 10px; }
.pn-espacio__yt { position: absolute; font-size: 46px; color: #ff0000; text-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.pn-espacio__falta { color: #868b96; font-size: 13px; font-weight: 600; padding: 10px; text-align: center; }
.pn-espacio__info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.pn-espacio__info strong { color: var(--cbp-black); }
.pn-espacio__form { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.pn-espacio__form input { flex: 1; min-width: 0; font-size: 13px; }
.pn-espacio__form input[type="url"] { padding: 8px 12px; border: 1px solid var(--pn-borde); border-radius: 10px; }
@media (max-width: 1199px) { .pn-noticia-editor { grid-template-columns: 1fr; } .pn-noticia-editor__lado { position: static; } }
@media (max-width: 767px) { .pn-noticia { grid-template-columns: 96px 1fr; } .pn-noticia .pn-tabla__acciones { grid-column: 1 / -1; } }
.pn-alm { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 24px; margin-bottom: 24px; }
.pn-alm .pn-tarjeta { margin: 0; }
.pn-alm__cifras { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pn-alm__cifras > div { padding: 12px 14px; border-radius: 14px; background: var(--pn-fondo); }
.pn-alm__cifras strong { display: block; font-size: 20px; font-weight: 800; color: var(--cbp-black); }
.pn-alm__cifras span { font-size: 12px; color: #868b96; }
.pn-alm__cifras .is-ahorro { background: rgba(31, 180, 99, .12); }
.pn-alm__cifras .is-ahorro strong { color: #1d6e43; }
.pn-alm__cifras .is-dup { background: rgba(128, 11, 1, .08); }
.pn-alm__det { margin-top: 12px; font-size: 13px; }
.pn-alm__det summary { cursor: pointer; font-weight: 700; color: var(--cbp-black); }
.pn-alm__det ul { list-style: none; padding: 0; margin: 8px 0 0; }
.pn-alm__det li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--pn-borde); word-break: break-all; }
.pn-alm__det em { font-style: normal; font-weight: 700; white-space: nowrap; }
@media (max-width: 575px) { .pn-alm { grid-template-columns: 1fr; } }
/* Campos de archivo con el estilo del panel */
.cbp-panel input[type="file"] { font: 500 13px "DM Sans", sans-serif; color: #868b96; max-width: 100%; }
.cbp-panel input[type="file"]::file-selector-button { font: 700 13px "DM Sans", sans-serif; margin-right: 10px; padding: 8px 14px; border: 1.5px solid var(--pn-borde); border-radius: 20px; background: #fff; color: var(--cbp-black); cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.cbp-panel input[type="file"]::file-selector-button:hover { border-color: var(--cbp-red); color: var(--cbp-red); }
button.pn-enlace { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.pn-espacio__form { flex-wrap: wrap; }
.pn-espacio__form input[type="file"] { flex: 1 1 100%; }
.pn-pestanas__badge { font-style: normal; font-size: 11px; font-weight: 800; background: var(--cbp-red); color: #fff; border-radius: 20px; padding: 1px 7px; margin-left: 4px; }
.pn-mensajes { display: flex; flex-direction: column; gap: 10px; }
.pn-mensaje { border: 1px solid var(--pn-borde); border-radius: 16px; background: #fff; }
.pn-mensaje.is-nuevo { border-color: rgba(128, 11, 1, .45); box-shadow: 0 8px 20px rgba(128, 11, 1, .06); }
.pn-mensaje summary { list-style: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; cursor: pointer; }
.pn-mensaje summary::-webkit-details-marker { display: none; }
.pn-mensaje summary strong { flex: 1; color: var(--cbp-black); min-width: 200px; }
.pn-mensaje__cuerpo { padding: 0 18px 16px; }
.pn-mensaje__texto { padding: 14px 16px; border-radius: 12px; background: var(--pn-fondo); color: var(--cbp-black); line-height: 1.6; }

/* Espacios del portal de tipo documento (PDF) */
.pn-espacio__doc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; min-height: 140px; padding: 14px; text-align: center; color: var(--cbp-black); text-decoration: none; }
.pn-espacio__doc i { font-size: 42px; color: var(--cbp-red); }
.pn-espacio__doc span { font-size: 12.5px; font-weight: 600; word-break: break-all; }
.pn-espacio__doc small { font-size: 12px; color: #868b96; }
.pn-espacio__doc:hover small { color: var(--cbp-red); }

/* Portal web › Anuncios */
.pn-form__fila { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pn-campo__etq { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--cbp-black); }
.pn-anuncio-vigente { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 18px; padding: 12px 16px; border-radius: 14px; background: #eefaf3; color: #1d6b40; font-size: 14px; }
.pn-anuncio-vigente i.fa-circle { font-size: 9px; color: #1fb463; animation: cbp-pulse 2s infinite; }
.pn-anuncio-vigente a { color: #1d6b40; font-weight: 700; }
.pn-anuncios { display: grid; gap: 14px; }
.pn-anuncio { display: grid; grid-template-columns: 150px 1fr auto; gap: 20px; align-items: center; padding: 14px; border: 1px solid var(--pn-borde); border-radius: 20px; background: #fff; }
.pn-anuncio.is-on { border-color: rgba(31, 180, 99, .45); box-shadow: 0 16px 40px -30px rgba(31, 180, 99, .8); }
.pn-anuncio.is-off { opacity: .6; }
.pn-anuncio__img { width: 150px; aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; background: #f4f3f3; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #b9bcc4; }
.pn-anuncio__img img { width: 100%; height: 100%; object-fit: cover; }
.pn-anuncio__info { min-width: 0; }
.pn-anuncio__info .pn-estado { position: static; padding: 0; background: none; }
.pn-anuncio.is-prog .pn-estado { color: #b37b00; }
.pn-anuncio.is-prog .pn-estado::before { background: #f0b400; }
.pn-anuncio__info h3 { margin: 4px 0 4px; font-size: 18px; }
.pn-anuncio__info p { margin: 0 0 8px; font-size: 14px; color: #6b7180; }
.pn-anuncio__datos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: #868b96; }
.pn-anuncio__datos i { color: var(--cbp-red); margin-right: 3px; }
.pn-anuncio-form { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.pn-anuncio-form > div { display: grid; gap: 14px; align-content: start; }
.pn-anuncio-form__previa { aspect-ratio: 3 / 2; border-radius: 16px; overflow: hidden; background: #f4f3f3; border: 1.5px dashed rgba(15, 15, 15, .15); display: flex; align-items: center; justify-content: center; font-size: 34px; color: #b9bcc4; }
.pn-anuncio-form__previa img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) {
  .pn-form__fila, .pn-anuncio-form { grid-template-columns: 1fr; }
  .pn-anuncio { grid-template-columns: 1fr; }
  .pn-anuncio__img { width: 100%; }
}
.pn-anuncio-dlg { display: grid; gap: 18px; }
.pn-anuncio-dlg .pn-h2 { margin: 0; }


/* ==========================================================
   Acceso del personal (login.php) — lenguaje del sitio de Paute:
   barra con el logo, título grande 600, lista [01] —, tarjeta #F2F2F2,
   campos de línea inferior y botón píldora negro.
   ========================================================== */
body.pn-acceso { min-height: 100vh; margin: 0; display: flex; flex-direction: column; background: #fff; color: #585959; }
.pn-acceso__barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px clamp(20px, 4vw, 56px); }
.pn-acceso__marca { display: flex; align-items: center; gap: 12px; color: #1d1d1d; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.pn-acceso__marca img { width: 54px; height: auto; }
.pn-acceso__volver { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border: 1px solid #1d1d1d; border-radius: 50px; color: #1d1d1d; font-size: 14px; font-weight: 500; transition: all .25s ease; }
.pn-acceso__volver:hover { background: #1d1d1d; color: #fff; }
.pn-acceso__cuerpo { flex: 1; display: grid; grid-template-columns: 1.2fr minmax(340px, 460px); gap: clamp(32px, 6vw, 110px); align-items: center; padding: 30px clamp(20px, 4vw, 56px) 40px; }
.pn-acceso__miga { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 14px; font-weight: 600; text-transform: uppercase; color: #1d1d1d; }
.pn-acceso__miga span:last-child { color: #585959; }
.pn-acceso__miga .pn-cruz { width: 10px; height: 13px; flex-basis: 10px; }
.cbp-panel .pn-acceso__intro h1 { margin: 0; font-size: clamp(52px, 7.4vw, 118px); font-weight: 600; line-height: .95; letter-spacing: -0.055em; color: #1d1d1d; }
.pn-acceso__lead { max-width: 560px; margin: 28px 0 34px; font-size: 18px; line-height: 1.55; color: #1d1d1d; }
.pn-acceso__modulos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; max-width: 680px; border-top: 1px solid #dfdfdf; }
.pn-acceso__modulos li { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 16px 0; border-bottom: 1px solid #dfdfdf; }
.pn-acceso__modulos li > span { grid-row: span 2; font-weight: 600; color: #b7b7b7; }
.pn-acceso__modulos strong { color: #1d1d1d; font-weight: 600; font-size: 16px; }
.pn-acceso__modulos small { font-size: 13px; line-height: 1.45; }
.pn-acceso__tarjeta { position: relative; padding: 44px 40px 34px; border-radius: 8px; background: #f2f2f2; }
.pn-acceso__escudo { position: absolute; top: -34px; right: 34px; width: 58px; height: auto; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .18)); }
.pn-acceso__etiqueta { margin: 0 0 4px; font-size: 13px; font-weight: 600; text-transform: uppercase; color: #585959; }
.cbp-panel .pn-acceso__tarjeta h2 { margin: 0 0 22px; font-size: 38px; font-weight: 600; letter-spacing: -0.045em; color: #1d1d1d; }
.pn-acceso__form { display: flex; flex-direction: column; gap: 18px; margin-top: 6px; }
.pn-acceso__campo { position: relative; display: block; padding-top: 16px; }
.pn-acceso__campo input { width: 100%; height: 44px; padding: 0 34px 0 0; border: 0; border-bottom: 1px solid #b7b7b7; border-radius: 0; background: transparent; color: #1d1d1d; font: 500 16px "DM Sans", sans-serif; outline: 0; transition: border-color .2s ease; }
.pn-acceso__campo input:focus { border-bottom-color: #1d1d1d; }
/* Etiqueta que sube al escribir (como los campos del formulario de Contacto) */
.pn-acceso__campo > span { position: absolute; left: 0; top: 28px; font-size: 14px; color: #585959; pointer-events: none; transition: all .2s ease; }
.pn-acceso__campo input:focus + span, .pn-acceso__campo input:not(:placeholder-shown) + span { top: 0; font-size: 12px; color: #1d1d1d; }
.pn-acceso__ver { position: absolute; right: 0; bottom: 8px; border: 0; background: none; color: #585959; font-size: 16px; padding: 4px; }
.pn-acceso__btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; padding: 17px 26px; border: 0; border-radius: 50px; background: #1d1d1d; color: #fefefe; font: 600 16px "DM Sans", sans-serif; letter-spacing: -0.02em; cursor: pointer; transition: background-color .25s ease; }
.pn-acceso__btn:hover { background: var(--cbp-red); }
.pn-acceso__nota { margin: 16px 0 0; font-size: 13px; line-height: 1.5; }
.pn-acceso__nota + .pn-acceso__nota { margin-top: 6px; }
.pn-acceso__nota a { color: #1d1d1d; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pn-acceso .pn-flash { border-radius: 8px; }
.pn-acceso__pie { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; padding: 22px clamp(20px, 4vw, 56px); border-top: 1px solid #dfdfdf; font-size: 14px; color: #1d1d1d; }
.pn-acceso__pie img { height: 18px; width: auto; margin-left: auto; opacity: .85; }
@media (max-width: 991px) {
  .pn-acceso__cuerpo { grid-template-columns: 1fr; }
  .pn-acceso__modulos { grid-template-columns: 1fr; }
  .pn-acceso__tarjeta { margin-top: 30px; }
}
@media (max-width: 575px) {
  .pn-acceso__volver { padding: 9px 14px; font-size: 13px; }
  .pn-acceso__marca { font-size: 18px; }
  .pn-acceso__marca img { width: 42px; }
  .pn-acceso__tarjeta { padding: 40px 22px 28px; }
  .pn-acceso__pie img { margin-left: 0; }
}

/* ==========================================================
   Interior del panel con la piel del sitio de Paute
   (radio 8 px, píldoras negras, rojo solo como acento, sin decoraciones de cbrnew)
   ========================================================== */
.cbp-panel { --pn-radio: 8px; }
.pn-side { background-image: none !important; background: #0f0f0f; }
.pn-side::after { opacity: .035; width: 260px; height: 340px; left: -70px; bottom: -60px; }
.pn-brand img { width: 44px; height: auto; }
.pn-nav__grupo { color: rgba(255, 255, 255, .4); letter-spacing: .08em; font-weight: 600; }
.pn-nav a { border-radius: 50px; font-weight: 500; }
.pn-nav a.is-activo { background: #fff; color: #1d1d1d; box-shadow: none; }
.pn-nav a.is-activo i { color: var(--cbp-red); }
.pn-side__sitio { border-radius: 50px !important; }
.pn-top { border-radius: var(--pn-radio); box-shadow: none; border: 1px solid var(--pn-borde); }
.pn-sub { color: #1d1d1d; letter-spacing: .04em; font-weight: 600; }
.pn-cruz { width: 9px !important; height: 12px !important; flex-basis: 9px !important; }
.pn-avatar { background: #1d1d1d; }
.pn-bienvenida h1, .cbp-panel h1 { font-weight: 600; letter-spacing: -0.045em; }
.pn-bienvenida__fondo { display: none; }

.pn-tarjeta, .pn-modulo { border-radius: var(--pn-radio) !important; box-shadow: none !important; border: 1px solid var(--pn-borde) !important; }
.pn-modulo { clip-path: none !important; }
*:has(> .pn-modulo, > .pn-cifra) { filter: none !important; }
.pn-modulo:hover { transform: translateY(-4px); border-color: #1d1d1d !important; }
.pn-modulo__marca { background: #1d1d1d; opacity: .04; width: 150px; height: 150px; right: -30px; top: -30px; }
.pn-modulo__icono { border-radius: 50% !important; background: var(--pn-fondo) !important; color: #1d1d1d !important; }
.pn-modulo h2 { font-weight: 600; letter-spacing: -0.035em; }
.pn-modulo__cifras { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
.pn-modulo__cifras li { border-radius: var(--pn-radio); min-width: 0; }
.pn-modulo__cifras strong { font-weight: 600; font-size: clamp(18px, 1.6vw, 24px); letter-spacing: -0.04em; overflow: hidden; text-overflow: ellipsis; }

.pn-cifra { border-radius: var(--pn-radio) !important; clip-path: none !important; }
.pn-cifra strong { font-weight: 600; }
.pn-cifra--rojo { background: #1d1d1d !important; }
.pn-cifra::after { opacity: .05; }

.pn-btn { border-radius: 50px; background: #1d1d1d; border-color: #1d1d1d; font-weight: 600; box-shadow: none; }
.pn-btn:hover { background: var(--cbp-red); border-color: var(--cbp-red); transform: none; }
.pn-btn--borde { background: transparent; color: #1d1d1d; border-color: #1d1d1d; }
.pn-btn--borde:hover { background: #1d1d1d; color: #fff; border-color: #1d1d1d; }
.pn-pestanas a.is-activa { background: #1d1d1d !important; color: #fff !important; border-color: #1d1d1d !important; }
.pn-pestanas a { border-radius: 50px; }
.pn-campo input, .pn-campo select, .pn-campo textarea { border-radius: var(--pn-radio); }
.pn-dialogo { border-radius: 12px; }
.pn-reglas { border: 1px solid var(--pn-borde); border-radius: var(--pn-radio); padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 10px; }
.pn-reglas legend { float: none; width: auto; padding: 0 8px; margin: 0; font-size: 14px; font-weight: 600; color: #1d1d1d; }
.pn-reglas .pn-check span strong { color: #1d1d1d; }
.pn-lista-nav--fila a.is-activo, .pn-paginas a.is-activo, .pn-segmentado a.is-activo { background: #1d1d1d !important; border-color: #1d1d1d !important; color: #fff !important; }
.pn-paginas a:hover { background: #1d1d1d; border-color: #1d1d1d; }
/* Acceso: ancho máximo centrado (como el .container del sitio) para que no se separe en pantallas anchas */
.pn-acceso__barra, .pn-acceso__cuerpo, .pn-acceso__pie { width: 100%; max-width: 1240px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
.pn-acceso__cuerpo { grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: clamp(32px, 5vw, 72px); }
.pn-acceso__pie { border-top: 0; position: relative; }
.pn-acceso__pie::before { content: ""; position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%); border-top: 1px solid #dfdfdf; }
body.pn-acceso { min-height: calc(100vh / var(--pn-escala, 1)); }
.pn-acceso__pie::before { width: calc(100vw / var(--pn-escala, 1)); }
.pn-lista-nav a.is-activo { background: #1d1d1d !important; color: #fff !important; } .pn-lista-nav a.is-activo em { background: rgba(255,255,255,.18) !important; color: #fff !important; }

/* ---------- Fotos y videos: tarjetas parejas y compactas ---------- */
.pn-espacios { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; align-items: stretch; }
.pn-espacio { border-radius: 8px; }
.pn-espacio__vista { aspect-ratio: 4 / 3; height: auto; min-height: 0; overflow: hidden; flex: 0 0 auto; }
.pn-espacio__vista img, .pn-espacio__vista video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pn-espacio__vista img[src$=".png"], .pn-espacio__vista img[src$=".svg"] { object-fit: contain; padding: 14px; }
.pn-espacio__marca { z-index: 1; }
.pn-espacio__info { flex: 1; padding: 12px 14px 14px; gap: 4px; }
.pn-espacio__info strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-espacio__info small { font-size: 12px; line-height: 1.4; }
.pn-espacio__form { margin-top: auto; padding-top: 8px; flex-wrap: nowrap; }
.pn-espacio__subir { cursor: pointer; margin: 0; }
.pn-espacio__form:not(:has(input[type="url"])) [data-solo-yt] { display: none; }
.pn-espacio__form input[type="url"] { flex: 1 1 auto; }
.pn-espacio .pn-enlace { font-size: 12.5px; align-self: flex-start; }

/* ---------- Noticias del panel: tarjetas en 2–3 columnas ---------- */
.pn-noticias { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.pn-noticia { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; border-radius: 8px; align-items: stretch; }
.pn-noticia:hover { border-color: #1d1d1d; }
.pn-noticia__img { aspect-ratio: 16 / 9; border-radius: 0; width: 100%; }
.pn-noticia__cuerpo { flex: 1; padding: 14px 16px 4px; min-width: 0; }
.pn-noticia h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pn-noticia .pn-tabla__acciones { justify-content: flex-end; padding: 8px 12px 12px; margin-top: auto; border-top: 1px solid var(--pn-borde); }
@media (max-width: 767px) { .pn-noticia { grid-template-columns: none; } .pn-noticia .pn-tabla__acciones { grid-column: auto; } }

/* ---------- Solicitudes en línea ---------- */
.pn-solicitudes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.pn-solicitud { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 14px; border: 1px solid var(--pn-borde); border-radius: 8px; background: #fff; color: #585959; transition: border-color .2s ease, transform .2s ease; }
.pn-solicitud:hover { border-color: #1d1d1d; transform: translateY(-2px); color: #585959; }
.pn-solicitud.is-nueva { border-left: 3px solid var(--cbp-red); }
.pn-solicitud.is-archivada { opacity: .6; }
.pn-solicitud strong { color: #1d1d1d; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.pn-solicitud__tipo { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #585959; }
.pn-solicitud__tipo i { color: var(--cbp-red); margin-right: 4px; }
.pn-solicitud__quien { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-solicitud__pie { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--pn-borde); font-size: 12px; }
.pn-solicitud__pie time { margin-left: auto; }
.pn-solicitud-datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 0 24px; margin: 18px 0 0; border-top: 1px solid var(--pn-borde); }
.pn-solicitud-datos > div { padding: 12px 0; border-bottom: 1px solid var(--pn-borde); min-width: 0; }
.pn-solicitud-datos dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #585959; margin-bottom: 3px; }
.pn-solicitud-datos dd { margin: 0; color: #1d1d1d; font-size: 15px; word-wrap: break-word; }
.pn-solicitud-lista { margin: 0; padding-left: 18px; }
.pn-solicitud-lista .pn-solicitud-lista { padding-left: 14px; }
.pn-cifra { color: inherit; } a.pn-cifra:hover { border-color: #1d1d1d !important; }
.pn-cifra--rojo span { color: rgba(255,255,255,.75) !important; } .pn-cifra--rojo strong { color: #fff !important; }

/* Acceso: la tarjeta ocupa el alto de la columna del título y va en el rojo del tema (como la cabecera de la portada) */
.pn-acceso__cuerpo { align-items: stretch; }
.pn-acceso__intro { display: flex; flex-direction: column; justify-content: center; }
.pn-acceso__tarjeta {
  display: flex; flex-direction: column; justify-content: center;
  background: var(--cbp-red); color: rgba(255, 255, 255, .82); padding: 48px 42px 38px;
}
.pn-acceso__etiqueta { color: rgba(255, 255, 255, .75); }
.cbp-panel .pn-acceso__tarjeta h2 { color: #fff; }
.pn-acceso__campo input { border-bottom-color: rgba(255, 255, 255, .45); color: #fff; caret-color: #fff; }
.pn-acceso__campo input:focus { border-bottom-color: #fff; }
.pn-acceso__campo > span { color: rgba(255, 255, 255, .75); }
.pn-acceso__campo input:focus + span, .pn-acceso__campo input:not(:placeholder-shown) + span { color: #fff; }
.pn-acceso__campo input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px var(--cbp-red) inset; transition: background-color 9999s; }
.pn-acceso__ver { color: rgba(255, 255, 255, .8); }
.pn-acceso__btn { background: #fff; color: #1d1d1d; }
.pn-acceso__btn:hover { background: #1d1d1d; color: #fff; }
.pn-acceso__nota { color: rgba(255, 255, 255, .75); }
.pn-acceso__nota a { color: #fff; }
.pn-acceso__escudo { filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .3)); }
.pn-acceso .pn-flash { background: rgba(255, 255, 255, .95); }
@media (max-width: 991px) { .pn-acceso__tarjeta { justify-content: flex-start; } }
.pn-acceso__cuerpo { align-content: center; } .pn-acceso__intro { justify-content: flex-start; }
