/* رصانة الأعمال — تخطيط المنصة فوق حزمة الهوية (rasanah-tokens + rasanah-bootstrap) */
html, body { height: 100%; }
.rb-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.rb-sidebar { padding: var(--rb-sp-4); display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.rb-brand { display: block; padding: var(--rb-sp-3) var(--rb-sp-2) var(--rb-sp-5); }
.rb-brand img { width: 100%; max-width: 190px; display: block; }
.rb-sidebar .rb-brand { background: var(--rb-ink); margin: calc(-1 * var(--rb-sp-4)) calc(-1 * var(--rb-sp-4)) var(--rb-sp-4); padding: var(--rb-sp-5) var(--rb-sp-5); }
.rb-nav-group { font-size: var(--rb-fs-xs); color: var(--rb-text-muted); letter-spacing: .04em; margin: var(--rb-sp-4) var(--rb-sp-3) var(--rb-sp-1); }
.rb-sidebar .nav-link { padding: 8px 12px; font-size: var(--rb-fs-sm); }
.rb-main { display: flex; flex-direction: column; min-width: 0; }
.rb-topbar { justify-content: flex-end; }
.rb-topbar .btn-outline-primary { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.4); --bs-btn-hover-bg: rgba(255,255,255,.12); --bs-btn-hover-color: #fff; }
.rb-content { padding: var(--rb-sp-6) var(--rb-sp-6) var(--rb-sp-8); max-width: 1280px; width: 100%; }
@media (max-width: 900px) {
  .rb-shell { grid-template-columns: 1fr; }
  .rb-sidebar { position: static; height: auto; }
  .rb-content { padding: var(--rb-sp-4); }
}

/* بطاقات الأرقام */
.rb-stat .rb-stat-label { font-size: var(--rb-fs-xs); color: var(--rb-text-muted); }
.rb-stat .rb-stat-value { font-size: var(--rb-fs-2xl); font-weight: 600; color: var(--rb-ink); font-family: var(--rb-font-mono); line-height: 1.2; }
.rb-stat .rb-stat-value.small { font-size: var(--rb-fs-lg); }

/* المحادثة */
.rb-thread { display: flex; flex-direction: column; gap: var(--rb-sp-2); max-height: 480px; overflow-y: auto; padding-inline-end: var(--rb-sp-1); }
.rb-msg { background: var(--rb-stone-100); border-radius: var(--rb-radius); padding: var(--rb-sp-2) var(--rb-sp-3); font-size: var(--rb-fs-sm); max-width: 92%; }
.rb-msg-me { background: var(--rb-ink-100); align-self: flex-end; }
.rb-msg-system { background: transparent; border: 1px dashed var(--rb-stone-300); color: var(--rb-text-muted); align-self: center; max-width: 100%; text-align: center; }

/* صفحات الحساب */
.rb-auth { min-height: 100vh; display: grid; place-items: center; background: var(--rb-paper); padding: var(--rb-sp-4); }
.rb-auth-card { width: 100%; max-width: 440px; background: var(--rb-surface); border: 1px solid var(--rb-stone-200); border-radius: var(--rb-radius-lg); padding: var(--rb-sp-6); box-shadow: var(--rb-shadow-2); border-top: 4px solid var(--rb-brass); }
.rb-auth-logo { width: 200px; display: block; margin: 0 auto var(--rb-sp-5); }

#blazor-error-ui .dismiss { cursor: pointer; float: left; }
.font-monospace, .rb-num { font-family: var(--rb-font-mono); }

h1:focus, h1:focus-visible { outline: none; }

.rb-legal { max-height: 46vh; overflow-y: auto; background: var(--rb-stone-100); border: 1px solid var(--rb-stone-200); border-radius: var(--rb-radius); padding: var(--rb-sp-4); font-size: var(--rb-fs-sm); line-height: 1.9; }
.rb-legal p:last-child { margin-bottom: 0; }

.rb-lang { font-family: var(--rb-font); }
[dir=ltr] .rb-topbar { justify-content: flex-end; }
[dir=ltr] .rb-sidebar { border-inline-end: 1px solid var(--rb-stone-200); }

/* أدوات الشريط العلوي: اللغة وتسجيل الخروج كأيقونات */
.rb-topbar-tools { display: flex; align-items: center; gap: .5rem; margin-inline-start: .75rem; }
.rb-icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-width: 2.25rem; height: 2.25rem; padding: 0 .5rem; }
.rb-icon-btn svg { display: block; }
.rb-lang-code { font-size: .75rem; font-weight: 600; line-height: 1; }
[dir=rtl] .rb-flip-rtl { transform: scaleX(-1); }

/* زرا الدخول/طلب الانضمام في صفحات الحساب */
.rb-auth-tabs { display: flex; gap: var(--rb-sp-2, .5rem); justify-content: flex-end; margin-bottom: var(--rb-sp-6, 1.5rem); }
.rb-auth-tabs .btn.disabled { pointer-events: none; opacity: .6; }
