
body {
  margin: 0;
  padding: 0;
  font-family: 'Cairo', Arial, sans-serif;
  background: linear-gradient(135deg, #e9e9f1 0%, #f6f7fa 100%);
  color: #222;
}

.sidebar {
  width: 320px;
  min-height: 100vh;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 4px 32px 0 rgba(60, 60, 100, 0.08);
  padding: 32px 18px 80px 18px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.logo {
  font-size: 2.2rem;
  font-weight: 800;
  color: #5e50fa;
  letter-spacing: 2px;
  margin-bottom: 32px;
  text-align: center;
  font-family: 'Cairo', Arial, sans-serif;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav li {
  margin: 7px 0;
}

.section-title {
  font-size: 1.07rem;
  font-weight: 800;
  color: #999;
  margin: 22px 0 7px 0;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.sub-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: #6a7cff;
  margin: 15px 0 2px 0;
  letter-spacing: 1px;
  padding-right: 12px;
}

.sub-list {
  margin-right: 18px;
}

.sub-list li a {
  font-size: 0.98rem;
  font-weight: 500;
  color: #446ae4;
  letter-spacing: 0.3px;
  border-right: 2.5px solid #e6e7f6;
  padding-right: 12px;
}

nav li a {
  text-decoration: none;
  color: #2b2d36;
  font-size: 1.09rem;
  font-weight: 700;
  transition: 0.14s;
  border-radius: 6px;
  padding: 6px 12px;
  display: block;
}

nav li a:hover {
  background: linear-gradient(90deg, #e3e7fe 0%, #d4e0fd 100%);
  color: #3b51c8;
}

.logout {
  margin-top: 26px;
  text-align: center;
  position: absolute;
  bottom: 20px;
  width: 90%;
  right: 5%;
}

.logout a {
  background: linear-gradient(90deg, #ff6e72 0%, #a469f5 100%);
  color: #fff;
  font-weight: 700;
  border-radius: 7px;
  padding: 12px 30px;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 2px 14px 0 rgba(160, 90, 255, 0.11);
  font-size: 1.11rem;
  transition: 0.13s;
}

.logout a:hover {
  opacity: 0.8;
}

.main-content {
  margin-right: 340px;
  padding: 60px 40px;
}

@media (max-width: 900px) {
  .sidebar {
    width: 100vw;
    position: static;
    min-height: unset;
    flex-direction: row;
    padding: 8px;
    overflow-x: auto;
  }
  .main-content {
    margin-right: 0;
    padding: 50px 6vw;
  }
}

}
.logout {
  margin-top: 26px;
  text-align: center;
  position: absolute;
  bottom: 20px;
  width: 90%;
  right: 5%;
}
.logout a {
  background: linear-gradient(90deg, #ff6e72 0%, #a469f5 100%);
  color: #fff;
  font-weight: 700;
  border-radius: 7px;
  padding: 12px 30px;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 2px 14px 0 rgba(160, 90, 255, 0.11);
  font-size: 1.11rem;
  transition: 0.13s;
}
.logout a:hover {opacity: 0.8;}
.main-content {
  display: none;
  margin-right: 340px;
  padding: 48px 36px 36px 36px;
}
.main-content:first-of-type {
  display: block;
}
h1 {font-size: 2.2rem; color: #474c85; margin-bottom: 34px;}
.dashboard-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 46px;
}
.card {
  background: linear-gradient(120deg, #f9faff 70%, #eae6ff 120%);
  box-shadow: 0 2px 18px 0 rgba(89, 105, 245, 0.09);
  border-radius: 20px;
  padding: 26px 32px;
  min-width: 190px;
  flex: 1;
  display: flex;
  align-items: center;
  transition: 0.2s;
}
.card:hover {box-shadow: 0 8px 32px 0 rgba(120, 135, 255, 0.12);}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  margin-left: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-icon.products {background: linear-gradient(135deg, #7e7efc 80%, #c3c6ff 100%);}
.card-icon.clients {background: linear-gradient(135deg, #65b7f7 80%, #c6e7ff 100%);}
.card-icon.services {background: linear-gradient(135deg, #fae16b 80%, #fff5d0 100%);}
.card-icon.print {background: linear-gradient(135deg, #aade84 80%, #e2fcd7 100%);}
.card-icon.sales {background: linear-gradient(135deg, #f98a6b 80%, #ffe0d0 100%);}
.card-icon.profit {background: linear-gradient(135deg, #9f8af7 80%, #f0e6ff 100%);}
.card-title {
  color: #7878c0;
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.card-number {
  color: #393a66;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: 0.7px;
}
.dashboard-table {
  background: #fff;
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: 0 2px 20px 0 rgba(120, 135, 255, 0.07);
}
.dashboard-table h2 {
  color: #7376a6;
  font-size: 1.08rem;
  margin-bottom: 12px;
  font-weight: 800;
}
.dashboard-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.03rem;
}
.dashboard-table th,
.dashboard-table td {
  padding: 12px 8px;
  text-align: right;
  border-bottom: 1px solid #f0f0f7;
}
.dashboard-table th {
  background: #f6f6fc;
  color: #8265f7;
  font-weight: 900;
}
/* جداول وكونترول المنتجات والعملاء */
.controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}
#productsTable, #clientsTable {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
#productsTable th, #clientsTable th,
#productsTable td, #clientsTable td {
  padding: 11px 8px;
  border-bottom: 1px solid #e4e4f4;
  text-align: right;
}
#productsTable th, #clientsTable th {
  background: #eee;
  font-weight: bold;
  color: #5555aa;
}
button {
  padding: 6px 12px;
  margin-left: 4px;
  border: none;
  background: #5e50fa;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Cairo', Arial, sans-serif;
}
button:hover { opacity: 0.9; }
/* الفورم */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.22);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-content {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  width: 320px;
  box-shadow: 0 8px 32px 0 rgba(120, 135, 255, 0.14);
}
.modal-content h2 {
  margin-top: 0;
  color: #5e50fa;
}
.modal-content label {
  display: block;
  margin-top: 12px;
  font-weight: 600;
}
.modal-content input {
  width: 100%;
  padding: 7px 8px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Cairo', Arial, sans-serif;
}
.modal-buttons {
  margin-top: 20px;
  text-align: center;
}
.modal-buttons button {
  margin: 0 8px;
}
@media (max-width: 900px) {
  .sidebar {width: 100vw; position: static; min-height: unset; flex-direction: row; padding: 8px;}
  .main-content {margin-right: 0; padding: 20px;}
  .dashboard-cards {flex-direction: column;}
}
