:root {
    --auth-ink: #1e2a38;
    --auth-muted: #667085;
    --auth-line: #dfe5ec;
    --auth-soft: #f5f7fa;
    --auth-green: #2e7d32;
    --auth-green-dark: #245f28;
    --auth-lime: #a3e635;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 28px;
    color: var(--auth-ink);
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.auth-shell {
    width: min(1020px, 100%);
    min-height: 590px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(370px, 0.92fr);
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: authEnter 0.5s ease-out both;
}

.auth-hero {
    position: relative;
    min-height: 590px;
    padding: 86px 40px 44px;
    color: #ffffff;
    background: #1e2a38;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    isolation: isolate;
}

.auth-hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: rgba(163, 230, 53, 0.24);
    box-shadow: -10px 0 24px rgba(46, 125, 50, 0.12);
    z-index: -1;
}

.auth-logo {
    display: block;
    width: min(218px, 78%);
    height: auto;
}

.auth-hero-content {
    max-width: 500px;
}

.auth-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 3.7vw, 44px);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-hero p {
    max-width: 470px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 15px;
    line-height: 1.6;
}

.auth-visual {
    position: relative;
    height: 176px;
    margin-top: 70px;
}

.auth-visual-ring {
    position: absolute;
    left: 62px;
    bottom: 8px;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    border: 1px solid rgba(163, 230, 53, 0.22);
    box-shadow: inset 0 0 0 18px rgba(163, 230, 53, 0.035);
    animation: authPulse 4.8s ease-in-out infinite;
}

.auth-visual-card {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 650;
    color: rgba(255, 255, 255, 0.9);
}

.auth-visual-card i {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: #102019;
    background: var(--auth-lime);
    font-size: 17px;
}

.auth-visual-card-main {
    left: 92px;
    bottom: 54px;
}

.auth-visual-card-top {
    left: 254px;
    top: 18px;
    animation: authFloat 5s ease-in-out infinite;
}

.auth-visual-card-bottom {
    left: 276px;
    bottom: 22px;
    animation: authFloat 5s ease-in-out 0.7s infinite;
}

.auth-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 50px 48px 50px;
    background: #ffffff;
}

.auth-header {
    margin-bottom: 28px;
}

.auth-header .auth-logo {
    width: min(248px, 80%);
    margin-bottom: 36px;
}

.auth-header h2 {
    margin: 0 0 8px;
    color: var(--auth-ink);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-header p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 14px;
}

.auth-form {
    width: 100%;
}

.auth-field {
    margin-bottom: 20px;
}

.auth-panel .form-label {
    color: var(--auth-ink);
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-input {
    position: relative;
}

.auth-input i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a8594;
    font-size: 20px;
    pointer-events: none;
    transition: color 0.18s ease;
}

.auth-panel .form-control {
    height: 50px;
    width: 100%;
    padding: 0 15px 0 46px;
    color: var(--auth-ink);
    background: var(--auth-soft);
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.auth-input-password .form-control {
    padding-right: 48px;
}

.auth-panel .form-control::placeholder {
    color: #98a2b3;
}

.auth-panel .form-control:focus {
    color: var(--auth-ink);
    background: #ffffff;
    border-color: var(--auth-green);
    box-shadow: 0 0 0 0.22rem rgba(46, 125, 50, 0.16);
}

.auth-panel .input-validation-error {
    border-color: #dc3545;
    background: #fffafa;
}

.auth-input:focus-within i {
    color: var(--auth-green);
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #667085;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.auth-password-toggle i {
    position: static;
    transform: none;
    color: inherit;
    font-size: 20px;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.auth-password-toggle.is-fading {
    animation: authPasswordTogglePress 0.18s ease;
}

.auth-password-toggle.is-fading i {
    animation: authPasswordToggleFade 0.18s ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
    color: var(--auth-green);
    background: #edf7ee;
    outline: none;
}

.auth-panel .text-danger {
    display: block;
    margin-top: 7px;
    font-size: 13px;
}

.auth-panel .field-validation-valid,
.auth-panel .validation-summary-valid {
    display: none;
}

.auth-form:not(.auth-form-submitted) .auth-field:not(.auth-field-touched) .field-validation-error {
    display: none;
}

.auth-form:not(.auth-form-submitted) .auth-field:not(.auth-field-touched) .input-validation-error {
    border-color: var(--auth-line);
    background: var(--auth-soft);
}

.auth-actions {
    margin-top: 26px;
}

.btn-login {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: var(--auth-green);
    box-shadow: 0 14px 28px rgba(46, 125, 50, 0.24);
    font-weight: 700;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.btn-login i {
    font-size: 20px;
    transition: transform 0.18s ease;
}

.btn-login:hover,
.btn-login:focus {
    color: #ffffff;
    background: var(--auth-green-dark);
    box-shadow: 0 18px 34px rgba(46, 125, 50, 0.28);
}

.btn-login:hover i,
.btn-login:focus i {
    transform: translateX(3px);
}

.btn-login:active {
    transform: translateY(1px);
}

.alert-danger {
    border-color: #fecaca;
    border-radius: 12px;
    background: #fff1f2;
    color: #991b1b;
    font-size: 14px;
}

@keyframes authEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes authFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes authPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.65;
    }
}

@keyframes authPasswordTogglePress {
    0%, 100% {
        transform: translateY(-50%) scale(1);
    }

    50% {
        transform: translateY(-50%) scale(0.97);
    }
}

@keyframes authPasswordToggleFade {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.35;
        transform: scale(0.82);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 900px) {
    body {
        align-items: flex-start;
        padding: 18px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .auth-hero {
        min-height: 246px;
        padding: 30px;
    }

    .auth-hero h1 {
        max-width: 620px;
        font-size: 30px;
    }

    .auth-visual {
        display: none;
    }

    .auth-panel {
        padding: 34px 32px 36px;
    }
}

@media (max-width: 575.98px) {
    body {
        padding: 0;
        background: #ffffff;
    }

    .auth-shell {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-hero {
        min-height: auto;
        padding: 20px 22px;
    }

    .auth-hero h1 {
        margin-bottom: 10px;
        font-size: 24px;
    }

    .auth-hero p {
        font-size: 14px;
        line-height: 1.5;
    }

    .auth-panel {
        justify-content: flex-start;
        padding: 26px 22px 30px;
    }

    .auth-header {
        margin-bottom: 24px;
    }

    .auth-header .auth-logo {
        width: min(220px, 78%);
        margin-bottom: 26px;
    }

    .auth-header h2 {
        font-size: 25px;
    }
}
