/* =========================
   LOGIN SCREEN
========================= */

#loginContainer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow: hidden;
    background: radial-gradient(circle at 15% 12%, rgba(79, 140, 255, 0.22), transparent 18%),
                radial-gradient(circle at 85% 28%, rgba(59, 130, 246, 0.16), transparent 16%),
                linear-gradient(180deg, #070b1e 0%, #050817 100%);
}

#loginContainer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.24) 1px, transparent 1px),
        radial-gradient(circle, rgba(79, 140, 255, 0.18) 1px, transparent 1px);
    background-size: 40px 40px, 100px 100px;
    opacity: 0.35;
    pointer-events: none;
}

#loginContainer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 12%),
                radial-gradient(circle at 82% 48%, rgba(79, 140, 255, 0.12), transparent 10%);
    pointer-events: none;
}

.login-body {
    position: relative;
    min-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.login-card {
    width: min(420px, 95vw);
    padding: 44px 38px;
    background: rgba(9, 16, 36, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    box-shadow: 0 32px 90px rgba(10, 20, 56, 0.48);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light .login-card {
    background: rgba(255, 255, 255, 0.93);
}

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

.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.login-header img {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.login-header h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.6px;
    background: linear-gradient(135deg, #edf2ff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 320px;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-card input {
    padding: 16px 16px 16px 50px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    width: 100%;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.08);
    line-height: 1.4;
}

.login-card input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.login-card input:focus {
    border-color: rgba(79, 140, 255, 0.95);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.14);
    transform: translateY(-1px);
}

/* Login - Modo Claro */
body.light .login-card input {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

body.light .login-card input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

body.light .login-card input:focus {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.2);
}

body.light .login-header h1 {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

body.light .login-subtitle {
    color: rgba(0, 0, 0, 0.6);
}

body.light .login-footer {
    color: rgba(0, 0, 0, 0.4);
}

/* Iconos de inputs en modo claro */
body.light #user {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

body.light #pass {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

.login-card input[type="text"],
.login-card input[type="password"] {
    background-position: 16px center;
    background-repeat: no-repeat;
}

#user {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23e2e8f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
    background-position: 16px center;
    background-repeat: no-repeat;
}

#pass {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23e2e8f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
    background-position: 16px center;
    background-repeat: no-repeat;
}

.login-card button {
    padding: 15px 18px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #4f8cff, #1d4ed8);
    color: white;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.24);
    margin-top: 8px;
    width: 100%;
}

.login-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.28);
}

.login-card button:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
}

@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
    }

    .login-header img { width: 60px; height: 60px; }
    .login-header h1  { font-size: 22px; }
}
