@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #2d1b42;
    --primary-red: #dc4c4c;
    --input-bg: #f8f9fa;
    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --kicker-yellow: #f8e71c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* 
   FIX: Changed overflow to hidden only on Desktop. 
   Container handles the scroll logic.
*/
body.auth-page {
    background-color: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    overflow: hidden; 
}

.login-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    width: 100%;
    height: 100vh;
}

/* --- LEFT SIDE: MEDIA --- */
.login-media {
    padding: 30px;
    height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--bg-dark);
}

.media-inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
}

.media-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* --- RIGHT SIDE: CONTENT --- */
.login-content {
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* FIX: Remove justify-content: center to prevent clipping the top */
    overflow-y: auto; 
    padding: 60px 40px; /* Generous padding for laptop views */
    background-color: var(--bg-dark);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

/* Custom Scrollbar for Chrome/Safari */
.login-content::-webkit-scrollbar { width: 6px; }
.login-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

.content-wrapper {
    width: 100%;
    max-width: 440px;
    /* 
       FIX: margin: auto 0 is the "Smart Center" 
       It centers vertically if space exists, but stays at top if height is small.
    */
    margin: auto 0; 
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- LOGO SECTION --- */
.logo-box {
   
    padding: 12px 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-bottom: 40px;
    flex-shrink: 0; /* Prevents logo from squishing */
}

.logo-box img {
    height: auto;
    max-height: 55px; /* Scaled for laptop height */
    width: auto;
    display: block;
    object-fit: contain;
}

.auth-header {
    width: 100%;
    margin-bottom: 20px;
    overflow: visible;
}

.kicker {
    display: block;
    color: var(--kicker-yellow);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.2;
}

.sub-text {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 35px;
}

/* --- FORM STYLES --- */
.auth-form {
    width: 100%;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-white);
}

.form-group input {
    width: 100%;
    padding: 15px 18px;
    border-radius: 8px;
    border: none;
    background: var(--input-bg);
    font-size: 15px;
    color: #333;
    outline: none;
    transition: box-shadow 0.2s;
}

.form-group input:focus {
    box-shadow: 0 0 0 3px rgba(220, 76, 76, 0.3);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 13px;
}

.link-muted {
    color: var(--text-white);
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-primary:hover {
    background: #c54343;
    transform: translateY(-2px);
}

.legal-notice {
    font-size: 11px;
    text-align: center;
    margin: 15px 0;
    color: var(--text-muted);
}

.legal-notice a {
    color: var(--text-white);
    text-decoration: underline;
}

/* --- DIVIDER --- */
.divider {
    text-align: center;
    position: relative;
    margin: 25px 0;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.divider span {
    position: relative;
    background: var(--bg-dark);
    padding: 0 15px;
    font-size: 12px;
    color: var(--text-muted);
}

/* --- GOOGLE BTN --- */
.btn-google {
    width: 100%;
    padding: 13px;
    background: white;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 30px;
}

.btn-google img { height: 20px; }

/* --- FOOTER NAV --- */
.auth-footer-nav {
    text-align: center;
    font-size: 14px;
}

.auth-footer-nav p { margin-bottom: 30px; }

.auth-footer-nav a {
    color: var(--text-white);
    text-decoration: underline;
    font-weight: 500;
}

.back-home {
    display: inline-block;
    color: var(--text-white);
    font-size: 13px;
    text-decoration: underline !important;
}

.bottom-footer {
    margin-top: 60px;
    padding-bottom: 20px;
    font-size: 11px;
    opacity: 0.5;
    letter-spacing: 0.5px;
}

/* --- ANIMATIONS --- */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.reveal-left { animation: slideInLeft 0.8s ease forwards; }
.reveal-right { animation: slideInRight 0.8s ease forwards; }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .login-container { grid-template-columns: 1fr 1.2fr; }
    h1 { font-size: 28px; }
}

@media (max-width: 992px) {
    body.auth-page { overflow: auto; height: auto; }
    .login-container { grid-template-columns: 1fr; height: auto; }
    .login-media { display: none; }
    .login-content { height: auto; min-height: 100vh; padding: 40px 20px; }
    .content-wrapper { margin: 0; }
}