/* SliceHub — Backoffice HR (vanilla, spójne z Settings / mobile shell) */
:root {
  --hr-bg: #0c0a09;
  --hr-surface: rgba(255, 255, 255, 0.04);
  --hr-border: rgba(255, 255, 255, 0.1);
  --hr-text: #e7e5e4;
  --hr-muted: #a8a29e;
  --hr-accent: #22c55e;
  --hr-danger: #f87171;
  --hr-font: "Inter", system-ui, sans-serif;
}

.hidden { display: none !important; }

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--hr-font);
  background: var(--hr-bg);
  color: var(--hr-text);
  -webkit-font-smoothing: antialiased;
}

.hr-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--hr-border);
  background: rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 40;
}
.hr-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, #22c55e, #15803d);
  display: grid; place-items: center;
  font-weight: 900;
  font-size: 13px;
  color: #fff;
}
.hr-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.hr-sub { font-size: 0.75rem; color: var(--hr-muted); margin-left: 0.25rem; }
.hr-spacer { flex: 1; }
.hr-links a {
  color: var(--hr-muted);
  text-decoration: none;
  font-size: 0.8rem;
  margin-right: 0.75rem;
}
.hr-links a:hover { color: var(--hr-accent); }

.hr-toolbar {
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.hr-btn {
  border: 1px solid var(--hr-border);
  background: var(--hr-surface);
  color: var(--hr-text);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.hr-btn:hover { border-color: rgba(34, 197, 94, 0.45); }
.hr-btn--primary {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}
.hr-banner {
  margin: 0 1.25rem 1rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  border: 1px solid var(--hr-border);
}
.hr-banner--warn {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: #fcd34d;
}
.hr-banner--error {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
}

.hr-main { padding: 0 1.25rem 2rem; max-width: 1200px; margin: 0 auto; }

.hr-table-wrap {
  overflow: auto;
  border: 1px solid var(--hr-border);
  border-radius: 12px;
}
table.hr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.hr-table th, .hr-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--hr-border);
}
.hr-table th {
  color: var(--hr-muted);
  font-weight: 600;
  white-space: nowrap;
}
.hr-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.hr-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
}
.hr-tag--ok { color: #86efac; background: rgba(34, 197, 94, 0.12); }
.hr-tag--off { color: var(--hr-muted); }

.hr-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.hr-actions button {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: #a8a29e;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
}
.hr-actions button:hover { color: var(--hr-text); background: rgba(255, 255, 255, 0.1); }

/* Modal */
.hr-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 100;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1rem;
  overflow-y: auto;
}
.hr-modal-overlay.active { display: flex; }

.hr-modal {
  width: 100%;
  max-width: 480px;
  background: #141211;
  border: 1px solid var(--hr-border);
  border-radius: 14px;
  padding: 1.25rem;
}
.hr-modal h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}
.hr-field {
  margin-bottom: 0.85rem;
}
.hr-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hr-muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hr-field input, .hr-field select, .hr-field textarea {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--hr-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--hr-text);
  font-family: inherit;
  font-size: 0.88rem;
}
.hr-field textarea { min-height: 64px; resize: vertical; }
.hr-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
@media (max-width: 520px) {
  .hr-row2 { grid-template-columns: 1fr; }
}
.hr-modal-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.hr-toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  border: 1px solid var(--hr-border);
  background: #1c1917;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: none;
}
.hr-toast.visible { display: block; }
.hr-toast.ok { border-color: rgba(34, 197, 94, 0.45); color: #bbf7d0; }
.hr-toast.err { border-color: rgba(248, 113, 113, 0.45); color: #fecaca; }
