  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --azul-oscuro: #0a1a6e;
    --azul-medio:  #1338be;
    --azul-card:   #1a3fd4;
    --azul-claro:  #3a5ef7;
    --verde:       #22d17a;
    --amarillo:    #fbbf24;
    --rojo:        #ef4444;
    --naranja:     #f97316;
    --cyan:        #06b6d4;
    --texto-claro: #fff;
    --texto-opaco: rgba(255,255,255,0.6);
    --sidebar-w:   56px;
    --nav-h:       60px;
  }

 body{
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    background: #F5F4F7;
    color: var(--texto-claro);
    background-size: 20px 20px;
    display: flex;
    min-height: 100vh;
}

/* ══ BODY LAYOUT ══ */
  .body-layout {
    flex: 1;
    display: flex;
    gap: 0;
    min-height: 0;
  }

  .body-layout::before {
    content: ' ';
    background-image: url('../img/bg-dashboard.png');
    height: 380px;
    width: calc(100% - var(--sidebar-w) - 7px);
    position: absolute;
    margin-top: -60px;
    background-size: 100% auto;
    background-repeat: no-repeat;
    border-radius: 0 0 8px 8px;
  }

  /* ══ CONTENIDO CENTRAL ══ */
  .content {
    flex: 1;
    padding: 20px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    z-index: 10;
  }

/* ══ ALERTAS TOP ══ */
  .alertas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }

  .alerta {
    padding: 12px 16px;
    border-radius: 10px;
    flex: 1;
    min-width: 200px;
    max-width: 280px;
  }

  .alerta--roja { background: var(--rojo); }
  .alerta--amarilla { background: var(--amarillo); color: #1a1a1a; }

  .alerta__tipo {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 2px;
  }

  .alerta__titulo {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
  }

  .alerta__sub {
    font-size: 0.72rem;
    opacity: 0.75;
  }

  /* ══ GRID DE CURSOS ══ */
  .cursos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  /* ══ CARD DE CURSO ══ */
  .curso-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .curso-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
  }

  .curso-card__titulo {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
  }

  .curso-card__calificacion {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--verde);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .curso-card__profesor {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .curso-card__avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--azul-claro);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
  }

  .curso-card__prof-info {
    display: flex;
    flex-direction: column;
  }

  .curso-card__prof-label {
    font-size: 0.62rem;
    color: #888;
  }

  .curso-card__prof-nombre {
    font-size: 0.72rem;
    font-weight: 600;
    color: #333;
  }

  .curso-card__btn {
    margin-left: auto;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    text-decoration: none;
  }

  .curso-card__btn:hover { background: #333; }

  .curso-card__avance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: #555;
  }

/* Calendario */
  .calendario {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    color: #1a1a1a;
  }

  .calendario__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
  }

  .calendario__nav {
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
  }

  .calendario__nav:hover { background: #f0f0f0; }

  .calendario__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
  }

  .cal-head {
    font-size: 0.6rem;
    font-weight: 700;
    color: #888;
    padding: 2px 0;
  }

  .cal-day {
    font-size: 0.7rem;
    color: #333;
    padding: 4px 2px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cal-day:hover { background: #e5e7eb; }

  .cal-day--today {
    background: var(--azul-claro);
    color: #fff;
    font-weight: 700;
  }

  .cal-day--vacio { color: transparent; pointer-events: none; }

  /* Chips de estadísticas */
  .chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }

  .chip {
    background: var(--azul-claro);
    color: #fff;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.68rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
  }

  .chip__label {
    font-weight: 400;
    opacity: 0.85;
    font-size: 0.6rem;
  }

  .chip__val { font-size: 0.75rem; }

/* Mascota */
  .mascota {
    position: fixed;
    bottom: 5px;
    right: 40px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    z-index: 20;
    cursor: pointer;
  }

  .mascota__burbuja {
    position: relative;
    max-width: 220px;
    margin-top: 18px;
    left: 30px;
    padding: 12px 16px;
    border-radius: 18px;
    background: #fff;
    color: #163168;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(8, 30, 84, 0.18);
    animation: flex-burbuja 2.2s ease-in-out infinite;
  }

  .mascota__burbuja::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -10px;
    width: 18px;
    height: 18px;
    background: #fff;
    transform: translateY(-50%) rotate(45deg);
    border-radius: 4px;
  }

  .mascota .texto-normal {
  display: inline; /* O block, dependiendo de tu diseño */
}

.mascota .texto-hover {
  display: none;
}

.mascota:hover .texto-normal {
  display: none;
}

/* Mostramos el texto de hover */
.mascota:hover .texto-hover {
  display: inline;
}

  @keyframes flex-burbuja {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-8px);
    }
  }

  .mascota__figura {
    width: auto;
    height: 200px;
    position: relative;
  }

  /* ══ WRAPPER principal ══ */
  .main-wrapper {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 8px;
    margin-right: 8px;
  }


  /* ══ NAVBAR ══ */
  .navbar {
    height: var(--nav-h);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .navbar__logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    white-space: nowrap;
  }

  .navbar__logo span { color: var(--azul-claro); }

  .navbar__section {
    font-size: 0.82rem;
    color: var(--texto-opaco);
    padding-left: 20px;
    border-left: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
  }

  .navbar__right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .navbar__user {
    font-size: 0.85rem;
    color: #fff;
    white-space: nowrap;
  }

  .navbar__avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--verde);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem;
    flex-shrink: 0;
  }

  .navbar__btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    position: relative;
    transition: background 0.2s;
    text-decoration: none;
  }

  .navbar__btn:hover { background: rgba(255,255,255,0.22); }

  .navbar__btn_normal {
    border-radius: 20px;
    background: var(--amarillo);
    border: none;
    color: #000;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 14px;
    position: relative;
    transition: background 0.2s;
    text-decoration: none;
  }
  .navbar__btn_normal:hover { background: var(--azul-claro); }
  .navbar__badge {
    position: absolute;
    top: -3px; right: -3px;
    width: 16px; height: 16px;
    background: var(--verde);
    border-radius: 50%;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    color: #000;
  }

.panel-login {
    width: 380px;
    min-width: 260px;
    flex-shrink: 0;
    background: transparent linear-gradient(180deg, #1046C0 0%, #0B1026 100%) 0% 0% no-repeat padding-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 36px;
    gap: 20px;
    position: relative;
    z-index: 2;
  }

  .panel-login .errors {
    list-style: none;
    padding: 0;
    font-size: 0.9rem;
    text-align: center;
    color: #fff200;
  }

  .panel-login .logo {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
  }

  .panel-login .logo span {
    color: #2979ff;
  }

  .panel-login .form-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .panel-login .form-group input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    font-size: 0.85rem;
    padding: 6px 10px;
    outline: none;
    transition: border-color 0.2s;
  }

  .panel-login.form-group input::placeholder { color: rgba(255,255,255,0.5); }
  .panel-login .form-group input:focus { border-bottom-color: #fff; }

  .panel-login .btn-login {
    width: 100%;
    padding: 10px;
    background: #1a56e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
  }

  .panel-login .btn-login:hover { background: #1442c2; }

  .panel-login .forgot {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    text-align: center;
    width: 100%;
    display: block;
    margin-top: 12px;
  }

  .panel-login .forgot:hover { color: #fff; }

  .panel-login .logos-row {
    margin-top: 12px;
    text-align: center;
    width: 100%;
  }

  .panel-login .logo-circle {
    width: 80px;
    height: 80px;
    display: inline-block;
    margin: 0 8px;
  }

  .panel-login .tagline {
    font-size: 0.9rem;
    margin-top: 14px;
    font-weight: bold;
    width: 100%;
    text-align: center;
  }
  
  .panel-carousel {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
  }

  .panel-carousel .slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px 64px;
    opacity: 0;
    transition: opacity 0.7s ease;
    background-size: cover;
    background-position: center;
  }

  .panel-carousel .slide.active { opacity: 1; }

  .progreso {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
  }

  .progreso__barra {
    height: 100%;
    border-radius: 3px;
    background: var(--verde);
  }

  .slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0,10,60,0.55) 0%, rgba(0,20,90,0.25) 100%);
  }

  .panel-carousel .slide-content {
    position: relative;
    z-index: 1;
    max-width: 560px;
  }

  .panel-carousel .slide-logo {
    font-size: 5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
    font-style: italic;
    letter-spacing: -2px;
  }

  .panel-carousel .slide-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: 10px 0 6px;
  }

  .panel-carousel .slide-subtitle {
    font-size: 1rem;
    color: #ffcc00;
    margin-bottom: 14px;
  }

  .panel-carousel .slide-date {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
  }

  .panel-carousel .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
    user-select: none;
  }

  .panel-carousel .arrow:hover { background: rgba(255,255,255,0.3); }
  .panel-carousel .arrow-prev { left: 18px; }
  .panel-carousel .arrow-next { right: 18px; }

  .dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
  }

  .panel-carousel .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
  }

  .panel-carousel .dot.active {
    background: #ffcc00;
    transform: scale(1.3);
  }

      /* ══ SIDEBAR ══ */
  .sidebar {
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 24px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,0.08);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
  }

  .sidebar__icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: var(--texto-opaco);
    font-size: 20px;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    color: #acc2fd;
  }

  .sidebar__icon:hover, .sidebar__icon--active {
    color: #000;
  }

  /* ══ SIDEBAR DERECHO ══ */
  .sidebar-right {
    width: 220px;
    flex-shrink: 0;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 10;
  }

  /* Panel de estadísticas */
  .stats-panel {
    background: #0f1f5c;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .stat-row__ico {
    font-size: 1.3rem;
    flex-shrink: 0;
  }

  .stat-row__label {
    font-size: 0.72rem;
    color: var(--texto-opaco);
  }

  .stat-row__val {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
  }

  /* ── RESPONSIVE ── */
  @media (max-width: 1400px) {
    
  }

  @media (max-width: 1200px) {
    
  }

  @media (max-width: 992px) {
    .sidebar-right { display: none; }
    .cursos-grid { grid-template-columns: repeat(2, 1fr); }
    .navbar__section { display: none; }
    .navbar__user { display: none; }
  }

  @media (max-width: 768px) {

    body { flex-direction: column; }

    .panel-login {
      width: 100%;
      min-height: auto;
      padding: 32px 24px;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      gap: 16px;
    }

    .panel-login .logo { margin-bottom: 0; font-size: 1.6rem; }

    .panel-login.form-group {
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      gap: 12px;
    }

    .panel-login.form-group input { width: auto; flex: 1; min-width: 140px; }

    .panel-login.btn-login { width: auto; padding: 10px 28px; }

    .panel-login .logos-row, .panel-login .tagline, .panel-login .forgot { display: none; }

    .panel-carousel { min-height: 60vh; }
    .panel-carousel .slide { padding: 32px 28px; }
    .panel-carousel .slide-title { font-size: 1.4rem; }
    .panel-carousel .slide-logo-ciu { font-size: 3rem; }

    .sidebar { display: none; }
    .main-wrapper { margin-left: 0; }
    .cursos-grid { grid-template-columns: 1fr; }
    .alertas { flex-direction: column; }
    .alerta { max-width: 100%; }
    .content { padding: 14px; }
    

    .body-layout::before {
      width: 100%;
      margin-top: -68px;
    }

  }

  @media (max-width: 576px) {
    .mascota { right: 12px; }
    .mascota__burbuja { display: none; }

    .mascota__figura {
      width: auto;
      height: 140px;
    }

    
    .panel-login { padding: 20px 16px; }
    .panel-login .logo { font-size: 1.4rem; }

    .panel-carousel .slide { padding: 20px 16px; }
    .panel-carousel .slide-title { font-size: 1.1rem; }
    .panel-carousel .slide-logo-ciu { font-size: 2rem; }
    .panel-carousel .slide-logo-ciu .year { font-size: 1.2rem; }
    .panel-carousel .slide-content { max-width: 100%; }

    .navbar { padding: 0 12px; gap: 10px; }
    .navbar__logo { font-size: 1.1rem; }
    .navbar__btn { display: none; }
    .navbar__btn:first-of-type { display: flex; }
    .content { padding: 10px; gap: 12px; }
    .curso-card { padding: 12px; }
    
  }

