/* ========================================
   MISIO MOHMED - ADMIN CSS
   Premium Dashboard Styles
   ======================================== */

.admin-body {
  background-color: var(--black);
  margin: 0;
  overflow: hidden;
}

.admin-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--black-2);
  border-left: var(--border-gold);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  z-index: 1001;
}

.sidebar-logo {
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--white-05);
}

.sidebar-user {
  padding: 20px 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--white-05);
  margin: 20px;
  border-radius: var(--radius);
}

.sidebar-avatar {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--black);
  font-size: 1.2rem;
}

.sidebar-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.sidebar-role {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 10px 20px;
  overflow-y: auto;
}

/* Custom scrollbar for sidebar */
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--white-10); border-radius: 2px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  color: var(--white-70);
  text-decoration: none;
  border-radius: var(--radius);
  transition: var(--transition);
  margin-bottom: 5px;
  font-size: 0.95rem;
}

.sidebar-link:hover, .sidebar-link.active {
  background: var(--gold-alpha-10);
  color: var(--gold);
}

.sidebar-header {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--white-20);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 25px 15px 8px;
  padding-right: 5px;
  border-right: 2px solid var(--gold-alpha-20);
}

.active-subtab {
  background: var(--gold) !important;
  color: var(--black) !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 15px rgba(201,168,76,0.3);
}

.sidebar-divider {
  height: 1px;
  background: var(--white-05);
  margin: 15px 0;
}

/* Main Content */
.admin-main {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  background: radial-gradient(circle at top right, var(--black-2), var(--black));
}

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

.admin-page-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--white);
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-time {
  color: var(--white-50);
  font-size: 0.9rem;
}

/* Analytics */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--black-3);
  border: 1px solid var(--white-05);
  padding: 24px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--gold-alpha-20);
  transform: translateY(-5px);
}

.stat-title {
  color: var(--white-50);
  font-size: 0.85rem;
  font-weight: 600;
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
}

.stat-diff {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-up { color: #22C55E; }
.stat-down { color: #EF4444; }

/* Tabs */
.admin-tab {
  display: none;
}

.admin-tab.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tables */
.admin-table-wrapper {
  background: var(--black-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--white-05);
  overflow: hidden;
}

/* Service Grid */
.admin-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.svc-card {
  background: var(--black-3);
  border: 1px solid var(--white-05);
  border-radius: var(--radius-lg);
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: var(--transition);
}

.svc-card:hover {
  border-color: var(--gold);
}

.svc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.svc-icon {
  font-size: 2rem;
}

.svc-price {
  background: var(--gold-alpha-10);
  color: var(--gold);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
}

.svc-name {
  font-size: 1.2rem;
  font-weight: 800;
}

.svc-desc {
  color: var(--white-50);
  font-size: 0.85rem;
  line-height: 1.6;
}

.svc-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

/* Modals */
.modal {
  background: var(--black-2);
  border: var(--border-gold);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  padding: 30px;
  position: relative;
  box-shadow: var(--shadow-dark);
}

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

.modal-close {
  background: none;
  border: none;
  color: var(--white-50);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--gold);
}

/* Responsiveness */
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    right: -280px;
    height: 100%;
  }
  .sidebar.active {
    right: 0;
  }
  .sidebar-toggle {
    display: block;
  }
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open {
  display: flex;
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  background: var(--black-4);
  color: var(--gold);
  padding: 14px 16px;
  text-align: right;
  font-weight: 700;
  border-bottom: 1px solid var(--white-05);
}
.data-table td {
  padding: 14px 16px;
  color: var(--white-70);
  border-bottom: 1px solid var(--white-05);
  vertical-align: middle;
}
.data-table tr:hover td {
  background: var(--white-05);
  color: var(--white);
}

/* Tab Header */
.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.tab-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
}

/* Charts Row */
.charts-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.chart-card {
  flex: 1;
  min-width: 280px;
  background: var(--black-3);
  border: 1px solid var(--white-05);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.chart-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}
.badge-pending   { background: rgba(234,179,8,0.15);  color: #EAB308; }
.badge-confirmed { background: rgba(59,130,246,0.15); color: #3B82F6; }
.badge-completed { background: rgba(34,197,94,0.15);  color: #22C55E; }
.badge-cancelled { background: rgba(239,68,68,0.15);  color: #EF4444; }

/* Sidebar Toggle */
.sidebar-toggle {
  background: none;
  border: 1px solid var(--white-10);
  color: var(--white);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  display: none;
  font-size: 1.1rem;
}
