/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #07111f;
  color: white;
  overflow-x: hidden;
}

/* =========================
   CONTAINER
========================= */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 20px 0;
}

/* =========================
   TOPBAR / LOGO / MENU / USER
========================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between; /* شعار على اليسار، قائمة في الوسط، user-box على اليمين */
  padding: 12px 20px;
  background: #0f1c2e;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* الشعار */
.topbar .logo {
  font-weight: bold;
  font-size: 24px;
  color: #42b3ff;
}

/* القائمة */
.topbar .menu {
  display: flex;
  gap: 18px;
  flex: 1;
  justify-content: center; /* يضع القائمة في الوسط */
}

.topbar .menu a {
  color: #dbeafe;
  text-decoration: none;
  transition: 0.3s;
  font-weight: 500;
}

.topbar .menu a:hover {
  color: #42b3ff;
}

.topbar .menu a.disabled {
  color: #6b7280;
  cursor: not-allowed;
}

/* صندوق المستخدم */
.user-box {
  position: relative;
  cursor: pointer;
  background: #1f2937;
  padding: 6px 12px;
  border-radius: 8px;
  display: flex;       /* صف أفقي */
  align-items: center; /* يثبت النص والايقونة عموديًا */
  gap: 6px;
  color: white;
  font-weight: 500;
}

.user-box:hover {
  background: #334155;
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: 40px;
  right: 0;
  width: 160px;
  background: #111827;
  border-radius: 8px;
  display: none;
  flex-direction: column;
  z-index: 100;
}

.dropdown.open {
  display: flex;
}

.dropdown button {
  background: none;
  border: none;
  padding: 10px 12px;
  text-align: left;
  color: white;
  cursor: pointer;
  font-weight: 500;
}

.dropdown button:hover {
  background: #1f2937;
}

/* =========================
   HERO
========================= */
.hero {
  text-align: center;
  padding: 80px 20px;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 15px;
}

.hero p {
  color: #b7c7dc;
  max-width: 700px;
  margin: auto;
  line-height: 1.8;
}

/* =========================
   GRID CARDS
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

/* =========================
   CARD
========================= */
.card {
  background: #0f1c2e;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: #42b3ff;
}

.card h3 {
  color: #42b3ff;
  margin-bottom: 10px;
}

.card p {
  color: #b7c7dc;
  line-height: 1.7;
}

/* =========================
   BUTTON
========================= */
.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg,#1d9bf0,#2563eb);
  color: white;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
  margin-top: 10px;
  width: 100%;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
}

/* =========================
   MOBILE FIXES
========================= */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 32px;
  }
  .menu {
    display: none;
  }
  .topbar {
    justify-content: space-between; /* يحافظ على شعار و user-box على الهواتف */
  }
}

.topbar {
  background: #07111f;
  color: white;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* SIDEBAR */
/* ===================== TOPBAR ===================== */

.topbar{
  width:100%;
  height:64px;
  background:#0f172a;
  border-bottom:1px solid rgba(255,255,255,0.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 24px;
  position:sticky;
  top:0;
  z-index:1000;
  box-shadow:0 8px 24px rgba(0,0,0,0.25);
}

.left{
  display:flex;
  align-items:center;
  gap:14px;
}

.menu-btn{
  width:42px;
  height:42px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#13253b;
  color:#dbeafe;
  font-size:22px;
  cursor:pointer;
  transition:0.25s;
}

.menu-btn:hover{
  background:#1d9bf0;
  color:white;
  transform:translateY(-2px);
}

.logo{
  font-size:18px;
  font-weight:800;
  color:#42b3ff;
}

/* ===================== USER BOX ===================== */

.user-box{
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  background:#13253b;
  color:#dbeafe;
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  transition:0.25s;
  border:1px solid rgba(255,255,255,0.06);
}

.user-box:hover{
  background:#1f2f46;
  color:white;
}

.dropdown{
  position:absolute;
  right:0;
  top:52px;
  width:190px;
  background:#0f1c2e;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:16px;
  overflow:hidden;
  display:none;
  box-shadow:0 12px 30px rgba(0,0,0,0.4);
  z-index:2000;
}

.dropdown.open{
  display:block;
}

.dropdown button{
  width:100%;
  padding:13px 15px;
  background:none;
  border:none;
  color:#dbeafe;
  text-align:left;
  cursor:pointer;
  font-weight:600;
  transition:0.25s;
}

.dropdown button:hover{
  background:#13253b;
  color:#42b3ff;
}

/* ===================== SIDEBAR ===================== */

.sidebar{
  position:fixed;
  top:64px;
  left:-280px;
  width:260px;
  height:calc(100vh - 64px);
  background:#0b1627;
  border-right:1px solid rgba(255,255,255,0.06);
  padding:22px 16px;
  z-index:999;
  transition:0.3s ease;
  box-shadow:12px 0 30px rgba(0,0,0,0.35);
}

.sidebar.open{
  left:0;
}

.sidebar button{
  width:100%;
  margin-bottom:12px;
  padding:14px 16px;
  border:none;
  border-radius:14px;
  background:#0f1c2e;
  color:#dbeafe;
  font-size:15px;
  font-weight:700;
  text-align:left;
  cursor:pointer;
  transition:0.25s;
  border:1px solid rgba(255,255,255,0.05);
}

.sidebar button:hover{
  background:#13253b;
  color:#42b3ff;
  transform:translateX(5px);
}

/* ===================== PAGE SPACING ===================== */

.container{
  max-width:900px;
  margin:45px auto;
  padding:0 20px;
}

.card{
  background:#0f1c2e;
  border:1px solid rgba(255,255,255,0.06);
  border-radius:22px;
  padding:28px;
  box-shadow:0 10px 28px rgba(0,0,0,0.25);
}

h1{
  margin-bottom:25px;
  color:#42b3ff;
}

.btn{
  background:linear-gradient(135deg,#1d9bf0,#2563eb);
  color:white;
  border:none;
  padding:12px 20px;
  border-radius:14px;
  font-weight:800;
  cursor:pointer;
  margin:6px;
  transition:0.25s;
}

.btn:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 20px rgba(37,99,235,0.35);
}

/* ===================== MOBILE ===================== */

@media(max-width:768px){
  .topbar{
    padding:0 14px;
  }

  .logo{
    font-size:15px;
  }

  .user-box{
    padding:8px 10px;
    font-size:14px;
  }

  .sidebar{
    width:240px;
    left:-260px;
  }

  .container{
    margin:30px auto;
  }
}
.top-avatar{
  width:34px;
  height:34px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid rgba(66,179,255,0.5);
  background:#13253b;
}