/* أنماط إضافية فوق Tailwind - النظام العربي RTL */
* { -webkit-tap-highlight-color: transparent; }
body { min-height: 100vh; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c7bfa8; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #ece4d2;
  box-shadow: 0 1px 3px rgba(27,42,74,0.06);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 10px; font-weight: 600; padding: .6rem 1.1rem; transition: all .15s ease;
  cursor: pointer; border: none; font-size: .925rem;
}
.btn-primary { background: #1B2A4A; color: #fff; }
.btn-primary:hover { background: #131f38; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-emerald { background: #0F7B5F; color: #fff; }
.btn-emerald:hover { background: #0a5240; }
.btn-amber { background: #c98a1f; color: #fff; }
.btn-danger { background: #b3382c; color: #fff; }
.btn-outline { background: #fff; color: #1B2A4A; border: 1px solid #d6ddea; }
.btn-outline:hover { background: #eef1f6; }
.btn-ghost { background: transparent; color: #1B2A4A; }
.btn-ghost:hover { background: #eef1f6; }
.btn-sm { padding: .4rem .8rem; font-size: .825rem; }
.btn-block { width: 100%; }

.assistant-messages {
  max-height: 260px;
  overflow-y: auto;
  background: #fefdfb;
}
.assistant-message {
  max-width: 86%;
  padding: .65rem .85rem;
  border-radius: .8rem;
  font-size: .85rem;
  line-height: 1.8;
  white-space: pre-wrap;
}
.assistant-message-bot {
  margin-left: auto;
  background: #e7f5f0;
  color: #0a5240;
  border-bottom-right-radius: .2rem;
}
.assistant-message-user {
  margin-right: auto;
  background: #eef1f6;
  color: #1B2A4A;
  border-bottom-left-radius: .2rem;
}
.assistant-suggestion {
  border: 1px solid #c3e6d8;
  border-radius: 999px;
  background: #fff;
  color: #0F7B5F;
  padding: .35rem .7rem;
  font-size: .75rem;
  cursor: pointer;
  transition: background-color .15s ease;
}
.assistant-suggestion:hover { background: #e7f5f0; }

.team-direct-chat-messages {
  max-height: 360px;
  min-height: 180px;
  overflow-y: auto;
  padding: .75rem;
  border: 1px solid #ece4d2;
  border-radius: 14px;
  background: #fefdfb;
}
.team-direct-message {
  width: fit-content;
  max-width: 88%;
  margin: 0 auto .7rem 0;
  padding: .65rem .8rem;
  border-radius: 12px 12px 12px 3px;
  background: #eef1f6;
  color: #1B2A4A;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.team-direct-message.is-mine {
  margin-right: 0;
  margin-left: auto;
  border-radius: 12px 12px 3px 12px;
  background: #e7f5f0;
  color: #0a5240;
}
.team-direct-message p { margin: 0; line-height: 1.75; }
.team-direct-message + .team-direct-message { margin-top: .35rem; }


.monitor-action-icon {
  width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: .55rem; background: rgba(255,255,255,.72); transition: background-color .15s ease, transform .15s ease;
}
.monitor-action-icon:hover { transform: translateY(-1px); }
.monitor-action-icon:disabled { opacity: .35; cursor: not-allowed; transform: none; }

.calendar-weekdays, .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .5rem;
}
.calendar-weekdays { color: #6b6552; font-size: .75rem; font-weight: 700; text-align: center; margin-bottom: .5rem; }
.calendar-day {
  min-height: 9.5rem; border: 1px solid #ece4d2; border-radius: .75rem; background: #fff;
  padding: .55rem; overflow: hidden;
}
.calendar-day-muted { background: #f8f5ef; border-style: dashed; min-height: 9.5rem; }
.calendar-day-today { border-color: #1B2A4A; box-shadow: 0 0 0 2px rgba(27,42,74,.08); }
.calendar-day-number { width: 1.7rem; height: 1.7rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: .8rem; font-weight: 700; color: #5b5541; }
.calendar-day-today .calendar-day-number { background: #1B2A4A; color: #fff; }
.calendar-day-add { width: 1.7rem; height: 1.7rem; border-radius: .45rem; }
.calendar-day-add:hover { background: #eef1f6; }
.calendar-day-tasks { display: flex; flex-direction: column; gap: .3rem; max-height: 6rem; overflow-y: auto; }
.calendar-task-open { display: block; width: 100%; border: 0; border-right: 3px solid #5b84ac; border-radius: .35rem; background: #eef1f6; color: #1B2A4A; padding: .3rem .4rem; font-size: .72rem; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.calendar-task-open:hover { filter: brightness(.97); }
.calendar-task-in_progress { border-right-color: #c98a1f; background: #fbf0dc; }
.calendar-task-done { border-right-color: #0F7B5F; background: #e7f5f0; color: #0a5240; text-decoration: line-through; }
.calendar-quick-input { width: 100%; margin-top: .45rem; border: 1px dashed #dcd3ba; border-radius: .4rem; padding: .3rem .4rem; font-family: inherit; font-size: .68rem; outline: none; background: #fefdfb; }
.calendar-quick-input:focus { border-color: #1B2A4A; box-shadow: 0 0 0 2px rgba(27,42,74,.08); }
@media (max-width: 640px) {
  .calendar-weekdays, .calendar-grid { gap: .25rem; }
  .calendar-day, .calendar-day-muted { min-height: 7.2rem; padding: .35rem; }
  .calendar-weekdays { font-size: .62rem; }
  .calendar-day-tasks { max-height: 4.2rem; }
  .calendar-task-open { font-size: .62rem; padding: .24rem; }
  .calendar-quick-input { font-size: .58rem; }
}

.notebook-editor {
  min-height: 480px; padding: 1.5rem; outline: none; line-height: 2; color: #1B2A4A;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.notebook-editor:empty::before { content: attr(data-placeholder); color: #9b927d; pointer-events: none; }
.notebook-editor:focus { box-shadow: inset 0 0 0 2px rgba(15,123,95,.08); }
.notebook-editor h2 { font-size: 1.35rem; font-weight: 700; margin: .75rem 0; }
.notebook-editor ul, .notebook-editor ol { padding-right: 1.5rem; margin: .5rem 0; }
.notebook-editor blockquote { border-right: 3px solid #0F7B5F; padding-right: .75rem; color: #5b5541; }
.notebook-list-item { border: 1px solid transparent; transition: background .15s ease, border-color .15s ease; }

.form-list-item { border: 1px solid transparent; transition: background .15s ease, border-color .15s ease; }
.form-field-editor { border: 1px solid #ece4d2; border-radius: 14px; padding: 1rem; background: #fffdf9; }
.field-drag-handle { color: #b4aa94; cursor: grab; }
.form-public-link { display: flex; align-items: center; gap: .55rem; border: 1px solid #c3e6d8; border-radius: 12px; padding: .45rem .6rem .45rem .45rem; background: #f3fbf7; color: #0a5240; font-size: .78rem; }
.form-public-link span { flex: 1; min-width: 0; }

.mindmap-list-card { transition: transform .15s ease, box-shadow .15s ease; }
.mindmap-list-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(27,42,74,.1); }
.mindmap-toolbar { align-items: center; }
.mindmap-help { color: #7c7461; font-size: .78rem; }
.mindmap-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: .8rem; align-items: stretch; }
.mindmap-canvas { position: relative; min-height: 650px; overflow: hidden; border: 1px solid #dcd3ba; border-radius: 16px; background-color: #fffdf9; background-image: radial-gradient(#d8d0bd 1px, transparent 1px); background-size: 22px 22px; cursor: grab; }
.mindmap-canvas:active { cursor: grabbing; }
.mindmap-canvas:focus { outline: 2px solid rgba(15,123,95,.35); outline-offset: 2px; }
#mindmap-map-stage { position: absolute; top: 0; left: 0; width: 1800px; height: 1200px; transform-origin: 900px 600px; transition: transform .12s ease-out; }
#mindmap-links { position: absolute; inset: 0; width: 1800px; height: 1200px; pointer-events: none; overflow: visible; }
.mindmap-link { fill: none; stroke: #b8c3d2; stroke-width: 4; stroke-linecap: round; opacity: .9; }
#mindmap-nodes { position: absolute; inset: 0; }
.mindmap-node { position: absolute; min-width: 120px; max-width: 230px; padding: .7rem 1rem; border: 3px solid transparent; border-radius: 14px; color: #fff; font-family: inherit; font-weight: 700; line-height: 1.4; transform: translate(-50%, -50%); cursor: grab; box-shadow: 0 8px 18px rgba(27,42,74,.16); white-space: pre-wrap; word-break: break-word; transition: box-shadow .15s, border-radius .15s; }
.mindmap-node-pill { border-radius: 999px; }
.mindmap-node-square { border-radius: 5px; }
.mindmap-node:active { cursor: grabbing; }
.mindmap-node-selected { border-color: #c98a1f; box-shadow: 0 0 0 4px rgba(201,138,31,.22), 0 8px 18px rgba(27,42,74,.16); }
.mindmap-inspector { min-height: 270px; }
.mindmap-divider { width: 1px; height: 1.5rem; background: #e3dccd; margin: 0 .25rem; }
.mindmap-canvas-hint { position: absolute; z-index: 1; top: .75rem; left: .85rem; color: #a59b87; font-size: .72rem; pointer-events: none; }
.mindmap-shape-btn { border: 1px solid #dcd3ba; border-radius: 7px; padding: .3rem .45rem; color: #6b6552; font-size: .7rem; background: #fff; }
.mindmap-shape-btn.active, .mindmap-shape-btn:hover { color: #0F7B5F; border-color: #0F7B5F; background: #e7f5f0; }
.mindmap-color-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: .35rem; }
.mindmap-color-btn { width: 1.45rem; height: 1.45rem; border-radius: 50%; border: 2px solid transparent; }
.mindmap-color-btn.active, .mindmap-color-btn:hover { outline: 2px solid #c98a1f; outline-offset: 2px; }
@media (max-width: 820px) { .mindmap-editor-layout { grid-template-columns: 1fr; } .mindmap-inspector { order: -1; } .mindmap-canvas { min-height: 520px; } }

.personal-projects-scroll { display: flex; gap: 1rem; overflow-x: auto; padding: .15rem .1rem .75rem; scroll-snap-type: x proximity; }
.personal-project-board { flex: 0 0 min(100%, 980px); border: 1px solid #ece4d2; border-top: 4px solid var(--project-accent, #0F7B5F); border-radius: 14px; background: #fffdf9; overflow: hidden; scroll-snap-align: start; }
.personal-project-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1rem; background: #fff; }
.project-icon-btn { width: 1.9rem; height: 1.9rem; border-radius: .5rem; color: #5b5541; background: #f5f1e9; font-size: .75rem; }
.project-icon-btn:hover { background: #eef1f6; color: #1B2A4A; }
.personal-project-columns { display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: .7rem; padding: 0 .8rem .8rem; }
.personal-project-column { min-width: 0; }
.personal-project-column-title { display: flex; align-items: center; justify-content: space-between; color: #4c493f; font-size: .78rem; font-weight: 700; padding: .55rem .2rem; }
.personal-project-column-title b { min-width: 1.4rem; padding: .1rem .35rem; border-radius: 999px; background: #eee9db; text-align: center; font-size: .68rem; }
.personal-project-column-dropzone { min-height: 150px; padding: .45rem; border-radius: .7rem; background: #f5f1e9; border: 1px dashed #dcd3ba; transition: background .15s, border-color .15s; }
.personal-project-column-dropzone.is-dragover { background: #e7f5f0; border-color: #0F7B5F; }
.personal-project-column-empty { display: grid; place-items: center; min-height: 120px; color: #aaa18d; font-size: .72rem; }
.personal-project-task { position: relative; margin-bottom: .5rem; padding: .7rem; border: 1px solid #e4dccb; border-radius: .65rem; background: #fff; box-shadow: 0 2px 5px rgba(27,42,74,.05); cursor: grab; }
.personal-project-task:last-child { margin-bottom: 0; }
.personal-project-task.is-dragging { opacity: .45; transform: rotate(1deg); }
.personal-project-task h4 { color: #1B2A4A; font-size: .82rem; font-weight: 700; line-height: 1.45; }
.personal-project-task footer { display: flex; justify-content: flex-end; gap: .35rem; margin-top: .45rem; opacity: 0; transition: opacity .15s; }
.personal-project-task:hover footer, .personal-project-task:focus-within footer { opacity: 1; }
.personal-project-task footer button { width: 1.55rem; height: 1.55rem; border-radius: .4rem; color: #7c7461; font-size: .68rem; }
.personal-project-task footer button:hover { background: #eef1f6; color: #1B2A4A; }
.project-priority { padding: .12rem .38rem; border-radius: 999px; font-size: .6rem; font-weight: 700; white-space: nowrap; }
.project-priority-high { background: #fbe6e3; color: #8f2a1f; }
.project-priority-medium { background: #fbf0dc; color: #94620d; }
.project-priority-low { background: #e2ecfb; color: #1e4d8f; }
.personal-projects-empty { display: grid; justify-items: center; gap: .55rem; padding: 1.5rem; color: #7c7461; text-align: center; }
.personal-projects-empty > i { color: #0F7B5F; font-size: 1.8rem; }
@media (max-width: 760px) { .personal-project-columns { grid-template-columns: 1fr; } .personal-project-board { flex-basis: 100%; } .personal-project-task footer { opacity: 1; } }
@media (max-width: 640px) { .mindmap-help { width: 100%; order: 3; } .mindmap-canvas { min-height: 480px; } }

.drawing-pad-shell { overflow: hidden; }
.drawing-toolbar { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; padding: .75rem; border-bottom: 1px solid #ece4d2; background: #fffdf9; }
.drawing-tool-group { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.drawing-tool { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid #dcd3ba; border-radius: .65rem; padding: .45rem .65rem; color: #5b5541; background: #fff; cursor: pointer; font-size: .78rem; transition: all .15s ease; }
.drawing-tool:hover, .drawing-tool.active { color: #0F7B5F; border-color: #0F7B5F; background: #e7f5f0; box-shadow: 0 0 0 2px rgba(15,123,95,.08); }
.drawing-toolbar-divider { width: 1px; height: 1.7rem; background: #e3dccd; }
.drawing-control { display: flex; min-width: 0; flex-direction: column; align-items: stretch; gap: .3rem; color: #5b5541; font-size: .78rem; font-weight: 600; }
.drawing-control input[type="color"] { width: 2rem; height: 2rem; padding: 0; border: 1px solid #dcd3ba; border-radius: .45rem; cursor: pointer; background: transparent; }
.drawing-control input[type="range"] { display: block; width: 100%; max-width: 100%; min-width: 0; margin: 0; accent-color: #0F7B5F; }
.drawing-size-control output { min-width: 2.4rem; color: #7c7461; font-weight: 400; }
.drawing-hint { margin-right: auto; color: #7c7461; font-size: .75rem; }
.drawing-canvas-wrap { position: relative; width: 100%; min-height: 420px; padding: .75rem; background: #e8e2d5; }
#drawing-canvas { display: block; width: 100%; height: auto; min-height: 420px; border: 1px solid #dcd3ba; border-radius: .7rem; background: #fff; cursor: crosshair; touch-action: none; box-shadow: 0 3px 12px rgba(27,42,74,.08); }
.drawing-canvas-empty { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); color: #c0b7a3; font-size: 1rem; pointer-events: none; opacity: .4; }

.studio-canvas-wrap { position: relative; width: 100%; min-height: 520px; padding: .75rem; background: #e8e2d5; border-radius: .9rem; overflow: auto; }
#studio-canvas { display: block; width: 100%; height: auto; min-height: 420px; background: #fff; border: 1px solid #dcd3ba; border-radius: .7rem; cursor: crosshair; touch-action: none; box-shadow: 0 3px 12px rgba(27,42,74,.08); }
.studio-empty { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); color: #c0b7a3; pointer-events: none; white-space: nowrap; }
.studio-tool { border: 1px solid #dcd3ba; border-radius: .5rem; padding: .4rem; background: #fff; color: #5b5541; font-size: .75rem; cursor: pointer; transition: all .15s ease; }
.studio-tool.active, .studio-tool:hover { color: #0F7B5F; border-color: #0F7B5F; background: #e7f5f0; }
@media (max-width: 640px) { .studio-canvas-wrap { min-height: 300px; padding: .4rem; } #studio-canvas { min-height: 260px; } }
.drawing-text-layer { position: absolute; inset: .75rem; pointer-events: none; overflow: hidden; }
.drawing-text-item { position: absolute; z-index: 2; transform-origin: top left; white-space: pre-wrap; max-width: 90%; font-family: Arial, sans-serif; font-weight: 600; line-height: 1.2; cursor: grab; user-select: none; pointer-events: auto; text-shadow: 0 1px 2px rgba(255,255,255,.65); }
.drawing-text-item:active { cursor: grabbing; }
@media (max-width: 640px) { .drawing-text-layer { inset: .4rem; } }
.drawing-footer { display: flex; justify-content: space-between; gap: .8rem; padding: .65rem .85rem; color: #7c7461; font-size: .72rem; background: #fffdf9; }
@media (max-width: 640px) { .drawing-toolbar-divider { display: none; } .drawing-hint { width: 100%; margin-right: 0; order: 5; } .drawing-canvas-wrap { padding: .4rem; } #drawing-canvas { min-height: 260px; } .drawing-footer { flex-direction: column; } }

.drawing-image-tools { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .55rem .85rem; border-bottom: 1px solid #ece4d2; background: #f4fbf8; }
.drawing-image-tools-label { display: inline-flex; align-items: center; color: #0F7B5F; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.drawing-image-tools .drawing-control { min-width: 130px; }
.drawing-image-tools-hint { color: #7c7461; font-size: .72rem; }
@media (max-width: 640px) { .drawing-image-tools-hint { width: 100%; order: 8; } }

.input {
  width: 100%; border: 1px solid #dcd3ba; border-radius: 10px; padding: .6rem .85rem;
  background: #fff; font-family: inherit; font-size: .925rem; outline: none; transition: border-color .15s;
}
.input:focus { border-color: #1B2A4A; box-shadow: 0 0 0 3px rgba(27,42,74,.08); }
.input-sm { width: auto; padding: .35rem .6rem; font-size: .8rem; border-radius: 8px; }
.label { display: block; font-size: .8rem; color: #5b5541; margin-bottom: .3rem; font-weight: 600; }

.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge-green { background: #e7f5f0; color: #0a5240; }
.badge-amber { background: #fbf0dc; color: #94620d; }
.badge-red { background: #fbe6e3; color: #8f2a1f; }
.badge-blue { background: #e2ecfb; color: #1e4d8f; }
.badge-gray { background: #eee9db; color: #6b6552; }

.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.status-dot.online { background: #0F7B5F; box-shadow: 0 0 0 3px rgba(15,123,95,.18); }
.status-dot.paused { background: #c98a1f; box-shadow: 0 0 0 3px rgba(201,138,31,.18); }
.status-dot.offline { background: #b9b2a0; }
.status-dot.mission { background: #1e4d8f; box-shadow: 0 0 0 3px rgba(30,77,143,.18); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(19,31,56,.55); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  backdrop-filter: blur(2px);
}
.modal-box { position: relative; background: #fff; border-radius: 18px; max-width: 440px; width: 100%; padding: 1.5rem; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-box.modal-md { max-width: 560px; }
.modal-box.modal-lg { max-width: 760px; }
.modal-close {
  position: absolute; top: .8rem; left: .8rem; z-index: 6;
  width: 2.1rem; height: 2.1rem; border-radius: 10px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f1ede2; color: #6b6552; font-size: .85rem;
  transition: background .15s ease, color .15s ease;
}
.modal-close:hover { background: #e7dfcc; color: #1B2A4A; }

/* نافذة الإشعار المنبثقة (تم الاطلاع): سقف ارتفاع لمنطقة النص يحافظ على ظهور
   أزرار الإغلاق «تم الاطلاع / فتح الرابط / X» حتى لو كان المحتوى طويلاً
   (مثل إشعارات المدونة والديوانية بالمحتوى الكامل). */
.broadcast-body { max-height: 200px; overflow-y: auto; overscroll-behavior: contain; }
.modal-box { max-height: calc(100vh - 2.5rem); overflow-y: auto; }

.toast { pointer-events: auto; background: #1B2A4A; color: #fff; padding: .8rem 1.1rem; border-radius: 12px; font-size: .875rem; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 380px; }
.toast.success { background: #0F7B5F; }
.toast.error { background: #b3382c; }
.toast.warn { background: #c98a1f; }

/* تنبيه الصلاة: يبقى ظاهراً حتى يقرأه المستخدم ويغلقه بنفسه */
.prayer-alert-banner {
  position: fixed;
  top: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 30rem);
  z-index: 120;
  direction: rtl;
  animation: prayerAlertIn .25s ease-out;
}
.prayer-alert-content {
  display: flex;
  align-items: center;
  gap: .8rem;
  background: #0F7B5F;
  color: #fff;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 16px;
  padding: .8rem 1rem;
  box-shadow: 0 12px 30px rgba(15,123,95,.32);
}
.prayer-alert-icon { font-size: 1.35rem; flex-shrink: 0; }
.prayer-alert-text { display: flex; flex-direction: column; gap: .2rem; flex: 1; line-height: 1.6; }
.prayer-alert-text strong { font-size: 1rem; }
.prayer-alert-text span { font-size: .82rem; opacity: .95; }
.prayer-alert-close {
  width: 2rem; height: 2rem; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.16); color: #fff; cursor: pointer; flex-shrink: 0;
}
.prayer-alert-close:hover { background: rgba(255,255,255,.3); }
@keyframes prayerAlertIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }

.nav-link { display: flex; align-items: center; gap: .6rem; padding: .65rem .9rem; border-radius: 10px; color: #d6ddea; font-weight: 500; font-size: .9rem; }
.nav-link.active { background: rgba(255,255,255,.12); color: #fff; }
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }

.nav-section { margin-bottom: .35rem; }
.nav-section + .nav-section { margin-top: .5rem; padding-top: .6rem; border-top: 1px solid rgba(255,255,255,.1); }
.nav-section-title { font-size: .7rem; font-weight: 700; color: rgba(255,255,255,.4); padding: 0 .9rem .35rem; text-transform: uppercase; letter-spacing: .02em; }

.table-clean { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table-clean th { text-align: right; padding: .6rem .75rem; color: #6b6552; font-weight: 600; border-bottom: 2px solid #ece4d2; white-space: nowrap; }
.table-clean td { padding: .6rem .75rem; border-bottom: 1px solid #f1ebdc; white-space: nowrap; }
.table-clean tr:hover td { background: #faf8f2; }

.skeleton { background: linear-gradient(90deg, #ece4d2 25%, #f5f1e9 50%, #ece4d2 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.fade-in { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.big-timer { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* المدونة الداخلية: قراءة عربية مريحة بخط أكبر وتباعد واضح */
.blog-shell { max-width: 1100px; margin-inline: auto; }
.blog-hero { background: linear-gradient(135deg, #ffffff 0%, #eef1f6 100%); }
.blog-hero-icon { width: 3.5rem; height: 3.5rem; border-radius: 1.1rem; background: #1B2A4A; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.blog-eyebrow { color: #0F7B5F; font-weight: 700; font-size: 1rem; margin-bottom: .2rem; }
.blog-title { color: #131f38; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.25; font-weight: 700; }
.blog-lead { color: #3a6693; font-size: 1.15rem; line-height: 1.9; max-width: 48rem; margin-top: .4rem; }
.blog-section-title { color: #131f38; font-size: 1.35rem; line-height: 1.5; font-weight: 700; }
.blog-input { font-size: 1rem; min-height: 3rem; }
.blog-pill { border: 1px solid #d6ddea; background: #fff; color: #2a4d75; border-radius: 999px; padding: .55rem .9rem; font-size: .95rem; transition: all .15s ease; }
.blog-pill:hover, .blog-pill:focus { background: #eef1f6; border-color: #84a2c1; }
.blog-post-card { overflow: hidden; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.blog-post-card:hover { transform: translateY(-2px); border-color: #84a2c1; box-shadow: 0 8px 24px rgba(27,42,74,.1); }
.blog-card-title { color: #131f38; font-size: 1.35rem; line-height: 1.65; font-weight: 700; }
.blog-card-excerpt { color: #3a6693; font-size: 1.05rem; line-height: 1.9; margin-top: .65rem; min-height: 3.8rem; }
.blog-read-more { display: inline-block; color: #0F7B5F; font-size: 1rem; font-weight: 700; margin-top: 1rem; }
.blog-article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; color: #6b6552; font-size: .95rem; }
.blog-article-title { color: #131f38; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.5; font-weight: 700; margin-top: 1.2rem; }
.blog-article-excerpt { color: #3a6693; font-size: 1.2rem; line-height: 2; border-right: 4px solid #0F7B5F; padding-right: 1rem; margin-top: 1rem; }
.blog-article-body { color: #263957; font-size: 1.15rem; line-height: 2.15; white-space: normal; margin-top: 1.8rem; }
.blog-editor { font-size: 1rem; line-height: 1.9; }
.blog-admin-panel { border-top: 4px solid #1B2A4A; }

@media (max-width: 640px) {
  .card { border-radius: 14px; }
  .blog-hero-icon { width: 2.8rem; height: 2.8rem; font-size: 1.2rem; }
  .blog-lead { font-size: 1rem; }
  .blog-article-body { font-size: 1.08rem; line-height: 2; }
}

/* طبقة الصقل البصري الاحترافية */
:root {
  --ui-ink: #172b4d;
  --ui-muted: #6b7890;
  --ui-border: #e5eaf1;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f7f9fc;
  --ui-brand: #176b5b;
  --ui-brand-dark: #0f4e43;
  --ui-shadow: 0 10px 30px rgba(23, 43, 77, .06);
  --ui-shadow-hover: 0 16px 36px rgba(23, 43, 77, .11);
}

html { scroll-behavior: smooth; }
body {
  color: var(--ui-ink);
  background: #f4f7fb !important;
  letter-spacing: -.005em;
}

.app-shell { background: #f4f7fb !important; }
.app-sidebar {
  background: linear-gradient(180deg, #172b4d 0%, #10213d 100%) !important;
  box-shadow: 8px 0 30px rgba(10, 28, 54, .08);
}
.app-sidebar .nav-link,
.mobile-sidebar .nav-link { border-radius: 12px; margin-bottom: .18rem; }
.app-sidebar .nav-link.active,
.mobile-sidebar .nav-link.active {
  background: linear-gradient(90deg, rgba(54, 180, 145, .24), rgba(54, 180, 145, .08));
  box-shadow: inset 3px 0 0 #56c7a1;
}
.app-sidebar .nav-link:hover,
.mobile-sidebar .nav-link:hover { background: rgba(255,255,255,.10); }

.app-topbar {
  background: rgba(255,255,255,.92) !important;
  border-bottom: 1px solid var(--ui-border) !important;
  box-shadow: 0 4px 18px rgba(23,43,77,.04);
  backdrop-filter: blur(14px);
}
.app-topbar .btn-ghost { color: var(--ui-muted); }
.app-topbar .btn-ghost:hover { color: var(--ui-ink); background: #f0f4f8; }

#page-content {
  max-width: 1440px !important;
  padding-top: 1.75rem !important;
  padding-bottom: 3rem !important;
}
#page-content > .fade-in > :first-child { margin-top: .15rem; }

.card {
  border-color: var(--ui-border);
  border-radius: 18px;
  box-shadow: var(--ui-shadow);
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: #d9e2ec; }

.btn { min-height: 2.65rem; border-radius: 11px; box-shadow: 0 2px 4px rgba(23,43,77,.04); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(23,43,77,.10); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, #203b62, #172b4d); }
.btn-emerald { background: linear-gradient(135deg, #1b8a70, #176b5b); }
.btn-amber { background: linear-gradient(135deg, #d79a2b, #bc7b12); }
.btn-danger { background: linear-gradient(135deg, #c94e43, #a93730); }
.btn-violet { background: linear-gradient(135deg, #7c5cbf, #5b3da0); }
.btn-teal { background: linear-gradient(135deg, #16838c, #0e6570); }
.btn-indigo { background: linear-gradient(135deg, #3f51b5, #2f3e93); }
.btn-cyan { background: linear-gradient(135deg, #0e7fae, #0b648c); }
.btn-outline { border-color: #d4dde8; }

.input, select.input, textarea.input {
  border-color: #d8e0ea;
  border-radius: 11px;
  min-height: 2.7rem;
  color: var(--ui-ink);
  background: #fff;
}
.input::placeholder { color: #a1adbd; }
.input:focus { border-color: #3a9d83; box-shadow: 0 0 0 4px rgba(58,157,131,.12); }
.label { color: #4d5d74; letter-spacing: 0; }

.table-clean { border-spacing: 0 .35rem; border-collapse: separate; }
.table-clean thead th {
  color: #718096; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--ui-border); padding-top: .8rem; padding-bottom: .8rem;
}
.table-clean tbody tr { background: #fff; box-shadow: 0 2px 8px rgba(23,43,77,.035); }
.table-clean tbody td { border-bottom: 1px solid #eef2f6; }
.table-clean tbody tr:first-child td:first-child,
.table-clean tbody tr:first-child td:last-child { border-top: 1px solid #eef2f6; }
.table-clean tbody tr td:first-child { border-radius: 0 10px 10px 0; }
.table-clean tbody tr td:last-child { border-radius: 10px 0 0 10px; }
.table-clean tr:hover td { background: #f8fbfd; }

.badge { padding: .32rem .7rem; font-size: .72rem; letter-spacing: .01em; }
.modal-backdrop { background: rgba(12, 25, 47, .62); backdrop-filter: blur(7px); }
.modal-box { border: 1px solid rgba(255,255,255,.7); border-radius: 22px; box-shadow: 0 24px 70px rgba(7,22,43,.24); }
.toast { border: 1px solid rgba(255,255,255,.15); border-radius: 14px; box-shadow: 0 12px 30px rgba(7,22,43,.18); }

#points-balance-badge { box-shadow: 0 3px 10px rgba(201,138,31,.12); }
#notif-btn { width: 2.65rem; height: 2.65rem; border-radius: 50%; }

@media (max-width: 1023px) {
  #page-content { padding-top: 1.1rem !important; }
}
@media (max-width: 640px) {
  #page-content { padding-inline: .85rem !important; }
  .card { border-radius: 16px; }
  .btn { min-height: 2.5rem; }
}

/* حائط الأفكار - مساحة Padlet تفاعلية */
.padlet-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 18rem;
  padding: clamp(1.35rem, 4vw, 2.6rem);
  border-radius: 26px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.22), transparent 28%),
    linear-gradient(135deg, #173b63 0%, #176b5b 56%, #1e8d73 100%);
  box-shadow: 0 18px 42px rgba(23,107,91,.18);
}
.padlet-hero::before,
.padlet-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  pointer-events: none;
}
.padlet-hero::before { width: 27rem; height: 27rem; left: -9rem; bottom: -17rem; }
.padlet-hero::after { width: 19rem; height: 19rem; right: -7rem; top: -10rem; }
.padlet-hero-orbit {
  position: absolute;
  z-index: -1;
  width: .8rem;
  height: .8rem;
  border-radius: 50%;
  background: #ffd978;
  box-shadow: 0 0 0 8px rgba(255,217,120,.12), 0 0 24px rgba(255,217,120,.55);
  animation: padletFloat 5s ease-in-out infinite;
}
.padlet-hero-orbit.orbit-one { top: 28%; left: 58%; }
.padlet-hero-orbit.orbit-two { width: .55rem; height: .55rem; right: 18%; bottom: 22%; animation-delay: -2s; background: #a8ead2; box-shadow: 0 0 0 7px rgba(168,234,210,.12), 0 0 20px rgba(168,234,210,.5); }
@keyframes padletFloat { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -10px, 0); } }

#padlet-filters { scrollbar-width: none; }
.padlet-filter {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.45rem;
  padding: .45rem .85rem;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  background: #fff;
  color: #5b6b80;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.padlet-filter:hover { color: #176b5b; border-color: #8ac9b6; background: #f0fbf7; transform: translateY(-1px); }
.padlet-filter.is-active { color: #fff; border-color: #176b5b; background: linear-gradient(135deg, #1b8a70, #176b5b); box-shadow: 0 5px 14px rgba(23,107,91,.2); }
.padlet-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 1.1rem;
}
.padlet-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 1.15rem;
  border: 1px solid rgba(23,43,77,.08);
  border-top: 4px solid var(--padlet-accent, #58b899);
  border-radius: 18px;
  background: var(--padlet-bg, #fff);
  box-shadow: 0 7px 20px rgba(23,43,77,.07);
  animation: padletCardIn .3s ease both;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.padlet-card::before { content: ''; position: absolute; width: 5rem; height: 5rem; left: -2rem; bottom: -2.3rem; border-radius: 50%; background: var(--padlet-accent, #58b899); opacity: .09; pointer-events: none; }
.padlet-card:hover { transform: translateY(-4px) rotate(.15deg); border-color: color-mix(in srgb, var(--padlet-accent, #58b899) 45%, #fff); box-shadow: 0 16px 30px rgba(23,43,77,.12); }
.padlet-card-mint { --padlet-bg: #effaf5; --padlet-accent: #35a77e; }
.padlet-card-sky { --padlet-bg: #eef6ff; --padlet-accent: #5c91d1; }
.padlet-card-peach { --padlet-bg: #fff3ec; --padlet-accent: #e48b65; }
.padlet-card-lavender { --padlet-bg: #f6f0ff; --padlet-accent: #9876d0; }
.padlet-card-sun { --padlet-bg: #fff9df; --padlet-accent: #d7a52d; }
@keyframes padletCardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.padlet-video-frame { position: relative; aspect-ratio: 16 / 9; margin-top: 1rem; overflow: hidden; border-radius: 13px; background: #132b45; box-shadow: 0 7px 16px rgba(23,43,77,.12); }
.padlet-video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.padlet-link-card { display: flex; align-items: center; gap: .65rem; min-width: 0; margin-top: 1rem; padding: .72rem .8rem; border: 1px solid rgba(23,107,91,.16); border-radius: 12px; color: #176b5b; background: rgba(255,255,255,.68); font-size: .78rem; font-weight: 700; transition: background .18s ease, transform .18s ease; }
.padlet-link-card:hover { background: #fff; transform: translateX(-2px); }
.padlet-link-card span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.padlet-reaction-btn { display: inline-flex; align-items: center; gap: .25rem; min-width: 2.2rem; padding: .35rem .45rem; border: 1px solid transparent; border-radius: 999px; color: #738198; background: rgba(255,255,255,.45); font-size: .72rem; cursor: pointer; transition: all .18s ease; }
.padlet-reaction-btn:hover { color: #176b5b; background: #fff; border-color: #b9dfd1; transform: translateY(-1px); }
.padlet-reaction-btn.is-active { color: #c34849; background: #fff0ef; border-color: #f1c2bf; }
.padlet-reaction-btn.is-active.is-spark { color: #a26a0a; background: #fff7df; border-color: #f0d48e; }
.padlet-reaction-btn.is-active.is-support { color: #176b5b; background: #e3f7ef; border-color: #b9dfd1; }
.padlet-reaction-btn:disabled { opacity: .55; cursor: wait; }
@media (max-width: 1050px) { .padlet-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .padlet-hero { min-height: 20rem; border-radius: 20px; }
  .padlet-wall { grid-template-columns: 1fr; gap: .85rem; }
  .padlet-card { padding: 1rem; }
  .padlet-filter { min-height: 2.25rem; padding-inline: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .padlet-hero-orbit, .padlet-card { animation: none; }
  .padlet-card, .padlet-filter, .padlet-link-card, .padlet-reaction-btn { transition: none; }
}
/* استوديو HeyGen: واجهة اختيار مرئية واحترافية */
.heygen-page { --heygen-brand: #176b5b; --heygen-ink: #172b4d; }
.heygen-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; overflow: hidden; padding: clamp(1.5rem, 4vw, 2.8rem); border-radius: 24px; color: #fff; background: radial-gradient(circle at 10% 10%, rgba(255,255,255,.16), transparent 30%), linear-gradient(135deg, #173b63, #176b5b 65%, #209176); box-shadow: 0 18px 42px rgba(23,107,91,.18); }
.heygen-hero-copy { position: relative; z-index: 1; max-width: 720px; }
.heygen-kicker { display: inline-flex; gap: .45rem; align-items: center; color: #baf0df; font-size: .78rem; font-weight: 700; }
.heygen-hero h1 { margin-top: .65rem; font-size: clamp(1.55rem, 3vw, 2.45rem); line-height: 1.35; font-weight: 800; }
.heygen-hero p { margin-top: .65rem; max-width: 44rem; color: rgba(255,255,255,.82); line-height: 1.8; }
.heygen-hero-pills { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.15rem; }
.heygen-hero-pills span { display: inline-flex; gap: .35rem; align-items: center; padding: .38rem .65rem; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.1); font-size: .72rem; }
.heygen-hero-art { display: grid; place-items: center; flex: 0 0 9rem; width: 9rem; height: 9rem; border: 1px solid rgba(255,255,255,.22); border-radius: 2rem; background: rgba(255,255,255,.12); transform: rotate(4deg); box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.heygen-hero-art i { font-size: 2.3rem; }
.heygen-hero-art span { margin-top: -1rem; font-weight: 800; font-size: .95rem; }
.heygen-hero-art small { margin-top: -1.6rem; font-size: .5rem; letter-spacing: .13em; opacity: .7; }
.heygen-section-heading { display: flex; gap: .75rem; align-items: flex-start; padding-bottom: .25rem; }
.heygen-step { display: grid; place-items: center; flex: 0 0 2.1rem; height: 2.1rem; border-radius: .7rem; color: #fff; background: linear-gradient(135deg, #1b8a70, #176b5b); font-size: .72rem; font-weight: 800; }
.heygen-section-heading h2 { color: var(--heygen-ink); font-size: 1.05rem; font-weight: 800; }
.heygen-section-heading p { margin-top: .12rem; color: #8390a3; font-size: .76rem; }
.heygen-filter-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; padding: .85rem; border: 1px solid #e5eaf1; border-radius: 14px; background: #f7f9fc; }
.heygen-search-field { min-width: 0; }
.heygen-avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: .75rem; min-height: 8rem; }
.heygen-avatar-card { position: relative; min-width: 0; overflow: hidden; padding: 0; border: 1px solid #e2e8f0; border-radius: 15px; text-align: right; background: #fff; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.heygen-avatar-card:hover { border-color: #8ac9b6; transform: translateY(-3px); box-shadow: 0 10px 23px rgba(23,43,77,.1); }
.heygen-avatar-card.is-selected { border: 2px solid #176b5b; box-shadow: 0 0 0 3px rgba(23,107,91,.13); }
.heygen-avatar-photo { display: grid; place-items: center; height: 132px; overflow: hidden; color: #7b9b9d; background: linear-gradient(145deg, #eaf7f2, #eef3f8); }
.heygen-avatar-photo img { width: 100%; height: 100%; object-fit: cover; }
.heygen-avatar-photo i { font-size: 2.6rem; }
.heygen-avatar-card-body { display: grid; gap: .18rem; padding: .65rem .7rem .75rem; }
.heygen-avatar-card-body strong { overflow: hidden; color: #243b5a; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.heygen-avatar-card-body span, .heygen-avatar-card-body small { overflow: hidden; color: #8793a3; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.heygen-avatar-card-body small { color: #176b5b; }
.heygen-check { position: absolute; top: .55rem; left: .55rem; display: none; width: 1.45rem; height: 1.45rem; align-items: center; justify-content: center; border-radius: 50%; color: #fff; background: #176b5b; font-size: .67rem; }
.heygen-avatar-card.is-selected .heygen-check, .heygen-voice-chip.is-selected .heygen-check { display: inline-flex; }
.heygen-voice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; max-height: 24rem; overflow-y: auto; padding: .15rem; }
.heygen-voice-chip { position: relative; display: flex; align-items: center; gap: .65rem; min-width: 0; padding: .7rem; border: 1px solid #e2e8f0; border-radius: 13px; color: #243b5a; background: #fff; text-align: right; cursor: pointer; transition: all .18s ease; }
.heygen-voice-chip:hover { border-color: #8ac9b6; background: #f7fcfa; }
.heygen-voice-chip.is-selected { border-color: #176b5b; background: #effaf5; box-shadow: 0 0 0 2px rgba(23,107,91,.1); }
.heygen-voice-icon { display: grid; place-items: center; flex: 0 0 2.2rem; height: 2.2rem; border-radius: .65rem; color: #176b5b; background: #e4f5ed; }
.heygen-voice-copy { display: grid; min-width: 0; gap: .18rem; flex: 1; }
.heygen-voice-copy strong, .heygen-voice-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heygen-voice-copy strong { font-size: .77rem; }
.heygen-voice-copy small { color: #8793a3; font-size: .67rem; }
.heygen-pinned { color: #ae7514; font-size: .61rem; white-space: nowrap; }
.heygen-voice-chip .heygen-check { top: .4rem; left: .4rem; }
.heygen-selected-summary { min-height: 2.45rem; display: flex; align-items: center; gap: .4rem; padding: .55rem .75rem; border: 1px dashed #b9dfd1; border-radius: 10px; color: #65758a; background: #f8fcfa; font-size: .75rem; }
.heygen-selected-summary i { color: #176b5b; }
.heygen-info-box { display: flex; align-items: center; gap: .5rem; min-height: 2.7rem; padding: .6rem .8rem; border-radius: 11px; color: #66768b; background: #f7f9fc; font-size: .75rem; }
.heygen-info-box i { color: #176b5b; }
.heygen-upload-zone { display: grid; place-items: center; gap: .35rem; min-height: 8.5rem; padding: 1.1rem; border: 1.5px dashed #a9cfc1; border-radius: 16px; color: #61748b; background: #f8fcfa; cursor: pointer; text-align: center; transition: all .18s ease; }
.heygen-upload-zone:hover, .heygen-upload-zone.is-dragover { border-color: #176b5b; color: #176b5b; background: #effaf5; }
.heygen-upload-zone > i { color: #176b5b; font-size: 1.65rem; }
.heygen-upload-zone strong { color: #2b4f68; font-size: .85rem; }
.heygen-upload-zone span { font-size: .7rem; color: #8a98a8; }
.heygen-attachment-card { display: flex; align-items: center; gap: .7rem; padding: .65rem .75rem; border: 1px solid #dbe8e1; border-radius: 12px; background: #f7fcfa; }
.heygen-attachment-card > span:nth-child(2) { display: grid; min-width: 0; flex: 1; gap: .18rem; }
.heygen-attachment-card strong { overflow: hidden; color: #29445d; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.heygen-attachment-card small { color: #8390a3; font-size: .67rem; }
.heygen-attachment-icon { display: grid; place-items: center; flex: 0 0 2.2rem; height: 2.2rem; border-radius: .65rem; color: #176b5b; background: #dff3e9; }
.heygen-submit { width: 100%; min-height: 3.1rem; font-size: .95rem; }
.heygen-loading, .heygen-empty { display: grid; place-items: center; gap: .55rem; min-height: 8rem; padding: 1rem; border: 1px dashed #d8e0ea; border-radius: 14px; color: #8b98a9; font-size: .78rem; text-align: center; }
.heygen-loading i, .heygen-empty i { color: #176b5b; font-size: 1.25rem; }
@media (max-width: 700px) { .heygen-hero { align-items: flex-start; } .heygen-hero-art { display: none; } .heygen-filter-bar { grid-template-columns: 1fr; } .heygen-voice-list { grid-template-columns: 1fr; } .heygen-avatar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 390px) { .heygen-avatar-grid { grid-template-columns: 1fr; } }

/* غرفة اجتماعات Agora */
.agora-room { --agora-ink: #172b4d; --agora-brand: #0f7b5f; --agora-soft: #e7f5f0; min-width: min(100%, 760px); color: var(--agora-ink); }
.agora-room-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.35rem; color: #fff; background: radial-gradient(circle at 8% 0%, rgba(255,255,255,.18), transparent 32%), linear-gradient(135deg, #172b4d, #0f7b5f); }
.agora-room-kicker { display: inline-flex; align-items: center; gap: .4rem; color: #c9f5e5; font-size: .7rem; font-weight: 700; }
.agora-room-header h2 { margin-top: .35rem; color: #fff; font-size: 1.1rem; font-weight: 800; }
.agora-room-header p { margin-top: .35rem; color: rgba(255,255,255,.7); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .68rem; direction: ltr; text-align: right; }
.agora-close { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid rgba(255,255,255,.22); border-radius: .7rem; color: #fff; background: rgba(255,255,255,.1); cursor: pointer; transition: background .18s ease; }
.agora-close:hover { background: rgba(255,255,255,.22); }
.agora-room-status { display: flex; align-items: center; gap: .45rem; min-height: 2.4rem; padding: .65rem 1.35rem; color: #66768b; background: #f7f9fc; font-size: .75rem; }
.agora-room-status.success { color: #08704f; background: #eaf8f1; }
.agora-room-status.error { color: #a53d3d; background: #fff0f0; }
.agora-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: .85rem; min-height: 420px; padding: 1rem; background: #101b2d; }
.agora-remote-users { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-content: center; gap: .75rem; min-width: 0; }
.agora-video-tile { position: relative; min-height: 155px; overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: linear-gradient(145deg, #243855, #15243a); box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.agora-video-tile video { display: block; width: 100%; height: 100%; min-height: 155px; object-fit: cover; }
.agora-local-tile { min-height: 145px; }
.agora-local-tile video { min-height: 145px; }
/* الوضع الثنائي (مكالمة 1:1): الطرف الآخر يملأ المشهد والمعاينة الذاتية نافذة صغيرة —
   تجربة فيديو متطابقة تماماً عند الطرفين */
.agora-stage.agora-duo { padding: .85rem; }
.agora-stage.agora-duo .agora-remote-users { display: block; width: 100%; min-height: 400px; height: 100%; padding: 0; }
.agora-stage.agora-duo .agora-remote-tile { width: 100%; height: 100%; min-height: 400px; }
.agora-stage.agora-duo .agora-local-tile { position: absolute; bottom: 1.05rem; left: 1.05rem; z-index: 2; width: 190px; height: 134px; min-height: 0; border-color: rgba(255,255,255,.3); box-shadow: 0 14px 30px rgba(0,0,0,.45); }
.agora-stage.agora-duo .agora-local-tile video { min-height: 0; height: 100%; }
.agora-tile-label { position: absolute; right: .65rem; bottom: .55rem; z-index: 1; display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .5rem; border-radius: 999px; color: #fff; background: rgba(8,20,36,.72); font-size: .68rem; }
.agora-empty-stage { display: grid; place-items: center; align-content: center; gap: .6rem; min-height: 250px; color: rgba(255,255,255,.5); font-size: .75rem; text-align: center; }
.agora-empty-stage i { font-size: 1.8rem; color: #6ed2b2; }
.agora-room-controls { display: flex; justify-content: center; gap: .65rem; padding: 1rem; background: #fff; }
.agora-control { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.65rem; padding: .55rem .85rem; border: 1px solid #dbe5ed; border-radius: 11px; color: #40536b; background: #fff; font-family: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; transition: all .18s ease; }
.agora-control:hover { border-color: #8ac9b6; color: var(--agora-brand); background: #f7fcfa; }
.agora-control.is-off { border-color: #f0caca; color: #a53d3d; background: #fff4f4; }
.agora-control.agora-leave { border-color: #efb8b8; color: #b13d3d; background: #fff6f6; }
.agora-control.agora-leave:hover { color: #fff; background: #b13d3d; }
/* زر مشاركة الشاشة: مميّز عند التفعيل */
.agora-control.is-share { border-color: #0f7b5f; color: #fff; background: #0f7b5f; }
.agora-control.is-share:hover { border-color: #0c6650; color: #fff; background: #0c6650; }
/* زر تكبير شاشة المشاركة (ملء الشاشة): يظهر أعلى يسار بلاطة الشاشة عند مشاركتها */
.agora-fs-btn {
  position: absolute; top: .65rem; left: .65rem; z-index: 5;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .42rem .7rem; border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  color: #fff; background: rgba(8,20,36,.72); backdrop-filter: blur(4px);
  font-family: inherit; font-size: .7rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.25); transition: all .18s ease;
}
.agora-fs-btn:hover { background: #0f7b5f; border-color: #0f7b5f; transform: translateY(-1px); }
.agora-fs-btn.is-active { background: #0f7b5f; border-color: #0f7b5f; }
/* أثناء ملء الشاشة: البلاطة تملأ الشاشة من الحواف إلى الحواف */
.agora-video-tile:fullscreen { background: #0a1526; }
.agora-video-tile:fullscreen video { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.agora-video-tile:-webkit-full-screen { background: #0a1526; width: 100%; height: 100%; }
.agora-video-tile:-webkit-full-screen video { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
@media (max-width: 640px) { .agora-stage { grid-template-columns: 1fr; min-height: 0; } .agora-stage.agora-duo { min-height: 420px; } .agora-stage.agora-duo .agora-remote-tile { min-height: 300px; } .agora-stage.agora-duo .agora-local-tile { width: 132px; height: 96px; } .agora-local-tile { min-height: 180px; order: -1; } .agora-room-controls { flex-wrap: wrap; } .agora-control { flex: 1 1 8rem; } }

/* ===== زر «تكبير» شبكة عقل المؤسسة (ملء الشاشة) ===== */
.brain-fs-btn {
  position: absolute; top: .65rem; left: .65rem; z-index: 15;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .42rem .7rem; border-radius: 999px;
  border: 1px solid rgba(15,123,95,.35);
  color: #fff; background: rgba(15,123,95,.85);
  backdrop-filter: blur(4px);
  font-family: inherit; font-size: .7rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.18); transition: all .18s ease;
}
.brain-fs-btn:hover { background: #0f7b5f; border-color: #0f7b5f; transform: translateY(-1px); }
.brain-fs-btn.is-active { background: #0a5944; border-color: #56c7a1; }
/* ===== أزرار «زوم إن / زوم أوت / ملاءمة» لشبكة عقل المؤسسة ===== */
.brain-zoom-ctl {
  position: absolute; bottom: .75rem; left: .75rem; z-index: 15;
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem; border-radius: 12px;
  background: rgba(27,42,74,.8); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
}
.brain-zoom-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem; border: none; border-radius: 9px;
  background: rgba(255,255,255,.09); color: #fff; cursor: pointer;
  font-size: .8rem; transition: background .15s ease, color .15s ease, transform .15s ease;
}
.brain-zoom-btn:hover { background: #0f7b5f; color: #fff; transform: translateY(-1px); }
.brain-zoom-btn:active { transform: translateY(0); }
#brain-viewport:fullscreen .brain-zoom-ctl,
#brain-viewport:-webkit-full-screen .brain-zoom-ctl { bottom: 1.2rem; left: 1.2rem; }
/* عند ملء الشاشة: اللوحة تملأ الشاشة بالكامل والخلفية تسند الرسم بشكل واضح */
#brain-viewport:fullscreen,
#brain-viewport:-webkit-full-screen {
  width: 100vw !important; height: 100vh !important;
  border-radius: 0;
  background: radial-gradient(1400px 700px at 50% 25%, #ffffff 0%, #f6f2e9 60%, #efe8da 100%) !important;
}
#brain-viewport:fullscreen .brain-fs-btn,
#brain-viewport:-webkit-full-screen .brain-fs-btn { top: 1.1rem; left: 1.1rem; }

/* ===== الشريط الجانبي: تحسينات التنقل (Sidebar enhancements) ===== */
.app-sidebar, .mobile-sidebar {
  background: linear-gradient(180deg, #1B2A4A 0%, #16233d 100%);
}
/* عنوان القسم داخل القائمة */
.app-sidebar .nav-section-title,
.mobile-sidebar .nav-section-title {
  display: flex; align-items: center; gap: .5rem;
  margin-top: .35rem;
  font-size: .68rem; font-weight: 800;
  color: rgba(255,255,255,.45);
  letter-spacing: .04em;
  padding: .55rem .9rem .35rem;
}
.app-sidebar .nav-section-title::after,
.mobile-sidebar .nav-section-title::after {
  content: ""; flex: 1; height: 1px;
  background: rgba(255,255,255,.08);
}
/* روابط التنقل: صف كامل، محاذاة يمين RTL، حالات واضحة */
.app-sidebar .nav-link,
.mobile-sidebar .nav-link {
  display: flex; align-items: center; gap: .65rem;
  width: 100%;
  padding: .6rem .9rem;
  margin-bottom: .15rem;
  border-radius: 12px;
  color: #c9d4e6;
  font-size: .88rem; font-weight: 500;
  text-align: right;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.app-sidebar .nav-link i,
.mobile-sidebar .nav-link i {
  width: 1.1rem; text-align: center;
  font-size: .85rem; color: #7f92b5;
  transition: color .15s ease;
}
.app-sidebar .nav-link:hover,
.mobile-sidebar .nav-link:hover {
  background: rgba(255,255,255,.09);
  color: #fff;
  transform: translateX(-2px);
}
.app-sidebar .nav-link:hover i,
.mobile-sidebar .nav-link:hover i { color: #fff; }
.app-sidebar .nav-link.active,
.mobile-sidebar .nav-link.active {
  background: linear-gradient(90deg, rgba(15,123,95,.9), rgba(15,123,95,.65));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(15,123,95,.35);
}
.app-sidebar .nav-link.active i,
.mobile-sidebar .nav-link.active i { color: #fff; }
/* قسم «عقل المؤسسة» — بارز ومميز في أعلى القائمة */
.app-sidebar .nav-section-brain,
.mobile-sidebar .nav-section-brain { margin-bottom: .55rem; }
.app-sidebar .nav-section-brain .nav-section-title,
.mobile-sidebar .nav-section-brain .nav-section-title { color: rgba(86,199,161,.95); }
.app-sidebar .nav-section-brain .nav-section-title::after,
.mobile-sidebar .nav-section-brain .nav-section-title::after { background: linear-gradient(90deg, rgba(86,199,161,.55), rgba(86,199,161,.05)); }
.app-sidebar .nav-section-brain .nav-link,
.mobile-sidebar .nav-section-brain .nav-link {
  background: linear-gradient(90deg, rgba(54,180,145,.16), rgba(54,180,145,.05));
  border: 1px solid rgba(86,199,161,.28);
  color: #dff5ec;
  margin-bottom: .3rem;
}
.app-sidebar .nav-section-brain .nav-link i,
.mobile-sidebar .nav-section-brain .nav-link i { color: #56c7a1; }
.app-sidebar .nav-section-brain .nav-link:hover,
.mobile-sidebar .nav-section-brain .nav-link:hover {
  background: linear-gradient(90deg, rgba(54,180,145,.30), rgba(54,180,145,.10));
  border-color: rgba(86,199,161,.55);
  color: #fff;
}
.app-sidebar .nav-section-brain .nav-link:hover i,
.mobile-sidebar .nav-section-brain .nav-link:hover i { color: #fff; }
.app-sidebar .nav-section-brain .nav-link.active,
.mobile-sidebar .nav-section-brain .nav-link.active {
  background: linear-gradient(90deg, rgba(15,123,95,.95), rgba(15,123,95,.7));
  border-color: #56c7a1;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(15,123,95,.45);
}
/* شريط تمرير أنيق للقائمة */
.app-sidebar nav::-webkit-scrollbar,
.mobile-sidebar nav::-webkit-scrollbar { width: 5px; }
.app-sidebar nav::-webkit-scrollbar-thumb,
.mobile-sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 6px; }
/* زر تسجيل الخروج */
.app-sidebar #logout-btn-desktop,
.mobile-sidebar #logout-btn-mobile { color: #f3b8b0; }
.app-sidebar #logout-btn-desktop:hover,
.mobile-sidebar #logout-btn-mobile:hover { background: rgba(179,56,44,.25); color: #ffd9d4; }
/* قائمة فريق العمل */
#team-roster a, #team-roster-mobile a {
  display: flex; align-items: center; gap: .5rem;
  padding: .35rem .6rem; border-radius: 10px;
  color: #c9d4e6; font-size: .78rem;
  transition: background .15s ease;
}
#team-roster a:hover, #team-roster-mobile a:hover { background: rgba(255,255,255,.08); color: #fff; }

/* محرر HTML الغني في الديوانية (شريط الأدوات + حقل المحتوى + عرض المشاركات) */
.rich-toolbar {
  display: flex; align-items: center; gap: .25rem; flex-wrap: wrap;
  background: #faf6ec; border: 1px solid #e8dfc8; border-bottom: none;
  border-radius: 12px 12px 0 0; padding: .4rem .6rem;
}
.rich-toolbar .btn { min-width: 2rem; padding: .3rem .5rem; border-radius: 8px; }
.rich-toolbar .btn:hover { background: #eef1f6; }
.rich-editor {
  min-height: 7rem; overflow-y: auto; text-align: right; line-height: 1.9;
  border-top-left-radius: 0; border-top-right-radius: 0;
}
.rich-editor:focus { border-color: #3a9d83; box-shadow: 0 0 0 4px rgba(58,157,131,.12); }
.rich-editor:empty::before { content: attr(data-placeholder); color: #a1adbd; pointer-events: none; }
.rich-body { line-height: 1.9; word-break: break-word; }
.rich-body h3 { font-size: 1.15rem; font-weight: 700; color: #1B2A4A; margin: 1rem 0 .4rem; }
.rich-body blockquote {
  border-right: 3px solid #c7bfa8; background: #faf6ec; padding: .5rem .9rem;
  border-radius: 8px; margin: .6rem 0; color: #5b5541;
}
.rich-body ul, .rich-body ol { padding-right: 1.4rem; margin: .4rem 0; }
.rich-body li { margin: .2rem 0; }
.rich-body b, .rich-body strong { color: #1B2A4A; }

/* ==========================================================================
   مكالمات الموظفين: شاشة المكالمة الواردة (رنين) + شاشة انتظار المتصل
   ========================================================================== */
.call-overlay {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 21, 38, 0.72); backdrop-filter: blur(6px);
  animation: call-fade .25s ease;
}
@keyframes call-fade { from { opacity: 0 } to { opacity: 1 } }
.call-card {
  background: #ffffff; border-radius: 28px; padding: 2.2rem 2.6rem;
  box-shadow: 0 24px 70px rgba(12,21,38,.45); text-align: center;
  max-width: 92vw; width: 340px; animation: call-pop .3s ease;
}
@keyframes call-pop { from { transform: scale(.9); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.call-avatar {
  width: 96px; height: 96px; margin: 0 auto 1rem; border-radius: 50%;
  background: linear-gradient(135deg, #1B2A4A, #3a6693); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 2.2rem;
  overflow: hidden; box-shadow: 0 0 0 5px rgba(27,42,74,.12);
  animation: call-pulse 1.6s ease-in-out infinite;
}
@keyframes call-pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(27,42,74,.12); }
  50% { box-shadow: 0 0 0 16px rgba(27,42,74,.05); }
}
.call-name { font-size: 1.25rem; font-weight: 800; color: #131f38; margin-bottom: .2rem; }
.call-status { font-size: .82rem; color: #3a6693; margin-bottom: 1.6rem; }
.call-buttons { display: flex; justify-content: center; gap: 2.5rem; }
.call-btn {
  width: 62px; height: 62px; border-radius: 50%; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.35rem; color: #fff; transition: transform .15s ease, box-shadow .15s ease;
}
.call-btn:hover { transform: scale(1.08); }
.call-btn-answer { background: #0F7B5F; box-shadow: 0 8px 24px rgba(15,123,95,.4); }
.call-btn-answer:hover { background: #0a5240; }
.call-btn-reject { background: #b3382c; box-shadow: 0 8px 24px rgba(179,56,44,.4); transform: rotate(135deg); }
.call-btn-reject:hover { background: #8f2c22; }
.call-btn-reject i { transform: rotate(-135deg); }

/* شاشة انتظار المتصل */
.call-waiting {
  position: fixed; top: 18px; right: 50%; transform: translateX(50%); z-index: 75;
  display: flex; align-items: center; gap: .8rem; max-width: 92vw;
  background: #fff; border: 1px solid #ece4d2; border-radius: 16px;
  padding: .7rem 1rem; box-shadow: 0 12px 40px rgba(12,21,38,.18);
}
.call-waiting .ring-dots {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: #1B2A4A; color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: .95rem;
}

/* أوسمة الموظفين — ألوان إضافية (تحتاجها شارات الوسام) */
.badge-gold { background: #fdf3d7; color: #7a5f10; }
.badge-emerald { background: #d1f2ea; color: #075e4e; }
.badge-sky { background: #dff1fb; color: #155e8a; }
.badge-violet { background: #ece7fc; color: #5b3f9e; }
.badge-pink { background: #fde7f1; color: #9e3a6b; }
