/* ============================================================
   AUTH PAGES - Modern RTL Design
   ============================================================ */

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

body {
    font-family: 'iranyekan', Tahoma, Arial, sans-serif;
    background: #f5f7f6;
    min-height: 100vh;
    direction: rtl;
}

/* ---------- Auth Wrapper ---------- */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    direction: rtl;
}

/* ---------- Decoration Side ---------- */
.auth-decoration {
    flex: 1;
    background: linear-gradient(135deg, #31795a 0%, #245a42 50%, #1a3d2c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 40px;
}

.auth-deco-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 400px;
}

.auth-deco-logo {
    margin-bottom: 30px;
}

.auth-deco-logo img {
    max-height: 80px;
    filter: brightness(0) invert(1);
}

.auth-deco-logo-text {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
}

.auth-deco-title {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.3;
}

.auth-deco-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 40px;
    line-height: 1.6;
}

.auth-deco-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-deco-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    border-radius: 14px;
    backdrop-filter: blur(10px);
    direction: rtl;
}

.auth-deco-feature i {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #d2f34c;
    flex-shrink: 0;
}

.auth-deco-feature span {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

/* Decorative Shapes */
.auth-deco-shapes {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.auth-deco-shape {
    position: absolute;
    border-radius: 50%;
}

.auth-deco-shape.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(210, 243, 76, 0.06);
    top: -100px;
    left: -100px;
}

.auth-deco-shape.shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.04);
    bottom: -80px;
    right: -80px;
}

.auth-deco-shape.shape-3 {
    width: 200px;
    height: 200px;
    background: rgba(210, 243, 76, 0.05);
    bottom: 30%;
    left: -50px;
}

/* ---------- Form Side ---------- */
.auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #fff;
}

.auth-form-container {
    width: 100%;
    max-width: 440px;
}

/* ---------- Auth Card ---------- */
.auth-card {
    width: 100%;
}

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

.auth-logo-mobile {
    display: none;
    margin-bottom: 24px;
}

.auth-logo-mobile img {
    max-height: 50px;
}

.auth-title {
    font-size: 26px;
    font-weight: 800;
    color: #244034;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: #888;
}

/* ---------- Form Elements ---------- */
.auth-form-group {
    margin-bottom: 20px;
}

.auth-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #244034;
    margin-bottom: 10px;
    direction: rtl;
}

.auth-label i {
    color: #31795a;
    font-size: 15px;
}

.auth-label .required {
    color: #dc3545;
}

.auth-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e5e5;
    border-radius: 14px;
    font-size: 15px;
    color: #244034;
    background: #fafbfa;
    transition: all 0.2s ease;
    font-family: 'iranyekan', Tahoma, Arial, sans-serif;
    direction: rtl;
    text-align: right;
}

.auth-input:focus {
    outline: none;
    border-color: #31795a;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(49, 121, 90, 0.1);
}

.auth-input::placeholder {
    color: #bbb;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input-wrapper .auth-input {
    padding-right: 48px;
}

.auth-input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
    pointer-events: none;
}

.auth-input-wrapper:focus-within .auth-input-icon {
    color: #31795a;
}

.auth-toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.auth-toggle-password:hover {
    color: #31795a;
}

.auth-error {
    display: block;
    font-size: 12px;
    color: #dc3545;
    margin-top: 8px;
    padding-right: 4px;
    text-align: right;
}

.auth-input.error {
    border-color: #dc3545;
}

.auth-input.error:focus {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

/* LTR inputs for mobile/email */
.auth-input[data-ltr="true"],
input[name="mobile"][dir="ltr"],
input[name="email"][dir="ltr"] {
    direction: ltr;
    text-align: left;
}

/* ---------- Checkbox ---------- */
.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    direction: rtl;
}

.auth-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 2px solid #ddd;
    cursor: pointer;
    accent-color: #31795a;
    flex-shrink: 0;
}

.auth-checkbox label {
    font-size: 13px;
    color: #555;
    cursor: pointer;
}

.auth-checkbox a {
    color: #31795a;
    font-weight: 600;
    text-decoration: none;
}

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

/* ---------- Buttons ---------- */
.auth-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'iranyekan', Tahoma, Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #31795a, #245a42);
    color: #fff;
    box-shadow: 0 4px 15px rgba(49, 121, 90, 0.3);
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(49, 121, 90, 0.4);
}

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

.auth-btn-outline {
    background: transparent;
    border: 2px solid #e5e5e5;
    color: #555;
}

.auth-btn-outline:hover {
    border-color: #31795a;
    color: #31795a;
    background: #f0f7f3;
}

.auth-btn-sm {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 10px;
}

/* ---------- Divider ---------- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e5e5;
}

.auth-divider span {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

/* ---------- Footer Links ---------- */
.auth-footer {
    text-align: center;
    margin-top: 28px;
}

.auth-footer-text {
    font-size: 14px;
    color: #888;
}

.auth-footer-link {
    color: #31795a;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-footer-link:hover {
    color: #245a42;
    text-decoration: underline;
}

/* ---------- Alert ---------- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 24px;
    direction: rtl;
}

.auth-alert-success {
    background: #e6f7ed;
    color: #1a8a4a;
    border: 1px solid #b2e8c4;
}

.auth-alert-error {
    background: #fde8ea;
    color: #c0392b;
    border: 1px solid #f5c6c9;
}

.auth-alert-warning {
    background: #fef3e2;
    color: #b87d00;
    border: 1px solid #fde68a;
}

.auth-alert i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 16px;
}

/* ---------- Verification Code Inputs ---------- */
.auth-code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 24px 0;
    direction: ltr;
}

.auth-code-input {
    width: 56px;
    height: 64px;
    border: 2px solid #e5e5e5;
    border-radius: 14px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #244034;
    background: #fafbfa;
    transition: all 0.2s ease;
    font-family: 'iranyekan', Tahoma, Arial, sans-serif;
    direction: ltr;
}

.auth-code-input:focus {
    outline: none;
    border-color: #31795a;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(49, 121, 90, 0.1);
}

.auth-code-input.filled {
    border-color: #31795a;
    background: #f0f7f3;
}

/* ---------- Resend Code ---------- */
.auth-resend {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.auth-resend-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #888;
    direction: rtl;
}

.auth-resend-timer .timer-value {
    font-weight: 700;
    color: #31795a;
    min-width: 24px;
    text-align: center;
}

.auth-resend-btn {
    background: none;
    border: none;
    color: #31795a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-family: 'iranyekan', Tahoma, Arial, sans-serif;
}

.auth-resend-btn:hover:not(:disabled) {
    background: #f0f7f3;
}

.auth-resend-btn:disabled {
    color: #bbb;
    cursor: not-allowed;
}

/* ---------- Two Column Form ---------- */
.auth-row {
    display: flex;
    gap: 16px;
}

.auth-row .auth-form-group {
    flex: 1;
}

/* ---------- Back Link ---------- */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #888;
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.2s ease;
    direction: rtl;
}

.auth-back:hover {
    color: #31795a;
}

/* ---------- Bottom Bar ---------- */
.auth-bottom-bar {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #eee;
    text-align: center;
}

.auth-bottom-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.auth-bottom-links a {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-bottom-links a:hover {
    color: #31795a;
}

.auth-bottom-sep {
    color: #ddd;
    font-size: 12px;
}

.auth-bottom-copyright {
    font-size: 12px;
    color: #999;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-decoration {
        display: none;
    }

    .auth-form-side {
        padding: 30px 20px;
        min-height: 100vh;
    }

    .auth-logo-mobile {
        display: block;
    }
}

@media (max-width: 576px) {
    .auth-form-side {
        padding: 20px 16px;
    }

    .auth-title {
        font-size: 22px;
    }

    .auth-code-input {
        width: 50px;
        height: 58px;
        font-size: 22px;
    }

    .auth-row {
        flex-direction: column;
        gap: 0;
    }

    .auth-bottom-links {
        flex-direction: column;
        gap: 8px;
    }

    .auth-bottom-sep {
        display: none;
    }
}
