/* ─── Acceso privado — Portal SGI TURISMO ELITE ─────────────────────────────
   Diseño corporativo: fondo oscuro, logo Alcotrans, botón naranja #f28c28.
   Responsive: escritorio, tablet y celular.
────────────────────────────────────────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, Arial, sans-serif;
    background-color: #0d1117;
    background-image:
        radial-gradient(ellipse 70% 50% at 15% 55%, rgba(242, 140, 40, 0.06) 0%, transparent 65%),
        radial-gradient(ellipse 60% 40% at 85% 20%, rgba(40, 106, 168, 0.04) 0%, transparent 55%);
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    min-height: 100vh; /* fallback navegadores sin soporte svh */
    padding: 1.5rem;
}

/* ─── Tarjeta central ──────────────────────────────────────────────────────── */

.login-card {
    width: 100%;
    max-width: 420px;
    background: #161b27;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    padding: 2.5rem 2.25rem 2.25rem;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.55),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* ─── Avisos (sesión vencida / logout ok) ──────────────────────────────────── */

.login-notice-bar {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.45;
    margin-bottom: 1.25rem;
    animation: fadeSlideIn 200ms ease;
}

.login-notice-warning {
    background: rgba(180, 109, 18, 0.1);
    border: 1px solid rgba(180, 109, 18, 0.22);
    color: #f6c343;
}

.login-notice-info {
    background: rgba(24, 134, 90, 0.1);
    border: 1px solid rgba(24, 134, 90, 0.22);
    color: #6ee7b7;
}

.notice-icon {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    margin-top: 1px;
}

/* ─── Logo ─────────────────────────────────────────────────────────────────── */

.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.75rem;
}

.login-logo img {
    height: 42px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: brightness(1.05);
    display: block;
}

/* ─── Encabezado ───────────────────────────────────────────────────────────── */

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.login-subtitle {
    font-size: 0.72rem;
    font-weight: 700;
    color: #f28c28;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.9rem;
}

.login-description {
    font-size: 0.78rem;
    color: #4a5568;
    line-height: 1.6;
    padding: 0 0.25rem;
}

/* ─── Divisor ──────────────────────────────────────────────────────────────── */

.login-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 1.5rem 0;
}

/* ─── Formulario ───────────────────────────────────────────────────────────── */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

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

.form-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.form-input {
    width: 100%;
    padding: 0.72rem 0.95rem;
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color 160ms ease, box-shadow 160ms ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus {
    border-color: rgba(242, 140, 40, 0.6);
    box-shadow: 0 0 0 3px rgba(242, 140, 40, 0.1);
}

.form-input::placeholder {
    color: #334155;
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 100px #0d1117 inset;
    -webkit-text-fill-color: #e2e8f0;
    caret-color: #e2e8f0;
}

/* ─── Mensaje de error ─────────────────────────────────────────────────────── */

.login-error {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.72rem 0.9rem;
    background: rgba(200, 61, 50, 0.1);
    border: 1px solid rgba(200, 61, 50, 0.22);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.45;
    animation: fadeSlideIn 200ms ease;
}

/* hidden attribute override */
[hidden] { display: none !important; }

/* ─── Botón ingresar ───────────────────────────────────────────────────────── */

.btn-login {
    width: 100%;
    padding: 0.82rem 1rem;
    background: #f28c28;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 160ms ease, box-shadow 160ms ease, transform 100ms ease;
    margin-top: 0.2rem;
    -webkit-appearance: none;
    appearance: none;
}

.btn-login:hover:not(:disabled) {
    background: #df7e20;
    box-shadow: 0 6px 20px rgba(242, 140, 40, 0.28);
}

.btn-login:active:not(:disabled) {
    transform: translateY(1px);
    background: #cc7119;
}

.btn-login:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* ─── Pie de tarjeta ───────────────────────────────────────────────────────── */

.login-footer {
    margin-top: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.25rem;
}

.login-footer-text {
    font-size: 0.72rem;
    color: #2d3748;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.login-footer-brand {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    color: #1e3a5f;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ─── Animaciones ──────────────────────────────────────────────────────────── */

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.75rem 1.75rem;
        border-radius: 14px;
    }
    .login-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 360px) {
    body {
        padding: 1rem;
    }
    .login-card {
        padding: 1.75rem 1.25rem 1.5rem;
        border-radius: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0ms !important;
        animation-duration: 0ms !important;
    }
}
