@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@600;700;800&family=Cairo:wght@400;600;700&display=swap');

:root{
  --nav-bg: #ffffff;
  --nav-border:#e7ecf5;
  --ink:#0f1e42;
  --muted:#5c678f;

  --primary:#1d2b6f;
  --primary-dark:#0f1f5b;
  --accent:#1baa6f;

  --shadow: 0 16px 40px rgba(15,23,42,.10);
  --shadow-soft: 0 10px 24px rgba(15,23,42,.08);
}

*{ box-sizing:border-box; }
a{ color:inherit; }

.site-header{
  position:sticky;
  top:0;
  z-index:1000;
  background:var(--nav-bg);
  border-bottom:1px solid #e5e9f5;
  box-shadow:0 12px 30px rgba(15,23,42,.08);
}

.container{
  width:min(1200px, 92vw);
  margin:0 auto;
}

.nav-shell{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 0;
}

.nav-brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  min-width: 220px;
}

.nav-logo{
  width:42px;
  height:42px;
}

.nav-brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.nav-brand-title{
  font-family:"Noto Kufi Arabic","Cairo",sans-serif;
  font-weight:800;
  color:var(--ink);
  font-size:1.05rem;
}

.nav-brand-sub{
  font-family:"Cairo",sans-serif;
  color:var(--muted);
  font-weight:700;
  font-size:.85rem;
  margin-top:3px;
}


.nav-links{
  display:flex;
  align-items:center;
  gap:6px;
  flex:1;
  justify-content:center;
}

.nav-link{
  text-decoration:none;
  padding:10px 14px;
  border-radius:999px;
  font-weight:800;
  color:var(--ink);
  font-family:"Cairo",sans-serif;
  transition:background .15s ease, color .15s ease, transform .15s ease;
  white-space:nowrap;
}

.nav-link:hover{
  background:#eef2ff;
  transform:translateY(-1px);
}

.nav-link.is-active{
  background:linear-gradient(180deg, rgba(29,43,111,.12), rgba(29,43,111,.06));
  color:var(--primary);
  box-shadow: inset 0 0 0 1px rgba(29,43,111,.18);
}

.nav-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}

.nav-mobile-logo{
  display:none;
  align-items:center;
  justify-content:center;
}
.nav-mobile-logo img{
  width:32px;
  height:32px;
}

.lang-switch{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  padding:0;
  border-radius:50%;
  border:1px solid rgba(15,30,66,.12);
  background:rgba(255,255,255,.95);
  font-size:0;
  color:var(--ink);
  text-transform:none;
}
.lang-switch .lang-icon{
  font-size:1.25rem;
}
.notif-button{
  position:relative;
}
.nav-icon{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  color:#fff;
  text-decoration:none;
}
.nav-profile-trigger-wrapper{
  display:none;
}
.nav-profile-toggle{
  font-size:0.85rem;
  padding:6px 14px;
  border-radius:16px;
  border:none;
  background:linear-gradient(180deg,var(--primary),var(--primary-dark));
  color:#fff;
  font-weight:800;
  cursor:pointer;
  transition:box-shadow .15s ease, transform .15s ease;
  text-transform:none;
}
.nav-profile-toggle:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 14px rgba(15,23,42,.35);
}
.nav-badge{
  position:absolute;
  top:4px;
  right:5px;
  min-width:16px;
  height:16px;
  border-radius:999px;
  background:#ff4754;
  font-size:.6rem;
  font-weight:700;
  display:none;
  align-items:center;
  justify-content:center;
  padding:0 4px;
}
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
  white-space:nowrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  border-radius:999px;
  padding:9px 16px;
  font-weight:900;
  font-family:"Cairo",sans-serif;
  border:1px solid transparent;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn-primary{
  background:linear-gradient(180deg,var(--primary),var(--primary-dark));
  color:#fff;
  box-shadow:0 14px 28px rgba(29,43,111,.22);
}

.btn-primary:hover{ transform:translateY(-1px); }

.btn-ghost{
  background:#fff;
  border-color:var(--nav-border);
  color:var(--ink);
  box-shadow:var(--shadow-soft);
}

.btn-danger{
  background:linear-gradient(180deg,#c2410c,#9a3412);
  color:#fff;
  box-shadow:0 14px 28px rgba(194,65,12,.20);
}

.icon-btn{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid var(--nav-border);
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:var(--shadow-soft);
  transition:transform .15s ease;
}

.icon-btn:hover{ transform:translateY(-1px); }
.top-back-btn{
  display:none;
}
.nav-menu{ position:relative; }

.menu-panel{
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  left:auto;
  min-width:220px;
  max-width:calc(100vw - 24px);
  background:#fff;
  border:1px solid var(--nav-border);
  border-radius:16px;
  box-shadow:var(--shadow);
  padding:8px;
  display:none;
  z-index:1100;
}

.menu-panel.is-open{ display:block; }

@media (max-width: 640px){
  .menu-panel{
    width:min(260px, calc(100vw - 32px));
    right:10px;
  }
}

.menu-item{
  display:block;
  padding:11px 12px;
  border-radius:12px;
  text-decoration:none;
  font-weight:800;
  color:var(--ink);
}

.menu-item:hover{ background:#eef2ff; }

.menu-sep{
  height:1px;
  background:#eef2f8;
  margin:6px 0;
}

.menu-danger{ color:#b91c1c; }
.menu-danger:hover{ background:#fff1f2; }

.burger{
  display:none;
  width:54px;
  height:54px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.12);
  background:linear-gradient(180deg,#fff,#f5f6fb);
  box-shadow:
    0 8px 18px rgba(15,23,42,.12),
    inset 0 -1px 0 rgba(255,255,255,.8);
  cursor:pointer;
  position:relative;
  transition:transform .3s ease, box-shadow .3s ease;
}

.burger:hover{
  transform:translateY(-2px);
  box-shadow:
    0 20px 35px rgba(15,23,42,.25),
    inset 0 -1px 0 rgba(255,255,255,.9);
}

.burger span{
  position:absolute;
  left:50%;
  width:28px;
  height:3px;
  margin-left:-14px;
  border-radius:999px;
  background:linear-gradient(135deg,#1d2b6f,#4960c3);
  box-shadow:0 6px 16px rgba(73,96,195,.35);
  transition:opacity .3s ease, transform .3s ease;
}

.burger span:nth-child(1){ top:16px; }
.burger span:nth-child(2){ top:24px; }
.burger span:nth-child(3){ top:32px; }

.drawer{
  display:none;
  position:fixed;
  inset:0;
  z-index:1200;
}

.drawer.is-open{ display:block; }

.drawer-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.38);
}

.drawer-panel{
  position:absolute;
  top:0;
  bottom:0;
  inset-inline-start:0;
  width:min(360px, 92vw);
  background:#fff;
  border-inline-end:1px solid rgba(15,23,42,.08);
  box-shadow:0 30px 60px rgba(15,23,42,.25);
  padding:24px 20px 30px;
  transform:translateX(-8px);
  animation:drawerIn .25s ease forwards;
  display:flex;
  flex-direction:column;
  gap:14px;
  border-top-right-radius:28px;
  border-bottom-right-radius:28px;
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:rgba(29,43,111,.6) rgba(255,255,255,.4);
  max-height:100vh;
}

@keyframes drawerIn{
  from{ opacity:.4; transform:translateX(-16px); }
  to{ opacity:1; transform:translateX(0); }
}

.drawer-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:8px 6px 14px;
  border-bottom:1px solid #eef2f8;
}

.drawer-brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.drawer-logo{ width:38px; height:38px; }

.drawer-title{
  font-family:"Noto Kufi Arabic","Cairo",sans-serif;
  font-weight:800;
  color:var(--ink);
}

.drawer-sub{
  font-family:"Cairo",sans-serif;
  color:var(--muted);
  font-weight:700;
  font-size:.85rem;
  margin-top:2px;
}

.drawer-links{
  padding:8px 0;
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:8px;
}

.drawer-link{
  text-decoration:none;
  padding:14px 14px;
  border-radius:14px;
  font-weight:900;
  color:#1d2b6f;
  background:#f0f3ff;
  border:1px solid rgba(29,43,111,.2);
  display:flex;
  align-items:center;
  justify-content:space-between;
  transition:background .2s ease, border-color .2s ease;
}

.drawer-link.is-active{
  background:#fff;
  border-color:rgba(29,43,111,.35);
  color:var(--primary);
  box-shadow:inset 0 0 0 1px rgba(29,43,111,.35);
}

.drawer-actions{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding-top:14px;
  border-top:1px solid rgba(15,23,42,.12);
}

.drawer .lang-switch{
  justify-content:flex-start;
  width:100%;
  padding:10px 14px;
  border:none;
  background:rgba(29,43,111,.06);
  color:var(--primary);
}

.drawer-panel::-webkit-scrollbar{
  width:6px;
}
.drawer-panel::-webkit-scrollbar-track{
  background:transparent;
}
.drawer-panel::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,rgba(73,96,195,.95),rgba(29,43,111,.9));
  border-radius:999px;
}

body.nav-lock{ overflow:hidden; }

.app-bottom-nav{
  display:none;
  position:fixed;
  inset:auto 0 0 0;
  padding:10px 14px 14px;
  background:var(--nav-bg);
  border-top:1px solid rgba(15,23,42,.12);
  box-shadow:0 -16px 30px rgba(15,23,42,.18);
  justify-content:flex-start;
  align-items:center;
  gap:10px;
  z-index:1200;
}
.app-bottom-back{
  border:none;
  width:42px;
  height:42px;
  border-radius:14px;
  background:var(--surface);
  color:var(--primary);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:1.25rem;
  box-shadow:0 12px 30px rgba(15,23,42,.17);
  cursor:pointer;
}
.app-bottom-nav-links{
  display:flex;
  flex:1;
  justify-content:space-between;
  gap:6px;
}
.bottom-nav-item{
  flex:1;
  min-width:48px;
  text-align:center;
  text-decoration:none;
  color:var(--muted);
  font-size:.65rem;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  padding:4px 0;
  transition:color .2s ease;
}
.bottom-nav-item.is-active{
  color:var(--accent);
}
.bottom-nav-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
}
.bottom-nav-icon svg{
  width:24px;
  height:24px;
}
.bottom-nav-label{
  font-size:.6rem;
  font-weight:700;
  text-transform:capitalize;
}

@media (max-width: 900px){
  .nav-links{ display:none; }
  .burger{ display:inline-flex; }
  .nav-brand{ display:none; }
  .nav-brand-sub{ display:none; }
  .nav-mobile-logo{ display:flex; }
  .app-bottom-nav{
    display:flex;
  }
  main.shell{
    padding-bottom: 120px;
  }
  .top-back-btn{
    display:inline-flex;
    margin-inline-end:8px;
  }
  .nav-profile-trigger-wrapper{
    display:none;
  }
}

@media (min-width: 900px){
  .nav-profile-trigger-wrapper{
    display:block;
  }
  .burger{ display:none; }
}
@media (max-width: 520px){
  .btn{ padding:9px 12px; }
  .btn-ghost{ display:none; }
}
