:root {
    --zaqa-primary: #1e3a8a;
    --zaqa-secondary: #3b82f6;
    --zaqa-accent: #60a5fa;
    --zaqa-dark: #1e293b;
    --zaqa-light: #f8fafc;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Subtle irregular background shapes */
body::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.03) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 600px;
    height: 600px;
    background: linear-gradient(225deg, rgba(96, 165, 250, 0.04) 0%, rgba(30, 58, 138, 0.03) 100%);
    border-radius: 38% 62% 63% 37% / 70% 33% 67% 30%;
    z-index: 0;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(5deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 950px;
    height: 90vh;
    max-height: 650px;
    margin: 0 auto;
    padding: 20px;
}

.auth-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    position: relative;
}

/* Welcome Panel */
.welcome-panel {
    background: linear-gradient(135deg, var(--zaqa-primary) 0%, var(--zaqa-secondary) 100%);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: visible;
    border-right: 3px solid rgba(255, 255, 255, 0.2);
}

.welcome-panel::after {
    content: '';
    position: absolute;
    right: -1.5px;
    top: 10%;
    height: 80%;
    width: 3px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(255, 255, 255, 0.5) 20%, 
        rgba(255, 255, 255, 0.6) 50%, 
        rgba(255, 255, 255, 0.5) 80%, 
        transparent 100%);
    border-radius: 50% 50% 50% 50% / 60% 40% 60% 40%;
    animation: wobble 8s ease-in-out infinite;
    z-index: 1000;
}

@keyframes wobble {
    0%, 100% {
        border-radius: 50% 50% 50% 50% / 60% 40% 60% 40%;
    }
    25% {
        border-radius: 50% 50% 50% 50% / 40% 60% 40% 60%;
    }
    50% {
        border-radius: 50% 50% 50% 50% / 55% 45% 55% 45%;
    }
    75% {
        border-radius: 50% 50% 50% 50% / 45% 55% 45% 55%;
    }
}

.welcome-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50% 48% 45% 55% / 48% 50% 50% 52%;
    animation: float 15s ease-in-out infinite;
    z-index: 1;
}

.welcome-panel .bg-shape {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%;
    animation: float 20s ease-in-out infinite reverse;
    z-index: 1;
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-panel h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.welcome-panel p {
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.5;
    margin-bottom: 12px;
    opacity: 0.95;
}

.welcome-panel .tagline {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Form Panel */
.form-panel {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.logo-container {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 10;
}

.logo-container img {
    max-width: 100px;
    height: auto;
}

.form-header {
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--zaqa-dark);
    margin-bottom: 10px;
}

.form-header p {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 400;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: var(--zaqa-secondary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-control.is-invalid {
    border-color: #ef4444;
}

.invalid-feedback {
    display: block;
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 6px;
}

.input-icon {
    position: relative;
}

.input-icon i:not(.password-toggle) {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
}

.input-icon .form-control {
    padding-left: 48px;
}

.input-icon .password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
    left: auto;
}

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

.input-icon.has-toggle .form-control {
    padding-right: 45px;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
}

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

.form-check-label {
    font-size: 0.875rem;
    color: #64748b;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: white;
    background: linear-gradient(135deg, var(--zaqa-primary) 0%, var(--zaqa-secondary) 100%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

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

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

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

.security-notice {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.security-notice small {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Responsive */
@media (max-width: 992px) {
    .auth-container {
        height: auto;
        max-height: none;
        padding: 40px 20px;
    }

    .auth-card {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    
    .welcome-panel {
        padding: 40px 30px;
        min-height: 300px;
    }
    
    .form-panel {
        padding: 40px 30px;
    }
    
    .welcome-panel h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: 24px 12px;
    }
    
    .welcome-panel,
    .form-panel {
        padding: 30px 20px;
    }
}
