/* HR module — compact lists/tables, no text wrapping */
#page-hr .data-table {
  font-size: 0.78rem;
  width: max-content;
  min-width: 100%;
}

#page-hr .data-table th,
#page-hr .data-table td {
  padding: 0.3rem 0.5rem;
  line-height: 1.2;
  vertical-align: middle;
  white-space: nowrap;
}

#page-hr .data-table th {
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}

#page-hr .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#page-hr .page-header {
  margin-bottom: 0.65rem;
  gap: 0.5rem;
}

#page-hr .page-header h2 {
  font-size: 1.1rem;
  margin: 0;
}

#page-hr .module-meta {
  font-size: 0.8rem;
  margin-bottom: 0.55rem !important;
}

#page-hr .module-table-panel {
  margin-top: 0.75rem;
}

#page-hr .module-table-panel .panel-title,
#page-hr .employees-list .panel-title {
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}

#page-hr .module-metrics {
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

#page-hr .metric-card {
  padding: 0.65rem 0.75rem;
}

#page-hr .metric-value {
  font-size: 1.25rem;
}

#page-hr .metric-label {
  font-size: 0.72rem;
}

/* Employee list action buttons */
#page-hr #employeesTable .btn-sm,
#page-hr .hr-tool-actions .btn-sm {
  padding: 0.12rem 0.38rem;
  font-size: 0.68rem;
  line-height: 1.15;
  min-height: 0;
  white-space: nowrap;
}

#page-hr .hr-tool-actions {
  white-space: nowrap;
}

/* Status badges */
.hr-tool-form {
  margin-bottom: 0.85rem;
  max-width: 100%;
}

.hr-tool-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.06rem 0.38rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: capitalize;
  line-height: 1.2;
  white-space: nowrap;
  background: #e2e8f0;
  color: #334155;
}

.hr-tool-badge--pending,
.hr-tool-badge--todo,
.hr-tool-badge--missing,
.hr-tool-badge--requested {
  background: #ffedd5;
  color: #9a3412;
}

.hr-tool-badge--approved,
.hr-tool-badge--received,
.hr-tool-badge--done,
.hr-tool-badge--active,
.hr-tool-badge--ready_to_sign {
  background: #dcfce7;
  color: #166534;
}

.hr-tool-badge--rejected,
.hr-tool-badge--expired,
.hr-tool-badge--terminated {
  background: #fee2e2;
  color: #991b1b;
}

.hr-tool-badge--in_progress,
.hr-tool-badge--draft {
  background: #e0f2fe;
  color: #075985;
}

#page-hr #hr-contract-body {
  min-height: 28rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
#page-hr .hr-overview-ytd-header {
  gap: 0.45rem 0.85rem;
  margin-bottom: 0.35rem;
}

#page-hr .hr-overview-ytd-year-wrap label {
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
}

#page-hr .hr-overview-ytd-year-wrap select {
  min-height: 1.9rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.78rem;
}

#page-hr .hr-overview-ytd-table tfoot .hr-overview-ytd-total-row th,
#page-hr .hr-overview-ytd-table tfoot .hr-overview-ytd-total-row td {
  padding: 0.35rem 0.5rem;
  white-space: nowrap;
}

#page-hr .info-grid {
  font-size: 0.8rem;
  gap: 0.4rem 1rem;
}

#page-hr .module-info-panel,
#page-hr .module-description-panel,
#page-hr .module-cards-row,
#page-hr .module-table-panel {
  margin-bottom: 0.75rem;
}

#page-hr .module-description-panel p {
  font-size: 0.82rem;
  margin: 0;
}

#page-hr .module-status-row {
  margin-bottom: 0.65rem;
  gap: 0.45rem;
}

/* Keep action columns from wrapping even when many buttons */
#page-hr td:last-child {
  white-space: nowrap;
}

@media (max-width: 720px) {
  #page-hr .hr-tool-form .form-row {
    flex-direction: column;
  }
}
/* HR Hiring */

.hr-hire-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 0 0 1rem;
}

.hr-hire-search {
  min-width: 200px;
  flex: 1;
  max-width: 320px;
  padding: 0.4rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

#hr-hire-stage-filter {
  padding: 0.4rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.hr-hire-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  background: #e5e7eb;
  color: #374151;
}

.hr-hire-badge--ok {
  background: #d1fae5;
  color: #065f46;
}

.hr-hire-badge--warn {
  background: #ffedd5;
  color: #9a3412;
}

.hr-hire-badge--bad {
  background: #fee2e2;
  color: #991b1b;
}

.hr-hire-row-actions {
  white-space: nowrap;
}

#hr-hiring-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.hr-hire-exam-xls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.hr-hire-exam-live-pill {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: #dbeafe;
  color: #1e40af;
  vertical-align: middle;
}

.hr-hire-exam-live-row > td {
  padding: 0 0.75rem 0.85rem;
  border-top: none;
  background: #f8fafc;
}

.hr-hire-exam-main-row td {
  border-bottom: none;
  vertical-align: middle;
}

.hr-hire-exam-live {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  padding: 0.65rem 0.85rem;
}

.hr-hire-exam-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.hr-hire-exam-live-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hr-hire-exam-live-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e40af;
}

.hr-hire-exam-live-empty {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.hr-hire-exam-live-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hr-hire-exam-live-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.45rem 0.55rem;
  border-radius: 4px;
  background: #f1f5f9;
}

.hr-hire-exam-live-who {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.hr-hire-exam-live-who strong {
  font-size: 0.92rem;
  color: #0f172a;
}

.hr-hire-exam-live-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}

.hr-hire-exam-live-countdown,
.hr-hire-exam-live-untimed {
  display: inline-block;
  min-width: 4.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: #ecfdf5;
  color: #065f46;
}

.hr-hire-exam-live-countdown.is-urgent {
  background: #fff7ed;
  color: #c2410c;
}

.hr-hire-exam-live-countdown.is-expired {
  background: #fef2f2;
  color: #991b1b;
}

.hr-hire-exam-live-untimed {
  background: #eef2ff;
  color: #3730a3;
  min-width: auto;
}

@media (max-width: 640px) {
  .hr-hire-exam-live-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .hr-hire-exam-live-meta {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
}
