:root {
    --primary: #065f46;
    --primary-dark: #064e3b;
    --primary-light: #d1fae5;
    --primary-soft: #ecfdf5;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --white: #ffffff;
    --radius: 24px;
    --shadow: 0 24px 70px rgba(15, 23, 42, .12);
    --page-max: 1180px;
}

* {
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at top right, rgba(6, 95, 70, .16), transparent 34%), radial-gradient(circle at bottom left, rgba(16, 185, 129, .12), transparent 30%), var(--bg);
    color: var(--text-dark);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    text-decoration: none;
}

.navbar {
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, .8);
}

.navbar-brand {
    color: var(--primary) !important;
    font-weight: 950;
    letter-spacing: -.4px;
}

.nav-link {
    color: #334155;
    font-weight: 700;
}

.nav-link:hover {
    color: var(--primary);
}


/* Ensure the toggle button is visible */

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}


/* On mobile, stack buttons nicely */

@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-bottom: 1rem;
    }
    .navbar-collapse .d-flex {
        flex-direction: column;
        /* Stack vertically */
        align-items: stretch !important;
        /* Make buttons full width */
    }
    .navbar-collapse .btn {
        width: 100%;
        text-align: center;
    }
}

.btn-main {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: 900;
    box-shadow: 0 14px 35px rgba(6, 95, 70, .25);
    transition: all .2s ease;
}

.btn-main:hover,
.btn-main:focus {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 18px 45px rgba(6, 95, 70, .32);
}

.btn-main:disabled {
    background: #0f766e;
    transform: none;
    box-shadow: none;
    opacity: .8;
}

.btn-outline-main {
    border: 1px solid rgba(6, 95, 70, .25);
    color: var(--primary);
    background: #fff;
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: 900;
    transition: all .2s ease;
}

.btn-outline-main:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.page-shell {
    position: relative;
    padding: 44px 0 70px;
}

.page-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(6, 95, 70, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(6, 95, 70, .055) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 70%);
    pointer-events: none;
}

.page-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--page-max);
    margin-inline: auto;
    padding-inline: 14px;
}

.hero-mini {
    text-align: center;
    margin-bottom: 28px;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(6, 95, 70, .15);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 900;
    font-size: .92rem;
}

.hero-title {
    font-size: clamp(1.9rem, 4vw, 3.4rem);
    line-height: 1.2;
    font-weight: 950;
    letter-spacing: -1px;
    margin: 18px 0 12px;
}

.hero-title span {
    color: var(--primary);
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.9;
    max-width: 760px;
    margin-inline: auto;
}

.app-grid {
    display: grid;
    grid-template-columns: 390px 1fr;
    gap: 22px;
    align-items: start;
}

.ask-panel,
.answer-panel {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 30px;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
    overflow: visible;
}

.panel-header {
    background: radial-gradient(circle at top left, rgba(255, 255, 255, .25), transparent 38%), linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 22px 24px;
}

.panel-header h1,
.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 950;
    margin: 0;
}

.panel-header p {
    color: rgba(255, 255, 255, .78);
    margin: 8px 0 0;
    line-height: 1.7;
    font-size: .94rem;
}

.panel-body {
    padding: 24px;
}

.form-label {
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 8px;
}


/* Choices.js wrapper */

.choices {
    margin-bottom: 0;
    direction: rtl;
}

.choices__inner {
    min-height: 52px;
    border-radius: 18px !important;
    border: 1px solid #dbe3ef !important;
    background: #ffffff !important;
    padding: 8px 14px !important;
    color: #0f172a;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.choices.is-focused .choices__inner,
.choices.is-open .choices__inner {
    border-color: rgba(6, 95, 70, .45) !important;
    box-shadow: 0 0 0 .22rem rgba(6, 95, 70, .12);
}


/* The opened dropdown menu */

.choices__list--dropdown,
.choices__list[aria-expanded] {
    border-radius: 18px !important;
    border: 1px solid rgba(6, 95, 70, .25) !important;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .14);
    overflow: hidden;
    margin-top: 8px;
    z-index: 9999;
}


/* Items inside dropdown */

.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {
    text-align: right;
    padding: 11px 16px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.6;
}


/* Hover / highlighted item */

.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
    background: #ecfdf5 !important;
    color: #065f46 !important;
}


/* Selected item */

.choices__item--choice.is-selected {
    background: #d1fae5 !important;
    color: #065f46 !important;
    font-weight: 900;
}


/* Selected text inside closed select */

.choices__list--single {
    padding: 0 0 0 28px !important;
}


/* Arrow */

.choices[data-type*=select-one]::after {
    left: 18px;
    right: auto;
    border-color: #065f46 transparent transparent transparent;
}

.choices[data-type*=select-one].is-open::after {
    border-color: transparent transparent #065f46 transparent;
}


/* Remove default ugly spacing */

.choices[data-type*=select-one] .choices__inner {
    padding-bottom: 8px !important;
}


/* Search input, if enabled */

.choices__input {
    text-align: right;
    direction: rtl;
}



.small-hint {
    font-size: .88rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.mode-cards {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.mode-preview-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 12px 14px;
}

.mode-preview-card strong {
    color: var(--text-dark);
    font-size: .94rem;
}

.mode-preview-card span {
    color: var(--text-muted);
    font-size: .84rem;
}

.credit-pill {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(6, 95, 70, .16);
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 950;
    white-space: nowrap;
    font-size: .86rem;
}

.quick-prompts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.quick-prompt {
    border: 1px solid rgba(6, 95, 70, .18);
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: .86rem;
    font-weight: 800;
    cursor: pointer;
    transition: all .15s ease;
}

.quick-prompt:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

.answer-empty {
    min-height: 430px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 40px 26px;
}

.empty-icon {
    width: 82px;
    height: 82px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 2rem;
    margin: 0 auto 18px;
    border: 1px solid rgba(6, 95, 70, .15);
}

.answer-empty h3 {
    font-size: 1.35rem;
    font-weight: 950;
    margin-bottom: 10px;
}

.answer-empty p {
    color: var(--text-muted);
    line-height: 1.85;
    max-width: 520px;
    margin-inline: auto;
}

.answer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.answer-toolbar-title {
    font-weight: 950;
    color: #0f172a;
}

.answer-toolbar-meta {
    color: var(--text-muted);
    font-size: .9rem;
    font-weight: 700;
}

.tool-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    font-size: .86rem;
    transition: all .15s ease;
}

.tool-btn:hover {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: rgba(6, 95, 70, .2);
}

.chat-row {
    display: flex;
    width: 100%;
    justify-content: center;
}

.chat-bubble {
    width: 100%;
    max-width: 100%;
    padding: 24px;
    background: #ffffff;
    line-height: 1.95;
    font-size: 1.03rem;
    color: #0f172a;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-bubble p {
    margin: 0 0 12px 0;
}

.chat-bubble p:last-child {
    margin-bottom: 0;
}

.chat-bubble strong {
    font-weight: 900;
}

.chat-bubble code {
    padding: 2px 7px;
    border-radius: 9px;
    background: rgba(15, 23, 42, .06);
    font-size: .95em;
}

.chat-bubble hr {
    margin: 18px 0;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.chat-bubble ol,
.chat-bubble ul {
    margin: 10px 0 14px 0;
    padding-right: 24px;
}

.chat-bubble li {
    margin: 7px 0;
}

.loading-box {
    padding: 26px;
}

.loading-card {
    background: radial-gradient(circle at top right, rgba(6, 95, 70, .14), transparent 35%), #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .06);
}

.loading-title {
    font-weight: 950;
    color: var(--primary);
}

.loading-steps {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: .92rem;
}

.spinner-border.text-main {
    color: var(--primary) !important;
}

.ref-pill {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, .10);
    border: 1px solid rgba(34, 197, 94, .25);
    font-size: .92rem;
    color: var(--primary);
}

.source-tip {
    display: inline-block;
    position: relative;
    cursor: help;
    padding: 2px 9px;
    margin-inline: 2px;
    border-radius: 999px;
    background: rgba(22, 163, 74, .10);
    border: 1px solid rgba(22, 163, 74, .25);
    color: #166534;
    font-size: .9em;
    font-weight: 900;
    white-space: nowrap;
}


/* Tooltip box */

.source-tip::after {
    content: attr(data-source);
    position: absolute;
    /* center tooltip above the pill */
    left: 50%;
    right: auto;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    width: max-content;
    max-width: min(380px, 80vw);
    white-space: normal;
    background: #0f172a;
    color: #ffffff;
    padding: 11px 13px;
    border-radius: 14px;
    font-size: .82rem;
    font-weight: 500;
    line-height: 1.75;
    text-align: right;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .25);
    opacity: 0;
    pointer-events: none;
    transition: all .15s ease;
    z-index: 9999;
}


/* Tooltip arrow */

.source-tip::before {
    content: "";
    position: absolute;
    left: 50%;
    right: auto;
    bottom: calc(100% + 4px);
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
    opacity: 0;
    transition: all .15s ease;
    z-index: 10000;
}

.source-tip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.source-tip:hover::before {
    opacity: 1;
}

.sources-list {
    margin: 0 24px 24px;
    padding: 18px;
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.sources-list-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 950;
    margin-bottom: 14px;
    color: #0f172a;
}

.sources-count {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(6, 95, 70, .16);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .82rem;
    font-weight: 950;
}

.source-card {
    position: relative;
    padding: 14px 15px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    margin-bottom: 10px;
    line-height: 1.7;
    transition: all .15s ease;
}

.source-card:hover {
    border-color: rgba(6, 95, 70, .25);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    transform: translateY(-2px);
}

.source-card:last-child {
    margin-bottom: 0;
}

.source-card-number {
    display: inline-block;
    font-weight: 950;
    color: var(--primary);
    margin-left: 6px;
}

.source-card-title {
    font-weight: 900;
    color: #0f172a;
}

.source-card small {
    color: #64748b;
    font-weight: 700;
}

.debug-box {
    direction: ltr;
    text-align: left;
    font-size: .86rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    margin: 0 24px 24px;
    overflow-x: auto;
}

.error-message {
    margin: 24px;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 18px;
    padding: 16px;
    font-weight: 800;
}

.footer-note {
    text-align: center;
    color: var(--text-muted);
    font-size: .9rem;
    margin-top: 24px;
    line-height: 1.8;
}

@media (max-width: 991px) {
    .app-grid {
        grid-template-columns: 1fr;
    }
    .ask-panel {
        position: static;
    }
    .answer-empty {
        min-height: 320px;
    }
}

@media (min-width: 992px) {
    .ask-panel {
        position: sticky;
        top: 92px;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 16px;
    }
    .page-shell {
        padding: 26px 0 44px;
    }
    .page-wrap {
        padding-inline: 10px;
    }
    .hero-mini {
        margin-bottom: 18px;
    }
    .hero-title {
        font-size: 1.9rem;
    }
    .panel-body {
        padding: 18px;
    }
    .panel-header {
        padding: 18px;
    }

    .sticky-ask {
        position: sticky;
        bottom: 10px;
        z-index: 5;
        background: rgba(248, 250, 252, .92);
        backdrop-filter: blur(10px);
        padding-top: 10px;
    }
    .chat-bubble {
        padding: 18px;
        font-size: .98rem;
        line-height: 1.85;
    }
    .sources-list,
    .debug-box {
        margin-inline: 18px;
        margin-bottom: 18px;
    }
    .answer-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .tool-btn {
        width: 100%;
    }
}

.auth-wrap {
    max-width: 520px;
    margin: 0 auto;
}

.auth-card {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 30px;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
    overflow: hidden;
}

.support-admin-reply {
    background: var(--primary-soft);
    border-color: rgba(6, 95, 70, .20);
}

.pricing-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 30px;
    height: 100%;
    box-shadow: 0 16px 45px rgba(15, 23, 42, .07);
    transition: all .2s ease;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow);
    border-color: rgba(6, 95, 70, .28);
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    transform: translateY(-10px);
}

.popular-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    padding: 7px 12px;
    font-weight: 900;
    font-size: .82rem;
}

.plan-name {
    color: var(--primary);
    font-weight: 950;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.plan-price {
    font-size: 2.3rem;
    font-weight: 950;
    letter-spacing: -1px;
}

.plan-price small {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 700;
}

.credits {
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 16px;
    padding: 12px;
    font-weight: 900;
    text-align: center;
    margin: 20px 0;
}

.plan-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.plan-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
    color: #334155;
    line-height: 1.7;
}

.check {
    color: var(--primary);
    font-weight: 950;
}

.credit-table {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 26px;
    box-shadow: 0 16px 45px rgba(15, 23, 42, .06);
}

.credit-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
}

.credit-row:last-child {
    border-bottom: none;
}

.credit-row strong {
    font-weight: 900;
}

.credit-value {
    color: var(--primary);
    font-weight: 950;
    white-space: nowrap;
}

@media (max-width: 991px) {
    .pricing-card.featured {
        transform: none;
    }
}

@media (max-width: 576px) {
    .pricing-card {
        padding: 24px;
    }
    .credit-row {
        flex-direction: column;
        gap: 4px;
    }
}

.support-admin-reply {
    background: var(--primary-soft);
    border-color: rgba(6, 95, 70, .20);
}

.support-admin-reply .source-card-number {
    color: var(--primary-dark);
}

.table {
    --bs-table-bg: transparent;
}

.table th {
    color: #334155;
    font-weight: 900;
    border-bottom: 1px solid var(--border);
}

.table td {
    color: #0f172a;
    font-weight: 600;
    border-bottom: 1px solid #edf2f7;
}

.swal-theme-popup {
    border-radius: 28px !important;
    padding: 28px 24px !important;
    border: 1px solid rgba(226, 232, 240, .95) !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .16) !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    direction: rtl !important;
}

.swal-theme-title {
    color: var(--text-dark) !important;
    font-weight: 950 !important;
    font-size: 1.45rem !important;
}

.swal-theme-text {
    color: var(--text-muted) !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
}

.swal-theme-confirm {
    background: var(--primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 11px 24px !important;
    font-weight: 900 !important;
    box-shadow: 0 14px 35px rgba(6, 95, 70, .25) !important;
    transition: all .2s ease !important;
}

.swal-theme-confirm:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 18px 45px rgba(6, 95, 70, .32) !important;
}

.swal-theme-cancel {
    background: #fff !important;
    color: var(--primary) !important;
    border: 1px solid rgba(6, 95, 70, .25) !important;
    border-radius: 999px !important;
    padding: 11px 24px !important;
    font-weight: 900 !important;
    margin-inline: 8px !important;
    transition: all .2s ease !important;
}

.swal-theme-cancel:hover {
    background: var(--primary-soft) !important;
    color: var(--primary-dark) !important;
    transform: translateY(-2px);
}

.swal2-actions {
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

.swal2-icon.swal2-success {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.legal-content .source-card {
    margin-bottom: 16px;
}

.legal-content .source-card h3 {
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 950;
    margin-bottom: 12px;
}

.legal-content .source-card p {
    color: #334155;
    line-height: 2;
    margin-bottom: 10px;
}

.legal-content .source-card p:last-child {
    margin-bottom: 0;
}

.legal-content ul {
    margin: 10px 0 12px;
    padding-right: 24px;
}

.legal-content li {
    color: #334155;
    line-height: 1.9;
    margin-bottom: 6px;
}

.legal-content strong {
    color: var(--primary);
}

.error-page-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.error-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 34px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
}

.error-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(6, 95, 70, .14), transparent 34%), radial-gradient(circle at bottom left, rgba(16, 185, 129, .10), transparent 30%);
    pointer-events: none;
}

.error-card-inner {
    position: relative;
    z-index: 2;
    padding: 54px 32px;
    text-align: center;
}

.error-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    height: 76px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--primary-soft);
    border: 1px solid rgba(6, 95, 70, .16);
    color: var(--primary);
    font-size: 2.2rem;
    font-weight: 950;
    letter-spacing: 1px;
    margin-bottom: 22px;
}

.error-icon {
    width: 92px;
    height: 92px;
    border-radius: 30px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 2.4rem;
    margin: 0 auto 22px;
    box-shadow: 0 18px 45px rgba(6, 95, 70, .25);
}

.error-title {
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    font-weight: 950;
    letter-spacing: -.8px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.error-title span {
    color: var(--primary);
}

.error-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.95;
    max-width: 640px;
    margin: 0 auto 28px;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.error-help-box {
    margin-top: 28px;
    padding: 16px 18px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--text-muted);
    line-height: 1.8;
    font-weight: 700;
}

@media (max-width: 576px) {
    .error-card-inner {
        padding: 38px 20px;
    }
    .error-actions .btn-main,
    .error-actions .btn-outline-main {
        width: 100%;
    }
    .error-code {
        min-width: 112px;
        height: 64px;
        font-size: 1.8rem;
    }
    .error-icon {
        width: 78px;
        height: 78px;
        font-size: 2rem;
    }
}

.text-primary {
    color: var(--primary) !important;
}

.choices__list--single .choices__item {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: rtl;
    text-align: right;
}

.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {
    white-space: normal;
}

.otp-note {
    margin-top: 10px;
    color: #64748b;
    font-size: .92rem;
    line-height: 1.8;
}

.pagination {
    --bs-pagination-color: var(--primary);
    --bs-pagination-bg: var(--white);
    --bs-pagination-border-color: var(--border);
    --bs-pagination-img-padding: 0.375rem 0.75rem;
    
    /* Hover state */
    --bs-pagination-hover-color: var(--primary-dark);
    --bs-pagination-hover-bg: var(--primary-soft);
    --bs-pagination-hover-border-color: var(--border);
    
    /* Active (Current Page) state */
    --bs-pagination-active-color: var(--white);
    --bs-pagination-active-bg: var(--primary);
    --bs-pagination-active-border-color: var(--primary);
    
    /* Disabled state */
    --bs-pagination-disabled-color: var(--text-muted);
    --bs-pagination-disabled-bg: var(--bg);
    --bs-pagination-disabled-border-color: var(--border);

    display: flex;
    padding-right: 0; /* Clear default list padding in RTL */
    list-style: none;
    gap: 4px; /* Optional: Adds a modern subtle separation between numbers */
}

.pagination .page-link {
    color: var(--bs-pagination-color);
    background-color: var(--bs-pagination-bg);
    border: 1px solid var(--bs-pagination-border-color);
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
}

/* Fix focus outline to match your theme colors */
.pagination .page-link:focus {
    color: var(--primary-dark);
    background-color: var(--primary-soft);
    box-shadow: 0 0 0 0.25rem rgba(6, 95, 70, 0.25); /* Subtle emerald glow */
    border-color: var(--primary);
}

/* --- Clean RTL Border Radius Handling --- */
/* If your page has dir="rtl", Bootstrap automatically shifts, but we enforce the custom radius safely */

/* Standard LTR Radius Fallbacks */
.pagination .page-item:first-child .page-link {
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
}
.pagination .page-item:last-child .page-link {
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

/* Dynamic Logical Properties (Overrides for RTL environments automatically) */
[dir="rtl"] .pagination .page-item:first-child .page-link,
html[lang="ar"] .pagination .page-item:first-child .page-link {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

[dir="rtl"] .pagination .page-item:last-child .page-link,
html[lang="ar"] .pagination .page-item:last-child .page-link {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
}

/* --- Active Page State Fill --- */

.pagination .page-item.active .page-link {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
    font-weight: 600;
    /* Optional: adds a soft shadow to the active page number to match your theme depth */
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.2); 
}

/* Ensure it retains its green background even if hovered while active */
.pagination .page-item.active .page-link:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: var(--white) !important;
}

/* Targets unselected page numbers when hovered */
.pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
    /* Optional: adds the same soft depth shadow on hover */
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.2);
}

/* Optional: Targets the active page if hovered, shifting it to your darker green */
.pagination .page-item.active .page-link:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: var(--white) !important;
}

.currency-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 8px 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.currency-switcher label {
    color: #64748b;
    font-weight: 800;
    font-size: .9rem;
    margin: 0;
}

.currency-switcher select {
    border: none;
    background: transparent;
    color: #065f46;
    font-weight: 900;
    outline: none;
    min-width: 110px;
    cursor: pointer;
}