/**
 * Auth Pages Styles
 * Login, Forgot Password, Reset Password
 */

:root {
    --primary-dark: #8d1c3d;
    --primary-light: #63a194;
    --neutral-white: #ffffff;
    --neutral-cream: #e1c396;
    --neutral-taupe: #b09677;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #5a1228 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    display: flex;
    background: var(--neutral-white);
    border-radius: 1rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    position: relative;
}

.login-image {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-light) 0%, #4a7a70 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
}

.login-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,0.1)' stroke-width='2'/%3E%3C/svg%3E") repeat;
    opacity: 0.3;
}

.login-image-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--neutral-white);
}

.login-image-content svg {
    width: 180px;
    height: 180px;
    margin-bottom: 1.5rem;
}

.login-image-content img {
    width: 180px;
    height: 180px;
    margin-bottom: 1.5rem;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.login-image-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-image-content p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.login-form {
    flex: 1;
    padding: 3rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--primary-dark);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--neutral-taupe);
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background: rgba(141, 28, 61, 0.1);
    color: var(--primary-dark);
    border: 1px solid var(--primary-dark);
}

.alert-success {
    background: rgba(99, 161, 148, 0.1);
    color: var(--primary-light);
    border: 1px solid var(--primary-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.input-group {
    position: relative;
}

.input-group svg.input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--neutral-taupe);
    pointer-events: none;
    z-index: 2;
}

/* LTR */
html[dir="ltr"] .input-group svg.input-icon {
    left: 1rem;
}

html[dir="ltr"] .form-control {
    padding: 0.875rem 1rem 0.875rem 3rem;
}

/* RTL */
html[dir="rtl"] .input-group svg.input-icon {
    right: 1rem;
}

html[dir="rtl"] .form-control {
    padding: 0.875rem 3rem 0.875rem 1rem;
}

.form-control {
    width: 100%;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
    border: 2px solid var(--neutral-cream);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background: var(--neutral-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 161, 148, 0.2);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--neutral-taupe);
}

.checkbox-label input {
    accent-color: var(--primary-light);
}

.forgot-link {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--primary-dark);
}

.btn {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-dark);
    color: var(--neutral-white);
}

.btn-primary:hover {
    background: #7a1735;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(141, 28, 61, 0.3);
}

.password-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--neutral-taupe);
    padding: 0.5rem;
    transition: color 0.2s ease;
}

html[dir="ltr"] .password-toggle {
    right: 0.5rem;
}

html[dir="rtl"] .password-toggle {
    left: 0.5rem;
}

.password-toggle:hover {
    color: var(--primary-dark);
}

.back-link {
    display: block;
    text-align: center;
    color: var(--primary-light);
    text-decoration: none;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--primary-dark);
}

/* Password Strength Indicator */
.password-strength-container {
    margin-top: 0.5rem;
}

.strength-bars {
    display: flex;
    gap: 4px;
    height: 4px;
    margin-bottom: 0.25rem;
}

.strength-bar {
    flex: 1;
    background: #eee;
    border-radius: 2px;
    transition: background 0.3s;
}

#strength-text {
    font-size: 0.75rem;
    color: var(--neutral-taupe);
}

#match-indicator {
    font-size: 0.75rem;
    margin-top: 0.4rem;
    display: none;
    align-items: center;
    gap: 4px;
}

/* Dropdown styles */
.dropdown-content a:hover {
    background: #f5f5f5;
}

.show {
    display: block !important;
}

/* Responsive */
@media (max-width: 768px) {
    .login-image {
        display: none;
    }

    .login-form {
        padding: 2rem;
    }
}