/* ==========================================================================
   تنسيقات لوحتي الإدارة والعروسين (مستوحاة من تصميم ميثاق كلاود - Light & Dark)
   الخط الأساسي المعتمد: Tajawal (+ Diwani Bold لمعاينة الأسماء)
   ========================================================================== */

@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/assets/fonts/tajawal-7.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/assets/fonts/tajawal-6.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/tajawal-1.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/tajawal-0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/tajawal-9.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/tajawal-8.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/tajawal-3.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/tajawal-2.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/fonts/tajawal-5.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/fonts/tajawal-4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Diwani Bold';
  src: url('/assets/fonts/Diwani-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.font-diwani {
  font-family: 'Diwani Bold', 'Tajawal', sans-serif;
}

:root {
  --bg-page: #f5f6fb;
  --bg-surface: #ffffff;
  --bg-surface-soft: #f8f9fd;
  --bg-pill: #f1f2f9;
  --border-subtle: rgba(109, 74, 255, 0.1);
  --border-row: rgba(15, 23, 42, 0.06);
  --text-main: #181a2a;
  --text-muted: #6b7280;
  --accent: #6c47ff;
  --accent-hover: #5835eb;
  --accent-soft: rgba(108, 71, 255, 0.1);
  --accent-text: #ffffff;
  --hero-gradient: linear-gradient(135deg, #dcd4ff 0%, #ede9fe 38%, #f8f9fc 85%);
  --shadow-card: 0 10px 30px -10px rgba(30, 27, 75, 0.07);
  --shadow-dock: 0 14px 36px -8px rgba(30, 27, 75, 0.16);
}

html.dark {
  --bg-page: #0b0c12;
  --bg-surface: #131520;
  --bg-surface-soft: #1a1d2c;
  --bg-pill: #1c1f2e;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-row: rgba(255, 255, 255, 0.05);
  --text-main: #f3f4f8;
  --text-muted: #9ca3af;
  --accent: #a78bfa;
  --accent-hover: #8b5cf6;
  --accent-soft: rgba(167, 139, 250, 0.16);
  --accent-text: #0f1018;
  --hero-gradient: linear-gradient(135deg, #2d254b 0%, #1c1a2e 48%, #131520 100%);
  --shadow-card: 0 18px 40px -12px rgba(0, 0, 0, 0.55);
  --shadow-dock: 0 20px 44px -8px rgba(0, 0, 0, 0.75);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  direction: rtl;
}

.dash-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  border-radius: 24px;
}

.hero-summary-card {
  background: var(--hero-gradient);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  border-radius: 26px;
}

.pill-btn {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 9999px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.pill-btn:hover {
  color: var(--text-main);
  border-color: var(--accent);
}

.pill-btn.active {
  background-color: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 700;
}

.primary-btn {
  background-color: var(--accent);
  color: var(--accent-text);
  border-radius: 9999px;
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
}

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

.dash-input {
  width: 100%;
  background-color: var(--bg-surface-soft);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'Tajawal', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dash-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.dash-table-row {
  border-bottom: 1px solid var(--border-row);
  transition: background-color 0.15s ease;
}

.dash-table-row:last-child {
  border-bottom: none;
}

.dash-table-row:hover {
  background-color: var(--bg-surface-soft);
}

/* شريط التنقل السفلي العائم (Floating Bottom Dock) */
.floating-dock {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-dock);
  border-radius: 9999px;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(12px);
}

.dock-item {
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dock-item:hover {
  color: var(--text-main);
}

.dock-item.active {
  background-color: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 4px 12px var(--accent-soft);
}

/* شارات الحالة */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
}

.status-active {
  background-color: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.status-draft {
  background-color: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
}

.status-archived {
  background-color: rgba(107, 114, 128, 0.14);
  color: #9ca3af;
}

/* النوافذ المنبثقة والتوست */
.dash-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background-color: rgba(11, 12, 18, 0.65);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dash-modal.open {
  display: flex;
}

.dash-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--accent);
  color: var(--accent-text);
  padding: 10px 24px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  z-index: 99999;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.dash-toast.show {
  transform: translateX(-50%) translateY(0);
}
