:root {
  --primary: #6200ea;
  --primary-light: #9d46ff;
  --primary-dark: #0a00b6;
  --secondary: #03dac6;
  --danger: #cf6679;
  --success: #03da63;
  --warning: #ffde03;
  --background: #f5f5f5;
  --card: #ffffff;
  --text: #121212;
  --text-light: #666666;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--background);
  color: var(--text);
  direction: rtl;
}

.container, .content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header, .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: bold;
  color: var(--primary);
}

.logo svg {
  width: 32px;
  height: 32px;
  fill: var(--primary);
}

.stats-cards, .stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background-color: var(--card);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.card-title {
  font-size: 16px;
  color: var(--text-light);
  margin: 0;
}

.card-icon {
  width: 24px;
  height: 24px;
  fill: var(--primary);
}

.card-value {
  font-size: 28px;
  font-weight: bold;
  margin: 0;
}

.card-change {
  font-size: 14px;
  margin-top: 5px;
}

.positive { color: var(--success); }
.negative { color: var(--danger); }

.table-container {
  background-color: var(--card);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  overflow-x: auto;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 15px;
  text-align: right;
  border-bottom: 1px solid #e0e0e0;
}

thead th {
  font-weight: 600;
  color: var(--text-light);
}

tbody tr:hover {
  background-color: #f9f9f9;
}

.btn, a.button-small {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 5px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn:hover, a.button-small:hover {
  background-color: var(--primary-dark);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
}

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-input, input[type="text"], select {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  font-size: 14px;
}

.account-avatar, .avatar-placeholder {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #e0e0e0;
}

.account-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success { background-color: rgba(3, 218, 99, 0.1); color: var(--success); }
.badge-warning { background-color: rgba(255, 222, 3, 0.1); color: var(--warning); }
.badge-danger { background-color: rgba(207, 102, 121, 0.1); color: var(--danger); }

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
}

.tab.active {
  background-color: var(--primary);
  color: white;
}

.tab:not(.active) {
  background-color: #e0e0e0;
  color: var(--text);
}

.chart-container, .chart-placeholder {
  background-color: var(--card);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.chart {
  height: 300px;
  position: relative;
}

.chart svg {
  width: 100%;
  height: 100%;
}

.chart-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 5px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 768px) {
  #controls, .header { flex-direction: column; align-items: flex-start; }
  .stats-cards { grid-template-columns: 1fr; }
  .table-container { overflow-x: auto; }
  table, thead, tbody, th, td, tr { display: block; }
  thead tr { position: absolute; top: -9999px; left: -9999px; }
  tr { margin-bottom: 16px; }
  td { border: none; position: relative; padding-left: 50%; text-align: right; }
  td:before { position: absolute; left: 16px; width: 45%; white-space: nowrap; font-weight: bold; }
  td:nth-of-type(1):before { content: "ID"; }
  td:nth-of-type(2):before { content: "משתמש"; }
  td:nth-of-type(3):before { content: "עוקבים"; }
  td:nth-of-type(4):before { content: "שינוי יומי"; }
  td:nth-of-type(5):before { content: "7 ימים"; }
  td:nth-of-type(6):before { content: "14 ימים"; }
  td:nth-of-type(7):before { content: "30 ימים"; }
  td:nth-of-type(8):before { content: "עדכון אחרון"; }
  td:nth-of-type(9):before { content: "פעולות"; }
}
