/* Core Design System for BUKUPRO */
:root {
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* Premium Color Palette (Indigo Accent / Sleek Dark Sidebar) */
  --bg-app: #f6f8fb;
  --bg-sidebar: #0f172a;
  --bg-sidebar-hover: #1e293b;
  --bg-sidebar-active: #334155;
  --text-sidebar: #94a3b8;
  --text-sidebar-light: #f8fafc;
  
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --color-primary: #6366f1; /* Indigo */
  --color-primary-hover: #4f46e5;
  --color-primary-soft: #e0e7ff;
  
  --color-success: #10b981; /* Green */
  --color-success-soft: #d1fae5;
  --color-warning: #f59e0b; /* Orange */
  --color-warning-soft: #fef3c7;
  --color-danger: #ef4444; /* Red */
  --color-danger-soft: #fee2e2;
  --color-info: #06b6d4; /* Cyan */
  --color-info-soft: #ecfeff;
  --color-purple: #8b5cf6;
  --color-purple-soft: #f5f3ff;

  --border-color: #e2e8f0;
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  --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.02);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: auto;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

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

/* Sidebar Styling */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: var(--text-sidebar-light);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.15);
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-purple));
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.5px;
  color: white;
}

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

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--text-sidebar);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 24px 16px;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-sidebar);
  letter-spacing: 1px;
  margin: 20px 8px 8px 8px;
  text-transform: uppercase;
  opacity: 0.6;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: var(--text-sidebar);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--border-radius-md);
  margin-bottom: 4px;
  transition: all var(--transition-fast);
}

.nav-item i {
  width: 18px;
  height: 18px;
  stroke-width: 2px;
}

.nav-item:hover {
  background-color: var(--bg-sidebar-hover);
  color: var(--text-sidebar-light);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--color-primary), rgba(99, 102, 241, 0.8));
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--border-radius-md);
  background-color: rgba(255, 255, 255, 0.03);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background-color: var(--color-primary);
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.user-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-sidebar-light);
}

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

/* Main Content Workspace */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Prevents flex items from overflowing */
}

/* Header Styling */
.app-header {
  height: 70px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #f1f5f9;
  border-radius: var(--border-radius-md);
  padding: 8px 16px;
  width: 320px;
}

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

.header-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  color: var(--text-primary);
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #f1f5f9;
  padding: 8px 12px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

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

.lang-select {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color var(--transition-fast);
}

.icon-btn:hover {
  background-color: #f1f5f9;
  color: var(--text-primary);
}

.icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background-color: var(--color-danger);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

/* Content Body */
.content-body {
  padding: 32px;
  flex: 1;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
}

.page-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 4px;
}

.header-date {
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
  padding: 8px 16px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.05);
}

/* Tab Management */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.35s ease-out;
}

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

/* Card Styling */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

/* Dashboard Summary Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.metric-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.metric-card.mini {
  padding: 18px 24px;
}

.card-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon i {
  width: 24px;
  height: 24px;
}

/* Soft BG colors */
.bg-soft-blue { background-color: var(--color-primary-soft); color: var(--color-primary); }
.bg-soft-green { background-color: var(--color-success-soft); color: var(--color-success); }
.bg-soft-orange { background-color: var(--color-warning-soft); color: var(--color-warning); }
.bg-soft-purple { background-color: var(--color-purple-soft); color: var(--color-purple); }

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

.metric-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--text-primary);
  margin: 4px 0;
}

.font-large {
  font-size: 1.35rem;
}

.metric-change {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Dashboard Layout Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

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

.chart-container {
  position: relative;
  height: 280px;
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.18);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

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

.btn-danger {
  background-color: var(--color-danger);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
}

/* Filter Panel */
.filter-panel {
  padding: 20px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.filter-group select, .filter-group input {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  background-color: #f8fafc;
  outline: none;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.filter-group select:focus, .filter-group input:focus {
  border-color: var(--color-primary);
  background-color: white;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i, .input-with-icon svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 36px;
  width: 100%;
}

.table-container, .table-responsive {
  overflow-x: auto;
  width: 100%;
}

.data-table, .table {
  width: 100%;
  min-width: 1000px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

#settings-brand-table {
  min-width: 1200px;
}

.data-table th, .table th {
  background-color: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 14px 20px;
  border-bottom: 1.5px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.data-table td, .table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.data-table tbody tr, .table tbody tr {
  transition: background-color var(--transition-fast);
}

.data-table tbody tr:hover, .table tbody tr:hover {
  background-color: #f8fafc;
}

.avatar-table {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #f1f5f9;
  border: 1.5px solid var(--border-color);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: zoom-in;
  position: relative;
  z-index: 1;
}

.avatar-table:hover {
  transform: scale(2.6);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-color: #3b82f6;
  z-index: 99;
}

.badge-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

select.badge-chip option {
  background-color: #ffffff !important;
  color: #1f2937 !important;
  font-weight: 500;
}

.badge-chip.active { background-color: var(--color-success-soft); color: var(--color-success); }
.badge-chip.wfh { background-color: rgba(59, 130, 246, 0.1); color: #2563eb; }
.badge-chip.offday { background-color: rgba(234, 179, 8, 0.15); color: #d97706; }
.badge-chip.cuti { background-color: rgba(168, 85, 247, 0.15); color: #8b5cf6; }
.badge-chip.pecat { background-color: var(--color-danger-soft); color: var(--color-danger); }
.badge-chip.resign { background-color: rgba(148, 163, 184, 0.15); color: #64748b; }
.badge-chip.berhenti { background-color: rgba(249, 115, 22, 0.15); color: #ea580c; }
.badge-chip.paid { background-color: var(--color-success-soft); color: var(--color-success); }
.badge-chip.unpaid { background-color: var(--color-warning-soft); color: var(--color-warning); }
.badge-chip.clickable {
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
}
.badge-chip.clickable:hover {
  opacity: 0.8;
  transform: translateY(-0.5px);
}

.table-status-select {
  padding: 7px 30px 7px 16px;
  border-radius: 30px;
  font-size: 0.825rem;
  font-weight: 600;
  border: 1px solid transparent;
  outline: none;
  cursor: pointer;
  width: auto;
  min-width: 120px;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.table-status-select:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.table-status-select option {
  background-color: #ffffff;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: none;
}

.table-status-select.active {
  background-color: rgba(16, 185, 129, 0.08);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.15);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 9l3 3 3-3' stroke='%23059669' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 14px;
}

.table-status-select.inactive {
  background-color: rgba(244, 63, 94, 0.08);
  color: #e11d48;
  border-color: rgba(244, 63, 94, 0.15);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 9l3 3 3-3' stroke='%23e11d48' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 14px;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.action-btn:hover {
  background-color: #f1f5f9;
}

.action-btn.edit:hover { color: var(--color-primary); }
.action-btn.view:hover { color: var(--color-info); }
.action-btn.delete:hover { color: var(--color-danger); }

.action-btn i {
  width: 16px;
  height: 16px;
}

/* Forms */
.form-container {
  max-width: 800px;
  margin: 0 auto;
}

.form-section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: 2px solid var(--color-primary-soft);
  padding-bottom: 6px;
  margin-bottom: 20px;
  color: var(--color-primary);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.col-span-2 {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .col-span-2 {
    grid-column: span 1;
  }
}

.form-group label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group label[required]::after {
  content: " *";
  color: var(--color-danger);
}

.form-group input, .form-group select, .form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 0.875rem;
  outline: none;
  background-color: #ffffff;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control-block {
  width: 100%;
}

.input-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* Modals Overlay & Box */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background-color: var(--bg-card);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

.max-w-2xl {
  max-width: 720px;
}

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

.modal-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast);
}

.modal-close:hover {
  background-color: #f1f5f9;
  color: var(--text-primary);
}

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

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Detail Card UI inside modal */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
}

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

.detail-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary-soft);
}

.detail-name-role h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.detail-name-role p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-val {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-top: 2px;
}

.detail-section-title {
  grid-column: span 2;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary);
  border-bottom: 1.5px solid var(--color-primary-soft);
  padding-bottom: 4px;
  margin-top: 12px;
  font-size: 0.95rem;
}

/* System Settings Layout */
.settings-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

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

.settings-sidebar {
  padding: 12px;
  height: fit-content;
}

.settings-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  margin-bottom: 4px;
}

.settings-menu-item:hover {
  background-color: #f1f5f9;
  color: var(--text-primary);
}

.settings-menu-item.active {
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
}

.settings-sub-content {
  display: none;
}

.settings-sub-content.active {
  display: block;
  animation: fadeIn var(--transition-normal);
}

.info-banner {
  background-color: var(--color-info-soft);
  color: var(--color-info);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  font-size: 0.825rem;
}

.info-banner i {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* Utility Helpers */
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-0 { margin-bottom: 0px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-align-center { display: flex; align-items: center; }
.gap-2 { gap: 8px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-green { color: var(--color-success) !important; }
.text-orange { color: var(--color-warning) !important; }
.text-muted { color: var(--text-muted); }
.text-uppercase { text-transform: uppercase; }

/* Printing styles for beautiful reports */
@media print {
  body {
    background-color: white;
    color: black;
    font-size: 10pt;
  }
  .sidebar, .app-header, .filter-panel, .btn, .action-buttons, .modal-overlay, .settings-sidebar, .lang-selector-wrapper {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  .content-body {
    padding: 0 !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .data-table {
    width: 100% !important;
    border: 1px solid #cbd5e1 !important;
  }
  .data-table th {
    background-color: #f1f5f9 !important;
    color: black !important;
    border-bottom: 2px solid #94a3b8 !important;
  }
  .data-table td {
    border-bottom: 1px solid #cbd5e1 !important;
  }
  .page-header {
    margin-bottom: 20px !important;
  }
  .page-title {
    font-size: 20pt !important;
  }
}

/* Premium Switch Toggle CSS */
.switch-container {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch-container input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e2e8f0;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.switch-container input:checked + .switch-slider {
  background-color: #2563eb;
}

.switch-container input:checked + .switch-slider:before {
  transform: translateX(22px);
}

/* Premium Info Settings Card */
.info-settings-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 20px;
}

.info-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.info-settings-title-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.info-settings-title-group .info-icon {
  color: #3b82f6;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.info-settings-label {
  font-weight: 700;
  font-size: 0.875rem;
  color: #1e293b;
  cursor: pointer;
  display: block;
  margin-bottom: 2px;
}

.info-settings-desc {
  font-size: 0.775rem;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

/* Status indicator badge */
.status-indicator {
  font-size: 0.725rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-indicator.active {
  background-color: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.status-indicator.inactive {
  background-color: rgba(244, 63, 94, 0.1);
  color: #e11d48;
}

/* Static status badge for master tables (Minimalist Dot Style) */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  justify-content: center;
  width: 100%;
}

.status-badge::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-badge.active::before {
  background-color: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.status-badge.inactive::before {
  background-color: #f43f5e;
  box-shadow: 0 0 6px rgba(244, 63, 94, 0.4);
}

/* Document photo cards inside details modal */
.document-photos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.document-photo-card {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  overflow: hidden;
  background-color: #f8fafc;
  display: flex;
  flex-direction: column;
  height: 120px;
  position: relative;
}

.document-photo-card.empty {
  border-style: dashed;
  justify-content: center;
  align-items: center;
  color: #94a3b8;
  padding: 10px;
  text-align: center;
}

.document-photo-card.empty i {
  color: #cbd5e1;
  margin-bottom: 6px;
}

.document-photo-card.empty span {
  font-size: 0.725rem;
  font-weight: 500;
}

.document-photo-thumbnail {
  width: 100%;
  height: 90px;
  object-fit: cover;
  cursor: zoom-in;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.document-photo-thumbnail:hover {
  transform: scale(2.2);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: rgba(0, 0, 0, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  z-index: 100;
}

.document-photo-label {
  font-size: 0.725rem;
  font-weight: 600;
  color: #475569;
  text-align: center;
  padding: 6px 4px;
  background-color: #ffffff;
  border-top: 1px solid var(--border-color, #e2e8f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: auto;
}

/* Image preview box in form fields */
.image-preview-box {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  border: 1px solid var(--border-color, #e2e8f0);
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: #94a3b8;
  transition: all var(--transition-fast);
}

.image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Premium Lightbox Overlay */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-overlay.open img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-close:hover {
  background-color: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.4);
  transform: rotate(90deg);
}

/* Drag and Drop Styling for Settings Tables */
#settings-dropdowns-tbody tr,
#settings-currency-tbody tr,
#settings-country-tbody tr,
#settings-language-tbody tr {
  transition: all 0.2s ease;
}
#settings-dropdowns-tbody tr.dragging,
#settings-currency-tbody tr.dragging,
#settings-country-tbody tr.dragging,
#settings-language-tbody tr.dragging {
  opacity: 0.4;
  background-color: #f5f3ff !important;
  border: 2px dashed var(--primary-color) !important;
}
.drag-handle {
  cursor: grab;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}
.drag-handle:hover {
  color: var(--primary-color);
}
.drag-handle:active {
  cursor: grabbing;
}

/* Security Page Collapsible Accordion */
.accordion-group {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  background: var(--card-bg, #ffffff);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.25s ease;
}

.accordion-group:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}

.accordion-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: var(--slate-50, #f8fafc);
  user-select: none;
  transition: background-color 0.2s ease;
}

.accordion-header:hover {
  background: var(--slate-100, #f1f5f9);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
}

.accordion-group.active .accordion-content {
  max-height: 800px;
  border-top: 1px solid var(--border-color);
}

.accordion-group.active .accordion-chevron {
  transform: rotate(180deg);
}

/* Sidebar Collapsible Section */
.sidebar-collapsible-content {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.sidebar-collapsible-content.collapsed {
  max-height: 0 !important;
}

.collapsible-sidebar-header.collapsed .sidebar-chevron {
  transform: rotate(-90deg);
}

.accordion-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.accordion-badge.safe {
  background-color: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.accordion-badge.warning {
  background-color: #fffbeb;
  color: #d97706;
  border-color: #fde68a;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.08);
}

.document-pdf-thumbnail {
  width: 100%;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.document-pdf-thumbnail:hover {
  background-color: #e2e8f0;
}

/* Premium Document Upload Cards */
.document-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.document-upload-card {
  background: #ffffff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.document-upload-card:hover {
  border-color: var(--primary-color-light, #c7d2fe);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.04);
}

.doc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--border-color, #e2e8f0);
  padding-bottom: 8px;
}

.doc-card-header .doc-icon {
  width: 16px;
  height: 16px;
  color: var(--primary-color, #4f46e5);
}

.doc-card-header .doc-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}

.doc-card-header .badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.badge-danger {
  background-color: #fef2f2;
  color: #ef4444;
  border: 1px solid #fee2e2;
}

.badge-secondary {
  background-color: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.doc-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--slate-50, #f8fafc);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color, #e2e8f0);
}

.doc-filename {
  font-size: 0.725rem;
  color: var(--text-secondary, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.doc-preview-badge {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  overflow: hidden;
  flex-shrink: 0;
}

.doc-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  padding: 6px 10px;
  background: white;
}

.doc-link-row .link-icon {
  width: 14px;
  height: 14px;
  color: #94a3b8;
}

.doc-link-row input {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0.75rem !important;
  color: var(--text-primary, #1e293b);
  width: 100%;
  outline: none;
  background: transparent;
}

/* Collapsible Form Sections */
.form-collapsible-section {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: white;
  margin-top: 1.5rem;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.form-collapsible-section:hover {
  border-color: var(--primary-light, #93c5fd);
}

.form-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--slate-50, #f8fafc);
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-color, #2563eb);
}

.section-chevron {
  transition: transform 0.2s ease;
  width: 16px;
  height: 16px;
  color: var(--text-secondary, #64748b);
}

.form-collapsible-section.active .section-chevron {
  transform: rotate(180deg);
}

.form-section-content {
  max-height: 2500px;
  padding: 20px;
  border-top: 1px solid var(--border-color, #e2e8f0);
  transition: max-height 0.3s ease-in-out, padding 0.3s ease, opacity 0.2s ease;
  opacity: 1;
}

.form-collapsible-section:not(.active) .form-section-content {
  max-height: 0;
  padding: 0 20px;
  border-top-color: transparent;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.completeness-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
}

.badge-success {
  background-color: #f0fdf4;
  color: #16a34a;
  border: 1px solid #dcfce7;
}

/* Badge Info Icon */
.info-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 800;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 1;
}

.badge-danger .info-icon-badge {
  background-color: #ef4444;
  color: #ffffff !important;
}

.badge-success .info-icon-badge {
  background-color: #16a34a;
  color: #ffffff !important;
}

.badge-secondary .info-icon-badge {
  background-color: #64748b;
  color: #ffffff !important;
}

/* Completeness Custom Popup Modal */
.completeness-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.completeness-popup-overlay.active {
  opacity: 1;
}

.completeness-popup-card {
  background: white;
  width: 90%;
  max-width: 400px;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-color, #e2e8f0);
  transform: scale(0.9);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.completeness-popup-overlay.active .completeness-popup-card {
  transform: scale(1);
}

.completeness-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background-color: var(--slate-50, #f8fafc);
}

.completeness-popup-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary, #1e293b);
}

.completeness-popup-close-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s ease;
}

.completeness-popup-close-btn:hover {
  color: var(--text-primary, #1e293b);
}

.completeness-popup-body {
  padding: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.6;
}

/* ================= ATTENDANCE STYLES ================= */
.attendance-toggle-group {
  display: inline-flex;
  background-color: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  border: 1px solid #e2e8f0;
}

.attendance-toggle-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 0.775rem;
  font-weight: 700;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s) ease;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.attendance-toggle-btn:hover {
  color: #1e293b;
  background-color: rgba(255, 255, 255, 0.5);
}

.attendance-toggle-btn.active-hadir {
  background-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.attendance-toggle-btn.active-sakit {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.attendance-toggle-btn.active-izin {
  background-color: #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
}

.attendance-toggle-btn.active-alpa {
  background-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
}

.attendance-toggle-btn.active-off {
  background-color: #64748b !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(100, 116, 139, 0.3);
}

.attendance-time-input {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 0.8rem;
  font-weight: 500;
  color: #334155;
  width: 106px;
  outline: none;
  text-align: center;
  transition: border-color 0.15s ease;
}

.attendance-time-input:focus {
  border-color: var(--primary-color, #4f46e5);
}

.attendance-note-input {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 0.8rem;
  color: #334155;
  outline: none;
  width: 100%;
  max-width: 240px;
  transition: border-color 0.15s ease;
}

.attendance-note-input:focus {
  border-color: var(--primary-color, #4f46e5);
}

.attend-report-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.775rem;
  font-weight: 700;
  padding: 2px;
}

.attend-report-badge.rep-hadir { background-color: rgba(16, 185, 129, 0.12); color: #10b981; }
.attend-report-badge.rep-sakit { background-color: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.attend-report-badge.rep-izin { background-color: rgba(245, 158, 11, 0.12); color: #d97706; }
.attend-report-badge.rep-alpa { background-color: rgba(239, 68, 68, 0.12); color: #ef4444; }
.attend-report-badge.rep-off { background-color: rgba(100, 116, 139, 0.12); color: #64748b; }

/* ================= MOBILE RESPONSIVE SIDEBAR & HEADER ================= */
.mobile-menu-btn {
  display: none;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1024px) {
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: #f1f5f9;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    flex-shrink: 0;
  }

  .sidebar {
    position: fixed !important;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh !important;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .app-header {
    padding: 0 16px;
  }

  .content-body {
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .header-search {
    width: 140px !important;
  }
  .lang-selector-wrapper {
    padding: 6px 8px;
  }
  .lang-select {
    font-size: 0.75rem;
  }
  
  /* Make metric grids and cards fit beautifully on mobile screens */
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .page-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .header-buttons {
    flex-wrap: wrap;
    gap: 8px;
  }
  .header-buttons button {
    flex: 1;
    min-width: 120px;
  }
}

/* Completeness Banner Card Responsive Style */
.completeness-banner-card {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.2s;
}

@media (max-width: 768px) {
  .completeness-banner-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .completeness-banner-card .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Agreement Popup Details CSS */
.agreement-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.agreement-popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.agreement-popup-card {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  width: 90%;
  max-width: 460px;
  padding: 24px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.agreement-popup-overlay.active .agreement-popup-card {
  transform: scale(1);
}

.agreement-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}

/* ==========================================
   PORTAL LOGIN & STAFF AREA CSS
   ========================================== */

/* Role-based Display Management */
body:not(.role-staff) .staff-only {
  display: none !important;
}
body.role-staff .admin-only {
  display: none !important;
}

/* Login Screen Layout */
.login-screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 50%, #1e3a8a 100%);
  background-size: 200% 200%;
  animation: gradientBG 15s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 20px;
  font-family: 'Inter', sans-serif;
  color: #1e293b;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 36px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
}

.login-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.login-logo-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 12px;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
}

.login-logo-circle i, .login-logo-circle svg {
  width: 28px;
  height: 28px;
}

.login-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.login-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 4px;
}

/* Tab Selector for Login Role */
.login-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 24px;
}

.login-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-tab-btn.active {
  background: white;
  color: #4f46e5;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.login-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.login-form-group label {
  font-size: 0.775rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrapper i, .login-input-wrapper svg {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.login-input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  outline: none;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input-wrapper input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.login-submit-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  color: white;
  border: none;
  font-size: 0.925rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.login-submit-btn:hover {
  opacity: 0.95;
}

.login-submit-btn:active {
  transform: scale(0.98);
}

.login-error-message {
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 12px;
  text-align: center;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  padding: 8px 12px;
  border-radius: 8px;
  display: none;
}

/* Staff Panel Widgets & Cards */
.staff-welcome-section {
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.staff-welcome-text h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
}

.staff-welcome-text p {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 4px;
}

.staff-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.staff-dashboard-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.staff-dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

.staff-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.staff-card-info {
  display: flex;
  flex-direction: column;
}

.staff-card-info .card-label {
  font-size: 0.775rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
}

.staff-card-info .card-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
}

/* Completeness Banner Card for Staff View */
.staff-completeness-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

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

.staff-completeness-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.staff-progress-wrapper {
  background: #f1f5f9;
  border-radius: 9999px;
  height: 12px;
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
}

.staff-progress-bar {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease-out;
}

.staff-completeness-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.staff-completeness-section-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

.staff-completeness-section-block h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
  letter-spacing: 0.05em;
}

.staff-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.825rem;
  color: #334155;
  margin-bottom: 8px;
}

.staff-checklist-item:last-child {
  margin-bottom: 0;
}

.staff-checklist-item i, .staff-checklist-item svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.staff-checklist-item.done {
  color: #059669;
}

.staff-checklist-item.missing {
  color: #ef4444;
}

@media (max-width: 768px) {
  .staff-welcome-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* PIN Keypad Calculator Style CSS */
.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background-color: transparent;
  transition: all 0.2s ease-in-out;
}

.pin-dot.filled {
  background-color: #4f46e5;
  border-color: #4f46e5;
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(79, 70, 229, 0.4);
}

.pin-keypad-grid button {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease-in-out;
  margin: 0 auto;
  outline: none;
  user-select: none;
}

.pin-keypad-grid button:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.pin-keypad-grid button:active {
  background: #e2e8f0;
  transform: translateY(0);
}

.pin-keypad-grid button.action-btn {
  background: #f1f5f9;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
}

.pin-keypad-grid button.action-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}



