/* ============================================
   PayFlow Design System
   Part of WorkFlow by MOKADI ecosystem
   Accent Color: Blue (#2563eb)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* === CSS Variables === */
:root {
  /* Colors */
  --bg-primary: #0a1628;
  --bg-secondary: #0d2137;
  --bg-tertiary: #112840;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-sidebar: rgba(0, 0, 0, 0.25);
  --bg-input: rgba(255, 255, 255, 0.06);
  --bg-input-focus: rgba(255, 255, 255, 0.1);

  /* PayFlow Blue Accent */
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --accent-dark: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.3);
  --accent-gradient: linear-gradient(135deg, #2563eb, #1d4ed8);
  --accent-gradient-hover: linear-gradient(135deg, #3b82f6, #2563eb);

  /* Status Colors */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --info: #06b6d4;
  --info-bg: rgba(6, 182, 212, 0.12);

  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #60a5fa;

  /* Borders */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(37, 99, 235, 0.4);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Spacing */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* === Layout === */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: width var(--transition-slow);
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo svg {
  width: 36px;
  height: 36px;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
}

.sidebar-brand h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sidebar-brand span {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 8px;
}

.nav-section-title {
  padding: 8px 14px 6px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 450;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-glow);
  color: var(--text-primary);
  font-weight: 500;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-item .icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.active .icon {
  opacity: 1;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-color);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.06);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
}

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

.user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* === Main Content === */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.main-header {
  height: var(--header-height);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.page-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--text-accent);
}

.breadcrumb .separator {
  font-size: 0.7rem;
  opacity: 0.5;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.month-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.month-selector:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
}

.month-selector svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* === Page Content === */
.page-content {
  padding: 24px 28px;
  flex: 1;
}

/* === Cards === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--border-color-hover);
}

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

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title .icon {
  width: 20px;
  height: 20px;
  color: var(--accent-light);
}

.card-body {
  padding: 20px 22px;
}

.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-color);
}

/* === Stat Cards === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

.stat-card:hover::before {
  opacity: 1;
}

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

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.blue { background: rgba(37, 99, 235, 0.15); color: var(--accent-light); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.cyan { background: var(--info-bg); color: var(--info); }

.stat-value {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-change {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

/* === Tables === */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

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

table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

table thead th:first-child {
  border-radius: var(--radius-sm) 0 0 0;
}

table thead th:last-child {
  border-radius: 0 var(--radius-sm) 0 0;
}

table tbody td {
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

table tbody tr {
  transition: background var(--transition-fast);
}

table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

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

.cell-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cell-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: white;
  flex-shrink: 0;
}

.cell-avatar.blue { background: var(--accent-gradient); }
.cell-avatar.green { background: linear-gradient(135deg, #10b981, #059669); }
.cell-avatar.orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.cell-avatar.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

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

.cell-employee-name {
  font-weight: 500;
  color: var(--text-primary);
}

.cell-employee-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cell-amount {
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.cell-amount.positive {
  color: var(--success);
}

.cell-amount.negative {
  color: var(--danger);
}

/* === Status Badge === */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 500;
}

.status-badge.active {
  background: var(--success-bg);
  color: var(--success);
}

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

.status-badge.inactive {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
}

.status-badge.leave {
  background: var(--info-bg);
  color: var(--info);
}

.status-badge.sick {
  background: var(--danger-bg);
  color: var(--danger);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* === Tabs === */
.tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.15);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.tab {
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 450;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  font-family: inherit;
}

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

.tab.active {
  background: var(--accent);
  color: white;
  font-weight: 500;
}

/* === Forms === */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus {
  background: var(--bg-input-focus);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

select.form-input option {
  background-color: #1e293b; 
  color: #f1f5f9;
}

/* === Grid Layouts === */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* === Content Sections (Pages) === */
.page-section {
  display: none;
}

.page-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* === Charts / Visual Elements === */
.chart-placeholder {
  height: 200px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, transparent 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 0 16px 16px;
  gap: 8px;
}

.chart-bar {
  flex: 1;
  background: var(--accent-gradient);
  border-radius: 4px 4px 0 0;
  min-height: 20px;
  transition: all var(--transition-normal);
  opacity: 0.7;
  position: relative;
}

.chart-bar:hover {
  opacity: 1;
  transform: scaleY(1.05);
  transform-origin: bottom;
}

.chart-bar::after {
  content: attr(data-label);
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.88rem;
  max-width: 400px;
  margin: 0 auto;
}

/* === Utility === */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-mono { font-variant-numeric: tabular-nums; }

/* === Toolbar === */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input {
  width: 260px;
  padding: 8px 14px 8px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: all var(--transition-fast);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}

.search-input:focus {
  background-color: var(--bg-input-focus);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* === Summary Row (table footer) === */
table tfoot td {
  padding: 14px 16px;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(37, 99, 235, 0.06);
  border-top: 2px solid var(--border-accent);
  font-size: 0.9rem;
}

/* === Info Card === */
.info-card {
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.info-card .info-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-light);
  flex-shrink: 0;
  margin-top: 1px;
}

.info-card .info-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === Progress Bar === */
.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width var(--transition-slow);
}

.progress-fill.blue { background: var(--accent-gradient); }
.progress-fill.green { background: linear-gradient(90deg, #10b981, #059669); }
.progress-fill.orange { background: linear-gradient(90deg, #f59e0b, #d97706); }
.progress-fill.red { background: linear-gradient(90deg, #ef4444, #dc2626); }

/* === Responsive === */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .main-content {
    margin-left: 0;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* === Loading State === */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  gap: 10px;
}

.loading-state::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === Flex Utilities === */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.gap-12 { gap: 12px; }
.mb-16 { margin-bottom: 16px; }
.text-right { text-align: right; }

/* === Progress Bar === */
.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width var(--transition-slow);
}

.progress-fill.green { background: var(--success); }
.progress-fill.orange { background: var(--warning); }
.progress-fill.red { background: var(--danger); }

/* === Info Card === */
.info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--info-bg);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.info-icon { font-size: 1.2rem; }
.info-text { font-size: 0.85rem; color: var(--info); }

/* === Tfoot === */
table tfoot td {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-primary);
  border-top: 2px solid var(--border-accent);
  font-size: 0.88rem;
}

/* === Settings === */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-item label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.setting-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.setting-value.highlight {
  color: var(--accent-light);
  border-color: var(--border-accent);
  background: rgba(37,99,235,0.08);
}

.hours-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.setting-item.compact {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.setting-item.compact label {
  min-width: 32px;
  text-transform: none;
}

/* === Form Inputs === */
.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input.sm {
  padding: 6px 8px;
  font-size: 0.82rem;
  width: 70px;
  text-align: center;
}

/* === Toolbar === */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* === Search === */
.search-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 7px 14px 7px 34px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  width: 220px;
  transition: all var(--transition-fast);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}

.search-input:focus {
  border-color: var(--accent);
  background-color: var(--bg-input-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* === Chart placeholder === */
.chart-placeholder {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  padding: 20px 0;
}

.chart-bar {
  flex: 1;
  background: var(--accent-gradient);
  border-radius: 4px 4px 0 0;
  position: relative;
  min-width: 24px;
  transition: height var(--transition-slow);
  opacity: 0.7;
}

.chart-bar:hover { opacity: 1; }
.chart-bar::after { content: attr(data-label); position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 0.68rem; color: var(--text-muted); }

/* === Custom Month Picker === */
.custom-month-picker { position: absolute; top: 100%; right: 0; margin-top: 10px; width: 230px; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(8px); border: 1px solid var(--border-color); border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); z-index: 1000; display: none; flex-direction: column; padding: 12px; cursor: default; }
.custom-month-picker.active { display: flex; }
.cmp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cmp-header button { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px 10px; border-radius: 4px; font-size: 0.9rem; }
.cmp-header button:hover { color: var(--text-primary); background: rgba(255,255,255,0.1); }
.cmp-header span { font-weight: 600; color: var(--text-primary); font-size: 0.95rem; }
.cmp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cmp-month { padding: 8px 0; text-align: center; border-radius: 4px; cursor: pointer; color: var(--text-muted); font-size: 0.85rem; transition: background 0.1s; }
.cmp-month:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.cmp-month.active { background: var(--accent); color: white; font-weight: 500; }

/* === Modal Styles === */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all 0.2s ease-out;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  width: 90%; max-width: 850px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  transform: translateY(20px) scale(0.95);
  transition: all 0.2s ease-out;
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-title { font-weight: 600; font-size: 1.1rem; color: var(--text-primary); }
.modal-close {
  background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 4px; border-radius: 4px;
}
.modal-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }

.modal-body {
  padding: 20px; overflow-y: auto; flex: 1;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex; justify-content: flex-end; gap: 10px; background: rgba(0,0,0,0.2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.form-group .form-input { width: 100%; }
.form-group.checkbox { display: flex; align-items: center; gap: 8px; flex-direction: row-reverse; justify-content: flex-end; }
.form-group.checkbox label { margin-bottom: 0; cursor: pointer; }
.form-group.checkbox input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }
/* === Back to Portal Icon === */
.btn-back-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: auto;
  flex-shrink: 0;
  border-radius: 50%;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-back-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* === Lock Screen Overlay === */
.lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 20, 0.92);
  backdrop-filter: blur(30px) saturate(120%);
  -webkit-backdrop-filter: blur(30px) saturate(120%);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lock-overlay.active {
  display: flex;
  opacity: 1;
}

/* Animated background particles */
.lock-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 600px 400px at 20% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 30%, rgba(37, 99, 235, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 80%, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
  animation: lockBgPulse 8s ease-in-out infinite alternate;
}

@keyframes lockBgPulse {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.lock-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 56px;
  background: rgba(13, 33, 55, 0.65);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 24px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 
    0 0 80px rgba(37, 99, 235, 0.08),
    0 25px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: lockContainerIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  min-width: 380px;
}

@keyframes lockContainerIn {
  0% { opacity: 0; transform: scale(0.9) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.lock-icon-wrapper {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.05));
  border: 1px solid rgba(37, 99, 235, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #60a5fa;
  animation: lockIconPulse 3s ease-in-out infinite;
}

@keyframes lockIconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.2); }
  50% { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
}

.lock-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.lock-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.lock-pin-group {
  width: 100%;
  margin-bottom: 20px;
}

.lock-pin-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(37, 99, 235, 0.3);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-align: center;
  outline: none;
  transition: all var(--transition-fast);
}

.lock-pin-input::placeholder {
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.5em;
}

.lock-pin-input:focus {
  border-color: var(--accent-light);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), 0 0 20px rgba(37, 99, 235, 0.1);
}

.lock-pin-error {
  font-size: 0.8rem;
  color: #f87171;
  text-align: center;
  min-height: 22px;
  margin-top: 8px;
  transition: opacity 0.2s;
}

.lock-pin-input.shake {
  animation: lockShake 0.5s ease-in-out;
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

@keyframes lockShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-8px); }
  30% { transform: translateX(8px); }
  45% { transform: translateX(-6px); }
  60% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
  90% { transform: translateX(3px); }
}

.lock-unlock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 24px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.lock-unlock-btn:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.lock-unlock-btn:active {
  transform: translateY(0);
}

.lock-footer-text {
  margin-top: 24px;
  font-size: 0.72rem;
  color: rgba(100, 116, 139, 0.6);
  letter-spacing: 0.05em;
}

/* === Print Styles === */
@media print {
  body { background: none !important; background-color: white !important; color: black !important; }
  .sidebar, .main-header, .toolbar, .info-card { display: none !important; }
  .main-content { margin-left: 0 !important; padding: 0 !important; background: transparent !important; }
  .page-content { padding: 0 !important; }
  .card { border: 1px solid #ddd !important; box-shadow: none !important; max-width: 100% !important; width: 100% !important; background: white !important; color: black !important; border-radius: 0 !important; }
  .card-header .card-title, .cell-amount, .cell-employee-name { color: black !important; }
  .cell-amount.positive { color: #000 !important; }
  .cell-amount.negative { color: #000 !important; }
  * { --text-primary: black; --text-muted: #333; --border-color: #ddd; --accent-light: black; }
  table th { background: #f0f0f0 !important; color: black !important; border-bottom: 2px solid #ddd !important; }
  table td { border-bottom: 1px solid #ddd !important; }
  table tfoot td { color: black !important; border-top: 2px solid #000 !important; }
  .progress-bar { display: none !important; }
  .print-only { display: block !important; }
  .screen-only { display: none !important; }
  .payslip-page { page-break-after: always; break-after: page; }
}

@media screen {
  .print-only { display: none !important; }
}
