/* =========================================================
   ePRMS LOGIN - full-screen layout
   Uses the design tokens from screen.css (--eprms-green etc.)
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body.login-screen {
    height: 100%;
}

/* screen.css gives body a 1000px min-width for the app chrome;
   the login page is responsive and must not inherit it */
body.login-screen {
    min-width: 0;
    margin: 0;
    padding: 0;

    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: var(--text);

    background: var(--background);
}


/* Two-column shell
--------------------------------------------------------- */

.login-shell {
    min-height: 100vh;

    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}


/* Left: brand panel
--------------------------------------------------------- */

.login-brand {
    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 48px 56px;

    color: #ffffff;

    background:
        radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.14), transparent 40%),
        radial-gradient(circle at 90% 95%, rgba(0, 0, 0, 0.18), transparent 45%),
        linear-gradient(150deg, var(--eprms-green) 0%, var(--eprms-green-dark) 55%, #0f5132 100%);
}

/* soft rings in the background */
.login-brand::before,
.login-brand::after {
    content: "";
    position: absolute;

    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.10);

    pointer-events: none;
}

.login-brand::before {
    width: 520px;
    height: 520px;
    right: -180px;
    top: -160px;
}

.login-brand::after {
    width: 380px;
    height: 380px;
    left: -140px;
    bottom: -120px;
}

.brand-top,
.brand-main,
.brand-bottom {
    position: relative;
    z-index: 1;
}

.brand-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 56px;
    height: 56px;

    border-radius: 14px;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.brand-name {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand-main {
    max-width: 480px;
}

.brand-main h1 {
    margin: 0 0 16px;

    font-size: 34px;
    font-weight: 600;
    line-height: 1.25;

    color: #ffffff;
}

.brand-main p {
    margin: 0 0 34px;

    font-size: 15px;
    line-height: 1.6;

    color: rgba(255, 255, 255, 0.82);
}

.brand-features {
    margin: 0;
    padding: 0;

    list-style: none;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 16px;

    font-size: 14px;
    color: rgba(255, 255, 255, 0.92);
}

.brand-features i {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.14);

    font-size: 16px;
}

.brand-bottom {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
}


/* Right: sign-in panel
--------------------------------------------------------- */

.login-panel {
    display: flex;
    flex-direction: column;

    background: linear-gradient(180deg, #f7faf8 0%, #f1f5f3 100%);

    border-top: 3px solid var(--eprms-green);
}

.login-panel-body {
    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 48px 32px;
}

.login-card {
    width: 100%;
    max-width: 420px;

    padding: 38px 40px 34px;

    background: var(--white);

    border: 1px solid var(--border-light);
    border-radius: var(--radius-large);

    box-shadow: var(--shadow);
}

.login-logo {
    display: block;

    height: 64px;
    width: auto;

    margin: 0 0 28px;
}

.login-heading {
    margin: 0 0 6px;

    font-size: 22px;
    font-weight: 600;

    color: var(--text-dark);
}

.login-subheading {
    margin: 0 0 28px;

    font-size: 13px;
    color: var(--text-light);
}


/* Form
--------------------------------------------------------- */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 13px;
    font-weight: 600;

    color: var(--text-dark);
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 16px;
    color: var(--text-light);

    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    height: 46px;

    padding: 0 15px 0 44px;

    border: 1px solid #dce3df;
    border-radius: var(--radius);

    background: #fafcfb;

    font-family: inherit;
    font-size: 14px;
    color: var(--text-dark);

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #a5ada8;
}

.input-wrapper input:focus {
    background: var(--white);
    border-color: var(--eprms-green);
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.14);
}

.input-wrapper:focus-within i {
    color: var(--eprms-green);
}


/* Button
--------------------------------------------------------- */

.login-button {
    width: 100%;
    height: 48px;

    margin-top: 6px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    border: 0;
    border-radius: var(--radius);

    background: linear-gradient(135deg, var(--eprms-green), var(--eprms-green-dark));

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;

    cursor: pointer;

    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.22);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.login-button:hover {
    background: linear-gradient(135deg, var(--eprms-green-dark), #0f5132);
    box-shadow: 0 7px 16px rgba(25, 135, 84, 0.28);
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:focus-visible {
    outline: 3px solid rgba(25, 135, 84, 0.35);
    outline-offset: 2px;
}

.login-button i {
    font-size: 14px;
}


/* Error message
--------------------------------------------------------- */

.login-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin: -2px 0 18px;
    padding: 12px 14px;

    border: 1px solid #f1caca;
    border-radius: var(--radius);

    background: #fff4f4;

    font-size: 13px;
    line-height: 1.5;
    color: #b02a37;
}

.login-error > i {
    margin-top: 2px;
    font-size: 16px;
}


/* Footer (same look as the app footer)
--------------------------------------------------------- */

.login-footer {
    padding: 18px 32px;

    border-top: 1px solid var(--border-light);

    background: var(--white);

    font-size: 12px;
    text-align: center;
    color: #8b9690;
}

.login-footer strong {
    color: var(--text);
}


/* Tablet / mobile: stack, brand becomes a header band
--------------------------------------------------------- */

@media (max-width: 900px) {

    .login-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .login-brand {
        padding: 24px 28px;
    }

    .brand-main,
    .brand-bottom {
        display: none;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
        border-radius: 11px;
    }

    .brand-name {
        font-size: 22px;
    }

    .login-panel {
        border-top: 0;
    }

    .login-panel-body {
        align-items: flex-start;
        padding: 32px 20px;
    }
}

@media (max-width: 480px) {

    .login-card {
        padding: 28px 22px 24px;
    }

    .login-logo {
        height: 52px;
        margin-bottom: 22px;
    }

    .login-footer {
        padding: 16px 20px;
    }
}
