﻿:root {
    --bg: #090D07;
    --panel: #0D1109;
    --card: #111A0D;
    --border: rgba(255,255,255,0.07);
    --border2: rgba(141,198,63,0.18);
    --g1: #8DC63F; /* lime green — logo primary */
    --g2: #6AAF1A; /* deeper green */
    --g3: #B8E56A; /* light highlight green */
    --teal: #4ECDC4;
    --text: #EEF4E8;
    --muted: rgba(238,244,232,0.42);
    --dark-text: #1A2410;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
}

/* ── CANVAS ── */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── GRAIN ── */
.grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px;
}

/* ── PAGE LAYOUT ── */
.page {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 500px;
}

/* ── LEFT BRAND PANEL ── */
.brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 52px 64px;
    position: relative;
    overflow: hidden;
}

    .brand-panel::before {
        content: '';
        position: absolute;
        top: -150px;
        right: -100px;
        width: 520px;
        height: 520px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(141,198,63,.13) 0%, transparent 70%);
        pointer-events: none;
    }

    .brand-panel::after {
        content: '';
        position: absolute;
        bottom: -100px;
        left: -80px;
        width: 380px;
        height: 380px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(78,205,196,.07) 0%, transparent 70%);
        pointer-events: none;
    }

/* Logo */
.top-logo {
    animation: fadeUp .5s ease both;
}

.logo-img {
    height: 42px;
    /* invert dark logo to work on dark background, then re-tint */
    filter: brightness(0) invert(1);
    opacity: .92;
}

/* Brand center */
.brand-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeUp .6s .1s ease both;
}

.brand-eyebrow {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--g1);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .brand-eyebrow::before {
        content: '';
        display: block;
        width: 32px;
        height: 2px;
        background: var(--g1);
        border-radius: 99px;
    }

.brand-headline {
    font-family: 'Syne', sans-serif;
    font-weight: 900;
    font-size: clamp(2.4rem, 3.8vw, 3.6rem);
    line-height: 1.06;
    letter-spacing: -.03em;
    margin-bottom: 24px;
}

    .brand-headline .hl {
        background: linear-gradient(90deg, var(--g1), var(--g3));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.brand-sub {
    font-size: .97rem;
    color: var(--muted);
    line-height: 1.75;
    max-width: 400px;
    font-weight: 300;
}

/* Feature pills */
.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 38px;
    animation: fadeUp .6s .2s ease both;
}

.pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    font-size: .77rem;
    font-weight: 500;
    color: var(--muted);
    backdrop-filter: blur(8px);
    transition: all .3s;
    cursor: default;
}

    .pill:hover {
        border-color: var(--g1);
        color: var(--text);
        background: rgba(141,198,63,.08);
    }

.pdot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

/* Decorative leaf shapes */
.leaf {
    position: absolute;
    font-size: 6rem;
    opacity: .04;
    user-select: none;
    pointer-events: none;
}

    .leaf:nth-child(1) {
        top: 12%;
        right: 6%;
        animation: float 9s ease-in-out infinite;
    }

    .leaf:nth-child(2) {
        bottom: 18%;
        right: 18%;
        font-size: 3.5rem;
        animation: float 7s 2s ease-in-out infinite;
        opacity: .03;
    }

    .leaf:nth-child(3) {
        top: 52%;
        right: 2%;
        font-size: 4.5rem;
        animation: float 11s 4s ease-in-out infinite;
        opacity: .025;
    }

/* Stats row */
.stats-row {
    display: flex;
    gap: 32px;
    margin-top: 52px;
    animation: fadeUp .6s .25s ease both;
}

.stat-item .sval {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--g1);
    line-height: 1;
}

.stat-item .slbl {
    font-size: .72rem;
    color: var(--muted);
    margin-top: 3px;
    font-weight: 400;
}

.brand-footer {
    animation: fadeUp .6s .3s ease both;
}

    .brand-footer p {
        font-size: .72rem;
        color: rgba(255,255,255,.18);
    }

/* ── RIGHT LOGIN PANEL ── */
.login-panel {
    background: rgba(13,17,9,.75);
    border-left: 1px solid var(--border2);
    backdrop-filter: blur(28px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 52px 52px;
    position: relative;
    animation: slideIn .6s .05s cubic-bezier(.22,1,.36,1) both;
}

    .login-panel::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--g1), var(--g3), var(--teal));
    }

.login-box {
    width: 100%;
    max-width: 368px;
}

/* Greeting */
.login-greeting {
    margin-bottom: 34px;
}

.hello {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--g1);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hello-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--g1), transparent);
}

.login-greeting h2 {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    margin-bottom: 7px;
}

.login-greeting p {
    font-size: .84rem;
    color: var(--muted);
}

/* Fields */
.field-group {
    margin-bottom: 16px;
    animation: fadeUp .45s ease both;
}

    .field-group:nth-child(1) {
        animation-delay: .22s;
    }

    .field-group:nth-child(2) {
        animation-delay: .28s;
    }

    .field-group:nth-child(3) {
        animation-delay: .34s;
    }

.field-label {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 7px;
}

.field-wrap {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .88rem;
    pointer-events: none;
    transition: color .2s;
    display: flex;
    align-items: center;
}

.field-input {
    width: 100%;
    background: rgba(141,198,63,.04);
    border: 1.5px solid rgba(255,255,255,.08);
    border-radius: 11px;
    padding: 13px 16px 13px 44px;
    font-size: .88rem;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    outline: none;
    transition: all .25s;
    letter-spacing: .01em;
}

    .field-input::placeholder {
        color: rgba(238,244,232,.18);
    }

    .field-input:focus {
        border-color: var(--g1);
        background: rgba(141,198,63,.07);
        box-shadow: 0 0 0 4px rgba(141,198,63,.12);
    }

        .field-input:focus + .field-icon {
            color: var(--g1);
        }
/* icon before input so CSS sibling won't work — use JS class instead */
.field-wrap:focus-within .field-icon {
    color: var(--g1);
}

/* Password toggle */
.pwd-toggle {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: .85rem;
    padding: 4px;
    transition: color .2s;
    line-height: 1;
}

    .pwd-toggle:hover {
        color: var(--g1);
    }

/* Branch select */
.sel-wrap {
    position: relative;
}

.sel-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .88rem;
    pointer-events: none;
    display: flex;
    align-items: center;
    transition: color .2s;
}

.sel-wrap:focus-within .sel-icon {
    color: var(--g1);
}

.branch-select {
    width: 100%;
    background: rgba(141,198,63,.04);
    border: 1.5px solid rgba(255,255,255,.08);
    border-radius: 11px;
    padding: 13px 36px 13px 44px;
    font-size: .88rem;
    font-family: 'DM Sans', sans-serif;
    color: var(--muted);
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: all .25s;
}

    .branch-select:focus {
        border-color: var(--g1);
        background: rgba(141,198,63,.07);
        box-shadow: 0 0 0 4px rgba(141,198,63,.12);
        color: var(--text);
    }

    .branch-select option {
        background: #111A0D;
        color: var(--text);
    }

.sel-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .65rem;
    pointer-events: none;
}

/* Remember + forgot row */
.field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 26px;
    animation: fadeUp .45s .38s ease both;
}

.remember-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}

.cbox {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid rgba(255,255,255,.14);
    background: rgba(141,198,63,.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    flex-shrink: 0;
}

    .cbox.checked {
        background: var(--g1);
        border-color: var(--g1);
        box-shadow: 0 0 0 3px rgba(141,198,63,.2);
    }

        .cbox.checked::after {
            content: '✓';
            color: var(--dark-text);
            font-size: .68rem;
            font-weight: 800;
        }

.remember-lbl {
    font-size: .82rem;
    color: var(--muted);
    cursor: pointer;
    transition: color .2s;
}

.remember-wrap:hover .remember-lbl {
    color: var(--text);
}

.forgot-link {
    font-size: .8rem;
    color: var(--g1);
    font-weight: 500;
    cursor: pointer;
    transition: opacity .2s;
}

    .forgot-link:hover {
        opacity: .65;
    }

/* Submit */
.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--g1), var(--g2));
    color: var(--dark-text);
    border: none;
    border-radius: 11px;
    padding: 15px 24px;
    font-size: .95rem;
    font-weight: 800;
    font-family: 'Syne', sans-serif;
    cursor: pointer;
    letter-spacing: .04em;
    transition: all .25s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 28px rgba(141,198,63,.28);
    animation: fadeUp .45s .42s ease both;
}

    .btn-login::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
        transition: left .55s;
    }

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 38px rgba(141,198,63,.38);
    }

        .btn-login:hover::before {
            left: 100%;
        }

    .btn-login:active {
        transform: translateY(0);
    }

.btn-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-arrow {
    font-size: 1rem;
    transition: transform .25s;
}

.btn-login:hover .btn-arrow {
    transform: translateX(5px);
}

.btn-login.loading .btn-inner {
    opacity: 0;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(26,36,16,.3);
    border-top-color: var(--dark-text);
    border-radius: 50%;
    animation: spin .65s linear infinite;
}

/* Error */
.error-msg {
    background: rgba(255,60,60,.08);
    border: 1px solid rgba(255,80,80,.22);
    border-radius: 9px;
    padding: 10px 14px;
    font-size: .8rem;
    color: #ff8888;
    margin-bottom: 14px;
    display: none;
    animation: fadeUp .3s ease;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    animation: fadeUp .45s .5s ease both;
}

    .divider span {
        font-size: .7rem;
        color: rgba(255,255,255,.14);
        white-space: nowrap;
    }

.div-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Trust row */
.trust-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    animation: fadeUp .45s .55s ease both;
}

.trust-item {
    text-align: center;
}

    .trust-item .ticon {
        font-size: 1.15rem;
        margin-bottom: 4px;
    }

    .trust-item .tlbl {
        font-size: .66rem;
        color: var(--muted);
        line-height: 1.4;
    }

.trust-div {
    width: 1px;
    height: 34px;
    background: var(--border);
}

/* Copyright */
.copyright {
    position: absolute;
    bottom: 26px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: .7rem;
    color: rgba(255,255,255,.17);
    animation: fadeUp .45s .6s ease both;
}

    .copyright a {
        color: var(--g1);
        text-decoration: none;
    }

        .copyright a:hover {
            text-decoration: underline;
        }

/* Forgot toast */
#forgotToast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #111A0D;
    border: 1px solid var(--border2);
    border-radius: 12px;
    padding: 13px 24px;
    font-size: .82rem;
    color: var(--text);
    opacity: 0;
    transition: all .3s;
    pointer-events: none;
    z-index: 999;
    box-shadow: 0 8px 40px rgba(0,0,0,.5);
    white-space: nowrap;
}

    #forgotToast.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%,100% {
        transform: translateY(0) rotate(-4deg);
    }

    50% {
        transform: translateY(-18px) rotate(4deg);
    }
}

@keyframes spin {
    to {
        transform: translate(-50%,-50%) rotate(360deg);
    }
}

@keyframes shake {
    0%,100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake .4s ease !important;
}

/* Mobile */
@media(max-width:768px) {
    .page {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 40px 28px;
        border-left: none;
    }
}
