* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

:root {
    --navy: #283991;
    --navy-dark: #182463;
    --navy-light: #4152b3;
    --green: #00a44e;
    --green-dark: #00803d;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html, body {
    height: 100%;
    margin: 0;
}
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #1e2438;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
}

/* ================= LEFT BRAND PANEL ================= */
.auth-panel-left {
    flex: 0 0 44%;
    max-width: 560px;
    position: relative;
    background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 56px;
    overflow: hidden;
}

.chevron-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.chevron-decor::before,
.chevron-decor::after {
    content: "";
    position: absolute;
    clip-path: polygon(0% 20%, 55% 20%, 80% 50%, 55% 80%, 0% 80%, 25% 50%);
    animation: chevronDrift 28s ease-in-out infinite;
}
.chevron-decor::before {
    width: 480px; height: 480px;
    background: var(--green);
    opacity: 0.14;
    top: -8%; right: -20%;
}
.chevron-decor::after {
    width: 360px; height: 360px;
    background: #ffffff;
    opacity: 0.06;
    bottom: -14%; left: -16%;
    animation-duration: 34s;
    animation-delay: -8s;
}
@keyframes chevronDrift {
    0%, 100% { transform: translate(0,0) rotate(0deg); }
    50% { transform: translate(-3%, 4%) rotate(5deg); }
}

.brand-content { position: relative; z-index: 1; }

.brand-logo {
    width: 108px;
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.28);
    animation: fadeUp 0.6s var(--ease) both;
    animation-delay: 0.05s;
}

.brand-title {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 26px 0 12px;
    animation: fadeUp 0.6s var(--ease) both;
    animation-delay: 0.15s;
}

.brand-tagline {
    color: #c3ccf0;
    font-size: 0.96rem;
    line-height: 1.6;
    max-width: 380px;
    margin-bottom: 34px;
    animation: fadeUp 0.6s var(--ease) both;
    animation-delay: 0.25s;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
}
.brand-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 0;
    font-size: 0.92rem;
    color: #e3e8fb;
    animation: fadeUp 0.6s var(--ease) both;
}
.brand-features li:nth-child(1) { animation-delay: 0.35s; }
.brand-features li:nth-child(2) { animation-delay: 0.42s; }
.brand-features li:nth-child(3) { animation-delay: 0.49s; }
.brand-features i {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 164, 78, 0.18);
    color: var(--green);
    border-radius: 9px;
    font-size: 0.92rem;
    flex-shrink: 0;
}

.brand-footer {
    position: relative; z-index: 1;
    margin-top: 40px;
    font-size: 0.8rem;
    color: #8f9bd6;
    animation: fadeUp 0.6s var(--ease) both;
    animation-delay: 0.55s;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= RIGHT FORM PANEL ================= */
.auth-panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f7fb;
    padding: 40px 24px;
}

.auth-form-wrap {
    width: 100%;
    max-width: 380px;
}

.mobile-logo { display: none; }

.auth-form-header h2 {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin: 0 0 6px;
    animation: fadeUp 0.5s var(--ease) both;
}
.text-muted-2 {
    color: #6b7394;
    font-size: 0.92rem;
    margin: 0 0 28px;
    animation: fadeUp 0.5s var(--ease) both;
    animation-delay: 0.05s;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 20px;
    animation: shake 0.4s ease;
}
.auth-alert i { margin-top: 2px; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.field-group {
    margin-bottom: 20px;
    animation: fieldIn 0.5s var(--ease) both;
    animation-delay: calc(var(--d, 0) * 0.08s + 0.1s);
}
@keyframes fieldIn {
    from { opacity: 0; transform: translateX(14px); }
    to { opacity: 1; transform: translateX(0); }
}

.field-group label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: #33395a;
    margin-bottom: 7px;
}
.optional-tag {
    font-weight: 400;
    font-size: 0.75rem;
    color: #9aa0bd;
    text-transform: none;
}

.input-group-pro {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid #e2e5f0;
    border-radius: 10px;
    padding: 0 14px;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input-group-pro:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(0, 164, 78, 0.12);
}
.input-group-pro i {
    color: #9aa0bd;
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
    transition: color 0.2s var(--ease);
}
.input-group-pro:focus-within i {
    color: var(--green);
}
.input-group-pro input,
.input-group-pro select {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 10px;
    font-size: 0.94rem;
    background: transparent;
    color: #1e2438;
    min-width: 0;
}
.input-group-pro select {
    appearance: none;
    cursor: pointer;
}
.toggle-visibility {
    background: none;
    border: none;
    color: #9aa0bd;
    cursor: pointer;
    padding: 6px;
    transition: color 0.15s var(--ease);
}
.toggle-visibility:hover { color: var(--navy); }

.field-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }

.checkbox-pro {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.88rem;
    color: #4b5171;
    cursor: pointer;
    user-select: none;
}
.checkbox-pro input { display: none; }
.checkbox-box {
    width: 18px; height: 18px;
    border: 1.5px solid #cbd0e3;
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
    color: transparent;
    font-size: 0.65rem;
}
.checkbox-pro input:checked + .checkbox-box {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.btn-signin {
    width: 100%;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-size: 0.96rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), filter 0.18s var(--ease);
}
.btn-signin i { transition: transform 0.18s var(--ease); }
.btn-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 164, 78, 0.32);
    filter: brightness(1.05);
}
.btn-signin:hover i { transform: translateX(4px); }
.btn-signin:active { transform: translateY(0); }

.auth-footer {
    text-align: center;
    font-size: 0.82rem;
    color: #9aa0bd;
    margin-top: 24px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
    .auth-panel-left { display: none; }
    .auth-panel-right { background: linear-gradient(160deg, var(--navy-dark), var(--navy)); }
    .auth-form-wrap {
        background: #fff;
        padding: 36px 28px;
        border-radius: 16px;
        box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    }
    .mobile-logo {
        display: block;
        width: 88px;
        margin: 0 auto 18px;
    }
    .auth-form-header { text-align: center; }
}
