:root {
  --sidebar-width: 240px;
  --sidebar-mini-width: 84px;
  
  /* Edara HR Module Design Tokens - Light Mode */
  --bg-base: #f4f6f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f0f2f5;
  --border: #e2e8f0;
  --border-lt: #edf2f7;
  --text: #1e293b;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --accent: #2563eb;
  --accent-dim: rgba(37, 99, 235, 0.1);
  --accent-glow: rgba(37, 99, 235, 0.15);
  --green: #10b981;
  --green-dim: rgba(16, 185, 129, 0.12);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.12);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.12);
  --purple: #8b5cf6;
  --purple-dim: rgba(139, 92, 246, 0.12);
  --teal: #14b8a6;
  --teal-dim: rgba(20, 184, 166, 0.12);
  --r: 10px;
  --rs: 6px;

  /* Map old system variables to new tokens */
  --admin-bg: var(--bg-base);
  --admin-surface: var(--bg-card);
  --admin-surface-soft: var(--bg-surface);
  --admin-border: var(--border);
  --admin-text: var(--text);
  --admin-muted: var(--text-2);
  --admin-primary: var(--accent);
  --admin-primary-dark: var(--accent-dim);
  --admin-success: var(--green);
  --admin-warning: var(--amber);
  --admin-danger: var(--red);
  --admin-sidebar: var(--bg-surface);
  --admin-sidebar-soft: var(--bg-hover);
  --admin-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --admin-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  --admin-shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --admin-ring: 0 0 0 3px var(--accent-glow);
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border-lt); border-radius: 3px; }

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 87.5%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--admin-bg);
  color: var(--admin-text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

a {
  text-decoration: none;
}

.admin-shell {
  min-height: 100vh;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  /* Custom scrollbar for Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  /* Reserve scrollbar gutter to keep inner content width stable so header/footer dividers align with scrollbar */
  scrollbar-gutter: stable;
  background: var(--admin-sidebar);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 18px 0 42px rgba(15, 23, 42, 0.18);
  transform: translateX(0);
  transition: width 0.2s ease, transform 0.2s ease;
}

/* Custom Scrollbar for Webkit (Chrome, Safari, Edge) */
.admin-sidebar::-webkit-scrollbar {
  width: 5px;
}
.admin-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.admin-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.sidebar-header {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  margin-inline: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  background: var(--admin-sidebar);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  color: #ffffff;
}

.brand-mark:hover,
.brand-mark:focus {
  color: #ffffff;
}

.brand-icon,
.profile-avatar,
.metric-icon,
.nav-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 800;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  color: #ffffff;
}

.brand-logo {
  width: auto;
  height: 52px;
  max-width: 120px;
  border-radius: 6px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-logo-mini {
  display: none;
  width: auto;
  height: 28px;
  max-width: 40px;
  object-fit: contain;
  flex: 0 0 auto;
  margin-left: 12px !important;
}

.brand-copy,
.brand-title,
.brand-subtitle,
.nav-text,
.sidebar-footer-text {
  min-width: 0;
  transition: opacity 0.16s ease, width 0.16s ease;
}

.brand-title,
.brand-subtitle {
  display: block;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-title {
  font-size: 0.92rem;
  font-weight: 500;
}

.brand-subtitle {
  color: #9ca3af;
  font-size: 0.78rem;
}

.sidebar-nav {
  display: grid;
  gap: 0.45rem;
  padding: 1.1rem 1rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: auto;
  padding: 7px 14px;
  margin: 1px 8px;
  border-radius: var(--rs);
  color: var(--text-2);
  font-weight: 500;
  font-size: 12.5px;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus {
  background: var(--bg-hover);
  color: var(--text);
}

.sidebar-nav .nav-link.active {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(74, 175, 214, 0.2);
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus {
  transform: translateX(2px);
}

.nav-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  font-size: 13px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: auto;
  margin-inline: 1.25rem;
  padding: 1rem 0;
  color: #d1d5db;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  white-space: nowrap;
}

.sb-logout {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: auto 1rem 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}

.sb-logout:hover,
.sb-logout:focus {
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
}

.sb-logout i {
  font-size: 0.95rem;
  flex: 0 0 auto;
}

.sidebar-user {
  margin: auto 1rem 1rem;
  padding: 0.85rem;
  display: grid;
  justify-items: center;
  gap: 0.22rem;
  border: 1px solid var(--admin-sidebar-border);
  border-radius: 8px;
  background: var(--admin-sidebar-soft);
  text-align: center;
}

.sidebar-user-avatar {
  border: 3px solid #53e9b9;
}

.sidebar-user strong {
  color: var(--admin-sidebar-text-strong);
  font-size: 1rem;
  line-height: 1.1;
}

.sidebar-user small {
  color: var(--admin-sidebar-muted);
  font-size: 0.84rem;
}

.status-dot,
.notification-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.status-dot {
  flex: 0 0 auto;
  background: #22c55e;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1030;
  display: none;
  background: rgba(15, 23, 42, 0.5);
}

.admin-main {
  width: auto;
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.2s ease;
}

.admin-navbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  min-height: 72px;
  border-bottom: 1px solid var(--admin-border);
  background-color: var(--admin-surface-soft);
}

.admin-navbar.bg-white {
  background-color: var(--admin-surface-soft) !important;
  backdrop-filter: none;
}

.sidebar-toggle {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
  border-color: #bfdbfe;
  background: #f8fbff;
  box-shadow: var(--admin-ring);
}

.sidebar-toggle span {
  width: 13px;
  height: 1.5px;
  display: block;
  background: var(--admin-text);
  border-radius: 999px;
}

.navbar-site-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nst-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--admin-text);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.nst-divider {
  width: 1px;
  height: 18px;
  background: var(--admin-border);
  flex: 0 0 auto;
}

.search-input {
  max-width: 520px;
  border-color: var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-soft);
  min-height: 42px;
  box-shadow: none;
}

.search-input:focus {
  border-color: #93c5fd;
  box-shadow: var(--admin-ring);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-button,
.profile-button {
  border: 1px solid var(--admin-border);
  background: #ffffff;
  color: var(--admin-text);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.icon-button:hover,
.icon-button:focus,
.profile-button:hover,
.profile-button:focus {
  border-color: #bfdbfe;
  box-shadow: var(--admin-ring);
}

.icon-button {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-weight: 800;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--admin-danger);
}

.notification-menu {
  width: min(320px, calc(100vw - 2rem));
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: var(--admin-shadow);
}

.notification-menu .dropdown-item {
  display: grid;
  gap: 0.2rem;
  padding-block: 0.7rem;
  white-space: normal;
}

.notification-title {
  font-weight: 700;
  overflow-wrap: break-word;
}

.notification-time {
  color: var(--admin-muted);
  font-size: 0.82rem;
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-weight: 700;
}

.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #e0ecff;
  color: var(--admin-primary-dark);
  font-size: 0.76rem;
}

.avatar-img {
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center;
}

.avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.avatar-md {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.avatar-xl {
  width: 78px;
  height: 78px;
  border-radius: 50%;
}

.profile-button .avatar-sm {
  border: 2px solid #52e7b8;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .profile-button .avatar-sm {
  border-color: #54f0be;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.dashboard-content {
  min-height: calc(100vh - 132px);
  font-size: 0.875rem;
}

.dashboard-content > .container-fluid {
  padding-top: 1.75rem !important;
  padding-bottom: 1.75rem !important;
}

.page-heading,
.panel-header,
.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.page-heading {
  margin-bottom: 1.35rem;
}

.page-heading h1 {
  font-weight: 700;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--admin-primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  border-radius: var(--rs) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
}

.btn:hover,
.btn:focus {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--accent) !important;
  color: #05121f !important;
  border: none !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #5dbce0 !important;
  color: #05121f !important;
}

.btn-outline-secondary, .btn-secondary, .btn-outline-primary {
  background-color: transparent !important;
  color: var(--text-2) !important;
  border: 1px solid var(--border) !important;
}

.btn-outline-secondary:hover, .btn-secondary:hover, .btn-outline-primary:hover {
  border-color: var(--accent-dim) !important;
  color: var(--text) !important;
  background-color: var(--bg-hover) !important;
}

.btn-danger {
  background-color: var(--red-dim) !important;
  color: var(--red) !important;
  border: 1px solid rgba(240,82,98,0.3) !important;
}

.btn-danger:hover, .btn-danger:focus {
  background-color: rgba(240,82,98,0.2) !important;
  color: var(--red) !important;
}

.btn-success {
  background-color: var(--green-dim) !important;
  color: var(--green) !important;
  border: 1px solid rgba(45,212,160,0.3) !important;
}

.btn-success:hover, .btn-success:focus {
  background-color: rgba(45,212,160,0.2) !important;
  color: var(--green) !important;
}

.btn-warning {
  background-color: var(--amber-dim) !important;
  color: var(--amber) !important;
  border: 1px solid rgba(245,166,35,0.3) !important;
}

.btn-warning:hover, .btn-warning:focus {
  background-color: rgba(245,166,35,0.2) !important;
  color: var(--amber) !important;
}

.btn-info {
  background-color: var(--teal-dim) !important;
  color: var(--teal) !important;
  border: 1px solid rgba(56,200,200,0.3) !important;
}

.btn-info:hover, .btn-info:focus {
  background-color: rgba(56,200,200,0.2) !important;
  color: var(--teal) !important;
}

.btn-sm {
  padding: 4px 10px !important;
  font-size: 11px !important;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--r);
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.stat-card:hover {
  border-color: var(--accent-dim);
  box-shadow: var(--admin-shadow-lg);
  transform: translateY(-3px);
}

.stat-icon-box {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  font-size: 1.15rem;
}

.si-indigo { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
.si-green  { background: rgba(15, 118, 110, 0.12); color: var(--admin-success); }
.si-orange { background: rgba(217, 119, 6, 0.12);  color: var(--admin-warning); }
.si-red    { background: rgba(220, 38, 38, 0.12);  color: var(--admin-danger); }
.si-blue   { background: rgba(37, 99, 235, 0.12);  color: var(--admin-primary); }

.stat-info {
  min-width: 0;
}

.stat-label {
  color: var(--admin-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.stat-value {
  color: var(--admin-text);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

.metric-card,
.panel {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow);
}

.metric-card {
  position: relative;
  min-height: 164px;
  padding: 1.35rem;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--metric-color, var(--admin-primary));
}

.metric-card:hover {
  border-color: #c6d5e8;
  box-shadow: var(--admin-shadow-lg);
  transform: translateY(-3px);
}

.metric-primary {
  --metric-color: var(--admin-primary);
}

.metric-success {
  --metric-color: var(--admin-success);
}

.metric-warning {
  --metric-color: var(--admin-warning);
}

.metric-danger {
  --metric-color: var(--admin-danger);
}

.metric-label {
  color: var(--admin-muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--metric-color, var(--admin-primary));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.metric-success .metric-icon {
  background: #e7f6f3;
}

.metric-warning .metric-icon {
  background: #fff4df;
}

.metric-danger .metric-icon {
  background: #ffecec;
}

.metric-value {
  margin-top: 1rem;
  color: var(--admin-text);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
}

.metric-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.9rem;
  color: var(--admin-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.panel {
  padding: 1.35rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.panel:hover {
  border-color: #c6d5e8;
  box-shadow: var(--admin-shadow-lg);
}

.panel-header {
  margin-bottom: 1.25rem;
}

.panel-header p {
  font-size: 0.92rem;
}

.chart-bars {
  height: 292px;
  display: grid;
  grid-template-columns: repeat(6, minmax(38px, 1fr));
  align-items: end;
  gap: 1rem;
  padding: 1.2rem 0.4rem 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.chart-column {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 0.6rem;
  color: var(--admin-muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.chart-column span {
  width: 100%;
  height: var(--bar-size);
  min-height: 28px;
  display: block;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--admin-primary), var(--admin-success));
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.bar-42 {
  --bar-size: 42%;
}

.bar-58 {
  --bar-size: 58%;
}

.bar-51 {
  --bar-size: 51%;
}

.bar-72 {
  --bar-size: 72%;
}

.bar-66 {
  --bar-size: 66%;
}

.bar-83 {
  --bar-size: 83%;
}

.activity-list {
  display: grid;
  gap: 1.1rem;
}

.activity-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--admin-border);
}

.activity-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.activity-dot {
  width: 12px;
  height: 12px;
  margin-top: 0.45rem;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.08);
}

.table, table.dataTable, table {
  --bs-table-bg: transparent;
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 12px !important;
}

.table > :not(caption) > * > *, table.dataTable > :not(caption) > * > *, table > :not(caption) > * > * {
  padding: 10px 14px !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: none !important;
}

.table thead tr, table.dataTable thead tr, table thead tr {
  background: var(--bg-surface) !important;
}

.table thead th, .table > thead > tr > th, table.dataTable thead th, table thead th {
  text-align: left !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  color: var(--text-2) !important;
  text-transform: uppercase !important;
  background-color: var(--bg-surface) !important;
  white-space: nowrap;
}

.table tbody td, .table > tbody > tr > td, table.dataTable tbody td, table tbody td {
  color: var(--text) !important;
  background-color: transparent !important;
}

.table tbody tr:last-child td, .table > tbody > tr:last-child > td, table.dataTable tbody tr:last-child td, table tbody tr:last-child td {
  border-bottom: none !important;
}

.table tbody tr, table.dataTable tbody tr, table tbody tr {
  transition: var(--t) !important;
  cursor: pointer;
}

.table tbody tr:hover td, .table > tbody > tr:hover > td, .table-hover > tbody > tr:hover > *, table.dataTable tbody tr:hover td, table tbody tr:hover td {
  background-color: var(--bg-hover) !important;
  color: var(--text) !important;
}

.badge {
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
}

.table-search {
  width: min(260px, 100%);
  border-color: var(--admin-border);
  border-radius: 8px;
}

.table-media {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.product-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--admin-border);
}

.profile-avatar-lg {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  font-size: 1.5rem;
}

.profile-hero {
  display: grid;
  justify-items: center;
}

.profile-card {
  overflow: hidden;
}

.profile-cover {
  margin: -1.35rem -1.35rem 0.9rem;
  height: 96px;
  border-bottom: 1px solid var(--admin-border);
}

.profile-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.profile-photo {
  margin-top: -44px;
  border: 4px solid var(--admin-surface);
  box-shadow: var(--admin-shadow-sm);
}

.info-list,
.settings-list,
.legend-list {
  display: grid;
  gap: 0.85rem;
}

.info-list div,
.mini-card,
.settings-row,
.legend-list div {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-soft);
}

.info-list div,
.legend-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
}

.info-list span,
.mini-card span,
.settings-row small {
  color: var(--admin-muted);
  font-size: 0.84rem;
}

.info-list strong,
.mini-card strong {
  text-align: right;
}

.mini-card {
  display: grid;
  gap: 0.35rem;
  min-height: 104px;
  align-content: center;
  padding: 1rem;
}

.mini-card strong {
  color: var(--admin-text);
  font-size: 1.05rem;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
}

.settings-row span {
  display: grid;
  gap: 0.2rem;
}

.donut-chart {
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--admin-primary) 0 42%, var(--admin-success) 42% 68%, var(--admin-warning) 68% 86%, var(--admin-danger) 86% 100%);
  box-shadow: var(--admin-shadow-sm);
}

.donut-chart span {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--admin-text);
  font-size: 1.65rem;
  font-weight: 800;
}

.legend-list div {
  padding: 0.75rem 0.85rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.legend-list strong {
  margin-left: auto;
}

.progress {
  height: 1.15rem;
  border-radius: 8px;
  background: #e8eef6;
}

.progress-bar {
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
}

.progress-42 {
  width: 42%;
}

.progress-58 {
  width: 58%;
}

.progress-72 {
  width: 72%;
}

.blank-panel {
  min-height: 440px;
  display: grid;
  place-items: center;
  text-align: center;
}

.blank-state {
  max-width: 440px;
  display: grid;
  justify-items: center;
}

.blank-visual {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 0.9rem;
}

.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fbff 0%, #eaf2ff 44%, #eef8f6 100%);
}

.auth-page,
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.auth-card,
.error-card {
  width: min(100%, 460px);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--admin-shadow-lg);
}

.auth-card {
  padding: 1.5rem;
}

.auth-visual {
  margin-bottom: 1rem;
  height: 96px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  overflow: hidden;
}

.auth-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.error-card {
  padding: 2rem;
  text-align: center;
}

.error-illustration {
  width: min(260px, 100%);
  max-height: 132px;
  object-fit: contain;
  margin: 0 auto 0.55rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--admin-text);
}

.auth-brand:hover,
.auth-brand:focus {
  color: var(--admin-text);
}

.auth-brand span:last-child {
  display: grid;
  line-height: 1.2;
}

.auth-brand small,
.auth-footer {
  color: var(--admin-muted);
}

.auth-footer {
  margin-top: 1.2rem;
  text-align: center;
  font-size: 0.92rem;
}

.error-code {
  color: var(--admin-primary);
  font-size: clamp(5rem, 18vw, 8rem);
  font-weight: 800;
  line-height: 1;
}

.admin-footer {
  padding: 1.1rem 0 1.35rem;
  color: var(--admin-muted);
  font-size: 0.9rem;
}

.admin-footer .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 992px) {
  body.sidebar-mini .admin-sidebar {
    width: var(--sidebar-mini-width);
  }

  body.sidebar-mini .admin-main {
    margin-left: var(--sidebar-mini-width);
  }

  body.sidebar-mini .brand-copy,
  body.sidebar-mini .nav-text,
  body.sidebar-mini .sidebar-footer-text {
    display: none;
    width: 0;
    opacity: 0;
    overflow: hidden;
  }

  body.sidebar-mini .sb-divider {
    display: none;
  }

  body.sidebar-mini .nav-arrow {
    display: none;
  }

  body.sidebar-mini .nav-group-items {
    display: none;
  }

  body.sidebar-mini .admin-sidebar:hover .nav-arrow {
    display: inline-block;
  }

  body.sidebar-mini .admin-sidebar:hover .nav-group-items.show {
    display: block;
  }

  body.sidebar-mini .sb-section-label {
    text-align: center;
    padding: 0.25rem 0;
  }

  body.sidebar-mini .sb-section-label .sb-label-text {
    display: none;
  }

  body.sidebar-mini .sidebar-header,
  body.sidebar-mini .sidebar-footer {
    margin-inline: 0;
    padding-inline: 0;
  }

  body.sidebar-mini .sidebar-nav .nav-link {
    justify-content: center;
    padding: 0;
    width: 42px;
    height: 42px;
    margin-inline: auto;
    margin-bottom: 2px;
    gap: 0;
  }

  body.sidebar-mini .sidebar-nav .nav-link:hover,
  body.sidebar-mini .sidebar-nav .nav-link:focus {
    transform: none;
  }

  /* Sign-out: icon only in mini mode */
  body.sidebar-mini .sb-label { display: none; }
  body.sidebar-mini .sb-logout { justify-content: center; padding-inline: 0; width: 42px; height: 42px; margin-inline: auto; padding: 0; }

  /* Restore on hover */
  body.sidebar-mini .admin-sidebar:hover .sb-label { display: inline; }
  body.sidebar-mini .admin-sidebar:hover .sb-logout { justify-content: flex-start; padding: 7px 14px; width: auto; height: auto; margin-inline: 8px; }

  /* Swap logo in mini mode */
  body.sidebar-mini .brand-logo { display: none; }
  body.sidebar-mini .brand-logo-mini { display: block; margin: 0 auto; }
  body.sidebar-mini .brand-mark { justify-content: center; width: 42px; height: 42px; margin-inline: auto; padding-inline: 0; }

  /* Restore full logo on hover */
  body.sidebar-mini .admin-sidebar:hover .brand-logo { display: block; }
  body.sidebar-mini .admin-sidebar:hover .brand-logo-mini { display: none; }
  body.sidebar-mini .admin-sidebar:hover .brand-mark { justify-content: flex-start; width: auto; padding-inline: 0.5rem; }

  /* Hover-expand: sidebar overlays content, main stays at mini width */
  body.sidebar-mini .admin-sidebar:hover {
    width: var(--sidebar-width);
    z-index: 1041;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
  }

  body.sidebar-mini .admin-sidebar:hover .sb-divider {
    display: block;
  }

  body.sidebar-mini .admin-sidebar:hover .sb-section-label {
    text-align: left;
    padding: 0.5rem 1.25rem;
  }

  body.sidebar-mini .admin-sidebar:hover .sb-section-label .sb-label-text {
    display: inline;
  }

  body.sidebar-mini .admin-sidebar:hover .brand-copy,
  body.sidebar-mini .admin-sidebar:hover .nav-text,
  body.sidebar-mini .admin-sidebar:hover .sidebar-footer-text {
    display: inline;
    width: auto;
    opacity: 1;
  }

  body.sidebar-mini .admin-sidebar:hover .sidebar-header,
  body.sidebar-mini .admin-sidebar:hover .sidebar-footer {
    margin-inline: 0;
    padding-inline: 1.25rem;
  }

  body.sidebar-mini .admin-sidebar:hover .sidebar-nav .nav-link {
    justify-content: flex-start;
    padding: 7px 14px;
    width: auto;
    height: auto;
    margin-inline: 8px;
    gap: 9px;
  }

  body.sidebar-mini .admin-sidebar:hover .sidebar-nav .nav-link:hover,
  body.sidebar-mini .admin-sidebar:hover .sidebar-nav .nav-link:focus {
    transform: translateX(4px);
  }
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    width: min(var(--sidebar-width), calc(100vw - 48px));
    transform: translateX(-100%);
  }

  .admin-main {
    margin-left: 0;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
}

@media (max-width: 575.98px) {
  .page-heading,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .heading-actions {
    width: 100%;
    justify-content: stretch;
  }

  .heading-actions .btn {
    flex: 1 1 0;
  }

  .chart-bars {
    height: 220px;
    gap: 0.6rem;
    padding-inline: 0.25rem;
  }

  .metric-value {
    font-size: 1.4rem;
  }

  .metric-card,
  .panel {
    padding: 1.1rem;
  }

  .admin-footer .container-fluid {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-nav .nav-link,
  .sidebar-toggle,
  .icon-button,
  .profile-button,
  .btn,
  .metric-card,
  .panel,
  .table tbody tr {
    transition: none;
  }

  .sidebar-nav .nav-link:hover,
  .sidebar-nav .nav-link:focus,
  .btn:hover,
  .btn:focus,
  .metric-card:hover {
    transform: none;
  }
}

/* ============================================================
   Sidebar Divider & Section Labels
   ============================================================ */
.nav-group-toggle {
  display: flex;
  align-items: center;
  background: transparent !important;
  color: inherit;
}

.nav-group-toggle:hover {
  background: var(--admin-sidebar-hover, rgba(0,0,0,0.05)) !important;
}

.nav-arrow {
  margin-left: auto;
  font-size: 0.65rem;
  transition: transform 0.25s ease;
  opacity: 0.5;
}

.nav-group-toggle[aria-expanded="true"] .nav-arrow {
  transform: rotate(90deg);
  opacity: 1;
}

.nav-group-items {
  overflow: hidden;
  margin-left: 1.85rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--admin-sidebar-border);
}

.nav-sub-link {
  position: relative;
  padding-top: 0.22rem;
  padding-bottom: 0.22rem;
  padding-left: 0.85rem;
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.65;
  min-height: unset;
  border-radius: 6px;
}

.nav-sub-link::before {
  content: '';
  position: absolute;
  left: -0.85rem;
  top: 50%;
  width: 0.65rem;
  height: 1px;
  background: var(--admin-sidebar-border);
}

.nav-sub-link .nav-icon {
  display: none;
}

.nav-sub-link:hover {
  opacity: 0.9;
  background: transparent !important;
  transform: none;
}

.nav-sub-link.active {
  opacity: 1;
  font-weight: 800;
  color: #60a5fa !important;
  background: transparent !important;
}

[dir="rtl"] .nav-group-items {
  margin-left: 0;
  margin-right: 1.85rem;
  padding-left: 0;
  padding-right: 0.85rem;
  border-left: none;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

[dir="rtl"] .nav-sub-link {
  padding-left: 0;
  padding-right: 0.85rem;
}

[dir="rtl"] .nav-sub-link::before {
  left: auto;
  right: -0.85rem;
}

.sb-divider {
  height: 1px;
  background-color: var(--admin-border);
  margin: 0.75rem 1.25rem;
}

.sb-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--admin-muted);
  padding: 0 1.25rem 0.25rem;
}

/* ============================================================
   Login Page
   ============================================================ */
.login-page {
  min-height: 100vh;
  background: #060d1a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: fixed;
  top: -20%;
  right: -15%;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.08);
  filter: blur(100px);
  pointer-events: none;
}

.login-page::after {
  content: '';
  position: fixed;
  bottom: -25%;
  left: -15%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.06);
  filter: blur(100px);
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.1);
  padding: 2.75rem 2.5rem;
  position: relative;
  z-index: 1;
  animation: slideUp 0.4s ease;
}

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

.login-logo {
  display: block;
  max-height: 48px;
  margin: 0 auto 2rem;
  object-fit: contain;
}

.login-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.25rem;
  text-align: center;
}

.login-subheading {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 2rem;
  text-align: center;
}

.login-card .form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 0.4rem;
}

.login-card .form-control {
  border-radius: 0.625rem;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  padding: 0.65rem 0.9rem;
  font-size: 0.9375rem;
  color: #f1f5f9;
  background-color: #1e293b;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.login-card .form-control::placeholder {
  color: #334155;
}

.login-card .form-control:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.2);
  background-color: #1e293b;
  outline: none;
  color: #f1f5f9;
}

.login-card .form-control.is-invalid {
  border-color: #ef4444;
}

/* Login button styles inherit from global */

.forgot-link {
  font-size: 0.8125rem;
  color: #60a5fa;
  font-weight: 500;
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
  color: #93c5fd;
}

.login-footer {
  text-align: center;
  font-size: 0.875rem;
  color: #475569;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.login-footer a {
  color: #60a5fa;
  font-weight: 600;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
  color: #93c5fd;
}

.login-card .form-check-input {
  background-color: #1e293b;
  border-color: rgba(255, 255, 255, 0.15);
}

.login-card .form-check-input:checked {
  background-color: #2563eb;
  border-color: #2563eb;
}

.login-card .form-check-label {
  font-size: 0.875rem;
  color: #64748b;
}

html[data-theme="dark"] {
  /* Edara HR Module Design Tokens - Dark Mode */
  --bg-base: #070d1a;
  --bg-surface: #0d1526;
  --bg-card: #111e33;
  --bg-hover: #162540;
  --border: #1b2d4a;
  --border-lt: #243655;
  --text: #e4eaf5;
  --text-2: #8fa3bf;
  --text-3: #4a6080;
  --accent: #4aafd6;
  --accent-dim: #2d7ea8;
  --accent-glow: rgba(74, 175, 214, 0.15);
  --green: #2dd4a0;
  --green-dim: rgba(45, 212, 160, 0.12);
  --amber: #f5a623;
  --amber-dim: rgba(245, 166, 35, 0.12);
  --red: #f05262;
  --red-dim: rgba(240, 82, 98, 0.12);
  --purple: #a78bfa;
  --purple-dim: rgba(167, 139, 250, 0.12);
  --teal: #38c8c8;
  --teal-dim: rgba(56, 200, 200, 0.12);

  --admin-bg: var(--bg-base);
  --admin-surface: var(--bg-card);
  --admin-surface-soft: var(--bg-surface);
  --admin-border: var(--border);
  --admin-text: var(--text);
  --admin-muted: var(--text-2);
  --admin-primary: var(--accent);
  --admin-primary-dark: var(--accent-dim);
  --admin-success: var(--green);
  --admin-warning: var(--amber);
  --admin-danger: var(--red);
  --admin-sidebar: var(--bg-surface);
  --admin-sidebar-soft: var(--bg-hover);
  --admin-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --admin-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  --admin-shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --admin-ring: 0 0 0 3px var(--accent-glow);
}

html[data-theme="dark"] body {
  background: var(--bg-base);
}

.brand-icon {
  font-size: 1.1rem;
}

.nav-icon {
  font-size: 0.95rem;
}

.theme-toggle i {
  font-size: 1rem;
}

.admin-navbar.bg-white,
.sidebar-toggle,
.icon-button,
.profile-button {
  background-color: var(--admin-surface) !important;
  color: var(--admin-text);
}

html[data-theme="dark"] .admin-navbar.bg-white {
  background-color: rgba(24, 34, 53, 0.92) !important;
}

html[data-theme="dark"] .profile-avatar {
  background: #1e3a5f;
  color: #bfdbfe;
}

.page-heading-copy {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  min-width: 0;
}

.page-icon,
.section-title i {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--admin-primary-dark);
}

.page-icon {
  width: 48px;
  height: 48px;
  font-size: 1.25rem;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.section-title i {
  width: 34px;
  height: 34px;
  font-size: 0.95rem;
}

html[data-theme="dark"] .page-icon,
html[data-theme="dark"] .section-title i {
  background: #1e3a5f;
  color: #bfdbfe;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-light {
  border-color: var(--admin-border);
  background: var(--admin-surface-soft);
  color: var(--admin-text);
}

.btn-outline-secondary {
  border-color: var(--admin-border);
  color: var(--admin-text);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  border-color: var(--admin-primary);
  background: #eaf2ff;
  color: var(--admin-primary-dark);
}

/* Removed theme specific button override */

html[data-theme="dark"] .chart-bars {
  background: linear-gradient(180deg, #111827 0%, #182235 100%);
}

html[data-theme="dark"] .table tbody tr:hover {
  background: var(--bg-hover);
}

html[data-theme="dark"] .progress {
  background: #243149;
}

html[data-theme="dark"] .auth-body {
  background: linear-gradient(135deg, #0b1120 0%, #111827 48%, #10201f 100%);
}

.auth-card,
.error-card {
  background: var(--admin-surface);
}

.auth-theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.dropdown-menu,
.modal-content,
.accordion-item,
.accordion-button {
  border-color: var(--admin-border);
  background-color: var(--admin-surface);
  color: var(--admin-text);
}

.dropdown-item,
.accordion-body {
  color: var(--admin-text);
}

.dropdown-item:hover,
.dropdown-item:focus,
.accordion-button:not(.collapsed) {
  background-color: var(--admin-surface-soft);
  color: var(--admin-text);
}

.form-control,
.form-select {
  border-color: var(--admin-border);
  background-color: var(--admin-surface);
  color: var(--admin-text);
}

.form-control:focus,
.form-select:focus {
  border-color: #93c5fd;
  background-color: var(--admin-surface);
  color: var(--admin-text);
  box-shadow: var(--admin-ring);
}

.form-control::placeholder {
  color: var(--admin-muted);
}

.text-muted {
  color: var(--admin-muted) !important;
}

html[data-theme="dark"] .text-body {
  color: var(--admin-text) !important;
}

html[data-theme="dark"] .text-bg-secondary {
  background-color: #334155 !important;
  color: #e5edf7 !important;
}

@media (max-width: 767.98px) {
  .navbar-actions {
    gap: 0.5rem;
  }

  .icon-button,
  .profile-button,
  .sidebar-toggle {
    width: 36px;
    height: 36px;
  }

  .profile-button {
    padding: 0.3rem;
  }

  .page-heading-copy {
    align-items: flex-start;
  }
}

@media (max-width: 575.98px) {
  .page-heading-copy {
    width: 100%;
  }

  .page-icon {
    width: 44px;
    height: 44px;
  }

  .panel-header .d-flex,
  .panel-header .form-control,
  .panel-header .form-select {
    width: 100%;
  }
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body,
.admin-navbar,
.admin-sidebar,
.admin-main,
.metric-card,
.panel,
.auth-card,
.error-card,
.dropdown-menu,
.modal-content,
.form-control,
.form-select {
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.table {
  --bs-table-color: var(--admin-text);
  --bs-table-border-color: var(--admin-border);
  color: var(--admin-text);
}

.page-link {
  border-color: var(--admin-border);
  background: var(--admin-surface);
  color: var(--admin-text);
}

.page-link:hover,
.page-link:focus {
  border-color: var(--admin-primary);
  background: var(--admin-surface-soft);
  color: var(--admin-primary);
}

.page-item.active .page-link {
  border-color: var(--admin-primary);
  background: var(--admin-primary);
  color: #ffffff;
}

.page-item.disabled .page-link {
  border-color: var(--admin-border);
  background: var(--admin-surface-soft);
  color: var(--admin-muted);
}

.alert {
  border-radius: 8px;
}

html[data-theme="dark"] .alert-primary {
  border-color: #1d4ed8;
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
}

html[data-theme="dark"] .alert-success {
  border-color: #0f766e;
  background: rgba(15, 118, 110, 0.18);
  color: #99f6e4;
}

html[data-theme="dark"] .alert-warning {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.18);
  color: #fde68a;
}

html[data-theme="dark"] .alert-danger {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.16);
  color: #fecaca;
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .accordion-item {
  border-color: var(--admin-border);
}

html[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(180%);
}

html[data-theme="dark"] .text-bg-info {
  background-color: #0e7490 !important;
  color: #ecfeff !important;
}

html[data-theme="dark"] .text-bg-warning {
  background-color: #b45309 !important;
  color: #fff7ed !important;
}

html[data-theme="dark"] .text-bg-success {
  background-color: #0f766e !important;
  color: #ecfdf5 !important;
}

html[data-theme="dark"] .text-bg-danger {
  background-color: #b91c1c !important;
  color: #fef2f2 !important;
}

@media (max-width: 991.98px) {
  .dashboard-content > .container-fluid {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }

  .admin-sidebar {
    box-shadow: 18px 0 48px rgba(0, 0, 0, 0.28);
  }
}

@media (max-width: 767.98px) {
  .panel-header {
    align-items: flex-start;
  }

  .panel-header > .d-flex {
    width: 100%;
  }

  .table-search {
    width: 100%;
  }

  .auth-page,
  .error-page {
    padding: 1rem;
  }

  .auth-card,
  .error-card {
    padding: 1.15rem;
  }
}

@media (max-width: 420px) {
  .heading-actions {
    width: 100%;
  }

  .heading-actions .btn {
    width: 100%;
  }

  .metric-card {
    min-height: 146px;
  }

  .profile-avatar-lg {
    width: 76px;
    height: 76px;
  }
}

@media (max-width: 575.98px) {
  .avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .avatar-xl {
    width: 70px;
    height: 70px;
  }

  .profile-cover {
    height: 82px;
    margin-bottom: 0.75rem;
  }

  .profile-photo {
    margin-top: -38px;
  }

  .auth-visual {
    height: 82px;
  }

  .product-thumb {
    width: 36px;
    height: 36px;
  }
}

html:not([data-theme="dark"]) {
  --admin-sidebar: #ffffff;
  --admin-sidebar-soft: #eef4ff;
  --admin-sidebar-border: #dbe4ef;
  --admin-sidebar-text: #475569;
  --admin-sidebar-text-strong: #0f172a;
  --admin-sidebar-muted: #64748b;
  --admin-sidebar-icon-bg: #eaf2ff;
  --admin-sidebar-icon: #2563eb;
  --admin-sidebar-shadow: 18px 0 42px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] {
  --admin-sidebar-border: rgba(255, 255, 255, 0.08);
  --admin-sidebar-text: #d1d5db;
  --admin-sidebar-text-strong: #ffffff;
  --admin-sidebar-muted: #9ca3af;
  --admin-sidebar-icon-bg: rgba(255, 255, 255, 0.08);
  --admin-sidebar-icon: #bfdbfe;
  --admin-sidebar-shadow: 18px 0 42px rgba(0, 0, 0, 0.34);
}

.admin-sidebar {
  border-right: 1px solid var(--admin-sidebar-border);
  background: var(--admin-sidebar);
  color: var(--admin-sidebar-text-strong);
  box-shadow: var(--admin-sidebar-shadow);
}

.sidebar-header {
  border-bottom-color: var(--admin-sidebar-border);
}

.brand-mark,
.brand-mark:hover,
.brand-mark:focus {
  color: var(--admin-sidebar-text-strong);
}

.brand-subtitle {
  color: var(--admin-sidebar-muted);
}

.sidebar-nav .nav-link {
  color: var(--admin-sidebar-text);
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus,
.sidebar-nav .nav-link.active {
  background: var(--admin-sidebar-soft);
  color: var(--admin-sidebar-text-strong);
}

.nav-icon {
  background: var(--admin-sidebar-icon-bg);
  color: var(--admin-sidebar-icon);
}

.sidebar-footer {
  border-top-color: var(--admin-sidebar-border);
  color: var(--admin-sidebar-text);
}

/* --------------------------------------------------------
   Navbar module switcher
   -------------------------------------------------------- */
.navbar-modules {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.module-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

/* Per-module icon colors — navbar buttons */
.module-btn[data-module-btn="security"] i         { color: #6366f1; }
.module-btn[data-module-btn="customer-service"] i { color: #0f766e; }
.module-btn[data-module-btn="cost-control"] i     { color: #d97706; }
.module-btn[data-module-btn="purchasing"] i       { color: #7c3aed; }
.module-btn[data-module-btn="license"] i          { color: #db2777; }
.module-btn[data-module-btn="hr"] i               { color: #0284c7; }
.module-btn[data-module-btn="warehouse"] i        { color: #16a34a; }

/* Per-module icon colors — sidebar (same palette) */
[data-sidebar-module="security"] .nav-group-toggle .nav-icon         { color: #6366f1; background: rgba(99,  102, 241, 0.15); }
[data-sidebar-module="customer-service"] .nav-group-toggle .nav-icon { color: #0f766e; background: rgba(15,  118, 110, 0.15); }
[data-sidebar-module="cost-control"] .nav-group-toggle .nav-icon     { color: #d97706; background: rgba(217, 119,   6, 0.15); }
[data-sidebar-module="purchasing"] .nav-group-toggle .nav-icon       { color: #7c3aed; background: rgba(124,  58, 237, 0.15); }
[data-sidebar-module="license"] .nav-group-toggle .nav-icon          { color: #db2777; background: rgba(219,  39, 119, 0.15); }
[data-sidebar-module="hr"] .nav-group-toggle .nav-icon               { color: #0284c7; background: rgba(  2, 132, 199, 0.15); }
[data-sidebar-module="warehouse"] .nav-group-toggle .nav-icon        { color: #16a34a; background: rgba( 22, 163,  74, 0.15); }
a[href="#nav-administration"].nav-group-toggle .nav-icon             { color: #059669; background: rgba(  5, 150, 105, 0.15); }

.module-btn i {
  font-size: 1.05rem;
  transition: transform 0.16s ease;
}

.module-btn:hover i,
.module-btn:focus i {
  transform: scale(1.15);
}

.module-btn:hover,
.module-btn:focus {
  border-color: var(--admin-border);
  background: var(--admin-surface-soft);
  outline: none;
}

.module-btn.active {
  border-color: var(--admin-border);
  background: var(--admin-surface-soft);
  box-shadow: var(--admin-shadow-sm);
}

/* Hover label tooltip */
.module-label {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #f9fafb;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 1100;
}

.module-label::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #1f2937;
}

.module-btn:hover .module-label,
.module-btn:focus .module-label {
  opacity: 1;
}

/* --------------------------------------------------------
   Sidebar module groups (show/hide per active module)
   -------------------------------------------------------- */
.sidebar-module {
  display: contents;
}

.sidebar-module.module-hidden {
  display: none;
}

/* Dark theme overrides */
html[data-theme="dark"] .module-btn:hover,
html[data-theme="dark"] .module-btn:focus,
html[data-theme="dark"] .module-btn.active {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Edara Layout Components & Grids */
.btn-p{background:var(--accent);color:#05121f}.btn-p:hover{background:#5dbce0}
.btn-g{background:transparent;color:var(--text-2);border:1px solid var(--border)}.btn-g:hover{border-color:var(--accent-dim);color:var(--text)}
.btn-d{background:var(--red-dim);color:var(--red);border:1px solid rgba(240,82,98,.3)}
.card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--r);padding:20px}
.card-sm{padding:14px 16px}
.ch{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.ct{font-size:13px;font-weight:700}.cs{font-size:11px;color:var(--text-2);margin-top:2px}
.grid{display:grid;gap:16px}
.g2{grid-template-columns:1fr 1fr}.g3{grid-template-columns:1fr 1fr 1fr}.g4{grid-template-columns:repeat(4,1fr)}
.g12{grid-template-columns:1fr 2fr}.g21{grid-template-columns:2fr 1fr}
.kpi{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--r);padding:18px 20px;position:relative;overflow:hidden}
.kpi::before{content:"";position:absolute;top:0;left:0;right:0;height:3px;border-radius:var(--r) var(--r) 0 0}
.kpi-bl::before{background:var(--accent)}.kpi-gr::before{background:var(--green)}.kpi-am::before{background:var(--amber)}.kpi-rd::before{background:var(--red)}.kpi-pu::before{background:var(--purple)}
.kpi-ic{width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:16px;margin-bottom:12px}
.kpi-v{font-size:28px;font-weight:800;line-height:1}.kpi-l{font-size:11px;color:var(--text-2);margin-top:4px}
.kpi-tr{font-size:10.5px;margin-top:8px;display:flex;align-items:center;gap:4px}
.tr-up{color:var(--green)}.tr-dn{color:var(--red)}.tr-ne{color:var(--text-2)}
.tw{overflow-x:auto;border-radius:var(--r);border:1px solid var(--border)}
.badge{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:4px;font-size:10px;font-weight:700}
.b-gr{background:var(--green-dim);color:var(--green)}.b-rd{background:var(--red-dim);color:var(--red)}
.b-am{background:var(--amber-dim);color:var(--amber)}.b-bl{background:var(--accent-glow);color:var(--accent)}
.b-pu{background:var(--purple-dim);color:var(--purple)}.b-tl{background:var(--teal-dim);color:var(--teal)}.b-gy{background:rgba(255,255,255,.06);color:var(--text-2)}
.av{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;flex-shrink:0}
.av-bl{background:var(--accent-glow);color:var(--accent);border:1px solid rgba(74,175,214,.3)}
.av-gr{background:var(--green-dim);color:var(--green)}.av-pu{background:var(--purple-dim);color:var(--purple)}
.av-am{background:var(--amber-dim);color:var(--amber)}.av-tl{background:var(--teal-dim);color:var(--teal)}
.av-lg{width:48px;height:48px;font-size:17px}
.fg{margin-bottom:14px}
.tabs{display:flex;gap:2px;background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--rs);padding:3px;margin-bottom:20px}
.tab{flex:1;padding:7px;text-align:center;font-size:11.5px;font-weight:600;color:var(--text-2);border-radius:4px;cursor:pointer;transition:var(--t)}
.tab.active{background:var(--bg-card);color:var(--accent);box-shadow:0 1px 4px rgba(0,0,0,.3)}
.tab:hover:not(.active){color:var(--text)}
.pb{height:6px;background:var(--border);border-radius:3px;overflow:hidden}
.pf{height:100%;border-radius:3px;transition:width .4s ease}
.tl{position:relative;padding-left:24px}
.tl::before{content:"";position:absolute;left:7px;top:4px;bottom:4px;width:1px;background:var(--border)}
.tli{position:relative;margin-bottom:16px}
.tld{position:absolute;left:-21px;top:3px;width:10px;height:10px;border-radius:50%;border:2px solid}
.tl-gr .tld{border-color:var(--green);background:var(--green-dim)}
.tl-bl .tld{border-color:var(--accent);background:var(--accent-glow)}
.tl-am .tld{border-color:var(--amber);background:var(--amber-dim)}
.tll{font-size:11.5px;font-weight:600}.tlm{font-size:10.5px;color:var(--text-2);margin-top:2px}
.ob{background:var(--bg-card);border:1px solid var(--border-lt);border-radius:8px;padding:10px 14px;min-width:100px;text-align:center;transition:var(--t);cursor:pointer}
.ob:hover{border-color:var(--accent)}.ob.root{border-color:var(--accent);background:var(--accent-glow)}
.on{font-size:11.5px;font-weight:700}.os{font-size:10px;color:var(--text-2);margin-top:2px}
.bc{display:flex;flex-direction:column;gap:8px}
.bcr{display:flex;align-items:center;gap:10px}
.bcl{font-size:11px;color:var(--text-2);width:90px;flex-shrink:0;text-align:right}
.bct{flex:1;height:8px;background:var(--border);border-radius:4px;overflow:hidden}
.bcf{height:100%;border-radius:4px}
.bcv{font-size:11px;font-weight:700;width:38px;flex-shrink:0}
.sc{padding:6px 4px;border-radius:4px;font-size:10px;font-weight:600;text-align:center;cursor:pointer;transition:var(--t)}
.sc-d{background:var(--green-dim);color:var(--green)}.sc-n{background:var(--purple-dim);color:var(--purple)}
.sc-o{background:var(--border);color:var(--text-3)}.sc-l{background:var(--amber-dim);color:var(--amber)}
.sh{font-size:9.5px;color:var(--text-3);text-align:center;padding:4px 2px}
.lc{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.lch{font-size:9.5px;font-weight:700;color:var(--text-3);text-align:center;padding:4px}
.lcd{padding:6px 4px;border-radius:5px;font-size:11px;text-align:center;cursor:pointer;transition:var(--t);position:relative}
.lcd:hover{background:var(--bg-hover)}.lcd.tod{background:var(--accent-glow);color:var(--accent);font-weight:700}
.lcd.onl{background:var(--amber-dim);color:var(--amber)}
.di{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--border)}
.di:last-child{border-bottom:none}
.dico{width:32px;height:32px;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:15px;flex-shrink:0}
.st{font-size:18px;font-weight:800;margin-bottom:4px}
.ss{font-size:12px;color:var(--text-2);margin-bottom:20px}

/* Operational Dashboard Styles & Tooltips */
.v-tooltip {
    display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    background: var(--admin-surface); border: 1px solid var(--admin-border); z-index: 1050;
    border-radius: 8px; padding: 12px; width: 220px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); margin-top: 8px;
}
.kpi:hover .v-tooltip { display: block; }

/* ═══════════════════════════════════════════════
   EDARA HR MODULE COMPONENT UTILITIES (Adapted)
═══════════════════════════════════════════════ */
.kpi { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: var(--r); 
    padding: 18px 20px; 
    position: relative; 
    transition: transform 0.25s ease, box-shadow 0.25s ease; 
}
.kpi:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 24px rgba(0,0,0,0.08); 
    z-index: 1050; 
}
.kpi::before { 
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; 
    border-radius: var(--r) var(--r) 0 0; 
}
.kpi-bl::before { background: var(--accent); }
.kpi-gr::before { background: var(--green); }
.kpi-am::before { background: var(--amber); }
.kpi-rd::before { background: var(--red); }
.kpi-pu::before { background: var(--purple); }
.kpi-tl::before { background: var(--teal); }

.kpi-ic { 
    width: 36px; height: 36px; border-radius: 8px; display: flex; 
    align-items: center; justify-content: center; font-size: 16px; margin-bottom: 12px; 
}

.kpi-v { font-size: 28px; font-weight: 800; line-height: 1; color: var(--text); }
.kpi-l { font-size: 11px; color: var(--text-2); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-tr { font-size: 10.5px; margin-top: 8px; display: flex; align-items: center; gap: 4px; font-weight: 700; }

.tr-up { color: var(--green); }
.tr-dn { color: var(--red); }
.tr-ne { color: var(--text-2); }

/* Badges */
.badge-hr { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.b-gr { background: var(--green-dim); color: var(--green); }
.b-rd { background: var(--red-dim); color: var(--red); }
.b-am { background: var(--amber-dim); color: var(--amber); }
.b-bl { background: var(--accent-glow); color: var(--accent); }
.b-pu { background: var(--purple-dim); color: var(--purple); }
.b-tl { background: var(--teal-dim); color: var(--teal); }
.b-gy { background: rgba(255,255,255,0.06); color: var(--text-2); }

/* Interactive Rows / Blocks */
.ir { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.ir:last-child { border-bottom: none; }
.il { color: var(--text-2); font-weight: 600; }
.iv { color: var(--text); text-align: right; font-weight: 700; }
.ab { border-radius: var(--rs); padding: 10px 14px; font-size: 12px; display: flex; align-items: flex-start; gap: 9px; margin-bottom: 14px; }
.ab-r { background: var(--red-dim); border: 1px solid rgba(240,82,98,0.25); color: var(--red); }
.ab-a { background: var(--amber-dim); border: 1px solid rgba(245,166,35,0.25); color: var(--amber); }
.ab-b { background: var(--accent-glow); border: 1px solid rgba(74,175,214,0.25); color: var(--accent); }

/* ==========================================================================
   HR Module Table Overrides
   ========================================================================== */
.table-responsive {
    border-radius: var(--r) !important;
    border: 1px solid var(--border) !important;
    background: var(--bg-card);
    overflow-x: auto;
}
.table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 12px !important;
    color: var(--text) !important;
    margin-bottom: 0 !important;
    --bs-table-bg: transparent !important;
    --bs-table-color: var(--text) !important;
    --bs-table-striped-bg: transparent !important;
    --bs-table-hover-bg: var(--bg-hover) !important;
    border-color: var(--border) !important;
}
.table > :not(caption) > * > * {
    padding: 10px 14px !important;
    background-color: transparent !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: none !important;
    border-width: 0 0 1px 0 !important;
}
.table thead th, .table thead td {
    background-color: var(--bg-surface) !important;
    text-align: start !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    color: var(--text-2) !important;
    text-transform: uppercase !important;
    border-bottom: 1px solid var(--border) !important;
    border-top: none !important;
}
.table tbody td {
    color: var(--text) !important;
    vertical-align: middle !important;
}
.table tbody tr {
    transition: var(--t) !important;
    cursor: pointer !important;
}
.table tbody tr:hover td {
    background-color: var(--bg-hover) !important;
}
.table tbody tr:last-child td {
    border-bottom: none !important;
}


/* ==========================================================================
   HR Module Badge Overrides (Soft Pills)
   ========================================================================== */
.badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    border: none !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
}

/* Map Bootstrap background colors to HR Soft Pill colors */
.badge.bg-success { background: var(--green-dim) !important; color: var(--green) !important; }
.badge.text-bg-success { background: var(--green-dim) !important; color: var(--green) !important; }

.badge.bg-danger { background: var(--red-dim) !important; color: var(--red) !important; }
.badge.text-bg-danger { background: var(--red-dim) !important; color: var(--red) !important; }

.badge.bg-warning { background: var(--amber-dim) !important; color: var(--amber) !important; }
.badge.text-bg-warning { background: var(--amber-dim) !important; color: var(--amber) !important; }

.badge.bg-primary { background: var(--accent-glow) !important; color: var(--accent) !important; }
.badge.text-bg-primary { background: var(--accent-glow) !important; color: var(--accent) !important; }

.badge.bg-info { background: var(--teal-dim) !important; color: var(--teal) !important; }
.badge.text-bg-info { background: var(--teal-dim) !important; color: var(--teal) !important; }

.badge.bg-secondary { background: rgba(255,255,255,.06) !important; color: var(--text-2) !important; }
.badge.text-bg-secondary { background: rgba(255,255,255,.06) !important; color: var(--text-2) !important; }

.badge.bg-dark { background: rgba(255,255,255,.06) !important; color: var(--text-2) !important; }
.badge.text-bg-dark { background: rgba(255,255,255,.06) !important; color: var(--text-2) !important; }

/* Direct HR classes for manual usage */
.b-gr{background:var(--green-dim) !important;color:var(--green) !important}
.b-rd{background:var(--red-dim) !important;color:var(--red) !important}
.b-am{background:var(--amber-dim) !important;color:var(--amber) !important}
.b-bl{background:var(--accent-glow) !important;color:var(--accent) !important}
.b-pu{background:var(--purple-dim) !important;color:var(--purple) !important}
.b-tl{background:var(--teal-dim) !important;color:var(--teal) !important}
.b-gy{background:rgba(255,255,255,.06) !important;color:var(--text-2) !important}


/* ==========================================================================
   HR Module Forms & Inputs Overrides
   ========================================================================== */
.form-control, .form-select, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
    background-color: var(--bg-base) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: var(--rs) !important;
    transition: var(--t) !important;
}

.form-control:focus, .form-select:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="date"]:focus, input[type="search"]:focus, select:focus, textarea:focus {
    background-color: var(--bg-base) !important;
    color: var(--text) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
    outline: none !important;
}

.form-select option, select option {
    background-color: var(--bg-card) !important;
    color: var(--text) !important;
}

.form-control::placeholder, input::placeholder, textarea::placeholder {
    color: var(--text-2) !important;
    opacity: 0.7 !important;
}

/* Checkbox & Radio */
.form-check-input {
    background-color: var(--bg-base) !important;
    border: 1px solid var(--border) !important;
}
.form-check-input:checked {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
}
.form-check-input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

/* Input group text */
.input-group-text {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-2) !important;
}


/* ==========================================================================
   HR Module Sidebar Overrides
   ========================================================================== */
.admin-sidebar {
    background-color: var(--bg-surface) !important;
}
.sidebar-header {
    border-bottom: 1px solid var(--border) !important;
}

/* Sidebar Links */
.nav-link, .nav-sub-link {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 7px 14px !important;
    margin: 4px 8px !important;
    border-radius: var(--rs) !important;
    cursor: pointer !important;
    transition: var(--t) !important;
    font-size: 12.5px !important;
    color: var(--text-2) !important;
    border: 1px solid transparent !important;
}
.nav-link:hover, .nav-sub-link:hover {
    background-color: var(--bg-hover) !important;
    color: var(--text) !important;
}
.nav-link.active, .nav-sub-link.active {
    background-color: var(--accent-glow) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(74,175,214,.2) !important;
    font-weight: 600 !important;
}
.nav-link .nav-icon {
    width: 16px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
    font-size: 13px !important;
}

/* User Pill (upill) */
.upill {
    margin: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    cursor: pointer;
    transition: var(--t);
    display: flex;
    flex-direction: column;
}
.upill:hover {
    border-color: var(--accent-dim);
}
.up-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
}
.up-role {
    font-size: 10.5px;
    color: var(--text-2);
    margin-top: 2px;
}
.up-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 6px;
    display: inline-block;
    font-weight: 600;
    width: fit-content;
}

/* Submenu layout adjustments */
.nav-group-items {
    padding-left: 10px;
}


/* ==========================================================================
   HR Module Avatars
   ========================================================================== */
.av {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.av-bl { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(74,175,214,.3); }
.av-gr { background: var(--green-dim); color: var(--green); }
.av-pu { background: var(--purple-dim); color: var(--purple); }
.av-am { background: var(--amber-dim); color: var(--amber); }
.av-tl { background: var(--teal-dim); color: var(--teal); }
.av-lg { width: 48px; height: 48px; font-size: 17px; }

/* ==========================================================================
   HR Module Modals Overrides
   ========================================================================== */
/* The dark overlay behind the modal */
.modal-backdrop {
    background-color: rgba(7, 13, 26, 0.85) !important;
}
@supports (backdrop-filter: blur(4px)) {
    .modal-backdrop {
        backdrop-filter: blur(4px) !important;
    }
}
.modal-backdrop.show {
    opacity: 1 !important;
}

/* The Modal box itself */
.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-lt) !important;
    border-radius: 14px !important;
    box-shadow: 0 24px 60px rgba(0,0,0,.6) !important;
    color: var(--text) !important;
}

/* Modal Inner Spacing & Borders */
.modal-header {
    border-bottom: 1px solid var(--border) !important;
    padding: 20px 24px 16px !important;
}
.modal-title {
    font-size: 14px !important;
    font-weight: 700 !important;
}
.modal-body {
    padding: 20px 24px !important;
}
.modal-footer {
    border-top: 1px solid var(--border) !important;
    padding: 14px 24px !important;
}

/* Light Close Button for Dark Theme */
.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
    opacity: 0.5 !important;
}
.btn-close:hover {
    opacity: 1 !important;
}

/* Custom Tabs Design (From HTML Template) */
.tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px;
    margin-bottom: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
}
.tabs::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
.tab {
    flex: 1 1 auto;
    padding: 7px 14px;
    text-align: center;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-2);
    border-radius: 4px;
    cursor: pointer;
    transition: 0.17s ease;
    white-space: nowrap;
}
.tab.active {
    background: var(--bg-card);
    color: var(--accent);
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.tab:hover:not(.active) {
    color: var(--text);
}

/* Remove bottom border on the last row of tables */
table tbody tr:last-child td,
.table tbody tr:last-child td,
.dataTable tbody tr:last-child td {
    border-bottom: none !important;
}

/* User Pill Component */
.upill {
    margin: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r, 10px);
    cursor: pointer;
    transition: var(--t, 0.17s ease);
}
.upill:hover {
    border-color: var(--accent-dim);
}
.up-name {
    font-size: 12.5px;
    font-weight: 600;
}
.up-role {
    font-size: 10.5px;
    color: var(--text-2);
    margin-top: 2px;
}
.up-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-block;
    font-weight: 600;
}
