/* ==========================================
   PPMHRIS Dashboard Style System
   ========================================== */

/* Design Tokens & Variables */
:root {
  --primary-blue: #1E88E5;
  --primary-blue-hover: #1565C0;
  --primary-blue-light: #E3F2FD;
  --primary-blue-active: #2979FF;
  
  --bg-body: #F4F6F9;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;
  
  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  
  --border-color: #E2E8F0;
  --border-light: #F1F5F9;
  
  /* Status Colors */
  --success: #10B981;
  --success-light: #E6F4EA;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #EF4444;
  --danger-light: #FCE8E6;
  --purple: #8B5CF6;
  --purple-light: #F3E8FF;
  --orange: #F97316;
  --orange-light: #FFEDD5;
  --blue-gray: #475569;
  --blue-gray-light: #F1F5F9;
  
  /* Shadow Definitions */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --sidebar-width-expanded: 260px;
  --sidebar-width-collapsed: 70px;
  
  --transition-speed: 0.3s;
  --transition-bezier: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input, button, select {
  font-family: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Layout Wrapper */
.app-container {
  display: flex;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ==========================================
   SIDEBAR COMPONENT
   ========================================== */
.sidebar {
  width: var(--sidebar-width-expanded);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: width var(--transition-speed) var(--transition-bezier);
  overflow-x: hidden;
  flex-shrink: 0;
}

/* Sidebar collapsed state */
.sidebar.collapsed {
  width: var(--sidebar-width-collapsed);
}

.logo-container {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  height: 70px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
  overflow: hidden;
  white-space: nowrap;
}

.logo-icon-wrapper {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-svg {
  width: 100%;
  height: 100%;
}

.logo-text {
  display: flex;
  flex-direction: column;
  transition: opacity var(--transition-speed);
}

.sidebar.collapsed .logo-text {
  opacity: 0;
  pointer-events: none;
  width: 0;
}

.logo-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #1E293B;
}

.logo-subtitle {
  font-size: 8px;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  margin-top: -2px;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

/* Custom Scrollbar for Sidebar */
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 4px;
}
.sidebar:hover .sidebar-nav::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-group-header {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 1px;
  padding: 16px 14px 8px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity var(--transition-speed);
}

.sidebar.collapsed .nav-group-header {
  opacity: 0;
  padding: 0;
  height: 0;
  overflow: hidden;
  margin: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
  gap: 12px;
  cursor: pointer;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 2px;
}

.nav-label {
  flex: 1;
  transition: opacity var(--transition-speed);
}

.sidebar.collapsed .nav-label {
  opacity: 0;
  pointer-events: none;
  width: 0;
}

.nav-arrow {
  width: 14px;
  height: 14px;
  color: var(--text-light);
  transition: transform 0.2s ease, opacity var(--transition-speed);
}

.sidebar.collapsed .nav-arrow {
  opacity: 0;
  pointer-events: none;
}

/* Link Hover and Active States */
.nav-link:hover {
  background-color: var(--border-light);
  color: var(--text-main);
}

.nav-item.active .nav-link {
  background-color: var(--primary-blue);
  color: #FFFFFF;
}

.nav-item.active .nav-icon {
  color: #FFFFFF;
}

.nav-item.active .nav-arrow {
  color: rgba(255, 255, 255, 0.7);
}

/* Submenu styling */
.submenu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-speed) var(--transition-bezier);
  background-color: #FAFBFD;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.submenu-link {
  display: block;
  padding: 8px 16px 8px 44px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
}

.submenu-link:hover {
  background-color: rgba(30, 136, 229, 0.06);
  color: var(--primary-blue);
  padding-left: 48px;
}

.submenu-link.active {
  color: var(--primary-blue);
  font-weight: 600;
}

/* Rotate arrow on open */
.nav-item.open .nav-arrow {
  transform: rotate(90deg);
}

.sidebar.collapsed .submenu-list {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

/* Sidebar Footer & Toggle Button */
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border-light);
}

.btn-toggle-sidebar {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 12px;
  white-space: nowrap;
}

.btn-toggle-sidebar:hover {
  background-color: var(--border-light);
  color: var(--text-main);
}

.toggle-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--transition-speed) var(--transition-bezier);
}

.toggle-label {
  flex: 1;
  text-align: left;
  transition: opacity var(--transition-speed);
}

.sidebar.collapsed .toggle-label {
  opacity: 0;
  pointer-events: none;
  width: 0;
}

.sidebar.collapsed .toggle-icon {
  transform: rotate(180deg);
}

/* ==========================================
   MAIN CONTENT & HEADER
   ========================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Top Navbar */
.top-navbar {
  height: 70px;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-hamburger {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.navbar-hamburger:hover {
  background-color: var(--border-light);
}

.navbar-hamburger svg {
  width: 20px;
  height: 20px;
}

/* Search bar */
.search-container {
  position: relative;
  width: 320px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-light);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 38px;
  padding: 8px 12px 8px 36px;
  background-color: var(--border-light);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  background-color: #FFFFFF;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.search-input::placeholder {
  color: var(--text-light);
}

/* Navbar actions */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.navbar-action-btn:hover {
  background-color: var(--border-light);
  color: var(--text-main);
  transform: translateY(-1px);
}

.navbar-action-btn svg {
  width: 18px;
  height: 18px;
}

.navbar-action-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--danger);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
}

/* Profile section */
.profile-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 8px;
  border-left: 1px solid var(--border-color);
}

.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.profile-role {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Content Body Outer */
.content-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Content Header */
.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.welcome-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.welcome-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

.date-picker-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.date-picker-dropdown:hover {
  background-color: var(--border-light);
  border-color: var(--text-light);
}

.date-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.date-arrow {
  width: 14px;
  height: 14px;
  color: var(--text-light);
}

/* ==========================================
   STATS CARDS GRID
   ========================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
}

.stat-icon {
  width: 20px;
  height: 20px;
}

/* Card Icon Backgrounds */
.blue-bg { background-color: var(--primary-blue-light); }
.blue-text { color: var(--primary-blue); }

.green-bg { background-color: var(--success-light); }
.green-text { color: var(--success); }

.purple-bg { background-color: var(--purple-light); }
.purple-text { color: var(--purple); }

.yellow-bg { background-color: var(--warning-light); }
.yellow-text { color: var(--warning); }

.navy-bg { background-color: #E0F2FE; }
.navy-text { color: #0369A1; }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin: 4px 0 6px;
}

.stat-trend {
  font-size: 11px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.trend-arrow {
  width: 12px;
  height: 12px;
}

.trend-up {
  color: var(--text-muted);
}
.trend-up .trend-percent {
  color: var(--success);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.trend-down {
  color: var(--text-muted);
}
.trend-down .trend-percent {
  color: var(--danger);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

/* ==========================================
   DASHBOARD CARD PATTERN (Reusable)
   ========================================== */
.dashboard-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1024px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

.dashboard-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

/* Filter selector */
.card-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-filter:hover {
  background-color: var(--border-light);
  border-color: var(--text-light);
}

.filter-arrow {
  width: 12px;
  height: 12px;
}

/* Link Actions */
.card-link-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-blue);
  transition: color 0.2s;
}

.card-link-action:hover {
  color: var(--primary-blue-hover);
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ==========================================
   ROW 1 WIDGETS
   ========================================== */

/* 1. Doughnut Body Layout */
.doughnut-body {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.chart-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.donut-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

.donut-number.font-small {
  font-size: 16px;
}

.donut-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.donut-label.font-label-small {
  font-size: 10px;
  font-weight: 500;
}

.donut-sublabel {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Chart Legend list */
.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 12px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
}

/* Legend Colors */
.legend-dot.blue { background-color: var(--primary-blue); }
.legend-dot.green { background-color: var(--success); }
.legend-dot.yellow { background-color: var(--warning); }
.legend-dot.purple { background-color: var(--purple); }
.legend-dot.orange { background-color: var(--orange); }
.legend-dot.pink { background-color: #EC4899; }
.legend-dot.red { background-color: var(--danger); }

.legend-label {
  color: var(--text-muted);
  flex: 1;
}

.legend-val {
  font-weight: 600;
  color: var(--text-main);
  margin-left: 8px;
}

.legend-pct {
  color: var(--text-light);
  margin-left: 4px;
}

/* 2. Line Chart Card */
.line-chart-wrapper {
  width: 100%;
  height: 100%;
  min-height: 160px;
  position: relative;
}

/* 3. Location breakdown Card */
.lokasi-body {
  justify-content: flex-start;
}

.lokasi-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lokasi-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lokasi-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.lokasi-name {
  font-weight: 500;
  color: var(--text-main);
}

.lokasi-stats {
  font-weight: 600;
  color: var(--text-main);
}

.lokasi-pct {
  color: var(--text-light);
  font-weight: 400;
  margin-left: 2px;
}

.progress-bar-bg {
  height: 6px;
  background-color: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  width: 100%;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary-blue);
  border-radius: 3px;
  transition: width 1s ease-out;
}

/* ==========================================
   ROW 2 WIDGETS
   ========================================== */

/* 1. Absensi (Same donut layout as above) */
.font-smaller .legend-item {
  font-size: 11px;
}

/* 2. Leave Request List */
.cuti-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cuti-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

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

.cuti-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 40%;
}

.cuti-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.user-dept {
  font-size: 10px;
  color: var(--text-light);
}

.cuti-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  width: 35%;
}

/* Badge Types */
.badge-type {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.blue-badge {
  background-color: var(--primary-blue-light);
  color: var(--primary-blue);
}

.green-badge {
  background-color: var(--success-light);
  color: var(--success);
}

.purple-badge {
  background-color: var(--purple-light);
  color: var(--purple);
}

.cuti-date {
  font-size: 10px;
  color: var(--text-light);
}

.cuti-status {
  width: 25%;
  display: flex;
  justify-content: flex-end;
}

/* Status Badge */
.badge-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-align: center;
}

.badge-status.pending {
  background-color: var(--warning-light);
  color: var(--warning);
}

.badge-status.approved {
  background-color: var(--success-light);
  color: var(--success);
}

.badge-status.rejected {
  background-color: var(--danger-light);
  color: var(--danger);
}

/* 3. Announcement List */
.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.announcement-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

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

.ann-icon-wrapper {
  width: 32px;
  height: 32px;
  background-color: var(--primary-blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ann-icon {
  width: 14px;
  height: 14px;
  color: var(--primary-blue);
}

.ann-details {
  flex: 1;
  padding-right: 70px; /* Space for date on right */
}

.ann-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.ann-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ann-date {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 500;
  position: absolute;
  right: 0;
  top: 2px;
  white-space: nowrap;
}

/* ==========================================
   CONTENT FOOTER
   ========================================== */
.content-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-light);
}

.footer-copy {
  font-weight: 400;
}

.footer-version {
  font-weight: 500;
}

/* ==========================================
   RESPONSIVENESS / COLLAPSE BEHAVIORS
   ========================================== */
@media (max-width: 768px) {
  /* On small screens, collapse sidebar by default */
  .sidebar {
    width: var(--sidebar-width-collapsed);
  }
  .sidebar.collapsed {
    width: 0;
    border-right: none;
  }
  .logo-text, .nav-label, .nav-arrow, .toggle-label {
    opacity: 0;
    pointer-events: none;
    width: 0;
  }
  .sidebar .btn-toggle-sidebar .toggle-icon {
    transform: rotate(180deg);
  }
  .sidebar-footer {
    display: none;
  }
  .search-container {
    width: 200px;
  }
  .profile-info {
    display: none;
  }
}

/* ==========================================
   EMPLOYEE LIST MODULE STYLES (Daftar Karyawan)
   ========================================== */

/* Breadcrumbs & Title */
.breadcrumb-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}
.breadcrumb-link {
  color: var(--text-muted);
  transition: color 0.2s;
}
.breadcrumb-link:hover {
  color: var(--primary-blue);
}
.breadcrumb-separator {
  color: var(--text-light);
}

.btn-primary {
  background-color: var(--primary-blue);
  color: #FFFFFF;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background-color: var(--primary-blue-hover);
}

/* Tabs */
.tabs-container {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.tab-item {
  padding: 10px 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.tab-item:hover {
  color: var(--text-main);
}

.tab-item.active {
  color: var(--primary-blue);
  font-weight: 600;
}

.tab-item.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary-blue);
}

/* Filter Controls */
.filter-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.filter-search-wrapper {
  flex: 2;
  min-width: 260px;
  position: relative;
}

.filter-search-input {
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.filter-search-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.filter-select-wrapper {
  flex: 1;
  min-width: 160px;
  position: relative;
}

.filter-select {
  width: 100%;
  height: 38px;
  padding: 8px 32px 8px 12px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-blue);
}

.filter-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-light);
  pointer-events: none;
}

.btn-filter-action {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-filter-submit {
  background-color: var(--primary-blue-light);
  color: var(--primary-blue);
  border-color: rgba(30, 136, 229, 0.2);
}

.btn-filter-submit:hover {
  background-color: var(--primary-blue);
  color: #FFFFFF;
}

.btn-filter-reset {
  background-color: #FFFFFF;
  color: var(--text-muted);
  border-color: var(--border-color);
}

.btn-filter-reset:hover {
  background-color: var(--border-light);
  color: var(--text-main);
}

/* Active sidebar item for Employee page */
.sidebar .nav-item.has-submenu.open > .nav-link {
  background-color: var(--primary-blue-light);
  color: var(--primary-blue);
}

.sidebar .nav-item.has-submenu.open > .nav-link .nav-icon {
  color: var(--primary-blue);
}

.sidebar .submenu-link.active {
  background-color: rgba(30, 136, 229, 0.08);
  color: var(--primary-blue);
  font-weight: 600;
}

/* Table card */
.table-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.btn-export {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-export:hover {
  background-color: var(--border-light);
}

.btn-export svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background-color: #FAFBFD;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.data-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.data-table th.sortable:hover {
  background-color: #F1F5F9;
}

.sort-indicators {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  vertical-align: middle;
  opacity: 0.5;
}

.sort-indicators svg {
  width: 8px;
  height: 8px;
  stroke-width: 3px;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr:hover td {
  background-color: #FAFBFD;
}

/* User cell info */
.employee-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.employee-meta {
  display: flex;
  flex-direction: column;
}

.employee-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.employee-email {
  font-size: 11px;
  color: var(--text-muted);
}

/* Meta subdivisions */
.td-meta-sub {
  display: flex;
  flex-direction: column;
}

.td-main-text {
  font-weight: 500;
  color: var(--text-main);
}

.td-sub-text {
  font-size: 11px;
  color: var(--text-light);
}

/* Badges for status and type */
.badge-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.badge-status.aktif {
  background-color: var(--success-light);
  color: var(--success);
}

.badge-status.nonaktif {
  background-color: var(--danger-light);
  color: var(--danger);
}

.badge-status.probation {
  background-color: var(--warning-light);
  color: var(--warning);
}

.badge-type {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.badge-type.tetap {
  background-color: var(--primary-blue-light);
  color: var(--primary-blue);
}

.badge-type.kontrak {
  background-color: var(--orange-light);
  color: var(--orange);
}

.badge-type.magang {
  background-color: var(--purple-light);
  color: var(--purple);
}

/* Row Action Buttons */
.row-actions {
  display: flex;
  gap: 4px;
}

.btn-action-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.btn-action-icon:hover {
  background-color: var(--border-light);
  color: var(--text-main);
  border-color: var(--text-light);
}

.btn-action-icon svg {
  width: 14px;
  height: 14px;
}

/* Table Footer Pagination Controls */
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 16px;
}

.table-footer-info {
  font-size: 12px;
  color: var(--text-muted);
}

.table-footer-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-size-selector {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #FFFFFF;
  cursor: pointer;
}

.page-size-selector:focus {
  outline: none;
}

.pagination-list {
  display: flex;
  gap: 4px;
  list-style: none;
}

.page-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  background-color: #FFFFFF;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(.disabled):not(.active) {
  background-color: var(--border-light);
  color: var(--text-main);
}

.page-btn.active {
  background-color: var(--primary-blue);
  color: #FFFFFF;
  border-color: var(--primary-blue);
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn svg {
  width: 12px;
  height: 12px;
}

/* ==========================================
   ORGANIZATION STRUCTURE STYLES (Struktur Organisasi)
   ========================================== */

.org-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .org-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* Tree Chart Card Controls */
.chart-controls-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.chart-search-container {
  position: relative;
  width: 240px;
}

.chart-search-input {
  width: 100%;
  height: 36px;
  padding: 8px 12px 8px 32px;
  background-color: var(--border-light);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.chart-search-input:focus {
  outline: none;
  background-color: #FFFFFF;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.chart-zoom-controls {
  display: flex;
  gap: 6px;
}

.btn-zoom {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  background-color: #FFFFFF;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.btn-zoom:hover {
  background-color: var(--border-light);
  color: var(--text-main);
}

.btn-zoom svg {
  width: 16px;
  height: 16px;
}

/* CSS Org Tree */
.org-chart-viewport {
  width: 100%;
  overflow: auto;
  padding: 40px;
  background-color: #FAFBFD;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
  min-height: 520px;
  position: relative;
  display: block; /* Ensure it is a scrollable block */
  white-space: nowrap; /* Keep nodes on a single horizontal row */
}

.org-tree {
  display: inline-block;
  min-width: 100%;
  text-align: center;
  padding-bottom: 20px;
}

.org-tree ul {
  display: flex;
  justify-content: center;
  padding-top: 24px; /* Space for parent downward connector */
  position: relative;
}

.org-tree li {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 10px 0 10px; /* Top padding is spacing for child vertical connector */
  position: relative;
}

/* Horizontal connectors (sibling lines) */
.org-tree li::before, .org-tree li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 1.5px solid var(--text-light);
  width: 50%;
  height: 24px;
  z-index: 1;
}

.org-tree li::after {
  right: auto;
  left: 50%;
  border-left: 1.5px solid var(--text-light);
}

/* Remove connectors for single child */
.org-tree li:only-child::after, .org-tree li:only-child::before {
  display: none;
}

.org-tree li:only-child {
  padding-top: 0;
}

.org-tree li:first-child::before, .org-tree li:last-child::after {
  border: 0 none;
}

.org-tree li:last-child::before {
  border-right: 1.5px solid var(--text-light);
  border-radius: 0 6px 0 0;
}

.org-tree li:first-child::after {
  border-radius: 6px 0 0 0;
}

/* Parent downward line connector */
.org-tree ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 1.5px solid var(--text-light);
  width: 0;
  height: 24px;
  z-index: 1;
}

/* Node Styling */
.node-box {
  padding: 8px 12px;
  border-radius: 6px;
  background-color: #FFFFFF;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-sm);
  min-width: 140px;
  max-width: 160px;
  border: 1px solid var(--border-color);
}

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

.node-box.selected {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.25), var(--shadow-md);
  z-index: 15;
}

.node-title {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 2px;
  text-align: center;
  white-space: nowrap;
}

.node-count {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Node Color Themes */
.node-blue {
  border: 1.5px solid var(--primary-blue);
  background-color: var(--primary-blue-light);
}
.node-blue .node-title {
  color: var(--primary-blue-hover);
}

.node-green {
  border: 1.5px solid var(--success);
  background-color: var(--success-light);
}
.node-green .node-title {
  color: var(--success);
}

.node-purple {
  border: 1.5px solid var(--purple);
  background-color: var(--purple-light);
}
.node-purple .node-title {
  color: var(--purple);
}

.node-gray {
  border: 1px solid var(--text-light);
  background-color: #F8FAFC;
}
.node-gray .node-title {
  color: var(--text-main);
}

/* Tree Chart Legend */
.chart-legend-footer {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

.legend-checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
}

.legend-color-box {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid var(--border-color);
}

.legend-color-box.blue { background-color: var(--primary-blue-light); border-color: var(--primary-blue); }
.legend-color-box.green { background-color: var(--success-light); border-color: var(--success); }
.legend-color-box.gray { background-color: #F8FAFC; border-color: var(--text-light); }
.legend-color-box.purple { background-color: var(--purple-light); border-color: var(--purple); }

/* Details Panel styling */
.details-pane-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.details-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

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

.btn-edit-detail {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--primary-blue);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit-detail:hover {
  background-color: var(--border-light);
}

.btn-edit-detail svg {
  width: 12px;
  height: 12px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table tr {
  border-bottom: 1px solid var(--border-light);
}

.detail-table tr:last-child {
  border-bottom: none;
}

.detail-table td {
  padding: 10px 0;
  font-size: 12px;
  vertical-align: middle;
}

.detail-label {
  color: var(--text-muted);
  width: 110px;
  font-weight: 500;
}

.detail-value {
  color: var(--text-main);
  font-weight: 600;
}

.detail-leader {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-leader-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.detail-leader-info {
  display: flex;
  flex-direction: column;
}

.detail-leader-name {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.1;
}

.detail-leader-email {
  font-size: 10px;
  color: var(--text-light);
}

/* Minimal Table for Subunits */
.subunit-table {
  width: 100%;
  border-collapse: collapse;
}

.subunit-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
}

.subunit-table td {
  padding: 8px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

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

.subunit-name {
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: color 0.2s;
}

.subunit-name:hover {
  color: var(--primary-blue);
}

.subunit-action-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.subunit-action-btn:hover {
  background-color: var(--border-light);
  color: var(--text-main);
}

.subunit-action-btn svg {
  width: 12px;
  height: 12px;
}

/* ==========================================
   ATTENDANCE MODULE STYLES (Presensi Ringkasan)
   ========================================== */

.attendance-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .attendance-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* Check In / Out status subtext */
.checkin-status {
  font-size: 11px;
  font-weight: 500;
  display: block;
}

.checkin-status.on-time {
  color: var(--success);
}

.checkin-status.late {
  color: var(--orange);
}

/* Additional Status Badges for Attendance */
.badge-status.terlambat {
  background-color: var(--orange-light);
  color: var(--orange);
}

.badge-status.tidak-hadir {
  background-color: var(--danger-light);
  color: var(--danger);
}

.badge-status.izin {
  background-color: var(--purple-light);
  color: var(--purple);
}

.btn-import-data {
  background-color: var(--primary-blue-light);
  color: var(--primary-blue);
  border: 1px solid rgba(30, 136, 229, 0.2);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-import-data:hover {
  background-color: var(--primary-blue);
  color: #FFFFFF;
}

/* Late List and Absent List styling */
.list-item-right-text {
  font-size: 11px;
  color: var(--text-light);
  text-align: right;
  display: flex;
  flex-direction: column;
}

.list-item-right-val {
  font-weight: 600;
  color: var(--text-main);
  font-size: 12px;
}

.list-item-right-sub {
  font-size: 10px;
  color: var(--text-light);
}

.list-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-align: right;
}

/* ==========================================
   LEAVE MODULE STYLES (Cuti & Izin Pengajuan)
   ========================================== */

.leave-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .leave-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* Leave Status Badges */
.badge-status.menunggu {
  background-color: var(--orange-light);
  color: var(--orange);
}

.badge-status.disetujui {
  background-color: var(--success-light);
  color: var(--success);
}

.badge-status.ditolak {
  background-color: var(--danger-light);
  color: var(--danger);
}

.badge-status.dibatalkan {
  background-color: var(--border-light);
  color: var(--text-muted);
}

/* Leave Type Badges */
.badge-leave {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.badge-leave.cuti-tahunan {
  background-color: var(--primary-blue-light);
  color: var(--primary-blue);
}

.badge-leave.izin-pribadi {
  background-color: var(--purple-light);
  color: var(--purple);
}

.badge-leave.cuti-sakit {
  background-color: var(--success-light);
  color: var(--success);
}

.badge-leave.cuti-melahirkan {
  background-color: var(--orange-light);
  color: var(--orange);
}

.badge-leave.izin-keluarga {
  background-color: #E0F2F1;
  color: #00796B;
}

.badge-leave.lainnya {
  background-color: var(--border-light);
  color: var(--text-muted);
}

/* Actions in Leave Table */
.btn-action-more {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.btn-action-more:hover {
  background-color: var(--border-light);
  color: var(--text-main);
}

.btn-action-more svg {
  width: 12px;
  height: 12px;
}




