/* ==========================================================
   GRN AUTOMATION SUITE
   Muralya Login Page
   Version 1.0.0
========================================================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: #1f2937;
    background:
        radial-gradient(
            circle at top right,
            rgba(46, 156, 202, 0.1),
            transparent 32%
        ),
        #f4f7fb;
}

button,
input {
    font: inherit;
}

/* ==========================================================
   PAGE SHELL
========================================================== */

.auth-shell {
    min-height: 100vh;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-x: hidden;
}

.auth-card {
    width: min(1450px, 100%);
    height: auto;
    min-height: 0;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 42% 58%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(79, 45, 127, 0.08);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 28px 65px rgba(31, 41, 55, 0.14);
}

/* ==========================================================
   BRAND PANEL
========================================================== */

.brand-panel {
    position: relative;
    overflow: hidden;
    padding: 28px 52px 38px;
    display: flex;
    align-items: center;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 20% 28%,
            rgba(255, 255, 255, 0.07),
            transparent 30%
        ),
        linear-gradient(
            155deg,
            #2d174f 0%,
            #4f2d7f 52%,
            #311a58 100%
        );
}

.brand-panel::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 100%;
    background: linear-gradient(
        180deg,
        #2e9cca,
        #1e87b1
    );
}

.brand-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image:
        repeating-radial-gradient(
            ellipse at top left,
            transparent 0 13px,
            rgba(255, 255, 255, 0.22) 14px 15px
        );
    background-size: 420px 420px;
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.brand-logo {
    width: 340px;
    max-width: 90%;
    height: auto;

    object-fit: contain;
}

.brand-logo-wrapper{

    width: 320px;
    max-width: 88%;
    min-height: 145px;
    margin: 0 auto 24px;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 22px;
    box-shadow:
        0 18px 38px rgba(16, 10, 34, 0.24);
}

.brand-divider-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    color: #ffffff;
    font-size: 23px;
    background: rgba(255, 255, 255, 0.05);
}

.brand-content h1 {
    margin: 0;
    text-align: center;
    font-size: clamp(27px, 2.1vw, 34px);
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -0.4px;
    text-transform: uppercase;
}

.brand-tagline {
    margin: 12px 0 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.5;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.feature-item {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.feature-icon {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(46, 156, 202, 0.9);
    border-radius: 50%;
    color: #ffffff;
    font-size: 21px;
    background: rgba(255, 255, 255, 0.035);
}

.feature-item strong {
    display: block;
    margin-bottom: 5px;
    font-size: 17px;
}

.feature-item span {
    display: block;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

.brand-wave {
    position: absolute;
    z-index: 2;
    left: -8%;
    bottom: -195px;
    width: 120%;
    height: 230px;
    border-radius: 50%;
    background:
        radial-gradient(
            ellipse at center,
            rgba(227, 216, 241, 0.92),
            rgba(185, 159, 216, 0.7) 45%,
            transparent 72%
        );
    transform: rotate(-3deg);
}

/* ==========================================================
   FORM PANEL
========================================================== */

.form-panel {
    padding: 36px 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(
            circle at top right,
            rgba(46, 156, 202, 0.055),
            transparent 34%
        ),
        #ffffff;
}

.form-content {
    width: 100%;
    max-width: 650px;
}

.form-heading {
    margin-bottom: 28px;
    text-align: center;
}

.form-heading h2 {
    margin: 0;
    color: #243147;
    font-size: clamp(34px, 3vw, 48px);
    line-height: 1.15;
    font-weight: 760;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.form-heading h2 span {
    color: #4f2d7f;
}

.heading-accent {
    width: 86px;
    height: 4px;
    margin: 24px auto 18px;
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            #4f2d7f,
            #2e9cca
        );
}

.form-heading p {
    margin: 0;
    color: #667085;
    font-size: 18px;
}

.login-alert {
    margin-bottom: 22px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9f1d28;
    border: 1px solid #f0b8bd;
    border-radius: 10px;
    background: #fff4f5;
    font-size: 14px;
}

.login-alert-warning {
    color: #8a5a00;
    border-color: #efd28a;
    background: #fff9e8;
}

/* ==========================================================
   LOGIN FORM
========================================================== */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-field label {
    display: block;
    margin-bottom: 10px;
    color: #111827;
    font-size: 15px;
    font-weight: 650;
}

.field-control {
    position: relative;
}

.field-control input {
    width: 100%;
    height: 62px;
    padding: 0 62px 0 74px;
    color: #111827;
    outline: none;
    border: 1px solid #d4d9e2;
    border-radius: 11px;
    background: #ffffff;
    font-size: 16px;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.field-control input::placeholder {
    color: #8a94a6;
}

.field-control input:focus {
    border-color: #4f2d7f;
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(79, 45, 127, 0.12);
}

.field-icon {
    position: absolute;
    z-index: 2;
    left: 0;
    top: 0;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    color: #4f2d7f;
    border-right: 1px solid #d9dce4;
    border-radius: 11px 0 0 11px;
    background: rgba(79, 45, 127, 0.035);
    font-size: 23px;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
    width: 58px;
    height: 62px;
    display: grid;
    place-items: center;
    color: #475467;
    border: 0;
    background: transparent;
    font-size: 21px;
    cursor: pointer;
}

.password-toggle:hover {
    color: #4f2d7f;
}

.caps-warning {
    display: none;
    margin-top: 9px;
    color: #a86400;
    font-size: 13px;
}

.sign-in-button {
    width: 100%;
    height: 62px;
    margin-top: 3px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 0;
    border-radius: 11px;
    background:
        linear-gradient(
            90deg,
            #4f2d7f,
            #682e99
        );
    box-shadow:
        0 12px 27px rgba(79, 45, 127, 0.22);
    font-size: 18px;
    font-weight: 650;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.sign-in-button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 15px 32px rgba(79, 45, 127, 0.29);
}

.sign-in-button:disabled {
    opacity: 0.78;
    cursor: not-allowed;
    transform: none;
}

.sign-in-button i {
    margin-right: 8px;
}

.is-hidden {
    display: none !important;
}

.button-spinner {
    width: 16px;
    height: 16px;
    margin-right: 9px;
    display: inline-block;
    vertical-align: -3px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================
   SUPPORT
========================================================== */

.access-divider {
    margin: 36px 0 26px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: #667085;
    font-size: 14px;
}

.access-divider::before,
.access-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #d9dde5;
}

.support-card {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    color: #4f2d7f;
    border: 1px solid rgba(79, 45, 127, 0.2);
    border-radius: 11px;
    background:
        linear-gradient(
            135deg,
            rgba(79, 45, 127, 0.035),
            rgba(46, 156, 202, 0.035)
        );
}

.support-card > i {
    flex: 0 0 auto;
    font-size: 34px;
}

.support-card strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
}

.support-card span {
    display: block;
    color: #667085;
    font-size: 13px;
}

/* ==========================================================
   FOOTER
========================================================== */

.auth-footer {
    width: min(1450px, 100%);
    min-height: 52px;
    margin: 0 auto;
    padding: 10px 30px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 22px;
    color: #667085;
    border-top: 1px solid #e3e6ec;
    background: #ffffff;
    border-radius: 0 0 20px 20px;
    font-size: 12px;
}

.auth-footer > :nth-child(2) {
    text-align: center;
}

.auth-footer > :last-child {
    justify-self: end;
}

.environment-label {
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dde2e9;
    border-radius: 8px;
    background: #ffffff;
    box-shadow:
        0 3px 10px rgba(15, 23, 42, 0.06);
}

.environment-label i {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 50%;
    background: #20a35b;
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 1050px) {
    .auth-card {
        grid-template-columns: 40% 60%;
    }

    .brand-panel {
        padding: 50px 42px 85px;
    }

    .form-panel {
        padding: 55px;
    }
}

@media (max-width: 850px) {
    .auth-shell {
        padding: 18px;
    }

    .auth-card {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .brand-panel {
        min-height: 470px;
        padding: 46px 28px 80px;
    }

    .brand-panel::after {
        display: none;
    }

    .brand-logo {
        width: 230px;
        margin-bottom: 25px;
    }

    .brand-divider-icon {
        display: none;
    }

    .brand-content h1 {
        font-size: 30px;
    }

    .brand-tagline {
        margin-bottom: 30px;
    }

    .feature-list {
        max-width: 460px;
        margin: 0 auto;
    }

    .form-panel {
        padding: 48px 30px;
    }

    .auth-footer {
        padding: 20px;
        grid-template-columns: 1fr;
        text-align: center;
        border-radius: 0 0 20px 20px;
    }

    .auth-footer > :last-child {
        justify-self: center;
    }
}

@media (max-width: 520px) {
    .auth-shell {
        padding: 0;
    }

    .auth-card {
        border-radius: 0;
        box-shadow: none;
    }

    .brand-panel {
        min-height: 415px;
        padding: 36px 20px 70px;
    }

    .brand-logo {
        width: 195px;
    }

    .brand-content h1 {
        font-size: 25px;
    }

    .brand-tagline {
        font-size: 14px;
    }

    .feature-icon {
        flex-basis: 50px;
        width: 50px;
        height: 50px;
        font-size: 21px;
    }

    .feature-item strong {
        font-size: 14px;
    }

    .feature-item span {
        font-size: 12px;
    }

    .form-panel {
        padding: 38px 18px 42px;
    }

    .form-heading h2 {
        font-size: 30px;
    }

    .field-control input,
    .field-icon,
    .password-toggle,
    .sign-in-button {
        height: 56px;
    }

    .field-icon {
        width: 56px;
    }

    .field-control input {
        padding-left: 67px;
    }

    .support-card {
        align-items: flex-start;
    }

    .auth-footer {
        border-radius: 0;
    }
}

/* ==========================================================
   FIT LEFT PANEL WITHIN DESKTOP VIEWPORT
========================================================== */

@media (min-width: 851px) {

    .brand-panel {
        padding:
            clamp(16px, 2vh, 28px)
            42px
            clamp(18px, 2vh, 30px);
    }

    .brand-content {
        max-width: 500px;
    }

    .brand-logo-wrapper {
        width: 290px;
        max-width: 82%;
        min-height: 118px;
        margin: 0 auto 14px;
        padding: 14px 22px;
        border-radius: 18px;
    }

    .brand-logo {
        width: 235px;
        max-height: 105px;
        object-fit: contain;
    }

    .brand-divider-icon {
        width: 46px;
        height: 46px;
        margin: 0 auto 10px;
        font-size: 20px;
    }

    .brand-content h1 {
        font-size: clamp(24px, 1.8vw, 31px);
        line-height: 1.15;
    }

    .brand-tagline {
        margin: 8px 0 14px;
        font-size: 14px;
    }

    .feature-list {
        gap: 8px;
    }

    .feature-item {
        padding: 6px 8px;
        gap: 12px;
    }

    .feature-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .feature-item strong {
        margin-bottom: 2px;
        font-size: 14px;
    }

    .feature-item span {
        font-size: 12px;
    }

}