/* Portal UNDelta — piel institucional
   Paleta cerrada al CLAUDE.md. Todo color sale de los tokens de :root. */

:root {
  /* Paleta */
  --p-teal-700: #0E3A44;
  --p-teal-600: #14606E;
  --p-mint-400: #3FD8B6;
  --p-green-500: #57C57A;
  --p-navy-900: #0E2A3A;
  --p-ink-900:  #1B2B36;
  --p-ink-600:  #4A5A66;
  --p-ink-300:  #A6B2BC;
  --p-line:     #E2E8EC;
  --p-bg:       #FFFFFF;
  --p-bg-soft:  #F5F8FA;

  /* Geometría */
  --p-radius:    14px;
  --p-pill:      999px;
  --p-shadow-1:  0 1px 2px rgba(14, 42, 58, 0.06), 0 2px 8px rgba(14, 42, 58, 0.04);
  --p-shadow-2:  0 2px 4px rgba(14, 42, 58, 0.08), 0 8px 24px rgba(14, 42, 58, 0.06);

  /* Tipografía */
  --p-font-display: 'Poppins', system-ui, sans-serif;
  --p-font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--p-bg);
  color: var(--p-ink-900);
  font-family: var(--p-font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--p-font-display);
  color: var(--p-navy-900);
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
}
h1 { font-weight: 700; font-size: 2.25rem; line-height: 1.15; }
h2 { font-weight: 600; font-size: 1.5rem;  line-height: 1.2; }
h3 { font-weight: 600; font-size: 1.15rem; }
p  { margin: 0 0 1em; }
small { color: var(--p-ink-600); }

a { color: var(--p-teal-600); text-decoration: none; }
a:hover { color: var(--p-teal-700); text-decoration: underline; }

/* ============================================================
   Header / navbar
   ============================================================ */
.p-header {
  background: linear-gradient(135deg, var(--p-teal-600) 0%, var(--p-teal-700) 100%);
  color: #fff;
  box-shadow: var(--p-shadow-1);
  position: relative;
}
.p-header::after {
  /* línea turquesa sutil en el borde inferior: la firma del header */
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--p-mint-400) 50%, transparent 100%);
  opacity: .8;
}

.p-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.p-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #fff;
  font-family: var(--p-font-display);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.p-brand:hover { color: #fff; text-decoration: none; }

/* La sigla "UN" no va en negrita — sólo "Delta". */
.p-brand__sigla { font-weight: 400; }
.p-brand__resto { font-weight: 700; }

.p-brand__mark {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--p-mint-400), var(--p-teal-600) 75%);
  box-shadow: 0 0 0 2px rgba(63, 216, 182, .25), 0 0 12px rgba(63, 216, 182, .35);
  flex-shrink: 0;
}
.p-brand__sub {
  color: rgba(255,255,255,.7);
  font-weight: 500;
  font-size: .8rem;
  margin-left: .35rem;
  letter-spacing: .02em;
}

.p-nav__right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.p-nav__user {
  color: rgba(255,255,255,.6);
  font-size: .92rem;
  font-weight: 500;
}
.p-nav__logout { margin: 0; }

/* Links con subrayado animado — la firma de la nav */
.p-link {
  position: relative;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.p-link--nav {
  color: rgba(255,255,255,.92);
  font-weight: 500;
  font-size: .95rem;
  padding: .35rem 0;
}
.p-link--nav::after {
  content: '';
  position: absolute;
  left: 0; right: auto;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--p-mint-400);
  transition: width .25s ease;
}
.p-link--nav:hover { color: #fff; text-decoration: none; }
.p-link--nav:hover::after,
.p-link--nav:focus-visible::after { width: 100%; }

/* ============================================================
   Main + hero
   ============================================================ */
.p-main { min-height: calc(100vh - 220px); }

.p-hero {
  padding: 4.5rem 1.25rem 3rem;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(63, 216, 182, .08), transparent 70%),
    var(--p-bg);
}
.p-hero__eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-family: var(--p-font-display);
  font-weight: 600;
  font-size: .75rem;
  color: var(--p-teal-600);
  background: rgba(63, 216, 182, .12);
  border: 1px solid rgba(63, 216, 182, .35);
  border-radius: var(--p-pill);
  padding: .3rem .8rem;
  margin-bottom: 1.1rem;
}
.p-hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  margin-bottom: .5em;
}
.p-hero p {
  max-width: 620px;
  margin: 0 auto 1.5rem;
  color: var(--p-ink-600);
  font-size: 1.05rem;
}

.p-section { padding: 2.5rem 1.25rem; max-width: 1200px; margin: 0 auto; }
.p-section h2 { margin-bottom: .35em; }
.p-section p.lead { color: var(--p-ink-600); max-width: 720px; }

/* ============================================================
   Botones (píldora)
   ============================================================ */
.p-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.4rem;
  border-radius: var(--p-pill);
  font-family: var(--p-font-display);
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.p-btn:active { transform: translateY(1px); }
.p-btn:focus-visible { outline: 3px solid rgba(63, 216, 182, .5); outline-offset: 2px; }

.p-btn--primary {
  background: var(--p-green-500);
  color: #0A1F12;
  box-shadow: 0 1px 2px rgba(20, 96, 110, .15), 0 4px 12px rgba(87, 197, 122, .25);
}
.p-btn--primary:hover { background: #4FBE6E; color: #0A1F12; text-decoration: none; }

.p-btn--ghost {
  background: transparent;
  color: var(--p-teal-600);
  border-color: var(--p-line);
}
.p-btn--ghost:hover { background: var(--p-bg-soft); color: var(--p-teal-700); text-decoration: none; }

.p-btn--block { width: 100%; }

/* ============================================================
   Tarjetas
   ============================================================ */
.p-card {
  background: var(--p-bg);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  padding: 1.5rem;
  box-shadow: var(--p-shadow-1);
}
.p-card--dark {
  background: var(--p-navy-900);
  color: #E6EEF3;
  border-color: transparent;
}
.p-card--dark h2, .p-card--dark h3 { color: #fff; }
.p-card--dark a { color: var(--p-mint-400); }

/* Login card — la firma: borde lateral turquesa en vez de shadow genérico */
.p-login {
  max-width: 420px;
  margin: 3rem auto;
  padding: 0;
  background: var(--p-bg);
  border: 1px solid var(--p-line);
  border-left: 4px solid var(--p-mint-400);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow-2);
  overflow: hidden;
}
.p-login__head {
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--p-line);
  background: linear-gradient(180deg, rgba(63, 216, 182, .06), transparent);
}
.p-login__head h1 { font-size: 1.4rem; margin: 0; }
.p-login__head p { color: var(--p-ink-600); font-size: .92rem; margin: .25rem 0 0; }
.p-login__body { padding: 1.5rem 1.75rem 1.75rem; }
.p-login__foot {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: .9rem;
  color: var(--p-ink-600);
}
.p-login__foot a { color: var(--p-teal-600); font-weight: 500; }

/* ============================================================
   Formularios
   ============================================================ */
.p-field { margin-bottom: 1.1rem; }
.p-field label {
  display: block;
  font-family: var(--p-font-display);
  font-weight: 500;
  font-size: .85rem;
  color: var(--p-navy-900);
  margin-bottom: .35rem;
}
.p-field input {
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  font: inherit;
  color: var(--p-ink-900);
  background: var(--p-bg);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.p-field input:focus {
  outline: 0;
  border-color: var(--p-mint-400);
  box-shadow: 0 0 0 3px rgba(63, 216, 182, .25);
}
.p-field .error { display: block; color: #B23A3A; margin-top: .3rem; font-size: .85rem; }

/* Campo de mail con sufijo fijo de dominio. Contenedor propio para no
   pelear con .input-group de Bootstrap (que usa flex-wrap:wrap y empuja
   el sufijo a la línea de abajo cuando el input es ancho). */
.p-mail-field {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
}
.p-mail-field > input {
  /* Pisar lo que .form-control pone: display:block y width:100% */
  display: block;
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.p-mail-field > .p-mail-field__suffix {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: .65rem .85rem;
  background: #EEF1F4;
  color: var(--p-ink-600);
  border: 1px solid var(--p-line);
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  font: inherit;
  white-space: nowrap;
}
.p-mail-field:focus-within > input,
.p-mail-field:focus-within > .p-mail-field__suffix {
  border-color: var(--p-mint-400);
}
.p-mail-field:focus-within > input {
  box-shadow: 0 0 0 3px rgba(63, 216, 182, .25);
  z-index: 2;
  position: relative;
}

.p-alert {
  padding: .75rem 1rem;
  border-radius: 10px;
  background: #FBEEEE;
  color: #842A2A;
  border: 1px solid #F1C9C9;
  margin-bottom: 1rem;
  font-size: .9rem;
}
.p-alert p { margin: 0; }

/* ============================================================
   Footer
   ============================================================ */
.p-footer {
  background: var(--p-navy-900);
  color: rgba(255,255,255,.75);
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: .88rem;
}

/* ============================================================
   Utilidades
   ============================================================ */
.p-stack > * + * { margin-top: .8rem; }
.p-center { text-align: center; }

/* ============================================================
   Vista Material: lista agrupada por categoría
   ============================================================ */
.p-material__cat + .p-material__cat {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--p-line);
}
.p-material__cat h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--p-navy-900);
  position: relative;
  padding-left: .9rem;
}
.p-material__cat h2::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 1.1em;
  background: var(--p-mint-400);
  border-radius: 2px;
}

.p-material__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.p-material__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--p-bg);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.p-material__item:hover {
  border-color: var(--p-mint-400);
  box-shadow: var(--p-shadow-1);
}
.p-material__body { flex: 1; min-width: 0; }
.p-material__body h3 {
  font-size: 1rem;
  margin: 0 0 .15rem;
  line-height: 1.3;
}
.p-material__body p {
  margin: 0 0 .35rem;
  color: var(--p-ink-600);
  font-size: .88rem;
}
.p-material__meta {
  color: var(--p-ink-600);
  font-size: .78rem;
}

.p-btn--sm { padding: .5rem 1.1rem; font-size: .85rem; }

.p-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--p-bg-soft);
  border: 1px dashed var(--p-line);
  border-radius: var(--p-radius);
  color: var(--p-ink-600);
}
.p-empty p { margin: 0; }

/* ============================================================
   Home: hero compacto, grid, cards de contenido
   ============================================================ */
.p-hero--compact { padding: 2.5rem 1.25rem 1.5rem; }
.p-hero--compact h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .35em; }
.p-hero--compact p { font-size: 1rem; max-width: 640px; margin: 0 auto; }

.p-section { padding: 2rem 1.25rem; max-width: 1200px; margin: 0 auto; }
.p-section--flush { padding: 0; max-width: none; }
.p-section--top-gap { padding-top: 1.75rem; }
.p-section__head { margin-bottom: 1.25rem; }
.p-section__head h2 { margin-bottom: .15em; }
.p-section__head .lead { color: var(--p-ink-600); font-size: .95rem; margin: 0; }

/* Grid responsive de 3 cols (desktop) → 2 (tablet) → 1 (mobile) */
.p-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* Card base para contenido */
.p-card__body { padding: 1.1rem 1.25rem 1.25rem; }
.p-card__meta {
  color: var(--p-ink-600);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-family: var(--p-font-display);
  font-weight: 500;
}
.p-card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--p-bg-soft);
}
.p-card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.p-card h3 {
  font-size: 1.05rem;
  margin: .35rem 0 .4rem;
  line-height: 1.3;
}
.p-card p {
  color: var(--p-ink-600);
  font-size: .92rem;
  margin: 0;
  line-height: 1.5;
}

/* Novedad: card normal, imagen arriba si tiene */
.p-card--novedad { padding: 0; overflow: hidden; }
.p-card--novedad .p-card__body { padding: 1rem 1.25rem 1.25rem; }
.p-card--novedad h3 a { color: var(--p-navy-900); text-decoration: none; }
.p-card--novedad h3 a:hover { color: var(--p-teal-700); text-decoration: underline; }
.p-card__more {
  display: inline-block;
  margin-top: .65rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--p-teal-600);
}
.p-card__more:hover { color: var(--p-teal-700); text-decoration: underline; }

/* Novedad: página de detalle del artículo */
.p-novedad-wrap { max-width: 820px; }
.p-novedad__back { display: inline-block; margin-bottom: 1rem; }
.p-novedad { padding: 0; overflow: hidden; }
.p-novedad__hero {
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--p-bg-soft);
}
.p-novedad__hero img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.p-novedad__head { padding: 1.5rem 1.75rem 1rem; }
.p-novedad__head h1 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: .25rem 0 .35rem;
  line-height: 1.2;
  color: var(--p-navy-900);
}
.p-novedad__by {
  margin: 0;
  color: var(--p-ink-600);
  font-size: .88rem;
}
.p-novedad__body {
  padding: 0 1.75rem 1.75rem;
  color: var(--p-ink-900);
  font-size: 1.02rem;
  line-height: 1.65;
}
.p-novedad__body p { margin: 0 0 1em; }
.p-novedad__body p:last-child { margin-bottom: 0; }

/* Evento: card con fecha destacada a la izquierda */
.p-card--evento {
  display: flex;
  align-items: stretch;
  height: 100%;
  padding: 0;
  overflow: hidden;
}
.p-evento__date {
  flex: 0 0 80px;
  background: linear-gradient(180deg, var(--p-teal-600), var(--p-teal-700));
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: .75rem .5rem;
}
.p-evento__day {
  font-family: var(--p-font-display);
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1;
}
.p-evento__month {
  font-family: var(--p-font-display);
  font-weight: 500;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: .25rem;
  opacity: .9;
}
.p-card--evento .p-card__body { flex: 1; }

/* Carrusel: override de Bootstrap para matchear la piel */
.p-carousel {
  border-radius: var(--p-radius);
  overflow: hidden;
  box-shadow: var(--p-shadow-2);
}
.p-carousel__img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  display: block;
  background: var(--p-bg-soft);
}
.p-carousel__link { display: block; }
.p-carousel__cap {
  left: 50%;
  right: auto;
  bottom: 1.5rem;
  transform: translateX(-50%);
  width: min(calc(100% - 3rem), 720px);
  text-align: center;
  background: rgba(14, 42, 58, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(63, 216, 182, .18);
  border-radius: var(--p-radius);
  padding: 1rem 1.5rem 1.1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .28);
}
.p-carousel__cap h2 {
  color: #fff;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 600;
  margin: 0 0 .15em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.p-carousel__cap p {
  color: rgba(255, 255, 255, .88);
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  font-size: .92rem;
  line-height: 1.4;
}
.p-carousel .carousel-indicators {
  margin-bottom: .5rem;
}
.p-carousel .carousel-indicators [data-bs-target] {
  background-color: var(--p-mint-400);
  width: 26px; height: 3px;
  border: 0;
  border-radius: 2px;
  opacity: .55;
}
.p-carousel .carousel-indicators .active { opacity: 1; }
.p-carousel .carousel-control-prev-icon,
.p-carousel .carousel-control-next-icon {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
}

/* ============================================================
   Ticketera
   ============================================================ */
.p-tickets__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
}
.p-tickets__head-actions {
  display: flex;
  gap: .65rem;
  align-items: center;
  flex-wrap: wrap;
}
.p-tickets__filters {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: end;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--p-bg-soft);
  border-radius: var(--p-radius);
}
.p-field--inline { margin-bottom: 0; }
.p-field--inline label { margin-bottom: .25rem; display: block; font-size: .85rem; }
.p-field--inline select { min-width: 160px; }

.p-ticket__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .65rem; }
.p-ticket__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--p-bg);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow-1);
}
.p-ticket__main { flex: 1; min-width: 0; }
.p-ticket__head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .25rem; }
.p-ticket__id {
  font-family: var(--p-font-display);
  font-weight: 600;
  color: var(--p-navy-900);
  text-decoration: none;
  font-size: 1.05rem;
}
.p-ticket__id:hover { color: var(--p-teal-600); }
.p-ticket__desc {
  color: var(--p-ink-900);
  margin: .15rem 0 .35rem;
  font-size: .95rem;
}
.p-ticket__meta { color: var(--p-ink-600); font-size: .82rem; }

/* Badges */
.p-badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: var(--p-pill);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.4;
  white-space: nowrap;
}
.p-badge--estado-abi  { background: #DCEFE3; color: #1B5E2C; }
.p-badge--estado-pro  { background: #D6F1E7; color: #156852; }
.p-badge--estado-cie  { background: #E2E8EC; color: #4A5A66; }
.p-badge--estado-der  { background: #FDE9D6; color: #8A4A12; }
.p-badge--prio-a      { background: #FBDADA; color: #8A1F1F; }
.p-badge--prio-m      { background: #FFF1CF; color: #7A5A0E; }
.p-badge--prio-b      { background: #DCEFE3; color: #1B5E2C; }

/* Form de abrir */
.p-ticket__form {
  max-width: 640px;
  background: var(--p-bg);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--p-shadow-1);
}
.p-ticket__form select,
.p-ticket__form input,
.p-ticket__form textarea {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--p-ink-900);
  background: var(--p-bg);
}
.p-ticket__form select:focus,
.p-ticket__form input:focus,
.p-ticket__form textarea:focus {
  outline: 3px solid rgba(63, 216, 182, .35);
  border-color: var(--p-mint-400);
}
.p-ticket__form-actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}
.p-field__hint {
  color: var(--p-ink-300);
  font-weight: 400;
  font-size: .85rem;
  margin-left: .25rem;
}
.p-field__error {
  display: block;
  color: #B23A3A;
  font-size: .85rem;
  margin-top: .3rem;
}

/* Detalle */
.p-ticket-detalle__head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.p-ticket-detalle__back {
  display: inline-block;
  color: var(--p-ink-600);
  text-decoration: none;
  font-size: .85rem;
  margin-bottom: .35rem;
}
.p-ticket-detalle__back:hover { color: var(--p-teal-600); }
.p-ticket-detalle__badges { display: flex; gap: .5rem; flex-wrap: wrap; }
.p-ticket-detalle__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.p-card--soft {
  background: var(--p-bg-soft);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--p-shadow-1);
}
.p-card--soft h3 {
  font-size: .9rem;
  font-family: var(--p-font-body);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--p-ink-600);
  margin: 1rem 0 .5rem;
  font-weight: 600;
}
.p-ticket-detalle__h2 {
  font-size: 1.1rem;
  margin: 0 0 .85rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--p-line);
}
.p-ticket-detalle__dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .35rem 1rem;
  margin: 0;
  font-size: .92rem;
}
.p-ticket-detalle__dl dt {
  color: var(--p-ink-600);
  font-weight: 500;
}
.p-ticket-detalle__dl dd { margin: 0; color: var(--p-ink-900); }
.p-ticket-detalle__desc { white-space: pre-wrap; margin: 0; }
.p-ticket-detalle__muted { color: var(--p-ink-300); }
.p-ticket-detalle__update { margin-top: 0; }
.p-ticket-detalle__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.p-ticket-detalle__update select,
.p-ticket-detalle__update input,
.p-ticket-detalle__update textarea {
  width: 100%;
  padding: .5rem .65rem;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--p-ink-900);
  background: var(--p-bg);
}
.p-ticket-detalle__update textarea { resize: vertical; min-height: 70px; }

/* ============================================================
   Messages
   ============================================================ */
.p-messages {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.p-message {
  padding: .75rem 1rem;
  border-radius: 10px;
  font-size: .92rem;
  border: 1px solid var(--p-line);
  background: var(--p-bg-soft);
  color: var(--p-ink-900);
}
.p-message--success { background: #DCEFE3; border-color: #B7DEC2; color: #1B5E2C; }
.p-message--error   { background: #FBDADA; border-color: #F0B7B7; color: #8A1F1F; }
.p-message--warning { background: #FFF1CF; border-color: #EFD78B; color: #7A5A0E; }

/* ============================================================
   Accesos rápidos (home)
   ============================================================ */
.p-quick {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
}
.p-quick__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.p-quick__card {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--p-bg);
  border: 1px solid var(--p-line);
  border-left: 4px solid var(--p-mint-400);
  border-radius: var(--p-radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--p-shadow-1);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.p-quick__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--p-shadow-2);
  border-left-color: var(--p-teal-600);
  text-decoration: none;
  color: inherit;
}
.p-quick__icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  align-self: center;
  color: var(--p-mint-400);
  display: flex;
  align-items: center;
  justify-content: center;
}
.p-quick__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
.p-quick__body { flex: 1; min-width: 0; }
.p-quick__body h2 {
  font-size: 1.15rem;
  margin: 0 0 .35rem;
  color: var(--p-navy-900);
}
.p-quick__lead {
  font-size: .95rem;
  color: var(--p-ink-900);
  margin: 0 0 .35rem;
}
.p-quick__lead strong {
  font-family: var(--p-font-display);
  font-size: 1.5rem;
  color: var(--p-teal-700);
  font-weight: 700;
  margin-right: .25rem;
}
.p-quick__sub { color: var(--p-ink-600); font-size: .85rem; margin-left: .35rem; }
.p-quick__desc {
  font-size: .88rem;
  color: var(--p-ink-600);
  margin: 0 0 .65rem;
}
.p-quick__cta {
  display: inline-block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--p-teal-600);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .p-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .p-nav { padding: .85rem 1rem; gap: .8rem; }
  .p-brand__sub { display: none; }
  .p-nav__user { display: none; }  /* sólo en >= tablet mostramos el nombre */
  .p-hero { padding: 3rem 1rem 2rem; }
  .p-hero--compact { padding: 1.75rem 1rem 1.25rem; }
  .p-login { margin: 1.5rem 1rem; }
  .p-grid { grid-template-columns: 1fr; }
  .p-carousel__cap { padding: .85rem 1.1rem .95rem; bottom: 1rem; width: min(calc(100% - 2rem), 720px); }
  .p-carousel__img { aspect-ratio: 16 / 10; }
  .p-ticket-detalle__grid { grid-template-columns: 1fr; }
  .p-ticket-detalle__row { grid-template-columns: 1fr; }
  .p-ticket-detalle__dl { grid-template-columns: 1fr; gap: 0 .5rem; }
  .p-ticket-detalle__dl dt { margin-top: .5rem; }
  .p-quick__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Calendario + lista de eventos de la home */
.p-eventos-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 768px) {
  .p-eventos-layout { grid-template-columns: 1fr; }
}

.p-cal {
  border: 1px solid var(--p-line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--p-bg);
}
.p-cal__header {
  background: var(--p-teal-600);
  color: #fff;
  text-align: center;
  padding: .75rem 1rem;
  font-family: var(--p-font-display);
  letter-spacing: .02em;
}
.p-cal__dow,
.p-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: .5rem;
}
.p-cal__dow {
  color: var(--p-ink-300);
  font-size: .7rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .03em;
  text-align: center;
  padding-bottom: 0;
}
.p-cal__grid { padding-top: 0; }

.p-cal__day {
  text-align: center;
  padding: .4rem 0;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1;
  min-height: 1.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.p-cal__day--vacio { visibility: hidden; }
.p-cal__day--hoy {
  background: var(--p-navy-900);
  color: #fff;
  font-weight: 700;
}
.p-cal__day--evento {
  background: var(--p-mint-400);
  color: var(--p-navy-900);
  font-weight: 700;
}
.p-cal__day--hoy.p-cal__day--evento {
  background: var(--p-green-500);
  color: #fff;
}

.p-eventos-lista {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
