/* ========== Global Reset & Font ========== */
html,
body {
    height: 100%;
    margin: 0;
    font-family: "Inter", "Poppins", sans-serif;
    background: #f7fafd;
}

/* ========== Layout Split ========== */
.login-split {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
}

/* Image side */
.login-img-side {
    flex: 1 1 0;
    min-width: 50%;
    min-height: 350px;
    background-size: cover;
    background-position: center;
}

/* Form side */
.login-form-side {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f7fafd;
    padding: 40px 15px;
}

/* ========== Card Container ========== */
.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 5rem 2rem 2.2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin: 0 auto;
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.23),
        0 -12px 32px rgba(0, 0, 0, 0.13);
    transition: transform 0.25s ease;
}

.login-card:hover {
    transform: translateY(-3px);
}

/* ========== Logo ========== */
.login-logo {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    border: solid 4px white;
    background: #fff;
    overflow: hidden;
    position: absolute;
    top: -47px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== Headings ========== */
.login-card h4 {
    color: #182c49;
    font-weight: 700;
    font-size: 18px;
    margin: 0.3rem 0 0.5rem;
}

.system-version {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 16px;
    text-align: center;
}

/* ========== Inputs (Outlined with Label) ========== */
.md-field {
    position: relative;
    margin-bottom: 1.5rem;
}

.md-input.form-control,
.md-field .input-group .form-control {
    border: 1.6px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.85rem 0.9rem;
    font-size: 0.95rem;
    background-color: #f7fafd;
    /* matches card */
    transition: all 0.2s ease;
}

.md-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

/* Label sits on top border notch */
.md-label {
    position: absolute;
    top: -0.42rem;
    left: 0.5rem;
    padding: 0 .4rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
    background: #f7fafd;
    /* same as input bg */
    border-radius: 0.25rem;
    line-height: 1;
    z-index: 5;
    pointer-events: none;
    transition: color 0.2s ease;
}

.md-field:focus-within .md-label {
    color: #2563eb;
}

/* Input-group (password eye toggle) */
.md-field .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.md-field .input-group .input-group-text {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0;
    cursor: pointer;
}

/* ========== Buttons ========== */
.btn-login {
    background-color: #ce9000d7;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem;
    border-radius: 8px;
    color: #fff;
    transition: all 0.25s ease-in-out;
}

.btn-login:hover {
    background-color: #FFB050;
    color: #fff !important;
}

/* ========== Links & Footer ========== */
.forgot-link {
    font-size: 14px;
    color: #2563eb;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #1e40af;
}

.footer-note {
    margin-top: 18px;
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
}

/* ========== Mobile ========== */
@media (max-width: 991px) {
    .login-split {
        flex-direction: column;
    }

    .login-img-side {
        height: 70vh;
        width: 100%;
    }

    .login-form-side {
        margin-top: -80px;
        padding: 0 15px 30px;
        background: none;
    }

    .login-card {
        width: calc(105% - 30px);
        padding: 3.8rem 1.5rem 1.8rem;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
    }

    .login-logo {
        width: 80px;
        height: 80px;
        top: -40px;
    }
}

/* ========== Extra ========== */
#username {
    text-transform: uppercase;
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}