/* ================================
   GLOBAL RESET
================================ */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a, #1e293b);

    min-height: 100svh;   /* modern mobile safe height */
    display: flex;
    justify-content: center;
    align-items: center;

    padding: 16px;
}

/* ================================
   CONTAINER
================================ */
.login-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* ================================
   GLASS CARD
================================ */

.login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    padding: 45px 35px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 20px 45px rgba(0,0,0,0.45);
    text-align: center;
    color: #fff;
}

.login-card h2 {
    margin-bottom: 8px;
    font-size: 26px;
}

.subtitle {
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 28px;
}

/* ================================
   INPUTS
================================ */
.input-group {
    position: relative;
    margin-bottom: 24px;
}

.input-group input {
    width: 100%;
    padding: 14px 10px;
    background: transparent;
    border: none;
    border-bottom: 2px solid #475569;
    outline: none;
    color: #fff;
    font-size: 15px;
}

.input-group label {
    position: absolute;
    left: 10px;
    top: 14px;
    font-size: 14px;
    color: #94a3b8;
    transition: 0.3s ease;
    pointer-events: none;
}

/* Floating Label */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: -9px;
    font-size: 12px;
    color: #38bdf8;
}

/* ================================
   SUCCESS / ERROR
================================ */
.success-box {
    background: rgba(0,255,120,0.12);
    color: #00ff9d;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
}

.error-box {
    background: rgba(255,0,0,0.12);
    color: #ff6b6b;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
}

/* ================================
   BUTTON
================================ */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #6366f1, #38bdf8);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99,102,241,0.4);
}

/* ================================
   EXTRA LINKS
================================ */
.extra-links {
    margin-top: 22px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.extra-links a {
    color: #38bdf8;
    font-size: 13px;
    text-decoration: none;
}

.extra-links a:hover {
    text-decoration: underline;
}

/* =================================
   REMOVE BROWSER AUTOFILL STYLES
================================= */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
    transition: background-color 9999s ease-in-out 0s;
}

/* =================================
   TEXT SELECTION (CLEAN)
================================= */
input::selection {
    background: rgba(56, 189, 248, 0.25);
    color: #ffffff;
}

input::-moz-selection {
    background: rgba(56, 189, 248, 0.25);
    color: #ffffff;
}

/* =================================
   TABLETS & SMALL LAPTOPS
================================= */
@media (max-width: 900px) {

    body {
        align-items: flex-start;
    }

    .login-container {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .login-card {
        padding: 38px 28px;
    }
}

/* =================================
   MOBILE PHONES
================================= */
@media (max-width: 600px) {

    body {
        padding: 14px;
    }

    .login-card {
        width: 100%;
        max-width: 420px;
        padding: 44px 26px;
        border-radius: 16px;
    }

    .login-card h2 {
        font-size: 26px;
    }

    .login-btn {
        padding: 15px;
        font-size: 15px;
    }

    .subtitle {
        font-size: 13px;
    }

    .input-group input {
        font-size: 14px;
        padding: 13px 10px;
    }

    .extra-links {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* =================================
   EXTRA SMALL DEVICES
================================= */
@media (max-width: 380px) {

    .login-card {
        padding: 28px 18px;
    }

    .login-card h2 {
        font-size: 21px;
    }
}
@supports (height: 100dvh) {
    body {
        min-height: 100dvh;
    }
}
