/* ===========
   1. VARIABLES
   =========== */

:root {
    --color-primary: #0057B8;
    --color-primary-dark: #003A78;
    --color-primary-light: #4b8dff;

    --color-danger: #cc3e4f;
    --color-success: #2d9d4d;
    --color-warning: #b78322;

    --color-text: #ffffff;
    --color-muted: rgba(227,231,255,0.66);

    --panel-bg: rgba(7, 12, 34, 0.94);
    --page-bg: radial-gradient(circle at top left, #19315f 0, #020824 40%, #010414 100%);

    --card-bg: #ffffff;
    --card-dark: rgba(9,16,50,0.92);
}

/* ===========
   2. RESET
   =========== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--page-bg);
    color: var(--color-text);
}


/* ===========
   3. LAYOUT
   =========== */

.dashboard-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 24px;
}

.dashboard-shell {
    width: 100%;
    max-width: 1180px;
    margin: auto;
    background: var(--panel-bg);
    border-radius: 22px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dashboard-main {
    padding: 18px 26px 26px;

    background: linear-gradient(160deg, rgba(9,15,47,0.96), rgba(4,8,28,0.98));
    flex: 1;
}



.form-card {
    width: 100%;
    max-width: 680px;  /* ancho más cómodo */
    margin: 0 auto;
    background: rgba(9, 16, 50, 0.92);
    border-radius: 18px;
    padding: 26px 26px 22px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}





/* ===========
   4. HEADER
   =========== */

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 26px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mini {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.brand-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-title {
    display: flex;
    flex-direction: column;
}

.header-title span:first-child {
    font-size: 14px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(233, 238, 255, 0.68);
}

.header-title span:last-child {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}
/* ============================
   HEADER DE SECCIÓN (page-header)
   ============================ */

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 16px;
            margin-bottom: 20px;
			margin-top: 20px;
        }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0057B8, #00a4ff);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .14em;
}

.btn-primary:hover {
    filter: brightness(1.06);
}

/* Título grande "Noticias", "Equipo de trabajo", etc. */

        .page-title {
            margin: 0;
            font-size: 22px;
            font-weight: 600;
            color: #ffffff;
        }

        .page-subtitle {
            margin: 4px 0 0;
            font-size: 13px;
            color: rgba(203, 213, 225, 0.9);
            max-width: 520px;
        }

/* RESPONSIVE: header vertical en móviles */
@media (max-width: 720px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}


.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    color: #f3f4ff;
}

.user-role {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--color-muted);
}

.btn-logout {
    border: none;
    background: rgba(255, 107, 107, 0.16);
    border-radius: 999px;   /* aquí sí está bien que sea pill */
    padding: 6px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #ff9a9a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-logout:hover {
    background: rgba(255, 107, 107, 0.18);
}



/* === BLOQUE USUARIO – LAYOUT MOBILE === */
@media (max-width: 600px) {

    .header-right {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .user-chip {
        width: 100%;
        max-width: 360px;
        background: rgba(7, 12, 34, 0.9);
        border-radius: 16px;
        border: 1px solid rgba(148,163,184,0.25);
        padding: 14px 16px;
        display: flex;
        flex-direction: row !important;   /* 👈 forzamos fila */
        flex-wrap: wrap;                  /* permite que algo baje */
        align-items: center;
        gap: 10px;
    }

    /* Avatar queda a la izquierda */
    .user-avatar {
        flex: 0 0 auto;
    }

    /* Nombre + rol a la derecha del avatar */
    .user-info {
        flex: 1 1 auto;
        line-height: 1.2;
    }

    /* Botón abajo, a todo el ancho */
    .btn-logout {
        flex: 0 0 100%;                /* ocupa toda la fila */
        margin-top: 10px;
        display: flex;
        justify-content: center;
        padding: 10px 0;
        border-radius: 999px;
    }
}




/* ===========
   BUTTONS
   =========== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .14em;
    transition: .18s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    border: none;
}

.btn-primary:hover {
    filter: brightness(1.06);
}

.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: #d2d7ff;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.16);
}


/* ===========
   CARDS
   =========== */

.news-wrapper {
    background: #f3f4f8;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
	
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.news-card {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 10px 26px rgba(11, 15, 35, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.news-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    color: #25253a;
    margin-bottom: 10px;
}

.news-excerpt {
    font-size: 13px;
    line-height: 1.6;
    color: #7b8096;
    margin-bottom: 12px;
}

.news-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: auto;
}

.btn-link {
    border: none;
    background: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .16em;
    cursor: pointer;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

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

.btn-delete {
    color: var(--color-danger);
}









@media (max-width: 768px) {
    .dashboard-page {
        padding: 12px;
    }
    .dashboard-main {
        padding: 16px;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 520px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
/* ============================
   LOGIN PAGE
   ============================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--page-bg);
}

/* CONTENEDOR PRINCIPAL */
.login-card {
    width: 100%;
    max-width: 980px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    overflow: hidden;
}

/* COLUMNA VISUAL (IZQUIERDA) */
.login-visual {
    position: relative;
    background: radial-gradient(circle at top left, #1f4ba8 0, #032d7a 40%, #041336 100%);
    color: #fff;
    padding: 32px 32px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-visual .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.login-visual .hero-text {
    margin-top: 40px;
    max-width: 280px;
}

.login-visual h1 {
    font-size: 26px;
    line-height: 1.25;
    margin: 0 0 10px;
}

.login-visual p {
    margin: 0;
    font-size: 13px;
    color: rgba(235, 239, 255, 0.85);
}

.login-visual .hero-player {
    position: absolute;
    right: -40px;
    bottom: -10px;
    height: 105%;
    max-height: 480px;
    pointer-events: none;
    user-select: none;
}

.login-visual .bottom-text {
    margin-top: 24px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: rgba(255,255,255,0.7);
}

/* COLUMNA FORMULARIO (DERECHA) */
.login-form-wrapper {
    background: #f5f6fa;
    padding: 40px 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-logo {
    display: block;
    margin: 0 auto 18px;
    max-height: 70px;
}

.login-title {
    text-align: center;
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: 500;
    color: #222437;
}

.login-subtitle {
    text-align: center;
    margin-bottom: 30px;
    font-size: 12px;
    color: #8c8c9a;
}

/* FORM */
.login-form-wrapper form {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #3b3d4f;
}

/* Inputs de login */
.login-form-wrapper input[type="text"],
.login-form-wrapper input[type="password"] {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #d3ddff;
    padding: 11px 12px;
    font-size: 13px;
    background: #e9f1ff;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.login-form-wrapper input[type="text"]:focus,
.login-form-wrapper input[type="password"]:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(0, 87, 184, 0.18);
    background: #f4f7ff;
}



/* ALERTAS */
.alert {
    width: 100%;
    display: block;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 0 0 14px 0;
    font-size: 13px;
}

.alert-danger {
    background: #ffe5e8;
    color: #8f1b2f;
    border: 1px solid #f5bcc5;
}

/* FOOTER DEL LOGIN */
.login-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 11px;
    color: #8c8c9a;
}

/* RESPONSIVE LOGIN */
@media (max-width: 860px) {
    .login-card {
        max-width: 520px;
        grid-template-columns: minmax(0, 1fr);
    }
    .login-visual {
        display: none;
    }
    .login-form-wrapper {
        padding: 32px 24px 30px;
    }
}
    .form-card {
        border-radius: 12px;
        padding: 18px;
        max-width: 100%;
    }
@media (max-width: 480px) {
    .login-card {
        border-radius: 14px;
    }
}
/* ============================
   PANEL PRINCIPAL (panel.php)
   ============================ */

/* Tarjeta de bienvenida */
.welcome-card {
    background: radial-gradient(circle at top left, #1c2a63 0, #0e173b 38%, #05091f 100%);
    border-radius: 18px;
    padding: 22px 22px 20px;
    border: 1px solid rgba(118,145,255,0.3);
    box-shadow: 0 20px 36px rgba(0,0,0,0.55);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.welcome-title {
    font-size: 24px;
    color: #f5f7ff;
    margin: 0 0 6px;
    font-weight: 600;
}

.welcome-sub {
    font-size: 13px;
    color: rgba(221, 229, 255, 0.8);
    margin: 0 0 10px;
}

.welcome-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .16em;
    background: rgba(0, 0, 0, 0.35);
    color: rgba(210, 220, 255, 0.85);
    border: 1px solid rgba(137, 162, 255, 0.42);
    margin-bottom: 4px;
}

.welcome-cta {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: rgba(178, 190, 255, 0.9);
    margin-top: 8px;
}

.welcome-highlight {
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle at center, rgba(0,164,255,0.5), transparent 70%);
    opacity: 0.9;
    pointer-events: none;
}

/* Textos de sección */
.section-title {
    font-size: 13px;
    color: rgba(224, 230, 255, 0.86);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.section-subtitle {
    font-size: 12px;
    color: rgba(148, 159, 204, 0.9);
    margin: 0 0 18px;
}

/* Grid de tarjetas de acción */
.grid-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

.action-card {
    position: relative;
    background: rgba(9, 16, 50, 0.92);
    border-radius: 14px;
    padding: 16px 15px 15px;
    border: 1px solid rgba(73, 96, 170, 0.55);
    box-shadow: 0 13px 30px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    overflow: hidden;
}

.action-card:hover {
    transform: translateY(-3px);
    background: radial-gradient(circle at top left, #172553 0, #070d2b 55%);
    border-color: rgba(112, 160, 255, 0.9);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

.action-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(0, 87, 184, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 8px;
}

.action-title {
    font-size: 14px;
    font-weight: 500;
    color: #f4f6ff;
    margin-bottom: 4px;
}

.action-desc {
    font-size: 12px;
    color: rgba(183, 193, 232, 0.9);
    margin-bottom: 10px;
}

.action-meta {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .13em;
    color: rgba(142, 159, 223, 0.95);
}

.action-highlight {
    position: absolute;
    right: -18px;
    bottom: -18px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at center, rgba(0,165,255,0.5), transparent 65%);
    opacity: 0.55;
    pointer-events: none;
}

/* Footer del panel */
.dashboard-footer {
    padding: 10px 26px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 11px;
    color: rgba(182,190,222,0.6);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-right {
    text-transform: uppercase;
    letter-spacing: .16em;
}
/* ============================
   ADMIN - Noticias (Cards)
   ============================ */

.news-wrapper {
    background: #f3f4f8;
    border-radius: 18px;
    padding: 22px 22px 20px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.news-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(11, 15, 35, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}

.news-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.news-body {
    padding: 18px 18px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    font-size: 11px;
    color: #777c9a;
    margin-bottom: 8px;
}

.news-title {
    font-size: 25px;
    font-weight: 600;
    color: #25253a;
    margin-bottom: 10px;
}
.news-title1 {
    font-size: 16px;
    font-weight: 600;
    color: #25253a;
    margin-bottom: 10px;
}
.news-excerpt {
    font-size: 13px;
    line-height: 1.6;
    color: #7b8096;
    margin-bottom: 12px;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.news-status {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .16em;
}

.status-publicado {
    color: #2d9d4d;
}

.status-borrador {
    color: #b78322;
}

.news-actions {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-link {
    border: none;
    background: none;
    padding: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .16em;
    cursor: pointer;
    text-decoration: none;
}

.btn-edit {
    color: #0057B8;
}

.btn-delete {
    color: #cc3e4f;
}

.btn-view {
    color: #7a7f99;
}

.btn-link:hover {
    text-decoration: underline;
}


.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: #d2d7ff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .14em;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.16);
}
        .badge-section {
            display: inline-flex;
            align-items: center;
            padding: 2px 10px;
            border-radius: 999px;
            background: rgba(37, 99, 235, 0.15);
            border: 1px solid rgba(96, 165, 250, 0.7);
            font-size: 11px;
            color: #c7ddff;
            margin-bottom: 6px;
        }
				
		/* CONTENEDOR DE TABLA */
.table-box {
    background: transparent;
    padding-top: 20px;
    display: flex;
    justify-content: center;
}

/* TABLA */
.table-modern {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0px 8px 25px rgba(0,0,0,0.12);
}

/* HEADERS */
.table-modern thead th {
    background: #f7f9fc;
    color: #333;
    font-weight: 600;
    padding: 14px 18px;
    border-bottom: 1px solid #e8edf3;
    text-align: left;
}

/* FILAS */
.table-modern tbody td {
    color: #444;
    padding: 14px 18px;
    border-bottom: 1px solid #eef2f6;
    transition: background 0.2s ease;
}

/* HOVER */
.table-modern tbody tr:hover td {
    background: #fafafa;
}

/* QUITAR BORDE ÚLTIMA FILA */
.table-modern tbody tr:last-child td {
    border-bottom: none;
}


/* RESPONSIVE */
@media(max-width:900px){
    .table-modern {
        width:100%;
        font-size: 13px;
    }
}


        @media (max-width: 768px) {
            .dashboard-page {
                padding: 12px;
            }

            .dashboard-main {
                padding: 16px 16px 20px;
            }

            .page-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }
        }

        @media (max-width: 520px) {
            .dashboard-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }
        }
		

        .card{
            max-width:520px;
            background:#0f1b2c;
            margin:auto;
            padding:25px 26px 26px;
            border-radius:16px;
            box-shadow:0 18px 45px rgba(0,0,0,0.55);
        }

        h1{
            font-size:22px;
            margin-top:0;
            margin-bottom:18px;
        }

        label{
            display:block;
            margin-bottom:4px;
            font-size:13px;
            color:#cbd5e1;
        }

        input[type="text"],
        input[type="file"]{
            width:100%;
            padding:10px;
            margin-bottom:14px;
            border-radius:8px;
            border:none;
            background:#142235;
            color:#000;
            font-size:13px;
        }

        input[type="file"]{
            padding:8px;
            background:#020617;
        }

        small{
            display:block;
            margin-top:-8px;
            margin-bottom:12px;
            font-size:11px;
            color:#94a3b8;
        }

        .btn{
            display:inline-block;
            padding:10px 18px;
            border-radius:999px;
            cursor:pointer;
            text-decoration:none;
            border:none;
            font-weight:500;
            font-size:13px;
        }

        .btn-primary{
            background:#2563eb;
            color:#fff;
            margin-right:8px;
        }

        .btn-secondary{
            background:#1e293b;
            color:#cbd5e1;
        }

        .msg{
            background:#b91c1c;
            padding:10px 12px;
            margin-bottom:14px;
            border-radius:8px;
            font-size:13px;
        }
		/* ============================
   Ajustes móviles para formularios
   ============================ */
@media (max-width: 600px) {
    .dashboard-page {
        padding: 12px;
    }

    .dashboard-main {
        padding: 14px;
    }

    .form-wrapper {
        margin-top: 6px;
    }

    .form-card {
        border-radius: 12px;
        padding: 18px;
        max-width: 100%;
    }

}
.table-modern {
    width: 100%;
    min-width: 0;       /* IMPORTANTE: permite que se ajuste al ancho disponible */
}

.table-box {
    width: 100%;
    overflow-x: visible;   /* o quítalo si quieres, así no fuerza el scroll */
}

/* --- ANCHO DEL DASHBOARD --- */
.dashboard-page {
    width: 100%;
}

.dashboard-shell {
    max-width: 1500px;   /* o 1600 si quieres todavía más ancho */
}

/* Área principal más ancha */
.dashboard-main {
    width: 100%;
    max-width: 1800px;   /* aumenta si necesitas más */
    margin: 0 auto;
    padding: 20px;
}
.dashboard-main {
    max-width: 100%;
    margin: 0;
    padding: 30px;
}

.table-modern {
    width: 100%;
}
/* === FORZAR TABLA ASISTENCIAS A SER COMPACTA === */
.tabla-asistencias {
    table-layout: fixed !important;
    width: 100% !important;
}

/* Columnas de días: angostas */
.tabla-asistencias th:not(:first-child),
.tabla-asistencias td:not(:first-child) {
    width: 28px !important;
    max-width: 28px !important;
    padding: 2px !important;
    text-align: center !important;
    overflow: hidden;
}

/* Primera columna (nombre del alumno) */
.tabla-asistencias th:first-child,
.tabla-asistencias td:first-child {
    width: 180px !important;
    max-width: 180px !important;
    white-space: nowrap;
    text-align: left !important;
    padding: 6px !important;
}

/* Foto miniatura */
.foto-mini {
    width: 35px !important;
    height: 50px !important;
    margin-right: 4px;
}
/* ==== SCROLL HORIZONTAL PARA TABLAS EN MÓVIL ==== */

.table-box {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch; /* suaviza en iOS */
}

.table-modern {
    min-width: 650px; /* fuerza la necesidad de scroll */
}

@media (max-width: 768px) {
    .table-modern {
        min-width: 900px;  /* si quieres que sea aún más ancha */
    }
}
.tabla-asistencias {
    min-width: 1200px !important;
}

@media (max-width: 768px) {
    .tabla-asistencias {
        min-width: 1500px !important;
    }
}
.scroll-x {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}
/* === TABLA NARROW PARA REGISTRAR ASISTENCIAS === */

.table-box-narrow {
    max-width: 450px;   /* ancho que quieras: 500, 600, 700... */
    margin: 0 auto;     /* centrado */
}

/* Que esa tabla no se estire al 100% si no hace falta */
.table-box-narrow .table-modern {
    width: 100%;
    max-width: 100%;
    min-width: 0;       /* muy importante para que no se fuerce el ancho */
}

/* Filas un poco más compactas */
.table-box-narrow .tabla-registro-asist th,
.table-box-narrow .tabla-registro-asist td {
    padding: 8px 10px;
}
/* ==== Encabezado del panel en vista móvil ==== */
@media (max-width: 768px) {

    /* El header completo en columna y centrado */
    .dashboard-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }

    /* Dentro del header, el bloque logo + textos también en columna */
    .dashboard-header .header-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    /* Logo centrado arriba */
    .dashboard-header .brand-logo {
        display: block;
        margin: 0 auto;
        max-width: 200px;
        height: auto;
    }

    /* Textos debajo del logo y centrados */
    .dashboard-header .header-title {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}
/* === User chip más profesional === */
.header-right {
    display: flex;
    align-items: center;
}

/* contenedor del usuario: de píldora a tarjetita */
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;                 /* un poco más alto pero menos “aplastado” */
    border-radius: 16px;                /* antes 999px → menos ovalado */
    background: rgba(7, 12, 34, 0.85);  /* fondo más sólido */
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
}

/* textos alineados y compactos */
.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.user-name {
    font-size: 13px;
}

.user-role {
    font-size: 10px;
}



.btn-logout:hover {
    background: rgba(255, 107, 107, 0.24);
}

/* En móvil: que no se vea gigante ni raro */
@media (max-width: 768px) {
    .header-right {
        justify-content: center;
        width: 100%;
    }

    .user-chip {
        width: 100%;
        max-width: 360px;
        justify-content: space-between;
    }
}


/* === Versión mobile del bloque de usuario === */
@media (max-width: 600px) {

    .header-right {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .header-right .user-chip {
        width: 100%;
        max-width: 340px;        /* ancho cómodo en móvil */
        flex-direction: column;  /* apila contenido */
        align-items: flex-start;
        gap: 8px;
        padding: 12px 14px;
        border-radius: 16px;     /* deja de ser súper ovalado */
    }

    .header-right .user-info {
        line-height: 1.2;
    }

    .header-right .btn-logout {
        align-self: stretch;     /* botón ocupa todo el ancho */
        justify-content: center;
        text-align: center;
        border-radius: 10px;    /* aquí sí tipo pill, pero SOLO el botón */
        padding: 8px 0;
        font-size: 11px;
    }
}
/* ==== Fix news-wrapper en mobile ==== */
@media (max-width: 600px) {
    .news-wrapper {
        padding: 14px 10px !important;
        margin: 0 auto;
        width: 100% !important;
        box-sizing: border-box;
    }
    .news-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 18px !important;
        box-sizing: border-box;
    }

    .news-card img {
        width: 100% !important;
        height: auto !important;
    }
    .news-grid {
        grid-template-columns: 1fr !important;
    }
}
/* =====================================
   BOTONES PROFESIONALES PARA FORMULARIOS
   ===================================== */

.btn-form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: .18s ease;
}

/* --- Botón Azul Profesional --- */
.btn-form-primary {
    background: linear-gradient(135deg, #0057B8, #00a4ff);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(0, 87, 184, 0.35);
}

.btn-form-primary:hover {
    filter: brightness(1.10);
    box-shadow: 0 12px 26px rgba(0, 87, 184, 0.45);
}

/* --- Botón Rojo Profesional (Cancelar) --- */
.btn-form-danger {
    background: linear-gradient(135deg, #cc3e4f, #e04b5c);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(204, 62, 79, 0.35);
}

.btn-form-danger:hover {
    filter: brightness(1.10);
    box-shadow: 0 12px 26px rgba(204, 62, 79, 0.45);
}

/* --- Contenedor de botones --- */
.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}
/* =====================================
   FORMULARIO "NUEVA NOTICIA"
   ===================================== */

/* Tarjeta contenedora del formulario */
.form-card {
    background: #f3f4f8;
    border-radius: 18px;
    padding: 22px 22px 20px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

/* Layout en 2 columnas (texto / meta) */
.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 18px;
}

/* Espaciado entre campos */
.form-group {
    margin-bottom: 12px;
}

/* Labels */
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #22253b;
}

/* Inputs, textarea y selects */
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d1d4e3;
    outline: none;
    font-family: inherit;
    background: #ffffff;
    color: #111827;
}

/* Textarea */
.form-textarea {
    resize: vertical;
    min-height: 180px;
}

/* Focus */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: #0057B8;
    box-shadow: 0 0 0 1px rgba(0, 87, 184, 0.18);
	
}

/* Textos de ayuda */
.help-text {
    font-size: 11px;
    color: #7b7f96;
    margin-top: 2px;
}

/* Alertas (errores / éxito) */
.alert {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 13px;
}

.alert-error {
    background: #ffe3e3;
    color: #7b1823;
    border: 1px solid #f3b3b5;
}

.alert-success {
    background: #e1f7e8;
    color: #155724;
    border: 1px solid #9fd4ab;
}

/* =====================================
   BOTONES PROFESIONALES DEL FORM
   ===================================== */

.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.btn-form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: .18s ease;
    white-space: nowrap;
}

/* Botón azul (Guardar) */
.btn-form-primary {
    background: linear-gradient(135deg, #0057B8, #00a4ff);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(0, 87, 184, 0.35);
}

.btn-form-primary:hover {
    filter: brightness(1.10);
    box-shadow: 0 12px 26px rgba(0, 87, 184, 0.45);
}

/* Botón rojo (Cancelar) */
.btn-form-danger {
    background: linear-gradient(135deg, #cc3e4f, #e04b5c);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(204, 62, 79, 0.35);
}

.btn-form-danger:hover {
    filter: brightness(1.10);
    box-shadow: 0 12px 26px rgba(204, 62, 79, 0.45);
}

/* Responsive: formulario en 1 columna en pantallas pequeñas */
@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .form-card {
        padding: 18px 16px 18px;
        border-radius: 14px;
    }

    .form-buttons {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .btn-form {
        width: 100%;
        justify-content: center;
    }
}
/* =============================
   FIX CAMPOS DEL FORMULARIO DE NOTICIAS
   ============================= */

/* Input Título (text) */
.form-input[type="text"],
input[type="text"].form-input {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #d1d4e3 !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    font-size: 14px;
    outline: none;
}

.form-input[type="text"]:focus {
    border-color: #0057B8 !important;
    box-shadow: 0 0 0 1px rgba(0,87,184,0.18);
}


/* =============================
   FILE INPUT – Imágenes de portada
   ============================= */

input[type="file"] {
    background: #ffffff !important;
    border: 1px solid #d1d4e3 !important;
    padding: 8px !important;
    border-radius: 10px !important;
    color: #111827 !important;
    font-size: 13px;
    cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
    background: #f3f4f8 !important;
    border: 1px solid #c9ccd9 !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    margin-right: 10px;
    cursor: pointer;
    transition: .18s ease;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background: #e8eaf0 !important;
}
/* ==========================
   BOTÓN PROFESIONAL LOGIN
   ========================== */
.btn-login {
    width: 100%;
    padding: 14px 22px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #0057B8, #00a4ff);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(0, 87, 184, 0.35);
    transition: .18s ease;
}

.btn-login:hover {
    filter: brightness(1.12);
    transform: translateY(-2px);
    box-shadow: 0 14px 38px rgba(0, 87, 184, 0.55);
}

.btn-login:active {
    transform: translateY(0px);
    box-shadow: 0 6px 16px rgba(0, 87, 184, 0.45);
}
  .current-image {
            margin-top: 8px;
            font-size: 12px;
            color: #555a76;
        }

        .current-image img {
            display: block;
            margin-top: 6px;
            max-width: 220px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
/* Centrar texto en la tabla de suscriptores */
.table-modern thead th,
.table-modern tbody td {
    text-align: center !important;
}

.table-modern thead th p,
.table-modern tbody td p {
    margin: 0;
    text-align: center;
}
.search-row {
    display: flex;
    align-items: center; /* <-- alinea verticalmente */
    gap: 12px;
}

/* === Buscador de alumnos (admin_alumnos.php) === */

.buscador {
    display: flex;
    align-items: center;   /* <-- centra verticalmente input + botón */
    gap: 12px;
    margin-bottom: 18px;
}

/* Input del buscador */
.buscador input[type="text"] {
    flex: 1;
    max-width: 420px;
    height: 44px;

    padding: 0 14px;
    margin: 0;                 /* quita el margin-bottom de la regla global */
    box-sizing: border-box;

    border-radius: 10px;
    background: #0e1a31;
    color: #ffffff;
}

/* Botón BUSCAR */
.buscador .btn-search {
    height: 44px;              /* misma altura que el input */
    padding: 0 24px;           /* solo padding horizontal */
    margin: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Botón LIMPIAR del buscador */
.btn-clean {
    height: 44px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: #1e293b;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    text-decoration: none;
    transition: .18s ease;
}

.btn-clean:hover {
    background: #334155;
}
/* === Mensaje profesional de estado (registro alumno) === */
.msg-register {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;                 /* más pequeño */
    font-weight: 500;
    display: none;
    animation: fadeIn 0.25s ease;
}

/* Éxito */
.msg-register.success {
    background: rgba(0, 200, 120, 0.12);
    border: 1px solid rgba(0, 200, 120, 0.35);
    color: #4ade80; /* verde pastel elegante */
}

/* Error */
.msg-register.error {
    background: rgba(255, 80, 80, 0.12);
    border: 1px solid rgba(255, 80, 80, 0.35);
    color: #f87171;
}

/* Animación suave */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}
/* === Botones pequeños de acciones en tabla (Admin Alumnos) === */

.btn-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    font-size: 12px;
    font-weight: 500;
    text-decoration: none;

    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;

    cursor: pointer;
    transition: .18s ease;
    white-space: nowrap;
}

/* Hover global */
.btn-small:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

/* --- Editar (azul) --- */
.btn-edit {
    color: #0057B8;
    background: rgba(0, 87, 184, 0.08);
    border-color: rgba(0, 87, 184, 0.35);
}

/* --- Bloquear (rojo) --- */
.btn-block {
    color: #cc3e4f;
    background: rgba(204, 62, 79, 0.08);
    border-color: rgba(204, 62, 79, 0.35);
}

/* --- Desbloquear (verde) --- */
.btn-unblock {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.35);
}
/* ============================
   TABLA ASISTENCIAS MENSUAL
   ============================ */

/* Contenedor con scroll horizontal si hace falta */
.scroll-x {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Tabla compacta y fija */
.tabla-asistencias {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

/* Encabezados */
.tabla-asistencias thead th {
    padding: 6px 4px;
    background: #f3f4f8;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    white-space: nowrap;
}

/* Primera columna (Alumno) más ancha */
.tabla-asistencias th:first-child,
.tabla-asistencias td:first-child {
    width: 190px;
    max-width: 190px;
    text-align: left;
    padding: 6px 10px;
    white-space: nowrap;
}

/* Columnas de días: MUY estrechas */
.tabla-asistencias th:not(:first-child),
.tabla-asistencias td:not(:first-child) {
    width: 26px;
    max-width: 26px;
    padding: 3px 0;
    text-align: center;
    overflow: hidden;
}

/* Filas cuerpo */
.tabla-asistencias tbody td {
    border-bottom: 1px solid #eef2f7;
    background: #ffffff;
}

/* Zebra suave */
.tabla-asistencias tbody tr:nth-child(even) td {
    background: #f9fafb;
}

/* Hover fila */
.tabla-asistencias tbody tr:hover td {
    background: #e5f0ff;
}

/* Foto mini y nombre alineados */
.foto-mini {
    width: 32px;
    height: 32px;

    object-fit: cover;
    margin-right: 6px;
    vertical-align: middle;
}

.alumno-nombre {
    vertical-align: middle;
    font-size: 12px;
    font-weight: 500;
    color: #111827;
}

/* Check de asistencia más bonito */
.asis-ok {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
    font-size: 11px;
    font-weight: 600;
}

/* Mobile: que la tabla haga scroll horizontal y no rompa el layout */
@media (max-width: 768px) {
    .tabla-asistencias {
        min-width: 900px; /* obliga a usar scroll-x en pantallas pequeñas */
    }
}
/* Tabla compacta para registrar asistencia diaria */
.tabla-registro-asist th:first-child,
.tabla-registro-asist td:first-child {
    width: 30%;
}

.tabla-registro-asist th:last-child,
.tabla-registro-asist td:last-child {
    width: 30%;
    text-align: center;
}
.badge-pago{
    display:inline-block;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:500;
}
.badge-pago.ok{background:#e6ffed;color:#136534;}
.badge-pago.no{background:#ffe5e8;color:#8f1b2f;}
.table-modern th, .table-modern td{text-align:center;font-size:12px;}
.foto-mini{
    width:60px;height:60px;object-fit:cover;
}

.badge-pago{
    display:inline-block;
    padding:4px 10px;
    border-radius:999px;
    font-size:11px;
    font-weight:500;
}
.badge-pago.ok { background:#e6ffed; color:#166534; }
.badge-pago.no { background:#ffe5e8; color:#881337; }

.table-box-small{
    display:flex;
    justify-content:center;
}
.toggle-pago {
    cursor: pointer;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
    display: inline-block;
}

/* ESTILOS */
.toggle-pago.verde {
    color: #4ade80;
    border-color: #4ade80;
}

.toggle-pago.rojo {
    color: #f87171;
    border-color: #f87171;
}
.badge-estado {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
    cursor: pointer;
    user-select: none;
}

.badge-estado.verde {
    color: #4ade80;
    border-color: #4ade80;
    background: transparent;
}

.badge-estado.rojo {
    color: #f87171;
    border-color: #f87171;
    background: transparent;
}

.badge-estado:hover {
    opacity: 0.9;
}
/* --- Bloque alumno: escritorio --- */
.perfil-alumno {
    margin-bottom: 15px;
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 15px;
}

.perfil-foto {
    width: 100px;
        height: 100px;
    border-radius: 8px;
    object-fit: cover;
}

.perfil-datos {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.perfil-nombre {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 18px;
    margin-bottom: 4px;
}

.perfil-linea {
    font-size: 14px;
    color: #cbd5e1;
}

/* --- SOLO MOBILE --- */
@media (max-width: 768px) {
    .perfil-alumno {
        flex-direction: column;      
        align-items: center;
        text-align: center;
        padding: 25px;
    }

    .perfil-datos {
        align-items: center;
    }

    .perfil-foto {
        width: 160px;       /* TAMAÑO NUEVO MUCHO MÁS GRANDE */
        height: 160px;
        border-radius: 12px;
        object-fit: cover;
        margin-bottom: 12px;
    }

    .perfil-nombre {
        font-size: 20px;     /* Mejor proporción con la foto */
    }
}
.perfil-foto {
    width: 110px;
    height: 110px;
    border-radius: 10px;
    object-fit: cover;
}

/* SOLO en móviles */
@media (max-width: 768px) {
    .perfil-foto {
        width: 170px !important;
        height: 170px !important;
        border-radius: 12px;
        margin: 0 auto 12px auto;
        display: block;
    }
}
/* ——— ESTILO PARA TARJETAS CLARAS ——— */
.card-light,
.card-light * {
    color: #111 !important;
}

/* ——— TABLAS CLARAS ——— */
.table-modern,
.table-modern td,
.table-modern th {
    color: #111 !important;
}

/* ——— CONTENEDOR BLANCO TIPO PERFIL ——— */
.perfil-datos,
.perfil-datos * {
    color: #111 !important;
}

@media (max-width: 600px) {
    .form-card {
        max-width: 100%;
        padding: 16px 14px 16px;
        border-radius: 14px;
    }
}
@media (max-width: 768px) {
  .scroll-x .table-modern {
      min-width: 600px; /* o 700px, 900px, lo que necesites */
  }
}
/* ===== TABLA PAGOS: SOLO FOTO, SIN ESPACIO ENORME ===== */
.table-modern.table-pagos {
    width: auto;              /* que mida lo que necesita */
    min-width: 0 !important;  /* anula el min-width general de .table-modern */
    margin: 0 auto;           /* la centramos en su tarjeta */
}

/* Opcional: que la primera columna (foto) no sea tan alta/ancha */
.table-modern.table-pagos td {
    padding: 8px 10px;
}

.table-modern.table-pagos .foto-mini {
    width: 40px !important;
    height: 40px !important;
    object-fit: cover;
}
/* === FIX DEFINITIVO PARA TABLA DE PAGOS === */

.table-modern.table-pagos {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: auto !important;
}

/* Primera columna (foto) bien compacta */
.table-modern.table-pagos th:first-child,
.table-modern.table-pagos td:first-child {
    width: 55px !important;
    max-width: 55px !important;
    padding: 6px !important;
}

/* Tamaño de la miniatura */
.table-modern.table-pagos .foto-mini {
    width: 50px !important;
    height: 50px !important;
    object-fit: cover;
}

/* Evitar que el resto de la tabla estire innecesariamente */
.table-modern.table-pagos tr td {
    white-space: nowrap;
}
/* ===== Admin Galería ===== */
.admin-gallery-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:14px;
}

.admin-gallery-card{
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  box-shadow: 0 10px 26px rgba(11, 15, 35, 0.12);
  display:flex;
  flex-direction:column;
}

.admin-gallery-thumb img{
  width:100%;
  height:160px;
  object-fit:cover;
  display:block;
  background:#eee;
}

.admin-gallery-meta{
  padding:10px 12px 0;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  font-size:12px;
  color:#444;
}

.admin-gallery-actions{
  padding:10px 12px 12px;
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 12px;
  border-radius:999px;
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  text-decoration:none;
  border:1px solid rgba(0,0,0,0.15);
  cursor:pointer;
}

.pill-on{ color:#136534; background:#e6ffed; border-color:#b7f0c7; }
.pill-off{ color:#8f1b2f; background:#ffe5e8; border-color:#f5bcc5; }
.pill-del{ color:#8f1b2f; background:#ffe5e8; border-color:#f5bcc5; }
/* ================================
   Galería Admin – ancho completo
================================ */

/* El card que contiene la galería */
.card:has(.admin-gallery-grid) {
  max-width: 100% !important;
  width: 100% !important;
}

/* Contenedor principal */
.admin-gallery-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

/* En pantallas grandes, más aire */
@media (min-width: 1400px) {
  .admin-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}
/* ==========================
   Admin Galería - Upload Pro
   ========================== */

.upload-card {
  border-radius: 18px;
}

.upload-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.upload-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.upload-subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  color: #667085;
}

.upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 16px;
}

/* Dropzone */
.upload-drop {
  position: relative;
  border-radius: 16px;
  border: 1px dashed rgba(0,0,0,0.25);
  background: linear-gradient(180deg, #ffffff, #f5f7ff);
  padding: 16px;
  cursor: pointer;
  transition: .18s ease;
  min-height: 320px;
  outline: none;
}

.upload-drop:hover {
  border-color: rgba(0,87,184,0.55);
  box-shadow: 0 10px 26px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}

.upload-drop.is-drag {
  border-color: rgba(0,164,255,0.85);
  box-shadow: 0 14px 32px rgba(0, 87, 184, 0.18);
}

.upload-file {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-drop-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  align-items: center;
  text-align: center;
  pointer-events: none; /* para que el click vaya al input invisible */
}

.upload-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: rgba(0, 87, 184, 0.10);
  color: #0057B8;
  border: 1px solid rgba(0, 87, 184, 0.22);
}

.upload-text {
  color: #111827;
  font-size: 13px;
  line-height: 1.4;
}

.upload-text span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #667085;
}

.upload-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.upload-filename {
  font-size: 12px;
  color: #111827;
  font-weight: 600;
}

.upload-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.30);
  color: #166534;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Preview */
.upload-preview {
  width: 100%;
  max-width: 520px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

.upload-preview img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* Side panel */
.upload-side {
  display: flex;
  flex-direction: column;
}

.upload-buttons {
  margin-top: auto;
}

/* Responsive */
@media (max-width: 900px) {
  .upload-grid {
    grid-template-columns: 1fr;
  }
  .upload-drop {
    min-height: 280px;
  }
  .upload-buttons {
    margin-top: 16px;
  }
}
/* Modal foto */
.foto-mini.js-foto { cursor: pointer; }

.foto-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.foto-modal.is-open { display: block; }

.foto-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
}

.foto-modal__content {
  position: relative;
  z-index: 1;
  max-width: min(900px, 92vw);
  max-height: 86vh;
  margin: 6vh auto 0;
  background: #0b1220;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.foto-modal__content img {
  width: 100%;
  height: auto;
  max-height: calc(86vh - 24px);
  object-fit: contain;
  display: block;
  border-radius: 10px;
}

.foto-modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.foto-modal__close:hover { background: rgba(255,255,255,.2); }
/* ===== REPORTE DE PAGOS – ANCHO COMPLETO ===== */
.table-modern.table-pagos-full {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    table-layout: auto !important;
}
/* ===== Acceso denegado (elegante) ===== */
.deny-card{
  max-width: 820px;
  margin: 0 auto;
  padding: 26px;
  border-radius: 18px;
  background: rgba(10, 18, 35, .55);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
}

.deny-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: #ffd8a8;
  background: rgba(255, 170, 0, .12);
  border: 1px solid rgba(255, 170, 0, .25);
}

.deny-head{
  display: flex;
  gap: 16px;
  margin-top: 16px;
  align-items: flex-start;
}

.deny-icon{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
  color: #1b1200;
  background: rgba(255, 170, 0, .95);
  box-shadow: 0 10px 25px rgba(255, 170, 0, .25);
}

.deny-title{
  margin: 0 0 6px 0;
  font-size: 22px;
  color: #fff;
}

.deny-sub{
  margin: 0;
  color: rgba(255,255,255,.75);
  line-height: 1.5;
}

.deny-panel{
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}

.deny-text{
  margin: 0 0 14px 0;
  color: rgba(255,255,255,.85);
  line-height: 1.6;
}

.deny-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.deny-hint{
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255,255,255,.65);
  line-height: 1.5;
}

.deny-url{
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.08);
}
/* Mensajes vacíos dentro de cards claras */
.empty-message {
  text-align: center;
  padding: 20px;
  color: #111;              /* texto negro */
  font-size: 15px;
  font-weight: 500;
}
.table-summary {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.summary-box {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    padding: 14px 22px;
    border-radius: 14px;
    text-align: right;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

.summary-label {
    display: block;
    font-size: 12px;
    color: #c7ddff;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.summary-value {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
}
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

/* Lado izquierdo (buscador) */
.toolbar-left {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Lado derecho (ingreso) */
.toolbar-right {
    display: flex;
    justify-content: flex-end;
}

/* Caja del ingreso */
.summary-box {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    padding: 14px 22px;
    border-radius: 14px;
    text-align: right;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
    min-width: 220px;
}

.summary-label {
    display: block;
    font-size: 11px;
    color: #c7ddff;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.summary-value {
    font-size: 26px;
    font-weight: 600;
    color: #ffffff;
}
.pagination{
  display:flex;
  justify-content:center;
  gap:6px;
  margin-top:18px;
}

.page-btn{
  padding:8px 12px;
  border-radius:10px;
  background:#0f172a;
  color:#c7ddff;
  text-decoration:none;
  font-size:14px;
  transition:.2s;
}

.page-btn:hover{
  background:#1e40af;
  color:#fff;
}

.page-btn.active{
  background:#2563eb;
  color:#fff;
  font-weight:600;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;

  margin-top: 30px;   /* espacio desde la tabla */
  margin-bottom: 10px;

  padding: 16px 0;    /* aire interno */
}

.pagination a {
  min-width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: #c7ddff;

  font-size: 14px;
  font-weight: 600;
  text-decoration: none;

  transition: all .2s ease;
}

.pagination a:hover {
  background: #2563eb;
  color: #fff;
}

.pagination a.active {
  background: #2563eb;
  color: #fff;
}
.select-year{
  background:#ffffff;
  border:0;
  border-radius:10px;
  padding:10px 12px;
  font-weight:600;
  outline:none;
}
.badge-estado.disabled {
  pointer-events: none;   /* BLOQUEA CLICK */
  cursor: not-allowed;
  opacity: .6;
}

.badge-estado.gris {
  color: rgba(255,255,255,.45);
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
}

.fila-bloqueada td {
  opacity: .75;
}
.badge-estado.gris{
  color: rgba(255,255,255,.55);
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
}
/* Aviso estado AL DÍA (mes de ingreso) */
.alert-pago-ok{
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(34,197,94,0.12); /* verde suave */
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 14px 0 20px;
}

.alert-pago-ok .alert-texto{
  color: #0f3d2e;
  font-size: 14px;
  font-weight: 500;
}
/* Tarjeta tipo resumen (reutiliza tu summary-box) */
.summary-danger{
  background: linear-gradient(180deg, rgba(220,38,38,.95), rgba(153,27,27,.95));
  border: 1px solid rgba(255,255,255,.15);
}
.summary-danger .summary-label{
  color: rgba(255,255,255,.85);
}
.summary-danger .summary-value{
  color: #fff;
}
/* Mes no aplicable (antes del ingreso) */
.cell-disabled {
    display: block;
    width: 100%;
    height: 22px;
    background: rgba(148,163,184,0.08);
 /* gris muy suave */
    border-radius: 6px;
}
/* =========================================================
   DETALLES VISUALES FINOS – PAGOS / REPORTES / DEUDORES
   Pegar AL FINAL de style.css
========================================================= */

/* ---------- BADGES GENERALES ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
  border: 1px solid transparent;
}

/* ---------- ESTADO DE PAGOS ---------- */
.badge-pago.ok {
  color: #22c55e;
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.10);
}

.badge-pago.no {
  color: #ef4444;
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
}

/* ---------- ESTADO ALUMNO ---------- */
.badge-estado.verde {
  color: #22c55e;
  border: 1px solid rgba(34,197,94,.35);
  background: rgba(34,197,94,.10);
}

.badge-estado.rojo {
  color: #ef4444;
  border: 1px solid rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
}

.badge-estado.gris {
  color: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}

/* ---------- MES NO APLICA (SUTIL, SIN TEXTO) ---------- */
.na-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,.18);
}

.na-dash {
  color: rgba(0,0,0,.22);
  font-weight: 600;
}

/* ---------- TARJETA CARTERA VENCIDA ---------- */
.summary-box.summary-danger {
  background: rgba(220, 38, 38, .18);
  border: 1px solid rgba(220, 38, 38, .28);
}

.summary-box.summary-danger .summary-label {
  color: rgba(255,255,255,.85);
  letter-spacing: .6px;
  text-transform: uppercase;
  font-size: 12px;
}

.summary-box.summary-danger .summary-value {
  font-size: 28px;
  font-weight: 700;
}

/* ---------- TABLAS ---------- */
.table-modern tbody tr:hover {
  background: rgba(0,0,0,.03);
}

.table-modern td,
.table-modern th {
  vertical-align: middle;
}

/* ---------- COLUMNA NUMERACIÓN (#) ---------- */
.col-num {
  width: 60px;
  text-align: center;
  color: rgba(0,0,0,.55);
  font-weight: 600;
}

/* ---------- CELDAS DE MESES (PAGOS) ---------- */
.checkbox-cell {
  text-align: center;
  font-weight: 600;
}

/* ---------- FOTO MINI ---------- */
.foto-mini {
  width: 36px;
  height: 36px;
  object-fit: cover;

}

/* ---------- MENSAJES VACÍOS ---------- */
.empty-message {
  text-align: center;
  color: rgba(0,0,0,.55);
  font-size: 14px;
  padding: 20px;
}
/* ===== ACTION CARDS – ULTRA COMPACT ===== */

.action-card {
    padding: 8px 10px;          /* MUY compacto */
    border-radius: 10px;
    min-height: unset;          /* por si hereda altura */
}

.action-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    font-size: 13px;
    margin-bottom: 4px;
}

.action-title {
    font-size: 13px;
    margin-bottom: 2px;
}

/* descripción más corta */
.action-desc {
    font-size: 11px;
    line-height: 1.3;
    margin-bottom: 0;

    display: -webkit-box;
    -webkit-line-clamp: 1;      /* SOLO 1 línea */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ❌ QUITAMOS EL TEXTO LILA */
.action-meta {
    display: none !important;
}

/* glow decorativo más chico */
.action-highlight {
    width: 48px;
    height: 48px;
    right: -10px;
    bottom: -10px;
    opacity: 0.35;
}
    /* “Cards” de métricas (no rompe tu CSS) */
    .kpi-grid{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px; margin-bottom:16px; }
    .kpi-card{
      background: rgba(255,255,255,.06);
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 14px;
      padding: 14px;
    }
    .kpi-title{ font-size:12px; color:#c7ddff; margin-bottom:6px; }
    .kpi-value{ font-size:22px; font-weight:700; color:#fff; }
    .kpi-sub{ font-size:12px; color:rgba(255,255,255,.7); margin-top:6px; }
    .grid-2{ display:grid; grid-template-columns: 1.1fr .9fr; gap:12px; }
    .card-box{
      background: rgba(255,255,255,.06);
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 14px;
      padding: 12px;
    }
    .card-title{ font-weight:700; margin: 0 0 10px 0; color:#fff; }
    @media (max-width: 1000px){
      .kpi-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
      .grid-2{ grid-template-columns: 1fr; }
    }
	
.chart-box {
  height: 220px; /* mobile friendly */
}
/* --- FIX: el chart no se desborda en mobile --- */
.card-box{ overflow: hidden; }                 /* recorta todo lo que se salga */
.chart-wrap{ width: 100%; overflow: hidden; }  /* recorta el canvas */
.chart-wrap canvas{
  display:block;
  width:100% !important;
  max-width:100% !important;
}
/* ===== TOP DEUDORES: versión compacta para que no haga scroll ===== */
.table-modern.table-topdeudores {
  width: 100% !important;
  min-width: 0 !important;        /* importante: mata el min-width general */
  table-layout: fixed;             /* para que el ellipsis funcione */
}

.table-modern.table-topdeudores th,
.table-modern.table-topdeudores td {
  padding: 10px 10px;              /* menos padding */
  font-size: 12px;
}

/* Columnas numéricas bien angostas */
.table-modern.table-topdeudores th:nth-child(1),
.table-modern.table-topdeudores td:nth-child(1) {
  width: 36px;
  white-space: nowrap;
}

.table-modern.table-topdeudores th:nth-child(3),
.table-modern.table-topdeudores td:nth-child(3) {
  width: 60px;
  white-space: nowrap;
}

.table-modern.table-topdeudores th:nth-child(4),
.table-modern.table-topdeudores td:nth-child(4) {
  width: 86px;
  white-space: nowrap;
}

/* Alumno: que no se vaya largo, que corte con ... */
.table-modern.table-topdeudores th:nth-child(2),
.table-modern.table-topdeudores td:nth-child(2) {
  width: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* En mobile todavía más compacto */
@media (max-width: 600px) {
  .table-modern.table-topdeudores th,
  .table-modern.table-topdeudores td {
    padding: 8px 8px;
    font-size: 11px;
  }
  .table-modern.table-topdeudores th:nth-child(4),
  .table-modern.table-topdeudores td:nth-child(4) {
    width: 78px;
  }
}
/* Celular + WhatsApp */
.celular-wsp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.celular-texto {
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

.wsp-btn img {
  width: 22px;
  height: 22px;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.wsp-btn:hover img {
  transform: scale(1.15);
  filter: drop-shadow(0 0 4px rgba(37, 211, 102, 0.6));
}
.celular-texto a {
  color: #333;
  text-decoration: none;
}

.celular-texto a:hover {
  text-decoration: underline;
}
.celular-wsp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.celular-texto a {
  color: #333;
  font-weight: 500;
  text-decoration: none;
}

.celular-texto a:hover {
  text-decoration: underline;
}
/* 📱 MÓVIL: ocultar número, dejar solo WhatsApp */
@media (max-width: 768px) {
  .celular-texto {
    display: none;
  }
}
.btn-danger{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding: 10px 16px;
  border-radius: 999px;

  background: linear-gradient(135deg, #cc3e4f, #e04b5c);
  color:#fff;

  border:none;
  cursor:pointer;

  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.12em;

  box-shadow: 0 10px 24px rgba(204,62,79,0.35);
  transition:.18s ease;
}
.btn-danger:hover{
  filter: brightness(1.08);
  transform: translateY(-1px);
}
/* Contenedor de acciones del page-header (derecha) */
.page-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:flex-end;
}

/* Bloque del botón de correo */
.correo-box{
  text-align:center;
}

.correo-label{
  display:block;
  font-size:12px;
  color:#c7ddff;
  margin-bottom:6px;
}

.correo-form{
  display:block;
}

/* Botón rojo (si no lo tienes ya) */
.btn-danger{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding: 10px 16px;
  border-radius: 999px;

  background: linear-gradient(135deg, #cc3e4f, #e04b5c);
  color:#fff;

  border:none;
  cursor:pointer;

  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.12em;

  box-shadow: 0 10px 24px rgba(204,62,79,0.35);
  transition:.18s ease;
  white-space:nowrap;
}

.btn-danger:hover{
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* 📱 MÓVIL: que el bloque ocupe todo el ancho y el botón también */
@media (max-width: 768px){
  .page-actions{
    width:100%;
  }

  .correo-box{
    width:100%;
    text-align:left;
  }

  .correo-form{
    width:100%;
  }

  .correo-form .btn-danger{
    width:100%;
    display:flex;
  }
}
/* ===== FIX TABLA ASISTENCIAS: FOTO | ALUMNO | DÍAS ===== */
.tabla-asistencias {
  table-layout: fixed !important;
}

/* 1) FOTO (columna 1) */
.tabla-asistencias thead th:nth-child(1),
.tabla-asistencias tbody td:nth-child(1) {
  width: 70px !important;
  max-width: 70px !important;
  text-align: center !important;
  padding: 6px 6px !important;
  white-space: nowrap !important;
}

/* ALUMNO (columna 3) */
.tabla-asistencias thead th:nth-child(3),
.tabla-asistencias tbody td:nth-child(3) {
  width: 240px !important;
  max-width: 240px !important;
  padding: 6px 10px !important;
  white-space: normal !important;      /* permite 2 líneas */
  word-break: break-word !important;
}

/* 3) DÍAS (desde la columna 3 en adelante) */
.tabla-asistencias thead th:nth-child(n+3),
.tabla-asistencias tbody td:nth-child(n+3) {
  width: 26px !important;
  max-width: 26px !important;
  padding: 3px 0 !important;
  text-align: center !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}
/* === Estado (Admin Alumnos) === */
.badge-activo {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
  user-select: none;
}

.badge-activo.on {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.08);
}

.badge-activo.off {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.08);
}

.badge-activo.suspend {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.10);
}

/* === Botones suspensión === */
.btn-suspend {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.35);
}

.btn-reactivate {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.35);
}



/* =====================================================
   KPI LUXURY DASHBOARD
   ===================================================== */

.kpi-card{
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  transition: all 0.25s ease;
}

.kpi-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}



/* =====================================================
   NORMAL KPI (Alumnos activos, Proyectado, Rendimiento)
   ===================================================== */

.kpi-card{
  background: linear-gradient(145deg,#121a2b,#19233a);
  border: 1px solid rgba(120,160,255,0.15);
}

.kpi-card .kpi-title{
  color: #a9c4ff;
}

.kpi-card .kpi-value{
  color: #eef3ff;
}

.kpi-card .kpi-sub{
  color: rgba(210,220,255,0.65);
}



/* =====================================================
   DEUDORES - NARANJA LUXURY
   ===================================================== */

.kpi-card.kpi-warning{
  background: linear-gradient(145deg,#2c1b0e,#3d2612);
  border: 1px solid rgba(255,170,80,0.25);
}

.kpi-card.kpi-warning .kpi-title{
  color: #ffbe7a;
}

.kpi-card.kpi-warning .kpi-value{
  color: #ffe6c7;
  text-shadow: 0 0 8px rgba(255,170,80,0.25);
}

.kpi-card.kpi-warning .kpi-sub{
  color: rgba(255,210,170,0.7);
}



/* =====================================================
   CARTERA VENCIDA - ROJO VINO
   ===================================================== */

.kpi-card.kpi-soft-danger{
  background: linear-gradient(145deg,#2a0f16,#3b1720);
  border: 1px solid rgba(255,110,130,0.22);
}

.kpi-card.kpi-soft-danger .kpi-title{
  color: #ff9cab;
}

.kpi-card.kpi-soft-danger .kpi-value{
  color: #ffe5ea;
  text-shadow: 0 0 8px rgba(255,110,130,0.2);
}

.kpi-card.kpi-soft-danger .kpi-sub{
  color: rgba(255,210,220,0.7);
}



/* =====================================================
   CARTERA CORRIENTE - ROJO ALERTA
   ===================================================== */

.kpi-card.kpi-danger{
  background: linear-gradient(145deg,#2f0008,#4a000f);
  border: 1px solid rgba(255,60,60,0.35);
}

.kpi-card.kpi-danger .kpi-title{
  color: #ff8c8c;
}

.kpi-card.kpi-danger .kpi-value{
  color: #ffdcdc;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(255,70,70,0.35);
}

.kpi-card.kpi-danger .kpi-sub{
  color: rgba(255,190,190,0.75);
}



/* =====================================================
   VERDE CLARO LUXURY
   (Caja del mes y Cobrado del mes)
   ===================================================== */

.kpi-card.kpi-success{
  background: linear-gradient(145deg,#0e2f24,#154134);
  border: 1px solid rgba(90,220,170,0.25);
}

.kpi-card.kpi-success .kpi-title{
  color: #92f0c8;
}

.kpi-card.kpi-success .kpi-value{
  color: #e7fff5;
  text-shadow: 0 0 10px rgba(120,255,210,0.3);
}

.kpi-card.kpi-success .kpi-sub{
  color: rgba(190,255,230,0.7);
}



/* =====================================================
   KPI GRÁFICO (BARRA DE RENDIMIENTO) - LUXURY
   ===================================================== */

.kpi-card.kpi-progress-card{
  background: linear-gradient(145deg,#0b1a2c,#122743);
  border: 1px solid rgba(140, 180, 255, 0.16);
}

.kpi-card.kpi-progress-card .kpi-title{
  color: #b7d2ff;
}

.kpi-card.kpi-progress-card .kpi-value{
  color: #eef5ff;
  text-shadow: 0 0 10px rgba(140,180,255,0.18);
}

.kpi-card.kpi-progress-card .kpi-sub{
  color: rgba(220,235,255,0.72);
}

/* Barra */
.kpi-progress{
  margin-top: 12px;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
}

.kpi-progress-bar{
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.20),
    rgba(255,255,255,0.70)
  );
  box-shadow: 0 0 12px rgba(140,180,255,0.20);
}

.fila-nuevo-febrero {
    background-color: #e8f2ff !important; /* azul suave */
}

.fila-nuevo-marzo {
    background-color: #ffe9d6 !important; /* naranja suave */
}

.kpi-rojo-suave {
    background: linear-gradient(135deg, #ffe5e5, #ffd6d6);
    color: #a10000;
}

.kpi-verde-suave {
    background: linear-gradient(135deg, #e6f7ec, #d4f4df);
    color: #0f6b3e;
}
/* CONTENEDOR KPI EN UNA SOLA FILA */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 KPI en una fila */
    gap: 16px;
    margin-top: 18px;
}

/* BASE KPI */
.summary-box {
    padding: 22px;
    border-radius: 14px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.summary-label {
    display: block;
    font-size: 13px;
    letter-spacing: 1px;
    opacity: 0.85;
    margin-bottom: 6px;
}

.summary-value {
    font-size: 26px;
    font-weight: 700;
}

/* KPI ROJO MÁS CONTRASTE */
.kpi-rojo {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: #ffffff;
}

/* KPI VERDE MÁS CONTRASTE */
.kpi-verde {
    background: linear-gradient(135deg, #047857, #10b981);
    color: #ffffff;
}

/* KPI AZUL (mantén tu estilo actual si quieres) */
.kpi-azul {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #ffffff;
}

/* KPI META (azul oscuro elegante) */
.kpi-meta {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
}

/* Columna nombre en una sola línea */
.table-modern td:nth-child(3),
.table-modern th:nth-child(3){
    white-space: nowrap;
    max-width: 220px;
}

/* Columna categoría más angosta */
.table-modern td:nth-child(6),
.table-modern th:nth-child(6){
    width: 80px;
    text-align: center;
}

/* Columna valor más angosta */
.table-modern td:nth-child(7),
.table-modern th:nth-child(7){
    width: 80px;
    text-align: center;
}

/* Columna acciones sin saltos */
.table-modern td:last-child{
    white-space: nowrap;
}

/* Botones más pequeños */
.btn-small{
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 8px;
}

/* Ajustar separación entre botones */
.table-modern td:last-child{
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}


.alumno-link{
  font-weight:600;
  color:#0f172a;
  text-decoration:none;
}

.alumno-link:hover{
  color:#2563eb;
  text-decoration:underline;
}
/* === Miniaturas ficha (foto + inscripción) === */
.ficha-media{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:10px;
}

.media-card{
  width:180px;
  border:1px solid rgba(0,0,0,0.10);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

.media-thumb{
  width:100%;
  height:120px;
  object-fit:cover;
  display:block;
  background:#f1f5f9;
}

.media-meta{
  padding:10px 12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.media-title{
  font-weight:800;
  font-size:13px;
  color:#0f172a;
  line-height:1.1;
}

.media-sub{
  font-size:11px;
  color:#64748b;
  margin-top:3px;
}

.media-badge{
  font-size:11px;
  font-weight:800;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.12);
  background:#f8fafc;
  color:#0f172a;
}

.media-card a{
  text-decoration:none;
  color:inherit;
  display:block;
}

.media-clickable{ cursor:pointer; }

.acciones{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

/* base */
.btn-action{
    font-size:12px;
    padding:6px 12px;
    border-radius:6px;
    border:1px solid;
    font-weight:500;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    gap:5px;
    transition:.2s;
}

/* VER */
.btn-view{
    color:#2563eb;
    border-color:#2563eb55;
    background:#2563eb14;
}
.btn-view:hover{
    background:#2563eb22;
}

/* PDF */
.btn-pdf{
    color:#6366f1;
    border-color:#6366f155;
    background:#6366f114;
}
.btn-pdf:hover{
    background:#6366f122;
}

/* EDITAR */
.btn-edit{
    color:#3b82f6;
    border-color:#3b82f655;
    background:#3b82f614;
}
.btn-edit:hover{
    background:#3b82f622;
}

/* ELIMINAR */
.btn-delete{
    color:#ef4444;
    border-color:#ef444455;
    background:#ef444414;
}
.btn-delete:hover{
    background:#ef444422;
}

/* BLOQUEAR */
.btn-lock{
    color:#dc2626;
    border-color:#dc262655;
    background:#dc262614;
}
.btn-lock:hover{
    background:#dc262622;
}

/* SUSPENDER */
.btn-warning{
    color:#f59e0b;
    border-color:#f59e0b55;
    background:#f59e0b14;
}
.btn-warning:hover{
    background:#f59e0b22;
}

.estado-badge{
    padding:4px 10px;
    font-size:12px;
    border-radius:20px;
    font-weight:500;
    border:1px solid;
    display:inline-block;
}

/* ACTIVO */
.estado-activo{
    color:#16a34a;
    background:#16a34a1a;
    border-color:#16a34a55;
}

/* BLOQUEADO */
.estado-bloqueado{
    color:#dc2626;
    background:#dc26261a;
    border-color:#dc262655;
}

/* SUSPENDIDO */
.estado-suspendido{
    color:#f59e0b;
    background:#f59e0b1a;
    border-color:#f59e0b55;
}

/* TABLA: que respete anchos */
.tabla-asistencias{
  table-layout: fixed;
  width: max-content;   /* para que el scroll-x funcione bien */
  border-collapse: collapse;
}

/* celdas compactas */
.tabla-asistencias th,
.tabla-asistencias td{
  padding: 4px 3px !important;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* alumno alineado izquierda pero compacto */
.tabla-asistencias .col-alumno{
  text-align: left !important;
}


/* botón PDF mínimo */
.btn-pdf{
  padding: 3px 6px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

/* columna asistió */
.tabla-registro-asist td:last-child,
.tabla-registro-asist th:last-child{
    text-align:center;
    vertical-align:middle;
}

/* centrar checkbox */
.tabla-registro-asist input[type="checkbox"]{
    display:block;
    margin:auto;
}
.tabla-registro-asist input[type="checkbox"]{
    transform: scale(1.4);
    cursor:pointer;
}
.chk-asistencia{
    transform: scale(1.6);
    display:block;
    margin-left:auto;
    margin-right:auto;
}
.tabla-registro-asist td input[type="checkbox"]{
    transform: scale(1.6);
    display:block;
    margin:auto !important;
}

/* ======= CENTRAR CHECK EN COLUMNA "ASISTIÓ" ======= */
.table-modern.tabla-registro-asist td.col-asistio{
  vertical-align: middle !important;
  text-align: center !important;
  padding: 0 !important;
}

/* wrapper flex: centra sí o sí */
.table-modern.tabla-registro-asist td.col-asistio .chk-wrap{
  width: 100%;
  height: 100%;
  min-height: 54px; /* ajusta si quieres filas más altas */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* checkbox grande */
.table-modern.tabla-registro-asist .chk-asistencia{
  transform: scale(1.6);
  cursor: pointer;
  margin: 0 !important;
}
/* ===== FIX: tabla registro asistencia (NO usar flex en última columna) ===== */
.table-modern.tabla-registro-asist td:last-child{
  display: table-cell !important;     /* mata el flex global */
  text-align: center !important;
  vertical-align: middle !important;
}

/* centra el checkbox sí o sí */
.table-modern.tabla-registro-asist td:last-child .chk-wrap{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height: 56px;                  /* ajusta si quieres */
  width: 100%;
}

/* tamaño checkbox */
.table-modern.tabla-registro-asist td:last-child input[type="checkbox"]{
  transform: scale(1.6);
  margin: 0 !important;
}
.table-modern.table-actions td:last-child{
  display:flex;
  gap:6px;
  flex-wrap:nowrap;
}

/* ===== TABLA SUSPENDIDOS: columnas limpias y fechas en 1 línea ===== */
.table-modern.table-suspendidos{
  table-layout: fixed;
  width: 100%;
}

/* base más compacto */
.table-modern.table-suspendidos th,
.table-modern.table-suspendidos td{
  padding: 10px 10px;
  font-size: 12px;
  vertical-align: middle;
}

/* # */
.table-modern.table-suspendidos th:nth-child(1),
.table-modern.table-suspendidos td:nth-child(1){
  width: 80px;
  white-space: nowrap;
  text-align: center;
}

/* Alumno */
.table-modern.table-suspendidos th:nth-child(2),
.table-modern.table-suspendidos td:nth-child(2){
  width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Cédula */
.table-modern.table-suspendidos th:nth-child(3),
.table-modern.table-suspendidos td:nth-child(3){
  width: 160px;
  white-space: nowrap;
}

/* Categoría */
.table-modern.table-suspendidos th:nth-child(4),
.table-modern.table-suspendidos td:nth-child(4){
  width: 120px;
  white-space: nowrap;
  text-align: center;
}

/* Valor */
.table-modern.table-suspendidos th:nth-child(5),
.table-modern.table-suspendidos td:nth-child(5){
  width: 120px;
  white-space: nowrap;
  text-align: center;
}

/* Desde / Hasta (fechas en 1 sola línea) */
.table-modern.table-suspendidos th:nth-child(6),
.table-modern.table-suspendidos td:nth-child(6),
.table-modern.table-suspendidos th:nth-child(7),
.table-modern.table-suspendidos td:nth-child(7){
  width: 160px;
  white-space: nowrap !important;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Motivo: que use el espacio que queda */
.table-modern.table-suspendidos th:nth-child(8),
.table-modern.table-suspendidos td:nth-child(8){
  width: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
    text-align: center;
}


.table-modern.table-suspendidos td:nth-child(8){
  color: rgba(0,0,0,.55);
  font-weight: 500;
}
/* ===== TABLA ESTADO DE PAGOS (distribución limpia, no se corta) ===== */
.table-modern.table-pagos-estado{
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}

/* celdas */
.table-modern.table-pagos-estado th,
.table-modern.table-pagos-estado td{
  padding: 10px 10px;
  font-size: 12px;
  vertical-align: middle;
}

/* # */
.table-modern.table-pagos-estado th:nth-child(1),
.table-modern.table-pagos-estado td:nth-child(1){
  width: 40px;
  text-align: center;
  white-space: nowrap;
}

/* Foto */
.table-modern.table-pagos-estado th:nth-child(2),
.table-modern.table-pagos-estado td:nth-child(2){
  width: 60px;
  text-align: center;
}

/* Tamaño foto */
.table-modern.table-pagos-estado .foto-mini{
  width: 34px !important;
  height: 34px !important;
  object-fit: cover;
  border-radius: 8px;
}

/* Alumno (que no se desborde) */
.table-modern.table-pagos-estado th:nth-child(3),
.table-modern.table-pagos-estado td:nth-child(3){
  width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Fecha ingreso (una línea) */
.table-modern.table-pagos-estado th:nth-child(4),
.table-modern.table-pagos-estado td:nth-child(4){
  width: 120px;
  white-space: nowrap;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Estado alumno */
.table-modern.table-pagos-estado th:nth-child(5),
.table-modern.table-pagos-estado td:nth-child(5){
  width: 140px;
  text-align: center;
  white-space: nowrap;
}

/* Pagar (link centrado, sin partirse) */
.table-modern.table-pagos-estado th:nth-child(6),
.table-modern.table-pagos-estado td:nth-child(6){
  width: 110px;
  text-align: center;
  white-space: nowrap;
}

/* Estado pagos */
.table-modern.table-pagos-estado th:nth-child(7),
.table-modern.table-pagos-estado td:nth-child(7){
  width: 120px;
  text-align: center;
  white-space: nowrap;
}

/* ✅ MUY IMPORTANTE: tu CSS global pone flex en la última columna.
   Aquí lo anulamos SOLO para esta tabla */
.table-modern.table-pagos-estado td:last-child{
  display: table-cell !important;
}











/* ===== FORZAR TABLA DE CUMPLEAÑOS ===== */
.card-birthday .birthday-scroll{
  max-height: 340px;
  overflow-y: auto;
  overflow-x: hidden !important;
}

.card-birthday .table-birthday{
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse;
}

.card-birthday .table-birthday th,
.card-birthday .table-birthday td{
  box-sizing: border-box;
  overflow: hidden;
}

.card-birthday .table-birthday th:nth-child(1),
.card-birthday .table-birthday td:nth-child(1){
  width: 52px !important;
  text-align: center;
}

.card-birthday .table-birthday th:nth-child(2),
.card-birthday .table-birthday td:nth-child(2){
  width: calc(100% - 140px) !important;
}

.card-birthday .table-birthday th:nth-child(3),
.card-birthday .table-birthday td:nth-child(3){
  width: 88px !important;
  text-align: center;
  white-space: nowrap;
}

.card-birthday .birthday-name{
  display: block;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.card-birthday .birthday-sub{
  display: block;
  font-size: 12px;
  margin-top: 2px;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.card-birthday .birthday-age{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px !important;
  padding: 6px 6px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

.card-birthday .scroll-x{
  overflow-x: hidden !important;
}

.acciones-superior{
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.btn-primary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.btn-volver{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  background: #24324a;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
