/* =========================================================
   KWAIYA DYNASTY WELFARE SYSTEM
   SAAS PRO LOGIN
   Mobile First
   ========================================================= */

:root {
    --welfare-green: #198754;
    --welfare-green-dark: #146c43;
    --welfare-green-soft: #eaf7f0;

    --welfare-brown: #795548;
    --welfare-orange: #f28c28;

    --login-bg: #f6f8fa;
    --login-text: #172033;
    --login-muted: #6b7280;
    --login-border: #e5e9ee;
    --login-white: #ffffff;
}


/* =========================================================
   PAGE
   ========================================================= */

.login-page {
    min-height: 100vh;

    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(440px, .95fr);

    background: var(--login-bg);

    font-family:
        Inter,
        Poppins,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--login-text);
}


/* =========================================================
   LEFT BRAND PANEL
   ========================================================= */

.login-brand {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 100vh;

    padding: 60px clamp(40px, 7vw, 100px);

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #126d43 0%,
            #198754 55%,
            #157347 100%
        );

    color: #fff;
}


/* subtle background decoration */

.login-brand::before {
    content: "";

    position: absolute;

    width: 430px;
    height: 430px;

    right: -190px;
    top: -170px;

    border-radius: 50%;

    border: 1px solid rgba(255,255,255,.10);
    box-shadow:
        0 0 0 55px rgba(255,255,255,.025),
        0 0 0 110px rgba(255,255,255,.02);
}

.login-brand::after {
    content: "";

    position: absolute;

    width: 320px;
    height: 320px;

    left: -180px;
    bottom: -160px;

    border-radius: 50%;

    background: rgba(255,255,255,.035);
}


.brand-content {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 650px;

    margin: 0 auto;
}


/* =========================================================
   BRAND TOP
   ========================================================= */

.brand-top {
    display: flex;
    align-items: center;

    gap: 13px;

    margin-bottom: 55px;
}

.brand-icon {
    width: 48px;
    height: 48px;

    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.14);

    box-shadow:
        0 8px 24px rgba(0,0,0,.08);

    font-size: 19px;
}

.brand-small-title {
    margin-bottom: 3px;

    color: rgba(255,255,255,.68);

    font-size: 9px;
    font-weight: 750;

    letter-spacing: .11em;
    text-transform: uppercase;
}

.brand-top strong {
    display: block;

    color: #fff;

    font-size: 15px;
    font-weight: 750;
}


/* =========================================================
   BRAND HEADING
   ========================================================= */

.login-brand h1 {
    max-width: 600px;

    margin: 0;

    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.02;

    font-weight: 800;

    letter-spacing: -.045em;
}

.brand-highlight {
    color: #ffd08a;
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.brand-description {
    max-width: 570px;

    margin: 25px 0 0;

    color: rgba(255,255,255,.75);

    font-size: 14px;
    line-height: 1.75;
}


/* =========================================================
   ORANGE ACCENT
   ========================================================= */

.orange-line {
    width: 52px;
    height: 4px;

    margin-top: 27px;

    border-radius: 999px;

    background: var(--welfare-orange);
}


/* =========================================================
   FEATURES
   ========================================================= */

.feature-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 10px;

    max-width: 620px;
}

.feature-item {
    min-height: 68px;

    display: flex;
    align-items: center;

    gap: 9px;

    padding: 10px;

    border-radius: 10px;

    background: rgba(255,255,255,.065);
    border: 1px solid rgba(255,255,255,.075);

    transition:
        background .18s ease,
        transform .18s ease;
}

.feature-item:hover {
    transform: translateY(-2px);

    background: rgba(255,255,255,.105);
}

.feature-icon {
    width: 31px;
    height: 31px;

    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: rgba(255,255,255,.10);

    color: #ffd08a;

    font-size: 12px;
}

.feature-item span {
    color: rgba(255,255,255,.82);

    font-size: 10px;
    line-height: 1.3;
    font-weight: 650;
}


/* =========================================================
   LOGIN PANEL
   ========================================================= */

.login-panel {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px;
}

.login-box {
    width: 100%;
    max-width: 430px;
}


/* =========================================================
   LOGIN HEADER
   ========================================================= */

.login-header {
    margin-bottom: 30px;
}

.login-logo {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    border-radius: 12px;

    color: var(--welfare-green);

    background: var(--welfare-green-soft);

    font-size: 18px;
}

.login-header h2 {
    margin: 0;

    color: #111827;

    font-size: 30px;
    line-height: 1.2;

    font-weight: 800;

    letter-spacing: -.03em;
}

.login-subtitle {
    max-width: 380px;

    margin-top: 9px;

    color: var(--login-muted);

    font-size: 12px;
    line-height: 1.65;
}


/* =========================================================
   ALERTS
   ========================================================= */

.login-alert {
    display: flex;
    align-items: flex-start;

    border: 0;

    border-radius: 9px;

    padding: 11px 12px;

    font-size: 11px;
    line-height: 1.5;

    box-shadow: none;
}


/* =========================================================
   FORM
   ========================================================= */

.form-group {
    margin-bottom: 19px;
}

.form-label {
    display: block;

    margin-bottom: 7px;

    color: #374151;

    font-size: 11px;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;

    left: 14px;
    top: 50%;

    transform: translateY(-50%);

    z-index: 2;

    color: #9aa3af;

    font-size: 12px;

    pointer-events: none;

    transition: color .15s ease;
}

.input-wrapper:focus-within .input-icon {
    color: var(--welfare-green);
}

.login-box .form-control {
    width: 100%;

    height: 46px;

    padding:
        0 42px 0 40px;

    border: 1px solid var(--login-border);

    border-radius: 9px;

    background: #fff;

    color: #172033;

    font-size: 12px;

    box-shadow: none;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.login-box .form-control::placeholder {
    color: #a7afb9;
}

.login-box .form-control:hover {
    border-color: #d6dce3;
}

.login-box .form-control:focus {
    border-color: var(--welfare-green);

    box-shadow:
        0 0 0 3px rgba(25,135,84,.10);

    outline: none;
}


/* =========================================================
   PASSWORD TOGGLE
   ========================================================= */

.password-toggle {
    position: absolute;

    top: 50%;
    right: 8px;

    width: 32px;
    height: 32px;

    transform: translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 7px;

    background: transparent;

    color: #9aa3af;

    cursor: pointer;
}

.password-toggle:hover {
    color: var(--welfare-green);
    background: var(--welfare-green-soft);
}


/* =========================================================
   FORGOT PASSWORD
   ========================================================= */

.forgot-password-link {
    color: var(--welfare-green);

    font-size: 11px;
    font-weight: 700;

    text-decoration: none;

    transition: color .15s ease;
}

.forgot-password-link:hover {
    color: var(--welfare-green-dark);
    text-decoration: underline;
}


/* =========================================================
   LOGIN BUTTON
   ========================================================= */

.btn-login {
    width: 100%;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    border: 1px solid var(--welfare-green);

    border-radius: 9px;

    background: var(--welfare-green);

    color: #fff;

    font-size: 12px;
    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 5px 12px rgba(25,135,84,.14);

    transition:
        background .15s ease,
        border-color .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

.btn-login:hover {
    background: var(--welfare-green-dark);
    border-color: var(--welfare-green-dark);

    transform: translateY(-1px);

    box-shadow:
        0 7px 16px rgba(25,135,84,.18);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}


/* =========================================================
   LOGIN FOOTER
   ========================================================= */

.login-footer {
    margin-top: 30px;
    padding-top: 19px;

    border-top: 1px solid var(--login-border);

    text-align: center;

    color: #9aa3af;

    font-size: 9px;
    line-height: 1.6;
}

.login-footer strong {
    color: #667085;
    font-weight: 700;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    margin-top: 7px;

    color: var(--welfare-green);

    font-size: 9px;
}

.security-badge i {
    font-size: 9px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .login-page {
        grid-template-columns: minmax(0, 1fr) minmax(390px, .85fr);
    }

    .login-brand {
        padding: 45px;
    }

    .login-brand h1 {
        font-size: 48px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login-panel {
        padding: 30px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

    .login-page {
        display: block;

        min-height: 100vh;

        background: #fff;
    }

    /* Turn brand section into compact mobile header */

    .login-brand {
        min-height: auto;

        padding:
            24px 18px 28px;

        display: block;

        border-radius: 0 0 22px 22px;
    }

    .login-brand::before {
        width: 230px;
        height: 230px;

        right: -120px;
        top: -130px;
    }

    .login-brand::after {
        display: none;
    }

    .brand-top {
        margin-bottom: 28px;
    }

    .brand-icon {
        width: 42px;
        height: 42px;

        border-radius: 11px;

        font-size: 16px;
    }

    .brand-small-title {
        font-size: 8px;
    }

    .brand-top strong {
        font-size: 13px;
    }

    .login-brand h1 {
        max-width: 390px;

        font-size: 34px;

        line-height: 1.06;
    }

    .brand-description {
        margin-top: 14px;

        font-size: 11px;
        line-height: 1.6;
    }

    .orange-line {
        width: 40px;
        height: 3px;

        margin-top: 18px;
    }

    /* Hide feature grid on small screens.
       The login page stays focused and fast. */

    .feature-grid {
        display: none;
    }


    /* Login */

    .login-panel {
        min-height: auto;

        display: block;

        padding:
            30px 18px 25px;
    }

    .login-box {
        max-width: 100%;
    }

    .login-logo {
        width: 40px;
        height: 40px;

        margin-bottom: 15px;

        border-radius: 10px;

        font-size: 15px;
    }

    .login-header {
        margin-bottom: 24px;
    }

    .login-header h2 {
        font-size: 25px;
    }

    .login-subtitle {
        font-size: 11px;
    }

    .form-group {
        margin-bottom: 17px;
    }

    .login-box .form-control {
        height: 48px;

        font-size: 12px;
    }

    .btn-login {
        height: 48px;
    }

    .login-footer {
        margin-top: 26px;
    }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

    .login-brand {
        padding:
            20px 15px 24px;
    }

    .brand-top {
        margin-bottom: 23px;
    }

    .login-brand h1 {
        font-size: 29px;
    }

    .brand-description {
        font-size: 10px;
    }

    .login-panel {
        padding:
            26px 15px 20px;
    }

    .login-header h2 {
        font-size: 23px;
    }

    .login-subtitle {
        font-size: 10px;
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.login-page a:focus-visible,
.login-page button:focus-visible,
.login-page input:focus-visible {
    outline: 3px solid rgba(25,135,84,.15);
    outline-offset: 2px;
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .login-page *,
    .login-page *::before,
    .login-page *::after {
        transition: none !important;
        animation: none !important;
    }
}

