:root {
  --primary: #1e293b;
  --primary-rgb: 30, 41, 59;
  --secondary: #d97706;
  --secondary-rgb: 217, 119, 6;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --sidebar-w: 260px;
  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active: #ffffff;
  --sidebar-active-bg: rgba(255, 255, 255, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar.collapsed {
  width: 72px;
}

.sidebar .brand {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar.collapsed .brand {
  justify-content: center;
  padding: 0;
}

.sidebar.collapsed .brand-text {
  display: none;
}

.sidebar .menu {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar .menu-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.sidebar .menu-item:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}

.sidebar .menu-item.active {
  color: var(--sidebar-active);
  background-color: var(--secondary);
}

.sidebar .menu-item i {
  font-size: 1.1rem;
  min-width: 24px;
  display: flex;
  justify-content: center;
}

.sidebar.collapsed .menu-item {
  justify-content: center;
  padding: 12px;
}

.sidebar.collapsed .menu-item span {
  display: none;
}

/* Content Area */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.topbar {
  height: 64px;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-title {
  font-weight: 600;
  font-size: 1.1rem;
}

/* Cards */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.card-header {
  padding: 1.25rem;
  background-color: transparent;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.card-body {
  padding: 1.25rem;
}

/* KPI Cards */
.card-kpi {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s;
}

.card-kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.kpi-label {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Tables */
.table-responsive {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

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

.table th {
  background-color: #f8fafc;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.table tr:last-child td {
  border-bottom: 0;
}

/* Badges */
.badge {
  padding: 0.35em 0.65em;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.75rem;
}

.bg-pending { background-color: #fef3c7; color: #b45309; }
.bg-process { background-color: #e0f2fe; color: #0369a1; }
.bg-done { background-color: #dcfce7; color: #15803d; }
.bg-rejected { background-color: #fee2e2; color: #b91c1c; }

/* Utilities */
.text-muted { color: var(--text-muted) !important; }
.fw-semibold { font-weight: 600 !important; }

/* Mobile Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 45;
  display: none;
  backdrop-filter: blur(2px);
}

@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .sidebar.collapsed {
    width: var(--sidebar-w); /* Mobile doesn't do mini sidebar */
  }
}
