
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  direction: rtl;
  background: #e9ecef;
}
.sidebar {
  width: 250px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  height: 100vh;
  padding: 20px;
  position: fixed;
  right: 0;
  top: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.sidebar h2 {
  margin-top: 0;
  color: #111;
}
.sidebar ul {
  list-style: none;
  padding: 0;
}
.sidebar ul li {
  margin: 12px 0;
}
.sidebar ul li a {
  text-decoration: none;
  color: #222;
  font-weight: bold;
  display: inline-block;
}
.sidebar ul li a:hover {
  color: #007bff;
}
.content {
  margin-right: 270px;
  padding: 40px;
}


/* تنسيق الكروت */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.card {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
  color: #111;
}
.card h3 {
  margin: 0;
  font-size: 20px;
}
.card span {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  font-weight: bold;
  color: #009688;
}
.card:hover {
  transform: translateY(-3px);
  transition: 0.2s;
  cursor: pointer;
}


.card-icon {
  font-size: 36px;
  margin-bottom: 10px;
  display: block;
}

.card.blue {
  background: rgba(0, 123, 255, 0.2);
  color: #004085;
}
.card.green {
  background: rgba(40, 167, 69, 0.2);
  color: #155724;
}
.card.orange {
  background: rgba(255, 193, 7, 0.2);
  color: #856404;
}
.card.red {
  background: rgba(220, 53, 69, 0.2);
  color: #721c24;
}

.card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}


/* إخفاء الشريط الجانبي عند الطباعة */
@media print {
  .sidebar {
    display: none !important;
  }
  body {
    background: white !important;
    margin: 0 !important;
  }
  .content {
    margin: 0 !important;
    padding: 0 40px;
    width: 100%;
  }
  .card {
    background: none !important;
    box-shadow: none !important;
    border: 1px solid #ccc;
    padding: 20px;
  }
  .card h2, h3 {
    text-align: center;
    margin-top: 0;
  }
  input, select, button {
    border: none;
    font-size: 16px;
  }
  table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
  }
  th, td {
    border: 1px solid #ccc;
    padding: 10px;
  }
  .actions, .history {
    display: none;
  }
}


.sidebar ul li ul {
  list-style: none;
  padding-right: 15px;
  margin-top: 5px;
  display: none;
  transition: all 0.3s ease-in-out;
}

.sidebar ul li ul li {
  margin: 8px 0;
}

.sidebar ul li ul li a {
  font-size: 14px;
  font-weight: normal;
  color: #444;
}

.sidebar ul li ul li a:hover {
  color: #007bff;
}

.sidebar ul li.active ul {
  display: block;
}

/* الوضع الليلي */
body.dark {
  background: #1c1c1c !important;
  color: #f0f0f0 !important;
}
body.dark .card {
  background: rgba(40, 40, 40, 0.6) !important;
  color: #f0f0f0 !important;
}
body.dark .sidebar {
  background: rgba(30, 30, 30, 0.4) !important;
}
body.dark .sidebar a {
  color: #ccc !important;
}
body.dark .sidebar a:hover {
  color: #00bcd4 !important;
}


/* أزرار موحدة */
button {
  padding: 10px 20px;
  background-color: #007bff;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
  font-weight: bold;
}
button:hover {
  background-color: #0056b3;
}

/* الجداول */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
th, td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
}
th {
  background-color: #f5f5f5;
  font-weight: bold;
}
tr:hover {
  background-color: #f0f8ff;
}

/* الكروت */
.card {
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
}

/* الحقول */
input, select {
  width: 100%;
  padding: 10px;
  border: 1px solid #aaa;
  border-radius: 5px;
  font-size: 14px;
  margin-top: 5px;
}

/* تباعد النصوص */
label {
  font-weight: bold;
  margin-top: 10px;
  display: block;
}

/* تحسين الحركات */
.card:hover {
  transform: scale(1.01);
  transition: all 0.3s ease;
}
