/*
 * components.css -- small reusable pieces that Horilla's compiled CSS
 * doesn't already provide as a named class (field rows, status badges,
 * empty states, the page-header row). Everything else (cards, buttons,
 * inputs, tables, pagination, modals) uses Horilla's own .oh-* classes
 * directly from the ported style.min.css -- these are NOT redefined here.
 */

/* Page header: title (+ optional subtitle) on the left, actions on the
   right. Used via templates/components/page_header.html. */
.ot-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.ot-page-header__subtitle {
  color: var(--ot-muted);
  font-size: 13px;
  margin-top: 2px;
}
.ot-page-header__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Label/value row -- record detail pages (employee, company). */
.ot-field {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ot-border-light);
}
.ot-field:last-child {
  border-bottom: none;
}
.ot-field__label {
  color: var(--ot-muted);
  font-size: 13px;
  flex-shrink: 0;
}
.ot-field__value {
  color: var(--ot-text);
  font-weight: 500;
  text-align: right;
}

/* Status badge -- templates/components/badge.html.
   Modifiers: --success / --danger / --warning / --neutral / --info */
.ot-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.ot-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.ot-badge--success {
  background: var(--ot-success-bg);
  color: var(--ot-success);
}
.ot-badge--danger {
  background: var(--ot-danger-bg);
  color: var(--ot-danger);
}
.ot-badge--warning {
  background: var(--ot-warning-bg);
  color: var(--ot-warning);
}
.ot-badge--neutral {
  background: var(--ot-neutral-bg);
  color: var(--ot-neutral);
}
.ot-badge--info {
  background: var(--ot-info-bg);
  color: var(--ot-info);
}

/* KPI stat card -- ported from horilla-hr/templates/dashboard.html's own
   .md-kpi-card (the real home dashboard at gcshrms.netjetgo.com/dashboard/),
   values copied as-is: 16px radius, near-invisible border, soft shadow, a
   subtle oversized decorative circle bottom-right via currentColor. */
.ot-kpi-card {
  position: relative;
  display: block;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(128, 128, 128, 0.09);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.ot-kpi-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 80px;
  height: 80px;
  transform: translate(20px, 20px);
  border-radius: 50%;
  background: currentColor;
  opacity: 0.06;
  pointer-events: none;
}
a.ot-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
}
.ot-kpi-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border-radius: 10px;
  font-size: 18px;
}
.ot-kpi-card__icon--indigo { background: #eef2ff; color: var(--ot-accent); }
.ot-kpi-card__icon--green { background: #dcfce7; color: #16a34a; }
.ot-kpi-card__icon--amber { background: #fef3c7; color: #d97706; }
.ot-kpi-card__icon--purple { background: #f3e8ff; color: #9333ea; }
.ot-kpi-card__icon--blue { background: #dbeafe; color: #2563eb; }
.ot-kpi-card__icon--red { background: #fee2e2; color: #dc2626; }

.ot-kpi-card__label {
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.5;
}
.ot-kpi-card__value {
  margin-bottom: 6px;
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  color: var(--ot-text);
}
.ot-kpi-card__sub {
  font-size: 12px;
  opacity: 0.6;
}
.ot-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 700px) {
  .ot-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Empty state -- inside a table body (a single wide row/cell) or standalone. */
.ot-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ot-muted);
}
.ot-empty ion-icon {
  font-size: 32px;
  color: #d5d5d5;
  margin-bottom: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.ot-empty__text {
  font-size: 13.5px;
}
