* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-950: #06281f;
    --green-900: #0b3b2e;
    --green-800: #0f513b;
    --green-700: #137a52;
    --green-600: #14945f;
    --green-500: #20b26b;
    --green-100: #dcfce7;
    --green-50: #f0fdf4;
    --gold: #d8b45b;
    --ink: #10231c;
    --muted: #66756f;
    --line: #d9e7df;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--ink);
    background:
        radial-gradient(circle at 14% 18%, rgba(32, 178, 107, 0.16), transparent 28%),
        linear-gradient(135deg, #f7fbf8 0%, #eaf6ee 52%, #dcefe4 100%);
}

.login-wrapper {
    display: grid;
    grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 1.05fr);
    width: min(92vw, 1080px);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid rgba(19, 122, 82, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 24px 60px -24px rgba(6, 40, 31, 0.42);
    backdrop-filter: blur(14px);
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 3.5rem);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 253, 250, 0.98) 100%);
}

.login-side {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
    overflow: hidden;
    background: linear-gradient(145deg, rgba(6, 40, 31, 0.96) 0%, rgba(15, 81, 59, 0.98) 58%, rgba(19, 122, 82, 0.96) 100%);
}

.login-side::before {
    content: "";
    position: absolute;
    inset: 10%;
    z-index: -1;
    border: 1px solid rgba(216, 180, 91, 0.24);
    border-radius: 22px;
}

.login-side::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -120px;
    z-index: -1;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(216, 180, 91, 0.16);
}

.side-content {
    max-width: 380px;
    text-align: left;
    color: white;
}

.side-content > i,
.side-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--gold);
    font-size: 1.9rem;
    transition: transform 0.25s ease, background 0.25s ease;
}

.login-side:hover .side-content > i,
.login-side:hover .side-icon {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.18);
}

.side-eyebrow {
    display: block;
    margin-bottom: 0.85rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.side-content h3 {
    max-width: 340px;
    margin-bottom: 1rem;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.12;
    font-weight: 700;
}

.side-content p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    line-height: 1.7;
}

.side-content p:not(.side-copy) {
    display: none;
}

.workflow-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 2rem;
}

.workflow-preview span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.11);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.72rem;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease;
}

.workflow-preview span:hover {
    transform: translateY(-2px);
    background: rgba(216, 180, 91, 0.22);
}

.login-brand {
    margin-bottom: 2.25rem;
}

.brand-mark {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--green-700), var(--green-950));
    box-shadow: 0 16px 30px -16px rgba(6, 40, 31, 0.72);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand-mark:hover {
    transform: translateY(-3px) rotate(-2deg);
    box-shadow: 0 22px 36px -18px rgba(6, 40, 31, 0.85);
}

.brand-mark i {
    color: var(--green-50);
    font-size: 1.6rem;
}

.login-brand h1 {
    color: var(--green-950);
    font-size: clamp(1.9rem, 4vw, 2.45rem);
    line-height: 1.1;
    font-weight: 700;
}

.login-brand p {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.field {
    margin-bottom: 1.15rem;
}

.field label {
    display: block;
    margin-bottom: 0.48rem;
    color: var(--green-900);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.field-input {
    position: relative;
    display: flex;
    align-items: center;
}

.field-input i {
    position: absolute;
    left: 1rem;
    color: #82968e;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.field-input input {
    width: 100%;
    min-height: 52px;
    padding: 0.9rem 3rem 0.9rem 2.65rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field-input input::placeholder {
    color: #94a8a0;
}

.field-input input:hover {
    border-color: rgba(20, 148, 95, 0.46);
}

.field-input input:focus {
    outline: none;
    border-color: var(--green-600);
    box-shadow: 0 0 0 4px rgba(32, 178, 107, 0.13);
    transform: translateY(-1px);
}

.field-input:focus-within i {
    color: var(--green-700);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #7b9188;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.toggle-password:hover {
    background: var(--green-50);
    color: var(--green-700);
}

.error-msg {
    display: none;
    margin: 1rem 0;
    padding: 0.75rem 0.85rem;
    border-left: 3px solid #dc2626;
    border-radius: 12px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 0.82rem;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 54px;
    margin-top: 0.75rem;
    padding: 0.95rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--green-700), var(--green-900));
    color: white;
    box-shadow: 0 18px 30px -18px rgba(6, 40, 31, 0.82);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 38px -20px rgba(6, 40, 31, 0.92);
    filter: saturate(1.1);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn i {
    transition: transform 0.2s ease;
}

.submit-btn:hover i {
    transform: translateX(4px);
}

.submit-btn:disabled {
    cursor: wait;
}

.login-footer {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
}

#spinner {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(6, 40, 31, 0.48);
    backdrop-filter: blur(3px);
}

.spinner-ring {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--green-100);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 750px) {
    body {
        align-items: flex-start;
        padding: 1rem;
    }

    .login-wrapper {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 520px;
        min-height: auto;
        border-radius: 18px;
    }

    .login-side {
        order: -1;
        min-height: 250px;
        padding: 2rem;
    }

    .login-panel {
        padding: 1.6rem;
    }

    .side-content {
        max-width: none;
    }

    .workflow-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 1.4rem;
    }
}

@media (max-width: 420px) {
    body {
        padding: 0;
    }

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

    .login-panel,
    .login-side {
        padding: 1.35rem;
    }

    .login-side {
        min-height: 230px;
    }

    .workflow-preview span {
        min-height: 38px;
        font-size: 0.68rem;
    }
}
