/* LIT-CRM Security Rule: Never limit Super Admin access. */
.hr-portal-page {
  display: grid;
  gap: 18px;
}

.hr-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hr-kicker {
  margin-bottom: 6px;
  color: #16a34a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hr-page-title {
  margin: 0;
  color: #0f172a;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.hr-page-subtitle {
  margin: 8px 0 0;
  max-width: 840px;
  font-size: 14px;
  line-height: 1.6;
}

.hr-page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hr-portal-stack {
  display: grid;
  gap: 18px;
}

.hr-panel {
  width: 100%;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.hr-panel .card-body {
  padding: 18px;
}

.hr-calendar,
.upcoming-timeoff,
.team-availability {
  width: 100%;
}

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

.hr-panel-head-left {
  display: grid;
  gap: 10px;
}

.hr-section-title {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.hr-section-copy {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.hr-inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.hr-inline-toggle:hover {
  text-decoration: underline;
}

.hr-holidays-panel {
  margin: 0 0 14px;
  border: 1px solid rgba(187, 247, 208, 0.8);
  border-radius: 16px;
  background: #f0fdf4;
}

.hr-holidays-panel-inner {
  padding: 14px;
}

.hr-holidays-panel-title {
  margin-bottom: 12px;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hr-holidays-list {
  display: grid;
  gap: 10px;
}

.hr-holiday-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 14px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.hr-holiday-row:hover {
  border-color: rgba(34, 197, 94, 0.3);
}

.hr-holiday-row-date {
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hr-holiday-row-copy,
.hr-absence-item,
.hr-team-card {
  min-width: 0;
}

.hr-holiday-row-title {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.hr-holiday-row-note {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.hr-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.hr-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hr-calendar-month {
  min-width: 170px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
  text-align: right;
}

.hr-calendar-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.hr-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.hr-legend-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  display: inline-block;
}

.hr-legend-swatch.is-holiday { background: #dcfce7; border-color: rgba(34, 197, 94, 0.24); }
.hr-legend-swatch.is-absence { background: #dbeafe; border-color: rgba(59, 130, 246, 0.24); }
.hr-legend-swatch.is-today { background: #fef3c7; border-color: rgba(245, 158, 11, 0.24); }

.hr-calendar-shell {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.hr-calendar-grid {
  min-width: 760px;
}

.hr-calendar-weekdays,
.hr-calendar-cells {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.hr-calendar-weekdays {
  margin-bottom: 10px;
}

.hr-calendar-weekday {
  padding: 0 4px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hr-calendar-cell {
  min-height: 132px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hr-calendar-cell.is-muted {
  background: rgba(248, 250, 252, 0.9);
  opacity: 0.68;
}

.hr-calendar-cell.is-today {
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.18);
}

.hr-calendar-cell.is-holiday {
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.hr-calendar-cell.has-absence {
  border-color: rgba(59, 130, 246, 0.22);
}

.hr-calendar-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hr-calendar-day-number {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.hr-calendar-cell-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.hr-calendar-badge,
.hr-calendar-more {
  width: 100%;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hr-calendar-badge.is-holiday {
  background: #dcfce7;
  border-color: rgba(34, 197, 94, 0.22);
  color: #166534;
  cursor: pointer;
}

.hr-calendar-badge.is-absence {
  background: #dbeafe;
  border-color: rgba(59, 130, 246, 0.22);
  color: #1d4ed8;
}

.hr-calendar-more {
  background: rgba(148, 163, 184, 0.14);
  color: #475569;
}

.hr-absence-list,
.hr-team-grid {
  display: grid;
  gap: 12px;
}

.hr-absence-item,
.hr-team-card {
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 16px;
  background: #ffffff;
}

.hr-absence-top,
.hr-team-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hr-absence-name,
.hr-team-name {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
}

.hr-absence-dates,
.hr-team-role,
.hr-team-days,
.hr-absence-reason {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.hr-absence-pill,
.hr-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.hr-absence-pill.is-vacation,
.hr-status-pill.is-holiday {
  background: #dcfce7;
  color: #166534;
}

.hr-absence-pill.is-sick,
.hr-status-pill.is-sick {
  background: #fee2e2;
  color: #b91c1c;
}

.hr-absence-pill.is-absent,
.hr-status-pill.is-absent,
.hr-status-pill.is-unavailable {
  background: #e2e8f0;
  color: #334155;
}

.hr-status-pill.is-active {
  background: #dbeafe;
  color: #1d4ed8;
}

.hr-empty-state {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.hr-holiday-modal[hidden] {
  display: none;
}

.hr-modal-open {
  overflow: hidden;
}

.hr-holiday-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.hr-holiday-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.hr-holiday-modal-dialog {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  margin: 8vh auto 0;
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}

.hr-holiday-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hr-holiday-modal-kicker {
  color: #16a34a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hr-holiday-modal-title {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.hr-holiday-modal-date,
.hr-holiday-modal-note,
.hr-holiday-modal-copy {
  margin-top: 12px;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.hr-holiday-modal-date {
  color: #0f172a;
  font-weight: 800;
}

.hr-holiday-modal-note {
  color: #166534;
}

.hr-modal-close {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 860px) {
  .hr-calendar-month {
    min-width: 0;
    text-align: left;
  }

  .hr-calendar-toolbar {
    justify-content: flex-start;
  }

  .hr-holiday-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hr-panel .card-body {
    padding: 14px;
  }

  .hr-page-title {
    font-size: 26px;
  }

  .hr-calendar-grid {
    min-width: 680px;
  }

  .hr-calendar-cell {
    min-height: 120px;
  }
}

.hr-live-indicator {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
}

.hr-collapse-toggle {
  border: 0;
  background: transparent;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.hr-collapse-toggle:hover {
  text-decoration: underline;
}

.hr-tardiness-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.hr-filter-field {
  display: grid;
  gap: 6px;
}

.hr-filter-field span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hr-filter-field input,
.hr-filter-field select {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: #fff;
}

.hr-tardiness-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.hr-kpi-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 16px;
  background: #f8fafc;
}

.hr-kpi-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hr-kpi-card strong {
  color: #0f172a;
  font-size: 28px;
  font-weight: 900;
}

.hr-tardiness-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.hr-tardiness-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.hr-tardiness-table th,
.hr-tardiness-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.hr-tardiness-table th {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hr-table-main {
  color: #0f172a;
  font-weight: 800;
}

.hr-table-sub {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.hr-tardiness-badge,
.hr-stage-badge,
.hr-email-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hr-tardiness-badge.is-warning,
.hr-stage-badge.is-first {
  background: #fef3c7;
  color: #92400e;
}

.hr-tardiness-badge.is-critical,
.hr-stage-badge.is-second,
.hr-stage-badge.is-third,
.hr-stage-badge.is-fourth- {
  background: #fee2e2;
  color: #b91c1c;
}

.hr-tardiness-badge.is-none,
.hr-stage-badge.is-none {
  background: #e2e8f0;
  color: #334155;
}

.hr-email-status.sent {
  background: #dcfce7;
  color: #166534;
}

.hr-email-status.pending {
  background: #e2e8f0;
  color: #334155;
}

.hr-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 960px) {
  .hr-tardiness-toolbar,
  .hr-tardiness-kpis {
    grid-template-columns: 1fr;
  }
}


.hr-forms-panel .card-body { padding-bottom: 22px; }
.hr-forms-shell { display:grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap:18px; }
.hr-forms-toolbar { display:grid; gap:12px; margin-bottom:14px; }
.hr-forms-sidebar, .hr-forms-preview { min-width:0; }
.hr-forms-list { display:grid; gap:10px; max-height:760px; overflow:auto; padding-right:4px; }
.hr-form-card { width:100%; padding:14px; border:1px solid rgba(226,232,240,.95); border-radius:16px; background:#fff; text-align:left; cursor:pointer; }
.hr-form-card:hover, .hr-form-card.is-active { border-color: rgba(59,130,246,.36); box-shadow: 0 8px 20px rgba(15,23,42,.06); }
.hr-form-card-top { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; }
.hr-form-card-title { font-size:14px; font-weight:800; color:#0f172a; }
.hr-form-card-desc { color:#64748b; font-size:12px; line-height:1.5; }
.hr-form-type-badge { display:inline-flex; align-items:center; gap:6px; padding:4px 9px; border-radius:999px; font-size:11px; font-weight:800; background:#eff6ff; color:#1d4ed8; }
.hr-form-type-badge.is-pdf { background:#fef2f2; color:#b91c1c; }
.hr-form-type-badge.is-doc, .hr-form-type-badge.is-docx { background:#ecfeff; color:#155e75; }
.hr-form-category { color:#166534; font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.hr-forms-preview { border:1px solid rgba(226,232,240,.92); border-radius:18px; background:#fff; overflow:hidden; }
.hr-forms-preview-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:16px 18px; border-bottom:1px solid rgba(226,232,240,.92); flex-wrap:wrap; }
.hr-forms-preview-kicker { color:#0369a1; font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; margin-bottom:4px; }
.hr-forms-preview-head h3 { margin:0; font-size:18px; font-weight:900; color:#0f172a; }
.hr-forms-preview-actions { display:flex; gap:8px; flex-wrap:wrap; }
.hr-forms-preview-body { min-height:420px; padding:18px; background:#f8fafc; }
.hr-forms-preview-pane { min-height:384px; border:1px solid rgba(226,232,240,.95); border-radius:16px; background:#fff; overflow:hidden; }
.hr-forms-preview-iframe { width:100%; min-height:600px; border:0; background:#fff; }
.hr-forms-doc-preview { padding:28px 32px; color:#0f172a; line-height:1.7; font-size:14px; }
.hr-forms-doc-preview h1 { margin:0 0 12px; font-size:24px; font-weight:900; }
.hr-forms-doc-preview h2 { margin:22px 0 10px; font-size:17px; font-weight:800; }
.hr-forms-doc-preview p { margin:0 0 12px; white-space:pre-wrap; }
.hr-forms-doc-preview .hr-doc-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0 0 18px; }
.hr-forms-doc-preview .hr-doc-meta-card { padding:10px 12px; border:1px solid rgba(226,232,240,.9); border-radius:12px; background:#f8fafc; }
.hr-forms-doc-preview .hr-doc-meta-card strong { display:block; font-size:11px; color:#64748b; letter-spacing:.08em; text-transform:uppercase; }
.hr-forms-doc-preview .hr-doc-meta-card span { display:block; margin-top:4px; font-size:13px; font-weight:700; color:#0f172a; }
.hr-forms-history { border-top:1px solid rgba(226,232,240,.92); padding:14px 18px 18px; background:#fff; }
.hr-forms-history-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.hr-forms-history-head h4 { margin:0; color:#0f172a; font-size:14px; font-weight:900; }
.hr-forms-history-list { display:grid; gap:10px; }
.hr-forms-history-row { display:grid; grid-template-columns: 1fr auto; gap:10px; align-items:center; padding:10px 12px; border:1px solid rgba(226,232,240,.92); border-radius:12px; background:#fff; }
.hr-forms-history-row strong { display:block; color:#0f172a; font-size:13px; }
.hr-forms-history-row span { display:block; color:#64748b; font-size:12px; margin-top:3px; }
@media (max-width: 1080px) { .hr-forms-shell { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .hr-forms-preview-actions { width:100%; } .hr-forms-preview-actions .btn { flex:1 1 auto; } .hr-forms-doc-preview { padding:18px; } .hr-forms-doc-preview .hr-doc-meta { grid-template-columns:1fr; } }
