/* HRMS config centers client interaction layer: front-end only, no external dependency. */
:root {
  --hrms-ui-ink: #172033;
  --hrms-ui-muted: #667085;
  --hrms-ui-line: #d9e0ea;
  --hrms-ui-soft: #f6f8fb;
  --hrms-ui-panel: #ffffff;
  --hrms-ui-accent: #2563eb;
  --hrms-ui-accent-soft: #e8f0ff;
  --hrms-ui-risk-low: #0f766e;
  --hrms-ui-risk-mid: #b45309;
  --hrms-ui-risk-high: #b91c1c;
  --hrms-ui-shadow: 0 18px 50px rgba(15, 23, 42, .16);
}

html {
  scroll-behavior: smooth;
}

.hrms-interaction-toolbar {
  margin: 18px auto;
  padding: 14px;
  border: 1px solid var(--hrms-ui-line);
  border-radius: 8px;
  background: var(--hrms-ui-panel);
  box-shadow: 0 6px 22px rgba(15, 23, 42, .05);
}

.hrms-interaction-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hrms-interaction-toolbar__label {
  font-size: 12px;
  color: var(--hrms-ui-muted);
  font-weight: 700;
}

.hrms-search-input {
  min-width: min(320px, 100%);
  flex: 1 1 220px;
  height: 38px;
  border: 1px solid var(--hrms-ui-line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--hrms-ui-ink);
  background: #fff;
}

.hrms-filter-chip,
.hrms-role-chip,
.hrms-tab-button,
.hrms-next-action-button,
.hrms-drawer-close,
.hrms-back-top {
  border: 1px solid var(--hrms-ui-line);
  border-radius: 8px;
  background: #fff;
  color: var(--hrms-ui-ink);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 9px 11px;
  cursor: pointer;
}

.hrms-filter-chip.is-active,
.hrms-role-chip.is-active,
.hrms-tab-button.is-active,
.hrms-next-action-button:hover,
.hrms-back-top:hover {
  border-color: var(--hrms-ui-accent);
  background: var(--hrms-ui-accent-soft);
  color: #1744b5;
}

.hrms-active-nav,
nav a.hrms-active-nav,
aside a.hrms-active-nav,
.sidebar a.hrms-active-nav {
  border-color: var(--hrms-ui-accent) !important;
  background: var(--hrms-ui-accent-soft) !important;
  color: #1744b5 !important;
  font-weight: 700;
}

.hrms-is-hidden {
  display: none !important;
}

.hrms-card-enhanced {
  position: relative;
}

.hrms-card-enhanced:focus-visible,
.hrms-card-enhanced:hover {
  outline: 2px solid rgba(37, 99, 235, .22);
  outline-offset: 3px;
}

.hrms-drawer {
  position: fixed;
  z-index: 9998;
  inset: 0 0 0 auto;
  width: min(440px, calc(100vw - 24px));
  transform: translateX(108%);
  transition: transform .22s ease;
  background: var(--hrms-ui-panel);
  border-left: 1px solid var(--hrms-ui-line);
  box-shadow: var(--hrms-ui-shadow);
  display: flex;
  flex-direction: column;
}

.hrms-drawer.is-open {
  transform: translateX(0);
}

.hrms-drawer__header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--hrms-ui-line);
}

.hrms-drawer__title {
  margin: 0;
  font-size: 18px;
  color: var(--hrms-ui-ink);
}

.hrms-drawer__body {
  padding: 18px;
  overflow: auto;
  color: var(--hrms-ui-muted);
}

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

[data-tab-panel] {
  display: none;
}

[data-tab-panel].is-active {
  display: block;
}

details.hrms-registry-panel,
.hrms-registry-panel {
  margin: 18px auto;
  border: 1px solid var(--hrms-ui-line);
  border-radius: 8px;
  background: #fff;
}

details.hrms-registry-panel > summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--hrms-ui-ink);
}

.hrms-registry-panel__body {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.hrms-status-badge,
.hrms-risk-badge,
[class*="badge"],
[data-status],
[data-risk] {
  cursor: help;
}

.hrms-risk-low {
  color: var(--hrms-ui-risk-low);
}

.hrms-risk-mid {
  color: var(--hrms-ui-risk-mid);
}

.hrms-risk-high {
  color: var(--hrms-ui-risk-high);
}

.hrms-empty-state {
  margin: 14px 0;
  padding: 16px;
  border: 1px dashed var(--hrms-ui-line);
  border-radius: 8px;
  color: var(--hrms-ui-muted);
  background: var(--hrms-ui-soft);
}

.hrms-inline-notice {
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  max-width: min(560px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid var(--hrms-ui-line);
  border-radius: 8px;
  background: #172033;
  color: #fff;
  box-shadow: var(--hrms-ui-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.hrms-inline-notice.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hrms-back-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9997;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .14);
}

.hrms-back-top.hrms-is-hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .hrms-interaction-toolbar {
    margin: 12px 10px;
  }

  .hrms-interaction-toolbar__row {
    align-items: stretch;
  }

  .hrms-filter-chip,
  .hrms-role-chip,
  .hrms-tab-button,
  .hrms-next-action-button {
    flex: 1 1 auto;
  }
}
/* HRMS visible UX fix layer: search, filters, detail buttons, tabs, drawer and notices. */
.hrms-ux-panel {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.hrms-ux-panel h2,
.hrms-ux-panel h3 {
  margin: 0 0 8px;
  color: #111827;
}
.hrms-ux-panel p {
  margin: 0;
}
.hrms-search-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0;
}
.hrms-search-input {
  min-width: min(100%, 320px);
  flex: 1 1 260px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 41, 55, 0.2);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: #111827;
}
.hrms-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 16px;
}
.hrms-filter-chip {
  border: 1px solid rgba(31, 41, 55, 0.18);
  background: #f9fafb;
  color: #374151;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  cursor: pointer;
}
.hrms-filter-chip.active,
.hrms-filter-chip[aria-pressed="true"] {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}
.hrms-ux-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}
.hrms-ux-card {
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: #fcfcfd;
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.hrms-ux-card h4 {
  margin: 0;
  color: #111827;
  font-size: 15px;
}
.hrms-ux-card p {
  color: #4b5563;
  font-size: 13px;
  line-height: 1.55;
}
.hrms-detail-btn,
.hrms-action-link,
.hrms-action-preview,
.hrms-action-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}
.hrms-detail-btn,
.hrms-action-preview {
  background: #ecfdf5;
  color: #047857;
  border-color: rgba(4, 120, 87, 0.2);
}
.hrms-action-link {
  background: #eef2ff;
  color: #3730a3;
  border-color: rgba(55, 48, 163, 0.2);
}
.hrms-action-disabled {
  background: #f3f4f6;
  color: #6b7280;
  border-color: rgba(107, 114, 128, 0.2);
}
.hrms-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 10px;
}
.hrms-tab {
  border: 1px solid rgba(31, 41, 55, 0.16);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  font-weight: 600;
}
.hrms-tab.active,
.hrms-tab[aria-selected="true"] {
  color: #fff;
  background: #1f2937;
  border-color: #1f2937;
}
.hrms-tab-panel {
  display: none;
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: #f9fafb;
  color: #374151;
}
.hrms-tab-panel.active {
  display: block;
}
.hrms-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1001;
  width: min(420px, 92vw);
  height: 100vh;
  background: #fff;
  border-left: 1px solid rgba(31, 41, 55, 0.14);
  box-shadow: -18px 0 38px rgba(15, 23, 42, 0.18);
  transform: translateX(105%);
  transition: transform 180ms ease;
  padding: 22px;
  overflow-y: auto;
}
.hrms-detail-drawer.open {
  transform: translateX(0);
}
.hrms-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.24);
  display: none;
}
.hrms-drawer-backdrop.open {
  display: block;
}
.hrms-drawer-close {
  border: 0;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  float: right;
}
.hrms-inline-notice {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #ecfdf5;
  color: #064e3b;
  font-size: 13px;
}
.hrms-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1100;
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 14px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
  display: none;
}
.hrms-toast.open {
  display: block;
}
.hrms-empty-state {
  display: none;
  padding: 14px;
  border: 1px dashed rgba(31, 41, 55, 0.18);
  border-radius: 8px;
  color: #6b7280;
  background: #fff;
}
.hrms-empty-state.show {
  display: block;
}
.hrms-ux-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.hrms-registry-accordion {
  margin-top: 14px;
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 8px;
  background: #fff;
}
.hrms-registry-accordion summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  color: #1f2937;
}
.hrms-registry-accordion .hrms-registry-body {
  padding: 0 14px 14px;
  color: #4b5563;
}
@media (max-width: 640px) {
  .hrms-ux-panel { padding: 16px; }
  .hrms-detail-btn,
  .hrms-action-link,
  .hrms-action-preview,
  .hrms-action-disabled { width: 100%; }
}
