:root {
  --hr-bg: var(--bg, #f7f8fb);
  --hr-card: color-mix(in srgb, var(--surface-1, #ffffff) 92%, transparent);
  --hr-line: var(--border-color, rgba(15, 23, 42, 0.1));
  --hr-text: var(--text-primary, #111827);
  --hr-muted: var(--text-secondary, #667085);
  --hr-blue: var(--color-info, #2563eb);
  --hr-green: var(--color-success, #059669);
  --hr-orange: var(--color-warning, #d97706);
  --hr-red: var(--color-danger, #dc2626);
  --hr-space-1: var(--space-xs, 8px);
  --hr-space-2: var(--space-sm, 12px);
  --hr-space-3: var(--space-md, 16px);
  --hr-space-4: var(--space-lg, 24px);
  --hr-space-5: var(--space-xl, 32px);
  --hr-shadow-soft: var(--shadow-md, 0 18px 50px rgba(15, 23, 42, 0.07));
  --hr-shadow-hover: var(--shadow-lg, 0 24px 60px rgba(15, 23, 42, 0.11));
}

.page-kadry {
  background:
    radial-gradient(circle at 18% 0%, rgba(59, 130, 246, 0.08), transparent 34%),
    linear-gradient(180deg, #fbfcff 0%, var(--hr-bg) 100%);
}

.kadry-topbar {
  background: var(--bar, #0f1a2e);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: none;
}

.kadry-topbar h1 { color: #fff; }
.kadry-topbar .nav-toggle { color: #fff; border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.08); }

.hr-shell {
  max-width: 1480px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.hr-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 14px;
}

.hr-brand-card,
.hr-card,
.hr-panel {
  background: var(--hr-card);
  border: 1px solid var(--hr-line);
  border-radius: var(--radius-xl, 20px);
  box-shadow: var(--hr-shadow-soft);
  transition: border-color var(--transition-normal, .19s ease), box-shadow var(--transition-normal, .19s ease), transform var(--transition-fast, .15s ease);
}

@media (hover:hover) {
  .hr-brand-card:hover,
  .hr-card:hover,
  .hr-panel:hover {
    border-color: color-mix(in srgb, var(--hr-blue) 18%, var(--hr-line));
    box-shadow: var(--hr-shadow-hover);
  }
}

.hr-brand-card { padding: 22px; }
.hr-brand-card h2 { font-size: 26px; margin: 0 0 10px; }
.hr-brand-card p { margin: 0 0 14px; color: var(--hr-muted); }
.hr-role { padding-top: 12px; border-top: 1px solid var(--hr-line); color: var(--hr-muted); }

.hr-kicker {
  margin: 0 0 8px;
  color: var(--hr-blue);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 800;
}

.hr-tabs { display: grid; gap: 8px; }
.hr-tab {
  border: 1px solid var(--hr-line);
  border-radius: var(--radius-lg, 16px);
  min-height: 48px;
  padding: 12px 16px;
  background: #fff;
  color: var(--hr-text);
  text-align: left;
  font-weight: 750;
  cursor: pointer;
  transition: transform var(--transition-fast, 150ms cubic-bezier(.22,.61,.36,1)), border-color var(--transition-fast, 150ms cubic-bezier(.22,.61,.36,1)), box-shadow var(--transition-normal, 190ms cubic-bezier(.22,.61,.36,1)), background-color var(--transition-fast, 150ms cubic-bezier(.22,.61,.36,1));
}
.hr-tab:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); }
.hr-tab.is-active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.hr-content { min-width: 0; }
.hr-panel { padding: 22px; }
.hr-panel:not([hidden]) { animation: hrPanelIn 0.18s ease-out; }
.hr-panel[hidden] { display: none; }
.hr-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hr-panel-head h2 { font-size: 30px; margin: 0; }
.hr-panel-head.compact h3 { margin: 0; font-size: 20px; }
.hr-muted { color: var(--hr-muted); }

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

.hr-stat {
  background: #fff;
  border: 1px solid var(--hr-line);
  border-radius: 22px;
  padding: 20px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.hr-stat:hover { transform: translateY(-2px); box-shadow: var(--hr-shadow-hover); border-color: rgba(37, 99, 235, 0.16); }
.hr-stat strong {
  display: block;
  font-size: 42px;
  line-height: 1;
  margin-bottom: 8px;
}
.hr-stat span { color: var(--hr-muted); font-weight: 700; }

.hr-alerts,
.hr-employee-grid,
.hr-reports {
  display: grid;
  gap: 12px;
}

.hr-alert {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--hr-line);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.hr-alert:hover { transform: translateY(-1px); box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08); border-color: rgba(37, 99, 235, 0.14); }
.hr-alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #ecfdf5;
  color: #047857;
  font-style: normal;
  font-weight: 900;
}
.hr-level-warning .hr-alert-icon { background: #fff7ed; color: var(--hr-orange); }
.hr-level-danger .hr-alert-icon { background: #fef2f2; color: var(--hr-red); }
.hr-level-missing .hr-alert-icon { background: #f1f5f9; color: #64748b; }
.hr-dot { width: 12px; height: 12px; border-radius: 999px; background: var(--hr-green); }
.hr-level-warning .hr-dot { background: var(--hr-orange); }
.hr-level-danger .hr-dot { background: var(--hr-red); }
.hr-level-missing .hr-dot { background: #94a3b8; }
.hr-alert b { display: block; }
.hr-alert p { margin: 2px 0 0; color: var(--hr-muted); }

.hr-life-card { margin-bottom: 16px; }
.hr-life-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hr-life-badge {
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  background: #f8fbff;
  color: #334155;
  min-height: 34px;
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}
.hr-life-badge:hover {
  transform: translateY(-1px);
  background: #eef6ff;
  border-color: rgba(37, 99, 235, 0.22);
}
.hr-life-empty {
  color: var(--hr-muted);
  font-weight: 700;
}

.hr-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 220px auto;
  gap: 12px;
  margin-bottom: 16px;
}

.hr-toolbar input,
.hr-toolbar select,
.hr-actions input,
.hr-form-grid input,
.hr-form-grid select,
.hr-form-grid textarea,
.hr-mini-form input,
.hr-mini-form select,
.hr-mini-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--hr-line);
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
  font: inherit;
}

.hr-form-grid input[type="file"],
.hr-mini-form input[type="file"] {
  padding: 6px;
  color: var(--hr-muted);
}

.hr-form-grid input[type="file"]::file-selector-button,
.hr-mini-form input[type="file"]::file-selector-button {
  min-height: 32px;
  border: 0;
  border-radius: 11px;
  background: #111827;
  color: #fff;
  padding: 7px 12px;
  margin-right: 10px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.hr-toolbar input:focus,
.hr-toolbar select:focus,
.hr-actions input:focus,
.hr-form-grid input:focus,
.hr-form-grid select:focus,
.hr-form-grid textarea:focus,
.hr-mini-form input:focus,
.hr-mini-form select:focus,
.hr-mini-form textarea:focus {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.48);
}

.page-kadry .btn {
  min-height: 42px;
  border-radius: 14px;
  padding: 10px 14px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.page-kadry .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.page-kadry .btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.page-kadry .btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.page-kadry .btn.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.page-kadry .btn.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  color: #ffffff;
  position: absolute;
  inset: 0;
  margin: auto;
  animation: hr-spin 0.75s linear infinite;
}

.page-kadry .btn-secondary.is-loading::after,
.page-kadry .btn-neutral.is-loading::after {
  color: var(--hr-text);
}

@keyframes hr-spin {
  to { transform: rotate(360deg); }
}

.page-kadry .btn-small {
  min-height: 34px;
  border-radius: 11px;
  padding: 7px 10px;
  font-size: 13px;
}

.page-kadry .btn-save::before {
  content: "✓";
  display: inline-block;
  margin-right: 7px;
  font-weight: 950;
}

.hr-segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--hr-line);
  border-radius: 16px;
  background: #f8fafc;
  padding: 4px;
  gap: 4px;
}

.hr-segmented button {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--hr-muted);
  min-height: 36px;
  padding: 8px 12px;
  font-weight: 850;
  cursor: pointer;
}

.hr-segmented button.is-active {
  background: #fff;
  color: var(--hr-text);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.hr-employee-grid.is-card-view {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hr-employee-grid.is-list-view {
  grid-template-columns: 1fr;
}

.hr-employee-card {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--hr-line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.78) 0%, rgba(255, 255, 255, 0.96) 54%),
    #fff;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
  min-width: 0;
  overflow: hidden;
}
.hr-employee-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.42), rgba(225, 29, 72, 0.22));
  opacity: 0.8;
}
.hr-employee-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: var(--hr-shadow-hover);
}
.hr-employee-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
}
.hr-avatar {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: linear-gradient(135deg, #dbeafe, #f8fafc);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 850;
  color: #1d4ed8;
  overflow: hidden;
}
.hr-avatar.large {
  width: 82px;
  height: 82px;
  border-radius: 20px;
  font-size: 28px;
}
.hr-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hr-employee-card h3 { margin: 0 0 3px; font-size: 19px; }
.hr-employee-card p { margin: 0; color: var(--hr-muted); }
.hr-person-card {
  grid-template-columns: 1fr;
  align-items: start;
  min-height: 292px;
  grid-template-rows: auto 1fr auto;
  padding: 22px 22px 20px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 14%, rgba(37, 99, 235, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}
.hr-person-card .hr-avatar {
  margin-bottom: 8px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
}
.hr-person-card > .hr-tag {
  justify-self: start;
  align-self: end;
}
.hr-person-card h3 {
  font-size: 22px;
  margin-bottom: 6px;
}
.hr-person-card p {
  font-size: 13px;
  line-height: 1.45;
}
.hr-employee-row {
  min-height: 96px;
}
.hr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hr-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.hr-tag.ok { background: #dcfce7; color: #166534; }
.hr-tag.warning { background: #ffedd5; color: #9a3412; }
.hr-tag.danger { background: #fee2e2; color: #991b1b; }
.hr-tag.missing { background: #e2e8f0; color: #475569; }
.hr-tag.birthday { background: #fff7ed; color: #9a3412; }

.hr-detail-hero {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}
.hr-detail-hero .hr-avatar { width: 94px; height: 94px; border-radius: 28px; font-size: 32px; }
.hr-detail-hero h2 { margin: 0 0 6px; font-size: 34px; }
.hr-detail-hero p { margin: 0; color: var(--hr-muted); }

.hr-folder {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--hr-line);
  border-radius: 28px 28px 22px 22px;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.08);
  padding: 20px 20px 0;
  margin-bottom: 16px;
}

.hr-folder-hero {
  display: grid;
  grid-template-columns: 108px minmax(260px, 1fr) minmax(260px, 420px);
  gap: 18px;
  align-items: center;
  padding-bottom: 18px;
}

.hr-folder-photo .hr-avatar {
  width: 108px;
  height: 126px;
  border-radius: 18px;
  font-size: 34px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.hr-folder-hero h2 { margin: 0 0 6px; font-size: 34px; }
.hr-folder-hero p { margin: 0; color: var(--hr-muted); }

.hr-folder-hero > .hr-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.hr-folder-hero > .hr-actions .btn {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  text-align: center;
}

.hr-folder-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-top: 6px;
}

.hr-folder-tab {
  border: 1px solid var(--hr-line);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: #eef2f7;
  color: #475569;
  padding: 11px 14px;
  min-height: 42px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}
.hr-folder-tab:hover { background: #f8fafc; color: var(--hr-text); }

.hr-folder-tab.is-active {
  background: #fff;
  color: var(--hr-text);
  transform: translateY(1px);
}

.hr-folder-panel[hidden] { display: none; }
.hr-folder-panel:not([hidden]) { animation: hrPanelIn 0.16s ease-out; }

.hr-folder-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}

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

.hr-timeline-item {
  border: 1px solid var(--hr-line);
  border-radius: 18px;
  background: #fbfcff;
  padding: 13px;
}

.hr-timeline-item strong,
.hr-timeline-item span {
  display: block;
}

.hr-timeline-item span {
  color: var(--hr-muted);
  font-size: 13px;
  font-weight: 750;
  margin-top: 3px;
}

.hr-timeline-item p {
  margin: 8px 0 0;
  color: var(--hr-muted);
}

.hr-timeline-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.hr-chip {
  border: 1px solid var(--hr-line);
  border-radius: 999px;
  background: #fff;
  color: var(--hr-muted);
  min-height: 34px;
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.hr-chip:hover { transform: translateY(-1px); border-color: rgba(37, 99, 235, 0.22); }
.hr-chip.is-active { background: #111827; border-color: #111827; color: #fff; }

.hr-year-timeline {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.hr-timeline-row {
  display: grid;
  grid-template-columns: 120px 40px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.hr-timeline-year {
  min-width: 90px;
  color: var(--hr-muted);
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
  line-height: 36px;
}

.hr-timeline-marker {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef6ff;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
  white-space: nowrap;
}

.hr-timeline-card {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--hr-line);
  border-radius: 18px;
  background: #fbfcff;
  padding: 13px;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal;
}

.hr-timeline-card * {
  min-width: 0;
}

.hr-timeline-row[hidden] {
  display: none;
}

.hr-timeline-row + .hr-timeline-row .hr-timeline-marker {
  position: relative;
}

.hr-timeline-card strong,
.hr-timeline-card span {
  display: block;
}

.hr-timeline-card span {
  color: var(--hr-muted);
  font-size: 13px;
  font-weight: 800;
  margin-top: 3px;
  white-space: normal;
}

.hr-timeline-card p {
  margin: 8px 0 0;
  color: var(--hr-muted);
  white-space: normal;
}

.hr-card { padding: 20px; margin-bottom: 16px; }
.hr-card { transition: box-shadow var(--transition-normal, .19s ease), border-color var(--transition-normal, .19s ease), transform var(--transition-fast, .15s ease); }
.hr-card:hover { border-color: color-mix(in srgb, var(--hr-blue) 18%, var(--hr-line)); }
.hr-card h3 { font-size: 21px; margin: 0 0 12px; }
.hr-card > .hr-actions {
  margin: 4px 0 18px;
}
.hr-card > h3 + .hr-actions,
.hr-card > .hr-actions + .hr-card-grid,
.hr-card > .hr-actions + .hr-record-grid {
  margin-top: 14px;
}
.hr-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.hr-section-head h3 { margin-bottom: 4px; }
.hr-section-head p { margin: 0; }
.hr-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.hr-fact {
  padding: 14px;
  border: 1px solid var(--hr-line);
  border-radius: 18px;
  background: #fbfcff;
}
.hr-fact span { display: block; color: var(--hr-muted); font-size: 12px; font-weight: 750; margin-bottom: 5px; }
.hr-fact strong { font-size: 22px; }
.hr-fact small {
  display: block;
  margin-top: 8px;
  color: var(--hr-muted);
  font-size: 13px;
  font-weight: 700;
}

.hr-empty-state {
  border: 1px dashed rgba(100, 116, 139, 0.35);
  border-radius: 18px;
  background: #fbfcff;
  color: var(--hr-muted);
  padding: 18px;
  font-weight: 800;
}

.hr-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hr-record-card {
  border: 1px solid var(--hr-line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  padding: 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  min-width: 0;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.hr-record-card:hover { transform: translateY(-2px); box-shadow: var(--hr-shadow-hover); border-color: rgba(37, 99, 235, 0.16); }

.hr-record-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.hr-record-top strong {
  min-width: 0;
  font-size: 19px;
  overflow-wrap: anywhere;
}

.hr-record-card p {
  margin: 0 0 10px;
  color: var(--hr-muted);
  font-weight: 700;
}

.hr-record-meta {
  display: grid;
  gap: 5px;
  color: var(--hr-muted);
  font-size: 13px;
  margin: 10px 0;
}

.hr-record-meta b {
  color: var(--hr-text);
}

.hr-record-card .hr-actions {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.hr-progress {
  height: 12px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin: 12px 0 8px;
}
.hr-progress i {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  max-width: 100%;
  background: linear-gradient(90deg, #2563eb, #10b981);
}
.hr-progress.warning i { background: linear-gradient(90deg, #f59e0b, #f97316); }
.hr-progress.danger i { background: linear-gradient(90deg, #ef4444, #dc2626); }

.hr-form-grid,
.hr-mini-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.field label { display: block; margin-bottom: 6px; color: var(--hr-muted); font-weight: 750; }
.field-full { grid-column: 1 / -1; }
.field-check {
  display: flex;
  align-items: end;
}
.field-check label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  color: var(--hr-text);
}
.field-check input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
}
.hr-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hr-actions .btn {
  flex-shrink: 0;
}
.field.hr-actions,
.field-full.hr-actions {
  justify-content: flex-end;
  align-items: center;
  padding-top: 10px;
}
.field.hr-actions label {
  display: none;
}
.hr-mini-form .field.hr-actions,
.hr-mini-form .field-full.hr-actions {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.hr-mini-form .field.hr-actions .btn,
.hr-mini-form .field-full.hr-actions .btn {
  min-width: 160px;
}
.hr-mini-form + .hr-record-grid,
.hr-mini-form + .hr-table,
.hr-mini-form + .hr-muted {
  margin-top: 18px;
}
.hr-calc-box {
  border: 1px solid var(--hr-line);
  border-radius: 18px;
  background: #fbfcff;
  padding: 16px;
  font-weight: 750;
  color: var(--hr-muted);
}
.hr-calc-box strong {
  display: block;
  color: var(--hr-text);
  margin-bottom: 12px;
}
.hr-calc-box.is-warning {
  border-color: rgba(217, 119, 6, 0.24);
  background: #fffaf3;
}
.hr-leave-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.hr-leave-summary span {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
  font-size: 13px;
}
.hr-leave-summary b {
  display: block;
  margin-top: 2px;
  color: var(--hr-text);
}

#leaveShortageActions {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 18px;
  background: #fffaf3;
  gap: 12px;
}

#leaveShortageActions .btn {
  margin: 0;
}

.hr-table {
  width: 100%;
  border-collapse: collapse;
}
.hr-table th,
.hr-table td {
  padding: 10px;
  border-bottom: 1px solid var(--hr-line);
  text-align: left;
  vertical-align: top;
}
.hr-table th {
  color: var(--hr-muted);
  font-size: 12px;
  background: var(--surface-2, #f8fafc);
  font-weight: 800;
}

@media (hover:hover) {
  .hr-table tbody tr:hover {
    background: var(--surface-2, #f8fafc);
  }
}

.hr-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hr-leave-table td:last-child {
  min-width: 210px;
}

.hr-info-box {
  margin: 0;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 18px;
  background: #f8fbff;
  color: var(--hr-muted);
  padding: 14px 16px;
  font-weight: 700;
}

.hr-leave-history-list {
  display: grid;
  gap: 12px;
}

.hr-leave-history-list article {
  border: 1px solid var(--hr-line);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
}

.hr-leave-history-list strong,
.hr-leave-history-list span {
  display: block;
}

.hr-leave-history-list span {
  color: var(--hr-muted);
  font-size: 13px;
  font-weight: 800;
  margin-top: 3px;
}

.hr-leave-history-list p {
  margin: 8px 0 0;
  color: var(--hr-text);
}

.hr-leave-history-list em {
  display: block;
  margin-top: 8px;
  color: var(--hr-muted);
  font-style: normal;
}

.hr-skeleton-card,
.hr-day-skeleton {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  border: 1px solid var(--hr-line);
  border-radius: 22px;
  background: #fff;
  padding: 18px;
}

.hr-skeleton-card.person { min-height: 240px; }
.hr-skeleton-card.stat { min-height: 124px; }
.hr-skeleton-card i,
.hr-skeleton-card b,
.hr-skeleton-card span,
.hr-skeleton-line,
.hr-skeleton-avatar,
.hr-day-skeleton i,
.hr-day-skeleton span {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 45%, #eef2f7 100%);
  background-size: 220% 100%;
  animation: hrSkeleton 1.35s ease-in-out infinite;
}
.hr-skeleton-card i { width: 64px; height: 64px; border-radius: 20px; margin-bottom: 16px; }
.hr-skeleton-card b { width: 58%; height: 22px; margin-bottom: 14px; }
.hr-skeleton-card span { width: 88%; height: 14px; margin-top: 10px; }
.hr-skeleton-card span:last-child { width: 54%; }
.hr-skeleton-line { width: 220px; height: 34px; display: inline-block; margin-right: 8px; }
.hr-skeleton-line.short { width: 150px; }
.hr-skeleton-avatar { width: 108px; height: 126px; border-radius: 18px; }
.hr-day-skeleton i { width: 42px; height: 18px; margin-bottom: 14px; }
.hr-day-skeleton span { width: 86%; height: 16px; margin-top: 10px; }

@keyframes hrSkeleton {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@keyframes hrPanelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hr-edit-panel {
  display: none;
}

.hr-archive-panel {
  margin-top: 12px;
  border: 1px solid var(--hr-line);
  border-radius: 20px;
  padding: 14px;
  background: #f8fafc;
}

.hr-calendar-card {
  background: #fff;
  border: 1px solid var(--hr-line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
  margin-bottom: 16px;
}

.hr-calendar-title {
  font-size: 24px;
  font-weight: 850;
  margin-bottom: 12px;
}

.hr-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.hr-legend span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}
.leave-wypoczynkowy { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.leave-na_zadanie { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.leave-bezplatny { background: #e5e7eb; color: #374151; border-color: #d1d5db; }
.leave-sick { background: #ffe4e6; color: #be123c; border-color: #fecdd3; }
.leave-inny,
.leave-okolicznosciowy { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }

.hr-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  min-width: 760px;
}
.hr-calendar-compact .hr-day { min-height: 118px; padding: 8px; gap: 6px; }
.hr-calendar-compact .hr-day-num { font-size: 17px; }
.hr-calendar-compact .hr-event,
.hr-calendar-compact .hr-more-events { min-height: 24px; padding: 4px 7px; font-size: 11px; }

.hr-calendar-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 4px;
}

.hr-day {
  min-height: 154px;
  border: 1px solid var(--hr-line);
  border-radius: 18px;
  background: #fbfcff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  min-width: 0;
}
.hr-day.is-muted { opacity: 0.48; background: #f8fafc; }
.hr-day.is-today { border-color: rgba(37, 99, 235, 0.42); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08); }
.hr-day.is-holiday {
  border-color: rgba(217, 119, 6, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.92), rgba(255, 251, 235, 0.72)),
    #fffaf0;
}
.hr-day-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--hr-muted);
  font-weight: 800;
  font-size: 12px;
}
.hr-day-num {
  color: var(--hr-text);
  font-size: 20px;
  font-weight: 900;
}
.hr-holiday-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  width: fit-content;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 999px;
  background: rgba(255, 251, 235, 0.94);
  color: #92400e;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
  box-shadow: 0 8px 18px rgba(146, 64, 14, 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hr-holiday-badge span {
  color: #d97706;
  flex: 0 0 auto;
}
.hr-day-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  min-width: 0;
}
.hr-event {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 5px 8px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
  font-size: 12px;
  font-weight: 850;
  min-height: 28px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.hr-event:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08); }

.hr-event.is-selected {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 1px;
}

.hr-more-events {
  width: 100%;
  border: 1px dashed rgba(100, 116, 139, 0.34);
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.14s ease, border-color 0.14s ease, background-color 0.14s ease;
}
.hr-more-events:hover { transform: translateY(-1px); border-color: rgba(37, 99, 235, 0.28); background: #eef6ff; }

.hr-employee-calendar .hr-event,
.hr-week .hr-event {
  min-height: 0;
  border-radius: 10px;
  box-shadow: inset 4px 0 0 currentColor;
}

.hr-calendar-tooltip {
  position: fixed;
  z-index: 1200;
  width: min(320px, calc(100vw - 24px));
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
  padding: 13px;
  color: var(--hr-text);
  pointer-events: auto;
  backdrop-filter: blur(14px);
  animation: hrTooltipIn 0.14s ease-out;
}

@keyframes hrTooltipIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.hr-calendar-tooltip[hidden] {
  display: none;
}

.hr-calendar-tooltip strong {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
}

.hr-calendar-tooltip > span {
  display: inline-flex;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 10px;
}

.hr-calendar-tooltip dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.hr-calendar-tooltip dl div {
  border: 1px solid var(--hr-line);
  border-radius: 10px;
  padding: 7px;
  background: #fbfcff;
}

.hr-calendar-tooltip dt {
  color: var(--hr-muted);
  font-size: 11px;
  font-weight: 800;
}

.hr-calendar-tooltip dd {
  margin: 0;
  font-size: 13px;
  font-weight: 850;
}

.hr-calendar-tooltip p {
  margin: 10px 0 0;
  color: var(--hr-muted);
  font-size: 13px;
}

.hr-calendar-tooltip-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.hr-calendar-tooltip-list button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  font-weight: 850;
}

.hr-calendar-tooltip-list button span {
  display: block;
  color: inherit;
  opacity: 0.72;
  font-size: 12px;
  font-weight: 750;
  margin-top: 2px;
}

.hr-week .hr-day {
  min-height: 260px;
}

.hr-detail-actions {
  display: grid;
  gap: 8px;
}

.hr-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hr-help-card {
  border: 1px solid var(--hr-line);
  border-radius: 20px;
  background: #fff;
  padding: 18px;
}

.hr-help-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.hr-help-card p {
  margin: 0 0 10px;
  color: var(--hr-muted);
  font-size: 16px;
  line-height: 1.45;
}

.hr-help-card p:last-child {
  margin-bottom: 0;
}

.hr-help-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--hr-muted);
  font-size: 16px;
  line-height: 1.55;
}

.hr-help-card-wide {
  grid-column: 1 / -1;
}

.hr-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.32);
  padding: 20px;
  backdrop-filter: blur(10px);
}

.hr-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.36);
  padding: 22px;
  backdrop-filter: blur(12px);
}

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

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

.hr-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-xl, 20px);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.24);
  padding: 24px;
  overflow: hidden;
  animation: hrModalIn var(--transition-normal, 190ms cubic-bezier(.22,.61,.36,1)) both;
}

@keyframes hrModalIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hr-modal-large {
  width: min(900px, 100%);
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.hr-modal-header,
.hr-modal-footer {
  background: rgba(255, 255, 255, 0.96);
  padding: 18px 22px;
}

.hr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--hr-line);
}

.hr-modal-header h2 {
  margin: 0;
}

.hr-modal-x {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
  color: var(--hr-text);
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.hr-modal > .hr-modal-x {
  position: absolute;
  top: 16px;
  right: 16px;
}

.hr-modal-x:hover {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.hr-modal-x:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.hr-modal-body {
  overflow: auto;
  padding: 20px 22px;
}

.hr-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--hr-line);
  box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.05);
}

.hr-edit-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hr-modal h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.hr-modal p {
  margin: 0 0 20px;
  color: var(--hr-muted);
  font-size: 17px;
  line-height: 1.45;
}

.hr-modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.hr-modal-large .hr-modal-header h2 {
  margin: 0;
}

@media (max-width: 980px) {
  .page-kadry { overflow-x: hidden; }
  .hr-shell { grid-template-columns: 1fr; }
  .hr-sidebar { position: static; }
  .hr-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-stats,
  .hr-card-grid,
  .hr-record-grid,
  .hr-form-grid,
  .hr-mini-form { grid-template-columns: 1fr; }
  .hr-toolbar { grid-template-columns: 1fr; }
  .hr-segmented { width: 100%; }
  .hr-employee-grid.is-card-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-detail-hero,
  .hr-employee-card,
  .hr-folder-hero { grid-template-columns: 58px minmax(0, 1fr); }
  .hr-person-card { grid-template-columns: 1fr; }
  .hr-detail-hero .hr-actions,
  .hr-folder-hero .hr-actions,
  .hr-employee-card > .hr-tags { grid-column: 1 / -1; }
  .hr-folder-photo .hr-avatar { width: 58px; height: 70px; border-radius: 14px; font-size: 22px; }
  .hr-folder-hero > .hr-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-folder-columns,
  .hr-help-grid { grid-template-columns: 1fr; }
  .hr-section-head { flex-direction: column; }
  .hr-section-head .hr-actions { width: 100%; }
  .hr-section-head .btn { flex: 1 1 160px; }
  .hr-calendar { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .hr-day { min-height: 126px; }
  .hr-leave-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-timeline-row { grid-template-columns: 1fr; gap: 8px; }
  .hr-timeline-year { line-height: 1.2; min-width: 0; }
  .hr-timeline-marker { width: 34px; height: 34px; }
  .hr-modal-overlay { padding: 10px; align-items: stretch; }
  .hr-modal-large { width: 100%; max-height: calc(100vh - 20px); align-self: center; }
  .hr-edit-form { grid-template-columns: 1fr; }
  .hr-modal-footer { padding: 14px; }
  .hr-modal-footer .btn { flex: 1 1 150px; min-height: 48px; }
}

@media (max-width: 520px) {
  .hr-shell { gap: 14px; }
  .hr-panel,
  .hr-brand-card,
  .hr-card { border-radius: 20px; }
  .hr-panel { padding: 16px; }
  .hr-panel-head h2 { font-size: 26px; }
  .hr-alert { grid-template-columns: 32px minmax(0, 1fr); }
  .hr-alert .hr-tag { grid-column: 2; justify-self: start; }
  .hr-employee-grid.is-card-view { grid-template-columns: 1fr; }
  .hr-person-card { min-height: 0; }
  .hr-folder-hero > .hr-actions { grid-template-columns: 1fr; }
  .hr-folder-hero h2 { font-size: 28px; }
  .hr-leave-summary { grid-template-columns: 1fr; }
  .hr-calendar-tooltip { width: calc(100vw - 20px); }
  .hr-modal-header { align-items: flex-start; }
  .hr-modal-header .btn { min-height: 44px; }
  .hr-modal { border-radius: var(--radius-xl, 20px); }
  .hr-modal-footer { flex-direction: column-reverse; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.wt-my-day,
.wt-team-list,
.wt-report,
.wt-supervisor-list {
  display: grid;
  gap: 12px;
}

.wt-day-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.wt-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.wt-gps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wt-gps-grid span,
.wt-gps-message {
  border: 1px solid var(--hr-line);
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
  color: var(--hr-muted);
  font-weight: 800;
}

.wt-gps-grid b {
  display: block;
  color: var(--hr-text);
  margin-bottom: 4px;
}

.wt-gps-grid i,
.wt-gps-message {
  font-style: normal;
}

.wt-gps-grid .ok,
.wt-gps-message.ok { color: var(--hr-green); }
.wt-gps-grid .warning,
.wt-gps-message.warning { color: var(--hr-orange); }
.wt-gps-grid .danger,
.wt-gps-message.danger { color: var(--hr-red); }
.wt-gps-grid .missing,
.wt-gps-message.missing { color: var(--hr-muted); }

.wt-gps-message:empty {
  display: none;
}

.wt-gps-line a {
  font-weight: 900;
  color: var(--hr-blue);
  text-decoration: none;
}

.wt-summary-grid span {
  border: 1px solid var(--hr-line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  color: var(--hr-muted);
  font-weight: 750;
}

.wt-summary-grid b {
  display: block;
  color: var(--hr-text);
  margin-bottom: 4px;
}

.wt-action-grid,
.wt-absence-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.wt-inline-time,
.wt-comment-box,
.wt-absence-form label {
  display: grid;
  gap: 6px;
  color: var(--hr-muted);
  font-weight: 800;
}

.wt-inline-time input,
.wt-comment-box textarea,
.wt-absence-form select {
  width: 100%;
  border: 1px solid var(--hr-line);
  border-radius: 14px;
  background: #fff;
  padding: 11px 12px;
  font: inherit;
  color: var(--hr-text);
}

.wt-comment-box {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.wt-comment-box label,
.wt-comment-box textarea {
  grid-column: 1 / 2;
}

.wt-comment-box button {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}

.wt-duty-note {
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 12px;
  font-weight: 800;
}

.wt-filterbar {
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.wt-team-row {
  grid-template-columns: 18px minmax(0, 1fr) auto;
}

.wt-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.wt-report-scroll {
  overflow-x: auto;
  border: 1px solid var(--hr-line);
  border-radius: 16px;
  background: #fff;
}

.wt-presence-table {
  min-width: 980px;
  margin: 0;
}

.wt-presence-table th,
.wt-presence-table td {
  white-space: nowrap;
  text-align: center;
}

.wt-presence-table tbody th {
  text-align: left;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}

.wt-cell {
  min-width: 34px;
  font-weight: 900;
  border-radius: 8px;
}

.wt-cell.ok { background: #ecfdf5; color: #047857; }
.wt-cell.warning { background: #fff7ed; color: #b45309; }
.wt-cell.danger { background: #fef2f2; color: #b91c1c; }
.wt-cell.missing { background: #f8fafc; color: #94a3b8; }
.wt-cell.has-duty { outline: 2px solid #2563eb; outline-offset: -2px; }
.wt-free-day { background: #f1f5f9; color: #64748b; }

@media (max-width: 920px) {
  .wt-summary-grid,
  .wt-gps-grid,
  .wt-action-grid,
  .wt-absence-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wt-team-row {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .wt-row-actions {
    grid-column: 2 / 3;
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .wt-summary-grid,
  .wt-gps-grid,
  .wt-action-grid,
  .wt-absence-form,
  .wt-comment-box {
    grid-template-columns: 1fr;
  }

  .wt-comment-box label,
  .wt-comment-box textarea,
  .wt-comment-box button {
    grid-column: auto;
    grid-row: auto;
  }
}
