/* ─────────── RESET & BASE ─────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 30% 40%, #0b1a2e, #050b14);
    padding: 1.5rem;
    position: relative;
}

/* Subtle glow behind card */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(15, 140, 255, 0.07), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* ─────────── CONTAINER ─────────── */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

/* ─────────── GLASS CARD ─────────── */
.login-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 44px;
    padding: 2.8rem 2.4rem 2.6rem;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 50px 120px rgba(0, 0, 0, 0.7);
}

/* ─────────── LOGO ─────────── */
.logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.4rem;
    position: relative;
}

/* Subtle glow ring behind logo */
.logo-wrapper::after {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(15, 140, 255, 0.08), transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.login-logo {
    position: relative;
    z-index: 1;
    width: clamp(120px, 32vw, 170px);
    height: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgb(33 35 38 / 20%));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: block;
    border-radius: 16px;
}

.login-logo:hover {
    transform: scale(1.04);
}

/* ─────────── TYPOGRAPHY ─────────── */
.login-card h1 {
    font-size: clamp(1.5rem, 4.5vw, 2.1rem);
    font-weight: 700;
    color: #fcfafa;
    letter-spacing: -0.5px;
    margin-bottom: 0.2rem;
}

.login-card h1 .gradient-text {
    background: linear-gradient(135deg, #445e75, #00c853);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-card .subtitle {
    color: #bababa;
    font-size: 1.rem;
    font-weight: 500;
    margin-bottom: 1.8rem;
    letter-spacing: 0.3px;
}

/* ─────────── MESSAGES ─────────── */
.msg {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1.2rem;
    display: none;
    text-align: left;
}
.msg.error {
    background: rgba(255, 77, 79, 0.08);
    border: 1px solid rgba(255, 77, 79, 0.12);
    color: #ff6b6b;
    display: block;
}
.msg.success {
    background: rgb(49 90 128 / 8%);
    border: 1px solid rgba(0, 200, 83, 0.12);
    color: #81dea9;
    display: block;
}

/* ─────────── FORM ─────────── */
form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 0 1.2rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.input-group:focus-within {
    border-color: rgba(15, 140, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(15, 140, 255, 0.04);
}

.input-group i {
    color: rgba(255, 255, 255, 0.12);
    font-size: 1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.input-group:focus-within i {
    color: #0f8cff;
}

.input-group input {
    width: 100%;
    padding: 1.3rem 0.8rem;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
}

.input-group input::placeholder {
    color: rgb(231 228 228 / 70%);
    font-weight: 500;
}

.input-group input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #1e375c inset !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    border-radius: 0.5px;
}

/* Password toggle */
.toggle-pw {
    cursor: pointer;
    color: #fff;
    font-size: 0.9rem;
    transition: color 0.3s cubic-bezier(0.25, 0.1, 0.26, 0.84);
    background: rgb(33 35 38 / 20%);
    border: none;
    padding: 0 0 0 0.4rem;
    flex-shrink: 0;
}
.toggle-pw:hover {
    color: #eee;
}

/* ─────────── BUTTON ─────────── */
.login-btn {
    margin-top: 0.2rem;
    padding: 0.9rem 1.8rem;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f8cff, #0055cc);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 24px rgba(15, 140, 255, 0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.login-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #00c853, #0f8cff);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 36px rgba(15, 140, 255, 0.3);
}
.login-btn:hover::before {
    opacity: 1;
}
.login-btn:active {
    transform: translateY(0) scale(0.98);
}

.login-btn i,
.login-btn span {
    position: relative;
    z-index: 1;
}
.login-btn i {
    font-size: 1.1rem;
}

/* ─────────── DIVIDER ─────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.6rem 0 1rem;
}
.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #ff6b6b, #080708, transparent);
}
.divider-text {
    color: #ff6b6b;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ─────────── LINKS ─────────── */
.login-links {
    color: #cec4e9;
    font-size: 1rem;
    font-weight: 400;
}

.login-links a {
    color: #865f86;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.23rem;
    transition: color 0.3s ease;
    position: relative;

    
}

.login-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0f8cff, #00c853);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.login-links a:hover {
    color: #4da6ff;
}
.login-links a:hover::after {
    width: 100%;
}

.back-home {
    display: inline-block;
    margin-top: 1.2rem;
    color: #bf8383;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 400;
    transition: color 0.3s ease, transform 0.3s ease;
}

.back-home:hover {
    color: rgba(255, 255, 255, 0.25);
    transform: translateX(-3px);
}

.back-home i {
    margin-right: 4px;
    font-size: 0.7rem;
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.4rem 2rem;
        border-radius: 32px;
    }
    .login-logo {
        width: clamp(100px, 38vw, 140px);
    }
    .logo-wrapper::after {
        width: 130px;
        height: 130px;
    }
    .login-card h1 {
        font-size: 1.5rem;
    }
    .input-group input {
        font-size: 0.85rem;
        padding: 0.75rem 0.6rem;
    }
    .login-btn {
        font-size: 0.9rem;
        padding: 0.8rem 1.4rem;
    }
    body {
        padding: 1rem;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 1.6rem 1rem 1.8rem;
        border-radius: 28px;
    }
    .login-logo {
        width: clamp(80px, 32vw, 110px);
    }
    .logo-wrapper::after {
        width: 100px;
        height: 100px;
    }
    .login-card h1 {
        font-size: 1.3rem;
    }
    .login-card .subtitle {
        font-size: 0.75rem;
    }
}