.hr-page-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0 0 0.5rem;
}

.hr-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

.hr-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #475569;
}
.hr-overview-intro {
  margin-bottom: 1.5rem;
}

.hr-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.snapshot-card {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.snapshot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.snapshot-card:nth-child(1) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.snapshot-card:nth-child(2) {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.snapshot-card:nth-child(3) {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.snapshot-card:nth-child(4) {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.snapshot-card:nth-child(5) {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.snapshot-card:nth-child(6) {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.snapshot-card header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.snapshot-card h3 {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.snapshot-card strong {
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.snapshot-card p {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
}

.snapshot-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.hr-content {
  display: flex;
  flex-direction: column;
  gap: 1.45rem;
  padding: 0;
}

.hr-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hr-module-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 1rem;
  position: relative;
  z-index: 10;
}

.hr-nav-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  padding: 0.4rem 0.55rem;
  border: none;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  color: #475569;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
  z-index: 2;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
  flex: 0 0 auto;
}

.hr-nav-pill .pill-icon {
  font-size: 1rem;
  display: inline-flex;
  pointer-events: none;
}

.hr-nav-pill .pill-label {
  pointer-events: none;
}

.hr-nav-pill::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.4rem;
  height: 4px;
  border-radius: 999px;
  background: transparent;
  transition: background 0.2s ease-in-out;
  pointer-events: none;
}

.hr-nav-pill:hover {
  color: #1d4ed8;
}

.hr-nav-pill.active {
  color: #0b2c8a;
}

.hr-nav-pill.active::after {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.hr-module-pane {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hr-section {
  display: none;
}

.hr-section.active {
  display: block;
}

.hr-section .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
  padding: 1.25rem;
  border-radius: 12px 12px 0 0;
  border-bottom: 2px solid rgba(99, 102, 241, 0.15);
  margin: -1.5rem -1.5rem 1rem -1.5rem;
}

.hr-section .card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
  padding: 1.5rem;
  border-radius: 0 0 12px 12px;
}

.hr-section .placeholder-box {
  border: 1px dashed rgba(148, 163, 184, 0.6);
  padding: 1rem;
  border-radius: 14px;
  color: #64748b;
  background: rgba(248, 250, 252, 0.55);
  text-align: center;
}

.hr-section .placeholder-box strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #0f172a;
}

.hr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

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

.hr-table thead {
  background: rgba(15, 23, 42, 0.04);
}

.hr-table th,
.hr-table td {
  padding: 0.65rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.hr-table th {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #475569;
}

.hr-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.06);
}

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

.hr-table .actions {
  display: flex;
  gap: 0.35rem;
}

.hr-meta {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.15rem;
}

#hr-toast-container {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 400;
  pointer-events: none;
}

#hr-toast-container .manager-toast {
  pointer-events: auto;
}

.hr-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 600;
}

.hr-chip.neutral {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.hr-chip.success {
  background: rgba(22, 163, 74, 0.15);
  color: #15803d;
}

.hr-chip.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.hr-actions {
  display: flex;
  gap: 0.35rem;
}

.hr-icon-btn {
  border: none;
  background: rgba(15, 23, 42, 0.05);
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hr-icon-btn:hover {
  background: rgba(37, 99, 235, 0.15);
}

.hr-icon-btn.danger {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

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

.form-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .hr-content {
    gap: 1.1rem;
  }

  .hr-module-nav {
    gap: 0.45rem;
    padding: 0.4rem;
    overflow-x: auto;
  }

  .hr-nav-pill {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem;
  }

  .hr-snapshot-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* Dashboard Summary Cards */
.hr-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.hr-summary-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

.summary-card-info {
  background: none;
  border: none;
  font-size: 0.875rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.summary-card-change {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.change-text {
  color: #64748b;
}

.change-percent {
  font-weight: 600;
  color: #22c55e;
}

.change-percent.negative {
  color: #ef4444;
}

.summary-card-link {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.summary-card-link:hover {
  text-decoration: underline;
}

/* Dashboard Rows */
.hr-dashboard-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.hr-dashboard-section {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.section-actions {
  display: flex;
  gap: 0.5rem;
}

.header-pill-btn {
  margin-left: auto;
}

.hr-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hr-pill-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(29, 78, 216, 0.45);
}

.hr-pill-btn .pill-plus {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.section-info-btn,
.section-menu-btn {
  background: none;
  border: none;
  font-size: 1rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-info-btn:hover,
.section-menu-btn:hover {
  color: #64748b;
}

/* Attendance Section */
.attendance-summary {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

.attendance-stat {
  font-weight: 500;
}

.time-period-selector {
  display: flex;
  gap: 0.5rem;
}

.period-btn {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #fff;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.period-btn:hover {
  background: #f8fafc;
}

.period-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.attendance-table-container {
  overflow-x: auto;
}

/* Department Overview */
.department-total {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.department-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}

.department-change {
  font-size: 0.875rem;
  font-weight: 600;
  color: #22c55e;
}

.department-change.negative {
  color: #ef4444;
}

.department-progress {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.progress-bar {
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-bar-fill.primary {
  background: #2563eb;
}

.progress-bar-fill.secondary {
  background: #60a5fa;
}

.progress-bar-fill.tertiary {
  background: #cbd5e1;
}

.department-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.department-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.department-icon {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

.department-icon.primary {
  background: #2563eb;
}

.department-icon.secondary {
  background: #60a5fa;
}

.department-icon.tertiary {
  background: #cbd5e1;
}

.department-label {
  color: #64748b;
  font-weight: 500;
}

/* Attendance Summary Section */
.attendance-summary-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.summary-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1.5rem 0;
}

.summary-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.summary-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 2px solid rgba(148, 163, 184, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

.summary-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f1f5f9;
}

.summary-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.summary-card-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
}

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

.summary-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.stat-label {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.summary-breakdown {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.summary-breakdown small {
  color: #94a3b8;
  font-size: 0.85rem;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.breakdown-item span {
  color: #475569;
}

.breakdown-item strong {
  color: #0f172a;
  font-weight: 600;
}

.overtime-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(251, 191, 36, 0.12));
  border: 2px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.overtime-card .summary-card-header {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: white;
  border-bottom: none;
}

.overtime-card .summary-icon {
  color: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.working-days-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(52, 211, 153, 0.12));
  border: 2px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.working-days-card .summary-card-header {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: white;
  border-bottom: none;
}

.working-days-card .summary-icon {
  color: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.leaves-card {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(248, 113, 113, 0.12));
  border: 2px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.leaves-card .summary-card-header {
  background: linear-gradient(135deg, #ef4444, #f87171);
  color: white;
  border-bottom: none;
}

.leaves-card .summary-icon {
  color: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Employee Lists Section */
.employee-lists-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.employee-list-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 2px solid rgba(148, 163, 184, 0.2);
  transition: all 0.3s ease;
}

.employee-list-card:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.employee-list-card:nth-child(1) {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(255, 255, 255, 0.95));
}

.employee-list-card:nth-child(2) {
  border-left: 4px solid #ec4899;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.05), rgba(255, 255, 255, 0.95));
}

.employee-list-card:nth-child(3) {
  border-left: 4px solid #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(255, 255, 255, 0.95));
}

.employee-list-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f1f5f9;
}

.list-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.employee-list-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
}

.employee-list-body {
  max-height: 400px;
  overflow-y: auto;
}

.employee-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.employee-list-item:last-child {
  border-bottom: none;
}

.employee-list-item:hover {
  background-color: #f8fafc;
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 6px;
}

.employee-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.employee-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: #0f172a;
}

.employee-metric {
  font-size: 0.95rem;
}

.employee-metric strong {
  color: #0f172a;
  font-weight: 600;
}

.employee-list-body .empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Attendance Check-in Layout */
.attendance-checkin-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.attendance-primary-card {
  flex: 1 1 60%;
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 45px rgba(79, 70, 229, 0.18);
}

.attendance-hero-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-avatar,
.mobile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.hero-greeting {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4338ca;
}

.hero-time {
  font-size: 2.4rem;
  font-weight: 700;
  color: #1e1b4b;
}

.hero-date {
  margin: 0;
  color: #475569;
}

.fingerprint-panel {
  background: #fff;
  border-radius: 24px;
  padding: 1.75rem;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.fingerprint-button {
  width: 140px;
  height: 140px;
  border-radius: 32px;
  border: none;
  background: linear-gradient(160deg, #f87171, #ec4899);
  color: #fff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(236, 72, 153, 0.4);
  transition: transform 0.2s ease;
}

.fingerprint-button.mobile {
  width: 100px;
  height: 100px;
  border-radius: 24px;
}

.fingerprint-button:hover {
  transform: translateY(-3px) scale(1.02);
}

.fingerprint-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: rgba(255, 255, 255, 0.2);
}

.fingerprint-label {
  font-size: 1rem;
}

.ghost-link {
  margin-top: 0.9rem;
  border: none;
  background: none;
  color: #7c3aed;
  font-weight: 600;
  cursor: pointer;
}

.location-note {
  margin: 0.5rem 0 0;
  color: #475569;
  font-size: 0.9rem;
}

.location-note span {
  color: #1d4ed8;
  font-weight: 600;
}

.attendance-mini-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.mini-stat {
  background: #fff;
  border-radius: 18px;
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.mini-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}

.mini-icon.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.mini-icon.purple {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
}

.mini-icon.teal {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
}

.mini-icon.amber {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

.mini-stat small {
  display: block;
  color: #94a3b8;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mini-stat strong {
  color: #0f172a;
  font-size: 1.05rem;
}

.attendance-secondary-card {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-preview-card {
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  border-radius: 28px;
  padding: 1.25rem;
  box-shadow: 0 20px 45px rgba(59, 130, 246, 0.25);
}

.mobile-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #0f172a;
}

.mobile-mini-cards {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.mobile-mini {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 0.75rem;
  text-align: center;
  font-weight: 600;
  color: #0f172a;
}

.mobile-mini small {
  display: block;
  color: #64748b;
  font-weight: 500;
}

.quick-actions {
  background: #fff;
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

.quick-actions h4 {
  margin: 0 0 0.85rem;
  color: #0f172a;
}

.quick-btn {
  width: 100%;
  border-radius: 12px;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  font-weight: 600;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.quick-btn.primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border: none;
  color: #fff;
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.35);
}

.quick-btn.outline:hover {
  background: #f8fafc;
}
/* Attendance Check-in Panel */
.attendance-checkin-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.attendance-primary-card {
  flex: 1 1 60%;
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 45px rgba(79, 70, 229, 0.18);
}

.attendance-hero-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-avatar,
.mobile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.hero-greeting {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4338ca;
}

.hero-time {
  font-size: 2.4rem;
  font-weight: 700;
  color: #1e1b4b;
}

.hero-date {
  margin: 0;
  color: #475569;
}

.fingerprint-panel {
  background: #fff;
  border-radius: 24px;
  padding: 1.75rem;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.fingerprint-button {
  width: 140px;
  height: 140px;
  border-radius: 32px;
  border: none;
  background: linear-gradient(160deg, #f87171, #ec4899);
  color: #fff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(236, 72, 153, 0.4);
  transition: transform 0.2s ease;
}

.fingerprint-button.mobile {
  width: 100px;
  height: 100px;
  border-radius: 24px;
}

.fingerprint-button:hover {
  transform: translateY(-3px) scale(1.02);
}

.fingerprint-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: rgba(255, 255, 255, 0.2);
}

.fingerprint-icon::before {
  content: '🔓';
}

.fingerprint-label {
  font-size: 1rem;
}

.ghost-link {
  margin-top: 0.9rem;
  border: none;
  background: none;
  color: #7c3aed;
  font-weight: 600;
  cursor: pointer;
}

.location-note {
  margin: 0.5rem 0 0;
  color: #475569;
  font-size: 0.9rem;
}

.location-note span {
  color: #1d4ed8;
  font-weight: 600;
}

.attendance-mini-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.mini-stat {
  background: #fff;
  border-radius: 18px;
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.mini-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}

.mini-icon.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.mini-icon.purple {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
}

.mini-icon.teal {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
}

.mini-icon.amber {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

.mini-stat small {
  display: block;
  color: #94a3b8;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mini-stat strong {
  color: #0f172a;
  font-size: 1.05rem;
}

.attendance-secondary-card {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-preview-card {
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  border-radius: 28px;
  padding: 1.25rem;
  box-shadow: 0 20px 45px rgba(59, 130, 246, 0.25);
}

.mobile-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #0f172a;
}

.mobile-mini-cards {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.mobile-mini {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 0.75rem;
  text-align: center;
  font-weight: 600;
  color: #0f172a;
}

.mobile-mini small {
  display: block;
  color: #64748b;
  font-weight: 500;
}

.quick-actions {
  background: #fff;
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

.quick-actions h4 {
  margin: 0 0 0.85rem;
  color: #0f172a;
}

.quick-btn {
  width: 100%;
  border-radius: 12px;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  font-weight: 600;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.quick-btn.primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border: none;
  color: #fff;
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.35);
}

.quick-btn.outline:hover {
  background: #f8fafc;
}

/* Employees Section */
.section-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.date-range-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-icon {
  font-size: 1rem;
}

.date-range-text {
  font-size: 0.875rem;
  color: #64748b;
}

.date-range-dropdown {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  background: #fff;
  font-size: 0.875rem;
  color: #0f172a;
  cursor: pointer;
}

.filter-selectors {
  display: flex;
  gap: 0.75rem;
}

.filter-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  background: #fff;
  font-size: 0.875rem;
  color: #0f172a;
  cursor: pointer;
}

.employees-table-container {
  overflow-x: auto;
}

/* Schedule Section */
.schedule-navigator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.nav-arrow {
  background: none;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 1rem;
  transition: all 0.2s;
}

.nav-arrow:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.schedule-date {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  min-width: 120px;
  text-align: center;
}

.event-type-selector {
  display: flex;
  gap: 0.5rem;
}

.event-type-btn {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #fff;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.event-type-btn:hover {
  background: #f8fafc;
}

.event-type-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.schedule-item {
  padding: 0.75rem;
  border-left: 3px solid #2563eb;
  background: #f8fafc;
  border-radius: 4px;
  font-size: 0.875rem;
}

.schedule-time {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.schedule-description {
  color: #64748b;
}

/* Dashboard Tables */
.hr-dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.hr-dashboard-table thead {
  background: #f8fafc;
}

.hr-dashboard-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
}

.hr-dashboard-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}

.hr-dashboard-table tbody tr:hover {
  background: #f8fafc;
}

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

.empty-state {
  text-align: center;
  color: #94a3b8;
  padding: 2rem;
  font-size: 0.875rem;
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.status-pill.on-time,
.status-pill.approved,
.status-pill.status-active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(52, 211, 153, 0.15));
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
}

.status-pill.late,
.status-pill.pending {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.15));
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.1);
}

.status-pill.absent,
.status-pill.status-closed,
.status-pill.status-defaulted {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(248, 113, 113, 0.15));
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
}

/* Employee Avatar */
.employee-avatar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

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

.employee-name {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.875rem;
}

.employee-email {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Action Menu */
.action-menu {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-menu:hover {
  color: #64748b;
}

/* Employee Form Comprehensive */
.drawer-panel-large {
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
}

.employee-form-comprehensive {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 0;
}

.form-section {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  background: #f8fafc;
}

.form-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #2563eb;
}

.form-note {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: #e0f2fe;
  border-radius: 8px;
  border-left: 3px solid #0ea5e9;
}

.form-note small {
  color: #0c4a6e;
  font-size: 0.8rem;
}

.required {
  color: #ef4444;
  font-weight: 600;
}

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

  .hr-summary-cards {
    grid-template-columns: 1fr;
  }

  .drawer-panel-large {
    max-width: 95vw;
  }
}

/* Break Details Drawer */
.break-details-panel {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.8) 0%, rgba(255, 255, 255, 1) 100%);
  backdrop-filter: blur(10px);
}

.break-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  position: relative;
}

.break-details-header h2 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.break-header-hours {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.break-header-hours span {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.break-hours-underline {
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 2px;
}

.drawer-menu {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin-left: 0.5rem;
}

.break-details-content {
  padding: 1.5rem;
}

.break-date-display {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1rem;
}

.break-summary-card-white {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.break-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.break-summary-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.break-summary-item.break-taken-item {
  align-items: flex-start;
}

.break-taken-value-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.break-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.break-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.break-value.check-in {
  color: #dc2626;
}

.break-value.check-out {
  color: #10b981;
}

.break-value.break-time {
  color: #0f172a;
}

.break-count-badge {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.break-expand-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  margin-top: 0.25rem;
  align-self: flex-start;
}

.break-list-container {
  background: rgba(239, 246, 255, 0.5);
  border-radius: 12px;
  padding: 1rem;
  overflow-x: auto;
}

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

.break-list-table thead {
  background: rgba(59, 130, 246, 0.1);
}

.break-list-table th {
  padding: 0.75rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: #3b82f6;
  border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

.break-list-table td {
  padding: 0.75rem;
  font-size: 0.9rem;
  color: #0f172a;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

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

.break-list-table .empty-state {
  text-align: center;
  color: #94a3b8;
  padding: 2rem;
}

/* Make break time stat clickable */
.mini-stat {
  transition: transform 0.2s, box-shadow 0.2s;
}

.mini-stat[style*="cursor: pointer"] {
  cursor: pointer !important;
}

.mini-stat[style*="cursor: pointer"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Break Start Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #fff;
  border-radius: 24px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.2s;
}

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

.break-modal {
  text-align: center;
}

.break-modal-icon {
  margin-bottom: 1rem;
}

.break-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa, #c084fc);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
}

.break-icon-circle::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  opacity: 0.3;
  z-index: -1;
}

.break-icon {
  font-size: 2rem;
}

.break-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
}

.break-modal-time {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1.5rem;
}

.break-modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.break-description-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  font-size: 0.95rem;
  color: #0f172a;
  transition: border-color 0.2s;
}

.break-description-input:focus {
  outline: none;
  border-color: #6366f1;
}

/* ==================== LOAN APPLICATION STYLES ==================== */

.loans-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.loan-summary-card-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.loan-summary-card-item:hover {
  border-color: #6366f1;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

.loan-summary-card-item:nth-child(1) {
  border-left: 4px solid #6366f1;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), #ffffff);
}

.loan-summary-card-item:nth-child(2) {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), #ffffff);
}

.summary-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.summary-card-icon.loan-icon {
  background: linear-gradient(135deg, #667eea, #764ba2);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.summary-card-icon.advance-icon {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.summary-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.summary-card-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-amount {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.summary-label {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
}

.loan-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.loan-option-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.loan-option-card:hover {
  border-color: #6366f1;
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.25);
  transform: translateY(-4px);
}

.loan-option-card[data-loan-type="loan"] {
  border-left: 4px solid #6366f1;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), #ffffff);
}

.loan-option-card[data-loan-type="advance"] {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.03), #ffffff);
}

.loan-option-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.loan-option-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1.5rem 0;
}

.loan-option-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.feature-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
}

.feature-label {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
}

.feature-value {
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 600;
}

.loan-apply-option-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.loan-apply-option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.loan-apply-option-btn:active {
  transform: translateY(0);
}

.loans-list-section {
  margin-top: 2rem;
}

.section-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 1rem 0;
}

.loans-table-container {
  overflow-x: auto;
}

/* Employee Loans List */
.employee-loans-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.employee-loan-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-left: 4px solid #6366f1;
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.employee-loan-card:hover {
  border-color: #6366f1;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), rgba(255, 255, 255, 0.95));
}

.employee-loan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(148, 163, 184, 0.2);
}

.employee-loan-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.employee-loan-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.employee-loan-summary {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.summary-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-section h5 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
}

.summary-item .summary-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.summary-item .summary-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.summary-item .summary-value.deducted {
  color: #10b981;
}

.summary-item .summary-value.pending {
  color: #f59e0b;
}

.summary-item .summary-value.balance {
  color: #6366f1;
}

.tenure-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 8px;
  border-left: 4px solid #6366f1;
}

.tenure-section .summary-label {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 600;
}

.tenure-section .summary-value {
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 600;
}

/* ==================== PAYROLL STYLES ==================== */

.payroll-generation-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid rgba(148, 163, 184, 0.2);
}

.payroll-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.payroll-form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.payroll-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 500;
}

.payroll-form input[type="date"],
.payroll-form input[type="number"],
.payroll-form select {
  padding: 0.75rem 1rem;
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  font-size: 0.95rem;
  color: #0f172a;
  background: white;
  transition: border-color 0.2s;
  font-family: inherit;
}

.payroll-form input[type="date"]:focus,
.payroll-form input[type="number"]:focus,
.payroll-form select:focus {
  outline: none;
  border-color: #6366f1;
}

.payroll-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  cursor: pointer;
}

.payroll-form label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.payroll-list-section {
  margin-top: 2rem;
}

.payroll-filters {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.month-filter {
  padding: 0.5rem 0.75rem;
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  font-size: 0.9rem;
}

.payroll-table-container {
  overflow-x: auto;
}

.status-paid {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.status-approved {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.status-draft {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

.status-void {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Mobile Responsive for Employee Loans */
@media (max-width: 768px) {
  .employee-loan-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tenure-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Loan Application Drawer */
.drawer-panel-large {
  max-width: 600px;
  width: 90vw;
}

.loan-application-form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.loan-type-selection {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}

.loan-type-option {
  padding: 1.5rem;
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.loan-type-option:hover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.05);
}

.loan-type-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.loan-type-option h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
}

.loan-type-option p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
}

.loan-form-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(148, 163, 184, 0.2);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.loan-application-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 500;
}

.loan-application-form .required {
  color: #ef4444;
}

.loan-application-form select,
.loan-application-form input[type="number"],
.loan-application-form textarea {
  padding: 0.75rem 1rem;
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  font-size: 0.95rem;
  color: #0f172a;
  background: white;
  transition: border-color 0.2s;
  font-family: inherit;
}

.loan-application-form select:focus,
.loan-application-form input[type="number"]:focus,
.loan-application-form textarea:focus {
  outline: none;
  border-color: #6366f1;
}

.loan-application-form select[readonly],
.loan-application-form input[type="number"][readonly] {
  background: #f1f5f9;
  cursor: not-allowed;
}

.form-hint {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.loan-summary-card {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.loan-summary-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(148, 163, 184, 0.2);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  font-size: 0.95rem;
}

.summary-row.total {
  border-top: 2px solid rgba(148, 163, 184, 0.2);
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.summary-row span {
  color: #64748b;
}

.summary-row strong {
  color: #0f172a;
  font-weight: 600;
}

.summary-row.total strong {
  color: #6366f1;
  font-size: 1.2rem;
}

.loan-type-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-loan {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.badge-advance {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .loan-options-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .loan-option-card {
    padding: 1.5rem;
  }

  .drawer-panel-large {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .loan-application-form {
    padding: 1rem;
    max-height: calc(100vh - 80px);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .loan-type-selection {
    gap: 0.75rem;
  }

  .loan-type-option {
    padding: 1rem;
  }
}

.break-modal-ok-btn {
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.break-modal-ok-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.break-modal-ok-btn:active {
  transform: translateY(0);
}

.drawer-back {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin-left: -0.5rem;
  transition: color 0.2s;
}

.drawer-back:hover {
  color: #0f172a;
}
/* Ensure HR tables can be scrolled horizontally on mobile */
@media (max-width: 900px) {
  .attendance-table-container,
  .employees-table-container,
  .attendance-records-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hr-dashboard-table {
    min-width: 700px;
  }
}
