:root {
    --primary-color: #cabe06;
    --primary-hover: #a89d05;
    --secondary-color: #1e293b;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
}

body.auth-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    font-family: 'Poppins', 'Source Sans Pro', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(202, 190, 6, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(202, 190, 6, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--white);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    min-height: 650px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-left {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.auth-left::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    filter: blur(150px);
    opacity: 0.15;
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
}

.auth-left-content {
    position: relative;
    z-index: 2;
}

.auth-logo {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 54px;
    height: 54px;
    background: rgba(202, 190, 6, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary-color);
    border: 1px solid rgba(202, 190, 6, 0.2);
}

.auth-welcome {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.auth-description {
    font-size: 1.15rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 40px;
}

.auth-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.auth-features li:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: rgba(202, 190, 6, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
}

.auth-right {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: #fff;
}

.auth-header {
    margin-bottom: 20px;
}

.auth-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

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

.lang-switcher {
    position: absolute;
    top: 30px;
    right: 40px;
    display: flex;
    gap: 10px;
}

.lang-switcher a {
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-main);
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-switcher a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lang-switcher a.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(202, 190, 6, 0.2);
}

.back-home {
    position: absolute;
    top: 30px;
    left: 40px;
    padding: 6px 16px;
    border-radius: 100px;
    background: #f8fafc;
    color: var(--text-main);
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-home:hover {
    background: #f1f5f9;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.input-group {
    position: relative;
}

.form-control {
    width: 100%;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
    color: var(--secondary-color);
    font-weight: 500;
}

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

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: color 0.3s ease;
}

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

.form-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin: 4px 0 0 0;
    font-weight: 500;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 4px 0 0 0;
}

.file-input {
    width: 100%;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    background: #f8fafc;
    padding: 8px 12px;
    font-size: 0.95rem;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.file-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
}

.file-input::file-selector-button {
    margin-right: 12px;
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-input::file-selector-button:hover {
    background: var(--primary-hover);
}

.auth-button {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(202, 190, 6, 0.3);
}

.auth-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(202, 190, 6, 0.25);
}

.auth-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    color: var(--text-muted);
    font-weight: 500;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none !important;
    font-weight: 700;
    margin-left: 5px;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: var(--primary-hover);
}

.error-message {
    background: #fef2f2;
    color: #ef4444;
    padding: 14px 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid #fee2e2;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

html[dir="rtl"] body.auth-page {
    font-family: 'Tajawal', sans-serif !important;
}

[dir="rtl"] .auth-container {
    grid-template-columns: 1fr 1.1fr;
}

[dir="rtl"] .auth-left {
    order: 2;
}

[dir="rtl"] .auth-right {
    order: 1;
}

[dir="rtl"] .form-control {
    text-align: right;
}

[dir="rtl"] .input-icon {
    left: auto;
    right: 18px;
}

[dir="rtl"] .password-toggle {
    right: auto;
    left: 18px;
}

[dir="rtl"] .lang-switcher {
    right: auto;
    left: 40px;
}

[dir="rtl"] .back-home {
    left: auto;
    right: 40px;
    flex-direction: row-reverse;
}

[dir="rtl"] .auth-header,
[dir="rtl"] .auth-welcome,
[dir="rtl"] .auth-description,
[dir="rtl"] .auth-footer,
[dir="rtl"] label{
    text-align: right !important;
}

[dir="rtl"] .auth-features li {
    justify-content: flex-start;
    text-align: right;
}

[dir="rtl"] .auth-features li:hover {
    transform: translateX(-5px);
}




@media (max-width: 992px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 550px;
        min-height: auto;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        padding: 40px 30px;
    }
}

@media (max-width: 576px) {
    .auth-right {
        padding: 40px 20px;
    }

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