


/* ============================================
   SISTEMA DE COMUNICADOS UES - ESTILOS GLOBALES (RESPONSIVO + BOOTSTRAP)
   ============================================ */
:root {
    --azul: #1f2447;
    --azul-claro: #2c3e66;
    --verde: #0c6633;
    --verde-oscuro: #0a5229;
    --rojo: #e50c1a;
    --rojo-oscuro: #c40a16;
    --blanco: #ffffff;
    --gris-claro: #f5f7fa;
    --gris-borde: #e2e8f0;
    --texto-oscuro: #1a202c;
    --texto-claro: #4a5568;
}

.logo-ues-f{
	width:70px;
	height:auto;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', system-ui, -apple-system, sans-serif;
    background: url('Fondo-UES2.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--texto-oscuro);
    line-height: 1.5;
}

/* ========== LOGIN (fondo transparente) ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}
.login-box {
    width: 100%;
    max-width: 520px;
}
.logo-ues {
    text-align: center;
    margin-bottom: 45px;
}
.logo-letter {
    display: inline-block;
    font-size: clamp(3rem, 10vw, 5.625rem); /* 48px → 90px responsivo */
    font-weight: 800;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    letter-spacing: clamp(0.3rem, 2vw, 0.9375rem);
}
.letter-u { color: #1f2447; }
.letter-e { color: #0c6633; }
.letter-s { color: #e50c1a; }
.logo-subtitle {
    text-align: center;
    color: rgba(0,0,0,0.8);
    font-size: clamp(0.75rem, 3vw, 0.9375rem);
    margin-top: 12px;
    letter-spacing: 2px;
    font-weight: 500;
}
.card-login {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 28px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    overflow: hidden;
    backdrop-filter: blur(2px);
}
.card-header-login {
    background: var(--blanco);
    border-bottom: 3px solid var(--azul);
    padding: clamp(1.5rem, 5vw, 2rem) clamp(1.5rem, 5vw, 2.2rem) 1.25rem;
}
.card-header-login h3 {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    font-weight: 700;
    margin: 0;
    color: var(--texto-oscuro);
}
.card-body-login {
    padding: clamp(1.5rem, 5vw, 2.2rem);
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: clamp(0.9rem, 3vw, 1rem);
    color: var(--texto-oscuro);
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gris-borde);
    border-radius: 14px;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
}
.form-control:focus {
    outline: none;
    border-color: var(--azul);
    box-shadow: 0 0 0 4px rgba(31,36,71,0.1);
}
.btn-acceder {
    width: 100%;
    background-color: var(--verde);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 0.85rem;
    font-weight: 700;
    font-size: clamp(1rem, 4vw, 1.125rem);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-acceder:hover {
    background-color: var(--verde-oscuro);
    transform: translateY(-2px);
}
.alert-error {
    background-color: #fee2e2;
    border-left: 4px solid var(--rojo);
    color: #991b1b;
    border-radius: 14px;
    padding: 0.875rem 1.125rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.demo-accounts {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gris-borde);
    text-align: center;
    font-size: 0.85rem;
    color: var(--texto-claro);
}

/* ========== DASHBOARD GENERAL ========== */
.dashboard-container {
    min-height: 100vh;
    padding: 1.5rem 1rem;
}
.admin-top-bar {
    background: #003087 !important;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.admin-top-bar h1 {
    color: white;
    font-size: clamp(1.1rem, 5vw, 1.5rem);
    font-weight: 700;
    margin: 0;
}
.admin-top-bar p {
    color: rgba(255,255,255,0.8);
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
}
.btn-logout {
    background-color: var(--rojo);
    color: white;
    border: none;
    border-radius: 40px;
    padding: 0.5rem 1.25rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-logout:hover {
    background-color: var(--rojo-oscuro);
    transform: translateY(-2px);
    color: white;
}

/* Grid de opciones */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
}
.option-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 1.8rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid var(--gris-borde);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    backdrop-filter: blur(2px);
}
.option-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.1);
    border-color: var(--azul);
}
.option-icon {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--azul);
}
.option-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.option-card p {
    color: var(--texto-claro);
    font-size: 0.8rem;
    margin: 0;
}

/* Tarjetas de contenido */
.content-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid var(--gris-borde);
    backdrop-filter: blur(2px);
}
.content-card h2 {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--verde);
    display: inline-block;
}
.form-section {
    background: rgba(248, 249, 250, 0.9);
    border-radius: 20px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}
.form-section h5 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--texto-oscuro);
}

/* Botones comunes */
.btn-verde, .btn-verde:hover {
    background-color: var(--verde);
    color: white;
    border: none;
    border-radius: 40px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-verde:hover {
    background-color: var(--verde-oscuro);
    transform: translateY(-2px);
}
.btn-rojo {
    background-color: var(--rojo);
    color: white;
    border: none;
    border-radius: 40px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}
.btn-rojo:hover {
    background-color: var(--rojo-oscuro);
    transform: translateY(-1px);
}
.btn-gris {
    background-color: #64748b;
    color: white;
    border-radius: 40px;
    padding: 0.5rem 1.25rem;
}
.btn-gris:hover {
    background-color: #475569;
    transform: translateY(-2px);
}
.btn-editar {
    background-color: #ffc107;
    color: #000;
    border-radius: 40px;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    margin-right: 5px;
}
.btn-editar:hover {
    background-color: #e0a800;
}
.btn-ver {
    background-color: #17a2b8;
    color: white;
    border-radius: 40px;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
}
.btn-ver:hover {
    background-color: #138496;
}

/* Botón flotante volver – responsivo mejorado */
.btn-volver-fijo {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #ff4500;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.7rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    font-size: 0.95rem;
}
.btn-volver-fijo:hover {
    background-color: var(--azul-claro);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
/* Móviles */
@media (max-width: 768px) {
    .btn-volver-fijo {
        bottom: 1rem;
        right: 1rem;
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
        gap: 6px;
    }
    .btn-volver-fijo i, 
    .btn-volver-fijo svg {
        width: 18px;
        height: 18px;
    }
}
@media (max-width: 480px) {
    .btn-volver-fijo {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
        border-radius: 40px;
        bottom: 0.8rem;
        right: 0.8rem;
    }
}

/* Tablas responsivas (Bootstrap ya tiene .table-responsive, estos son complementos) */
.table-responsive {
    overflow-x: auto;
    border-radius: 16px;
}
.table-custom {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.table-custom th {
    background-color: rgba(245, 247, 250, 0.9);
    padding: 0.75rem 1rem;
    font-weight: 700;
    text-align: left;
    border-bottom: 2px solid var(--gris-borde);
}
.table-custom td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--gris-borde);
    vertical-align: middle;
}
@media (max-width: 768px) {
    .table-custom th, .table-custom td {
        padding: 0.5rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
}

/* Badges roles */
.badge-rol {
    display: inline-block;
    padding: 0.25rem 0.85rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-admin { background: var(--azul); color: white; }
.badge-docente { background: var(--verde); color: white; }
.badge-usuario { background: var(--rojo); color: white; }

/* Alertas */
.alert {
    padding: 0.9rem;
    border-radius: 16px;
    margin-bottom: 1.2rem;
}
.alert-success {
    background-color: #e6f7e6;
    border-left: 4px solid var(--verde);
    color: #0a5229;
}
.alert-danger {
    background-color: #fee2e2;
    border-left: 4px solid var(--rojo);
    color: #991b1b;
}
.alert-info {
    background-color: #e0f2fe;
    border-left: 4px solid #0ea5e9;
    color: #0369a1;
}

/* Utilidades */
.mb-3 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.text-center { text-align: center; }
.fw-semibold { font-weight: 600; }
.w-100 { width: 100%; }

/* Filtros bar */
.filtros-bar {
    background: rgba(248, 249, 250, 0.9);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.2rem;
}
.checkbox-group {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid var(--gris-borde);
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fa;
}
.checkbox-group .form-check {
    margin-bottom: 5px;
}
.contenido-completo {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.comunicado-dia {
    border-left: 4px solid var(--rojo);
    transition: all 0.2s;
    cursor: pointer;
}
.comunicado-dia:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ========== MEDIA QUERIES COMPLEMENTARIAS (Bootstrap ya maneja columnas) ========== */
@media (max-width: 992px) {
    .options-grid {
        gap: 1.2rem;
    }
    .content-card {
        padding: 1.2rem;
    }
}
@media (max-width: 768px) {
    .login-box {
        max-width: 95%;
    }
    .logo-ues img {
        max-height: 120px;
        width: auto;
    }
    .admin-top-bar {
        padding: 0.8rem 1rem;
    }
    .options-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .option-card {
        padding: 1.2rem;
    }
    .form-section {
        padding: 1rem;
    }
    /* Apilar botones en filtros */
    .filtros-bar .row > [class*="col-"] {
        margin-bottom: 0.5rem;
    }
    .filtros-bar .btn,
    .filtros-bar a.btn {
        width: 100%;
        margin-top: 0.25rem;
    }
    .modal-dialog {
        margin: 0.5rem;
    }
    .modal-content {
        border-radius: 16px;
    }
}
@media (max-width: 480px) {
    .admin-top-bar h1 {
        font-size: 1rem;
    }
    .btn-logout {
        padding: 0.3rem 0.8rem;
        font-size: 0.7rem;
    }
    .logo-letter {
        letter-spacing: 6px;
    }
    .logo-subtitle {
        font-size: 0.65rem;
    }
    .card-header-login h3 {
        font-size: 1.2rem;
    }
}

/* ========== LOGO EN BARRA SUPERIOR (responsivo) ========== */
.admin-top-bar {
    position: relative;
    background-color: #003087 !important;
}

.admin-top-bar .container-fluid .row .col:first-child {
    padding-left: 70px;
}
@media (max-width: 768px) {
    .admin-top-bar::before {
        width: 30px;
        height: 30px;
        left: 12px;
    }
    .admin-top-bar .container-fluid .row .col:first-child {
        padding-left: 50px;
    }
}
@media (max-width: 480px) {
    .admin-top-bar::before {
        width: 24px;
        height: 24px;
        left: 8px;
    }
    .admin-top-bar .container-fluid .row .col:first-child {
        padding-left: 38px;
    }
}


/* ============================================
   AJUSTES PARA MÓVILES - LOGIN MÁS GRANDE
   ============================================ */

/* Para pantallas de hasta 768px (tablets y móviles grandes) */
@media (max-width: 768px) {
    .login-box {
        max-width: 90%;         /* Ocupa casi todo el ancho */
        width: 90%;
    }
    
    .logo-letter {
        font-size: 4rem;        /* 64px - más grande que antes */
        letter-spacing: 0.5rem;
    }
    
    .logo-subtitle {
        font-size: 1rem;        /* 16px más legible */
        margin-top: 0.5rem;
    }
    
    .card-header-login h3 {
        font-size: 1.8rem;      /* 28.8px */
    }
    
    .form-group label {
        font-size: 1.1rem;      /* 17.6px */
        margin-bottom: 0.75rem;
    }
    
    .form-control {
        padding: 1rem 1.2rem;   /* más altura y espacio interno */
        font-size: 1.1rem;
        border-radius: 20px;
    }
    
    .btn-acceder {
        padding: 1rem;
        font-size: 1.3rem;
        border-radius: 30px;
    }
    
    .alert-error {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .demo-accounts {
        font-size: 0.95rem;
    }
}

/* Para móviles muy pequeños (hasta 480px) - más énfasis en ocupar espacio */
@media (max-width: 480px) {
    .login-box {
        max-width: 95%;
        width: 95%;
    }
    
    .logo-letter {
        font-size: 3.5rem;      /* 56px - equilibrado */
        letter-spacing: 0.3rem;
    }
    
    .card-header-login {
        padding: 1.5rem 1rem 1rem;
        text-align: center;
    }
    
    .card-header-login h3 {
        font-size: 1.6rem;
    }
    
    .card-body-login {
        padding: 1.5rem 1.2rem;
    }
    
    .form-control {
        padding: 0.9rem 1rem;
        font-size: 1rem;
    }
    
    .btn-acceder {
        padding: 0.9rem;
        font-size: 1.2rem;
    }
    
    .logo-subtitle {
        font-size: 0.9rem;
    }
}

/* Para TODOS los dispositivos en orientación vertical */
@media (orientation: portrait) {
    .login-container {
        padding: 20px 16px;
    }
    .login-box {
        width: 90% !important;        /* Ocupa el 90% del ancho */
        max-width: 90% !important;    /* Ignora límites anteriores */
        margin: 0 auto;
    }
    .logo-letter {
        font-size: 12vw !important;    /* Escala relativa al ancho de la pantalla */
        letter-spacing: 2vw;
    }
    .logo-subtitle {
        font-size: 4vw;
    }
    .card-header-login h3 {
        font-size: 5vw;
    }
    .form-group label {
        font-size: 3.5vw;
    }
    .form-control {
        padding: 3.5vw 4vw;
        font-size: 3vw;
        border-radius: 4vw;
    }
    .btn-acceder {
        padding: 2.5vw;
        font-size: 3.5vw;
        border-radius: 8vw;
    }
    .alert-error, .demo-accounts {
        font-size: 3.8vw;
    }
}

/* Para pantallas de alta resolución (como 2736x1264) en vertical, ajustamos fuente máxima */
@media (orientation: portrait) and (min-resolution: 300dpi) {
    .logo-letter {
        font-size: 70px;  /* Límite máximo para que no sea enorme */
    }
    .card-header-login h3 {
        font-size: 36px;
    }
    .form-control {
        font-size: 22px;
    }
    .btn-acceder {
        font-size: 28px;
    }
    /* Ajusta el resto con valores fijos si lo prefieres */
}