* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-1: #f6f7f2;
    --bg-2: #e7efe7;
    --ink-900: #1f2937;
    --ink-700: #334155;
    --ink-500: #64748b;
    --line-soft: rgba(15, 23, 42, 0.12);
    --brand-900: #0f3d2e;
    --brand-700: #14563f;
    --panel-light: #ffffff;
    --success-bg: #dcfce7;
    --success-ink: #14532d;
    --danger-bg: #fee2e2;
    --danger-ink: #7f1d1d;
}

body.auth-body {
    min-height: 100vh;
    background: radial-gradient(circle at top left, #ffffff 0%, var(--bg-1) 45%, var(--bg-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Manrope', 'Segoe UI', Arial, sans-serif;
    padding: 28px;
    position: relative;
    overflow-x: hidden;
    color: var(--ink-900);
}

.auth-scene {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.scene-orb {
    display: block;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.35;
    position: absolute;
    animation: drift 16s ease-in-out infinite;
}

.orb-one {
    width: 320px;
    height: 320px;
    background: #86efac;
    top: -80px;
    left: -60px;
}

.orb-two {
    width: 280px;
    height: 280px;
    background: #fdba74;
    bottom: -70px;
    right: -40px;
    animation-delay: 2s;
}

.orb-three {
    width: 210px;
    height: 210px;
    background: #67e8f9;
    top: 45%;
    right: 18%;
    animation-delay: 4s;
}

.login-shell {
    width: 100%;
    max-width: 1040px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    box-shadow: 0 30px 60px rgba(17, 24, 39, 0.18);
    position: relative;
    z-index: 2;
    animation: raiseIn 550ms ease;
}

.brand-side {
    background: linear-gradient(145deg, var(--brand-900) 0%, var(--brand-700) 45%, #176147 100%);
    color: #f8fafc;
    padding: 2.8rem;
    position: relative;
    overflow: hidden;
}

.brand-side::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    top: -140px;
    right: -120px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.35), rgba(245, 158, 11, 0));
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.02em;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    font-size: 1.16rem;
    font-family: 'Sora', 'Segoe UI', sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1.35rem;
    background: rgba(255, 255, 255, 0.08);
}

.brand-badge .badge-char {
    display: inline-block;
    color: #f8fafc;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 18px rgba(0, 0, 0, 0.24);
    opacity: 0.98;
    transform: translateY(0) scale(1);
    filter: blur(0);
    animation: badgeCharCascade 2.8s cubic-bezier(0.22, 1, 0.36, 1) infinite both;
}

.brand-badge .badge-char:nth-child(odd) {
    color: #d1fae5;
}

.brand-badge .badge-char:nth-child(even) {
    color: #e0f2fe;
}

.brand-badge .badge-space {
    width: 0.34em;
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
}

.brand-badge .badge-char:nth-child(1) { animation-delay: 0.02s; }
.brand-badge .badge-char:nth-child(2) { animation-delay: 0.08s; }
.brand-badge .badge-char:nth-child(3) { animation-delay: 0.14s; }
.brand-badge .badge-char:nth-child(4) { animation-delay: 0.2s; }
.brand-badge .badge-char:nth-child(5) { animation-delay: 0.24s; }
.brand-badge .badge-char:nth-child(6) { animation-delay: 0.3s; }
.brand-badge .badge-char:nth-child(7) { animation-delay: 0.36s; }
.brand-badge .badge-char:nth-child(8) { animation-delay: 0.42s; }

.brand-side h1 {
    font-family: 'Sora', 'Segoe UI', sans-serif;
    font-size: 2rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    max-width: 14ch;
}

.brand-copy {
    margin-top: 1.1rem;
    color: rgba(248, 250, 252, 0.85);
    max-width: 45ch;
    line-height: 1.6;
    font-size: 0.95rem;
}

.feature-tags {
    margin-top: 1.6rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.feature-tags span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    width: 100%;
    min-height: 44px;
    text-align: center;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.25;
    padding: 0.48rem 0.72rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.feature-tags span i {
    flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
    .feature-tags span:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.4);
        transform: translateY(-1px) scale(1.03);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
    }
}

.brand-stats {
    margin-top: 1.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.brand-stats strong {
    display: block;
    font-family: 'Sora', 'Segoe UI', sans-serif;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.brand-stats span {
    font-size: 0.76rem;
    color: rgba(248, 250, 252, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-side {
    background: var(--panel-light);
    padding: 2.5rem 2.3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-top {
    margin-bottom: 1.15rem;
}

.form-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #fef3c7, #fde68a);
    color: #92400e;
    font-size: 1.2rem;
    margin-bottom: 0.72rem;
}

.form-top h2 {
    font-family: 'Sora', 'Segoe UI', sans-serif;
    font-size: 1.65rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.form-top p {
    color: var(--ink-500);
    margin-top: 0.38rem;
    font-size: 0.9rem;
}

.success-message,
.error-message {
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0.72rem 0.85rem;
    margin-bottom: 0.85rem;
    border: 1px solid transparent;
}

.success-message {
    background: var(--success-bg);
    color: var(--success-ink);
    border-color: rgba(22, 163, 74, 0.2);
}

.error-message {
    background: var(--danger-bg);
    color: var(--danger-ink);
    border-color: rgba(220, 38, 38, 0.2);
}

.error-message ul {
    margin: 0;
    padding-left: 1.05rem;
}

.error-message li + li {
    margin-top: 0.2rem;
}

.field-group + .field-group {
    margin-top: 0.85rem;
}

.field-group label {
    display: block;
    color: var(--ink-700);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.42rem;
    letter-spacing: 0.01em;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.42rem;
}

.field-label-row label {
    margin-bottom: 0;
}

.forgot-password-link {
    color: #0f766e;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.forgot-password-link:hover,
.forgot-password-link:focus-visible {
    color: #0f5f58;
    border-color: rgba(15, 118, 110, 0.45);
    outline: none;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--line-soft);
    border-radius: 12px;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.input-wrap > i {
    color: #64748b;
    font-size: 1rem;
    padding-left: 0.8rem;
}

.input-wrap input {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0.72rem 0.76rem;
    color: var(--ink-900);
    font-size: 0.92rem;
    font-weight: 600;
    outline: none;
}

.password-input-wrapper input {
    padding-right: 2.2rem;
}

.input-wrap:focus-within {
    border-color: #1d4ed8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.02rem;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.toggle-password:hover {
    color: #1d4ed8;
}

.login-btn {
    width: 100%;
    margin-top: 1.2rem;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f766e, #0ea5a4 55%, #14b8a6);
    color: #ffffff;
    padding: 0.8rem 0.95rem;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(13, 148, 136, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(13, 148, 136, 0.35);
    filter: saturate(1.03);
}

.login-btn:active {
    transform: translateY(0);
}

.trust-line {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--ink-500);
    font-size: 0.76rem;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 980px) {
    body.auth-body {
        padding: 16px;
        align-items: flex-start;
    }

    .login-shell {
        grid-template-columns: 1fr;
        max-width: 640px;
        border-radius: 22px;
    }

    .brand-side,
    .form-side {
        padding: 1.4rem;
    }

    .brand-side h1 {
        font-size: 1.5rem;
        max-width: 22ch;
    }

    .brand-badge {
        font-size: 1.03rem;
        padding: 0.45rem 0.95rem;
    }

    .brand-copy {
        font-size: 0.86rem;
        line-height: 1.5;
        margin-top: 0.75rem;
    }

    .feature-tags {
        margin-top: 1rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .feature-tags span {
        font-size: 0.74rem;
        min-height: 40px;
        padding: 0.38rem 0.5rem;
    }

    .brand-stats {
        margin-top: 1rem;
        padding-top: 0.8rem;
    }

    .brand-stats strong {
        font-size: 1rem;
    }

    .form-top h2 {
        font-size: 1.4rem;
    }

    .form-top p {
        font-size: 0.82rem;
    }

    .field-group label {
        font-size: 0.77rem;
    }

    .forgot-password-link {
        font-size: 0.74rem;
    }

    .input-wrap input {
        font-size: 16px;
        padding: 0.68rem 0.7rem;
    }

    .login-btn {
        margin-top: 1rem;
        font-size: 0.86rem;
        padding: 0.75rem 0.85rem;
    }
}

@media (max-width: 480px) {
    body.auth-body {
        padding: 12px;
    }

    .login-shell {
        border-radius: 18px;
    }

    .brand-side,
    .form-side {
        padding: 1.15rem;
    }

    .brand-side h1 {
        font-size: 1.26rem;
    }

    .brand-badge {
        font-size: 0.94rem;
        padding: 0.4rem 0.82rem;
    }

    .feature-tags {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.38rem;
    }

    .brand-stats {
        gap: 0.5rem;
    }

    .form-icon {
        width: 38px;
        height: 38px;
        font-size: 1.02rem;
    }

    .form-top h2 {
        font-size: 1.25rem;
    }
}

@keyframes drift {
    0%,
    100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-18px) translateX(12px);
    }
}

@keyframes raiseIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes badgeCharCascade {
    0% {
        opacity: 0;
        transform: translateY(-14px) scale(0.9);
        filter: blur(1.2px);
    }
    16% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
    78% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
    100% {
        opacity: 0.92;
        transform: translateY(1px) scale(0.99);
        filter: blur(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scene-orb,
    .login-shell,
    .login-btn,
    .brand-badge .badge-char {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}
