/* BHP System – Frontend Styles v2 */
.bhp-front-wrap { max-width:920px; margin:0 auto; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }

.bhp-front-header { margin-bottom:20px; }
.bhp-front-header h2 { font-size:22px; margin-bottom:6px; }

.bhp-error, .bhp-notice {
  padding:12px 18px; border-radius:6px; margin:16px 0;
}
.bhp-error  { background:#fef2f2; border:1px solid #fca5a5; color:#991b1b; }
.bhp-notice { background:#fff3cd; border:1px solid #ffc107; color:#856404; }

.bhp-controls-bar {
  display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  background:#f8f9fa; padding:12px 16px; border-radius:8px;
  margin-bottom:16px; border:1px solid #dee2e6;
}
.bhp-control-group { display:flex; align-items:center; gap:8px; }
.bhp-control-group label { font-weight:600; font-size:14px; white-space:nowrap; }
.bhp-control-group input {
  padding:6px 10px; border:1px solid #ced4da; border-radius:5px; font-size:14px;
}
#bhp-front-status { margin-left:auto; font-size:13px; color:#6c757d; }

/* Card */
.bhp-placowka-card {
  border:1px solid #dee2e6; border-radius:8px; margin-bottom:8px;
  overflow:hidden; transition:box-shadow .2s;
}
.bhp-placowka-card:hover { box-shadow:0 2px 8px rgba(0,0,0,.08); }
.bhp-placowka-card.bhp-hidden { display:none; }
.bhp-placowka-card.bhp-open .bhp-placowka-header { background:#f0f6fc; border-bottom:1px solid #dee2e6; }

.bhp-placowka-header {
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 14px; background:#fff; cursor:pointer; user-select:none;
}
.bhp-placowka-info { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; flex:1; }
.bhp-numer-id {
  background:#2271b1; color:#fff; padding:2px 8px;
  border-radius:12px; font-size:12px; font-weight:700; white-space:nowrap; flex-shrink:0;
}
.bhp-placowka-info strong { font-size:15px; }
.bhp-placowka-info small { color:#6c757d; font-size:12px; }

.bhp-toggle-btn {
  background:none; border:1px solid #dee2e6; border-radius:5px;
  padding:4px 10px; cursor:pointer; font-size:12px; white-space:nowrap;
  flex-shrink:0; margin-left:10px;
}
.bhp-toggle-btn:hover { background:#f0f0f0; }

/* Zadania grid */
.bhp-zadania-grid { padding:12px 14px; background:#fafbfc; }

.bhp-zadanie-row {
  display:grid; grid-template-columns:1fr 100px 22px;
  align-items:center; gap:10px;
  padding:6px 0; border-bottom:1px solid #eee;
}
.bhp-zadanie-row:last-of-type { border-bottom:none; }
.bhp-zadanie-row label { font-size:13px; }

.bhp-ilosc-input {
  width:90px; padding:5px 8px; border:1px solid #ced4da; border-radius:5px;
  text-align:center; font-size:15px; font-weight:700;
  transition:border-color .15s, background .15s;
}
.bhp-ilosc-input:focus { outline:none; border-color:#2271b1; background:#f0f6fc; }
.bhp-ilosc-input.changed { border-color:#f59e0b; background:#fffbeb; }
.bhp-ilosc-input.saved   { border-color:#10b981; background:#ecfdf5; }

.bhp-save-indicator { font-size:15px; text-align:center; }

.bhp-card-footer {
  display:flex; align-items:center; gap:12px;
  margin-top:10px; padding-top:10px; border-top:1px dashed #dee2e6;
}
.bhp-save-all-btn {
  padding:6px 14px; background:#2271b1; color:#fff;
  border:none; border-radius:5px; cursor:pointer; font-size:13px;
}
.bhp-save-all-btn:hover { background:#135e96; }
.bhp-save-all-btn:disabled { background:#aaa; cursor:default; }
.bhp-card-status { font-size:13px; font-weight:600; color:#10b981; }

/* ── Badge z liczbą wpisów ──────────────────── */
.bhp-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}
.bhp-wpisy-badge {
  display: inline-block;
  background: #e0e0e0;
  color: #555;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
  transition: background .2s, color .2s;
}
.bhp-wpisy-badge.bhp-badge-active {
  background: #10b981;
  color: #fff;
}


/* ── Raport pracownika ─────────────────────── */
#bhp-raport-area {
  background: #fff;
  border: 1px solid #72aee6;
  border-radius: 8px;
  padding: 16px;
}
.bhp-raport-table-wrap { overflow-x: auto; }
.bhp-raport-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.bhp-raport-table th {
  background: #2271b1;
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
}
.bhp-raport-table td {
  padding: 6px 12px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
.bhp-raport-table .bhp-raport-plac {
  font-weight: 600;
  background: #f0f6fc;
  font-size: 12px;
  border-right: 2px solid #72aee6;
}
.bhp-raport-table .bhp-raport-first-row td:first-child {
  border-top: 2px solid #c0d8f0;
}
.bhp-raport-table tfoot td {
  background: #f0f6fc;
  font-weight: 700;
  border-top: 2px solid #2271b1;
}

/* ── Wybór miesiąca (selecty) ───────────────── */
.bhp-month-picker {
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}
.bhp-month-box {
  background: #fff;
  border: 2px solid #2271b1;
  border-radius: 12px;
  padding: 32px 36px;
  text-align: center;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(34,113,177,.12);
}
.bhp-month-box h3 { font-size: 22px; margin: 0 0 8px; color: #1d2327; }
.bhp-month-box p  { color: #555; margin: 0 0 20px; }
.bhp-month-hint   { font-size: 13px; margin-top: 12px !important; }

.bhp-month-selects {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.bhp-select-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.bhp-select-group label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.bhp-select-group select {
  padding: 10px 14px;
  font-size: 16px;
  border: 2px solid #ced4da;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  min-width: 160px;
}
.bhp-select-group select:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 3px rgba(34,113,177,.15);
}

.bhp-btn-primary {
  background: #2271b1;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 11px 22px;
  font-size: 15px;
  cursor: pointer;
  font-weight: 600;
  transition: background .15s;
  white-space: nowrap;
}
.bhp-btn-primary:hover { background: #135e96; }

.bhp-btn-secondary {
  background: #f0f6fc;
  color: #2271b1;
  border: 1px solid #72aee6;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.bhp-btn-secondary:hover { background: #ddeeff; }

/* ── Zakładki frontendu ─────────────────────── */
.bhp-front-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #2271b1;
  margin-bottom: 0;
}
.bhp-front-tab {
  padding: 9px 20px;
  border: 1px solid #dcdcde;
  border-bottom: none;
  background: #f6f7f7;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px 4px 0 0;
  position: relative;
  bottom: -2px;
  transition: background .15s;
}
.bhp-front-tab:hover { background: #e8f0fb; }
.bhp-front-tab-active {
  background: #fff;
  border-color: #2271b1;
  border-bottom: 2px solid #fff;
  color: #2271b1;
  font-weight: 700;
}
.bhp-front-tab-panel {
  background: #fff;
  border: 1px solid #dcdcde;
  border-top: none;
  padding: 20px;
}

/* ── Menedżer placówek pracownika ───────────── */
.bhp-placowki-manager h3 { font-size: 18px; margin: 0 0 6px; }
.bhp-placowki-manager > p { color: #555; margin-bottom: 16px; }

.bhp-pm-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.bhp-pm-filter {
  padding: 6px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 13px;
  width: 240px;
}

#bhp-pm-lista {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  padding: 6px;
}
.bhp-pm-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 6px;
  border-bottom: 1px solid #f0f0f1;
  cursor: pointer;
  font-size: 13px;
}
.bhp-pm-item:hover { background: #f9f9f9; }
.bhp-pm-item:last-child { border-bottom: none; }
.bhp-pm-item input[type="checkbox"] { flex-shrink: 0; width: 16px; height: 16px; cursor: pointer; margin-top: 2px; }
.bhp-pm-nr {
  background: #2271b1;
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}
.bhp-pm-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.bhp-pm-nazwa { font-weight: 600; line-height: 1.3; }
.bhp-pm-adres { color: #777; font-size: 11px; line-height: 1.3; }
