/* Sales portal auth flows — activation, forgot password, pending, legal */

/* Same split as login: image left, form right + centered in the panel */
.dsauth-form-side {
    align-items: center;
    justify-content: center;
    padding-top: 48px;
    padding-bottom: 48px;
}

.dsauth-card {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
}

.dsauth-badge {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #7b9d36, #6d8d31);
    color: #fff;
    box-shadow: 0 10px 24px rgba(123, 157, 54, 0.35);
}

.dsauth-title {
    margin: 0;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.dsauth-subtitle {
    margin: 8px 0 0;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
}

.dsauth-phone-highlight {
    display: inline-block;
    margin-inline-start: 4px;
    color: #7b9d36;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.dsauth-otp-hint {
    margin: 20px 0 0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.dsauth-form--activate {
    margin-top: 12px;
}

.dsauth-resend {
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

.dsauth-resend-count {
    color: #7b9d36;
    font-weight: 700;
}

.dsauth-resend-btn {
    border: none;
    background: transparent;
    color: #7b9d36;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.dsauth-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dsauth-form {
    margin-top: 24px;
}

.dsauth-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.dsauth-step {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
}

.dsauth-step.is-active {
    color: #fff;
    background: #7b9d36;
    border-color: #7b9d36;
}

.dsauth-step.is-done {
    color: #7b9d36;
    background: rgba(123, 157, 54, 0.12);
    border-color: rgba(123, 157, 54, 0.35);
}

.dsauth-step-line {
    width: 28px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 999px;
}

.dsauth-step-line.is-done {
    background: rgba(123, 157, 54, 0.45);
}

.dsauth-email-hint {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    line-height: 1.55;
    color: #475569;
    text-align: center;
}

.dsauth-code-display {
    margin-top: 16px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(123, 157, 54, 0.08);
    border: 1px dashed rgba(123, 157, 54, 0.45);
    text-align: center;
}

.dsauth-code-display strong {
    display: block;
    font-size: 28px;
    letter-spacing: 0.35em;
    color: #5c7a2e;
    margin-top: 6px;
}

.dsauth-otp-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 8px;
    direction: ltr;
}

.dsauth-otp-box {
    width: 52px;
    height: 56px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dsauth-otp-box:focus {
    border-color: #7b9d36;
    box-shadow: 0 0 0 3px rgba(123, 157, 54, 0.15);
}

.dsauth-otp-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.dsauth-submit {
    width: 100%;
    height: 48px;
    margin-top: 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #7b9d36, #6d8d31);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(123, 157, 54, 0.35);
}

.dsauth-submit:hover {
    filter: brightness(1.03);
}

.dsauth-link-row {
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

.dsauth-link-row a {
    color: #7b9d36;
    font-weight: 600;
    text-decoration: none;
}

.dsauth-field-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: #64748b;
}

.dslogin-input-wrap {
    position: relative;
}

.dsauth-password-wrap .dsauth-password-toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 12px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #334155;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    z-index: 2;
}

.dsauth-password-wrap .dsauth-password-toggle:hover {
    color: #0f172a;
}

.dsauth-password-wrap .dsauth-password-toggle .dsauth-eye-open[hidden],
.dsauth-password-wrap .dsauth-password-toggle .dsauth-eye-closed[hidden] {
    display: none !important;
}

.dsauth-password-wrap input {
    padding-inline-end: 44px !important;
}

/* Hide browser native password reveal so it does not stack with our toggle */
.dsauth-password-wrap input::-ms-reveal,
.dsauth-password-wrap input::-ms-clear {
    display: none !important;
}

.dsauth-password-wrap input::-webkit-credentials-auto-fill-button,
.dsauth-password-wrap input::-webkit-strong-password-auto-fill-button {
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
}

.dsauth-terms {
    direction: rtl;
    justify-content: flex-start;
    text-align: right;
    width: 100%;
}

html[dir="ltr"] .dsauth-terms {
    direction: ltr;
    text-align: left;
}

.dsauth-terms a {
    color: #7b9d36;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dsauth-terms a:hover {
    color: #5c7a2e;
}

/* Pending / status */
.dsauth-status-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(123, 157, 54, 0.12);
    color: #7b9d36;
}

.dsauth-status-icon--pending {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

/* Modal */
.dsauth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.dsauth-modal-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px 24px;
    text-align: center;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.dsauth-modal-card h3 {
    margin: 12px 0 8px;
    font-size: 20px;
    color: #0f172a;
}

.dsauth-modal-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
}

.dsauth-modal-btn {
    width: 100%;
    margin-top: 20px;
    height: 46px;
    border: none;
    border-radius: 12px;
    background: #7b9d36;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

/* Legal page */
.dslegal-page {
    min-height: 100vh;
    background: #f8fafc;
    font-family: 'Tajawal', sans-serif;
}

.dslegal-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dslegal-header h1 {
    margin: 0;
    font-size: 20px;
    color: #0f172a;
}

.dslegal-back {
    color: #7b9d36;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.dslegal-body {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.dslegal-content {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    line-height: 1.85;
    color: #334155;
    font-size: 15px;
}

.dslegal-content:empty::before {
    content: attr(data-empty);
    color: #94a3b8;
}

.dslegal-empty {
    text-align: center;
    color: #94a3b8;
    padding: 48px 16px;
}

@media (max-width: 960px) {
    .dsauth-form-side {
        min-height: 100vh;
        padding-top: 24px;
        padding-inline: 20px;
    }
}
