/* SISCOGEM — Login / pantallas públicas (auth layout) */

:root {
    --auth-primary: #1e2fa0;
    --auth-primary-dark: #172680;
    --auth-focus: #2d3ecf;
    --auth-bg-start: #c8d4e8;
    --auth-bg-mid: #e8eef6;
    --auth-bg-end: #f4f7fb;
    --auth-card-bg: #ffffff;
    --auth-text: #1a1a2e;
    --auth-muted: #5c6670;
    --auth-border: #dde3ea;
    --auth-radius: 14px;
    --auth-card-max: 440px;
}

html {
    height: 100%;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--auth-text);
    background-color: var(--auth-bg-mid);
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(30, 47, 160, 0.14), transparent 55%),
        linear-gradient(165deg, var(--auth-bg-start) 0%, var(--auth-bg-mid) 42%, var(--auth-bg-end) 100%);
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 1.5rem;
    padding: max(1.5rem, env(safe-area-inset-top))
        max(1.5rem, env(safe-area-inset-right))
        max(1.5rem, env(safe-area-inset-bottom))
        max(1.5rem, env(safe-area-inset-left));
}

.auth-flash-stack {
    width: 100%;
    max-width: var(--auth-card-max);
    margin-bottom: 1rem;
}

.auth-flash-stack .alert {
    margin-bottom: 0.75rem;
}

.auth-flash-stack .alert:last-child {
    margin-bottom: 0;
}

.auth-card {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--auth-card-max);
    margin: 0 auto;
    background: var(--auth-card-bg);
    border-radius: var(--auth-radius);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-top: 4px solid var(--auth-primary);
    box-shadow:
        0 20px 50px rgba(26, 47, 160, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.06);
    padding: 2rem 1.75rem 1.75rem;
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-brand__logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: #fafbfc;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.auth-brand__logo {
    display: block;
    max-width: 200px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.auth-brand__name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--auth-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.auth-brand__org {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--auth-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-title {
    margin: 0 0 0.4rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--auth-text);
    text-align: center;
    line-height: 1.3;
}

.auth-subtitle {
    margin: 0 0 1.75rem;
    font-size: 0.9rem;
    color: var(--auth-muted);
    text-align: center;
    line-height: 1.45;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.auth-form .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
}

.auth-form .form-control {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.9rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--auth-text);
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.auth-form .form-control::placeholder {
    color: #9ca3af;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--auth-focus);
    box-shadow: 0 0 0 3px rgba(45, 62, 207, 0.18);
}

.auth-form .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: var(--auth-primary);
    border: 1px solid var(--auth-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.auth-form .btn:hover {
    background: var(--auth-primary-dark);
    border-color: var(--auth-primary-dark);
}

.auth-form .btn:active {
    transform: translateY(1px);
}

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--auth-border);
    text-align: center;
}

.auth-footer p {
    margin: 0;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Alertas (flash) — sin depender de components.css */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger,
.alert-error {
    background: #fdeaea;
    color: #842029;
    border-color: #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

@media (min-width: 480px) {
    .auth-card {
        padding: 2.5rem 2.25rem 2rem;
    }
}

@media (max-width: 380px) {
    .auth-card {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .auth-brand__logo {
        max-width: 160px;
    }
}
