/* Persian/RTL application adapter for the Ra Admin HTML theme (see vendor/ra-admin). */
@font-face { font-family: Vazirmatn; src: url('../fonts/Vazirmatn-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../fonts/Vazirmatn-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
:root {
  --bg0: #f6f6f6; --bg1: #fff; --bg2: #f4f7f8;
  --panel: #fff; --panel-solid: #fff; --line: #e5e9ed;
  --text: #15264b; --muted: #64748b; --accent: #167b89; --accent-2: #167b89;
  --rasa-danger: #b93838; --ok: #357347; --shadow: 0 3px 21px rgba(139,132,118,.06);
  --radius: .8rem; --side-w: 264px; --font: Vazirmatn, Tahoma, sans-serif;
  --display: var(--font); --ease: ease; --color-muted: var(--muted);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--text); background: var(--bg0); font: 14px/1.9 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #105661; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1,h2,h3,h4 { color: var(--text); font-family: var(--font); line-height: 1.6; margin: 0 0 12px; font-weight: 700; }
h1 { font-size: clamp(1.4rem, 2.5vw, 1.85rem); }
h2 { font-size: 1.12rem; } h3 { font-size: 1rem; }
p { margin: 0 0 14px; line-height: 1.9; }
small,.muted,.help { color: var(--muted); }
:focus-visible { outline: 3px solid #167b89; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip-link { position: fixed; top: -100px; inset-inline-start: 20px; padding: 12px; background: white; z-index: 2000; }
.skip-link:focus { top: 12px; }
/* Structural layout is provided by the original Ra Admin stylesheet. */
.ra-sidebar { right: 0; top: 0; }
.ra-sidebar .app-nav { padding: 0 12px 24px; overflow-y: auto; }
.app-logo .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.brand b { display: block; font-size: 24px; } .brand small { display: block; color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: rgba(var(--primary),.15); color: rgb(var(--primary)); font-weight: 700; font-size: 28px; }
.ra-sidebar .main-nav li a[aria-current=page] { background: rgba(var(--primary),.12); color: #167b89; border-radius: 8px; }
.ra-sidebar .main-nav li a i { font-size: 22px; margin-inline-end: 10px; }
.ra-sidebar .main-nav li a::after { display: none; }
.ra-sidebar details { border: 0; } .ra-sidebar summary { cursor: pointer; padding: 12px; color: var(--muted); font-weight: 700; font-size: 12px; }
.mobile-nav > summary { display: none; }
.sidebar-foot { padding: 16px; font-size: 11px; color: var(--muted); }
.ra-workspace .app-wrapper .app-content { padding: 80px 17rem 0 0; min-height: 100vh; }
.ra-workspace header.header-main { padding: 0 17rem 0 0; }
.ra-header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.account { display: flex; align-items: center; gap: 12px; } .account form { margin: 0; }
.ra-workspace main { padding: 24px 0; max-width: none; }
.ra-workspace .header-toggle { display: none; }
body nav:not(.ra-sidebar) { position: static; width: auto; height: auto; box-shadow: none; border-radius: 0; background: transparent; z-index: auto; }
.app-foot { position: static; padding: 16px; text-align: center; color: var(--muted); }
.page-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-heading p:last-child { margin-bottom: 0; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 700; background: white; color: var(--text); text-decoration: none; }
.button:hover { background: #edf6f7; color: var(--accent); }
.button.primary { background: var(--accent); color: white; border-color: var(--accent); }
.button.primary:hover { background: #105f6b; }
.button.subtle { background: #f5f7f9; color: var(--text); }
.button.danger { color: var(--rasa-danger); background: #fff0ed; border-color: #f7d3cc; }
.button.small { padding: 6px 10px; font-size: 12px; } .full { width: 100%; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.card { padding: 0; }
.card > .card-header, .card > .card-body, .card > .card-footer { padding: 1rem 1.25rem; }
.card:not(:has(> .card-body)), .panel,.glass,.stat { padding: 1.25rem; background: white; border-radius: var(--app-border-radius); box-shadow: var(--box-shadow); }
.card-head,.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.group-grid,.article-grid,.dashboard-grid,.stats-grid,.metric-grid,.stats,.chart-grid,.task-grid { display: grid; gap: 20px; }
.group-grid,.article-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); }
.dashboard-grid { grid-template-columns: minmax(0,1.7fr) minmax(250px,1fr); }
.stats-grid,.metric-grid,.stats { grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); margin-bottom: 24px; }
.stat span,.stat small { display: block; color: var(--muted); } .stat strong { display: block; color: var(--text); font-size: 28px; margin: 8px 0; }
.group-card { display: block; color: var(--text); } .group-card:hover { border-color: #48bece; }
.group-icon,.task-number { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--accent); background: #e5f5f7; font-size: 20px; font-weight: 700; margin-bottom: 14px; }
.group-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 14px; color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; border-radius: 6px; padding: 6px 10px; color: #52617b; background: #f0f3f6; font-size: 11px; line-height: 1.6; white-space: normal; }
.badge.green,.green { color: #357347; background: #eaf5e6; } .badge.red,.red { color: var(--rasa-danger); background: #fff0ed; }
.section-space { margin-top: 24px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tabs a { padding: 8px 14px; background: white; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; }
.tabs a[aria-current=page],.tabs a:hover { color: var(--accent); background: #e5f5f7; border-color: #abdce3; }
.group-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 20px; }
.group-bar form { display: flex; align-items: center; gap: 10px; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]),select,textarea { max-width: 100%; padding: 10px 12px; background: #fff; color: var(--text); border: 1px solid #cbd3dc; border-radius: 8px; }
.field input:not([type=checkbox]):not([type=radio]),.field select,.field textarea,form p input:not([type=checkbox]):not([type=radio]),form p select,form p textarea { width: 100%; }
input:focus,select:focus,textarea:focus { border-color: #167b89; outline: 2px solid #c3e9ed; outline-offset: 1px; }
input[type=checkbox],input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; vertical-align: middle; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.field label { font-weight: 700; font-size: 13px; } .field textarea { min-height: 120px; }
.field input[type=url],.field input[type=password],.field input[type=email] { direction: ltr; text-align: left; }
.checkbox-field { flex-direction: row; align-items: center; flex-wrap: wrap; }
.form-actions,.actions,.wizard-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.form-card { max-width: 1100px; }
.notice { padding: 14px 18px; background: #eaf6f8; border: 1px solid #c7e7eb; border-radius: 8px; margin-bottom: 20px; }
.notice.success { background: #eaf5e6; } .notice.warning,.warning { color: #795b14; background: #fff8e1; border-color: #f0dda0; }
.notice.error,.errorlist { color: var(--rasa-danger); } .errorlist { padding-inline-start: 18px; }
.table-scroll { overflow: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; text-align: start; white-space: nowrap; font-size: 13px; }
th { padding: 12px 16px; background: #f4f7f8; color: #52617b; font-size: 12px; border-bottom: 1px solid var(--line); }
td { padding: 14px 16px; border-bottom: 1px solid var(--line); } tr:hover td { background: #f9fbfc; }
.mono { font-family: monospace; direction: ltr; text-align: left; }
.chart-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .chart-card { min-height: 260px; }
.chart-card canvas { max-height: 260px; } .chart-empty { text-align: center; padding: 40px 12px; color: var(--muted); }
.wizard-layout { display: grid; grid-template-columns: 210px minmax(0,1fr) 240px; gap: 20px; align-items: start; }
.wizard-steps { list-style: none; padding: 0; margin: 0; position: sticky; top: 96px; }
.wizard-steps li { margin-bottom: 8px; }
.wizard-steps a { display: flex; align-items: center; gap: 10px; padding: 10px; color: var(--muted); border-radius: 8px; font-size: 12px; }
.wizard-steps b { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: #e9edf0; }
.wizard-steps [aria-current=step] a { background: #e5f5f7; color: var(--accent); font-weight: 700; }
.wizard-steps [aria-current=step] b { background: var(--accent); color: white; }
.wizard-live { position: sticky; top: 96px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #f9fbfc; }
.wizard-live-list { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.wizard-live-list li { border-bottom: 1px solid var(--line); padding: 10px 0; }
.wizard-live-list strong { display: block; color: var(--muted); font-size: 11px; }
.wizard-live-list span { display: block; overflow-wrap: anywhere; font-size: 13px; }
.wizard-live-empty { color: var(--muted); font-size: 12px; }
.form-wizard-shell { display: grid; grid-template-columns: minmax(0,1fr) 240px; gap: 24px; }
.wizard-steps-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.wizard-steps-inline button { border: 1px solid var(--line); border-radius: 8px; background: #f4f7f8; padding: 8px 12px; color: var(--muted); }
.wizard-steps-inline button[aria-current=step] { color: white; background: var(--accent); border-color: var(--accent); }
.wizard-progress { width: 100%; height: 6px; accent-color: var(--accent); margin-bottom: 20px; }
.wizard-status { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.task-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.task-card { display: flex; flex-direction: column; align-items: start; }
.task-card p { color: var(--muted); flex: 1; } .task-card .button { margin-top: 8px; }
.welcome-card { padding: 28px; background: #e8f5f7; border: 1px solid #c8e7eb; border-radius: 12px; margin-bottom: 24px; }
.news-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); color: inherit; }
.news-row > div { flex: 1; min-width: 0; } .pipeline,.checklist { padding: 0; list-style: none; }
.pipeline li,.checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.pipeline b { padding: 6px 12px; background: #e5f5f7; border-radius: 50%; }
.check-ok { color: var(--ok); } .check-missing { color: var(--muted); }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #edf5f7; }
.login-card { width: 440px; max-width: 100%; padding: 36px; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.login-card .brand-mark { margin-bottom: 24px; }
.access-list { display: grid; gap: 12px; } .access-entry { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.access-code { display: block; direction: ltr; text-align: left; padding: 12px; background: #f4f7f8; border-radius: 8px; overflow-wrap: anywhere; }
.access-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 14px; }
.calendar-columns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.calendar-entry { padding: 12px; margin: 8px 0; border: 1px solid var(--line); border-radius: 8px; background: white; }
.message-preview { padding: 20px; border-radius: 12px; background: #eaf6f8; white-space: pre-wrap; overflow-wrap: anywhere; }
.pagination { display: flex; gap: 16px; justify-content: center; margin: 24px 0; } .empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.htmx-request { opacity: .65; } #announcement:empty { display: none; }
#announcement { position: fixed; bottom: 20px; left: 20px; z-index: 1100; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.tracking-landing { max-width: 760px; margin: 28px auto; padding: 16px; }
@media (max-width: 1250px) {
  .wizard-layout { grid-template-columns: 190px minmax(0,1fr); }
  .wizard-layout > .wizard-live { grid-column: 1 / -1; position: static; }
  .form-wizard-shell { grid-template-columns: 1fr; } .form-wizard-shell .wizard-live { position: static; }
}
@media (max-width: 900px) {
 .ra-workspace .app-wrapper .app-content { padding: 80px 0 0; }
 .ra-workspace header.header-main { padding: 0; }
 .ra-workspace .header-toggle { display: inline-flex; }
 .ra-sidebar { transform: translateX(100%); transition: transform .2s; }
 .ra-workspace.menu-open .ra-sidebar { transform: none; top: 80px; height: calc(100vh - 80px); }
 .dashboard-grid,.wizard-layout,.calendar-columns,.task-grid { grid-template-columns: 1fr; }
 .wizard-steps { position: static; display: flex; flex-wrap: wrap; }
 .ra-header-row { gap: 8px; font-size: 12px; } .account { gap: 6px; }
}
@media (max-width: 540px) { .chart-grid { grid-template-columns: 1fr; } .form-actions .button { flex: 1; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.ra-workspace .app-foot { padding: 16px; width: auto; }
/* Duotone glyph layers overlap left-to-right even inside Persian text. */
.ph-duotone { direction: ltr; display: inline-block; white-space: nowrap; }

/* Every page uses native card bodies, forms and table components. */
.card:not(:has(> .card-body)), .panel { padding: 0; }
.card > .card-body { min-width: 0; }
.card .card-header h1,.card .card-header h2,.card .card-header h3 { margin: 0; }
.app-form .form-control,.app-form .form-select { background-color: var(--white); border-color: var(--border_color); }
.table-responsive { width: 100%; overflow-x: auto; }
.ra-page-title { padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px dashed var(--border_color); }
.searchbar { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.searchbar input { max-width: 360px; }
.access-entry { display: block; background: var(--white); box-shadow: var(--box-shadow); }
.stats .stat,.metric-grid .stat { border: 0; }

/* Native card containers own spacing, including summary metrics. */
.card.stat { padding: 0; }
.card.stat > span,.card.stat > strong,.card.stat > small { margin-inline: 20px; }
.card.stat > span { padding-top: 16px; }
.card.stat > small { padding-bottom: 16px; }

.card.access-entry { padding: 0; }
.card.bg-light-primary .card-body { color: var(--text); }
