/**
 * Atalia Login Page Styles
 * Modern SaaS login page with animated gradient background
 */

:root {
    --atalia-blue-dark: #0d1117;
    --atalia-blue: #161b22;
    --atalia-blue-light: #1f6feb;
    --atalia-blue-lighter: #58a6ff;
    --atalia-accent: #238636;
    --border-color: #d0d7de;
    --text-muted: #6e7781;
    --text-primary: #24292f;
}

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

body, html {
    height: 100%;
    font-family: 'Rethink Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

.login-wrapper {
    display: flex;
    min-height: 100vh;
    background:
        linear-gradient(135deg, #0d1117 0%, #161b22 25%, #0d1117 50%, #1c2128 75%, #0d1117 100%),
        radial-gradient(circle at 0% 0%, rgba(31, 111, 235, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(88, 166, 255, 0.15) 0%, transparent 50%);
    background-size: 100% 100%, 150% 150%, 150% 150%;
    background-position: center, 0% 0%, 100% 100%;
    position: relative;
    overflow: hidden;
}

/* Animated mesh gradient overlay */
.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background:
        linear-gradient(90deg, transparent 0%, rgba(31, 111, 235, 0.12) 50%, transparent 100%),
        linear-gradient(0deg, transparent 0%, rgba(88, 166, 255, 0.1) 50%, transparent 100%);
    background-size: 200% 200%, 200% 200%;
    animation: mesh-move 20s ease-in-out infinite;
    pointer-events: none;
    transform: rotate(45deg);
}

/* Grid pattern overlay */
.login-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(88, 166, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88, 166, 255, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    pointer-events: none;
}

@keyframes mesh-move {
    0%, 100% {
        background-position: 0% 0%, 0% 0%;
        opacity: 1;
    }
    50% {
        background-position: 100% 100%, 100% 100%;
        opacity: 0.8;
    }
}

.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem;
}

.login-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    gap: 4rem;
}

/* Left side - Hero content */
.hero-content {
    flex: 1;
    max-width: 500px;
}

.logo {
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.logo-image {
    height: 40px;
    width: auto;
    filter: brightness(1.2) drop-shadow(0 2px 8px rgba(255, 255, 255, 0.1));
}

.hero-content h1 {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #ffffff;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

/* Right side - Login form */
.form-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 248, 250, 0.95) 100%);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    border: 1px solid rgba(88, 166, 255, 0.15);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 450px;
    position: relative;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        #1f6feb 25%,
        #58a6ff 50%,
        #1f6feb 75%,
        transparent 100%);
    border-radius: 16px 16px 0 0;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0d1117;
    margin-bottom: 0.5rem;
}

.form-header p {
    font-size: 1rem;
    color: #57606a;
}

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

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #24292f;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Override style.css dark theme for login/register inputs */
.login-wrapper input[type='email'],
.login-wrapper input[type='password'],
.login-wrapper input[type='text'],
.login-wrapper .form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    color: #24292f !important;
    background: #f6f8fa !important;
    border: 1px solid #d0d7de !important;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: 'Rethink Sans', sans-serif;
}

.login-wrapper input[type='email']::placeholder,
.login-wrapper input[type='password']::placeholder,
.login-wrapper input[type='text']::placeholder,
.login-wrapper .form-input::placeholder {
    color: #6e7781 !important;
}

.login-wrapper input[type='email']:focus,
.login-wrapper input[type='password']:focus,
.login-wrapper input[type='text']:focus,
.login-wrapper .form-input:focus {
    outline: none;
    background: #ffffff !important;
    border-color: #0969da !important;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.12) !important;
}

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

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #57606a;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-link {
    font-size: 0.875rem;
    color: #0969da;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    color: #0550ae;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #1f6feb 0%, #58a6ff 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Rethink Sans', sans-serif;
    box-shadow: 0 4px 12px rgba(31, 111, 235, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover {
    background: linear-gradient(135deg, #1a5fd1 0%, #4a95ff 100%);
    box-shadow: 0 6px 20px rgba(31, 111, 235, 0.4);
    transform: translateY(-2px);
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #57606a;
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #d0d7de;
}

.divider span {
    padding: 0 1rem;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #57606a;
}

.form-footer a {
    color: #0969da;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    color: #0550ae;
    text-decoration: underline;
}

.alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: none;
    font-size: 0.875rem;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive */
@media (max-width: 992px) {
    .login-content {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .form-card {
        max-width: 500px;
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 1rem;
    }

    .form-card {
        padding: 2rem 1.5rem;
    }

    .logo-image {
        height: 32px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.125rem;
    }

    .form-card {
        backdrop-filter: blur(8px);
    }
}
