/**
 * ============================================================
 *  MÓDULO: Administración → Inicio
 *  Ruta: /portal/afa/administracion/inicio/administracion.css
 *  Convención de clases: prefijo .adm-
 * ============================================================
 */

/* CONTENEDOR PRINCIPAL (criterio igual a general/avanzado) */
.adm-principal-wrapper {
    padding: 8px 0 32px;
}

/* ENCABEZADO */
.adm-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.adm-title {
    margin: 0 0 4px 0;
    font-size: 1.9rem;
    font-weight: 700;
    color: #003666;
    font-family: "Museo Slab 2", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.adm-title i {
    margin-right: 10px;
    color: #0082cf;
}

.adm-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #025993;
    font-family: "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Encabezado: bloque mini de usuario */
.adm-header-user {
    text-align: right;
    font-size: 0.85rem;
    font-family: "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #374151;
}

.adm-header-user-label {
    display: block;
    color: #6b7280;
}

.adm-header-user-name {
    display: block;
    font-weight: 600;
    color: #003259;
}

/* GRID DE TARJETAS (como .afa-grid / .avz-grid) */
.adm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;

    /* Todas las tarjetas ocupan el alto completo de la celda */
    align-items: stretch;
}

/* TARJETAS (clon visual, adaptado al prefijo .adm-) */
.adm-card {
    position: relative;
    background: linear-gradient(135deg, #f4f8ff 0%, #ffffff 45%, #ffffff 100%);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    gap: 18px;
    align-items: center;
    cursor: pointer;

    border: 1px solid #e8eef5;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);

    transition:
        transform 0.18s ease,
        box-shadow 0.22s ease,
        background 0.22s ease;

    height: 100%;
    box-sizing: border-box;
}

.adm-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: radial-gradient(circle at 0% 0%, rgba(64, 233, 229, 0.08), transparent 55%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.adm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.08);
}

.adm-card:hover::before {
    opacity: 1;
}

/* ICONO DE LA TARJETA */
.adm-card-icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(145deg, #e0f2ff, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(2, 89, 147, 0.18);
}

.adm-card-icon i {
    font-size: 2.0rem;
    color: #0082cf;
}

/* CUERPO DE LA TARJETA */
.adm-card-info {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.adm-card-info h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #003259;
    font-family: "Dharma Gothic E", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0.02em;
}

.adm-card-info p {
    margin-top: 4px;
    font-size: 0.92rem;
    color: #025993;
    font-family: "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* VISTA DETALLE */
.adm-view {
    background: #ffffff;
    border-radius: 20px;
    padding: 22px 24px;
    margin-top: 20px;

    border: 1px solid #e8eef5;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
}

.adm-view-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

/* Botón "Volver" (clon estilo general/avanzado) */
.adm-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 6px 14px;
    border-radius: 999px;

    border: 1px solid #d0d9e5;
    background: #f5f7fb;
    color: #003666;

    cursor: pointer;
    font-size: 0.9rem;
    font-family: "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    transition:
        background 0.18s ease,
        transform 0.1s ease,
        box-shadow 0.18s ease;
}

.adm-back-btn i {
    font-size: 0.9rem;
}

.adm-back-btn:hover {
    background: #e7f1ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

/* Título de vista detalle */
.adm-view-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #003666;
    font-family: "Museo Slab 2", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Cuerpo de vista detalle */
.adm-view-body {
    margin-top: 6px;
}

/* MÓDULOS INTERNOS */
.adm-module {
    display: none;
}

.adm-module.is-active {
    display: block;
}

/* Textos de "cargando" / ayuda */
.adm-module-loading {
    color: #5c6975;
    font-size: 0.92rem;
    margin-bottom: 6px;
}

.adm-module-helper {
    color: #6b7280;
    font-size: 0.86rem;
}

/* Estado de carga reutilizable */
.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .adm-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .adm-header-user {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .adm-title {
        font-size: 1.6rem;
    }

    .adm-card {
        padding: 18px;
    }

    .adm-grid {
        grid-template-columns: 1fr;
    }
}
