:root {
  --primary-color: #8e44ad;
  --secondary-color: #9b59b6;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --info-color: #3498db;
  --light-bg: #f5f5f5;
  --dark-bg: #2c3e50;
  --text-color: #333;
  --border-color: #ddd;
  --sidebar-width: 250px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  background-color: var(--light-bg);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

ul {
  list-style: none;
}

.admin-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  background-color: var(--dark-bg);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  transition: all 0.3s ease;
}

.sidebar-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  font-size: 1.5rem;
  color: white;
}

.sidebar-nav {
  padding: 20px 0;
}

.sidebar-nav ul li a {
  display: block;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  border-right: 3px solid transparent;
}

.sidebar-nav ul li a:hover,
.sidebar-nav ul li a.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-right-color: var(--primary-color);
}

.sidebar-footer {
  padding: 15px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.sidebar-footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

.sidebar-footer a:hover {
  color: white;
}

/* Main Content */
.admin-content {
  flex: 1;
  margin-right: var(--sidebar-width);
  padding: 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.admin-header h1 {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.admin-user {
  display: flex;
  align-items: center;
}

.admin-user span {
  margin-left: 15px;
}

.logout-btn {
  background-color: var(--danger-color);
  color: white;
  padding: 5px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.logout-btn:hover {
  background-color: #c0392b;
  color: white;
}

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

.stat-card {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  display: flex;
  align-items: center;
}

.stat-icon {
  font-size: 2rem;
  margin-left: 15px;
  color: var(--primary-color);
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-label {
  color: #777;
  font-size: 0.9rem;
}

.dashboard-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dashboard-section {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
}

.section-title {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
  padding: 12px 15px;
  text-align: right;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  background-color: var(--light-bg);
  font-weight: bold;
}

.admin-table tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.status-pending {
  background-color: rgba(243, 156, 18, 0.2);
  color: #f39c12;
}

.status-completed {
  background-color: rgba(39, 174, 96, 0.2);
  color: #27ae60;
}

.status-cancelled {
  background-color: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

/* Forms */
.form-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(142, 68, 173, 0.2);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: var(--secondary-color);
}

.btn-secondary {
  background-color: #7f8c8d;
}

.btn-secondary:hover {
  background-color: #95a5a6;
}

.btn-success {
  background-color: var(--success-color);
}

.btn-success:hover {
  background-color: #2ecc71;
}

.btn-danger {
  background-color: var(--danger-color);
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-info {
  background-color: var(--info-color);
}

.btn-info:hover {
  background-color: #2980b9;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.9rem;
}

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* Alerts */
.alert {
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.alert-success {
  background-color: rgba(39, 174, 96, 0.2);
  border: 1px solid #27ae60;
  color: #27ae60;
}

.alert-danger {
  background-color: rgba(231, 76, 60, 0.2);
  border: 1px solid #e74c3c;
  color: #e74c3c;
}

.alert-warning {
  background-color: rgba(243, 156, 18, 0.2);
  border: 1px solid #f39c12;
  color: #f39c12;
}

.alert-info {
  background-color: rgba(52, 152, 219, 0.2);
  border: 1px solid #3498db;
  color: #3498db;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 5px;
  border-radius: 5px;
  background-color: white;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  transition: all 0.3s ease;
}

.pagination a:hover {
  background-color: var(--light-bg);
}

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

/* Responsive */
@media (max-width: 992px) {
  .dashboard-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    width: 0;
    z-index: 1000;
  }

  .admin-sidebar.active {
    width: var(--sidebar-width);
  }

  .admin-content {
    margin-right: 0;
  }

  .stats-container {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* Toggle Button for Mobile */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .sidebar-toggle {
    display: block;
  }
}

/* استایل‌های تقویم شمسی */
.datepicker-plot-area {
  font-family: "IRANSans", "Tahoma", sans-serif !important;
  z-index: 1000;
}

.datepicker-plot-area .datepicker-day-view .table-days td span {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.datepicker-plot-area .datepicker-day-view .table-days td.selected span,
.datepicker-plot-area .datepicker-day-view .table-days td span:hover {
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
}

.datepicker-plot-area .datepicker-day-view .table-days td.disabled span {
  color: #ccc;
}

.datepicker-plot-area .datepicker-header .btn-next,
.datepicker-plot-area .datepicker-header .btn-prev {
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  font-size: 20px;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.datepicker-plot-area .toolbox .btn-today {
  background-color: var(--primary-color);
  color: white;
  border-radius: 5px;
  padding: 5px 10px;
}

.datepicker-plot-area .datepicker-header .header-year,
.datepicker-plot-area .datepicker-header .header-month {
  font-size: 14px;
  font-weight: bold;
}

/* Modern admin UI enhancements - 2026 */
.admin-content{background:#f6f8fc;min-height:100vh;padding:28px}
.admin-header{background:linear-gradient(135deg,#fff,#f8f5ff);border:1px solid #ece8f7;border-radius:20px;padding:22px 26px;box-shadow:0 8px 28px rgba(35,25,70,.06);margin-bottom:22px}
.form-container,.filter-container,.bulk-actions,.table-responsive{background:#fff;border:1px solid #edf0f6;border-radius:20px;box-shadow:0 8px 26px rgba(30,42,80,.05);padding:24px;margin-bottom:22px}
.form-section{background:#fbfcff;border:1px solid #eef1f7;border-radius:16px;padding:20px;margin-bottom:18px}
.form-section-title,.section-title,.form-title{font-weight:800;color:#29234b}
.form-control,.form-select,.form-textarea{border:1px solid #dfe4ef;border-radius:12px;min-height:44px;transition:.2s;background:#fff}
.form-control:focus,.form-select:focus,.form-textarea:focus{border-color:#8b6ee8;box-shadow:0 0 0 4px rgba(139,110,232,.12)}
.btn{border:0;border-radius:11px;padding:11px 18px;font-weight:700;cursor:pointer;transition:transform .18s,box-shadow .18s}
.btn:hover{transform:translateY(-1px);box-shadow:0 6px 15px rgba(40,30,80,.12)}
.admin-table{border-collapse:separate;border-spacing:0;overflow:hidden;border:1px solid #edf0f6;border-radius:14px}
.admin-table thead th{background:#f6f4fc;color:#51466f;font-weight:800;border-bottom:1px solid #e9e5f4;padding:15px 12px;white-space:nowrap}
.admin-table tbody td{padding:14px 12px;border-bottom:1px solid #f0f2f7;vertical-align:middle}
.admin-table tbody tr:hover{background:#faf9ff}
.status-badge{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:6px 12px;font-size:.82rem;font-weight:800}
.status-pending{background:#fff4d8;color:#986b00}.status-completed{background:#e3f8ed;color:#167244}.status-cancelled{background:#ffe6e8;color:#b42335}
.time-slots{gap:8px}.time-slot{border-radius:10px;background:#fff;border-color:#e2e5ef}.time-slot.selected{box-shadow:0 5px 12px rgba(80,50,150,.18)}
@media(max-width:768px){.admin-content{padding:14px}.form-container,.filter-container,.bulk-actions,.table-responsive{padding:15px;border-radius:15px}.admin-header{padding:18px}.admin-table{font-size:.85rem}}
