/* ==========================================================================
   HEBE ACADEMIA · Panel de administración
   Estética coherente con la marca (verde #075B3B / dorado #F4D989 / Raleway)
   ========================================================================== */

:root {
    --d-verde: #075B3B;
    --d-verde-900: #033524;
    --d-verde-800: #054a31;
    --d-verde-600: #0a6e47;
    --d-verde-400: #2aa676;
    --d-verde-50: #eef8f3;
    --d-verde-100: #d7eee4;
    --d-dorado: #F4D989;
    --d-dorado-osc: #e6c25f;
    --d-fondo: #f3f6f4;
    --d-tarjeta: #ffffff;
    --d-tinta: #16241d;
    --d-texto: #51625a;
    --d-suave: #8b988f;
    --d-linea: #e7edea;
    --d-sidebar: 268px;
    --d-radio: 16px;
    --d-sombra: 0 8px 30px rgba(7,91,59,.08);
    --d-sombra-sm: 0 2px 10px rgba(7,91,59,.06);
    --d-trans: .28s cubic-bezier(.22,1,.36,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body.dash {
    font-family: 'Raleway', system-ui, 'Segoe UI', sans-serif;
    background: var(--d-fondo); color: var(--d-tinta); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--d-verde); color: var(--d-dorado); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c9d6cf; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--d-verde-400); }

/* ==========================================================================
   ESTRUCTURA
   ========================================================================== */
.dash-layout { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--d-sidebar); flex: 0 0 var(--d-sidebar);
    background: linear-gradient(185deg, #075B3B 0%, #043826 100%);
    color: rgba(255,255,255,.75); position: fixed; inset: 0 auto 0 0; z-index: 40;
    display: flex; flex-direction: column; transition: transform var(--d-trans);
}
.sidebar-logo { padding: 22px 24px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo img { height: 38px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 18px 14px; }
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(244,217,137,.3); }
.nav-titulo { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: rgba(244,217,137,.6); padding: 18px 14px 8px; font-weight: 700; }
.nav-item {
    display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 12px;
    color: rgba(255,255,255,.78); font-weight: 600; font-size: .94rem; margin-bottom: 3px;
    transition: var(--d-trans); position: relative;
}
.nav-item svg { width: 20px; height: 20px; flex: 0 0 auto; transition: var(--d-trans); }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item:hover svg { transform: scale(1.12); }
.nav-item.activo { background: var(--d-dorado); color: var(--d-verde-900); font-weight: 700; box-shadow: 0 8px 20px rgba(244,217,137,.25); }
.nav-item.activo svg { color: var(--d-verde-900); }
.nav-item .badge-nav { margin-left: auto; background: rgba(244,217,137,.2); color: var(--d-dorado); font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 100px; }
.nav-item.activo .badge-nav { background: var(--d-verde-900); color: var(--d-dorado); }
.sidebar-pie { padding: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-user { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.05); }
.sidebar-user .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--d-dorado); color: var(--d-verde-900); display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.sidebar-user .info { overflow: hidden; }
.sidebar-user .info b { color: #fff; font-size: .9rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .info span { font-size: .76rem; color: rgba(244,217,137,.8); }

/* ---------- Contenido principal ---------- */
.dash-main { flex: 1; margin-left: var(--d-sidebar); min-width: 0; display: flex; flex-direction: column; }

/* ---------- Topbar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--d-linea); padding: 14px 28px; display: flex; align-items: center; gap: 18px;
}
.topbar h1 { font-size: 1.3rem; color: var(--d-verde); font-weight: 800; letter-spacing: -.01em; }
.topbar .ruta-mini { font-size: .8rem; color: var(--d-suave); }
.topbar-acciones { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-btn { width: 42px; height: 42px; border-radius: 12px; background: var(--d-verde-50); color: var(--d-verde); display: grid; place-items: center; border: 0; cursor: pointer; transition: var(--d-trans); position: relative; }
.topbar-btn:hover { background: var(--d-verde); color: var(--d-dorado); }
.topbar-btn svg { width: 20px; height: 20px; }
.topbar-btn .punto-noti { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: #e0584b; border: 2px solid #fff; }
.menu-toggle-mb { display: none; }

/* ==========================================================================
   NOTIFICACIONES · Campanita del panel (nuevas inscripciones en vivo)
   ========================================================================== */
.noti-wrap { position: relative; }
.noti-wrap .punto-noti { animation: notiPulso 1.6s infinite; }
.noti-wrap.hay-nuevas .topbar-btn { animation: notiSacudir 6s ease-in-out infinite; }

@keyframes notiPulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(224,88,75,.55); } 70% { box-shadow: 0 0 0 8px rgba(224,88,75,0); } }
@keyframes notiSacudir { 0%, 92%, 100% { transform: rotate(0); } 93% { transform: rotate(-12deg); } 94% { transform: rotate(10deg); } 95% { transform: rotate(-8deg); } 96% { transform: rotate(6deg); } 97% { transform: rotate(0); } }

.noti-panel {
    position: absolute; top: calc(100% + 12px); right: 0; width: 360px; max-width: 88vw;
    background: #fff; border-radius: 16px; box-shadow: 0 20px 50px rgba(3,53,36,.25);
    border: 1px solid var(--d-linea); z-index: 200; opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: .22s ease; overflow: hidden;
}
.noti-panel.abierto { opacity: 1; visibility: visible; transform: translateY(0); }
.noti-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.noti-panel-head b { color: var(--d-verde); font-size: 1rem; }
.noti-contador { font-size: .74rem; font-weight: 800; background: #fdeceb; color: #c5392e; padding: 3px 10px; border-radius: 100px; }
.noti-contador.sin-nuevas { background: var(--d-verde-50); color: var(--d-verde); }
.noti-panel-sub { padding: 0 18px 10px; }
.noti-btn-sonido { display: inline-flex; align-items: center; gap: 6px; background: var(--d-verde-50); color: var(--d-verde); border: 0; padding: 6px 12px; border-radius: 100px; font-size: .76rem; font-weight: 700; cursor: pointer; }
.noti-btn-sonido:hover { background: var(--d-verde); color: #fff; }
.noti-btn-sonido.activado { background: var(--d-verde); color: #fff; pointer-events: none; }

.noti-lista { max-height: 320px; overflow-y: auto; border-top: 1px solid var(--d-linea); }
.noti-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--d-linea); transition: background .2s; position: relative; }
.noti-item:last-child { border-bottom: 0; }
.noti-item:hover { background: var(--d-verde-50); }
.noti-item.sin-leer::before { content: ''; position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 7px; height: 7px; border-radius: 50%; background: #e0584b; }
.noti-item.nueva-animada { animation: notiEntrar .5s ease; background: #fff5e0; }
@keyframes notiEntrar { from { opacity: 0; transform: translateX(14px); background:#ffe9b8; } to { opacity: 1; transform: translateX(0); } }
.noti-av { width: 38px; height: 38px; border-radius: 50%; background: var(--d-verde); color: var(--d-dorado); display: grid; place-items: center; font-weight: 800; font-size: .82rem; flex: 0 0 auto; }
.noti-info { min-width: 0; }
.noti-info b { display: block; color: var(--d-tinta); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.noti-info span { font-size: .78rem; color: var(--d-suave); }
.noti-vacio { padding: 30px 18px; text-align: center; color: var(--d-suave); font-size: .88rem; }
.noti-ver-todas { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 13px; font-size: .84rem; font-weight: 700; color: var(--d-verde); background: var(--d-verde-50); border-top: 1px solid var(--d-linea); }
.noti-ver-todas:hover { background: var(--d-verde-100); }

/* Toasts flotantes de aviso */
.noti-toasts { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; width: min(340px, 88vw); }
.noti-toast {
    background: linear-gradient(135deg, #075B3B, #043826); color: #fff; border-radius: 14px; padding: 14px 16px;
    box-shadow: 0 16px 40px rgba(3,53,36,.4); display: flex; gap: 12px; align-items: flex-start;
    border-left: 4px solid #F4D989; animation: toastEntrar .4s cubic-bezier(.22,1,.36,1); cursor: pointer;
}
.noti-toast.saliendo { animation: toastSalir .35s ease forwards; }
@keyframes toastEntrar { from { opacity: 0; transform: translateX(40px) scale(.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastSalir { to { opacity: 0; transform: translateX(40px) scale(.95); } }
.noti-toast .tico { width: 34px; height: 34px; border-radius: 50%; background: rgba(244,217,137,.18); color: #F4D989; display: grid; place-items: center; flex: 0 0 auto; }
.noti-toast .tico svg { width: 18px; height: 18px; }
.noti-toast .tbody b { display: block; font-size: .9rem; }
.noti-toast .tbody span { font-size: .8rem; color: rgba(255,255,255,.78); }
@media (max-width: 560px) { .noti-panel { right: -60px; } .noti-toasts { left: 14px; right: 14px; width: auto; top: 12px; } }

/* ---------- Área de contenido ---------- */
.dash-contenido { padding: 28px; flex: 1; }
.dash-contenido > .saludo { margin-bottom: 24px; }
.saludo h2 { font-size: 1.5rem; color: var(--d-verde); margin-bottom: 4px; }
.saludo p { color: var(--d-texto); }

/* ==========================================================================
   TARJETAS DE ESTADÍSTICA (KPIs)
   ========================================================================== */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.kpi {
    background: var(--d-tarjeta); border-radius: var(--d-radio); padding: 22px;
    box-shadow: var(--d-sombra-sm); border: 1px solid var(--d-linea); position: relative; overflow: hidden;
    transition: var(--d-trans);
}
.kpi:hover { transform: translateY(-4px); box-shadow: var(--d-sombra); }
.kpi::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--d-verde); }
.kpi.dorado::before { background: var(--d-dorado-osc); }
.kpi.rojo::before { background: #e0584b; }
.kpi.azul::before { background: #3b82c4; }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.kpi-icono { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--d-verde-50); color: var(--d-verde); }
.kpi.dorado .kpi-icono { background: #fbf2d8; color: var(--d-dorado-osc); }
.kpi.rojo .kpi-icono { background: #fdeceb; color: #e0584b; }
.kpi.azul .kpi-icono { background: #e8f1fa; color: #3b82c4; }
.kpi-icono svg { width: 25px; height: 25px; }
.kpi-tend { font-size: .78rem; font-weight: 700; padding: 4px 9px; border-radius: 100px; display: inline-flex; align-items: center; gap: 4px; }
.kpi-tend.sube { background: var(--d-verde-50); color: var(--d-verde); }
.kpi-tend.baja { background: #fdeceb; color: #e0584b; }
.kpi-valor { font-size: 2rem; font-weight: 900; color: var(--d-tinta); line-height: 1; letter-spacing: -.02em; }
.kpi-label { color: var(--d-suave); font-size: .88rem; font-weight: 600; margin-top: 6px; }

/* ==========================================================================
   TARJETAS / PANELES
   ========================================================================== */
.panel { background: var(--d-tarjeta); border-radius: var(--d-radio); border: 1px solid var(--d-linea); box-shadow: var(--d-sombra-sm); overflow: hidden; }
.panel-head { padding: 20px 24px; border-bottom: 1px solid var(--d-linea); display: flex; align-items: center; gap: 12px; }
.panel-head h3 { font-size: 1.1rem; color: var(--d-verde); font-weight: 800; }
.panel-head .sub { font-size: .82rem; color: var(--d-suave); }
.panel-head .relleno { flex: 1; }
.panel-body { padding: 24px; }
.panel-body.sin-pad { padding: 0; }

.grid-dash { display: grid; gap: 22px; }
.cols-2-1 { grid-template-columns: 2fr 1fr; }
.cols-1-1 { grid-template-columns: 1fr 1fr; }
.mb-24 { margin-bottom: 22px; }

/* ==========================================================================
   TABLAS
   ========================================================================== */
.tabla-wrap { overflow-x: auto; }
table.tabla { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.tabla thead th {
    text-align: left; padding: 14px 20px; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--d-suave); font-weight: 800; background: var(--d-verde-50); border-bottom: 1px solid var(--d-linea); white-space: nowrap;
}
table.tabla tbody td { padding: 15px 20px; border-bottom: 1px solid var(--d-linea); color: var(--d-texto); vertical-align: middle; }
table.tabla tbody tr { transition: background .2s; }
table.tabla tbody tr:hover { background: var(--d-verde-50); }
table.tabla tbody tr:last-child td { border-bottom: 0; }
.celda-principal { font-weight: 700; color: var(--d-tinta); }
.celda-usuario { display: flex; align-items: center; gap: 12px; }
.celda-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--d-verde); color: var(--d-dorado); display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: 0 0 auto; }
.celda-sub { font-size: .8rem; color: var(--d-suave); }

/* ==========================================================================
   BADGES / ESTADOS
   ========================================================================== */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 100px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--d-verde-50); color: #0a7c4f; }
.badge-pend { background: #fff5e0; color: #b88008; }
.badge-mora { background: #fdeceb; color: #c5392e; }
.badge-info { background: #e8f1fa; color: #2e6da4; }
.badge-neutro { background: #eef1ef; color: #5a6b62; }
.badge-violeta { background: #f1e9fb; color: #7c4bc0; }

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; font-weight: 700; font-size: .9rem; padding: 11px 20px; border-radius: 11px; border: 2px solid transparent; cursor: pointer; transition: var(--d-trans); white-space: nowrap; }
.btn svg { width: 17px; height: 17px; }
.btn-primario { background: var(--d-verde); color: #fff; }
.btn-primario:hover { background: var(--d-verde-800); transform: translateY(-2px); box-shadow: var(--d-sombra); }
.btn-dorado { background: var(--d-dorado); color: var(--d-verde-900); }
.btn-dorado:hover { background: var(--d-dorado-osc); transform: translateY(-2px); }
.btn-borde { background: #fff; border-color: var(--d-linea); color: var(--d-texto); }
.btn-borde:hover { border-color: var(--d-verde); color: var(--d-verde); }
.btn-peligro { background: #fdeceb; color: #c5392e; }
.btn-peligro:hover { background: #c5392e; color: #fff; }
/* Botón fantasma para usar sobre fondos verdes/oscuros */
.btn-ghost-claro { background: rgba(255,255,255,.08); border-color: rgba(244,217,137,.45); color: #F4D989; }
.btn-ghost-claro:hover { background: rgba(244,217,137,.18); border-color: #F4D989; color: #fff; transform: translateY(-2px); }
.btn-sm { padding: 7px 13px; font-size: .82rem; border-radius: 9px; }
.btn-icono { width: 36px; height: 36px; padding: 0; border-radius: 10px; }
.acciones-fila { display: inline-flex; gap: 6px; }
.btn-bloque { width: 100%; }

/* ==========================================================================
   FORMULARIOS
   ========================================================================== */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.form-grid .col-full { grid-column: 1 / -1; }
.campo { display: flex; flex-direction: column; }
.campo label { font-weight: 700; color: var(--d-verde); font-size: .88rem; margin-bottom: 7px; }
.campo label .req { color: #e0584b; }
.campo input, .campo select, .campo textarea {
    font-family: inherit; font-size: .95rem; color: var(--d-tinta); padding: 12px 14px;
    border: 2px solid var(--d-linea); border-radius: 11px; background: #fbfdfc; transition: var(--d-trans); width: 100%;
}
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--d-verde-400); background: #fff; box-shadow: 0 0 0 4px var(--d-verde-50); }
.campo textarea { resize: vertical; min-height: 100px; }
.campo .ayuda { font-size: .78rem; color: var(--d-suave); margin-top: 5px; }
.campo.tiene-error input, .campo.tiene-error select, .campo.tiene-error textarea { border-color: #e0584b; }
.campo .err { color: #c5392e; font-size: .8rem; margin-top: 5px; font-weight: 600; }
.form-acciones { display: flex; gap: 12px; justify-content: flex-end; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--d-linea); }

/* ==========================================================================
   BARRA DE FILTROS / BÚSQUEDA
   ========================================================================== */
.barra-filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.buscador { position: relative; flex: 1; min-width: 220px; }
.buscador svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--d-suave); }
.buscador input { width: 100%; padding: 11px 14px 11px 42px; border: 2px solid var(--d-linea); border-radius: 11px; font-family: inherit; font-size: .92rem; background: #fff; transition: var(--d-trans); }
.buscador input:focus { outline: none; border-color: var(--d-verde-400); box-shadow: 0 0 0 4px var(--d-verde-50); }
.filtro-select { padding: 11px 14px; border: 2px solid var(--d-linea); border-radius: 11px; font-family: inherit; font-size: .9rem; background: #fff; color: var(--d-texto); cursor: pointer; }

/* ==========================================================================
   CHOICES.JS · Live search para elegir alumno/docente en formularios
   (estilos propios del vendor en vendor/choices/choices.min.css, esto son
   solo los ajustes para que combine con la paleta del panel)
   ========================================================================== */
.choices { font-family: inherit; font-size: .95rem; margin-bottom: 0; }
.choices__inner {
    padding: 8px 7.5px 8px 12px; border: 2px solid var(--d-linea); border-radius: 11px;
    background: #fbfdfc; min-height: 46px; transition: var(--d-trans);
}
.choices.is-focused .choices__inner, .choices.is-open .choices__inner {
    border-color: var(--d-verde-400); background: #fff; box-shadow: 0 0 0 4px var(--d-verde-50);
}
.choices__list--dropdown, .choices__list[aria-expanded] {
    border-color: var(--d-linea); border-radius: 12px; box-shadow: var(--d-sombra); overflow: hidden;
}
.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list[aria-expanded] .choices__item--selectable.is-highlighted { background: var(--d-verde-50); color: var(--d-verde); }
.choices__list--dropdown .choices__input { margin-bottom: 0; background: #fff; }
.choices__list--single .choices__item { color: var(--d-tinta); }
.choices__placeholder { opacity: 1; color: var(--d-suave); }
/* La opción placeholder (value="") no debe listarse como resultado de búsqueda, solo mostrarse cerrada */
.choices__list--dropdown .choices__item[data-value=""] { display: none; }

/* ==========================================================================
   GRÁFICOS
   ========================================================================== */
.grafico-caja { position: relative; height: 300px; }
.grafico-caja.alto { height: 340px; }
.leyenda { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.leyenda-item { display: flex; align-items: center; gap: 7px; font-size: .85rem; color: var(--d-texto); font-weight: 600; }
.leyenda-item .punto { width: 11px; height: 11px; border-radius: 3px; }

/* Barras CSS (sin librería) */
.barras-css { display: flex; align-items: flex-end; gap: 14px; height: 220px; padding-top: 20px; }
.barra-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.barra-col .barra { width: 100%; max-width: 46px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--d-verde-400), var(--d-verde)); transition: height 1s cubic-bezier(.22,1,.36,1); position: relative; }
.barra-col .barra.dorada { background: linear-gradient(180deg, var(--d-dorado), var(--d-dorado-osc)); }
.barra-col .barra:hover::after { content: attr(data-valor); position: absolute; top: -26px; left: 50%; transform: translateX(-50%); background: var(--d-verde-900); color: #fff; font-size: .72rem; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.barra-col .etq { font-size: .76rem; color: var(--d-suave); font-weight: 700; }

/* Lista de progreso */
.progreso-item { margin-bottom: 18px; }
.progreso-item:last-child { margin-bottom: 0; }
.progreso-top { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: .88rem; }
.progreso-top b { color: var(--d-tinta); }
.progreso-top span { color: var(--d-suave); font-weight: 700; }
.progreso-barra { height: 9px; background: var(--d-verde-50); border-radius: 100px; overflow: hidden; }
.progreso-barra i { display: block; height: 100%; background: linear-gradient(90deg, var(--d-verde-400), var(--d-verde)); border-radius: 100px; transition: width 1.1s cubic-bezier(.22,1,.36,1); }
.progreso-barra i.dorado { background: linear-gradient(90deg, var(--d-dorado), var(--d-dorado-osc)); }

/* ==========================================================================
   LISTAS DE ACTIVIDAD / TIMELINE
   ========================================================================== */
.timeline { position: relative; }
.timeline-item { display: flex; gap: 14px; padding-bottom: 20px; position: relative; }
.timeline-item:not(:last-child)::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--d-linea); }
.timeline-icono { width: 36px; height: 36px; border-radius: 50%; background: var(--d-verde-50); color: var(--d-verde); display: grid; place-items: center; flex: 0 0 auto; z-index: 1; }
.timeline-icono svg { width: 17px; height: 17px; }
.timeline-cuerpo b { color: var(--d-tinta); font-size: .92rem; }
.timeline-cuerpo p { color: var(--d-texto); font-size: .88rem; }
.timeline-cuerpo time { font-size: .76rem; color: var(--d-suave); }

/* ==========================================================================
   ALERTA DE INGRESO · Novedades pendientes al iniciar sesión
   ========================================================================== */
.alerta-ingreso {
    display: flex; align-items: flex-start; gap: 16px; padding: 18px 20px; margin-bottom: 22px;
    background: linear-gradient(120deg, #075B3B 0%, #043826 100%); color: #fff; border-radius: 16px;
    box-shadow: 0 14px 34px rgba(3,53,36,.3); animation: aiEntrar .5s cubic-bezier(.22,1,.36,1);
    border: 1px solid rgba(244,217,137,.3);
}
@keyframes aiEntrar { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }
.ai-icono { font-size: 1.8rem; line-height: 1; flex: 0 0 auto; animation: notiSacudir 3s ease-in-out infinite; }
.ai-texto { flex: 1; min-width: 0; }
.ai-texto b { display: block; font-size: .98rem; margin-bottom: 10px; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ai-chip {
    display: inline-flex; align-items: center; gap: 6px; background: rgba(244,217,137,.16);
    border: 1px solid rgba(244,217,137,.4); color: #F4D989; font-weight: 700; font-size: .86rem;
    padding: 8px 16px; border-radius: 100px; transition: .2s;
}
.ai-chip:hover { background: #F4D989; color: #033524; transform: translateY(-2px); }
.ai-cerrar { background: rgba(255,255,255,.1); border: 0; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; flex: 0 0 auto; font-size: .9rem; }
.ai-cerrar:hover { background: rgba(255,255,255,.22); }
@media (max-width: 560px) { .alerta-ingreso { flex-wrap: wrap; } }

/* ==========================================================================
   ALERTAS / FLASH
   ========================================================================== */
.flash { padding: 14px 18px; border-radius: 12px; margin-bottom: 22px; display: flex; gap: 11px; align-items: center; font-weight: 600; animation: flashIn .4s ease; }
.flash svg { width: 21px; height: 21px; flex: 0 0 auto; }
.flash-ok { background: var(--d-verde-50); color: #0a7c4f; border: 1px solid var(--d-verde-100); }
.flash-error { background: #fdeceb; color: #c5392e; border: 1px solid #f6c9c4; }
.flash-info { background: #e8f1fa; color: #2e6da4; border: 1px solid #cfe2f4; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   ESTADO VACÍO
   ========================================================================== */
.vacio { text-align: center; padding: 60px 20px; color: var(--d-suave); }
.vacio svg { width: 64px; height: 64px; margin: 0 auto 16px; color: var(--d-verde-100); }
.vacio h4 { color: var(--d-verde); font-size: 1.1rem; margin-bottom: 6px; }

/* ==========================================================================
   PAGINACIÓN
   ========================================================================== */
.paginacion { display: flex; gap: 6px; justify-content: center; padding: 20px; flex-wrap: wrap; }
.paginacion a, .paginacion span { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; font-weight: 700; font-size: .88rem; border: 1px solid var(--d-linea); background: #fff; color: var(--d-texto); transition: var(--d-trans); }
.paginacion a:hover { border-color: var(--d-verde); color: var(--d-verde); }
.paginacion .activo { background: var(--d-verde); color: #fff; border-color: var(--d-verde); }
.paginacion .deshab { opacity: .45; pointer-events: none; }

/* ==========================================================================
   LOGIN
   ========================================================================== */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-aside {
    background:
        radial-gradient(600px 400px at 30% 20%, rgba(244,217,137,.22), transparent 60%),
        linear-gradient(160deg, #075B3B, #033524);
    color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden;
}
.login-aside .logo-grande { height: 60px; margin-bottom: 40px; width: max-content; }
.login-aside h2 { font-size: 2.4rem; color: #fff; margin-bottom: 16px; line-height: 1.15; }
.login-aside h2 b { color: var(--d-dorado); }
.login-aside p { color: rgba(255,255,255,.8); max-width: 420px; margin-bottom: 30px; }
.login-aside .bene-list { display: grid; gap: 14px; }
.login-aside .bene-list li { display: flex; gap: 12px; align-items: center; color: rgba(255,255,255,.9); }
.login-aside .bene-list .ic { width: 34px; height: 34px; border-radius: 10px; background: rgba(244,217,137,.16); color: var(--d-dorado); display: grid; place-items: center; flex: 0 0 auto; }
.login-aside .bene-list svg { width: 18px; height: 18px; }
.login-aside .deco-circ { position: absolute; border-radius: 50%; background: rgba(244,217,137,.08); }
.login-aside .deco-circ.c1 { width: 300px; height: 300px; bottom: -120px; right: -80px; }
.login-aside .deco-circ.c2 { width: 160px; height: 160px; top: -50px; left: -40px; background: rgba(255,255,255,.05); }

.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--d-fondo); }
.login-card { width: 100%; max-width: 410px; }
.login-card .logo-mb { display: none; }
.login-card h1 { font-size: 1.8rem; color: var(--d-verde); margin-bottom: 6px; }
.login-card .sub { color: var(--d-texto); margin-bottom: 30px; }
.login-demo { margin-top: 22px; padding: 14px 16px; background: var(--d-verde-50); border: 1px dashed var(--d-verde-100); border-radius: 12px; font-size: .82rem; color: var(--d-texto); }
.login-demo b { color: var(--d-verde); }
.recordar { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 24px; font-size: .88rem; }
.recordar label { display: flex; align-items: center; gap: 8px; color: var(--d-texto); cursor: pointer; }
.recordar a { color: var(--d-verde); font-weight: 700; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
.overlay-mb { display: none; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } .cols-2-1, .cols-1-1 { grid-template-columns: 1fr; } }
@media (max-width: 920px) { .login-page { grid-template-columns: 1fr; } .login-aside { display: none; } .login-card .logo-mb { display: block; height: 54px; margin: 0 auto 24px; width: max-content; } }
@media (max-width: 820px) {
    .sidebar { transform: translateX(-100%); box-shadow: 0 0 60px rgba(0,0,0,.4); }
    .sidebar.abierto { transform: translateX(0); }
    .dash-main { margin-left: 0; }
    .menu-toggle-mb { display: grid; }
    .overlay-mb { display: block; position: fixed; inset: 0; background: rgba(3,40,26,.5); z-index: 35; opacity: 0; visibility: hidden; transition: .3s; }
    .overlay-mb.activo { opacity: 1; visibility: visible; }
    .form-grid { grid-template-columns: 1fr; }
    .dash-contenido { padding: 18px; }
    .topbar { padding: 12px 18px; }
}
@media (max-width: 560px) { .kpis { grid-template-columns: 1fr; } .topbar h1 { font-size: 1.1rem; } .form-acciones { flex-direction: column; } .form-acciones .btn { width: 100%; } }
