/* =========================================================
   Self-hosted "Cairo" Arabic web font
   ========================================================= */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cairo/cairo-400-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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-10EC4, U+10EFC-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: 'Cairo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cairo/cairo-400-latin.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: 'Cairo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cairo/cairo-600-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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-10EC4, U+10EFC-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: 'Cairo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cairo/cairo-600-latin.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: 'Cairo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/cairo/cairo-700-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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-10EC4, U+10EFC-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: 'Cairo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/cairo/cairo-700-latin.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;
}

/* =========================================================
   Theme: colors, radius, shadows — a light layer on top of Bootstrap
   ========================================================= */
:root {
  --bs-font-sans-serif: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-primary: #0f5e5c;
  --bs-primary-rgb: 15, 94, 92;
  --bs-secondary: #b8862b;
  --bs-secondary-rgb: 184, 134, 43;
  --bs-border-radius: 0.65rem;
  --bs-border-radius-lg: 0.9rem;
  --bs-border-radius-sm: 0.45rem;
  --app-bg: #f4f7f7;
}

body {
  font-family: var(--bs-font-sans-serif);
  background-color: var(--app-bg);
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .card-title {
  font-weight: 700;
}

.btn {
  font-weight: 600;
}

.btn-primary {
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: #0c4b49;
  --bs-btn-hover-border-color: #0c4b49;
}

.app-navbar {
  background: linear-gradient(90deg, #0f5e5c 0%, #147c79 100%);
  box-shadow: 0 2px 10px rgba(15, 94, 92, 0.25);
}
.app-navbar .navbar-brand,
.app-navbar .nav-link,
.app-navbar .navbar-text {
  color: #f2f7f6 !important;
}
.app-navbar .nav-link {
  position: relative;
  opacity: 0.88;
  transition: opacity 0.2s ease;
}
.app-navbar .nav-link:hover {
  opacity: 1;
}
.app-navbar .nav-link.active {
  opacity: 1;
}
.app-navbar .nav-link.active::after {
  content: '';
  position: absolute;
  right: 0.5rem;
  left: 0.5rem;
  bottom: -2px;
  height: 2px;
  background: #f2c96b;
  border-radius: 2px;
  animation: underline-grow 0.25s ease;
}
@keyframes underline-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.card {
  border: 1px solid rgba(15, 94, 92, 0.08);
  box-shadow: 0 2px 12px rgba(20, 40, 40, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(20, 40, 40, 0.12);
}

.stat-card {
  border-radius: var(--bs-border-radius-lg);
  overflow: hidden;
}
.stat-card .stat-number {
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
}
.stat-card .bi {
  font-size: 1.75rem;
  opacity: 0.85;
}

.badge-type {
  font-size: 0.85rem;
  padding: 0.4em 0.7em;
}

/* =========================================================
   Motion
   ========================================================= */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
  animation: fade-in-up 0.35s ease both;
}

.hover-lift {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 40, 40, 0.12);
}

.spin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1090;
}
.spin-overlay.active {
  display: flex;
}

/* =========================================================
   Auth pages
   ========================================================= */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top right, #147c79 0%, #0b3f3d 60%, #08302e 100%);
  padding: 1.5rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: var(--bs-border-radius-lg);
  border: none;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

/* =========================================================
   Print
   ========================================================= */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  main { padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; }
  a[href]::after { content: ''; }
}
