:root {
    --primary-red: #e01e37;
    --dark-red: #b01829;
    --text-dark: #1a1a1a;
    --text-muted: #6b7280;
    --bg-light: #ffffff;
    --border-light: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Open Sans", sans-serif;
    overflow-x: hidden;
    background: var(--bg-light);
}

.login-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    height: 100%;
}

/* Left Side - Form */
.form-side {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 3rem;
    background: var(--bg-light);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.logo-container {
    animation: fadeInDown 0.8s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    width: 100%;
}

.logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    max-width: 200px;
    height: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text .brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.logo-text .brand-subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-dark);
    letter-spacing: 0.05em;
}

.form-content {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    z-index: 2;
    /* border: 2px solid var(--border-light);
    border-radius: 20px;
    padding: 2.5rem;
    background: var(--bg-light);
    box-shadow: var(--shadow-sm); */
}

.form-header {
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.form-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.95rem 1.25rem;
    border: 1.5px solid var(--border-light);
    border-radius: 50px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg-light);
    color: var(--text-dark);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(224, 30, 55, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-red);
}

.checkbox-wrapper label {
    font-size: 0.875rem;
    color: var(--text-dark);
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--primary-red);
}

.btn-login {
    width: 100%;
    padding: 0.95rem;
    border: 2px solid var(--text-dark);
    border-radius: 50px;
    background: transparent;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
}

.btn-login:hover {
    background: var(--text-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-login:active {
    transform: translateY(0);
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.divider span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.social-buttons {
    display: grid;
    /* grid-template-columns: 1fr 1fr; */
    /* gap: 1rem; */
    margin-bottom: 2rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1.5px solid var(--border-light);
    border-radius: 50px;
    background: var(--bg-light);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.btn-social:hover {
    border-color: var(--text-dark);
    background: #f9fafb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-social svg {
    width: 20px;
    height: 20px;
}

.register-link {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.register-link a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.register-link a:hover {
    color: var(--dark-red);
    text-decoration: underline;
}

.image-side {
    flex: 0 0 55%;
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    opacity: 0.85;
}

.hero-image.dots-image {
    filter: none;
}

.form-side .geometric-overlay {
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 100%;
    height: 350px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

.form-side .geometric-overlay .hero-image {
    width: 100%;
    height: auto;
    display: block;
}

.image-side-overlay {
    position: absolute;
    top: 42%;
    left: 54%;
    transform: translate(-50%, -50%);
    width: 49%;
    max-width: 878px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    /* opacity: 0.5; */
    pointer-events: none;
}

.image-side-overlay img,
.image-side-overlay .hero-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 0.7;
}

/* Halftone Pattern */
.halftone-pattern {
    position: absolute;
    bottom: 0;
    left: -10%;
    width: 120%;
    height: 200px;
    background-image: radial-gradient(
        circle,
        var(--primary-red) 2px,
        transparent 2px
    );
    background-size: 15px 15px;
    opacity: 0.6;
    mask-image: linear-gradient(to top, black 0%, transparent 100%);
    animation: halftoneMove 20s linear infinite;
}

/* Error Messages */
.error-message {
    color: var(--primary-red);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: block;
    animation: shake 0.5s ease-in-out;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes halftoneMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100px 100px;
    }
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .form-side {
        flex: 0 0 50%;
    }
    .image-side {
        flex: 0 0 50%;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    .form-side,
    .image-side {
        flex: 0 0 100%;
    }
    .image-side {
        min-height: 300px;
        order: -1;
    }
    .form-side {
        padding: 2rem 1.5rem;
    }
    .form-content {
        max-width: 100%;
    }
    .social-buttons {
        grid-template-columns: 1fr;
    }

    .image-side-overlay {
        width: 70%;
        max-width: 300px;
    }
}

/* Loading State */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-login.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
