:root {
    --primary: #4e73df;
    --primary-dark: #2e59d9;
    --primary-light: #7a9cf5;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

body {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Auth Pages Visual Panel (Left side) */
.auth-visual {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    top: -150px;
    right: -150px;
}

.auth-visual::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
}

.visual-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 500px;
}

.visual-logo {
    height: 50px;
    margin-bottom: 1.5rem;
}

.visual-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.floating-image {
    max-width: 100%;
    height: auto;
    animation: floatUpDown 4s ease-in-out infinite;
}

.floating-icon {
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    animation: floatUpDown 4s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

.floating-icon i {
    font-size: 3rem;
    color: #fff;
}

@keyframes floatUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Auth Pages Form Panel (Right side) */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 4rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 0;
}

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

.auth-logo-mobile {
    margin: 0 auto;
    height: 48px;
    margin-bottom: 1.5rem;
    display: none;
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Common Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.25s;
    outline: none;
    background: #fff;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(78,115,223,0.12);
}

.form-control::placeholder {
    color: #94a3b8;
}

.password-wrapper {
    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;
}

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

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
}

.btn-auth {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-auth:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(78,115,223,0.35);
}

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

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1.25rem;
}

.form-links a, .back-link {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.form-links a:hover, .back-link:hover {
    color: var(--primary);
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    font-size: 0.95rem;
}

.alert-auth {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #16a34a;
}

.field-validation {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.text-danger {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

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

/* Responsive */
@media (max-width: 992px) {
    .auth-visual {
        display: none;
    }

    .auth-logo-mobile {
        display: block;
    }

    body {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    }

    .auth-form-panel {
        padding: 1.5rem;
        background: transparent;
    }

    .auth-card {
        background: #fff;
        padding: 2.5rem 2rem;
        border-radius: 20px;
        box-shadow: 0 25px 50px -12px rgba(0,0,0,0.2);
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }

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