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

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.4);
    
    --bg-dark: #020617;
    --bg-slate: #0f172a;
    --side-bg: rgba(0, 0, 0, 0.2);
    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-light: rgba(255, 255, 255, 0.15);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius: 12px;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-dark: #f0f9ff;
        --bg-slate: #bae6fd;
        --side-bg: rgba(255, 255, 255, 0.4);
        
        --glass-bg: rgba(255, 255, 255, 0.6);
        --glass-bg-hover: rgba(255, 255, 255, 0.9);
        --glass-border: rgba(255, 255, 255, 0.5);
        --glass-border-light: rgba(59, 130, 246, 0.2);
        
        --text-main: #0f172a;
        --text-muted: #475569;
    }
}

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

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main) !important;
    overflow-x: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animated Background Orbs */
.bg-orbs {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at center, var(--bg-slate) 0%, var(--bg-dark) 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 600px; height: 600px;
    background: rgba(59, 130, 246, 0.25);
    top: -200px; left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px; height: 500px;
    background: rgba(139, 92, 246, 0.2);
    bottom: -150px; right: -50px;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px; height: 400px;
    background: rgba(16, 185, 129, 0.15);
    top: 30%; left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 10%) scale(1.05); }
    100% { transform: translate(-5%, -5%) scale(0.95); }
}

/* Main Layout */
.main {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    min-height: 480px;
    z-index: 10;
}

@media (min-width: 900px) {
    .auth-container {
        flex-direction: row;
    }
}

/* Branding - Top Centered on Mobile, Inside left on Desktop */
.auth-branding {
    text-align: center;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 20;
}

.brand-logo {
    text-decoration: none;
    display: inline-block;
}

.brand-logo-img {
    max-width: 220px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.brand-text {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.gradient-text {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brand-text .gradient-text:last-child {
    background: linear-gradient(135deg, var(--primary) 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Left Side - Premium Illustration/Messaging */
.hero-section {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

@media (min-width: 900px) {
    .hero-section {
        border-bottom: none;
        border-right: 1px solid var(--glass-border);
        padding: 3rem;
        background: radial-gradient(circle at top left, rgba(255,255,255,0.02) 0%, transparent 70%);
    }
}

.hero-content {
    margin-top: auto;
    margin-bottom: auto;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.5;
    max-width: 95%;
}

.abstract-rings {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}
.abstract-rings::before {
    content: '';
    position: absolute;
    top: 30px; left: 30px; right: 30px; bottom: 30px;
    border: 1px dashed rgba(59, 130, 246, 0.2);
    border-radius: 50%;
}
.abstract-rings::after {
    content: '';
    position: absolute;
    top: 60px; left: 60px; right: 60px; bottom: 60px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
    border-radius: 50%;
}

/* Right Side - Form */
.form-side {
    flex: 0 0 100%;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: var(--side-bg);
}

@media (min-width: 900px) {
    .form-side {
        flex: 0 0 400px;
        padding: 2.5rem 3rem;
    }
}

.auth-header {
    margin-bottom: 1.5rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--glass-bg-hover);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: var(--text-main);
}

.submit-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px var(--primary-glow);
    transition: all 0.3s ease;
    margin-top: 0.25rem;
    margin-bottom: 1.25rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(37, 99, 235, 0.5);
    background: linear-gradient(135deg, #60a5fa 0%, var(--primary) 100%);
}

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

/* Alert Boxes */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(10px);
}

/* Auth Links */
.auth-links {
    text-align: center;
}

.auth-links a {
    color: #93c5fd;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.auth-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Demo Site Divider */
.demo-site-section {
    margin-bottom: 1.5rem;
    text-align: center;
}

.divider {
    position: relative;
    text-align: center;
    margin-bottom: 1.5rem;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    border-top: 1px solid var(--glass-border);
    z-index: 1;
}

.divider span {
    position: relative;
    z-index: 2;
    background: #0b1120;
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.demo-site-btn {
    background: rgba(100, 100, 100, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.demo-site-btn:hover {
    background: rgba(100, 100, 100, 0.2);
    border-color: rgba(100, 100, 100, 0.3);
}

.demo-site-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main {
        padding: 1rem;
        align-items: center;
        padding-top: 2rem;
    }

    .auth-container {
        min-height: auto;
        max-width: 100%;
    }

    .hero-section {
        display: none;
    }

    .form-side {
        flex: 0 0 100%;
        padding: 2rem 1.5rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .form-input {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 0.75rem 1rem;
    }
}
