/* ── AUTH PAGES ── */
.auth-layout {
    display: flex;
    min-height: 100vh;
    background: var(--off-white);
}

.auth-sidebar {
    width: 45%;
    background: #fff;
    color: var(--text-dark);
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 60px;
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--border);
}

.auth-sidebar::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(13, 179, 90, 0.08) 0%, transparent 70%);
}

.auth-sidebar-logo img {
    height: 120px;
    position: relative;
    z-index: 2;
    display: block;
}

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

.auth-sidebar-content h2 {
    font-family: 'Sora', sans-serif;
    font-size: clamp(32px, 3.5vw, 46px);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.15;
    color: var(--text-dark);
}

.auth-sidebar-content p {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.7;
}

.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.auth-card {
    background: #fff;
    width: 100%;
    max-width: 460px;
    padding: 48px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.auth-card-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card-header h3 {
    font-family: 'Sora', sans-serif;
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.auth-card-header p {
    color: var(--text-muted);
    font-size: 15px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    color: var(--text-dark);
    transition: all 0.2s;
    background: var(--off-white);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-control:focus {
    outline: none;
    border-color: var(--green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(13, 179, 90, 0.1);
}

.auth-btn {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.auth-btn:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.auth-links {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-body);
}

.auth-links a {
    color: var(--green);
    font-weight: 600;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.back-home {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.back-home:hover {
    color: var(--text-dark);
}

.lang-switch {
    position: absolute;
    top: 40px;
    right: 140px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    background: var(--off-white);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.lang-switch:hover {
    color: var(--text-dark);
    border-color: var(--text-muted);
}

/* Password Toggle and Strength Meter */
.pwd-toggle {
    position: absolute;
    bottom: 0px;
    right: 0px;
    height: 48px;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted);
    outline: none;
}

.pwd-toggle:hover {
    color: var(--text-dark);
}

body[dir="rtl"] .pwd-toggle {
    right: auto;
    left: 0;
}

.strength-meter {
    height: 4px;
    width: 100%;
    background: var(--border);
    margin-top: 8px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    display: none;
}

.strength-meter.active {
    display: block;
}

.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s, background-color 0.3s;
}

.pwd-msg {
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

.pwd-weak {
    color: #e74c3c;
}

.pwd-medium {
    color: #f39c12;
}

.pwd-strong {
    color: #2ecc71;
}

.bg-weak {
    background-color: #e74c3c;
    width: 33%;
}

.bg-medium {
    background-color: #f39c12;
    width: 66%;
}

.bg-strong {
    background-color: #2ecc71;
    width: 100%;
}

.match-msg {
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

.match-success {
    color: #2ecc71;
}

.match-error {
    color: #e74c3c;
}

/* Dark mode auth support */
body.dark-mode .auth-sidebar {
    background: #0f1720;
    border-right-color: var(--border);
}

body.dark-mode .auth-sidebar-content h2 {
    color: #fff;
}

body.dark-mode .auth-sidebar-logo img {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

body.dark-mode .auth-card {
    background: var(--white);
}

body.dark-mode .form-control {
    background: var(--off-white);
    color: var(--text-dark);
}

body.dark-mode .form-control:focus {
    background: var(--white);
    border-color: var(--green);
}

body.dark-mode .pwd-toggle:hover {
    color: var(--text-body);
}

@media (max-width: 991px) {
    .auth-sidebar {
        display: none;
    }

    .auth-main {
        padding: 20px;
    }
}

/* ── RTL OVERRIDES FOR ARABIC AUTH PAGES ── */
html[dir="rtl"] .auth-sidebar {
    border-right: none;
    border-left: 1px solid var(--border);
}

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

html[dir="rtl"] .lang-switch {
    right: auto;
    left: 140px;
}

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

html[dir="rtl"] .pwd-toggle {
    right: auto;
    left: 0;
}