* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #9DB2BF;
    direction: rtl;
    display: flex;
}

/* الشريط الجانبي */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #27374D 0%, #0b0c14 100%);
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.logo {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.logo h2 {
    color: white;
    font-size: 22px;
}

.nav-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color:  white;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 15px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
     color: white;
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-right: 4px solid white;
}

.nav-item .icon {
    margin-left: 12px;
    font-size: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info {
    color: white;
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.btn-logout {
    display: block;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* المحتوى الرئيسي */
.main-content {
    margin-right: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
}

@keyframes slideFadeDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.top-bar {
  background: linear-gradient(135deg, #526D82, #394867);
  padding: 25px 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideFadeDown 0.6s ease-out;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  position: relative;
  z-index: 10;
}


.top-bar h1 {
    color: white;
    font-size: 28px;
}

.content-area {
    padding: 30px 40px;
}

/* البطاقات الإحصائية */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-card .icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.stat-card h3 {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .number {
    color: #2c3e50;
    font-size: 32px;
    font-weight: bold;
}
.stats-grid1 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card1 {
    background: #F0F0F0;
    padding: 8px 8px 0px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    overflow: hidden;
    cursor: pointer;
    
}

.stat-card1:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-card1 .icon {
    font-size: 40px;
    margin-bottom: 10px;
}


.stat-card1 h3 {
    color: #334443;
    font-size: 14px;
    margin: 10px;
    text-align: center;
    font-weight: bold;
  
}

.stat-card1 .number {
    color: #2c3e50;
    font-size: 32px;
    text-align: center;
    font-weight: bold;
    
}


.stat-card1 .ae {
  width: 100%;
  height: 203px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  transition: transform 0.4s ease;
  overflow: hidden;
  
}

.stat-card1:hover .ae {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* الجدول */
.table-container {
    background: linear-gradient(135deg, #526D82 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(236, 236, 245, 0.05);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
   background-color: #efedf3;
}

th {
    padding: 15px;
    text-align: right;
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    color: #555;
}

tr:hover {
    background-color: #DDE6ED;
}

/* الأزرار */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #0b025c 0%, #0b0c14 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background-color: #67C090;
    color: white;
}

.btn-danger {
    background-color: #DD0303;
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    margin: 0 3px;
}

/* النماذج */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}