/* ==========================================================
   PA-CEO  —  Global Design System
   Portal Académico del Colegio Enrique de Osso
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===================== DESIGN TOKENS ===================== */
:root {
  /* — Palette Oficial Colegio Enrique de Ossó — */
  --primary: #3E2C23; /* Café Institucional */
  --primary-light: #5A4237; /* Café Claro */
  --primary-dark: #2A1E17; /* Café Oscuro / Espresso */
  --primary-glow: rgba(62, 44, 35, 0.12);
  --accent: #3E8FD6; /* Celeste Institucional */
  --accent-light: #63A6E2; /* Celeste Claro */
  --accent-dark: #2A73B5; /* Celeste Oscuro */

  /* — Semantic Colors — */
  --success: #10B981;           /* Emerald 500 */
  --success-hover: #059669;
  --danger: #EF4444;            /* Red 500 */
  --danger-hover: #DC2626;
  --warning: #F59E0B;
  --info: #3E8FD6;              /* Celeste */

  /* — Gradients — */
  --gradient-primary: linear-gradient(135deg, #3E2C23 0%, #2A1E17 100%);
  --gradient-accent: linear-gradient(135deg, #3E8FD6 0%, #2A73B5 100%);
  --gradient-success: linear-gradient(135deg, var(--success) 0%, var(--success-hover) 100%);
  --gradient-danger: linear-gradient(135deg, var(--danger) 0%, var(--danger-hover) 100%);

  /* — Neutrals (Slate scale) — */
  --white: #FFFFFF;
  --slate-50: #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  /* — Glassmorphism System — */
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(99, 102, 241, 0.12);
  --glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.04);

  /* — Shadows — */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(99, 102, 241, 0.04);
  --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(99, 102, 241, 0.06);
  --shadow-xl: 0 20px 48px -8px rgba(15, 23, 42, 0.12), 0 8px 24px rgba(99, 102, 241, 0.08);

  /* — Typography — */
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* — Borders — */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* — Transitions — */
  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================== RESET & BASE ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--slate-700);
  background: radial-gradient(135deg, #F8FAFC 0%, #EEF2F6 100%);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, li {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

input, select, button, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ===================== HEADER ===================== */
header,
.header {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 1.25rem 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 10;
}

.header__content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header__content-imagen {
  width: 64px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

.header__title {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* ===================== NAV BAR ===================== */
nav,
.nav {
  margin: 0;
  padding: 0.75rem 2rem;
  background: var(--white);
  display: flex;
  align-items: center;
  min-height: 56px;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--slate-200);
  z-index: 9;
}

.nav__container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__button {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  cursor: pointer;
  outline: none;
  padding: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-600);
}

.nav__button:hover {
  background: var(--primary-glow);
  border-color: var(--primary-light);
  color: var(--primary);
  transform: translateX(-3px);
}

.nav__button-icon {
  width: 18px;
  height: 18px;
  color: currentColor;
}

.nav__title {
  color: var(--slate-800);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.nav__item {
  display: flex;
  align-items: center;
}

/* ================= PROFILE DROPDOWN ================= */
.nav__profile {
  position: relative;
  margin-left: auto;
  padding: 4px;
}

.nav__profile-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid var(--primary-light);
}

.nav__profile-img:hover {
  transform: scale(1.06);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.nav__profile-link {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
  width: 190px;
  z-index: 100;
  padding: 6px 0;
  overflow: hidden;
}

.nav__profile-link.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav__profile-link li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--slate-700);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.nav__profile-link li a .nav__profile-img {
  width: 22px;
  height: 22px;
  border: none;
}

.nav__profile-link li a:hover {
  background: var(--primary-glow);
  color: var(--primary);
  padding-left: 20px;
}

/* ==================== SEPARADOR ==================== */
.separador {
  background: var(--gradient-accent);
  height: 4px;
  width: 100%;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
  position: relative;
  z-index: 8;
}

/* ================ BACKGROUND WATERMARK ================ */
.background,
.background-Image,
.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(62, 143, 214, 0.08) 0%, rgba(62, 44, 35, 0.03) 70%, #F8FAFC 100%);
  opacity: 1;
  z-index: -2;
  pointer-events: none;
}

/* ================ LAYOUT CONTAINERS ================ */
.layout__container,
.layout__conteiner,
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  padding: 10px 0;
  align-items: start;
}

@media screen and (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

.layout__image img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--white);
  transition: all var(--transition-normal);
}

.layout__image img:hover {
  transform: scale(1.03) rotate(-1deg);
  box-shadow: var(--shadow-lg);
}

/* ============= SECTIONS (Frosted Cards) ============= */
.layout__section {
  padding: 36px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all var(--transition-normal);
  width: 100%;
  max-width: 800px;
  margin: 0 auto 20px auto;
}

.layout__section:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.2);
}

.section__title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--slate-900);
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

/* ============= NAVIGATION GRID CARDS ============= */
.section__items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 10px 0;
}

.section__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--slate-800);
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  position: relative;
  overflow: hidden;
}

.section__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--gradient-primary);
  transition: width var(--transition-fast);
}

.section__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.25);
}

.section__item:hover::before {
  width: 6px;
  background: var(--gradient-accent);
}

.section__item:active {
  transform: translateY(-1px);
}

.section__item-icon {
  width: 36px;
  height: 36px;
  filter: none;
  transition: transform var(--transition-normal);
  flex-shrink: 0;
}

.section__item:hover .section__item-icon {
  transform: scale(1.18) rotate(3deg);
}

/* ============= FORM GRID & CONTROLS ============= */
.form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 10px 0;
}

.form__grid--columna {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__label,
.form span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-600);
  font-family: var(--font-heading);
}

.form__control {
  width: 100%;
  height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-800);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.form__control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.form__control::placeholder {
  color: var(--slate-400);
}

.form__control:hover {
  border-color: var(--slate-300);
}

select.form__control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748B'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 40px;
}

/* ============= FORM BUTTONS ============= */
.form__button {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
  border-top: 1px solid var(--slate-200);
}

.form__button button {
  padding: 12px 28px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-heading);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: 0.2px;
}

.form__button button:active {
  transform: scale(0.97);
}

.form__button--green,
.form__button--purple,
.form__button--red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  color: var(--white) !important;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-heading);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: 0.2px;
  text-decoration: none;
}

.form__button--green:active,
.form__button--purple:active,
.form__button--red:active {
  transform: scale(0.97);
}

.form__button--green {
  background: var(--gradient-success);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.form__button--green:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  transform: translateY(-2px);
}

.form__button--purple {
  background: var(--gradient-primary);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

.form__button--purple:hover {
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
  transform: translateY(-2px);
}

.form__button--red {
  background: var(--gradient-danger);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.form__button--red:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
  transform: translateY(-2px);
}

/* ============= STEP NAVIGATION CONTAINER ============= */
.step-navigation {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--slate-200);
}


/* ========== FORM IMAGE & DOC ITEMS ========== */
.form__group-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.06));
}

.form__group-item {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 28px;
  border-radius: var(--radius-xl);
  background: var(--gradient-primary);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2);
  text-decoration: none;
  border: none;
}

.form__group-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

/* ==================== MODAL ==================== */
.modal__container {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
}

.modal {
  background: var(--white);
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  width: 480px;
  max-width: 95vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  margin: auto;
  animation: modalSlideIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--slate-400);
  transition: color var(--transition-fast);
  line-height: 1;
}

.modal__close:hover {
  color: var(--danger);
}

.modal h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--slate-900);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  letter-spacing: -0.3px;
}

/* ============== RESPONSIVE TABLE CONTAINER ============== */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  background: var(--white);
}

/* ============== GRADES TABLE ============== */
.form__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.form__table-campo,
.form__table-campo--header {
  padding: 14px 16px;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--slate-100);
  border-right: 1px solid var(--slate-100);
}

.form__table-campo:last-child,
.form__table-campo--header:last-child {
  border-right: none;
}

.form__table-campo--header {
  background: var(--gradient-primary);
  color: var(--white);
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: none;
}

.form__table-fila,
.form__table--fila {
  transition: background var(--transition-fast);
}

.form__table-fila:hover,
.form__table--fila:hover {
  background: var(--slate-50);
}

.form__table-fila:last-child td,
.form__table--fila:last-child td {
  border-bottom: none;
}

.form__input {
  width: 58px;
  height: 32px;
  text-align: center;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.form__input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ============== FORM VALIDATION ============== */
.form__control.is-invalid,
.was-validated .form__control:invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.form__control.is-valid,
.was-validated .form__control:valid {
  border-color: var(--success) !important;
}

.form-group small,
.form__group small {
  display: none;
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 4px;
  font-weight: 500;
}

.was-validated .form__control:invalid ~ small,
.was-validated small {
  display: block;
  color: var(--danger);
}

/* ======= FAQ / AYUDA (Help Page) ======= */
.faq-container {
  max-width: 850px;
  margin: 30px auto;
  padding: 0 20px;
}

.faq-item {
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  transition: all var(--transition-fast);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.2);
}

.faq-question {
  background: var(--white);
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--slate-800);
  font-size: 1rem;
  border: none;
  width: 100%;
  text-align: left;
  transition: all var(--transition-fast);
}

.faq-question:hover {
  background: var(--slate-50);
  color: var(--primary);
}

.faq-answer {
  background: var(--slate-50);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  padding: 0 24px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--slate-600);
}

.faq-answer.open {
  padding: 18px 24px;
  border-top: 1px solid var(--slate-150);
}

.faq-search {
  width: 100%;
  max-width: 500px;
  margin: 20px auto;
  display: block;
  padding: 14px 20px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.faq-search:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* ================== PREMIUM TOAST SYSTEM ================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: 100%;
}

.toast {
  background: var(--white);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--warning); }
.toast--info { border-left-color: var(--info); }

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.toast-message {
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--slate-800);
}

.tabs-nav,
.tabs-header {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--slate-200);
  margin-bottom: 24px;
  padding-bottom: 2px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 20px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--slate-500);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 20px;
}

.tab-pane,
.step-content {
  display: none;
}

.tab-pane.active,
.step-content.active {
  display: block;
  animation: fadeIn 0.25s ease;
}


@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ================== SHIMMER & STATUS BADGES ================== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
  border: 1px solid transparent;
}

.status-pill--success {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.2);
}

.status-pill--danger {
  background: rgba(239, 68, 68, 0.1);
  color: #B91C1C;
  border-color: rgba(239, 68, 68, 0.2);
}

.status-pill--warning {
  background: rgba(245, 158, 11, 0.1);
  color: #B45309;
  border-color: rgba(245, 158, 11, 0.2);
}

/* ==================== RESPONSIVE CANVAS ==================== */
canvas {
  max-width: 100% !important;
  height: auto !important;
}

/* ==================== GLOBAL RESPONSIVE OVERRIDES ==================== */
@media screen and (max-width: 1024px) {
  /* Hide Decorative Layout Images on all tablet and mobile screens */
  .layout__image {
    display: none !important;
  }

  /* Collapse Layout Grid */
  .layout {
    grid-template-columns: 1fr !important;
    gap: 20px;
    padding: 10px 0;
  }

  /* Prevent grid items from stretching the viewport width */
  .layout__section,
  .steps-wrapper,
  .layout__content {
    min-width: 0 !important;
  }

  /* Reclaim Layout Container Padding */
  .layout__container,
  .layout__conteiner,
  .container {
    padding: 20px 15px;
  }

  /* Card Sections Padding */
  .layout__section {
    padding: 28px 24px;
    border-radius: var(--radius-md);
  }

  /* Tab Navigation Wrap */
  .tabs-nav,
  .tabs-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .tab-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
    flex-grow: 1;
    text-align: center;
  }
}

@media screen and (max-width: 600px) {
  /* Navigation Bar Compact Layout for Mobile Phones */
  nav,
  .nav {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    min-height: 48px;
  }
  
  .nav__title {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px; /* Stronger limit for narrow mobile screens */
  }
  
  .nav__profile {
    padding: 2px;
  }
  
  .nav__profile-img {
    width: 30px;
    height: 30px;
  }

  /* Simple Header mobile sizing */
  header,
  .header {
    padding: 0.6rem 0.75rem;
  }
  
  .header__title {
    font-size: 1rem;
  }
  
  .header__content-imagen {
    width: 40px;
  }

  /* Compact padding for card sections on mobile */
  .layout__container,
  .layout__conteiner,
  .container {
    padding: 12px 8px;
  }
  
  .layout__section {
    padding: 16px 12px;
  }
  
  .section__title {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  /* Form Grids Stacking */
  .form__grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  .form__control {
    height: 40px;
    padding: 8px 12px;
    font-size: 0.88rem;
  }

  /* Form Buttons and actions on mobile */
  .form__button {
    justify-content: center;
    gap: 8px;
    padding-top: 14px;
    margin-top: 12px;
  }
  
  .form__button button {
    flex: 1 1 auto;
    min-width: 110px;
    padding: 10px 16px;
    font-size: 0.88rem;
  }

  /* Modals sizing */
  .modal {
    padding: 16px 12px;
    width: 96%;
  }
  
  .modal h2 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  /* Grid card lists */
  .section__items {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  .section__item {
    padding: 14px 16px;
    font-size: 0.92rem;
  }
  
  .section__item-icon {
    width: 24px;
    height: 24px;
  }

  /* Toasts */
  .toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }
  
  .toast {
    padding: 10px 14px;
    font-size: 0.82rem;
  }
}

/* ==========================================================
   MOTION & POLISH UTILITIES  (v1.0.8)
   Capa reutilizable por todas las páginas: animaciones de
   entrada escalonadas, skeletons de carga y badges de estado.
   Todo respeta prefers-reduced-motion.
   ========================================================== */

/* ---------- Entrance animation (fade + rise) ---------- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-rise { animation: riseIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* Aplica entrada escalonada a los hijos directos (hasta 12) */
.stagger > * { animation: riseIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.stagger > *:nth-child(1)  { animation-delay: 0.03s; }
.stagger > *:nth-child(2)  { animation-delay: 0.08s; }
.stagger > *:nth-child(3)  { animation-delay: 0.13s; }
.stagger > *:nth-child(4)  { animation-delay: 0.18s; }
.stagger > *:nth-child(5)  { animation-delay: 0.23s; }
.stagger > *:nth-child(6)  { animation-delay: 0.28s; }
.stagger > *:nth-child(7)  { animation-delay: 0.33s; }
.stagger > *:nth-child(8)  { animation-delay: 0.38s; }
.stagger > *:nth-child(9)  { animation-delay: 0.43s; }
.stagger > *:nth-child(10) { animation-delay: 0.48s; }
.stagger > *:nth-child(11) { animation-delay: 0.53s; }
.stagger > *:nth-child(12) { animation-delay: 0.58s; }

/* ---------- Skeleton loaders ---------- */
@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  background: linear-gradient(100deg, var(--slate-100) 30%, var(--slate-200) 50%, var(--slate-100) 70%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-md);
}
.skeleton--text   { height: 0.85rem; margin: 8px 0; border-radius: 6px; }
.skeleton--title  { height: 1.4rem; width: 45%; margin: 10px 0 16px; border-radius: 8px; }
.skeleton--line   { height: 44px; margin: 10px 0; }
.skeleton--card   { height: 120px; }
.skeleton--circle { width: 64px; height: 64px; border-radius: 50%; }

/* ---------- Status badges (extiende .status-pill) ---------- */
.status-pill--info {
  background: rgba(59, 130, 246, 0.1);
  color: #1D4ED8;
  border-color: rgba(59, 130, 246, 0.2);
}
.status-pill--neutral {
  background: var(--slate-100);
  color: var(--slate-600);
  border-color: var(--slate-200);
}
.status-pill--primary {
  background: var(--primary-glow);
  color: var(--primary-dark);
  border-color: rgba(99, 102, 241, 0.2);
}
.status-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: none;
}

/* ---------- Card lift (para tarjetas que no son .section__item) ---------- */
.lift { transition: transform var(--transition-normal), box-shadow var(--transition-normal); }
.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ---------- Respeto a movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .animate-rise,
  .stagger > *,
  .skeleton { animation: none !important; }
  .lift { transition: none; }
}

