* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: ui-sans-serif, system-ui, sans-serif;
    background: radial-gradient(circle at 20% 20%, #1e293b 0%, #0f172a 60%), linear-gradient(160deg, #0f172a 0%, #020617 100%);
    overflow: hidden;
    position: relative;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
}
.bg-glow-1 {
    width: 450px;
    height: 450px;
    top: -140px;
    left: -120px;
    background: radial-gradient(circle, rgba(49, 70, 249, 0.45), transparent 70%);
    opacity: 0.6;
}
.bg-glow-2 {
    width: 400px;
    height: 400px;
    bottom: -150px;
    right: -110px;
    background: radial-gradient(circle, rgba(252, 111, 5, 0.4), transparent 70%);
    opacity: 0.5;
}

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background:
        linear-gradient(#0f172a, #0f172a) padding-box,
        linear-gradient(135deg, #3146f9, #fc6f05 50%, #3146f9 100%) border-box;
    border: 1.5px solid transparent;
    border-radius: 1.25rem;
    box-shadow: 0 25px 60px rgba(2, 6, 23, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    padding: 2.5rem 2.25rem;
    animation: login-card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes login-card-in {
    0% { opacity: 0; transform: translateY(18px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.login-logo img {
    max-width: 170px;
    height: auto;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

.login-card h1 {
    margin: 0 0 0.375rem;
    font-size: 1.375rem;
    font-weight: 700;
    text-align: center;
    color: #ffffff;
    letter-spacing: 0.01em;
}
.login-subtitle {
    margin: 0 0 1.75rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.4375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #cbd5e1;
}
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.input-wrap svg {
    position: absolute;
    left: 0.875rem;
    width: 18px;
    height: 18px;
    color: #64748b;
    pointer-events: none;
    transition: color 0.15s ease;
}
.form-group input {
    width: 100%;
    padding: 0.75rem 0.875rem 0.75rem 2.625rem;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    color: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-group input::placeholder {
    color: #475569;
}
.form-group input:focus {
    outline: none;
    border-color: #3146f9;
    box-shadow: 0 0 0 3px rgba(49, 70, 249, 0.25);
}
.form-group input:focus ~ svg,
.input-wrap:focus-within svg {
    color: #fc6f05;
}
.password-toggle {
    position: absolute;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: #64748b;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.password-toggle:hover {
    color: #fc6f05;
    background: rgba(252, 111, 5, 0.12);
}
.password-toggle svg {
    width: 18px;
    height: 18px;
}

.btn-submit {
    position: relative;
    width: 100%;
    padding: 0.8125rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #fc6f05 0%, #ff8008 40%, #3146f9 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(49, 70, 249, 0.35);
    transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-submit:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(252, 111, 5, 0.4);
}
.btn-submit:active {
    transform: translateY(1px) scale(0.98);
}

.error-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.6875rem 0.875rem;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #fca5a5;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    animation: error-shake 0.4s ease;
}
.error-box svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
@keyframes error-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

@media (max-width: 420px) {
    .login-card {
        max-width: 92vw;
        padding: 2rem 1.5rem;
    }
}
