/* ═══════════════════════════════════════════════════════
   Login CSS
   ═══════════════════════════════════════════════════════ */

.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1F3864 0%, #2E75B6 60%, #1F3864 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    flex-direction: column;
    gap: 16px;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 36px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from { opacity:0; transform:translateY(20px); }
    to   { opacity:1; transform:translateY(0); }
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo-img {
    max-width: 160px;
    max-height: 70px;
    object-fit: contain;
}

.login-title {
    text-align: center;
    font-size: 1.4rem;
    color: var(--azul-oscuro);
    margin-bottom: 4px;
}

.login-subtitle {
    text-align: center;
    color: var(--gris-medio);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.login-aviso {
    background: var(--naranja-claro);
    color: var(--naranja);
    border: 1px solid #ffe0b2;
    border-radius: var(--radio-sm);
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-footer {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    display: flex;
    gap: 16px;
    align-items: center;
}
.login-footer .version { font-size: 0.75rem; }

.portal-body {
    min-height: 100vh;
    background: #f0f4f8;
    display: flex;
    flex-direction: column;
}

/* PORTAL HEADER */
.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 60px;
    background: var(--azul-oscuro);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 14px; }
.header-logo { height: 36px; object-fit: contain; background: white; border-radius: 4px; padding: 2px 4px; }
.header-title { font-weight: 700; font-size: 1.1rem; }
.header-right { display: flex; align-items: center; gap: 14px; }
.header-user { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.user-badge {
    background: var(--azul-medio);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.btn-logout {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    padding: 7px 10px;
    border-radius: var(--radio-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background var(--transition);
}
.btn-logout:hover { background: rgba(255,255,255,0.25); }

/* PORTAL MAIN */
.portal-main { flex: 1; padding: 40px 24px; }
.portal-welcome { text-align: center; margin-bottom: 36px; }
.portal-welcome h2 { font-size: 1.8rem; color: var(--azul-oscuro); }
.portal-welcome p { color: var(--gris-medio); margin-top: 6px; }

/* SISTEMAS GRID */
.sistemas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.sistema-card {
    background: white;
    border-radius: 12px;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    text-decoration: none;
    transition: all 0.25s ease;
    border-left: 5px solid var(--color, var(--azul-oscuro));
    cursor: pointer;
}
.sistema-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-left-width: 7px;
}

.sistema-icon {
    width: 56px;
    height: 56px;
    background: var(--color, var(--azul-oscuro));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sistema-icon i { font-size: 1.5rem; color: white; }
.sistema-info h3 { color: var(--azul-oscuro); font-size: 1rem; margin-bottom: 4px; }
.sistema-entrar { font-size: 0.82rem; color: var(--gris-medio); display: flex; align-items: center; gap: 4px; }

.loading-sistemas { grid-column: 1/-1; text-align: center; padding: 60px; color: var(--gris-medio); }
.loading-sistemas i { font-size: 2rem; margin-bottom: 12px; display: block; }
.no-sistemas { grid-column: 1/-1; text-align: center; padding: 60px; color: var(--gris-medio); }
.no-sistemas i { font-size: 3rem; margin-bottom: 16px; display: block; color: var(--gris-borde); }

/* PORTAL FOOTER */
.portal-footer {
    background: var(--azul-oscuro);
    color: rgba(255,255,255,0.6);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

img { max-width: 100%; height: auto; }
@media (max-width: 768px) {
    .login-card { width: 95%; max-width: 95%; }
    .btn { min-height: 44px; }
    input, select, .form-control { width: 100%; }
}
@media (max-width: 600px) {
    .login-card { padding: 24px 20px; }
    .sistemas-grid { grid-template-columns: 1fr; }
    .header-title { display: none; }
    .portal-main { padding: 20px 14px; }
}
@media (max-width: 480px) {
    body { font-size: 14px; }
    .login-card { padding: 20px 16px; }
}
