/* =========================================================
   EFB Contact - Stylesheet v3
   بنك الطعام المصري - نظام التواصل الداخلي
   ========================================================= */

:root {
  --efb-primary: #0b5f36;
  --efb-primary-dark: #073d22;
  --efb-primary-light: #12844b;
  --efb-accent: #e6a01b;
  --efb-accent-light: #fdf1da;
  --efb-bg: #f2f5f3;
  --efb-card: #ffffff;
  --efb-border: #e5eae6;
  --efb-text: #1c2622;
  --efb-muted: #71827a;
  --efb-danger: #d6455a;
  --efb-danger-bg: #fdecee;
  --efb-warning: #e8a33d;
  --efb-warning-bg: #fdf2e2;
  --efb-success: #1f9e5c;
  --efb-success-bg: #e8f7ee;
  --efb-info: #3a7bd5;
  --efb-info-bg: #e9f1fd;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 40, 26, .05);
  --shadow-md: 0 6px 20px rgba(9, 40, 24, .08);
  --shadow-lg: 0 14px 38px rgba(9, 40, 24, .14);
}

* { box-sizing: border-box; }

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--efb-bg);
  color: var(--efb-text);
  text-align: start;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}

h1,h2,h3,h4,h5,h6 { font-weight: 800; letter-spacing: -.2px; }
a { text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cdd8d1; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.efb-shell { display: flex; min-height: 100vh; }

.efb-sidebar {
  width: 264px;
  background: linear-gradient(190deg, var(--efb-primary-dark) 0%, var(--efb-primary) 65%, #0e6e40 100%);
  color: #fff;
  padding: 22px 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.efb-sidebar .brand {
  padding: 0 22px 20px;
  font-size: 21px;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,.14);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.efb-sidebar .brand .brand-mark {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.14);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
.efb-sidebar .brand .brand-text small {
  display: block; font-size: 11px; font-weight: 500; opacity: .72; margin-top: 1px;
}

.efb-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.efb-nav-group-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.45); padding: 14px 10px 6px;
}
.efb-nav-link {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  color: #e9f3ee; text-decoration: none; font-size: 14px; font-weight: 600;
  border-radius: 10px; transition: background .15s, transform .1s; position: relative;
}
.efb-nav-link .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.efb-nav-link .nav-label { flex: 1; }
.efb-nav-link:hover { background: rgba(255,255,255,.10); color: #fff; }
.efb-nav-link.active { background: rgba(255,255,255,.16); color: #fff; box-shadow: inset 3px 0 0 var(--efb-accent); }

.efb-nav-badge {
  background: var(--efb-danger); color: #fff; font-size: 10.5px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; display: none; align-items: center;
  justify-content: center; padding: 0 5px;
}
.efb-sidebar-footer { margin-top: auto; padding: 14px 22px 4px; font-size: 11px; color: rgba(255,255,255,.5); }

.efb-main { flex: 1; padding: 26px 32px 50px; min-width: 0; }

.efb-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.efb-topbar h4 { margin: 0; font-weight: 800; font-size: 22px; }
.efb-topbar .efb-subtitle { color: var(--efb-muted); font-size: 13.5px; margin-top: 2px; font-weight: 500; }

.efb-user-chip {
  display: flex; align-items: center; gap: 10px; background: var(--efb-card);
  border: 1px solid var(--efb-border); padding: 7px 8px 7px 16px; border-radius: 30px;
  font-size: 13.5px; box-shadow: var(--shadow-sm);
}
.efb-user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--efb-primary), var(--efb-primary-light));
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}

.efb-card { background: var(--efb-card); border: 1px solid var(--efb-border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.efb-card-title { font-weight: 800; font-size: 15px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }

.efb-stat { text-align: start; display: flex; align-items: center; gap: 14px; transition: transform .15s, box-shadow .15s; }
.efb-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.efb-stat .icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; flex-shrink: 0; }
.efb-stat .num { font-size: 25px; font-weight: 800; color: var(--efb-text); line-height: 1.1; }
.efb-stat .label { color: var(--efb-muted); font-size: 12.5px; margin-top: 2px; font-weight: 600; }

.icon-green  { background: var(--efb-success-bg); color: var(--efb-success); }
.icon-orange { background: var(--efb-warning-bg); color: var(--efb-warning); }
.icon-blue   { background: var(--efb-info-bg); color: var(--efb-info); }
.icon-red    { background: var(--efb-danger-bg); color: var(--efb-danger); }
.icon-gold   { background: var(--efb-accent-light); color: var(--efb-accent); }

.efb-table th { font-size: 12.5px; color: var(--efb-muted); font-weight: 700; border-bottom: 2px solid var(--efb-border); padding-bottom: 10px; text-transform: uppercase; letter-spacing: .03em; }
.efb-table td { vertical-align: middle; font-size: 14px; padding-top: 12px; padding-bottom: 12px; }
.efb-table tr.unread { font-weight: 700; background: #f0f8f3; }
.efb-table tr { cursor: pointer; border-bottom: 1px solid var(--efb-border); }
.efb-table tr:last-child { border-bottom: none; }
.efb-table tr:hover { background: #f6faf7; }

.badge { font-weight: 700; font-size: 11.5px; padding: 5px 10px; border-radius: 7px; }
.badge-priority-Low       { background:#e4e9e6; color:#4a5850; }
.badge-priority-Normal    { background: var(--efb-info-bg); color: var(--efb-info); }
.badge-priority-High      { background: var(--efb-warning-bg); color: #9c6300; }
.badge-priority-Urgent    { background: var(--efb-danger-bg); color: var(--efb-danger); }
.badge-status-Open        { background: var(--efb-info-bg); color: var(--efb-info); }
.badge-status-InProgress  { background: var(--efb-warning-bg); color: #9c6300; }
.badge-status-Completed   { background: var(--efb-success-bg); color: var(--efb-success); }
.badge-status-Pending     { background: var(--efb-warning-bg); color: #9c6300; }
.badge-status-Approved    { background: var(--efb-success-bg); color: var(--efb-success); }
.badge-status-Rejected    { background: var(--efb-danger-bg); color: var(--efb-danger); }
.badge-status-active      { background: var(--efb-success-bg); color: var(--efb-success); }
.badge-status-inactive    { background: var(--efb-danger-bg); color: var(--efb-danger); }

.btn { font-weight: 700; border-radius: 9px; font-size: 14px; }
.btn-success { background: var(--efb-primary); border-color: var(--efb-primary); }
.btn-success:hover { background: var(--efb-primary-dark); border-color: var(--efb-primary-dark); }
.btn-outline-success { color: var(--efb-primary); border-color: var(--efb-primary); }
.btn-outline-success:hover { background: var(--efb-primary); border-color: var(--efb-primary); }

.form-control, .form-select { border-radius: 9px; border-color: var(--efb-border); font-size: 14px; padding: 9px 12px; }
.form-control:focus, .form-select:focus { border-color: var(--efb-primary-light); box-shadow: 0 0 0 .18rem rgba(11,95,54,.13); }
.form-label { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }

.efb-empty { text-align: center; padding: 44px 20px; color: var(--efb-muted); }
.efb-empty .emoji { font-size: 34px; margin-bottom: 10px; }
.efb-empty .title { font-weight: 700; color: var(--efb-text); font-size: 15px; margin-bottom: 4px; }
.efb-empty .desc { font-size: 13px; }

.efb-login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 15% 20%, rgba(255,255,255,.08), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(230,160,27,.18), transparent 45%),
    linear-gradient(135deg, var(--efb-primary-dark), var(--efb-primary) 60%, #0f7a45);
  padding: 20px;
}
.efb-login-card { background: #fff; border-radius: 18px; padding: 40px 36px; width: 100%; max-width: 400px; box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.efb-login-card .logo { text-align: center; font-size: 26px; font-weight: 800; color: var(--efb-primary); margin-bottom: 4px; }
.efb-login-card .logo .mark { font-size: 30px; display: block; margin-bottom: 6px; }
.efb-login-card .sub { text-align: center; color: var(--efb-muted); font-size: 13px; margin-bottom: 26px; font-weight: 500; }

.efb-error, .efb-success-box { padding: 10px 14px; border-radius: 9px; font-size: 13px; margin-bottom: 14px; display: none; font-weight: 600; }
.efb-error { background: var(--efb-danger-bg); color: var(--efb-danger); border: 1px solid #f6c9c9; }
.efb-success-box { background: var(--efb-success-bg); color: var(--efb-success); border: 1px solid #bfe8cf; }

.modal-content { border-radius: var(--radius); border: none; box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--efb-border); }
.modal-footer { border-top: 1px solid var(--efb-border); }

.efb-attachment-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--efb-accent-light); color: #8a5e00; padding: 6px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 700; }
.efb-progress-track { background: #e7ece9; border-radius: 20px; height: 8px; overflow: hidden; }
.efb-progress-bar { background: linear-gradient(90deg, var(--efb-primary-light), var(--efb-primary)); height: 100%; border-radius: 20px; transition: width .3s; }
.efb-kv { font-size: 13px; color: var(--efb-muted); }
.efb-kv strong { color: var(--efb-text); }

.efb-chat-list-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.efb-chat-list-item:hover, .efb-chat-list-item.active { background: var(--efb-success-bg); }
.efb-chat-bubble { max-width: 72%; padding: 10px 14px; border-radius: 14px; font-size: 14px; margin-bottom: 8px; line-height: 1.5; }
.efb-chat-bubble.mine { background: var(--efb-primary); color: #fff; margin-inline-start: auto; border-radius: 14px; }
.efb-chat-bubble.theirs { background: #eef2f0; color: var(--efb-text); margin-inline-end: auto; border-radius: 14px; }

.efb-cal-day { min-height: 88px; border: 1px solid var(--efb-border); border-radius: 10px; padding: 6px; font-size: 12px; background: #fff; }
.efb-cal-day.today { border-color: var(--efb-primary); background: var(--efb-success-bg); }
.efb-cal-day .d-num { font-weight: 800; font-size: 12.5px; margin-bottom: 4px; }
.efb-cal-evt { font-size: 10.5px; padding: 2px 6px; border-radius: 5px; margin-bottom: 2px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.efb-cal-evt.Meeting { background: var(--efb-info-bg); color: var(--efb-info); }
.efb-cal-evt.Training { background: var(--efb-accent-light); color: #8a5e00; }
.efb-cal-evt.Campaign { background: var(--efb-success-bg); color: var(--efb-success); }

/* ---------- Chips (Lists control) ---------- */
.efb-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.efb-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--efb-bg); border: 1px solid var(--efb-border); padding: 6px 8px 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.efb-chip .rm { cursor: pointer; color: var(--efb-danger); font-weight: 800; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; }
.efb-chip .rm:hover { background: var(--efb-danger-bg); }

/* ---------- Permission matrix ---------- */
.efb-perm-table th, .efb-perm-table td { text-align: center; }
.efb-perm-table td:first-child, .efb-perm-table th:first-child { text-align: start; }
.form-check-input:checked { background-color: var(--efb-primary); border-color: var(--efb-primary); }

@media (max-width: 900px) {
  .efb-shell { flex-direction: column; }
  .efb-sidebar { width: 100%; height: auto; position: relative; }
  .efb-main { padding: 18px 16px 40px; }
}

/* =========================================================
   Dark mode (بيتفعّل بـ [data-theme="dark"] على <html>)
   بيشتغل مع data-bs-theme="dark" اللي Bootstrap 5.3 بيتحكم بيه لوحده
   في الفورمز والمودالز والقوائم المنسدلة، إحنا هنا بنظبط عناصرنا احنا بس.
   ========================================================= */
html[data-theme="dark"] {
  --efb-bg: #101712;
  --efb-card: #182119;
  --efb-border: #263129;
  --efb-text: #eaf1eb;
  --efb-muted: #93a89b;
  --efb-primary: #1fa863;
  --efb-primary-dark: #0d3f26;
  --efb-primary-light: #29c47a;
  --efb-accent: #f0b03d;
  --efb-accent-light: rgba(240, 176, 61, .14);
  --efb-danger: #ef6b7c;
  --efb-danger-bg: rgba(239, 107, 124, .14);
  --efb-warning: #f0b03d;
  --efb-warning-bg: rgba(240, 176, 61, .14);
  --efb-success: #29c47a;
  --efb-success-bg: rgba(41, 196, 122, .14);
  --efb-info: #6ba3ef;
  --efb-info-bg: rgba(107, 163, 239, .14);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 6px 20px rgba(0,0,0,.35);
  --shadow-lg: 0 14px 38px rgba(0,0,0,.5);
  color-scheme: dark;
}

html[data-theme="dark"] .efb-table tr.unread { background: rgba(31, 168, 99, .10); }
html[data-theme="dark"] .efb-table tr:hover { background: rgba(255,255,255,.03); }
html[data-theme="dark"] .efb-chat-bubble.theirs { background: #223028; }
html[data-theme="dark"] .efb-cal-day { background: var(--efb-card); }
html[data-theme="dark"] .efb-login-card { background: var(--efb-card); }
html[data-theme="dark"] .efb-progress-track { background: #263129; }
html[data-theme="dark"] .efb-chip { background: #1d2721; }
html[data-theme="dark"] .icon-green, html[data-theme="dark"] .icon-orange,
html[data-theme="dark"] .icon-blue, html[data-theme="dark"] .icon-red,
html[data-theme="dark"] .icon-gold { filter: saturate(1.05); }

/* ---------- Toggle buttons (لغة / ثيم) ---------- */
.efb-toggle-row { display: flex; align-items: center; gap: 8px; }
.efb-toggle-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--efb-card); border: 1px solid var(--efb-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .12s, background .15s;
}
.efb-toggle-btn:hover { transform: translateY(-1px); background: var(--efb-bg); }

/* ---------- Brand logo (بدل الإيموجي) ---------- */
.brand-logo-mark { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.efb-login-card .logo-mark-img { width: 56px; height: auto; display: block; margin: 0 auto 10px; }

/* =========================================================
   Toast notifications (رسائل جديدة لحظية)
   ========================================================= */
.efb-toast-container {
  position: fixed;
  top: 18px;
  inset-inline-end: 18px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
  width: calc(100vw - 36px);
}

.efb-toast {
  background: var(--efb-card);
  border: 1px solid var(--efb-border);
  border-inline-start: 4px solid var(--efb-primary);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: efbToastIn .22s ease;
  transition: opacity .25s, transform .25s;
}
.efb-toast:hover { transform: translateY(-2px); }
.efb-toast.out { opacity: 0; transform: translateY(-10px); }

.efb-toast .t-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.efb-toast .t-content { min-width: 0; }
.efb-toast .t-title { font-weight: 800; font-size: 13.5px; margin-bottom: 2px; }
.efb-toast .t-body {
  font-size: 12.5px; color: var(--efb-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

@keyframes efbToastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 500px) {
  .efb-toast-container { top: 10px; inset-inline-end: 10px; inset-inline-start: 10px; max-width: none; width: auto; }
}

/* =========================================================
   Notification Center (مركز الإشعارات)
   ========================================================= */
.efb-notif-wrap { position: relative; }

.efb-notif-dot {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--efb-danger);
  border: 2px solid var(--efb-card);
  display: none;
}

.efb-notif-panel {
  position: absolute;
  top: 48px;
  inset-inline-end: 0;
  width: 340px;
  max-width: 90vw;
  background: var(--efb-card);
  border: 1px solid var(--efb-border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 1500;
  overflow: hidden;
}

.efb-notif-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--efb-border);
  font-weight: 800;
  font-size: 14px;
}
.efb-notif-panel-header a { font-size: 12px; font-weight: 600; color: var(--efb-primary); }

.efb-notif-panel-list { max-height: 340px; overflow-y: auto; }

.efb-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--efb-border);
  text-decoration: none;
  color: inherit;
}
.efb-notif-item:hover { background: var(--efb-bg); }
.efb-notif-item .n-icon { font-size: 16px; margin-top: 1px; }
.efb-notif-item .n-body { flex: 1; min-width: 0; }
.efb-notif-item .n-title { display: block; font-weight: 700; font-size: 13px; }
.efb-notif-item .n-desc {
  display: block; font-size: 12px; color: var(--efb-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.efb-notif-item .n-time { font-size: 10.5px; color: var(--efb-muted); white-space: nowrap; }

.efb-notif-panel-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--efb-border);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  background: var(--efb-bg);
}

/* =========================================================
   Message action icons (Star / Archive / Trash) + Undo banner
   ========================================================= */
.efb-msg-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.efb-msg-action-btn {
  background: none; border: none; cursor: pointer; font-size: 15px;
  opacity: .55; transition: opacity .12s, transform .12s; padding: 2px;
}
.efb-msg-action-btn:hover { opacity: 1; transform: scale(1.12); }
.efb-msg-action-btn.active { opacity: 1; }

.efb-undo-box {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: var(--efb-success-bg); color: var(--efb-success);
  border: 1px solid #bfe8cf; border-radius: 9px; padding: 10px 14px;
  font-size: 13.5px; font-weight: 600; margin-bottom: 14px; display: none;
}
.efb-undo-box button {
  background: none; border: 1px solid currentColor; border-radius: 7px;
  padding: 3px 12px; font-weight: 700; font-size: 12.5px; cursor: pointer; color: inherit;
}

/* =========================================================
   Dashboard: enterprise stat/chart cards
   ========================================================= */
.efb-chart-card canvas { max-width: 100%; }
.efb-rank-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--efb-border);
}
.efb-rank-row:last-child { border-bottom: none; }
.efb-rank-num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--efb-bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 11.5px; color: var(--efb-muted); flex-shrink: 0;
}
.efb-rank-row:nth-child(1) .efb-rank-num { background: var(--efb-accent-light); color: var(--efb-accent); }
.efb-rank-row:nth-child(2) .efb-rank-num { background: #eceff1; color: #78909c; }
.efb-rank-row:nth-child(3) .efb-rank-num { background: #fbe9e7; color: #d17a5a; }

/* =========================================================
   Search page
   ========================================================= */
.efb-search-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

@media (max-width: 500px) {
  .efb-notif-panel { position: fixed; top: 60px; inset-inline-end: 8px; inset-inline-start: 8px; width: auto; }
}

/* =========================================================
   Premium Compose Experience v1
   ========================================================= */
.efb-compose-card {
  position: relative;
  overflow: visible;
  padding: 0;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(9, 40, 24, .09);
  border-color: rgba(11,95,54,.10);
}
.efb-compose-card > form { padding: 24px 28px 28px; }
.efb-compose-hero {
  display:flex; align-items:center; gap:14px; padding:20px 28px;
  background: linear-gradient(135deg, rgba(11,95,54,.055), rgba(230,160,27,.06));
  border-bottom:1px solid var(--efb-border);
}
.efb-compose-hero-icon {
  width:48px;height:48px;border-radius:15px;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,var(--efb-primary),var(--efb-primary-light));
  box-shadow:0 8px 18px rgba(11,95,54,.18);font-size:22px;
}
.efb-compose-kicker { font-size:11px; color:var(--efb-primary); font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.efb-compose-hero h2 { margin:1px 0 0; font-size:20px; font-weight:800; }
.efb-compose-hero p { margin:2px 0 0; color:var(--efb-muted); font-size:12.5px; }
.efb-recipient-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:18px; }
.efb-recipient-group { position:relative; min-width:0; }
.efb-field-hint { color:var(--efb-muted); font-size:11.5px; font-weight:500; margin-inline-start:4px; }
.efb-native-recipient { position:absolute!important; width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important; }
.efb-recipient-box {
  position:relative; min-height:54px; display:flex; align-items:center; flex-wrap:wrap; gap:7px;
  padding:7px 10px; background:var(--efb-card); border:1px solid var(--efb-border); border-radius:13px;
  transition:border-color .18s, box-shadow .18s, background .18s;
}
.efb-recipient-box:focus-within { border-color:var(--efb-primary-light); box-shadow:0 0 0 4px rgba(11,95,54,.09); }
.efb-recipient-input { flex:1 1 110px; min-width:90px; border:0; outline:0; background:transparent; color:var(--efb-text); font:inherit; font-size:13px; padding:7px 4px; }
.efb-recipient-input::placeholder { color:#9aa9a1; }
.efb-recipient-chips { display:contents; }
.efb-recipient-chip {
  display:inline-flex; align-items:center; gap:7px; max-width:100%; padding:4px 8px 4px 6px;
  border:1px solid rgba(11,95,54,.10); background:var(--efb-success-bg); border-radius:999px;
  font-size:12px; font-weight:700; color:var(--efb-text); animation:efbChipIn .16s ease-out;
}
.efb-recipient-avatar { width:27px;height:27px;min-width:27px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(135deg,var(--efb-primary),var(--efb-primary-light));font-size:12px;font-weight:800; }
.efb-recipient-chip .recipient-text { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:190px; }
.efb-recipient-chip .recipient-email { color:var(--efb-muted); font-size:10.5px; font-weight:600; margin-inline-start:2px; }
.efb-recipient-remove { border:0;background:transparent;color:var(--efb-muted);font-size:16px;line-height:1;padding:2px 3px;cursor:pointer;border-radius:50%; }
.efb-recipient-remove:hover { background:var(--efb-danger-bg);color:var(--efb-danger); }
.efb-recipient-menu {
  position:absolute; z-index:1000; inset-inline:0; top:calc(100% + 7px); max-height:260px; overflow:auto; display:none;
  padding:7px; background:var(--efb-card); border:1px solid var(--efb-border); border-radius:14px;
  box-shadow:0 18px 40px rgba(9,40,24,.16);
}
.efb-recipient-menu.open { display:block; }
.efb-recipient-option { display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:10px;cursor:pointer; }
.efb-recipient-option:hover,.efb-recipient-option.active { background:var(--efb-success-bg); }
.efb-recipient-option .avatar { width:34px;height:34px;min-width:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(135deg,var(--efb-primary),var(--efb-primary-light));font-weight:800; }
.efb-recipient-option .name { font-size:12.5px;font-weight:800; }
.efb-recipient-option .email { font-size:11px;color:var(--efb-muted); }
.efb-recipient-empty { padding:18px 10px;text-align:center;color:var(--efb-muted);font-size:12px; }
.efb-field-block { padding-top:2px; }
.efb-premium-input,.efb-premium-textarea { border-radius:13px!important; padding:12px 14px!important; background:rgba(255,255,255,.72)!important; }
.efb-premium-textarea { resize:vertical; min-height:170px; line-height:1.8; }
.efb-compose-card #sendBtn { padding:10px 18px; border-radius:11px; box-shadow:0 7px 18px rgba(11,95,54,.16); }
.efb-compose-card #draftBtn { padding:10px 18px; border-radius:11px; }
.efb-compose-card .form-select { min-height:44px; border-radius:11px; }
@keyframes efbChipIn { from { opacity:0; transform:translateY(3px) scale(.98); } to { opacity:1; transform:none; } }
@media (max-width: 760px) { .efb-recipient-grid { grid-template-columns:1fr; } .efb-compose-card > form { padding:20px 16px; } .efb-compose-hero { padding:18px 16px; } }
html[data-theme="dark"] .efb-compose-hero { background:linear-gradient(135deg,rgba(41,196,122,.07),rgba(240,176,61,.07)); }
html[data-theme="dark"] .efb-premium-input, html[data-theme="dark"] .efb-premium-textarea { background:#151d17!important; }

/* ---------- Global premium polish ---------- */
.efb-card { box-shadow: 0 8px 28px rgba(9,40,24,.055); transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.efb-card:hover { border-color: rgba(11,95,54,.14); }
.efb-topbar h4 { letter-spacing:-.5px; }
.efb-topbar .efb-subtitle { opacity:.9; }
.btn { transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.btn:hover:not(:disabled) { transform:translateY(-1px); }
.form-control, .form-select { transition:border-color .16s ease, box-shadow .16s ease, background .16s ease; }

/* =========================================================
   Dashboard Premium Redesign v2
   ========================================================= */
.efb-dashboard-main{padding-top:18px}
.efb-dashboard-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:184px;padding:28px 32px;margin-bottom:26px;border-radius:24px;background:linear-gradient(135deg,#073d22 0%,#0b5f36 58%,#12844b 100%);color:#fff;box-shadow:0 18px 45px rgba(7,61,34,.18)}
.efb-dashboard-hero:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 12% 18%,rgba(255,255,255,.12),transparent 26%),radial-gradient(circle at 88% 70%,rgba(230,160,27,.18),transparent 30%);pointer-events:none}
.hero-copy,.hero-actions{position:relative;z-index:2}.hero-eyebrow{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:rgba(255,255,255,.72)}
.hero-live-dot{width:7px;height:7px;border-radius:50%;background:#65e6a4;box-shadow:0 0 0 5px rgba(101,230,164,.12);animation:efbPulse 2s infinite}
.efb-dashboard-hero h1{font-size:30px;margin:8px 0 3px;letter-spacing:-.7px}.efb-dashboard-hero h1 strong{font-weight:800}.efb-dashboard-hero p{margin:0;color:rgba(255,255,255,.74);font-size:13px}.hero-date{margin-top:12px;color:rgba(255,255,255,.55);font-size:11.5px;font-weight:600}
.hero-actions{display:flex;gap:9px;flex-wrap:wrap}.hero-action{display:inline-flex;align-items:center;gap:8px;padding:10px 13px;border:1px solid rgba(255,255,255,.18);border-radius:12px;color:#fff;background:rgba(255,255,255,.09);font-size:12px;font-weight:700;backdrop-filter:blur(10px);transition:.18s}.hero-action:hover{color:#fff;background:rgba(255,255,255,.16);transform:translateY(-2px)}.hero-action.primary{background:#fff;color:#07502d;border-color:#fff;box-shadow:0 8px 22px rgba(0,0,0,.12)}.hero-action.primary:hover{color:#07502d;background:#fff}
.hero-orb{position:absolute;border-radius:50%;border:1px solid rgba(255,255,255,.08);pointer-events:none}.orb-one{width:260px;height:260px;inset-inline-end:-70px;top:-130px}.orb-two{width:170px;height:170px;inset-inline-end:130px;bottom:-120px}
.dashboard-section{margin-bottom:25px}.section-heading{display:flex;align-items:end;gap:18px;margin-bottom:13px}.section-heading h2{font-size:18px;margin:1px 0 0;letter-spacing:-.35px}.section-kicker,.panel-kicker{display:block;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--efb-primary);opacity:.75}.section-rule{height:1px;flex:1;background:linear-gradient(90deg,var(--efb-border),transparent);margin-bottom:7px}.org-pill{margin-inline-start:auto;padding:5px 10px;border-radius:999px;background:var(--efb-success-bg);color:var(--efb-primary);font-size:10.5px;font-weight:800}
.dashboard-kpis{margin:0}.premium-stat{position:relative;overflow:hidden;min-height:98px;padding:17px 18px;border-radius:17px;border-color:rgba(9,40,24,.075);box-shadow:0 7px 25px rgba(9,40,24,.045)}.premium-stat:after{content:"";position:absolute;width:90px;height:90px;border-radius:50%;inset-inline-end:-38px;bottom:-48px;background:var(--stat-soft);opacity:.8}.premium-stat .icon{width:44px;height:44px;border-radius:13px;background:var(--stat-soft);font-size:19px}.premium-stat .stat-copy{min-width:0;position:relative;z-index:1}.premium-stat .num{font-size:25px;line-height:1;font-weight:800;letter-spacing:-.4px}.premium-stat .num-small{font-size:15px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}.premium-stat .label{font-size:11.5px;margin-top:5px;font-weight:700}.premium-stat .stat-foot{display:block;color:var(--efb-muted);font-size:9.5px;margin-top:2px;font-weight:600}.stat-blue{--stat-soft:#eaf2ff}.stat-red{--stat-soft:#fdecee}.stat-green{--stat-soft:#e8f7ee}.stat-orange{--stat-soft:#fdf2e2}.stat-violet{--stat-soft:#f0ecff}.stat-gold{--stat-soft:#fff4dc}
.dashboard-content-row{margin-bottom:26px}.dashboard-panel{height:100%;padding:20px 20px 17px;border-radius:18px}.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.panel-heading .efb-card-title{margin:1px 0 0;font-size:15px}.panel-link{font-size:11.5px;font-weight:800;color:var(--efb-primary);padding:5px 9px;border-radius:8px;background:var(--efb-success-bg)}.panel-icon{width:30px;height:30px;border-radius:9px;background:var(--efb-success-bg);color:var(--efb-primary);display:flex;align-items:center;justify-content:center;font-weight:900;font-size:13px}.dashboard-table{margin-bottom:0}.dashboard-table thead th{font-size:10.5px;padding:9px 10px;color:var(--efb-muted);border-bottom:1px solid var(--efb-border);font-weight:800}.dashboard-table tbody td{padding:11px 10px;font-size:11.5px;vertical-align:middle}.dashboard-table tbody tr{transition:background .15s}.dashboard-table tbody tr:hover{background:var(--efb-bg)}.dashboard-table .badge{font-size:9.5px;padding:4px 8px}.task-panel #deptCompletionList{min-height:205px}.task-panel .mb-3{padding:9px 0;margin-bottom:2px!important}.task-panel .efb-progress-track{height:7px;border-radius:999px;background:var(--efb-bg)}.task-panel .efb-progress-bar{height:100%;border-radius:999px;background:linear-gradient(90deg,var(--efb-primary),var(--efb-primary-light))}
.dashboard-loading{min-height:180px;display:flex;align-items:center;justify-content:center;gap:9px;color:var(--efb-muted);font-size:12px}.loading-ring{width:18px;height:18px;border:2px solid var(--efb-border);border-top-color:var(--efb-primary);border-radius:50%;animation:efbSpin .8s linear infinite}.dashboard-org{padding-top:2px;border-top:1px solid var(--efb-border);margin-top:5px}.org-heading{padding-top:25px}.org-kpis{margin-bottom:16px}.chart-panel{min-height:270px}.chart-wrap{height:190px;position:relative}.approval-chart-wrap{height:205px;display:flex;align-items:center;justify-content:center}.efb-chart-card canvas{max-height:220px}
@keyframes efbSpin{to{transform:rotate(360deg)}}@keyframes efbPulse{0%,100%{opacity:1}50%{opacity:.4}}
html[data-theme="dark"] .efb-dashboard-hero{box-shadow:0 18px 45px rgba(0,0,0,.28)}html[data-theme="dark"] .premium-stat:after{opacity:.35}html[data-theme="dark"] .hero-action.primary{color:#073d22}
@media(max-width:1000px){.efb-dashboard-hero{align-items:flex-start;flex-direction:column}.hero-actions{width:100%}.hero-action{flex:1;justify-content:center}.dashboard-table{min-width:650px}}
@media(max-width:600px){.efb-dashboard-main{padding:14px 12px 35px}.efb-dashboard-hero{padding:22px 20px;border-radius:19px;min-height:210px}.efb-dashboard-hero h1{font-size:25px}.hero-action{font-size:11px;padding:9px 10px}.section-heading h2{font-size:16px}.premium-stat{min-height:90px;padding:14px}.premium-stat .icon{width:39px;height:39px;font-size:17px}.premium-stat .num{font-size:22px}.premium-stat .stat-foot{display:none}.dashboard-panel{padding:16px}.chart-panel{min-height:245px}.chart-wrap{height:170px}.approval-chart-wrap{height:185px}}

/* v31 Dashboard layout: balanced insight cards and a compact action rail. */
.dashboard-focus-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:-5px 0 26px}.focus-action{min-width:0;display:flex;align-items:center;gap:11px;padding:13px 15px;border:1px solid var(--efb-border);border-radius:16px;background:var(--efb-card);color:var(--efb-text);text-decoration:none;box-shadow:0 7px 20px rgba(9,40,24,.04);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.focus-action:hover{color:var(--efb-text);transform:translateY(-2px);border-color:rgba(11,95,54,.22);box-shadow:0 12px 28px rgba(9,40,24,.09)}.focus-action-primary{background:linear-gradient(135deg,#0a5c35,#12844b);color:#fff;border-color:transparent}.focus-action-primary:hover{color:#fff}.focus-icon{width:35px;height:35px;display:grid;place-items:center;border-radius:11px;background:var(--efb-success-bg);color:var(--efb-primary);font-weight:900;font-size:17px;flex:0 0 auto}.focus-action-primary .focus-icon{background:rgba(255,255,255,.16);color:#fff}.focus-action span:nth-child(2){display:grid;gap:2px;min-width:0;flex:1}.focus-action strong{font-size:12px}.focus-action small{font-size:10px;color:var(--efb-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.focus-action-primary small{color:rgba(255,255,255,.72)}.focus-action>b{font-size:14px;opacity:.5}.dashboard-charts-grid,.dashboard-side-stack{display:grid;gap:16px;height:100%}.dashboard-charts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-side-stack{grid-template-rows:minmax(235px,1fr) minmax(255px,1fr)}.dashboard-charts-grid .chart-panel,.dashboard-side-stack>.dashboard-panel{height:100%;min-height:0}.chart-panel{display:flex;flex-direction:column}.chart-panel .panel-heading{margin-bottom:8px}.chart-wrap{height:auto;min-height:230px;flex:1;position:relative}.chart-wrap canvas,.approval-chart-wrap canvas{width:100%!important;height:100%!important}.approval-chart-wrap{height:auto;min-height:175px;flex:1}.approval-panel{min-height:0}.chart-badge{padding:4px 8px;border-radius:999px;background:var(--efb-bg);color:var(--efb-muted);font-size:9.5px;font-weight:800;white-space:nowrap}.chart-badge-green{background:var(--efb-success-bg);color:var(--efb-primary)}html[data-theme="dark"] .focus-action{background:#18221c;border-color:#2c3a32;color:#e8f0eb}html[data-theme="dark"] .focus-action-primary{background:linear-gradient(135deg,#0a4e2e,#0d713e)}html[data-theme="dark"] .focus-icon{background:#203027;color:#70d79b}@media(max-width:1199px){.dashboard-charts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-side-stack{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;margin-top:16px}.dashboard-side-stack>.dashboard-panel{min-height:260px}}@media(max-width:700px){.dashboard-focus-strip,.dashboard-charts-grid,.dashboard-side-stack{grid-template-columns:1fr}.dashboard-side-stack{grid-template-rows:none}.focus-action{padding:12px 13px}.chart-wrap{min-height:205px}.dashboard-side-stack>.dashboard-panel{min-height:230px}}

/* v31 Admin backup / restore centre. */
.data-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:26px 30px;margin-bottom:20px;border-radius:22px;color:#fff;background:linear-gradient(135deg,#093b24,#0b6940 60%,#137f4b);box-shadow:0 18px 42px rgba(8,72,42,.18)}.data-hero h1{font-size:26px;margin:5px 0}.data-hero p{margin:0;color:rgba(255,255,255,.74);font-size:13px}.data-eyebrow{display:block;font-size:10px;font-weight:800;letter-spacing:.12em;color:rgba(255,255,255,.64)}.data-hero-icon{display:grid;place-items:center;width:62px;height:62px;border-radius:18px;background:rgba(255,255,255,.12);font-size:30px}.data-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:18px}.data-card{padding:22px;border-radius:18px}.data-card h2,.data-danger-card h2{font-size:17px;margin:13px 0 7px}.data-card p,.data-danger-card p{font-size:12px;line-height:1.8;color:var(--efb-muted);margin-bottom:16px}.data-card-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;font-size:22px;font-weight:900}.data-card-icon.export{background:var(--efb-success-bg);color:var(--efb-primary)}.data-card-icon.restore{background:#eaf2ff;color:#2865ad}.data-options{display:grid;gap:9px;padding:11px 12px;margin-bottom:15px;border-radius:12px;background:var(--efb-bg);font-size:12px}.data-options input{accent-color:var(--efb-primary)}.data-card .btn{width:100%;margin-top:13px}.data-card small{display:block;margin-top:10px;color:var(--efb-muted);font-size:10.5px}.data-danger-card{display:flex;align-items:center;justify-content:space-between;gap:25px;padding:22px;margin-bottom:18px;border-radius:18px;border-color:rgba(190,42,55,.2);background:linear-gradient(135deg,rgba(255,248,248,.9),var(--efb-card))}.data-eyebrow.danger{color:#bd3440}.data-danger-actions{display:grid;grid-template-columns:minmax(180px,1fr) auto auto auto;gap:9px;min-width:min(610px,100%)}.data-scope{padding:17px 22px}.data-scope h2{font-size:14px;margin:0 0 5px}.data-scope p{font-size:11.5px;color:var(--efb-muted);margin:0}html[data-theme="dark"] .data-card-icon.restore{background:#1d2c40;color:#86baff}html[data-theme="dark"] .data-danger-card{background:linear-gradient(135deg,#271c1e,#18221c);border-color:#572d32}@media(max-width:850px){.data-grid{grid-template-columns:1fr}.data-danger-card{display:grid}.data-danger-actions{min-width:0;width:100%}}@media(max-width:560px){.data-hero{padding:20px}.data-hero h1{font-size:22px}.data-hero-icon{width:48px;height:48px;font-size:24px}.data-card,.data-danger-card{padding:17px}.data-danger-actions{grid-template-columns:1fr}.data-danger-actions .btn{width:100%}}


/* =========================================================
   Sidebar / Topbar Premium UX v3
   - قابلة للطي: عرض كامل أو أيقونات فقط
   - الشريط العلوي ثابت أثناء التمرير
   - SVG icons موحدة بدل الإيموجي
   ========================================================= */
.efb-shell { --sidebar-expanded: 264px; --sidebar-collapsed: 82px; }
.efb-sidebar {
  width: var(--sidebar-expanded);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 120;
  overflow-x: hidden;
  transition: width .26s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease;
  box-shadow: 8px 0 28px rgba(4,34,19,.07);
}
.efb-main {
  transition: padding .22s ease;
  min-width: 0;
}
.efb-sidebar .brand {
  min-height: 52px;
  padding: 0 16px 18px;
  gap: 10px;
  position: relative;
}
.efb-sidebar .brand-text { min-width: 0; white-space: nowrap; overflow: hidden; }
.efb-sidebar .brand-logo-mark {
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 11px;
  background: rgba(255,255,255,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 8px 20px rgba(0,0,0,.08);
}
.efb-sidebar-toggle {
  margin-inline-start: auto;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.efb-sidebar-toggle:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.22); transform: translateY(-1px); }
.efb-sidebar-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.efb-nav { padding: 0 10px; gap: 3px; }
.efb-nav-group-label { padding-inline: 10px; }
.efb-nav-link {
  min-height: 44px;
  padding: 8px 11px;
  gap: 11px;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.efb-nav-link .nav-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: rgba(255,255,255,.78);
}
.efb-nav-link .nav-icon svg { width: 19px; height: 19px; display: block; transition: transform .18s ease, color .18s ease; }
.efb-nav-link:hover .nav-icon svg { transform: scale(1.08); color: #fff; }
.efb-nav-link.active .nav-icon { color: #fff; }
.efb-nav-link.active .nav-icon svg { filter: drop-shadow(0 3px 8px rgba(255,255,255,.12)); }
.efb-nav-link:hover { border-color: rgba(255,255,255,.08); transform: translateX(-1px); }
.efb-nav-link.active { border-color: rgba(255,255,255,.08); box-shadow: inset 3px 0 0 var(--efb-accent), 0 8px 18px rgba(0,0,0,.06); }
.efb-nav-badge { flex-shrink: 0; box-shadow: 0 3px 8px rgba(0,0,0,.14); }

/* الشريط الأبيض ثابت أعلى المحتوى */
.efb-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 72px;
  margin: -26px -32px 24px;
  padding: 14px 32px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(9,40,24,.08);
  box-shadow: 0 8px 22px rgba(9,40,24,.055);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
}
.efb-topbar:after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -1px;
  width: 90px;
  height: 2px;
  background: linear-gradient(90deg, var(--efb-accent), transparent);
  opacity: .9;
}
html[data-theme="dark"] .efb-topbar { background: rgba(24,33,25,.94); border-bottom-color: rgba(255,255,255,.07); box-shadow: 0 8px 22px rgba(0,0,0,.18); }

/* حالة القائمة المطوية */
.efb-shell.sidebar-collapsed .efb-sidebar { width: var(--sidebar-collapsed); }
.efb-shell.sidebar-collapsed .efb-sidebar .brand { justify-content: center; padding-inline: 10px; }
.efb-shell.sidebar-collapsed .efb-sidebar .brand-text,
.efb-shell.sidebar-collapsed .efb-nav-group-label,
.efb-shell.sidebar-collapsed .efb-sidebar-footer { display: none; }
.efb-shell.sidebar-collapsed .efb-sidebar-toggle { margin-inline: 0; }
.efb-shell.sidebar-collapsed .efb-sidebar-toggle svg { transform: rotate(180deg); }
.efb-shell.sidebar-collapsed .efb-nav { padding-inline: 10px; }
.efb-shell.sidebar-collapsed .efb-nav-link {
  justify-content: center;
  padding: 8px 0;
  gap: 0;
  border-radius: 12px;
}
.efb-shell.sidebar-collapsed .efb-nav-link:hover { transform: none; }
.efb-shell.sidebar-collapsed .efb-nav-link .nav-icon { width: 30px; height: 30px; }
.efb-shell.sidebar-collapsed .efb-nav-link .nav-icon svg { width: 20px; height: 20px; }
.efb-shell.sidebar-collapsed .efb-nav-link .nav-label { display: none; }
.efb-shell.sidebar-collapsed .efb-nav-badge {
  position: absolute;
  top: 5px;
  inset-inline-end: 5px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  font-size: 9px;
  border-radius: 8px;
}

/* Tooltip صغير وأنيق في وضع الأيقونات فقط */
@media (min-width: 901px) {
  .efb-shell.sidebar-collapsed .efb-nav-link { position: relative; }
  .efb-shell.sidebar-collapsed .efb-nav-link:hover:after {
    content: attr(title);
    position: absolute;
    inset-inline-start: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    padding: 7px 10px;
    border-radius: 8px;
    background: #14231b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
    pointer-events: none;
    z-index: 500;
  }
}

@media (max-width: 900px) {
  .efb-shell { flex-direction: column; }
  .efb-sidebar { width: 100%; height: auto; position: relative; box-shadow: none; }
  .efb-sidebar-toggle { display: none; }
  .efb-topbar { position: sticky; top: 0; margin: -18px -16px 20px; padding: 12px 16px; }
  .efb-shell.sidebar-collapsed .efb-sidebar { width: 100%; }
}

@media (max-width: 600px) {
  .efb-topbar { min-height: 64px; }
}


/* =========================================================
   Sidebar / Topbar Premium Light v4
   - زر الطي داخل الشريط العلوي
   - Sidebar أبيض/Off-white في الوضع العادي
   - Dark mode بدرجة فحمية ناعمة
   - أيقونات ملونة ومتناسقة مع النص والحالة النشطة
   ========================================================= */
.efb-shell {
  --sidebar-expanded: 264px;
  --sidebar-collapsed: 82px;
  --sidebar-bg: #fbfcfb;
  --sidebar-surface: #f4f7f5;
  --sidebar-text: #23332b;
  --sidebar-muted: #7b8b83;
  --sidebar-icon: #0b5f36;
  --topbar-bg: rgba(255,255,255,.92);
}

.efb-sidebar {
  width: var(--sidebar-expanded);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-inline-end: 1px solid #e4ebe6;
  box-shadow: 8px 0 30px rgba(20,48,34,.055);
  padding: 16px 0 14px;
}

.efb-sidebar .brand {
  min-height: 58px;
  padding: 0 18px 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e7ece9;
}
.efb-sidebar .brand-logo-mark {
  width: 38px;
  height: 38px;
  padding: 7px;
  border-radius: 12px;
  background: #eef6f1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 6px 16px rgba(10,95,54,.08);
}
.efb-sidebar .brand-text { color: #173327; }
.efb-sidebar .brand-text small { color: var(--sidebar-muted); opacity: 1; }

.efb-nav { padding: 0 11px; gap: 4px; }
.efb-nav-group-label {
  color: #8a9992;
  padding: 14px 11px 7px;
}
.efb-nav-link {
  min-height: 44px;
  color: var(--sidebar-text);
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  font-weight: 700;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.efb-nav-link .nav-icon {
  color: var(--sidebar-icon);
  width: 23px;
  height: 23px;
  filter: none;
}
.efb-nav-link .nav-icon svg { width: 19px; height: 19px; }
.efb-nav-link:hover {
  color: #123f2a;
  background: #f0f6f2;
  border-color: #e1ebe5;
  transform: translateX(-1px);
}
.efb-nav-link:hover .nav-icon { color: #0b5f36; }
.efb-nav-link.active {
  color: #0b5f36;
  background: linear-gradient(90deg,#e8f5ed 0%,#f4f9f6 100%);
  border-color: #d7e8de;
  box-shadow: inset 3px 0 0 var(--efb-accent), 0 7px 18px rgba(11,95,54,.06);
}
.efb-nav-link.active .nav-icon { color: #0b5f36; }
.efb-nav-link:nth-of-type(2) .nav-icon { color:#3a7bd5; }
.efb-nav-link:nth-of-type(3) .nav-icon { color:#e08a1e; }
.efb-nav-link:nth-of-type(4) .nav-icon { color:#6f61d9; }
.efb-nav-link:nth-of-type(5) .nav-icon { color:#4a8fd8; }
.efb-nav-link:nth-of-type(6) .nav-icon { color:#d85b6a; }
.efb-nav-link:nth-of-type(7) .nav-icon { color:#e6a01b; }
.efb-nav-link:nth-of-type(8) .nav-icon { color:#7a68c9; }
.efb-nav-link:nth-of-type(9) .nav-icon { color:#3c8d73; }
.efb-nav-link:nth-of-type(10) .nav-icon { color:#d6455a; }
.efb-nav-link:nth-of-type(12) .nav-icon { color:#1f9e5c; }
.efb-nav-link:nth-of-type(13) .nav-icon { color:#0b8caa; }
.efb-nav-link:nth-of-type(14) .nav-icon { color:#e06c75; }
.efb-nav-link:nth-of-type(16) .nav-icon { color:#6b63c7; }
.efb-nav-link:nth-of-type(17) .nav-icon { color:#3a7bd5; }
.efb-nav-link:nth-of-type(18) .nav-icon { color:#e6a01b; }

.efb-sidebar-footer { color: #9aa79f; padding-inline: 22px; }

.efb-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 74px;
  margin: -26px -32px 24px;
  padding: 12px 28px;
  background: var(--topbar-bg);
  border-bottom: 1px solid #e5ebe7;
  box-shadow: 0 8px 24px rgba(20,48,34,.055);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}
.efb-topbar-title-wrap { display:flex; align-items:center; gap:12px; min-width:0; }
.efb-topbar-title-wrap > div { min-width:0; }
.efb-topbar-sidebar-toggle {
  margin: 0;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid #dfe8e3;
  border-radius: 12px;
  color: #0b5f36;
  background: #fff;
  box-shadow: 0 5px 16px rgba(11,95,54,.08);
}
.efb-topbar-sidebar-toggle:hover {
  color: #073d22;
  background: #f2f8f4;
  border-color: #cfe0d6;
  transform: translateY(-1px);
}
.efb-topbar-sidebar-toggle svg { width:18px; height:18px; }
.efb-topbar-sidebar-toggle[data-collapsed="true"] svg { transform: rotate(180deg); }

/* في اللغة الإنجليزية (LTR) السايدبار على اليسار مش اليمين، فسهم الفتح/القفل
   لازم يتعكس أفقيًا عشان يفضل منطقي بصريًا زي العربي بالظبط. */
html[dir="ltr"] .efb-topbar-sidebar-toggle svg,
html[dir="ltr"] .efb-sidebar-toggle svg { transform: scaleX(-1); }
html[dir="ltr"] .efb-topbar-sidebar-toggle[data-collapsed="true"] svg,
html[dir="ltr"] .efb-shell.sidebar-collapsed .efb-sidebar-toggle svg { transform: none; }

/* وضع التصغير */
.efb-shell.sidebar-collapsed .efb-sidebar { width: var(--sidebar-collapsed); }
.efb-shell.sidebar-collapsed .efb-sidebar .brand { justify-content:center; padding-inline:10px; }
.efb-shell.sidebar-collapsed .efb-sidebar .brand-text,
.efb-shell.sidebar-collapsed .efb-nav-group-label,
.efb-shell.sidebar-collapsed .efb-sidebar-footer { display:none; }
.efb-shell.sidebar-collapsed .efb-nav { padding-inline:10px; }
.efb-shell.sidebar-collapsed .efb-nav-link {
  justify-content:center;
  padding:8px 0;
  gap:0;
  border-radius:12px;
}
.efb-shell.sidebar-collapsed .efb-nav-link .nav-icon { width:34px; height:34px; }
.efb-shell.sidebar-collapsed .efb-nav-link .nav-icon svg { width:21px; height:21px; }
.efb-shell.sidebar-collapsed .efb-nav-link .nav-label { display:none; }
.efb-shell.sidebar-collapsed .efb-nav-badge {
  position:absolute; top:5px; inset-inline-end:5px; min-width:15px; height:15px;
  padding:0 4px; font-size:9px; border-radius:8px;
}

html[data-theme="dark"] .efb-shell {
  --sidebar-bg: #171d19;
  --sidebar-surface: #202923;
  --sidebar-text: #e6eee9;
  --sidebar-muted: #93a39a;
  --sidebar-icon: #63c993;
  --topbar-bg: rgba(24,30,26,.94);
}
html[data-theme="dark"] .efb-sidebar {
  background: var(--sidebar-bg);
  border-inline-end-color: #2b3630;
  box-shadow: 8px 0 30px rgba(0,0,0,.18);
}
html[data-theme="dark"] .efb-sidebar .brand { border-bottom-color:#2a342e; }
html[data-theme="dark"] .efb-sidebar .brand-logo-mark { background:#202c25; box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 6px 16px rgba(0,0,0,.2); }
html[data-theme="dark"] .efb-sidebar .brand-text { color:#eef5f1; }
html[data-theme="dark"] .efb-sidebar .brand-text small { color:#9babA2; }
html[data-theme="dark"] .efb-nav-group-label { color:#819189; }
html[data-theme="dark"] .efb-nav-link { color:#dce7e1; }
html[data-theme="dark"] .efb-nav-link:hover { color:#fff; background:#202923; border-color:#303c35; }
html[data-theme="dark"] .efb-nav-link.active { color:#e9fff3; background:linear-gradient(90deg,#20382b,#1b2821); border-color:#31463a; box-shadow:inset 3px 0 0 var(--efb-accent), 0 7px 18px rgba(0,0,0,.18); }
html[data-theme="dark"] .efb-nav-link.active .nav-icon { color:#72d5a0; }
html[data-theme="dark"] .efb-sidebar-footer { color:#75847c; }
html[data-theme="dark"] .efb-topbar { border-bottom-color:#2b342f; box-shadow:0 8px 24px rgba(0,0,0,.16); }
html[data-theme="dark"] .efb-topbar-sidebar-toggle { color:#79d3a3; background:#202923; border-color:#334039; box-shadow:0 5px 16px rgba(0,0,0,.16); }
html[data-theme="dark"] .efb-topbar-sidebar-toggle:hover { background:#27332c; color:#a4ebc3; border-color:#425148; }

@media (max-width: 900px) {
  .efb-topbar-title-wrap { flex:1; }
  .efb-sidebar-toggle { display:inline-flex; }
  .efb-topbar { margin:-18px -16px 20px; padding:12px 16px; }
}
@media (max-width: 600px) {
  .efb-topbar { min-height:64px; }
  .efb-topbar-sidebar-toggle { width:36px; height:36px; flex-basis:36px; }
}

/* =========================================================
   v13 Premium navigation + chat emoji picker
   ========================================================= */
.efb-nav-link .nav-icon,
.efb-nav-link:hover .nav-icon,
.efb-nav-link:focus-visible .nav-icon,
.efb-nav-link .nav-icon svg {
  color: var(--nav-icon-color, #0b5f36) !important;
  stroke: currentColor;
}
.efb-nav-link.active .nav-icon,
.efb-nav-link.active .nav-icon svg { color:#0b5f36 !important; }
.efb-nav-link:nth-of-type(2){--nav-icon-color:#3a7bd5}.efb-nav-link:nth-of-type(3){--nav-icon-color:#e08a1e}.efb-nav-link:nth-of-type(4){--nav-icon-color:#6f61d9}.efb-nav-link:nth-of-type(5){--nav-icon-color:#4a8fd8}.efb-nav-link:nth-of-type(6){--nav-icon-color:#d85b6a}.efb-nav-link:nth-of-type(7){--nav-icon-color:#e6a01b}.efb-nav-link:nth-of-type(8){--nav-icon-color:#7a68c9}.efb-nav-link:nth-of-type(9){--nav-icon-color:#3c8d73}.efb-nav-link:nth-of-type(10){--nav-icon-color:#d6455a}.efb-nav-link:nth-of-type(12){--nav-icon-color:#1f9e5c}.efb-nav-link:nth-of-type(13){--nav-icon-color:#0b8caa}.efb-nav-link:nth-of-type(14){--nav-icon-color:#e06c75}.efb-nav-link:nth-of-type(16){--nav-icon-color:#6b63c7}.efb-nav-link:nth-of-type(17){--nav-icon-color:#3a7bd5}.efb-nav-link:nth-of-type(18){--nav-icon-color:#e6a01b}
html[data-theme="dark"] .efb-nav-link.active .nav-icon,
html[data-theme="dark"] .efb-nav-link.active .nav-icon svg { color:#72d5a0 !important; }

.efb-chat-compose { position:relative; display:flex; align-items:center; gap:8px; width:100%; }
.efb-chat-compose #chatInput { flex:1; min-width:0; }
/* efb-emoji-btn / efb-emoji-picker: راجع نسخة موحدة تحت (تستخدم --efb-card) */


/* v15: premium chat + stable light-mode navigation icons */
.efb-nav-link:hover .nav-icon,
.efb-nav-link:hover .nav-icon svg,
.efb-nav-link:focus-visible .nav-icon,
.efb-nav-link:focus-visible .nav-icon svg {
  color: var(--nav-icon-color, #0b5f36) !important;
  stroke: currentColor !important;
}
html[data-theme="dark"] .efb-nav-link:hover .nav-icon,
html[data-theme="dark"] .efb-nav-link:hover .nav-icon svg {
  color: var(--nav-icon-color, #72d5a0) !important;
}
.efb-chat-row { display:flex; width:100%; margin-bottom:10px; }
.efb-chat-row.mine { justify-content:flex-end; }
.efb-chat-row.theirs { justify-content:flex-start; }
.efb-chat-bubble { box-shadow:0 5px 18px rgba(20,48,34,.06); position:relative; }
.efb-chat-bubble.mine { border-bottom-right-radius:5px; }
.efb-chat-bubble.theirs { border-bottom-left-radius:5px; }
.efb-chat-text { white-space:normal; overflow-wrap:anywhere; }
.efb-chat-time { margin-top:5px; font-size:9px; opacity:.68; text-align:end; }
.efb-chat-bubble.mine .efb-chat-time { color:rgba(255,255,255,.82); }
.efb-chat-bubble.theirs .efb-chat-time { color:var(--efb-muted); }
html[data-theme="dark"] .efb-chat-bubble { box-shadow:0 8px 24px rgba(0,0,0,.18); }

/* =========================================================
   v16 - Quick Search + notification polish
   ========================================================= */
.efb-topbar-actions{display:flex;align-items:center;gap:10px;min-width:0}
.efb-global-search{position:relative;width:min(330px,30vw);min-width:220px}
.efb-global-search-btn{width:100%;height:40px;border:1px solid var(--efb-border);background:var(--efb-card);color:var(--efb-muted);border-radius:12px;display:flex;align-items:center;gap:9px;padding:0 12px;cursor:text;box-shadow:0 4px 16px rgba(9,40,24,.04);font:inherit;font-size:12px;font-weight:600;text-align:start}
.efb-global-search-btn svg,.efb-global-search-input-wrap svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.efb-global-search-btn span{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.efb-global-search-btn kbd,.efb-global-search-input-wrap kbd{font-family:inherit;font-size:10px;padding:3px 6px;border:1px solid var(--efb-border);border-radius:6px;background:var(--efb-bg);color:var(--efb-muted);white-space:nowrap}
.efb-global-search-panel{position:absolute;z-index:2000;top:calc(100% + 8px);inset-inline:0;width:390px;max-width:min(390px,calc(100vw - 24px));background:var(--efb-card);border:1px solid var(--efb-border);border-radius:16px;box-shadow:0 24px 55px rgba(9,40,24,.16);overflow:hidden}
.efb-search-backdrop{position:fixed;inset:0;z-index:1999;background:rgba(9,25,17,.35);backdrop-filter:blur(2px);}
.efb-global-search-close{border:0;background:transparent;color:var(--efb-muted,#7a8a80);font-size:16px;cursor:pointer;padding:4px 6px;border-radius:8px;line-height:1;}
.efb-global-search-close:hover{background:rgba(0,0,0,.06);}
.efb-global-search-input-wrap{display:flex;align-items:center;gap:9px;padding:11px 13px;border-bottom:1px solid var(--efb-border);background:var(--efb-bg)}
.efb-global-search-input-wrap input{border:0;outline:0;background:transparent;color:var(--efb-text);width:100%;font:inherit;font-size:13px}
.efb-global-search-results{max-height:430px;overflow:auto;padding:8px}
.efb-global-search-section{padding:4px 0 8px}.efb-global-search-section-title{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--efb-muted);padding:6px 9px}
.efb-global-search-result{display:flex;align-items:center;gap:10px;padding:9px;border-radius:11px;color:var(--efb-text);text-decoration:none;transition:.15s;background:transparent}
.efb-global-search-result:hover{background:var(--efb-success-bg);color:var(--efb-text)}
.gs-avatar,.gs-icon{width:34px;height:34px;min-width:34px;border-radius:11px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--efb-primary),var(--efb-primary-light));color:#fff;font-weight:800;font-size:13px}.gs-icon{background:var(--efb-bg);color:var(--efb-primary);border:1px solid var(--efb-border)}
.gs-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}.gs-copy strong{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gs-copy small{font-size:10.5px;color:var(--efb-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gs-arrow{color:var(--efb-muted);font-size:20px;line-height:1}
.efb-global-search-empty,.efb-global-search-loading{padding:28px 14px;text-align:center;color:var(--efb-muted);font-size:12px;display:flex;flex-direction:column;align-items:center;gap:7px}.gs-empty-icon{font-size:28px;color:var(--efb-primary)}
.efb-global-search-advanced{display:block;margin:2px 2px 0;padding:10px;border-radius:10px;background:var(--efb-bg);color:var(--efb-primary);text-align:center;text-decoration:none;font-size:11.5px;font-weight:800}
.efb-global-search-advanced:hover{background:var(--efb-success-bg);color:var(--efb-primary)}
html[data-theme="dark"] .efb-global-search-btn{box-shadow:0 5px 18px rgba(0,0,0,.16)}
@media(max-width:900px){.efb-global-search{width:42px;min-width:42px}.efb-global-search-btn{width:40px;padding:0;justify-content:center}.efb-global-search-btn span,.efb-global-search-btn kbd{display:none}.efb-global-search-panel{inset-inline-end:0;inset-inline-start:auto}}
@media(max-width:620px){.efb-global-search-panel{position:fixed;top:68px;inset-inline:10px;width:auto;max-width:none}.efb-topbar-actions{gap:5px}}

/* =========================================================
   v17 Responsive Premium UX
   - Desktop sidebar stays intact
   - Tablet/mobile becomes an off-canvas drawer
   - Topbar remains accessible and touch friendly
   - Chat stacks cleanly on smaller screens
   ========================================================= */
.efb-mobile-sidebar-backdrop{display:none}
.efb-mobile-menu-btn{display:none}

@media (max-width: 900px){
  .efb-shell{display:flex;flex-direction:column;min-height:100vh}
  .efb-sidebar{
    position:fixed !important;
    inset-block:0;
    inset-inline-end:auto;
    inset-inline-start:0;
    width:280px !important;
    max-width:86vw;
    height:100vh !important;
    z-index:1200;
    transform:translateX(-105%);
    transition:transform .28s cubic-bezier(.2,.8,.2,1),box-shadow .28s ease;
    box-shadow:18px 0 45px rgba(0,0,0,.16) !important;
  }
  /* ملحوظة: مبنقدرش نستخدم dir="rtl" override هنا لأن inset-inline-start/end
     فوق دي أصلاً logical properties بتتقلب صح تلقائيًا مع اتجاه الصفحة -
     أي override زيادة كان بيرجّعها غلط (يفتح من الشمال في العربي بدل اليمين). */
  .efb-shell.mobile-nav-open .efb-sidebar{transform:translateX(0)}
  .efb-shell.sidebar-collapsed .efb-sidebar{width:280px !important}
  .efb-shell.sidebar-collapsed .efb-sidebar .brand-text,
  .efb-shell.sidebar-collapsed .efb-nav-group-label,
  .efb-shell.sidebar-collapsed .efb-sidebar-footer{display:block}
  .efb-shell.sidebar-collapsed .efb-nav-link .nav-label{display:inline}
  .efb-shell.sidebar-collapsed .efb-nav-link{justify-content:flex-start;padding:8px 11px;gap:11px}
  .efb-shell.sidebar-collapsed .efb-nav-link .nav-icon{width:22px;height:22px}
  .efb-shell.sidebar-collapsed .efb-nav-badge{position:static;min-width:18px;height:18px;font-size:10.5px}
  .efb-main{width:100%;padding:18px 16px 40px}
  .efb-topbar{margin:-18px -16px 20px;padding:12px 16px;min-height:68px}
  .efb-topbar-title-wrap{min-width:0;display:flex;align-items:center;gap:10px}
  .efb-topbar-title-wrap > div{min-width:0}
  .efb-topbar h4{font-size:19px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .efb-topbar .efb-subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .efb-topbar-actions{gap:6px}
  .efb-global-search{order:5}
  .efb-global-search-btn{width:42px;overflow:hidden;padding:0;justify-content:center}
  .efb-global-search-btn span,.efb-global-search-btn kbd{display:none}
  .efb-mobile-menu-btn{display:inline-flex}
  .efb-mobile-sidebar-backdrop{
    position:fixed;inset:0;background:rgba(9,25,17,.42);backdrop-filter:blur(3px);z-index:1190;
  }
  .efb-shell.mobile-nav-open .efb-mobile-sidebar-backdrop{display:block}
  .efb-sidebar-toggle{display:none !important}
  .efb-mobile-menu-btn{display:inline-flex;width:40px;height:40px;border:1px solid var(--efb-border);border-radius:11px;background:var(--efb-card);color:var(--efb-primary);align-items:center;justify-content:center;box-shadow:var(--shadow-sm)}
  .efb-mobile-menu-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
  .efb-chat-layout{height:auto !important}
  .efb-chat-layout > [class*="col-"]{height:auto !important}
  .efb-chat-contacts-card{height:300px !important;margin-bottom:12px}
  .efb-chat-window-card{height:calc(100vh - 210px) !important;min-height:430px}
}

@media (max-width:600px){
  .efb-main{padding:12px 10px 28px}
  .efb-topbar{margin:-12px -10px 16px;padding:10px;gap:8px}
  .efb-topbar-title-wrap{gap:8px;flex:1;min-width:0}
  .efb-topbar h4{font-size:17px}
  .efb-topbar .efb-subtitle{font-size:11px}
  .efb-topbar-actions .efb-user-chip{padding:5px 6px 5px 9px}
  .efb-user-chip > span:not(.avatar){display:none}
  .efb-user-chip .avatar{width:30px;height:30px}
  .efb-toggle-btn{width:36px;height:36px}
  .efb-dashboard-main{padding:10px 0 28px !important}
  .dashboard-grid,.efb-dashboard-grid{grid-template-columns:1fr !important}
  .premium-stats,.efb-stats-grid{grid-template-columns:1fr 1fr !important}
  .dashboard-panel{overflow:hidden}
  .dashboard-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .efb-card{border-radius:14px;padding:15px}
  .efb-chat-list-item{padding:11px 9px}
  .efb-chat-window-card{height:calc(100vh - 205px) !important;min-height:400px}
  .efb-chat-bubble{max-width:86%;font-size:13.5px}
  #chatForm{padding:10px !important}
  #chatInput{min-width:0}
  .efb-global-search-panel{position:fixed !important;inset-inline:10px !important;top:70px !important;width:auto !important}
}

@media (max-width:380px){
  .premium-stats,.efb-stats-grid{grid-template-columns:1fr !important}
  .efb-topbar-actions > .efb-toggle-row > .efb-toggle-btn:nth-child(2){display:none}
}

html[data-theme="dark"] .efb-mobile-sidebar-backdrop{background:rgba(0,0,0,.58)}
body.efb-nav-lock{overflow:hidden}

/* =========================================================
   v18 Fixed Navigation Layout
   - Sidebar ثابتة على يمين الشاشة في RTL / جهة النهاية في LTR
   - منطقة المحتوى هي التي تتحرك فقط
   - Topbar ثابت أثناء تمرير المحتوى
   ========================================================= */
@media (min-width: 901px) {
  .efb-shell {
    display: block;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
  }

  .efb-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-end: 0;
    width: var(--sidebar-expanded, 264px);
    height: 100vh;
    min-height: 100vh;
    z-index: 300;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .efb-main {
    width: auto;
    height: 100vh;
    min-height: 0;
    margin-inline-end: var(--sidebar-expanded, 264px);
    padding: 26px 32px 50px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
  }

  .efb-topbar {
    position: sticky;
    top: 0;
    z-index: 250;
  }

  .efb-shell.sidebar-collapsed .efb-sidebar {
    width: var(--sidebar-collapsed, 82px);
  }

  .efb-shell.sidebar-collapsed .efb-main {
    margin-inline-end: var(--sidebar-collapsed, 82px);
  }
}

@media (max-width: 900px) {
  .efb-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .efb-main {
    height: auto;
    margin-inline-end: 0;
    overflow: visible;
  }
}

/* =========================================================
   v19 Direction + Fixed Topbar Polish
   - RTL: sidebar right
   - LTR: sidebar left
   - content scrolls independently
   - topbar occupies real layout space and never overlays content
   ========================================================= */
@media (min-width: 901px) {
  .efb-sidebar {
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
  }

  .efb-main {
    margin-inline-start: var(--sidebar-expanded, 264px) !important;
    margin-inline-end: 0 !important;
    padding: 0 32px 50px !important;
  }

  .efb-topbar {
    position: sticky !important;
    top: 0 !important;
    margin: 0 -32px 24px !important;
    padding: 12px 28px !important;
    min-height: 74px;
    background: var(--topbar-bg, rgba(255,255,255,.96)) !important;
    opacity: 1;
    isolation: isolate;
  }

  .efb-topbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--topbar-bg, #fff);
    z-index: -1;
  }

  .efb-shell.sidebar-collapsed .efb-main {
    margin-inline-start: var(--sidebar-collapsed, 82px) !important;
    margin-inline-end: 0 !important;
  }
}

html[data-theme="dark"] .efb-topbar::before {
  background: var(--topbar-bg, #181e1a);
}

/* Keep the desktop sidebar's divider on the content-facing edge in both directions. */
@media (min-width: 901px) {
  html[dir="rtl"] .efb-sidebar { border-right: 0; border-left: 1px solid #e4ebe6; }
  html[dir="ltr"] .efb-sidebar { border-left: 0; border-right: 1px solid #e4ebe6; }
  html[data-theme="dark"][dir="rtl"] .efb-sidebar { border-left-color: #2b3630; }
  html[data-theme="dark"][dir="ltr"] .efb-sidebar { border-right-color: #2b3630; }
}

/* =========================================================
   v21 QA FIX - Direction-safe desktop shell
   RTL: sidebar RIGHT / content LEFT
   LTR: sidebar LEFT / content RIGHT
   This override intentionally comes after legacy v18/v19 rules.
   ========================================================= */
@media (min-width: 901px) {
  html[dir="rtl"] .efb-sidebar {
    inset-inline-start: auto !important;
    inset-inline-end: 0 !important;
  }
  html[dir="rtl"] .efb-main {
    margin-inline-start: 0 !important;
    margin-inline-end: var(--sidebar-expanded, 264px) !important;
  }
  html[dir="rtl"] .efb-shell.sidebar-collapsed .efb-main {
    margin-inline-start: 0 !important;
    margin-inline-end: var(--sidebar-collapsed, 82px) !important;
  }

  html[dir="ltr"] .efb-sidebar {
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
  }
  html[dir="ltr"] .efb-main {
    margin-inline-start: var(--sidebar-expanded, 264px) !important;
    margin-inline-end: 0 !important;
  }
  html[dir="ltr"] .efb-shell.sidebar-collapsed .efb-main {
    margin-inline-start: var(--sidebar-collapsed, 82px) !important;
    margin-inline-end: 0 !important;
  }
}

/* =========================================================
   v22 - Mobile Redesign
   Mobile is a first-class layout, not a desktop page squeezed until it cries.
   ========================================================= */
@media (max-width: 900px) {
  :root { --efb-mobile-gutter: 16px; }
  html, body { max-width:100%; overflow-x:hidden; }
  body.efb-nav-lock { position:fixed; width:100%; }
  .efb-shell { position:relative; width:100%; }
  .efb-main { width:100%; max-width:100%; box-sizing:border-box; }

  .efb-sidebar {
    width:min(300px, 86vw) !important;
    max-width:300px;
    box-shadow:0 24px 70px rgba(9,40,24,.20) !important;
    border:0 !important;
  }
  html[dir="ltr"] .efb-sidebar { transform:translateX(-105%); }
  html[dir="ltr"] .efb-shell.mobile-nav-open .efb-sidebar { transform:translateX(0); }
  html[dir="rtl"] .efb-sidebar { transform:translateX(105%); }
  html[dir="rtl"] .efb-shell.mobile-nav-open .efb-sidebar { transform:translateX(0); }

  .efb-mobile-sidebar-backdrop { opacity:0; pointer-events:none; transition:opacity .22s ease; }
  .efb-shell.mobile-nav-open .efb-mobile-sidebar-backdrop { opacity:1; pointer-events:auto; }

  .efb-main { padding:16px var(--efb-mobile-gutter) 30px !important; }
  .efb-topbar {
    margin:-16px calc(var(--efb-mobile-gutter) * -1) 18px !important;
    padding:10px var(--efb-mobile-gutter) !important;
    min-height:64px;
    gap:8px;
    position:sticky !important;
    top:0 !important;
    z-index:250;
    box-shadow:0 8px 24px rgba(9,40,24,.06);
  }
  .efb-topbar-title-wrap { flex:1 1 auto; min-width:0; }
  .efb-topbar-title-wrap > div { min-width:0; }
  .efb-topbar h4 { max-width:100%; }
  .efb-topbar-actions { flex:0 0 auto; }

  .efb-dashboard-hero,
  .efb-compose-hero { border-radius:18px !important; }
  .dashboard-kpis,
  .dashboard-content-row,
  .row.g-3 { --bs-gutter-x:.75rem; --bs-gutter-y:.75rem; }
  .efb-card { max-width:100%; box-sizing:border-box; }
  .table-responsive { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; border-radius:14px; }
  .efb-table { min-width:620px; }

  .efb-recipient-grid { grid-template-columns:1fr !important; }
  .efb-recipient-box { min-height:48px; }
  .efb-recipient-menu { max-height:42vh; overflow-y:auto; }
  .efb-recipient-chip { max-width:100%; }
  .efb-recipient-chip .recipient-email { max-width:145px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}

@media (max-width: 700px) {
  .efb-topbar-actions .efb-user-chip { display:none; }
  .efb-global-search { order:0; }
  .efb-global-search-btn { width:38px !important; height:38px; }
  .efb-mobile-menu-btn,
  .efb-global-search-btn,
  .efb-toggle-btn { width:38px !important; height:38px !important; border-radius:11px; }

  .efb-dashboard-hero { padding:18px !important; }
  .efb-dashboard-hero h1 { font-size:23px !important; line-height:1.25; }
  .premium-stats, .efb-stats-grid { grid-template-columns:1fr 1fr !important; gap:10px !important; }
  .premium-stat, .efb-stat-card { min-width:0; }
  .dashboard-panel { padding:14px !important; }

  .efb-chat-layout { display:flex !important; flex-direction:column !important; gap:10px !important; }
  .efb-chat-layout > [class*="col-"] { width:100% !important; flex:0 0 auto !important; }
  .efb-chat-contacts-card { height:235px !important; margin:0 !important; }
  .efb-chat-window-card { height:calc(100dvh - 178px) !important; min-height:390px !important; }
  .efb-chat-bubble { max-width:88%; border-radius:15px !important; }
  .efb-chat-compose { gap:7px; }
  .efb-chat-compose .efb-emoji-btn { width:42px; min-width:42px; }
  .efb-chat-compose .input-group { min-width:0; }
  #chatInput { min-height:42px; }
}

@media (max-width: 480px) {
  :root { --efb-mobile-gutter:10px; }
  .efb-main { padding-bottom:20px !important; }
  .efb-topbar { margin-top:-10px !important; padding-inline:10px !important; }
  .efb-topbar h4 { font-size:16px !important; }
  .efb-topbar .efb-subtitle { display:none; }
  .efb-mobile-menu-btn,
  .efb-global-search-btn,
  .efb-toggle-btn { width:36px !important; height:36px !important; }
  .premium-stats, .efb-stats-grid { grid-template-columns:1fr !important; }
  .efb-card { border-radius:13px; }
  .efb-chat-contacts-card { height:205px !important; }
  .efb-chat-window-card { height:calc(100dvh - 155px) !important; min-height:360px !important; }
  .efb-chat-window-card #chatHeader { padding:11px !important; }
  .efb-chat-window-card #chatMessages { padding:11px !important; }
  .efb-chat-bubble { max-width:92%; font-size:13px; }
  .efb-emoji-picker { max-width:calc(100vw - 28px); grid-template-columns:repeat(7,1fr) !important; }
  .efb-emoji-picker button { width:34px !important; height:34px !important; }
  .efb-compose-card { padding:14px !important; }
  .efb-premium-textarea { min-height:180px; }
}

/* =========================================================
   v23 Premium Chat Upgrade
   ========================================================= */
.efb-chat-list-item{width:100%;border:0;background:transparent;text-align:inherit;display:flex;align-items:center;gap:11px;position:relative;transition:.18s ease;padding:11px 12px}
.efb-chat-list-item:hover{transform:translateY(-1px)}
.efb-chat-avatar{width:38px;height:38px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;flex:0 0 38px;background:linear-gradient(135deg,var(--efb-primary),var(--efb-primary-light));color:#fff;font-weight:800;font-size:12px;box-shadow:0 5px 14px rgba(14,92,53,.16)}
.efb-chat-contact-copy{min-width:0;display:flex;flex-direction:column;gap:2px;flex:1}.efb-chat-contact-copy strong,.efb-chat-contact-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.efb-chat-contact-copy small{color:var(--efb-muted)}
.efb-chat-unread{width:8px;height:8px;border-radius:50%;background:#d2a74b;box-shadow:0 0 0 4px rgba(210,167,75,.13);font-size:0;flex:0 0 auto}
.efb-chat-header{align-items:center;gap:11px;background:rgba(255,255,255,.76);backdrop-filter:blur(12px)}
.efb-chat-header-copy{min-width:0;flex:1}.efb-chat-header-search{display:flex;align-items:center;gap:7px;width:min(250px,34%);border:1px solid var(--efb-border);background:var(--efb-card);border-radius:12px;padding:6px 10px;color:var(--efb-muted)}
.efb-chat-header-search input{border:0;outline:0;background:transparent;width:100%;color:var(--efb-text);font-size:12px}
.efb-chat-composer-wrap{position:relative;display:flex;align-items:center;gap:8px;width:100%}.efb-chat-input-wrap{flex:1;min-width:0}.efb-chat-input-wrap textarea{width:100%;resize:none;min-height:46px;max-height:140px;border-radius:13px;padding-top:10px}.efb-chat-send{height:42px;border-radius:13px;padding:0 15px;display:flex;align-items:center;gap:7px}.efb-send-icon{font-size:13px;opacity:.8}.efb-chat-hint{font-size:10px;color:var(--efb-muted);margin-top:5px;padding-inline:3px}
.efb-chat-loading{display:flex;justify-content:center;align-items:center;gap:8px;padding:30px;color:var(--efb-muted)}.efb-spinner{width:16px;height:16px;border:2px solid var(--efb-border);border-top-color:var(--efb-primary);border-radius:50%;animation:efbspin .7s linear infinite}@keyframes efbspin{to{transform:rotate(360deg)}}
.efb-chat-bubble.mine{background:linear-gradient(135deg,var(--efb-primary),#0b7444);}.efb-chat-bubble.theirs{border:1px solid var(--efb-border);background:var(--efb-card)}
.efb-chat-meta{display:flex;justify-content:flex-end;gap:5px;align-items:center}.efb-chat-status{font-size:10px;letter-spacing:-2px}.efb-chat-bubble.mine .efb-chat-status{color:#d8f6e5}
.efb-emoji-picker{position:absolute;z-index:30;bottom:72px;inset-inline-start:0;width:320px;max-height:250px;overflow:auto;display:grid;grid-template-columns:repeat(8,1fr);gap:4px;padding:10px;border:1px solid var(--efb-border);border-radius:15px;background:var(--efb-card);box-shadow:0 20px 50px rgba(0,0,0,.14)}
.efb-emoji-picker[hidden]{display:none}.efb-emoji-picker button{border:0;background:transparent;border-radius:9px;font-size:21px;height:34px;cursor:pointer}.efb-emoji-picker button:hover{background:var(--efb-success-bg);transform:scale(1.06)}
html[data-theme="dark"] .efb-chat-header{background:rgba(24,31,27,.78)}
@media(max-width:700px){.efb-chat-header-search{width:42px;padding:7px;overflow:hidden}.efb-chat-header-search input{display:none}.efb-chat-header-search span{margin:auto}.efb-chat-header-avatar{width:34px;height:34px;flex-basis:34px}.efb-chat-send{padding:0 12px}.efb-chat-hint{display:none}.efb-emoji-picker{width:min(320px,calc(100vw - 40px));grid-template-columns:repeat(7,1fr);bottom:66px}}


/* v24 Chat Attachments */
.efb-attach-btn,.efb-emoji-btn{width:42px;height:42px;border:1px solid var(--efb-border,#e5e9e6);border-radius:12px;background:var(--efb-card,#fff);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:0 0 auto;font-size:19px;transition:.18s ease}.efb-attach-btn:hover,.efb-emoji-btn:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(0,0,0,.08)}
.efb-attachment-preview{padding:0 0 8px}.efb-pending-file{display:flex;align-items:center;gap:9px;padding:8px 10px;border:1px solid var(--efb-border,#e5e9e6);border-radius:12px;background:var(--efb-card,#fff);max-width:360px}.efb-pending-file>span:nth-child(2){display:flex;flex-direction:column;min-width:0}.efb-pending-file strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.efb-pending-file small{font-size:10px;color:#7b8580}.efb-pending-file button{margin-inline-start:auto;border:0;background:transparent;font-size:20px;cursor:pointer;color:#78817c}.efb-chat-attachment{display:flex;align-items:center;gap:9px;padding:9px 11px;margin-top:7px;border-radius:11px;text-decoration:none;border:1px solid rgba(0,0,0,.08);background:rgba(255,255,255,.55);color:inherit;max-width:280px}.efb-chat-attachment span:nth-child(2){display:flex;flex-direction:column;min-width:0}.efb-chat-attachment strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.efb-chat-attachment small{font-size:10px;opacity:.7}.efb-attachment-icon{font-size:18px}.efb-chat-bubble.mine .efb-chat-attachment{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.2)}
.efb-chat-image-link{display:block;margin-top:7px;max-width:240px}.efb-chat-image{width:100%;max-width:240px;max-height:260px;object-fit:cover;border-radius:12px;display:block;cursor:zoom-in}
@media(max-width:576px){.efb-chat-image-link,.efb-chat-image{max-width:180px}}
[data-theme="dark"] .efb-attach-btn,[data-theme="dark"] .efb-emoji-btn,[data-theme="dark"] .efb-pending-file{background:#18201d;border-color:#34403b;color:#edf3ef}.efb-chat-bubble.theirs .efb-chat-attachment{background:rgba(0,0,0,.04)}
@media(max-width:576px){.efb-attach-btn,.efb-emoji-btn{width:38px;height:38px}.efb-chat-attachment{max-width:230px}.efb-pending-file{max-width:100%}}


/* v26 Notification Center polish */
.efb-notif-item.is-unread { background: color-mix(in srgb, var(--efb-primary) 5%, var(--efb-card)); }
.efb-notif-item .n-icon svg { width:20px; height:20px; stroke:var(--efb-primary); display:block; }
.efb-notif-item.is-read { opacity:.72; }
.efb-notif-item:hover { opacity:1; }

/* v27: Premium rich-text compose editor */
.efb-rich-editor{border:1px solid var(--efb-border,#dfe8e2);border-radius:14px;overflow:hidden;background:rgba(255,255,255,.78);box-shadow:0 8px 24px rgba(15,63,39,.05)}
.efb-format-toolbar{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:9px 10px;border-bottom:1px solid var(--efb-border,#dfe8e2);background:rgba(248,251,249,.96);direction:inherit;position:sticky;top:0;z-index:2}
#composeEmojiPicker{
  position:fixed; z-index:2000;
  width:300px; max-height:240px; overflow:auto;
  display:grid; grid-template-columns:repeat(8,1fr); gap:4px; padding:10px;
  border:1px solid var(--efb-border,#e0e8e3); border-radius:15px;
  background:var(--efb-card,#ffffff); box-shadow:0 18px 45px rgba(0,0,0,.16);
}
#composeEmojiPicker[hidden]{ display:none; }
#composeEmojiPicker button{ border:0; background:transparent; border-radius:9px; font-size:20px; height:32px; cursor:pointer; }
#composeEmojiPicker button:hover{ background:var(--efb-success-bg,#eef6f1); }
html[data-theme="dark"] #composeEmojiPicker{ background:#1b231e; border-color:#35433b; box-shadow:0 18px 45px rgba(0,0,0,.38); }
html[data-theme="dark"] #composeEmojiPicker button:hover{ background:#27332c; }
@media(max-width:600px){ #composeEmojiPicker{ width:270px; grid-template-columns:repeat(7,1fr); } }
.efb-format-btn{width:34px;height:34px;border:0;border-radius:9px;background:transparent;color:var(--efb-text,#24352d);display:inline-flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;cursor:pointer;transition:.18s ease}
.efb-format-btn:hover,.efb-format-btn.active{background:rgba(11,95,54,.1);color:var(--efb-primary,#0b5f36)}
.efb-format-select{height:34px;border:1px solid var(--efb-border,#dfe8e2);border-radius:9px;background:var(--efb-card,#fff);color:var(--efb-text,#24352d);padding:0 8px;font-size:12px;outline:none}
.efb-size-select{min-width:78px}.efb-color-picker{width:34px;height:34px;border:1px solid var(--efb-border,#dfe8e2);border-radius:9px;padding:3px;background:var(--efb-card,#fff);cursor:pointer}.efb-toolbar-divider{width:1px;height:22px;background:var(--efb-border,#dfe8e2);margin:0 3px}
.efb-rich-content{min-height:210px;max-height:440px;overflow:auto;padding:15px 16px;outline:none;font-family:Cairo,Arial,sans-serif;font-size:15px;line-height:1.9;color:var(--efb-text,#24352d);text-align:start;background:transparent}.efb-rich-content:empty:before{content:'اكتب نص الرسالة هنا...';color:#98a79f;pointer-events:none}.efb-rich-content:focus{box-shadow:inset 0 0 0 2px rgba(11,95,54,.07)}.efb-rich-content ul,.efb-rich-content ol{padding-inline-start:28px}.efb-rich-content a{color:#0b6b46;text-decoration:underline}.efb-rich-content img{max-width:100%;height:auto}
.efb-rich-editor #bodyInput{display:none!important}
html[data-theme="dark"] .efb-rich-editor{background:#151d17;border-color:#2a3b31;box-shadow:none}html[data-theme="dark"] .efb-format-toolbar{background:#18221c;border-color:#2a3b31}html[data-theme="dark"] .efb-format-select,html[data-theme="dark"] .efb-color-picker{background:#111812;color:#e9f2ec;border-color:#34483b}html[data-theme="dark"] .efb-format-btn{color:#e7efe9}html[data-theme="dark"] .efb-format-btn:hover,html[data-theme="dark"] .efb-format-btn.active{background:rgba(41,196,122,.12);color:#5bd99a}html[data-theme="dark"] .efb-rich-content{color:#e7efe9}html[data-theme="dark"] .efb-rich-content:empty:before{color:#73857b}
@media(max-width:600px){.efb-format-toolbar{gap:4px;padding:8px}.efb-format-select{max-width:112px}.efb-format-btn{width:32px;height:32px}.efb-rich-content{min-height:180px}}

/* v28 - Explicit desktop sidebar direction fix
   Arabic (RTL)  -> sidebar on the RIGHT
   English (LTR) -> sidebar on the LEFT
   Use physical flex direction so this cannot be inverted by logical CSS. */
@media (min-width: 901px){
  html[dir="rtl"] .efb-shell{flex-direction:row-reverse;}
  html[dir="ltr"] .efb-shell{flex-direction:row;}
  html[dir="rtl"] .efb-sidebar{order:0;}
  html[dir="ltr"] .efb-sidebar{order:0;}
}

/* v30 - Definitive physical sidebar placement
   RTL (Arabic): sidebar RIGHT
   LTR (English): sidebar LEFT
   Physical properties only: mixing logical properties here reverses the
   assignment in RTL and was the source of the v29 placement regression. */
@media (min-width: 901px){
  html[dir="rtl"] .efb-sidebar{
    left:auto !important;
    right:0 !important;
  }
  html[dir="rtl"] .efb-main{
    margin-left:0 !important;
    margin-right:var(--sidebar-expanded,264px) !important;
  }
  html[dir="rtl"] .efb-shell.sidebar-collapsed .efb-main{
    margin-left:0 !important;
    margin-right:var(--sidebar-collapsed,82px) !important;
  }

  html[dir="ltr"] .efb-sidebar{
    left:0 !important;
    right:auto !important;
  }
  html[dir="ltr"] .efb-main{
    margin-left:var(--sidebar-expanded,264px) !important;
    margin-right:0 !important;
  }
  html[dir="ltr"] .efb-shell.sidebar-collapsed .efb-main{
    margin-left:var(--sidebar-collapsed,82px) !important;
    margin-right:0 !important;
  }
}

/* =========================================================
   شاشة تحميل بعد تسجيل الدخول (Login Loader)
   ========================================================= */
.efb-login-loader{
  position:fixed; inset:0; z-index:5000;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px;
  background:linear-gradient(160deg,#0d3b23,#122d1c 60%,#0a2417);
  transition:opacity .5s ease, visibility .5s ease;
}
.efb-login-loader.is-done{ opacity:0; visibility:hidden; pointer-events:none; }
.efb-login-loader-ring-wrap{ position:relative; width:132px; height:132px; display:flex; align-items:center; justify-content:center; }
.efb-login-loader-ring{ position:absolute; inset:0; width:132px; height:132px; transform:rotate(-90deg); }
.efb-login-loader-ring circle{ fill:none; stroke-width:6; }
.efb-login-loader-ring .track{ stroke:rgba(255,255,255,.14); }
.efb-login-loader-ring .bar{
  stroke:#29c47a; stroke-linecap:round;
  stroke-dasharray:326.7; stroke-dashoffset:326.7;
  transition:stroke-dashoffset .45s cubic-bezier(.3,.8,.3,1);
}
.efb-login-loader-logo{ width:64px; height:64px; object-fit:contain; border-radius:16px; background:#fff; padding:8px; box-shadow:0 8px 24px rgba(0,0,0,.25); }
.efb-login-loader-title{ color:#fff; font-weight:800; font-size:19px; margin-top:4px; }
.efb-login-loader-sub{ color:rgba(255,255,255,.65); font-size:13px; min-height:18px; }
html[dir="ltr"] .efb-login-loader-ring{ transform:rotate(-90deg) scaleX(-1); }
