@import url('colors.css');

body,
html {
    height: 100%;
    margin: 0;
    font-family: var(--font-primary);
    overflow-x: hidden;
}

.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Left Side - Dark Panel */
.auth-side-brand {
    background-color: var(--bg-dark-panel);
    width: 40%;
    /* Reduced from 45% to align better with Figma ratios */
    min-width: 400px;
    /* Ensure content fits on smaller laptops */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    color: var(--text-white);
    padding: 2rem;
    overflow: hidden;
}

.auth-bg-pattern {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 43%;
    /* Reduced from 60% to avoid overlapping text */
    object-fit: initial;
    z-index: 1;
}

.brand-content {
    z-index: 2;
    text-align: center;
    margin-bottom: auto;
    margin-top: 20%;
}

.brand-logo {
    width: 90px;
    height: auto;
    margin-bottom: 2.5rem;
}

.brand-title {
    font-size: 2.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.brand-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 420px;
    line-height: 1.6;
    font-weight: 300;
}

/* Right Side - Login Form */
.auth-side-form {
    flex: 1;
    background-color: var(--bg-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 450px;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h2 {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--text-primary);
}

.form-label {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-control {
    background-color: #F5F8FA;
    border: none;
    border-radius: var(--radius-base);
    padding: 0.75rem 1rem;
    /* approx 48px height or slightly less to let padding define it */
    height: auto;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: #EEF3F7;
    box-shadow: none;
    outline: 2px solid var(--primary-color);
}

.btn-login {
    background: var(--gradient-btn);
    border: none;
    border-radius: var(--radius-base);
    color: white;
    font-weight: 700;
    font-size: 16px;
    width: 100%;
    height: 48px;
    margin-top: 1.5rem;
    transition: opacity 0.3s ease;
}

.btn-login:hover {
    opacity: 0.9;
    color: white;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #E5E8F0;
}

.btn-xero {
    background: linear-gradient(180deg, #19BFF0 0%, #0F9DD2 100%);
    border: none;
    border-radius: var(--radius-base);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 16px;
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(16, 158, 209, 0.25);
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-xero:hover {
    opacity: 0.96;
    color: #FFFFFF;
    box-shadow: 0 12px 24px rgba(16, 158, 209, 0.3);
}

.btn-xero:active {
    transform: translateY(1px);
}

.xero-mark {
    width: 32px;
    height: 32px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
}

.forgot-password {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    float: right;
    margin-bottom: 0.5rem;
}

.footer-links {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    text-align: center;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 1rem;
    font-size: 13px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 992px) {
    .auth-side-brand {
        display: none;
        /* Hide brand panel on tablet/mobile as per common patterns or stack it? Usually hidden or minimal header */
    }

    .auth-side-form {
        background: var(--bg-body);
    }

    .login-card {
        padding: 2rem;
        background: white;
        border-radius: var(--radius-lg);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }
}

/* Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.auth-side-brand {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.auth-side-form {
    animation: fadeInRight 0.8s ease-out forwards;
    background-color: var(--bg-white);
    /* Ensure bg is set for coverage */
}

.auth-bg-pattern {
    animation: pulse 5s infinite alternate ease-in-out;
}

/* Staggered Form Animations */
.login-card form>div:nth-child(1) {
    opacity: 0;
    animation: slideUp 0.6s ease-out 0.2s forwards;
}

.login-card form>div:nth-child(2) {
    opacity: 0;
    animation: slideUp 0.6s ease-out 0.3s forwards;
}

.login-card form>button {
    opacity: 0;
    animation: slideUp 0.6s ease-out 0.4s forwards;
}

.login-card form>div:last-child {
    opacity: 0;
    animation: slideUp 0.6s ease-out 0.5s forwards;
}
