@font-face{font-family:Vazirmatn;src:url('/fonts/Vazirmatn-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:Vazirmatn;src:url('/fonts/Vazirmatn-Bold.ttf') format('truetype');font-style:normal;font-weight:700;font-display:swap}
html[dir=rtl] body,html[dir=rtl] button,html[dir=rtl] input,html[dir=rtl] select,html[dir=rtl] textarea{font-family:Vazirmatn,Tahoma,Arial,sans-serif}
html[dir=rtl] .sidebar{inset-inline-start:-100%;inset-inline-end:auto}
@media(min-width:1200px){html[dir=rtl] .sidebar{inset-inline-start:0}}
html[dir=rtl] .sidebar.sidebar-open{inset-inline-start:0}
.brand-circle{width:42px;height:42px;display:flex;align-items:center;justify-content:center;border-radius:14px;background:#e0f4ed;color:#15816a;font-size:24px}
.brand-title{font-size:22px;font-weight:700;color:var(--text-primary-light);line-height:1.15}
.brand-title small{display:block;font-size:11px;margin-top:5px;color:#778799;font-weight:400}
.sidebar-brand{padding:26px 23px 16px}
.sidebar-menu-area{padding-top:4px}
.sidebar-menu li a .menu-icon{display:inline-flex;justify-content:center;font-size:21px}
.sidebar-menu .sidebar-menu-group-title{font-size:13px}
.sidebar-menu a.no-action{pointer-events:none}
.dashboard-main-body{width:100%}
.table{vertical-align:middle}
.table th{font-weight:700;white-space:nowrap}
.table td{font-size:14px}
.table thead th{font-size:13px}
.table-responsive{min-height:80px}
.metric-value{font-size:30px;line-height:1.5;font-weight:700}
.metric-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:16px;font-size:26px}
.login-background{min-height:100vh;background:linear-gradient(135deg,#eff8f4,#f6f8fc 55%,#e4effe);display:grid;place-items:center;padding:24px}
.login-card{max-width:460px;width:100%;border-radius:22px;box-shadow:0 18px 54px rgba(26,45,80,.08)}
.login-heading{font-size:26px;font-weight:700}
.form-label{font-weight:600}
.notice-panel{border:1px dashed #a5c6d4;border-radius:14px;padding:20px;background:#f6fbfd}
.table .masked-data{direction:ltr;unicode-bidi:isolate;display:inline-block}
.pagination{gap:8px}
.pagination .page-link{border-radius:9px!important}
@media(max-width:767px){.dashboard-main-body{padding:14px}.metric-value{font-size:25px}}
.quick-tile{display:flex;gap:12px;align-items:center;border:1px solid #e1e6ee;border-radius:13px;padding:16px 18px;color:var(--text-primary-light);min-height:78px}
.quick-tile i:first-child{color:#209f83}.quick-tile i:last-child{margin-inline-start:auto}.quick-tile:hover{border-color:#7fc9b7;color:#13836a;background:#f5fbf9}
.detail-list dt,.detail-list dd{padding:10px 0;border-bottom:1px solid #eef0f3}.detail-list dt{color:#738299;font-weight:500}.detail-list dd{font-weight:600;overflow-wrap:anywhere}

/* Phase 3: safe, non-executing display of editorial HTML and metadata */
.code-source-preview { font-family: Consolas, monospace; font-size: .875rem; unicode-bidi: plaintext; }
.source-text-preview { white-space: pre-wrap; overflow-wrap: anywhere; }

/* RTL table alignment (WowDash uses `th { text-align: left }` by default).
   Keep the override in the Rasa stylesheet so vendor styles remain untouched. */
html[dir="rtl"] .dashboard-main .table-responsive {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .dashboard-main .table-responsive > table.table {
    direction: rtl;
    width: 100%;
    text-align: right;
    margin-inline: 0;
}

/* WowDash's min-width:max-content makes wide lists overflow even when space
   is available. Preserve horizontal scrolling only where columns need it. */
html[dir="rtl"] .dashboard-main .table-responsive > table.bordered-table {
    min-width: 100%;
}

html[dir="rtl"] .dashboard-main .table-responsive > table.table > thead > tr > th,
html[dir="rtl"] .dashboard-main .table-responsive > table.table > tbody > tr > td,
html[dir="rtl"] .dashboard-main .table-responsive > table.table > tfoot > tr > td {
    text-align: right;
    vertical-align: middle;
}


/* Admission list: the native two-step approval disclosure stays compact in RTL tables. */
.admission-inline-approve > summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
}
.admission-inline-approve > summary::-webkit-details-marker { display: none; }
.admission-inline-approve[open] > form {
    min-width: 164px;
    background: var(--white, #fff);
}

/* Blog writing workspace: scoped styles; vendor WowDash files remain unchanged. */
.blog-code-input { min-height: 400px; resize: vertical; line-height: 1.8; }
.blog-editor-tabs .btn { padding: .35rem .65rem; }
.blog-preview-frame { display:block; width:100%; min-height:420px; background:#fff; border:1px solid #dce2eb; border-radius:10px; }
.blog-seo-preview { background: #f8fafc; border:1px solid #e5eaf1; padding:16px; border-radius:12px; overflow-wrap:anywhere; }
.blog-seo-title { font-size:1.1rem; color:#1959b0; font-weight:700; margin:4px 0; }
.blog-tags-list { max-height:230px; overflow-y:auto; padding:6px; border:1px solid #e1e6ee; border-radius:10px; display:grid; gap:3px; }
.blog-tag-option { display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:7px; cursor:pointer; font-size:.875rem; }
.blog-tag-option:hover { background:#f2f7fd; }
.blog-tag-option:has(input:checked) { background:#ecf8f3; color:#135c45; }
.blog-tag-option[hidden] { display:none; }
.blog-tag-option input { accent-color:#15816a; width:16px; height:16px; flex-shrink:0; }
.blog-media-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; max-height:265px; overflow-y:auto; }
.blog-media-choice { min-width:0; border:1px solid #dfe7ef; border-radius:9px; background:#fff; padding:6px; display:grid; gap:5px; text-align:center; overflow:hidden; }
.blog-media-choice img { width:100%; height:60px; object-fit:cover; border-radius:6px; }
.blog-media-choice i { font-size:28px; }
.blog-media-choice span { display:block; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.blog-media-choice.selected, .blog-media-choice:hover { border-color:#209f83; background:#f1fbf6; }
/* Jodit replaces the legacy Quill editor on Blog/Edit. Vendor CSS is not modified. */
#blog-visual-pane .jodit-container { direction:rtl; border-radius:10px; overflow:visible; max-width:100%; }
#blog-visual-pane .jodit-workplace { min-height:350px; }
#blog-visual-pane .jodit-wysiwyg { font-family:Vazirmatn,Tahoma,Arial,sans-serif; font-size:15px; line-height:2; direction:rtl; text-align:right; min-height:350px; overflow-wrap:anywhere; }
/* Jodit link contrast: only inside the editor, not the public article output. */
#blog-visual-pane .jodit-wysiwyg a[href],
#blog-visual-pane .jodit-wysiwyg a[href]:link,
#blog-visual-pane .jodit-wysiwyg a[href]:visited {
    color: #0d6efd !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    cursor: pointer;
}
#blog-visual-pane .jodit-wysiwyg a[href]:hover,
#blog-visual-pane .jodit-wysiwyg a[href]:focus {
    color: #084298 !important;
    text-decoration-thickness: 2px !important;
}

#blog-visual-pane .jodit-toolbar__box { direction:ltr; }
#blog-visual-pane .jodit-status-bar { direction:ltr; }
@media(min-width:1200px) { .blog-actions-card { position:sticky; top:12px; z-index:2; } }
@media(max-width:767px) { .blog-editor-tabs { width:100%; } .blog-editor-tabs .btn { flex:1; } }

/* Blog detail reading view */
.blog-details-cover{display:block;width:100%;height:auto;max-height:430px;object-fit:cover;border-radius:14px;border:1px solid #e4e9f1}
.blog-details-excerpt{font-size:1rem;line-height:2;color:#46546d;background:#f7fafc;padding:16px;border-radius:10px}
.blog-details-preview-frame{width:100%;min-height:690px;display:block;border:1px solid #dce4ee;border-radius:12px;background:#fff}
.blog-ai-controls{border:1px solid #dbe8f4;border-radius:12px;padding:16px;background:#f8fbff}
.blog-ai-controls textarea{min-height:70px}
.blog-ai-status{min-height:24px;line-height:1.8}
.blog-ai-image-preview{width:100%;max-height:230px;object-fit:cover;border:1px solid #e1e6ee;border-radius:12px}
