/**
 * Al-Hadath Authentication Styles
 * Version: 4.0.0
 */

/* ===== Import Base Styles ===== */
@import url('frontend.css');

/* ===== Auth Pages Container ===== */
.login-full-page,
.register-full-page,
.profile-full-page,
.dashboard-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #111827 100%);
    position: relative;
}

.login-full-page,
.register-full-page,
.profile-full-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.dashboard-container {
    padding: 100px 20px 60px;
}

/* ===== Auth Containers ===== */
.login-container {
    max-width: 500px;
}

.register-container {
    max-width: 900px;
}

.profile-container {
    max-width: 1000px;
}

.login-container,
.register-container,
.profile-container {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-xl);
    backdrop-filter: blur(10px);
    padding: 45px;
    transition: all var(--transition-normal);
}

.login-container:hover,
.register-container:hover,
.profile-container:hover {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ===== Auth Headers ===== */
.login-header,
.register-header,
.profile-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header h1,
.register-header h1,
.profile-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-white);
    margin-bottom: 10px;
}

.login-header h1 span,
.register-header h1 span {
    color: var(--primary-cyan);
}

.login-header p,
.register-header p,
.profile-header p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* ===== Auth Forms ===== */
.login-form,
.register-form,
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ===== Password Wrapper ===== */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 45px;
}

[dir="rtl"] .password-wrapper input {
    padding-right: 16px;
    padding-left: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 5px;
    font-size: 1.1rem;
    transition: color var(--transition-fast);
}

[dir="rtl"] .toggle-password {
    right: auto;
    left: 12px;
}

.toggle-password:hover {
    color: var(--primary-cyan);
}

/* ===== Password Strength ===== */
.password-strength-meter {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.password-strength-meter span {
    display: block;
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background 0.3s ease;
}

/* ===== Form Actions ===== */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    font-weight: normal;
}

.forgot-link a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.forgot-link a:hover {
    color: var(--primary-cyan);
}

/* ===== Auth Links ===== */
.register-link,
.login-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-gray);
}

.register-link a,
.login-link a {
    color: var(--primary-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.register-link a:hover,
.login-link a:hover {
    text-decoration: underline;
}

/* ===== Avatar Section ===== */
.avatar-section {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.current-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 3px solid var(--primary-cyan);
}

.current-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-upload {
    background: rgba(6, 182, 212, 0.2);
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    color: var(--primary-cyan);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-upload:hover {
    background: var(--primary-cyan);
    color: white;
}

/* ===== Profile Sections ===== */
.form-section {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    color: var(--primary-cyan);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(6, 182, 212, 0.3);
    display: inline-block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ===== Image Upload Area ===== */
.image-upload-area {
    border: 2px dashed rgba(6, 182, 212, 0.3);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.image-upload-area:hover {
    border-color: var(--primary-cyan);
    background: rgba(6, 182, 212, 0.05);
}

.image-upload-area.dragover {
    border-color: var(--primary-cyan);
    background: rgba(6, 182, 212, 0.1);
}

.image-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 2px solid var(--primary-cyan);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Form Hint ===== */
.form-hint {
    color: var(--text-gray);
    font-size: 0.75rem;
    margin-top: 5px;
}

/* ===== Required Asterisk ===== */
.required {
    color: var(--primary-cyan);
    margin-left: 3px;
}

[dir="rtl"] .required {
    margin-left: 0;
    margin-right: 3px;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .form-row,
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .login-container,
    .register-container,
    .profile-container {
        padding: 30px 25px;
    }
    
    .login-header h1,
    .register-header h1,
    .profile-header h1 {
        font-size: 1.8rem;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .login-container,
    .register-container,
    .profile-container {
        padding: 25px 20px;
    }
    
    .login-header h1,
    .register-header h1,
    .profile-header h1 {
        font-size: 1.5rem;
    }
}