/* ==========================================================================
   نظام مُلاحظة (Molahatha) - التصميم الرسمي المطابق لمنصة جِينا (Gena Design System)
   خطوط ثمانية الأصلية - بطاقات بيضاء نقية - بدون إيموجي - تخطيط القائمة الجانبية
   ========================================================================== */

/* === خطوط ثمانية الأصلية من المجلد المحلي fonts/ === */
@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('fonts/thmanyahserifdisplay-Light-DyjG2ukq.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('fonts/thmanyahserifdisplay-Regular-nc8jJ-2B.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('fonts/thmanyahserifdisplay-Medium-BawbtKH-.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('fonts/thmanyahserifdisplay-Bold-kzw7Oegj.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('fonts/thmanyahserifdisplay-Black-Hu95DQR-.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Serif Text';
  src: url('fonts/thmanyahseriftext-Light-BOXONMcz.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Serif Text';
  src: url('fonts/thmanyahseriftext-Regular-McOok9_5.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Serif Text';
  src: url('fonts/thmanyahseriftext-Medium-Bklsio7C.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Serif Text';
  src: url('fonts/thmanyahseriftext-Bold-DBO24BpB.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah Serif Text';
  src: url('fonts/thmanyahseriftext-Black-B-qZc52d.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   المتغيرات الرسمية (Gena Design Tokens)
   ========================================================================== */
:root {
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  --border-subtle: #f1f5f9;
  --border-default: #e2e8f0;
  --border-strong: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --accent-cyan: #06b6d4;
  --accent-cyan-dark: #0891b2;
  --accent-cyan-light: #ecfeff;
  --accent-slate: #0f172a;
  --accent-slate-hover: #1e293b;

  --accent-emerald: #10b981;
  --accent-emerald-light: #ecfdf5;
  --accent-amber: #f59e0b;
  --accent-amber-light: #fffbeb;
  --accent-rose: #f43f5e;
  --accent-rose-light: #fff1f2;

  --font-text: "Thmanyah Serif Text", "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
  --font-display: "Thmanyah Serif Display", "IBM Plex Sans Arabic", serif;
  --font-mono: "JetBrains Mono", monospace;

  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-elevated: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
}

/* ==========================================================================
   الأساسيات والطباعة (Base & Typography)
   ========================================================================== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  direction: rtl;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin: 0;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20;
  vertical-align: middle;
}

/* ==========================================================================
   تخطيط التطبيق (App Shell: Header + Sidebar + Main)
   ========================================================================== */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* الرأس التنفيذي (Top Executive Header) */
.gena-header {
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-default);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-brand-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-slate);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-meta-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}

.meta-pill.model-pill {
  background: var(--accent-cyan-light);
  border-color: rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan-dark);
}

.header-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9999px;
  border: 1px solid var(--border-default);
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  font-family: var(--font-text);
}

.header-action-btn:hover {
  background: var(--bg-card-subtle);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.header-action-btn.primary {
  background: var(--accent-slate);
  border-color: var(--accent-slate);
  color: #ffffff;
}

.header-action-btn.primary:hover {
  background: var(--accent-slate-hover);
}

/* حاوية الجسم (Sidebar + Content) */
.app-body-container {
  display: flex;
  flex: 1;
  position: relative;
}

/* ==========================================================================
   القائمة الجانبية الرسمية (Official Gena Sidebar)
   ========================================================================== */
.gena-sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 12px;
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 12px 4px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: right;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  font-family: var(--font-text);
  width: 100%;
}

.sidebar-nav-item:hover {
  background: var(--bg-card-subtle);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  background: var(--accent-slate);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar-nav-item.active .material-symbols-outlined {
  color: #ffffff;
}

.sidebar-nav-item .material-symbols-outlined {
  font-size: 20px;
  color: var(--text-light);
  transition: color 0.15s ease;
}

.sidebar-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 6px;
}

.sidebar-footer-box {
  padding: 12px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-primary);
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.footer-meta-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   مساحة العمل الرئيسية (Main Workspace Content)
   ========================================================================== */
.gena-main-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

/* ترويسة الصفحة (Hero Section) */
.hero-narrative-header {
  margin-bottom: 28px;
}

.mono-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-slate);
  color: #ffffff;
  margin-bottom: 12px;
}

.hero-main-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-main-title span.highlight {
  color: var(--accent-cyan-dark);
  font-family: var(--font-text);
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 760px;
  margin: 0;
}

/* ==========================================================================
   بطاقة الإدخال والتحليل (Composer Card - Official White)
   ========================================================================== */
.gena-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 28px;
  margin-bottom: 28px;
  position: relative;
  transition: border-color 0.2s ease;
}

.gena-card:hover {
  border-color: var(--border-strong);
}

/* شريط تبويبات الإدخال (Pill Switcher) */
.gena-tab-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-default);
  border-radius: 9999px;
  width: fit-content;
  margin-bottom: 24px;
}

.gena-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-text);
}

.gena-tab-btn:hover {
  color: var(--text-primary);
}

.gena-tab-btn.active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* حقول الإدخال الرسمية */
.field-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.field-label-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 4px;
}

.gena-textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-default);
  background: #ffffff;
  color: var(--text-primary);
  font-family: var(--font-text);
  font-size: 0.94rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: all 0.15s ease;
}

.gena-textarea:focus, .gena-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.gena-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-default);
  background: #ffffff;
  color: var(--text-primary);
  font-family: var(--font-text);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.15s ease;
}

/* تفكيك وحصر الادعاءات */
.deconstruct-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 16px;
  margin-top: 20px;
}

.deconstruct-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.deconstruct-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
}

.deconstruct-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 12px 0;
}

/* قسم حقائق ومصدر الباحث */
.user-evidence-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 16px;
  margin-top: 16px;
}

/* شريط تحكم الإطلاق */
.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.notes-selector-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gena-select {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-default);
  background: #ffffff;
  font-family: var(--font-text);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.execute-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 9999px;
  background: var(--accent-slate);
  color: #ffffff;
  border: none;
  font-family: var(--font-text);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.execute-btn:hover {
  background: var(--accent-slate-hover);
  transform: translateY(-1px);
}

.execute-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   حالة التحميل والرسائل (Loading & Error States)
   ========================================================================== */
.loading-box {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
}

.loading-spinner-symbol {
  font-size: 32px;
  color: var(--accent-cyan);
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-bottom: 12px;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.loading-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.loading-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ==========================================================================
   منطقة النتائج وبطاقات ملاحظات المجتمع (Results Area - Gena Style)
   ========================================================================== */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* شريط التقرير العلوي */
.report-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-default);
}

.report-header-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* بطاقة التحليل الجنائي للوسائط */
.forensics-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.forensics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

.comparison-col {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border-default);
}

.comparison-col.claimed {
  background: #fff1f2;
  border-color: #fecdd3;
}

.comparison-col.verified {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

/* بطاقة ملاحظة المجتمع (Community Note Card) */
.note-card-gena {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.note-card-gena:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-elevated);
}

.note-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.note-top-right {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.note-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.note-title-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.consensus-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent-emerald-light);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* عداد الـ 280 حرفاً */
.note-char-counter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  transition: all 0.15s ease;
}

.note-char-counter.within-limit {
  background: var(--accent-emerald-light);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.note-char-counter.exceeded-limit {
  background: var(--accent-rose-light);
  color: #be123c;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.counter-hint {
  font-size: 0.68rem;
  font-family: var(--font-text);
  opacity: 0.85;
}

/* نص التفنيد */
.note-debunk-text {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-card-subtle);
  padding: 16px;
  border-radius: 14px;
  border-right: 4px solid var(--accent-cyan);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  border-left: 1px solid var(--border-subtle);
  margin-bottom: 18px;
  outline: none;
  transition: all 0.15s ease;
}

.note-debunk-text[contenteditable="true"]:focus {
  background: #ffffff;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.15);
}

.note-sources-block {
  margin-bottom: 18px;
}

.sources-heading {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* شبكة المصادر الرسمية (مطابقة لـ GroundingSourcesList في gena) */
.sources-cards-wrap, .sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.source-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.source-item-card:hover {
  background: var(--bg-card-subtle);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.source-info-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.source-info-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0369a1;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.source-info-domain {
  font-size: 0.7rem;
  color: var(--text-light);
  font-family: var(--font-mono);
}

/* شريط إجراءات البطاقة */
.note-card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.copy-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid var(--border-default);
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-text);
}

.copy-pill-btn:hover {
  background: var(--bg-card-subtle);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.copy-pill-btn.primary {
  background: var(--accent-slate);
  border-color: var(--accent-slate);
  color: #ffffff;
}

.copy-pill-btn.primary:hover {
  background: var(--accent-slate-hover);
}

/* ==========================================================================
   مودال الإعدادات (Settings Modal)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-dialog {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 24px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header-gena {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body-gena {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer-gena {
  padding: 16px 24px;
  border-top: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-card-subtle);
}

/* ==========================================================================
   رسالة التوست (Toast Notification)
   ========================================================================== */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: var(--accent-slate);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  z-index: 200;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-msg.active {
  opacity: 1;
  transform: translateY(0);
}

.action-buttons-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 55;
  transition: opacity 0.2s ease;
}

/* تجاوب الشاشات الصغيرة وتصميم الجوال */
@media (max-width: 900px) {
  .mobile-menu-btn {
    display: inline-flex !important;
  }

  .gena-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 290px !important;
    height: 100vh !important;
    background: #ffffff !important;
    z-index: 60 !important;
    box-shadow: -6px 0 24px rgba(0, 0, 0, 0.15) !important;
    transform: translateX(100%) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow-y: auto !important;
  }

  .gena-sidebar.open {
    transform: translateX(0) !important;
  }

  .app-body-container {
    flex-direction: column;
  }

  .gena-main-content {
    padding: 16px 12px;
    width: 100%;
  }

  .composer-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .notes-selector-group {
    width: 100%;
    justify-content: space-between;
  }

  .notes-selector-group .gena-select {
    flex: 1;
  }

  .action-buttons-group {
    flex-direction: column;
    width: 100%;
  }

  .action-buttons-group button {
    width: 100%;
    justify-content: center;
  }

  .gena-header {
    padding: 0 14px;
  }

  .gena-card {
    padding: 16px 14px;
    border-radius: 16px;
  }
}

