@charset "UTF-8";

/* ==========================================================================
   Apple macOS / iPadOS Style Admin Dashboard UI
   HIG Clarity, Deference, and Depth
   ========================================================================== */

:root {
  --admin-sidebar-width: 270px;
  --admin-topbar-height: 64px;
}

body.admin-body {
  background-color: var(--system-bg);
  color: var(--label);
  font-family: var(--font-system);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
}

/* Sidebar - Liquid Glass Translucency */
.admin-sidebar {
  width: var(--admin-sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-left: 1px solid var(--separator);
  z-index: 1030;
  display: flex;
  flex-direction: column;
  transition: transform var(--duration-normal) var(--spring-default);
}

.admin-sidebar-brand {
  height: auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--separator);
}

.admin-sidebar-brand img {
  max-height: 48px;
  max-width: 100%;
}

.admin-nav-menu {
  flex: 1;
  padding: 18px 14px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
}

.admin-nav-header {
  font-size: var(--type-caption-1);
  font-weight: 600;
  color: var(--tertiary-label);
  text-transform: uppercase;
  letter-spacing: normal;
  padding: 14px 12px 6px;
}

.admin-nav-item {
  margin-bottom: 3px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  min-height: var(--tap-target-min);
  padding: 10px 14px;
  color: var(--secondary-label);
  font-weight: 500;
  font-size: var(--type-callout);
  border-radius: var(--radius-md);
  transition: all var(--duration-quick) ease;
  text-decoration: none;
}

.admin-nav-link i {
  font-size: 1.15rem;
  width: 26px;
  margin-left: 10px;
  color: var(--tertiary-label);
  transition: color var(--duration-quick) ease;
}

.admin-nav-link:hover {
  background: var(--system-fill);
  color: var(--label);
}

.admin-nav-link:hover i {
  color: var(--system-blue);
}

.admin-nav-link.active {
  background: rgba(var(--system-blue-rgb), 0.14);
  color: var(--system-blue);
  font-weight: 500;
}

.admin-nav-link.active i {
  color: var(--system-blue);
}

.admin-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--separator);
  background: var(--secondary-system-bg);
  font-size: var(--type-footnote);
  color: var(--secondary-label);
}

/* Main Content Area */
.admin-main-wrapper {
  margin-right: var(--admin-sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  height: var(--admin-topbar-height);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--separator);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.admin-content {
  padding: 32px 28px;
  flex: 1;
}

/* macOS Inset Stat Cards */
.stat-card {
  background: var(--secondary-system-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--separator);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-normal) var(--spring-default), 
              box-shadow var(--duration-normal) var(--spring-default);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-floating);
}

.stat-card::before {
  display: none;
}

.stat-info h3 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--label);
  letter-spacing: normal;
}

.stat-info p {
  font-size: var(--type-subhead);
  font-weight: 400;
  color: var(--secondary-label);
  margin: 6px 0 0;
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-card.card-blue .stat-icon { background: rgba(var(--system-blue-rgb), 0.12); color: var(--system-blue); }
.stat-card.card-teal .stat-icon { background: rgba(48, 176, 199, 0.12); color: var(--system-teal); }
.stat-card.card-amber .stat-icon { background: rgba(255, 149, 0, 0.12); color: var(--system-orange); }
.stat-card.card-purple .stat-icon { background: rgba(175, 82, 222, 0.12); color: var(--system-purple); }
.stat-card.card-green .stat-icon { background: rgba(52, 199, 89, 0.12); color: var(--system-green); }
.stat-card.card-red .stat-icon { background: rgba(255, 59, 48, 0.12); color: var(--system-red); }

/* Table Container (macOS Inset Group) */
.admin-card {
  background: var(--secondary-system-bg);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--separator);
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
  overflow: hidden;
}

.admin-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--separator);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
}

.admin-card-header h5 {
  margin: 0;
  font-weight: 600;
  font-size: var(--type-title-3);
  color: var(--label);
}

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

.admin-table th {
  background: var(--system-fill);
  color: var(--secondary-label);
  font-weight: 500;
  font-size: var(--type-footnote);
  padding: 12px 18px;
  border-bottom: 1px solid var(--separator);
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 18px;
  vertical-align: middle;
  border-bottom: 1px solid var(--separator);
  font-size: var(--type-callout);
  color: var(--label);
}

.admin-table tbody tr:hover {
  background: var(--system-fill);
}

/* Timeline */
.timeline-list {
  position: relative;
  padding-right: 28px;
  list-style: none;
  margin: 0;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  right: 10px;
  width: 2px;
  background: var(--separator);
}

.timeline-item {
  position: relative;
  margin-bottom: 22px;
}

.timeline-point {
  position: absolute;
  top: 2px;
  right: -24px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--system-blue);
  border: 3px solid var(--secondary-system-bg);
}

.timeline-body {
  background: var(--system-bg);
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

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

.timeline-title {
  font-weight: 600;
  font-size: var(--type-callout);
  color: var(--label);
}

.timeline-time {
  font-size: var(--type-caption-1);
  color: var(--tertiary-label);
}

.timeline-notes {
  font-size: var(--type-footnote);
  color: var(--secondary-label);
  margin: 0;
}

/* Responsive */
@media (max-width: 991.98px) {
  .admin-sidebar {
    transform: translateX(100%);
  }
  .admin-sidebar.show {
    transform: translateX(0);
  }
  .admin-main-wrapper {
    margin-right: 0;
  }
}
