body, html {
    min-height: 100%;
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #0f111a;
    overflow-x: hidden;
    overflow-y: auto;
}

.bg-auth {
    background-image: url("../images/login_image.jpg");
    background-size: 110%;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 17, 26, 0.7) 0%, rgba(30, 35, 54, 0.5) 100%);
    z-index: 1;
}

.auth-viewport {
    --auth-panel-width: 460px;
    position: relative;
    z-index: 2;
    width: var(--auth-panel-width);
    height: 620px;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    background: rgba(255,255,255,0.05);
}

.auth-slider {
    display: flex;
    width: calc(var(--auth-panel-width) * 2);
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-viewport.show-register .auth-slider {
    transform: translateX(calc(var(--auth-panel-width) * -1));
}

.auth-panel {
    width: var(--auth-panel-width);
    flex: 0 0 var(--auth-panel-width);
    height: 100%;
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
    transform: scale(1);
}

.auth-viewport.show-register .login-panel {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.auth-viewport:not(.show-register) .register-panel {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.panel-header {
    background-color: #f0f4f8;
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid #e1e8ed;
}

.panel-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.panel-body {
    padding: 30px 40px;
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(100% - 140px);
}

.panel-body::-webkit-scrollbar {
    width: 8px;
}

.panel-body::-webkit-scrollbar-thumb {
    background: rgba(142, 197, 252, 0.45);
    border-radius: 10px;
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 25px;
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 6px;
}

.form-control {
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #8ec5fc;
    box-shadow: 0 0 0 3px rgba(142, 197, 252, 0.25);
    outline: none;
}

.forgot-link {
    font-size: 0.85rem;
    color: #4a90d9;
    text-decoration: none;
    display: inline-block;
    margin-top: 8px;
}

.btn-auth {
    background: linear-gradient(135deg, #a18cd1 0%, #8ec5fc 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    padding: 14px;
    width: 100%;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(161, 140, 209, 0.3);
    transition: all 0.2s ease;
    margin-top: 15px;
}

.btn-auth:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(161, 140, 209, 0.5);
    color: white;
}

.panel-footer {
    background-color: #f0f4f8;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e1e8ed;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.panel-footer:hover {
    background-color: #e6eef4;
}

.footer-text {
    margin: 0;
    font-size: 0.9rem;
    color: #334155;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer-text span {
    color: #4a90d9;
    text-decoration: underline;
}

.footer-text i {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.login-panel .panel-footer:hover i {
    transform: translateX(5px);
}

.register-panel .panel-footer:hover i {
    transform: translateX(-5px);
}

@keyframes bgZoom {
    0%, 100% {
        background-position: center left;
        background-size: 110%;
    }
    50% {
        background-position: center right;
        background-size: 105%;
    }
}

.bg-auth {
    animation: bgZoom 20s ease-in-out infinite;
}

@media (max-width: 992px) {
    .auth-viewport {
        --auth-panel-width: 380px;
        width: var(--auth-panel-width);
        height: 560px;
    }
}

@media (max-width: 576px) {
    .bg-auth {
        min-height: 100svh;
        height: auto;
        padding: 12px;
        background-size: cover;
        animation: none;
    }
    .auth-viewport {
        --auth-panel-width: calc(100vw - 24px);
        width: var(--auth-panel-width);
        height: calc(100svh - 24px);
        min-height: 560px;
        border-radius: 18px;
    }
    .panel-header { padding: 18px 12px; }
    .panel-header h3 { font-size: 1.05rem; }
    .panel-body { padding: 22px 20px; max-height: calc(100% - 126px); }
    .welcome-title { font-size: 1.25rem; margin-bottom: 18px; }
    .form-control { padding: 11px 13px; }
    .panel-footer { padding: 15px 12px; }
    .footer-text { font-size: 0.78rem; gap: 6px; }
}

@media (max-width: 360px) {
    .panel-body { padding: 18px 14px; }
    .panel-header h3 { font-size: 0.95rem; }
}
