/* Modern Uzbek Ministry Admin Design Token Styles */
:root {
  --sidebar-width: 260px;
  --bg-main: #f8fafc;
  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active: #ffffff;
  --sidebar-active-bg: #1e293b;
  --accent-blue: #2563eb;
  --accent-hover: #1d4ed8;
  --border-color: #e2e8f0;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: #1e293b;
  min-height: 100vh;
  margin: 0;
}

/* Sidebar Styling */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease-in-out;
}

.sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  background: var(--accent-blue);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.sidebar-brand {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.sidebar-menu {
  padding: 1rem 0.75rem;
  list-style: none;
  margin: 0;
  flex-grow: 1;
}

.menu-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 0.75rem 1rem 0.35rem 1rem;
  font-weight: 600;
}

.menu-item {
  margin-bottom: 4px;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.65rem 1rem;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.menu-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}

.menu-link.active {
  color: var(--sidebar-active);
  background-color: var(--accent-blue);
  font-weight: 600;
}

.menu-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

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

.top-navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-title-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-pill {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: capitalize;
}

.role-super_admin { background: #dbeafe; color: #1e40af; }
.role-province_admin { background: #fef3c7; color: #92400e; }
.role-district_admin { background: #dcfce7; color: #166534; }

.main-body {
  padding: 1.75rem;
  flex-grow: 1;
}

/* Statistics Cards */
.stat-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  margin-top: 4px;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.bg-icon-blue { background: #eff6ff; color: #2563eb; }
.bg-icon-green { background: #f0fdf4; color: #16a34a; }
.bg-icon-orange { background: #fff7ed; color: #ea580c; }
.bg-icon-purple { background: #faf5ff; color: #9333ea; }

/* Custom Tables */
.table-custom {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

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

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

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

.table-custom tr:hover td {
  background-color: #f1f5f9;
}

.employee-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}

.employee-avatar-34 {
  width: 120px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  border: 2px solid #cbd5e1;
}

/* History Timeline */
.timeline {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid #cbd5e1;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-blue);
  border: 2px solid #ffffff;
}

.timeline-item.active::before {
  background: #16a34a;
}
