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

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

.card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(19,26,36,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: #131A24; color: #fff; }
.btn-primary:hover { background: #0D1219; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-emerald { background: #0F6B52; color: #fff; }
.btn-emerald:hover { background: #0A5741; }
.btn-amber { background: #D9911F; color: #fff; }
.btn-danger { background: #b3382c; color: #fff; }
.btn-outline { background: #fff; color: #131A24; border: 1px solid #DCE0E6; }
.btn-outline:hover { background: #EFF1F4; }
.btn-ghost { background: transparent; color: #131A24; }
.btn-ghost:hover { background: #EFF1F4; }
.btn-sm { padding: .4rem .8rem; font-size: .825rem; }
.btn-block { width: 100%; }

.assistant-messages {
  max-height: 260px;
  overflow-y: auto;
  background: #fdfeff;
}
.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: #E6F2EE;
  color: #0A5741;
  border-bottom-right-radius: .2rem;
}
.assistant-message-user {
  margin-right: auto;
  background: #EFF1F4;
  color: #131A24;
  border-bottom-left-radius: .2rem;
}
.assistant-suggestion {
  border: 1px solid #C2E0D6;
  border-radius: 999px;
  background: #fff;
  color: #0F6B52;
  padding: .35rem .7rem;
  font-size: .75rem;
  cursor: pointer;
  transition: background-color .15s ease;
}
.assistant-suggestion:hover { background: #E6F2EE; }

.team-direct-chat-messages {
  max-height: 360px;
  min-height: 180px;
  overflow-y: auto;
  padding: .75rem;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  background: #fdfeff;
}
.team-direct-message {
  width: fit-content;
  max-width: 88%;
  margin: 0 auto .7rem 0;
  padding: .65rem .8rem;
  border-radius: 12px 12px 12px 3px;
  background: #EFF1F4;
  color: #131A24;
  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: #E6F2EE;
  color: #0A5741;
}
.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: #535A66; font-size: .75rem; font-weight: 700; text-align: center; margin-bottom: .5rem; }
.calendar-day {
  min-height: 9.5rem; border: 1px solid #E5E7EB; 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: #131A24; box-shadow: 0 0 0 2px rgba(19,26,36,.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: #4a5568; }
.calendar-day-today .calendar-day-number { background: #131A24; color: #fff; }
.calendar-day-add { width: 1.7rem; height: 1.7rem; border-radius: .45rem; }
.calendar-day-add:hover { background: #EFF1F4; }
.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: #EFF1F4; color: #131A24; 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: #D9911F; background: #fbf0dc; }
.calendar-task-done { border-right-color: #0F6B52; background: #E6F2EE; color: #0A5741; text-decoration: line-through; }
.calendar-quick-input { width: 100%; margin-top: .45rem; border: 1px dashed #D3D7DD; border-radius: .4rem; padding: .3rem .4rem; font-family: inherit; font-size: .68rem; outline: none; background: #fdfeff; }
.calendar-quick-input:focus { border-color: #131A24; box-shadow: 0 0 0 2px rgba(19,26,36,.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: #131A24;
  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(21,122,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 #0F6B52; padding-right: .75rem; color: #4a5568; }
.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 #E5E7EB; border-radius: 14px; padding: 1rem; background: #fbfdff; }
.field-drag-handle { color: #b4aa94; cursor: grab; }
.form-public-link { display: flex; align-items: center; gap: .55rem; border: 1px solid #C2E0D6; border-radius: 12px; padding: .45rem .6rem .45rem .45rem; background: #E6F2EE; color: #0A5741; 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(19,26,36,.1); }
.mindmap-toolbar { align-items: center; }
.mindmap-help { color: #5B6472; 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 #D3D7DD; border-radius: 16px; background-color: #fbfdff; 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(21,122,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(19,26,36,.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: #D9911F; box-shadow: 0 0 0 4px rgba(217,145,31,.22), 0 8px 18px rgba(19,26,36,.16); }
.mindmap-inspector { min-height: 270px; }
.mindmap-divider { width: 1px; height: 1.5rem; background: #E5E7EB; 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 #D3D7DD; border-radius: 7px; padding: .3rem .45rem; color: #535A66; font-size: .7rem; background: #fff; }
.mindmap-shape-btn.active, .mindmap-shape-btn:hover { color: #0F6B52; border-color: #0F6B52; background: #E6F2EE; }
.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 #D9911F; 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 #E5E7EB; border-top: 4px solid var(--project-accent, #0F6B52); border-radius: 14px; background: #fbfdff; 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: #4a5568; background: #F4F5F7; font-size: .75rem; }
.project-icon-btn:hover { background: #EFF1F4; color: #131A24; }
.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: #e8edf5; text-align: center; font-size: .68rem; }
.personal-project-column-dropzone { min-height: 150px; padding: .45rem; border-radius: .7rem; background: #F4F5F7; border: 1px dashed #D3D7DD; transition: background .15s, border-color .15s; }
.personal-project-column-dropzone.is-dragover { background: #E6F2EE; border-color: #0F6B52; }
.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(19,26,36,.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: #131A24; 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: #5B6472; font-size: .68rem; }
.personal-project-task footer button:hover { background: #EFF1F4; color: #131A24; }
.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: #8A5C0C; }
.project-priority-low { background: #e2ecfb; color: #1e4d8f; }
.personal-projects-empty { display: grid; justify-items: center; gap: .55rem; padding: 1.5rem; color: #5B6472; text-align: center; }
.personal-projects-empty > i { color: #0F6B52; 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 #E5E7EB; background: #fbfdff; }
.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 #D3D7DD; border-radius: .65rem; padding: .45rem .65rem; color: #4a5568; background: #fff; cursor: pointer; font-size: .78rem; transition: all .15s ease; }
.drawing-tool:hover, .drawing-tool.active { color: #0F6B52; border-color: #0F6B52; background: #E6F2EE; box-shadow: 0 0 0 2px rgba(21,122,95,.08); }
.drawing-toolbar-divider { width: 1px; height: 1.7rem; background: #E5E7EB; }
.drawing-control { display: flex; min-width: 0; flex-direction: column; align-items: stretch; gap: .3rem; color: #4a5568; font-size: .78rem; font-weight: 600; }
.drawing-control input[type="color"] { width: 2rem; height: 2rem; padding: 0; border: 1px solid #D3D7DD; 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: #0F6B52; }
.drawing-size-control output { min-width: 2.4rem; color: #5B6472; font-weight: 400; }
.drawing-hint { margin-right: auto; color: #5B6472; font-size: .75rem; }
.drawing-canvas-wrap { position: relative; width: 100%; min-height: 420px; padding: .75rem; background: #e8edf5; }
#drawing-canvas { display: block; width: 100%; height: auto; min-height: 420px; border: 1px solid #D3D7DD; border-radius: .7rem; background: #fff; cursor: crosshair; touch-action: none; box-shadow: 0 3px 12px rgba(19,26,36,.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: #e8edf5; border-radius: .9rem; overflow: auto; }
#studio-canvas { display: block; width: 100%; height: auto; min-height: 420px; background: #fff; border: 1px solid #D3D7DD; border-radius: .7rem; cursor: crosshair; touch-action: none; box-shadow: 0 3px 12px rgba(19,26,36,.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 #D3D7DD; border-radius: .5rem; padding: .4rem; background: #fff; color: #4a5568; font-size: .75rem; cursor: pointer; transition: all .15s ease; }
.studio-tool.active, .studio-tool:hover { color: #0F6B52; border-color: #0F6B52; background: #E6F2EE; }
@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: #5B6472; font-size: .72rem; background: #fbfdff; }
@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 #E5E7EB; background: #E6F2EE; }
.drawing-image-tools-label { display: inline-flex; align-items: center; color: #0F6B52; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.drawing-image-tools .drawing-control { min-width: 130px; }
.drawing-image-tools-hint { color: #5B6472; font-size: .72rem; }
@media (max-width: 640px) { .drawing-image-tools-hint { width: 100%; order: 8; } }

.input {
  width: 100%; border: 1px solid #D3D7DD; border-radius: 10px; padding: .6rem .85rem;
  background: #fff; font-family: inherit; font-size: .925rem; outline: none; transition: border-color .15s;
}
.input:focus { border-color: #131A24; box-shadow: 0 0 0 3px rgba(19,26,36,.08); }
.input-sm { width: auto; padding: .35rem .6rem; font-size: .8rem; border-radius: 8px; }
.label { display: block; font-size: .8rem; color: #4a5568; 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: #E6F2EE; color: #0A5741; }
.badge-amber { background: #fbf0dc; color: #8A5C0C; }
.badge-red { background: #fbe6e3; color: #8f2a1f; }
.badge-blue { background: #e2ecfb; color: #1e4d8f; }
.badge-gray { background: #e8edf5; color: #535A66; }

.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.status-dot.online { background: #0F6B52; box-shadow: 0 0 0 3px rgba(21,122,95,.18); }
.status-dot.paused { background: #D9911F; box-shadow: 0 0 0 3px rgba(217,145,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,26,36,.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: #535A66; font-size: .85rem;
  transition: background .15s ease, color .15s ease;
}
.modal-close:hover { background: #e4eaf3; color: #131A24; }

/* نافذة الإشعار المنبثقة (تم الاطلاع): سقف ارتفاع لمنطقة النص يحافظ على ظهور
   أزرار الإغلاق «تم الاطلاع / فتح الرابط / 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: #131A24; 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: #0F6B52; }
.toast.error { background: #b3382c; }
.toast.warn { background: #D9911F; }

/* تنبيه الصلاة: يبقى ظاهراً حتى يقرأه المستخدم ويغلقه بنفسه */
.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: #0F6B52;
  color: #fff;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 16px;
  padding: .8rem 1rem;
  box-shadow: 0 12px 30px rgba(21,122,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: #DCE0E6; 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: #535A66; font-weight: 600; border-bottom: 2px solid #E5E7EB; white-space: nowrap; }
.table-clean td { padding: .6rem .75rem; border-bottom: 1px solid #f1ebdc; white-space: nowrap; }
.table-clean tr:hover td { background: #FAFAFB; }

.skeleton { background: linear-gradient(90deg, #E5E7EB 25%, #F4F5F7 50%, #E5E7EB 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%, #EFF1F4 100%); }
.blog-hero-icon { width: 3.5rem; height: 3.5rem; border-radius: 1.1rem; background: #131A24; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.blog-eyebrow { color: #0F6B52; font-weight: 700; font-size: 1rem; margin-bottom: .2rem; }
.blog-title { color: #0D1219; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.25; font-weight: 700; }
.blog-lead { color: #1F2A38; font-size: 1.15rem; line-height: 1.9; max-width: 48rem; margin-top: .4rem; }
.blog-section-title { color: #0D1219; font-size: 1.35rem; line-height: 1.5; font-weight: 700; }
.blog-input { font-size: 1rem; min-height: 3rem; }
.blog-pill { border: 1px solid #DCE0E6; background: #fff; color: #2a4d75; border-radius: 999px; padding: .55rem .9rem; font-size: .95rem; transition: all .15s ease; }
.blog-pill:hover, .blog-pill:focus { background: #EFF1F4; 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(19,26,36,.1); }
.blog-card-title { color: #0D1219; font-size: 1.35rem; line-height: 1.65; font-weight: 700; }
.blog-card-excerpt { color: #1F2A38; font-size: 1.05rem; line-height: 1.9; margin-top: .65rem; min-height: 3.8rem; }
.blog-read-more { display: inline-block; color: #0F6B52; font-size: 1rem; font-weight: 700; margin-top: 1rem; }
.blog-article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; color: #535A66; font-size: .95rem; }
.blog-article-title { color: #0D1219; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.5; font-weight: 700; margin-top: 1.2rem; }
.blog-article-excerpt { color: #1F2A38; font-size: 1.2rem; line-height: 2; border-right: 4px solid #0F6B52; 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 #131A24; }

@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: #131A24;
  --ui-muted: #64748B;
  --ui-border: #E6E9EE;
  --ui-surface: #ffffff;
  --ui-surface-soft: #FAFAFB;
  --ui-brand: #0F6B52;
  --ui-brand-dark: #0A5741;
  --ui-shadow: 0 10px 30px rgba(13,18,25, .06);
  --ui-shadow-hover: 0 16px 36px rgba(13,18,25, .11);
}

html { scroll-behavior: smooth; }
/* 2026-10-01 «المحاولة الثانية» — قرار مُوثَّق كي لا يُعاد الخطأ:
   جرّبتُ تحويل الخلفية العامة إلى النيلي الداكن (فرق 83% أي مرئي قطعاً)، لكن
   عناوين الصفحات الداخلية تُعرَض خارج البطاقات مباشرة على هذه الخلفية — مثال:
     views-points.js / views-manager.js / views-reminders.js /
     views-social-admin.js / views-employee.js:
     <h1 class="text-xl font-bold text-night-800"> داخل <div class="fade-in space-y-5">
   و text-night-800 = #0D1219 حبر داكن جداً؛ على خلفية نيلية داكنة يصبح غير مقروء.
   لذلك تراجعتُ عن داكن الخلفية وأبقيتُ السطح فاتحاً #F4F5F7 كما كان.
   التغيير المرئي يأتي من ثلاثة مواضع آمنة (لا يمسّ أيّ منها تباين النصوص):
     1) شاشة الدخول — خلفية نيلية داكنة (فرق 83%) وكل نصوصها أبيض.
     2) الأزرار الأساسية — زمردي الهوية (فرق 18.4%) وتباين النص 4.71:1 (WCAG AA).
     3) عنصر القائمة النشِط — كتلة زمردية صريحة (فرق 20.8%). */
body {
  color: var(--ui-ink);
  background: #F4F5F7 !important;
  letter-spacing: -.005em;
}

.app-shell { background: #F4F5F7 !important; }
.app-sidebar {
  background: linear-gradient(180deg, #131A24 0%, #0D1219 100%) !important;
  box-shadow: 8px 0 30px rgba(19, 26, 36, .10);
}
.app-sidebar .nav-link,
.mobile-sidebar .nav-link { border-radius: 12px; margin-bottom: .18rem; }
/* 2026-10-01: العنصر النشط صار كتلة زمردية صريحة بدل شفافية 26% باهتة —
   الفرق 20.8% مرئي. #157A5F يشمل النص الأبيض بتباين 4.71:1. */
.app-sidebar .nav-link.active,
.mobile-sidebar .nav-link.active {
  background: linear-gradient(90deg, #157A5F 0%, #0F6B52 60%, #0A5741 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #4FA98D, 0 6px 20px rgba(15,107,82, .38);
}
.app-sidebar .nav-link:hover,
.mobile-sidebar .nav-link:hover { background: rgba(255,255,255,.10); }

/* 2026-10-01: خط زمردي رفيع أسفل الشريط العلوي — لمسة هوية ظاهرة في كل شاشة
   ولا تمسّ أيّ تباين نصّي (خط زخرفي فقط). */
.app-topbar {
  background: rgba(255,255,255,.92) !important;
  border-bottom: 1px solid var(--ui-border) !important;
  box-shadow: inset 0 -2px 0 rgba(15,107,82,.30), 0 4px 18px rgba(19,26,36,.04);
  backdrop-filter: blur(14px);
}
.app-topbar .btn-ghost { color: var(--ui-muted); }
.app-topbar .btn-ghost:hover { color: var(--ui-ink); background: #edf3fa; }

#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: 20px;
  box-shadow: 0 1px 2px rgba(13,18,25,.04), 0 10px 28px rgba(13,18,25,.06);
  transition: box-shadow .22s ease, border-color .22s ease, transform .22s ease;
}
.card:hover { border-color: #D0D4DA; box-shadow: 0 2px 4px rgba(13,18,25,.05), 0 16px 38px rgba(13,18,25,.10); }

.btn { min-height: 2.7rem; border-radius: 13px; box-shadow: 0 2px 5px rgba(13,18,25,.05); letter-spacing: 0; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(13,18,25,.14); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 5px rgba(13,18,25,.08); }
/* حلقة تركيز واضحة للوصولية: تظهر عند التنقل بلوحة المفاتيح فقط */
.btn:focus-visible, .input:focus-visible, .nav-link:focus-visible,
.modal-close:focus-visible, a:focus-visible {
  outline: 3px solid rgba(15,107,82,.55); outline-offset: 2px; border-radius: 12px;
}
/* 2026-10-01: الزر الأساسي بلون الهوية (زمردي) بدل النيلي الداكن —
   الفرق 18.4% مرئي بوضوح. تباين النص الأبيض على الزمردي = 4.71:1 (WCAG AA). */
.btn-primary { background: linear-gradient(135deg, #157A5F, #0F6B52); }
.btn-primary:hover { background: linear-gradient(135deg, #0F6B52, #0A5741); }
.btn-emerald { background: linear-gradient(135deg, #157A5F, #0F6B52); }
.btn-emerald:hover { background: linear-gradient(135deg, #0F6B52, #0A5741); }
.btn-amber { background: linear-gradient(135deg, #E09B2B, #C07F14); }
.btn-danger { background: linear-gradient(135deg, #D2554A, #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: #D8DCE2; }

.input, select.input, textarea.input {
  border-color: #DCE0E6;
  border-radius: 13px;
  min-height: 2.75rem;
  color: var(--ui-ink);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: #A8B0BC; }
.input:hover { border-color: #CCD1D8; }
.input:focus, select.input:focus, textarea.input:focus { border-color: #0F6B52; box-shadow: 0 0 0 4px rgba(15,107,82,.16); outline: none; }
.label { color: #4d5d74; letter-spacing: 0; font-weight: 700; }

.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(19,26,36,.035); }
.table-clean tbody td { border-bottom: 1px solid #F0F2F5; }
.table-clean tbody tr:first-child td:first-child,
.table-clean tbody tr:first-child td:last-child { border-top: 1px solid #F0F2F5; }
.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(19, 26, 36, .62); backdrop-filter: blur(7px); }
.modal-box { border: 1px solid rgba(255,255,255,.7); border-radius: 22px; box-shadow: 0 24px 70px rgba(19,26,36,.24); }
.toast { border: 1px solid rgba(255,255,255,.15); border-radius: 14px; box-shadow: 0 12px 30px rgba(19,26,36,.18); }

#points-balance-badge { box-shadow: 0 3px 10px rgba(217,145,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, #131A24 0%, #0F6B52 56%, #157A5F 100%);
  box-shadow: 0 18px 42px rgba(15,107,82,.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: #D9911F;
  box-shadow: 0 0 0 8px rgba(217,145,31,.12), 0 0 24px rgba(217,145,31,.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: #8FC7B6; box-shadow: 0 0 0 7px rgba(143,199,182,.12), 0 0 20px rgba(143,199,182,.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 #DCE0E6;
  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: #0F6B52; border-color: #8FC7B6; background: #E6F2EE; transform: translateY(-1px); }
.padlet-filter.is-active { color: #fff; border-color: #0F6B52; background: linear-gradient(135deg, #157A5F, #0F6B52); box-shadow: 0 5px 14px rgba(15,107,82,.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(19,26,36,.08);
  border-top: 4px solid var(--padlet-accent, #157A5F);
  border-radius: 18px;
  background: var(--padlet-bg, #fff);
  box-shadow: 0 7px 20px rgba(19,26,36,.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, #157A5F); opacity: .09; pointer-events: none; }
.padlet-card:hover { transform: translateY(-4px) rotate(.15deg); border-color: color-mix(in srgb, var(--padlet-accent, #157A5F) 45%, #fff); box-shadow: 0 16px 30px rgba(19,26,36,.12); }
.padlet-card-mint { --padlet-bg: #E6F2EE; --padlet-accent: #4FA98D; }
.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(19,26,36,.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(15,107,82,.16); border-radius: 12px; color: #0F6B52; 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: #0F6B52; background: #fff; border-color: #8FC7B6; 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: #0F6B52; background: #E6F2EE; border-color: #8FC7B6; }
.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: #0F6B52; --heygen-ink: #131A24; }
.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, #131A24, #0F6B52 65%, #157A5F); box-shadow: 0 18px 42px rgba(15,107,82,.18); }
.heygen-hero-copy { position: relative; z-index: 1; max-width: 720px; }
.heygen-kicker { display: inline-flex; gap: .45rem; align-items: center; color: #C2E0D6; 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, #157A5F, #0F6B52); 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 #E6E9EE; border-radius: 14px; background: #FAFAFB; }
.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: #8FC7B6; transform: translateY(-3px); box-shadow: 0 10px 23px rgba(19,26,36,.1); }
.heygen-avatar-card.is-selected { border: 2px solid #0F6B52; box-shadow: 0 0 0 3px rgba(15,107,82,.13); }
.heygen-avatar-photo { display: grid; place-items: center; height: 132px; overflow: hidden; color: #7b9b9d; background: linear-gradient(145deg, #E6F2EE, #EEF1F5); }
.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: #0F6B52; }
.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: #0F6B52; 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: #8FC7B6; background: #E6F2EE; }
.heygen-voice-chip.is-selected { border-color: #0F6B52; background: #E6F2EE; box-shadow: 0 0 0 2px rgba(15,107,82,.1); }
.heygen-voice-icon { display: grid; place-items: center; flex: 0 0 2.2rem; height: 2.2rem; border-radius: .65rem; color: #0F6B52; background: #E6F2EE; }
.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 #8FC7B6; border-radius: 10px; color: #65758a; background: #E6F2EE; font-size: .75rem; }
.heygen-selected-summary i { color: #0F6B52; }
.heygen-info-box { display: flex; align-items: center; gap: .5rem; min-height: 2.7rem; padding: .6rem .8rem; border-radius: 11px; color: #66768b; background: #FAFAFB; font-size: .75rem; }
.heygen-info-box i { color: #0F6B52; }
.heygen-upload-zone { display: grid; place-items: center; gap: .35rem; min-height: 8.5rem; padding: 1.1rem; border: 1.5px dashed #8FC7B6; border-radius: 16px; color: #61748b; background: #E6F2EE; cursor: pointer; text-align: center; transition: all .18s ease; }
.heygen-upload-zone:hover, .heygen-upload-zone.is-dragover { border-color: #0F6B52; color: #0F6B52; background: #E6F2EE; }
.heygen-upload-zone > i { color: #0F6B52; 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 #C2E0D6; border-radius: 12px; background: #E6F2EE; }
.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: #0F6B52; background: #E6F2EE; }
.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 #DCE0E6; border-radius: 14px; color: #8b98a9; font-size: .78rem; text-align: center; }
.heygen-loading i, .heygen-empty i { color: #0F6B52; 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: #131A24; --agora-brand: #0F6B52; --agora-soft: #E6F2EE; 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, #131A24, #0F6B52); }
.agora-room-kicker { display: inline-flex; align-items: center; gap: .4rem; color: #C2E0D6; 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: #FAFAFB; font-size: .75rem; }
.agora-room-status.success { color: #0A5741; background: #E6F2EE; }
.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(13,18,25,.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: #8FC7B6; }
.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: #8FC7B6; color: var(--agora-brand); background: #E6F2EE; }
.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: #0F6B52; color: #fff; background: #0F6B52; }
.agora-control.is-share:hover { border-color: #0A5741; color: #fff; background: #0A5741; }
/* زر تكبير شاشة المشاركة (ملء الشاشة): يظهر أعلى يسار بلاطة الشاشة عند مشاركتها */
.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(13,18,25,.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: #0F6B52; border-color: #0F6B52; transform: translateY(-1px); }
.agora-fs-btn.is-active { background: #0F6B52; border-color: #0F6B52; }
/* أثناء ملء الشاشة: البلاطة تملأ الشاشة من الحواف إلى الحواف */
.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(21,122,95,.35);
  color: #fff; background: rgba(21,122,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: #0F6B52; border-color: #0F6B52; transform: translateY(-1px); }
.brain-fs-btn.is-active { background: #0A5741; border-color: #157A5F; }
/* ===== أزرار «زوم إن / زوم أوت / ملاءمة» لشبكة عقل المؤسسة ===== */
.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(19,26,36,.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: #0F6B52; 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%, #F0F2F5 60%, #E8EBEF 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, #131A24 0%, #0D1219 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: #D0D4DA;
  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(21,122,95,.95), rgba(21,122,95,.62));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(21,122,95,.40);
}
.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(79,169,141,.95); }
.app-sidebar .nav-section-brain .nav-section-title::after,
.mobile-sidebar .nav-section-brain .nav-section-title::after { background: linear-gradient(90deg, rgba(79,169,141,.55), rgba(79,169,141,.05)); }
.app-sidebar .nav-section-brain .nav-link,
.mobile-sidebar .nav-section-brain .nav-link {
  background: linear-gradient(90deg, rgba(79,169,141,.16), rgba(79,169,141,.05));
  border: 1px solid rgba(79,169,141,.28);
  color: #E6F2EE;
  margin-bottom: .3rem;
}
.app-sidebar .nav-section-brain .nav-link i,
.mobile-sidebar .nav-section-brain .nav-link i { color: #157A5F; }
.app-sidebar .nav-section-brain .nav-link:hover,
.mobile-sidebar .nav-section-brain .nav-link:hover {
  background: linear-gradient(90deg, rgba(79,169,141,.30), rgba(79,169,141,.10));
  border-color: rgba(79,169,141,.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(21,122,95,.95), rgba(21,122,95,.7));
  border-color: #157A5F;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(21,122,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: #D0D4DA; 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: #faf7ee; 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: #EFF1F4; }
.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: #0F6B52; box-shadow: 0 0 0 4px rgba(21,122,95,.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: #131A24; margin: 1rem 0 .4rem; }
.rich-body blockquote {
  border-right: 3px solid #CCD1D8; background: #faf7ee; padding: .5rem .9rem;
  border-radius: 8px; margin: .6rem 0; color: #4a5568;
}
.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: #131A24; }

/* ==========================================================================
   مكالمات الموظفين: شاشة المكالمة الواردة (رنين) + شاشة انتظار المتصل
   ========================================================================== */
.call-overlay {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13,18,25, 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(13,18,25,.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, #131A24, #1F2A38); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 2.2rem;
  overflow: hidden; box-shadow: 0 0 0 5px rgba(19,26,36,.12);
  animation: call-pulse 1.6s ease-in-out infinite;
}
@keyframes call-pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(19,26,36,.12); }
  50% { box-shadow: 0 0 0 16px rgba(19,26,36,.05); }
}
.call-name { font-size: 1.25rem; font-weight: 800; color: #0D1219; margin-bottom: .2rem; }
.call-status { font-size: .82rem; color: #1F2A38; 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: #0F6B52; box-shadow: 0 8px 24px rgba(21,122,95,.4); }
.call-btn-answer:hover { background: #0A5741; }
.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 #E5E7EB; border-radius: 16px;
  padding: .7rem 1rem; box-shadow: 0 12px 40px rgba(13,18,25,.18);
}
.call-waiting .ring-dots {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: #131A24; color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: .95rem;
}

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

/* ==========================================================================
   «الروابط الهامّة لكل موظف» — تصنيف رئيسي وتحته أزرار الروابط
   اللون الأساسي لكل بطاقة يأتي من متغيّر --cat-accent الذي تُمرّره الواجهة
   من قيمة التصنيف المخزّنة، فتتلوّن البطاقة كلها بلون اختاره الموظف نفسه.
   ========================================================================== */

/* شبكات العرض */
.link-dash-grid { display: grid; gap: 1rem; }
.link-cat-grid-page { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }

/* بطاقة التصنيف */
.link-cat-card {
  background: #fff; border: 1px solid var(--ui-border, #E5E7EB);
  border-radius: 18px; padding: 1rem; position: relative; overflow: hidden;
  border-top: 4px solid var(--cat-accent, #0F6B52);
  box-shadow: 0 1px 2px rgba(13,18,25,.04), 0 8px 22px rgba(13,18,25,.05);
  transition: box-shadow .22s ease, transform .22s ease;
}
.link-cat-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(13,18,25,.05), 0 16px 34px rgba(13,18,25,.10); }

/* رأس البطاقة: أيقونة ملوّنة + العنوان + أدوات المالك */
.link-cat-head { display: flex; align-items: flex-start; gap: .7rem; margin-bottom: .85rem; }
.link-cat-icon {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--cat-accent, #0F6B52); color: #fff; font-size: 1.05rem;
}
.link-cat-titles { min-width: 0; flex: 1; }
.link-cat-title { font-weight: 700; color: #131A24; font-size: 1rem; line-height: 1.35; }
.link-cat-meta { font-size: .75rem; color: #6b7280; margin-top: .15rem; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }

/* شارة نطاق التصنيف: مشترك للجميع أم خاص بصاحبه */
.link-scope-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .45rem; border-radius: 999px; font-size: .68rem; font-weight: 700; }
.link-scope-shared { background: #e2ecfb; color: #1e4d8f; }
.link-scope-personal { background: #E6F2EE; color: #0A5741; }

/* أدوات المالك (إضافة/تعديل/حذف) */
.link-cat-tools { display: flex; align-items: center; gap: .2rem; flex-shrink: 0; }
.link-tool-btn {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid #E5E7EB;
  background: #fff; color: #535A66; display: inline-flex; align-items: center;
  justify-content: center; font-size: .78rem; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.link-tool-btn:hover { background: #EFF1F4; color: #131A24; border-color: #D0D4DA; }
.link-tool-danger:hover { background: #fbe6e3; color: #8f2a1f; border-color: #f0c9c4; }

/* شبكة أزرار الروابط داخل التصنيف */
.link-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }

/* زرّ الرابط: الرابط نفسه <a> حقيقي (يفتحه المتصفح بلا مانع نوافذ منبثقة)،
   والأدوات في صفّ منفصل تحته فلا تتراكب مع العنوان ولا تُفسد النقر. */
.link-tile-wrap { display: flex; flex-direction: column; gap: .3rem; }
.link-tile {
  display: flex; align-items: center; gap: .55rem; min-width: 0;
  padding: .6rem .7rem; border-radius: 13px; text-decoration: none;
  background: #F7F8FA; border: 1px solid #E9EBEF; color: #131A24;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.link-tile:hover { background: #fff; border-color: var(--cat-accent, #0F6B52); transform: translateY(-1px); }
.link-tile-icon {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .82rem;
}
.link-tile-body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.link-tile-title { font-size: .82rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-tile-desc { font-size: .68rem; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dark .link-tile-desc { color: #9ca3af; }
.link-tile-count {
  flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 .35rem; border-radius: 999px;
  background: #E6F2EE; color: #0A5741; font-size: .66rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.link-tile-tools { display: flex; align-items: center; gap: .25rem; justify-content: flex-end; }
.link-tile-tools .link-tool-btn { width: 26px; height: 26px; font-size: .68rem; border-radius: 8px; }
/* رابط بروتوكوله غير مسموح: يُعرض معطّلاً بلا href إطلاقاً (منع XSS) */
.link-tile-dead { opacity: .6; cursor: not-allowed; }

.link-cat-empty { font-size: .8rem; color: #6b7280; padding: .5rem 0; }
.link-cat-empty-block {
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  text-align: center; color: #6b7280; font-size: .85rem;
}
.link-cat-empty-block > i { font-size: 1.8rem; color: #C2E0D6; }
.link-cat-more {
  display: inline-flex; align-items: center; gap: .35rem; margin-top: .7rem;
  font-size: .78rem; font-weight: 700; color: var(--cat-accent, #0F6B52); text-decoration: none;
}
.link-cat-more:hover { text-decoration: underline; }

/* شريط «الأكثر استخداماً» — يُبنى من click_count الفعلي لا من ترتيب يدوي */
.link-quick-row { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-bottom: .9rem; }
.link-quick-label { font-size: .74rem; font-weight: 700; color: #8A5C0C; display: inline-flex; align-items: center; gap: .3rem; }
.link-quick-btn {
  display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem;
  border-radius: 999px; background: #fbf0dc; border: 1px solid #f0dcb4;
  color: #8A5C0C; font-size: .76rem; font-weight: 700; text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}
.link-quick-btn:hover { background: #f7e6c5; transform: translateY(-1px); }
.link-quick-btn.link-tile-dead { opacity: .6; }

/* صفحة الروابط الكاملة */
.links-summary { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-bottom: .4rem; }
.links-summary-chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem;
  border-radius: 999px; background: #EFF1F4; color: #535A66; font-size: .76rem; font-weight: 700;
}
.links-summary-shared { background: #e2ecfb; color: #1e4d8f; }
.links-summary-personal { background: #E6F2EE; color: #0A5741; }
.links-group { margin-top: 1.1rem; }
.links-group-title { font-weight: 700; color: #131A24; font-size: .95rem; display: flex; align-items: center; gap: .45rem; }
.links-group-count {
  background: #EFF1F4; color: #535A66; border-radius: 999px;
  padding: .05rem .5rem; font-size: .72rem; font-weight: 700;
}
.links-group-hint { font-size: .75rem; color: #6b7280; margin: .2rem 0 .7rem; }

/* منتقي الأيقونة واللون في نوافذ الإضافة والتعديل */
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: .35rem; }
.icon-pick-btn {
  height: 38px; border-radius: 10px; border: 1px solid #E5E7EB; background: #fff;
  color: #535A66; cursor: pointer; font-size: .85rem;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.icon-pick-btn:hover { background: #EFF1F4; }
.icon-pick-btn.is-active { background: #0F6B52; border-color: #0F6B52; color: #fff; }
.color-picker { display: flex; gap: .4rem; flex-wrap: wrap; }
.color-pick-btn {
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; box-shadow: 0 0 0 1px #E5E7EB inset;
  transition: transform .15s ease, box-shadow .15s ease;
}
.color-pick-btn:hover { transform: translateY(-1px); }
.color-pick-btn.is-active { border-color: #131A24; box-shadow: 0 0 0 2px #fff inset, 0 0 0 2px #131A24; }

/* الهاتف: الأزرار بعرض كامل أسهل للنقر بالإصبع */
@media (max-width: 640px) {
  .link-cat-grid { grid-template-columns: 1fr; }
  .link-cat-grid-page { grid-template-columns: 1fr; }
}
