.emp-report-page {
  padding: 18px;
  background: #f4f7f9;
  min-height: calc(100vh - 40px);
  color: #102a43;
}

.emp-report-header,
.emp-report-filters,
.emp-report-panel,
.emp-report-kpis > div {
  background: #fff;
  border: 1px solid #dbe6ee;
  border-radius: 8px;
}

.emp-report-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  margin-bottom: 14px;
}

.emp-report-header h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
}

.emp-report-header p,
.emp-panel-head span {
  color: #64748b;
  margin: 0;
  line-height: 1.7;
}

.emp-report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.emp-report-filters {
  display: grid;
  grid-template-columns: 180px 180px minmax(260px, 1fr);
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.emp-report-filters label span {
  display: block;
  margin-bottom: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.employee-search-combo {
  position: relative;
}

.employee-search-button {
  width: 100%;
  min-height: 38px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  text-align: start;
}

.employee-search-menu {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: none;
  background: #fff;
  border: 1px solid #dbe6ee;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
  padding: 10px;
}

.employee-search-combo.open .employee-search-menu {
  display: block;
}

.employee-search-options {
  max-height: 320px;
  overflow: auto;
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.employee-search-option {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 3px 10px;
  align-items: center;
  padding: 9px;
  text-align: start;
}

.employee-search-option:hover,
.employee-search-option.active {
  border-color: #123c69;
  background: #f4f9fd;
}

.employee-search-option .employee-code {
  grid-row: span 2;
  color: #123c69;
  font-weight: 800;
  font-size: 12px;
}

.employee-search-option strong {
  color: #102a43;
}

.employee-search-option small {
  color: #64748b;
}

.emp-report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.emp-report-kpis > div {
  padding: 14px;
  min-height: 82px;
}

.emp-report-kpis span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 8px;
}

.emp-report-kpis strong {
  display: block;
  font-size: 22px;
  color: #0f172a;
}

.emp-report-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.emp-report-wide {
  grid-row: span 2;
}

.emp-report-panel {
  padding: 16px;
  min-width: 0;
}

.emp-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.emp-panel-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.emp-chart-wrap {
  position: relative;
  min-height: 260px;
}

.employee-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.report-insights {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
}

.report-insights article {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.report-insights span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.report-insights strong {
  display: block;
  margin-top: 6px;
  color: #123c69;
  font-size: 22px;
}

.report-insights p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.6;
}

.employee-mini-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.employee-mini-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.employee-mini-card .meta {
  color: #64748b;
  font-size: 12px;
  margin-bottom: 10px;
}

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

.mini-stats div {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 7px;
  background: #fff;
}

.mini-stats span {
  display: block;
  color: #64748b;
  font-size: 11px;
}

.mini-stats b {
  display: block;
  margin-top: 3px;
  color: #0f172a;
}

.emp-report-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.emp-report-tabs button {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 700;
}

.emp-report-tabs button.active {
  background: #123c69;
  border-color: #123c69;
  color: #fff;
}

.emp-report-panel table {
  font-size: 12px;
}

.emp-report-panel th {
  color: #334155;
  white-space: nowrap;
}

.emp-empty {
  color: #64748b;
  text-align: center;
  padding: 22px !important;
}

@media (max-width: 1180px) {
  .emp-report-kpis {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .emp-report-grid {
    grid-template-columns: 1fr;
  }

  .report-insights {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 760px) {
  .emp-report-page {
    padding: 10px;
  }

  .emp-report-header {
    flex-direction: column;
  }

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

  .emp-report-actions .btn {
    flex: 1 1 140px;
  }

  .emp-report-filters,
  .emp-report-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .employee-search-menu {
    position: fixed;
    left: 10px;
    right: 10px;
    top: 118px;
  }

  .emp-filter-wide {
    grid-column: 1 / -1;
  }

  .emp-chart-wrap {
    min-height: 220px;
  }
}

@media (max-width: 520px) {
  .emp-report-filters,
  .emp-report-kpis,
  .mini-stats,
  .report-insights {
    grid-template-columns: 1fr;
  }
}
