:root {
    --login-green-950: #052e1a;
    --login-green-900: #0a3d24;
    --login-green-850: #0d4a2b;
    --login-green-800: #116034;
    --login-green-700: #168447;
    --login-green-600: #20a65a;
    --login-green-500: #2ecc71;
    --login-green-400: #55d98c;
    --login-green-300: #86efac;
    --login-green-100: #dcfce7;
    --login-surface: rgba(255, 255, 255, .96);
    --login-text: #183126;
    --login-muted: #6b7f75;
    --login-danger: #d43f3a;
    --login-shadow: 0 30px 80px rgba(3, 38, 21, .34);
    --login-spring: cubic-bezier(.2, .8, .2, 1);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
}

body.login-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--login-text);
    background:
        linear-gradient(135deg, rgba(5, 46, 26, .93), rgba(13, 74, 43, .80)),
        url("../images/bg_sanmar.f195c76d2c34.jpg") center / cover fixed no-repeat,
        var(--login-green-950);
    font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.login-background,
.login-background::before,
.login-background::after {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.login-background {
    z-index: 0;
    overflow: hidden;
}

.login-background::before {
    content: "";
    inset: -30%;
    background:
        radial-gradient(circle at 18% 24%, rgba(134, 239, 172, .24), transparent 20%),
        radial-gradient(circle at 82% 14%, rgba(85, 217, 140, .17), transparent 24%),
        radial-gradient(circle at 72% 88%, rgba(103, 232, 249, .12), transparent 24%);
    animation: loginAurora 16s ease-in-out infinite alternate;
}

.login-background::after {
    content: "";
    opacity: .15;
    background-image:
        linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 85%);
}

.login-orb {
    position: fixed;
    z-index: 0;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(1px);
    opacity: .26;
    transition: transform .35s ease-out;
}

.login-orb.one {
    top: -95px;
    left: -65px;
    background: rgba(85, 217, 140, .50);
    animation: orbFloatOne 10s ease-in-out infinite alternate;
}

.login-orb.two {
    right: -105px;
    bottom: -90px;
    background: rgba(103, 232, 249, .32);
    animation: orbFloatTwo 12s ease-in-out infinite alternate;
}

.login-orb.three {
    top: 42%;
    left: 47%;
    width: 120px;
    height: 120px;
    background: rgba(187, 247, 208, .22);
    animation: orbFloatOne 8s ease-in-out infinite alternate-reverse;
}

.login-page-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
}

.login-shell {
    width: min(1120px, 100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(390px, .88fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: 30px;
    background: rgba(4, 39, 22, .34);
    box-shadow: var(--login-shadow);
    backdrop-filter: blur(20px);
    animation: shellEnter .75s var(--login-spring) both;
}

.login-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 54px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 12% 8%, rgba(134, 239, 172, .18), transparent 28%),
        linear-gradient(150deg, rgba(5, 46, 26, .70), rgba(17, 96, 52, .47));
}

.login-brand-panel::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -180px;
    bottom: -170px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow:
        0 0 0 34px rgba(255,255,255,.035),
        0 0 0 72px rgba(255,255,255,.025);
}

.login-brand-top,
.login-brand-content,
.login-brand-footer {
    position: relative;
    z-index: 2;
}

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

.login-brand-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255,255,255,.20), rgba(255,255,255,.06));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 12px 28px rgba(0,0,0,.18);
    transition: transform .35s var(--login-spring), box-shadow .35s ease;
}

.login-brand-mark:hover {
    transform: translateY(-4px) rotate(-4deg) scale(1.04);
    box-shadow: 0 18px 34px rgba(46, 204, 113, .24);
}

.login-brand-mark img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.login-brand-name strong {
    display: block;
    font-size: 19px;
    letter-spacing: .2px;
}

.login-brand-name span {
    display: block;
    margin-top: 3px;
    color: rgba(220, 252, 231, .72);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .85px;
    text-transform: uppercase;
}

.login-brand-content {
    max-width: 600px;
    padding: 54px 0 40px;
}

.login-kicker {
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 13px;
    border: 1px solid rgba(187, 247, 208, .25);
    border-radius: 999px;
    color: #dcfce7;
    background: rgba(220, 252, 231, .08);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.login-brand-content h1 {
    max-width: 650px;
    margin: 0;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.03;
    letter-spacing: -2px;
}

.login-brand-content h1 span {
    display: block;
    color: var(--login-green-300);
}

.login-brand-content > p {
    max-width: 560px;
    margin: 22px 0 0;
    color: rgba(236, 253, 245, .78);
    font-size: 15px;
    line-height: 1.75;
}

.login-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
}

.login-feature {
    min-height: 112px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .065);
    transition: transform .28s var(--login-spring), background .28s ease, border-color .28s ease;
}

.login-feature:hover {
    transform: translateY(-5px);
    border-color: rgba(134, 239, 172, .34);
    background: rgba(220, 252, 231, .11);
}

.login-feature i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    border-radius: 11px;
    color: #bbf7d0;
    background: rgba(134, 239, 172, .13);
}

.login-feature strong {
    display: block;
    font-size: 13px;
}

.login-feature span {
    display: block;
    margin-top: 4px;
    color: rgba(236, 253, 245, .63);
    font-size: 11px;
    line-height: 1.45;
}

.login-brand-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: rgba(220, 252, 231, .62);
    font-size: 11px;
}

.login-system-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.login-system-status::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #86efac;
    box-shadow: 0 0 0 6px rgba(134, 239, 172, .10);
    animation: statusPulse 2s ease-in-out infinite;
}

.login-auth-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px 48px;
    background:
        radial-gradient(circle at 100% 0%, rgba(46, 204, 113, .10), transparent 30%),
        var(--login-surface);
}

.login-clock {
    position: absolute;
    top: 22px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid #dcefe5;
    border-radius: 14px;
    color: var(--login-green-800);
    background: rgba(248, 253, 250, .86);
    box-shadow: 0 10px 24px rgba(7, 61, 34, .07);
}

.login-clock i {
    color: var(--login-green-600);
}

.login-clock-time {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .4px;
}

.login-clock-date {
    display: block;
    margin-top: 1px;
    color: var(--login-muted);
    font-size: 9px;
    font-weight: 700;
}

.login-form-wrap {
    width: 100%;
    max-width: 410px;
    margin: 0 auto;
    animation: formEnter .7s .12s var(--login-spring) both;
}

.login-form-heading {
    margin-bottom: 28px;
}

.login-greeting {
    display: block;
    margin-bottom: 7px;
    color: var(--login-green-700);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .45px;
    text-transform: uppercase;
}

.login-form-heading h2 {
    margin: 0;
    color: var(--login-green-950);
    font-size: 31px;
    line-height: 1.15;
    letter-spacing: -.65px;
}

.login-form-heading p {
    margin: 10px 0 0;
    color: var(--login-muted);
    font-size: 13px;
    line-height: 1.65;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #ffd5d2;
    border-radius: 14px;
    color: #9f2925;
    background: #fff1f0;
    font-size: 12px;
    line-height: 1.5;
    animation: alertShake .45s ease both;
}

.login-alert i {
    margin-top: 2px;
    color: var(--login-danger);
}

.login-field {
    margin-bottom: 18px;
}

.login-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--login-green-900);
    font-size: 12px;
    font-weight: 900;
}

.login-field-label small {
    color: #8da095;
    font-size: 10px;
    font-weight: 700;
}

.login-input-wrap {
    position: relative;
}

.login-input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 2;
    color: #83a18f;
    transform: translateY(-50%);
    transition: color .24s ease, transform .24s var(--login-spring);
}

.login-input {
    width: 100%;
    min-height: 52px;
    padding: 12px 48px 12px 45px;
    outline: none;
    border: 1px solid #dce9e1;
    border-radius: 15px;
    color: var(--login-text);
    background: #f8fcfa;
    box-shadow: inset 0 1px 2px rgba(7, 61, 34, .025);
    transition: border-color .24s ease, background .24s ease, box-shadow .24s ease, transform .24s var(--login-spring);
}

.login-input::placeholder {
    color: #9db0a5;
}

.login-input:hover {
    border-color: #b9ddc8;
    background: #fff;
}

.login-input:focus {
    border-color: var(--login-green-500);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(46, 204, 113, .12), 0 12px 25px rgba(7, 61, 34, .07);
    transform: translateY(-1px);
}

.login-input:focus ~ .login-input-icon,
.login-input-wrap:focus-within .login-input-icon {
    color: var(--login-green-600);
    transform: translateY(-50%) scale(1.08);
}

.login-password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 11px;
    color: #7e9788;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .24s ease, background .24s ease, transform .24s var(--login-spring);
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
    color: var(--login-green-700);
    background: var(--login-green-100);
}

.login-password-toggle:active {
    transform: translateY(-50%) scale(.92);
}

.login-submit {
    position: relative;
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--login-green-700), var(--login-green-500));
    box-shadow: 0 16px 30px rgba(22, 132, 71, .25);
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .25px;
    transition: transform .28s var(--login-spring), box-shadow .28s ease, filter .28s ease;
}

.login-submit::before {
    content: "";
    position: absolute;
    top: -80%;
    left: -45%;
    width: 38%;
    height: 260%;
    background: rgba(255, 255, 255, .22);
    transform: rotate(18deg);
    transition: left .55s ease;
}

.login-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 38px rgba(22, 132, 71, .34);
    filter: saturate(1.08);
}

.login-submit:hover::before {
    left: 118%;
}

.login-submit:active {
    transform: translateY(0) scale(.985);
}

.login-submit:disabled {
    cursor: wait;
    opacity: .82;
}

.login-submit-spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255,255,255,.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinnerRotate .75s linear infinite;
}

.login-submit.is-loading .login-submit-spinner {
    display: inline-block;
}

.login-submit.is-loading .login-submit-icon {
    display: none;
}

.login-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 18px;
    color: #7b9385;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.login-security-note i {
    color: var(--login-green-600);
}

.login-mobile-brand {
    display: none;
    align-items: center;
    gap: 11px;
    margin-bottom: 26px;
}

.login-mobile-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.login-mobile-brand strong {
    display: block;
    color: var(--login-green-950);
    font-size: 15px;
}

.login-mobile-brand span {
    display: block;
    color: var(--login-muted);
    font-size: 10px;
    font-weight: 700;
}

@keyframes loginAurora {
    0% { transform: translate3d(-2%, -1%, 0) scale(1); }
    100% { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

@keyframes orbFloatOne {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(32px, 38px, 0); }
}

@keyframes orbFloatTwo {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-36px, -26px, 0); }
}

@keyframes shellEnter {
    from { opacity: 0; transform: translateY(26px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes formEnter {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 0 5px rgba(134, 239, 172, .09); }
    50% { box-shadow: 0 0 0 9px rgba(134, 239, 172, .02); }
}

@keyframes alertShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

@keyframes spinnerRotate {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .login-page-wrap {
        padding: 20px;
    }

    .login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .login-brand-panel {
        display: none;
    }

    .login-auth-panel {
        min-height: 640px;
        padding: 78px 38px 42px;
    }

    .login-mobile-brand {
        display: flex;
    }
}

@media (max-width: 560px) {
    body.login-page {
        background-attachment: scroll;
    }

    .login-page-wrap {
        padding: 0;
        align-items: stretch;
    }

    .login-shell {
        width: 100%;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .login-auth-panel {
        min-height: 100vh;
        padding: 76px 22px 30px;
    }

    .login-clock {
        top: 16px;
        right: 16px;
    }

    .login-form-heading h2 {
        font-size: 27px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
