/* =========================================================
   SARKARI KAAM
   SECURE LOGIN PAGE
   VERSION 5.0
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --blue: #0b4ea2;
    --blue-dark: #063570;
    --blue-light: #eaf3ff;

    --text: #172033;
    --muted: #667085;
    --white: #ffffff;

    --bg: #f4f7fb;
    --border: #dfe5ee;

    --success: #16834b;
    --danger: #d92d20;

    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;

    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(11, 78, 162, 0.08),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(245, 158, 11, 0.07),
            transparent 28%
        ),
        var(--bg);

    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}


/* =========================================================
   PAGE
   ========================================================= */

.auth-page {
    min-height: 100vh;

    padding: 40px 20px;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* =========================================================
   LOGIN CARD
   ========================================================= */

.login-card {
    position: relative;

    width: 100%;
    max-width: 470px;

    padding: 38px 40px;

    background: rgba(255, 255, 255, 0.98);

    border: 1px solid rgba(223, 229, 238, 0.9);

    border-radius: 22px;

    box-shadow: var(--shadow);
}


/* =========================================================
   TOP DECORATION
   ========================================================= */

.login-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 12%;

    width: 76%;
    height: 4px;

    border-radius: 0 0 10px 10px;

    background:
        linear-gradient(
            90deg,
            var(--blue),
            #287bd4,
            #f59e0b
        );
}


/* =========================================================
   BRAND
   ========================================================= */

.brand {
    display: flex;
    align-items: center;

    gap: 12px;

    width: fit-content;

    margin: 0 auto;
}

.brand-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            var(--blue),
            #287bd4
        );

    color: #fff;

    box-shadow:
        0 8px 20px rgba(11, 78, 162, 0.22);
}

.brand-icon i {
    font-size: 21px;
}

.brand div:last-child {
    display: flex;
    flex-direction: column;
}

.brand strong {
    color: var(--blue);

    font-size: 20px;
    line-height: 1.2;
}

.brand span {
    margin-top: 3px;

    color: var(--muted);

    font-size: 11px;
}


/* =========================================================
   LOGIN HEADING
   ========================================================= */

.login-heading {
    margin-top: 32px;

    text-align: center;
}

.lock-icon {
    width: 56px;
    height: 56px;

    margin: 0 auto 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--blue-light);

    color: var(--blue);

    font-size: 21px;
}

.login-heading h1 {
    font-size: 28px;

    line-height: 1.25;

    letter-spacing: -0.5px;
}

.login-heading p {
    margin-top: 7px;

    color: var(--muted);

    font-size: 13px;
}


/* =========================================================
   MESSAGE
   ========================================================= */

.message {
    margin-top: 22px;

    padding: 12px 14px;

    border-radius: 10px;

    font-size: 13px;
    line-height: 1.5;
}

.message.success {
    background: #e9f8ef;
    border: 1px solid #b8e4c9;
    color: var(--success);
}

.message.error {
    background: #fff0ef;
    border: 1px solid #f5c2bf;
    color: var(--danger);
}


/* =========================================================
   FORM
   ========================================================= */

#loginForm {
    margin-top: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #344054;

    font-size: 13px;
    font-weight: 700;
}


/* =========================================================
   LABEL ROW
   ========================================================= */

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 8px;
}

.label-row label {
    margin-bottom: 0;
}

.label-row a {
    color: var(--blue);

    font-size: 12px;
    font-weight: 700;
}

.label-row a:hover {
    text-decoration: underline;
}


/* =========================================================
   INPUT
   ========================================================= */

.input-wrap {
    position: relative;

    display: flex;
    align-items: center;
}

.input-wrap > i {
    position: absolute;

    left: 15px;

    color: #98a2b3;

    font-size: 15px;

    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    height: 50px;

    padding: 0 45px;

    border: 1px solid var(--border);

    border-radius: 11px;

    background: #fff;

    color: var(--text);

    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.input-wrap input::placeholder {
    color: #98a2b3;
}

.input-wrap input:hover {
    border-color: #b9c4d3;
}

.input-wrap input:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 4px rgba(11, 78, 162, 0.09);
}


/* =========================================================
   PASSWORD TOGGLE
   ========================================================= */

.password-toggle {
    position: absolute;

    right: 7px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color: #98a2b3;

    cursor: pointer;

    transition: 0.2s ease;
}

.password-toggle:hover {
    background: var(--blue-light);

    color: var(--blue);
}


/* =========================================================
   FIELD ERROR
   ========================================================= */

.field-error {
    display: block;

    min-height: 17px;

    margin-top: 5px;

    color: var(--danger);

    font-size: 11px;
}

.input-wrap.invalid input {
    border-color: var(--danger);

    background: #fffafa;
}

.input-wrap.valid input {
    border-color: var(--success);
}


/* =========================================================
   REMEMBER
   ========================================================= */

.remember-row {
    margin-top: -2px;
    margin-bottom: 20px;
}

.checkbox {
    display: inline-flex !important;

    align-items: center;

    gap: 9px;

    margin: 0 !important;

    color: #475467 !important;

    font-size: 13px !important;

    font-weight: 500 !important;

    cursor: pointer;
}

.checkbox input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}

.checkbox span {
    width: 18px;
    height: 18px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #c8d0dc;

    border-radius: 5px;

    background: #fff;

    transition: 0.2s ease;
}

.checkbox input:checked + span {
    background: var(--blue);

    border-color: var(--blue);
}

.checkbox input:checked + span::after {
    content: "✓";

    color: #fff;

    font-size: 12px;

    font-weight: 800;
}


/* =========================================================
   LOGIN BUTTON
   ========================================================= */

.login-button {
    width: 100%;
    min-height: 52px;

    border: 0;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            var(--blue),
            #1769c8
        );

    color: #fff;

    font-size: 14px;

    font-weight: 800;

    box-shadow:
        0 8px 20px rgba(11, 78, 162, 0.22);

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow:
        0 12px 25px rgba(11, 78, 162, 0.28);
}

.login-button:active:not(:disabled) {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.7;

    cursor: not-allowed;
}

.button-loader {
    align-items: center;
    justify-content: center;

    gap: 8px;
}

.button-loader:not([hidden]) {
    display: flex;
}


/* =========================================================
   REGISTER
   ========================================================= */

.register-text {
    margin-top: 22px;

    text-align: center;

    color: var(--muted);

    font-size: 13px;
}

.register-text a {
    margin-left: 4px;

    color: var(--blue);

    font-weight: 800;
}

.register-text a:hover {
    text-decoration: underline;
}


/* =========================================================
   SECURITY NOTE
   ========================================================= */

.security-note {
    margin-top: 25px;

    padding: 13px;

    display: flex;
    align-items: flex-start;

    gap: 11px;

    border: 1px solid #dce8f7;

    border-radius: 11px;

    background: #f5f9ff;
}

.security-note > i {
    margin-top: 2px;

    color: var(--blue);

    font-size: 17px;
}

.security-note div {
    display: flex;
    flex-direction: column;

    gap: 2px;
}

.security-note strong {
    color: #344054;

    font-size: 12px;
}

.security-note span {
    color: var(--muted);

    font-size: 11px;

    line-height: 1.5;
}


/* =========================================================
   FOOT LINKS
   ========================================================= */

.footer-links {
    margin-top: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    color: #98a2b3;

    font-size: 11px;
}

.footer-links a:hover {
    color: var(--blue);
}


/* =========================================================
   COPYRIGHT
   ========================================================= */

.copyright {
    margin-top: 12px;

    text-align: center;

    color: #98a2b3;

    font-size: 10px;
}


/* =========================================================
   FOCUS
   ========================================================= */

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(11, 78, 162, 0.2);

    outline-offset: 2px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .auth-page {
        padding: 20px 14px;
    }

    .login-card {
        padding: 32px 22px;

        border-radius: 18px;
    }

    .login-heading h1 {
        font-size: 25px;
    }

    .brand strong {
        font-size: 19px;
    }

    .brand span {
        font-size: 10px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .auth-page {
        padding: 12px 10px;
    }

    .login-card {
        padding: 28px 17px;
    }

    .brand-icon {
        width: 44px;
        height: 44px;
    }

    .brand strong {
        font-size: 17px;
    }

    .login-heading {
        margin-top: 27px;
    }

    .login-heading h1 {
        font-size: 23px;
    }

    .footer-links {
        gap: 6px;
        font-size: 10px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;

        animation-duration: 0.01ms !important;
    }
}