:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --line: #e3e8f0;
  --ink: #16202e;
  --muted: #66748a;
  --brand: #4c6e92;        /* أزرق Crew الرمادي */
  --brand-dark: #3b5875;
  --gold: #e9a93c;         /* ذهبي Crew */
  --gold-dark: #c98c26;
  --fb: #1877f2;
  --ig: #c13584;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 32, 48, .08), 0 6px 20px rgba(20, 32, 48, .05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--ink);
  font: 15px/1.6 "Segoe UI", Tahoma, "Noto Sans Arabic", "Dubai", system-ui, sans-serif;
}

body { direction: rtl; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- تسجيل الدخول ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(160deg, #eef2f7 0%, #e3eaf3 55%, #dde6f0 100%);
}
.login-card {
  width: min(400px, 92vw); background: var(--panel); border-radius: 14px;
  padding: 32px 28px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.login-card h1 { margin: 0 0 4px; font-size: 21px; }
.login-card p.sub { margin: 0 0 24px; color: var(--muted); font-size: 13px; }

/* ---------- الهيكل ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

.side {
  background: #1b2b3d; color: #c7d2e4; padding: 18px 0;
  display: flex; flex-direction: column; gap: 2px;
}
.side .brand { padding: 0 16px 18px; }
.side .brand img {
  display: block; width: 100%; max-width: 168px; height: auto;
  background: #fff; border-radius: 9px; padding: 9px 12px;
}
.side nav { display: flex; flex-direction: column; }
.side a.nav {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px;
  color: #b3c1d8; font-size: 14px; border-right: 3px solid transparent;
}
.side a.nav:hover { background: rgba(255, 255, 255, .05); color: #fff; text-decoration: none; }
.side a.nav.on { background: rgba(233, 169, 60, .14); color: #fff; border-right-color: var(--gold); }
.side a.nav .badge { margin-inline-start: auto; }
.side .foot { margin-top: auto; padding: 14px 20px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #7c8ba5; }

.main { display: flex; flex-direction: column; min-width: 0; }
.top {
  background: var(--panel); border-bottom: 1px solid var(--line);
  padding: 12px 22px; display: flex; align-items: center; gap: 14px;
}
.top h2 { margin: 0; font-size: 17px; font-weight: 700; }
.top .spacer { flex: 1; }
.content { padding: 22px; flex: 1; min-width: 0; }

/* ---------- عناصر ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > header {
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px;
}
.card > .body { padding: 16px; }

.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.stat { padding: 16px; }
.stat .n { font-size: 27px; font-weight: 700; line-height: 1.2; }
.stat .l { color: var(--muted); font-size: 13px; }

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #33415a; }
input[type=text], input[type=password], input[type=url], input[type=number],
input[type=datetime-local], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(76,110,146,.30); border-color: var(--brand); }
textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.field { margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

button, .btn {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px;
  padding: 9px 16px; border: 1px solid var(--line); background: #fff; color: var(--ink);
}
button:hover, .btn:hover { background: #f6f8fc; }
button:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-danger { background: #fff; border-color: #f2c4c4; color: var(--err); }
.btn-danger:hover { background: #fdf2f2; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: #4a5a72;
}
.badge.ok { background: #e6f6ec; color: #15803d; }
.badge.warn { background: #fef3e2; color: #b45309; }
.badge.err { background: #fdecec; color: #b91c1c; }
.badge.brand { background: #e8f1fe; color: #0f5cc0; }
.badge.gold { background: #fdf3e0; color: var(--gold-dark); }
.badge.ig { background: #fbe9f4; color: var(--ig); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); }
th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: #fafbfd; }
tbody tr:hover { background: #fafbfd; }

.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #dde4ee; flex: none; }
.avatar.sm { width: 26px; height: 26px; }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty h3 { margin: 0 0 6px; color: var(--ink); font-size: 16px; }

/* ---------- صندوق الوارد ---------- */
.inbox { display: grid; grid-template-columns: 330px 1fr; gap: 16px; height: calc(100vh - 130px); }
.thread-list { overflow-y: auto; }
.thread-list .t {
  padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; gap: 10px;
}
.thread-list .t:hover { background: #f7f9fc; }
.thread-list .t.on { background: #eef3f8; }
.thread-list .t .who { font-weight: 600; font-size: 13.5px; }
.thread-list .t .sn { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-list .t .meta { margin-inline-start: auto; text-align: left; font-size: 11px; color: var(--muted); flex: none; }

.convo { display: flex; flex-direction: column; min-height: 0; }
.convo .head { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.convo .msgs { flex: 1; overflow-y: auto; padding: 16px; background: #fbfcfe; }
.convo .composer { border-top: 1px solid var(--line); padding: 12px 16px; background: #fff; }
.convo .composer textarea { min-height: 62px; }

.msg { max-width: 74%; margin-bottom: 12px; }
.msg .bubble {
  padding: 9px 13px; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  white-space: pre-wrap; word-wrap: break-word;
}
.msg .who { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.msg .tools { margin-top: 4px; display: flex; gap: 6px; opacity: 0; transition: opacity .12s; }
.msg:hover .tools { opacity: 1; }
.msg.out { margin-inline-start: auto; }
.msg.out .bubble { background: #edf2f7; border-color: #d5e0ec; }
.msg.out .who { text-align: left; }
.msg.hid .bubble { opacity: .5; border-style: dashed; }

/* ---------- اختيار الحسابات ---------- */
.picker { display: flex; flex-wrap: wrap; gap: 8px; }
.picker .p {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: #fff; font-size: 13.5px;
}
.picker .p.on { border-color: var(--brand); background: #eef3f8; }
.picker .p input { margin: 0; }

.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumbs .th { position: relative; width: 82px; height: 82px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumbs .th img, .thumbs .th video { width: 100%; height: 100%; object-fit: cover; }
.thumbs .th button {
  position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; padding: 0;
  border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: 0; font-size: 13px; line-height: 1;
}

/* ---------- تنبيهات ---------- */
#toasts { position: fixed; top: 16px; inset-inline-start: 16px; z-index: 99; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 11px 16px; border-radius: 8px; box-shadow: var(--shadow); font-size: 14px;
  background: #16202e; color: #fff; max-width: 380px;
}
.toast.err { background: var(--err); }
.toast.ok { background: var(--ok); }

.alert { padding: 11px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 14px; }
.alert.warn { background: #fef7e8; border: 1px solid #f5dfb0; color: #92500a; }
.alert.err { background: #fdeeee; border: 1px solid #f3c9c9; color: #a01b1b; }
.alert.info { background: #eaf2fe; border: 1px solid #cfe0fb; color: #1050a8; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button {
  border: 0; background: none; border-bottom: 2px solid transparent; border-radius: 0;
  padding: 9px 14px; color: var(--muted);
}
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }

.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid #cbd5e1; border-top-color: var(--brand); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

.mono { font-family: Consolas, "Courier New", monospace; font-size: 12.5px; direction: ltr; text-align: left; }
.wrap-break { word-break: break-all; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; overflow-x: auto; padding: 8px; }
  .side .brand, .side .foot { display: none; }
  .side nav { flex-direction: row; }
  .inbox { grid-template-columns: 1fr; height: auto; }
}

/* ---------- نافذة منبثقة ---------- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 80; background: rgba(16, 26, 40, .5);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto;
}
.modal-box {
  background: var(--panel); border-radius: 12px; box-shadow: 0 12px 40px rgba(16,26,40,.25);
  width: min(560px, 100%); max-height: 88vh; display: flex; flex-direction: column;
}
.modal-box.wide { width: min(880px, 100%); }
.modal-box > header {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; font-size: 15px;
}
.modal-box > header button { border: 0; background: none; font-size: 20px; line-height: 1; padding: 0 6px; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-start; }

/* ---------- بطاقات الحسابات (نمط Business Suite) ---------- */
.acct-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.acct {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.acct .who { display: flex; align-items: center; gap: 11px; }
.acct .who img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #dde4ee; flex: none; }
.acct .who .nm { font-weight: 700; font-size: 15px; line-height: 1.3; }
.acct .who .sub { color: var(--muted); font-size: 12.5px; }
.acct .figs { display: flex; gap: 20px; }
.acct .figs .f .n { font-weight: 700; font-size: 17px; }
.acct .figs .f .l { color: var(--muted); font-size: 12px; }
.acct .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.acct .linked {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
}
.acct .linked img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

/* أيقونة المنصة الصغيرة */
.pdot {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 19px; height: 19px; border-radius: 50%; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
}
.pdot.fb { background: var(--fb); font-family: Georgia, serif; }
.pdot.ig { background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7); font-size: 8.5px; }

/* ---------- قائمة مهام الصلاحيات ---------- */
.perm-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line);
}
.perm-row:last-child { border-bottom: 0; }
.perm-row .who { min-width: 150px; }
.perm-row .who .nm { font-weight: 600; font-size: 14px; }
.perm-row .picker { flex: 1; }
.perm-row .picker .p { padding: 4px 11px; font-size: 12.5px; }

/* ---------- قائمة To-do بنمط ميتا ---------- */
.todo { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.todo:last-child { border-bottom: 0; }
.todo .ic {
  width: 36px; height: 36px; border-radius: 50%; background: #eef3f8; color: var(--brand);
  display: grid; place-items: center; font-size: 17px; flex: none;
}
.todo .t { font-weight: 600; font-size: 14px; }
.todo .s { color: var(--muted); font-size: 12.5px; }
.todo .go { margin-inline-start: auto; }

/* ---------- إدارة الصفحات (تخطيط Business Settings) ---------- */
.pg-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.pg-side { display: flex; flex-direction: column; max-height: calc(100vh - 150px); }
.pg-list { overflow-y: auto; }
.pg-list .pg {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.pg-list .pg:hover { background: #f7f9fc; }
.pg-list .pg.on { background: #eef3f8; box-shadow: inset 3px 0 0 var(--brand); }
.pg-list .pg img, .pg-list .pg .avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #dde4ee; }
.pg-list .pg .nm { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-list .pg .chips { display: flex; gap: 5px; margin-top: 3px; flex-wrap: wrap; }

.pg-detail { min-height: 420px; }
.pg-head { display: flex; align-items: center; gap: 13px; padding: 18px; border-bottom: 1px solid var(--line); }
.pg-head img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #dde4ee; flex: none; }
.pg-acts { display: flex; align-items: center; gap: 10px; padding: 14px 18px; flex-wrap: wrap; }
.pg-detail .tabs { margin: 0 18px; }
.pg-pane { padding: 18px; }
.pg-pane table th { width: 160px; background: none; }

@media (max-width: 900px) {
  .pg-layout { grid-template-columns: 1fr; }
  .pg-side { max-height: 340px; }
}


/* ---------- منشئ المنشورات (نمط Business Suite) ---------- */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.composer .form .sec { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.composer .form .sec:last-of-type { border-bottom: 0; }
.composer .form .sec h4 { margin: 0 0 4px; font-size: 14px; }
.composer .form .sec .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.composer .form .tabs { margin: 0; border: 0; }

.dd-btn {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; min-height: 42px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: start; font-weight: 500;
}
.dd-panel { border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-top: 6px; box-shadow: var(--shadow); overflow: hidden; }
.dd-panel .h { padding: 9px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.dd-panel .r { display: flex; align-items: center; gap: 9px; padding: 8px 12px; cursor: pointer; margin: 0; font-weight: 500; font-size: 13.5px; }
.dd-panel .r.nested { padding-inline-start: 38px; background: #fafbfd; }
.dd-panel .r:hover { background: #f1f4f9; }

.switch {
  appearance: none; -webkit-appearance: none; position: relative; width: 38px; height: 22px; flex: none;
  background: #cbd5e1; border-radius: 999px; cursor: pointer; transition: background .15s; margin: 0;
}
.switch:checked { background: var(--brand); }
.switch::after {
  content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; transition: transform .15s;
}
.switch:checked::after { transform: translateX(-16px); }

.fb-preview { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.fb-preview .ph { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.fb-preview .txt { padding: 0 14px 12px; white-space: pre-wrap; font-size: 14px; line-height: 1.7; word-break: break-word; }
.fb-preview .img { background: #eef1f6; min-height: 220px; display: grid; place-items: center; }
.fb-preview .img.sq { aspect-ratio: 1; min-height: 0; }
.fb-preview .img img, .fb-preview .img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-preview .ph-empty { color: #b6c0cf; font-size: 34px; text-align: center; padding: 20px; }
.fb-preview .acts { display: flex; justify-content: space-around; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.fb-preview .linkcard { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #f7f9fc; font-size: 13px; }

.story-frame {
  width: 250px; aspect-ratio: 9 / 16; margin: 0 auto; border-radius: 20px; overflow: hidden;
  background: #111; position: relative; display: grid; place-items: center; color: #555; font-size: 44px;
}
.story-frame img, .story-frame video { width: 100%; height: 100%; object-fit: cover; }
.story-frame .bar { position: absolute; top: 10px; left: 10px; right: 10px; height: 3px; background: rgba(255,255,255,.55); border-radius: 2px; }
.story-frame .story-head { position: absolute; top: 20px; inset-inline-start: 12px; display: flex; align-items: center; gap: 8px; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.story-frame .ph-empty { color: #444; }

.compose-bar {
  position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line);
  padding: 12px 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-radius: 0 0 var(--radius) var(--radius);
}

@media (max-width: 1000px) { .composer { grid-template-columns: 1fr; } }


/* ---------- صف أدوات المنشور ---------- */
.tool-row { display: flex; align-items: center; gap: 4px; margin-top: 8px; position: relative; }
.tool-row .tool {
  width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid transparent; background: none;
  font-size: 17px; line-height: 1; display: grid; place-items: center; color: var(--brand);
}
.tool-row .tool:hover:not(:disabled) { background: #eef3f8; }
.tool-row .tool.on { background: #e8f1fe; border-color: #cfe0fb; }
.tool-row .tool:disabled { opacity: .38; cursor: not-allowed; }
.emoji-pop {
  position: absolute; top: 4px; inset-inline-start: 0; z-index: 30; width: 300px; padding: 8px;
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
}
.emoji-pop button { border: 0; background: none; font-size: 20px; padding: 4px 0; border-radius: 6px; cursor: pointer; }
.emoji-pop button:hover { background: #f1f4f9; }
.mention-pop {
  position: absolute; top: 100%; inset-inline-start: 0; z-index: 31; width: 300px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
}
.mention-pop button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: start;
  border: 0; background: none; padding: 6px 8px; border-radius: 8px; cursor: pointer; font: inherit;
}
.mention-pop button:hover, .mention-pop button:first-of-type { background: #f1f4f9; }
.mention { color: #1877f2; font-weight: 600; }
.fb-preview .cta-row { padding: 10px 14px; background: #f0f2f5; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.fb-preview .cta-btn { background: #e4e6eb; border-radius: 6px; padding: 7px 14px; font-weight: 600; font-size: 13px; }

/* مرفقات الرسائل جوه الفقاعة */
.bubble img.att { max-width: 240px; max-height: 240px; border-radius: 8px; display: block; }
.bubble img.att.sticker { max-width: 96px; max-height: 96px; }


/* ---------- تعليقات بشكل فيسبوك ---------- */
.pthumb { position: relative; flex: none; width: 44px; height: 44px; border-radius: 8px; background: #dde4ee; overflow: visible; }
.pthumb img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; display: block; }
.pthumb .pdot-wrap { position: absolute; bottom: -4px; inset-inline-start: -4px; }
.fbc-wrap { background: #fff; }
.fbc-post { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 6px; max-width: 520px; margin-inline: auto; }
.fbc-post img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.fbc-counts { display: flex; gap: 18px; padding: 9px 14px; color: var(--muted); font-size: 13px; }
.fbc { display: flex; gap: 8px; margin: 10px 0; max-width: 620px; }
.fbc.nested { margin-inline-start: 44px; }
.fbc.dim { opacity: .55; }
.fbc .avatar { width: 32px; height: 32px; flex: none; }
.fbc .avatar.ph { display: grid; place-items: center; font-weight: 700; color: #4a5a72; }
.fbc-bubble { background: #f0f2f5; border-radius: 18px; padding: 8px 12px; display: inline-block; max-width: 100%; }
.fbc-bubble .nm { font-weight: 600; font-size: 13px; }
.fbc-bubble .tx { font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.fbc-bubble img.att { max-width: 220px; max-height: 220px; border-radius: 8px; display: block; margin-top: 6px; }
.fbc-bubble img.att.sticker { max-width: 96px; max-height: 96px; }
.fbc-actions { display: flex; gap: 12px; padding: 3px 12px; }
.fbc-actions button { border: 0; background: none; padding: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.fbc-actions button:hover { text-decoration: underline; color: var(--ink); }
.fbc-actions button.danger { color: var(--err); }
.fbc-reply { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.fbc-reply input { border-radius: 999px; padding: 8px 14px; background: #f0f2f5; border-color: transparent; }
.convo .composer .fbc-reply { margin: 0; }

/* ---------- التحقق بخطوتين ---------- */
.qr-box { display: flex; justify-content: center; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.qr-box svg { width: 200px; height: 200px; display: block; }
.backup-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 8px; }
.backup-codes code { font-family: Consolas, "Courier New", monospace; font-size: 15px; letter-spacing: 1px; direction: ltr; text-align: center; padding: 8px; background: #f7f9fc; border: 1px dashed var(--line); border-radius: 6px; }
