/* Auth Page - Modern Split Screen Design */

:root {
    --primary-color: #2563EB;
    --primary-color-rgb: 37, 99, 235;
    --secondary-color: #06B6D4;
    --text-primary: #252f4a;
    --text-secondary: #66718e;
    --border-color: #f1f1f4;
    --input-bg: #f9f9f9;
    --card-bg: #ffffff;
    --gradient-primary: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-page {
    font-family: 'Cairo', sans-serif !important;
    background-color: #fcfcfc;
    color: var(--text-primary);
    min-height: 100vh;
}

.auth-page-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    position: relative;
}

/* Auth Side (Forms) */
.auth-side {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
    background: var(--card-bg);
}

.auth-container {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.auth-brand {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 10;
    pointer-events: none;
}

.auth-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.3s ease;
    pointer-events: all;
}

.auth-brand-link:hover {
    transform: translateY(-2px);
}

.auth-brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Ensure auth-container has proper spacing */
.auth-container {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    padding-top: 5rem;
}

/* Form Container */
.auth-form-container {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form-container.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.auth-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    z-index: 1;
}

.auth-header h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0;
    padding: 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
    position: relative;
    width: 100%;
    display: block;
}

.auth-header h1::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    opacity: 0.3;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    opacity: 0.9;
    width: 100%;
    display: block;
}

/* Form Floating */
.form-floating {
    margin-bottom: 1.25rem;
    position: relative;
    width: 100%;
}

.form-floating > .form-control {
    padding: 1.5rem 3rem 0.5rem 3rem !important;
    height: calc(3.5rem + 2px);
    line-height: 1.5;
    background-color: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.form-floating > .form-control:focus {
    background-color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.1);
    outline: none;
}

.form-floating > label {
    padding: 1rem 3rem 1rem 3rem !important;
    color: var(--text-secondary);
    height: auto;
    display: flex;
    align-items: center;
    transition: var(--transition-base);
    font-weight: 500;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    pointer-events: none;
    transform-origin: right top;
    transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
    z-index: 1;
    max-width: calc(100% - 6rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:focus):not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.75rem) translateX(0.15rem);
    opacity: 0.65;
    color: var(--primary-color);
    top: 0;
    max-width: calc(100% - 6rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-floating > .form-control::placeholder {
    opacity: 0;
    color: transparent;
}

.form-floating > .form-control:focus::placeholder {
    opacity: 0;
    color: transparent;
}

.form-floating > .form-control:not(:placeholder-shown)::placeholder {
    opacity: 0;
    color: transparent;
}

/* Input Icon */
.auth-input-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 3;
    transition: var(--transition-base);
    pointer-events: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-floating > .form-control:focus ~ .auth-input-icon {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 3;
    transition: var(--transition-base);
    background: none;
    border: none;
    padding: 0.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

.password-toggle:hover,
.password-toggle:focus {
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.1);
    outline: none;
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

/* Buttons */
.btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 1rem;
    transition: var(--transition-base);
    font-family: 'Cairo', sans-serif;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.4);
}

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

.btn-google {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    width: 86%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    margin-left: auto;
    margin-right: auto;
}

.btn-google:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-google svg {
    flex-shrink: 0;
}

.w-100 {
    width: 100%;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* Form Divider */
.form-divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.form-divider span {
    background: var(--card-bg);
    padding: 0 1rem;
    color: var(--text-secondary);
    position: relative;
    font-size: 0.9rem;
}

/* Form Check */
.form-check {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* Links */
.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition-base);
}

.auth-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.auth-link-inline {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link-inline:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
    margin-right: 0.25rem;
}

.auth-footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Decorative Side */
.decorative-side {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        -4px 0 20px rgba(0, 0, 0, 0.1),
        inset 0 0 100px rgba(255, 255, 255, 0.05);
}

.decorative-side::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,0.12)' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-size: 30px 30px, 100% 100%;
    animation: slide 25s linear infinite;
    transform: rotate(15deg);
    opacity: 0.6;
    top: -50%;
    left: -50%;
}

.decorative-side::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%),
        radial-gradient(ellipse at top right, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.decorative-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    max-width: 520px;
    animation: fadeInUp 0.8s ease-out;
}

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

.decorative-content h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
}

.decorative-content p {
    font-size: 1.125rem;
    opacity: 0.95;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    font-weight: 500;
}

/* Floating Elements */
.decorative-side .floating-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.decorative-side .floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.decorative-side .floating-element:nth-child(2) {
    width: 120px;
    height: 120px;
    bottom: 20%;
    right: 15%;
    animation-delay: 2s;
}

.decorative-side .floating-element:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) translateX(10px) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes slide {
    0% {
        transform: translateX(-50%) translateY(-50%) rotate(0deg);
    }
    100% {
        transform: translateX(-50%) translateY(-50%) rotate(360deg);
    }
}

/* Decorative Features */
.decorative-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 2rem;
    text-align: right;
}

.decorative-feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.decorative-feature-item:nth-child(1) {
    animation-delay: 0.2s;
}

.decorative-feature-item:nth-child(2) {
    animation-delay: 0.4s;
}

.decorative-feature-item:nth-child(3) {
    animation-delay: 0.6s;
}

.decorative-feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.decorative-feature-item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.decorative-feature-item span {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Utility Classes */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.text-center {
    text-align: center;
}

.position-relative {
    position: relative;
}

/* Responsive Design */
@media (max-width: 992px) {
    .auth-page-wrapper {
        grid-template-columns: 1fr;
    }

    .decorative-side {
        display: none;
    }

    .auth-side {
        padding: 2rem 1rem;
    }

    .auth-container {
        max-width: 400px;
    }
}

@media (max-width: 576px) {
    .auth-header h1 {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }

    .auth-brand {
        top: 1rem;
        right: 1rem;
    }

    .auth-brand-text {
        font-size: 1.25rem;
    }
}

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

/* Success/Error Messages */
.auth-message {
    padding: 0.875rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

