.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--regal-blue);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  padding: 28px 24px 24px;
  border-bottom: 1px solid rgba(133, 204, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-logo-arabic {
  font-family: var(--font-arabic);
  font-size: 2rem;
  color: var(--pastel-blue);
  line-height: 1;
  font-weight: 700;
}

.sidebar-logo-latin {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(133, 204, 255, 0.6);
  padding: 0 12px;
  margin-bottom: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: rgba(133, 204, 255, 0.12);
  color: var(--white);
}

.sidebar-link--active {
  background: rgba(133, 204, 255, 0.2);
  color: var(--white);
  box-shadow: inset 3px 0 0 var(--pastel-blue);
}

.sidebar-link-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sidebar-link-latin {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
}

.sidebar-link-arabic {
  font-family: var(--font-arabic);
  font-size: 0.8rem;
  color: rgba(133, 204, 255, 0.7);
  line-height: 1.4;
  direction: rtl;
}

.sidebar-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(133, 204, 255, 0.2);
  flex-shrink: 0;
}

.sidebar-footer-text {
  font-family: var(--font-arabic);
  font-size: 0.85rem;
  color: rgba(133, 204, 255, 0.8);
  direction: rtl;
  text-align: right;
  line-height: 1.8;
  margin-bottom: 2px;
}

.sidebar-footer-sub {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

/* Below 768px, BottomNav.jsx takes over navigation entirely —
   the sidebar is hidden rather than converted into its own bar,
   so there's only one nav bar fixed to the bottom on mobile. */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
}

.sidebar-wa-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--pastel-blue);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--regal-blue);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  transition: background 0.2s ease;
}

.sidebar-wa-btn:hover {
  background: #6bbdf5;
}
.sidebar-user {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
}

.sidebar-user-name {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-signout {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.15s;
  width: 100%;
}

.sidebar-signout:hover {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  border-color: rgba(255,255,255,0.4);
}
.sidebar-wa-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}


.sidebar-wa-icon svg {
  width: 100%;
  height: 100%;
}/* ============================================
   Toolbar
   ============================================ */

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-btn {
  padding: 5px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.toolbar-btn:hover:not(:disabled) {
  background: var(--pastel-blue);
  border-color: var(--pastel-blue);
  color: var(--regal-blue);
}

.toolbar-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.toolbar-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0 4px;
  min-width: 16px;
  text-align: center;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

/* Dark mode toggle */
.toolbar-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toolbar-toggle:hover {
  background: var(--pastel-blue);
  border-color: var(--pastel-blue);
}

.toolbar-toggle--active {
  background: var(--regal-blue);
  border-color: var(--regal-blue);
  color: white;
}

.toolbar-toggle--active:hover {
  background: var(--regal-blue);
  opacity: 0.9;
}

.toolbar-toggle-icon {
  font-size: 0.9rem;
}

.toolbar-toggle-label {
  font-size: 0.78rem;
}

/* Mobile */
@media (max-width: 768px) {
  .toolbar {
    padding: 6px 12px;
    gap: 6px;
  }

  .toolbar-toggle-label {
    display: none;
  }
}/* ── Bottom bar itself ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #ffffff;
  border-top: 1px solid #e0e8f0;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(9, 69, 112, 0.06);
}

.bottom-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  padding: 6px 2px;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: #7d93a6;
  font-family: var(--font-ui, inherit);
}

.bottom-nav-card--active {
  color: #094570;
}

.bottom-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.bottom-nav-icon svg {
  width: 100%;
  height: 100%;
}

.bottom-nav-label {
  font-size: 0.62rem;
  font-weight: 600;
}

/* Only show this bar on small/mobile screens -- desktop uses the Sidebar */
@media (min-width: 900px) {
  .bottom-nav {
    display: none;
  }
}

/* Keep page content from hiding behind the fixed bar on mobile */
@media (max-width: 899px) {
  .page-content {
    padding-bottom: 76px;
  }
}

/* ── Dark mode for the bar ── */
[data-theme="dark"] .bottom-nav {
  background: #0f1f2e;
  border-top-color: #1e3448;
}

[data-theme="dark"] .bottom-nav-card {
  color: #5c7a90;
}

[data-theme="dark"] .bottom-nav-card--active {
  color: #85CCFF;
}

/* ── More sheet ── */
.bottom-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 300;
  display: flex;
  align-items: flex-end;
}

.bottom-nav-sheet {
  width: 100%;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  padding: 12px 20px 28px;
  animation: sheetUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.bottom-nav-sheet-handle {
  width: 40px;
  height: 4px;
  background: #d0d8e2;
  border-radius: 100px;
  margin: 0 auto 16px;
}

.bottom-nav-sheet-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 16px;
}

.bottom-nav-sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.bottom-nav-sheet-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.bottom-nav-sheet-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f4f8;
  border-radius: 14px;
  color: #094570;
}

.bottom-nav-sheet-icon svg {
  width: 22px;
  height: 22px;
}

.bottom-nav-sheet-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #24374a;
  text-align: center;
}

[data-theme="dark"] .bottom-nav-sheet {
  background: #0f1f2e;
}

[data-theme="dark"] .bottom-nav-sheet-handle {
  background: #2c3f54;
}

[data-theme="dark"] .bottom-nav-sheet-title {
  color: #7d93a6;
}

[data-theme="dark"] .bottom-nav-sheet-icon {
  background: #0a1825;
  color: #85CCFF;
}

[data-theme="dark"] .bottom-nav-sheet-label {
  color: #c8e0f5;
}/* ============================================
   Splash Screen
   ============================================ */

.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--regal-blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, transform 0.6s ease;
  opacity: 1;
}

.splash--exit {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

/* ---- Content block ---- */
.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(24px) scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.splash-content--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---- Decorative ring ---- */
.splash-ring {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(133, 204, 255, 0.15);
  animation: pulse-ring 2.5s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(0.9); opacity: 0.4; }
  50%  { transform: scale(1.05); opacity: 0.15; }
  100% { transform: scale(0.9); opacity: 0.4; }
}

/* ---- Arabic word ---- */
.splash-arabic {
  font-family: var(--font-arabic);
  font-size: 6rem;
  color: var(--pastel-blue);
  line-height: 1.2;
  text-shadow: 0 0 60px rgba(133, 204, 255, 0.4);
  position: relative;
  z-index: 1;
}

/* ---- Divider line ---- */
.splash-line {
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--pastel-blue), transparent);
  transition: width 0.8s ease 0.3s;
  border-radius: 100px;
}

.splash-line--drawn {
  width: 180px;
}

/* ---- Latin name ---- */
.splash-latin {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* ---- Tagline ---- */
.splash-tagline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
  font-family: var(--font-arabic);
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 2;
}

.splash-tagline--visible {
  opacity: 1;
  transform: translateY(0);
}

.splash-tagline-sub {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.08em;
  font-style: italic;
}

/* ---- Bottom bismillah ---- */
.splash-bottom {
  position: absolute;
  bottom: 40px;
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  color: rgba(133, 204, 255, 0.4);
  opacity: 0;
  transition: opacity 0.8s ease 0.6s;
  letter-spacing: 0.02em;
}

.splash-bottom--visible {
  opacity: 1;
}

/* Mobile */
@media (max-width: 768px) {
  .splash-arabic {
    font-size: 4.5rem;
  }

  .splash-ring {
    width: 220px;
    height: 220px;
  }
}/* Positioned as a floating fixed element since it isn't wired into
   Toolbar.jsx's own layout yet — safe to move once that file is
   available, just drop the position/top/right rules below. */

.notif-bell-wrapper {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 500;
}

.notif-bell-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #c8d8e8;
  background: #ffffff;
  color: #094570;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(9, 69, 112, 0.10);
  transition: all 0.15s ease;
}

.notif-bell-btn:hover {
  border-color: #85CCFF;
  background: #f0f7ff;
}

.notif-bell-btn svg {
  width: 20px;
  height: 20px;
}

.notif-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #c0392b;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.notif-bell-panel {
  position: absolute;
  top: 48px;
  right: 0;
  width: 300px;
  max-width: calc(100vw - 40px);
  background: #ffffff;
  border: 1px solid #c8d8e8;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(9, 69, 112, 0.18);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-bell-panel-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4a6080;
  margin-bottom: 2px;
}

.notif-bell-empty {
  font-size: 0.85rem;
  color: #8a9ab0;
  padding: 8px 0;
}

.notif-bell-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}

.notif-bell-item:hover {
  background: #f0f7ff;
}

.notif-bell-item-cat {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #094570;
  opacity: 0.7;
}

.notif-bell-item-title {
  font-size: 0.87rem;
  font-weight: 600;
  color: #0d1b2a;
  line-height: 1.4;
}

.notif-bell-viewall {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #e8f0f8;
  font-size: 0.82rem;
  font-weight: 600;
  color: #094570;
  text-decoration: none;
  text-align: center;
}

.notif-bell-viewall:hover {
  text-decoration: underline;
}

[data-theme="dark"] .notif-bell-btn {
  background: #0f1f2e;
  border-color: #1e3448;
  color: #85CCFF;
}

[data-theme="dark"] .notif-bell-btn:hover {
  background: #132030;
  border-color: #85CCFF;
}

[data-theme="dark"] .notif-bell-panel {
  background: #0f1f2e;
  border-color: #1e3448;
}

[data-theme="dark"] .notif-bell-item:hover {
  background: #132030;
}

[data-theme="dark"] .notif-bell-item-title {
  color: #c8e0f5;
}

[data-theme="dark"] .notif-bell-viewall {
  color: #85CCFF;
  border-top-color: #1e3448;
}

@media (max-width: 768px) {
  .notif-bell-wrapper {
    top: auto;
    bottom: 76px; /* clear of BottomNav */
    right: 16px;
  }

  .notif-bell-panel {
    top: auto;
    bottom: 48px;
  }
}/* ============================================
   SUAL — Global Styles
   Brand: Pastel Blue #85CCFF | Regal Blue #094570 | White #FFFFFF
   ============================================ */

:root {
  --pastel-blue: #85CCFF;
  --regal-blue: #094570;
  --white: #FFFFFF;
  --bg: #F0F8FF;
  --bg-card: #FFFFFF;
  --bg-sidebar: #094570;
  --text-primary: #0a2e47;
  --text-secondary: #4a7a9b;
  --text-muted: #8ab0c8;
  --border: #d0e8f8;
  --border-light: #e8f4fd;
  --accent-glow: rgba(133, 204, 255, 0.3);
  --shadow-sm: 0 1px 3px rgba(9, 69, 112, 0.08);
  --shadow-md: 0 4px 16px rgba(9, 69, 112, 0.12);
  --shadow-lg: 0 8px 32px rgba(9, 69, 112, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font-arabic: 'Amiri', 'Traditional Arabic', serif;
  --font-ui: 'Inter', system-ui, sans-serif;
  --sidebar-width: 260px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.arabic {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
  line-height: 2;
}

.arabic-lg {
  font-family: var(--font-arabic);
  font-size: 1.5rem;
  direction: rtl;
  line-height: 2.2;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--border-light); }
::-webkit-scrollbar-thumb { background: var(--pastel-blue); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--regal-blue); }

:focus-visible { outline: 2px solid var(--pastel-blue); outline-offset: 2px; }

.app-layout { display: flex; min-height: 100vh; }

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-content {
  flex: 1;
  padding: 32px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary { background: var(--regal-blue); color: var(--white); }
.btn-primary:hover { background: #073d63; box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-secondary { background: var(--pastel-blue); color: var(--regal-blue); }
.btn-secondary:hover { background: #6bbdf5; transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--text-secondary); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--border-light); color: var(--text-primary); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-blue { background: var(--pastel-blue); color: var(--regal-blue); }
.badge-regal { background: var(--regal-blue); color: var(--white); }

.page-title { font-size: 1.75rem; font-weight: 700; color: var(--regal-blue); margin-bottom: 4px; }
.page-subtitle { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 28px; }

@media (max-width: 768px) {
  .main-content { margin-left: 0; padding-bottom: 80px; }
  .page-content { padding: 20px 16px; }
  .page-title { font-size: 1.4rem; }
}
/* ============================================
   Dark Mode
   ============================================ */
html[data-theme="dark"] {
  --white: #1a1a2e;
  --background: #16213e;
  --border: #2a2a4a;
  --border-light: #222240;
  --text-primary: #e8eaf6;
  --text-secondary: #9fa8da;
  --text-muted: #5c6bc0;
  --regal-blue: #85CCFF;
  --pastel-blue: #1a237e;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
}

html[data-theme="dark"] body {
  background: #16213e;
  color: #e8eaf6;
}

html, body {
  overscroll-behavior-y: contain;
}

html[data-theme="dark"] .sidebar {
  background: #0d1b2a;
}

html[data-theme="dark"] .card {
  background: #1e2a3a;
  border-color: #2a3a4a;
}

html[data-theme="dark"] .toolbar {
  background: #1a1a2e;
  border-color: #2a2a4a;
}

/* ============================================
   Font Size
   ============================================ */
html[data-fontsize="small"] { font-size: 13px; }
html[data-fontsize="medium"] { font-size: 16px; }
html[data-fontsize="large"] { font-size: 19px; }
html[data-fontsize="xlarge"] { font-size: 22px; }