
*{box-sizing:border-box}
html{min-height:100%;background:#101820}
body{margin:0;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#e8edf3;background:#101820}
a{color:#e5a0a0;text-decoration:none}
.dashboard{min-height:100vh;display:flex;background:#101820}
.sidebar{width:300px;flex:0 0 300px;background:#121e29;border-right:1px solid #2a3947;padding:21px 14px;display:flex;flex-direction:column;min-height:100vh}
.brand{display:flex;align-items:center;gap:14px;margin-bottom:30px;padding:0 0 0 0}
.brand-icon{display:grid;place-items:center;background:#b3262d;color:#fff;font-weight:900;border-radius:14px;width:61px;height:61px;flex:0 0 61px}
.brand strong{display:block;letter-spacing:1.5px;font-size:17px}
.brand small{display:block;color:#9eacb9;font-size:11px;letter-spacing:1.5px;margin-top:5px}
.sidebar nav{display:grid;gap:7px;margin-top:45px}
.sidebar nav a{display:block;padding:15px 12px;color:#b8c5d0;border-radius:10px;font-size:14px}
.sidebar nav a:hover{background:#1b2a37;color:#fff}
.sidebar nav a.active{background:#2c2025;color:#fff;border-left:3px solid #c33138}
.sidebar nav em{float:right;font-size:10px;color:#81909d;font-style:normal}
.side-foot{margin-top:auto;color:#788897;font-size:11px;padding:16px 8px}
.main{flex:1;min-width:0;padding:34px 40px;max-width:1700px}
.topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:28px}
.topbar h1{font-size:28px;line-height:1.2;margin:7px 0 0;color:#f4f7fb}
.eyebrow{font-size:11px;letter-spacing:2px;color:#d16b70;font-weight:800}
.userbox{font-size:13px;color:#b9c6d1;white-space:nowrap}
.userbox a{color:#f08b8f}
.welcome{padding:30px 32px;border:1px solid #334452;border-radius:16px;background:linear-gradient(110deg,#243746,#192631);display:flex;justify-content:space-between;align-items:center;gap:20px}
.welcome h2{font-size:27px;margin:10px 0}
.welcome p{max-width:700px;color:#b6c4cf;line-height:1.65}
.welcome-mark{font-size:45px;font-weight:900;color:#e5a0a0;border:4px solid #a72b32;border-radius:18px;padding:12px 18px;transform:rotate(-5deg)}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:24px 0}
.stats article{background:#192631;border:1px solid #2d3e4d;border-radius:14px;padding:21px;min-width:0}
.stats article span{color:#d66b70;font-size:22px}
.stats article strong{display:block;font-size:29px;margin:13px 0 4px;color:#f4f7fb}
.stats article small{color:#9fadb9;font-size:12px}
.panel-note{background:#192631;border:1px solid #2d3e4d;border-radius:14px;padding:22px;margin:18px 0}
.panel-note h3{margin:0 0 10px;color:#f1f5fa}
.panel-note p{color:#aab8c4;line-height:1.65}
.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid #b3262d;border-radius:9px;background:#b3262d;color:white;padding:13px 18px;font-weight:700;cursor:pointer;text-align:center;font:inherit;font-size:13px}
.btn:hover{background:#c53239}
.btn-secondary{background:#344756;color:#e8edf3;border-color:#40536a}
.btn-secondary:hover{background:#43596b}
.muted,.hint{color:#aab7c4;font-size:13px;line-height:1.5}
.quiet-link{display:inline-block;color:#aebdca;font-size:13px}
.alert{padding:13px 15px;border-radius:9px;background:#4b2226;color:#ffd9dc;font-size:13px;border:1px solid #70363c}
.status-pill{display:inline-block;padding:5px 9px;border-radius:99px;font-size:11px;background:#344756;color:#dce6ee}
.status-pill.active{background:#1d4939;color:#9be0bd}
.status-pill.suspended{background:#57441f;color:#f2d28a}
.status-pill.inactive{background:#4a3436;color:#d9a5a7}
.table-wrap{width:100%;overflow-x:auto}
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:13px 12px;border-bottom:1px solid #30414f;font-size:13px}
th{color:#9eafbd;font-weight:600}
td{color:#dce4eb}
.empty{text-align:center;color:#9eafbd;padding:28px}
@media(max-width:1050px){.sidebar{width:245px;flex-basis:245px}.main{padding:26px}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.dashboard{display:block}.sidebar{width:100%;min-height:0;padding:15px}.sidebar nav{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:15px}.side-foot{display:none}.main{padding:20px}.topbar{align-items:flex-start;flex-direction:column}.welcome-mark{display:none}}

/* v0.4.1 – naprawa pełnego arkusza i formularzy */
.directory-heading{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:24px!important;padding:0 0 22px!important;margin:0 0 22px!important;border-bottom:1px solid #293544!important}
.directory-heading h2{font-size:30px!important;line-height:1.2!important;margin:8px 0 9px!important;color:#f4f7fb!important}
.directory-heading p{font-size:13px!important;line-height:1.55!important;margin:0!important;color:#9aafca!important}
.result-counter{display:inline-flex!important;align-items:center!important;min-height:42px!important;padding:0 15px!important;border:1px solid #344256!important;border-radius:9px!important;color:#b7c9e1!important;font-size:11px!important;white-space:nowrap!important;background:#101925!important}
.management-card{display:block!important;width:100%!important;padding:25px!important;margin:0 0 18px!important;background:#151e2a!important;border:1px solid #2b394b!important;border-radius:14px!important}
.management-card-heading{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:20px!important;margin:0 0 22px!important}
.management-card-heading h3{font-size:18px!important;line-height:1.3!important;margin:0 0 7px!important;color:#f1f5fa!important}
.management-card-heading p{font-size:12px!important;line-height:1.5!important;margin:0!important;color:#91a8c6!important}
form.directory-form{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:19px 20px!important;width:100%!important;align-items:start!important;margin:0!important}
form.directory-form>label{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;min-width:0!important;width:100%!important;margin:0!important;padding:0!important;color:#c5d2e2!important;font-size:12px!important;line-height:1.35!important;font-weight:600!important}
form.directory-form input,form.directory-form select{display:block!important;width:100%!important;min-width:0!important;max-width:none!important;height:48px!important;min-height:48px!important;margin:0!important;padding:0 14px!important;border:1px solid #465970!important;border-radius:9px!important;background:#0c1420!important;color:#f4f7fb!important;font-family:inherit!important;font-size:14px!important;line-height:normal!important;box-shadow:none!important;outline:none!important}
form.directory-form input::placeholder{color:#7f93ae!important;opacity:1!important}
form.directory-form input:focus,form.directory-form select:focus{border-color:#8aa7cc!important;box-shadow:0 0 0 3px rgba(105,145,193,.13)!important}
.directory-form-actions{display:flex!important;grid-column:1/-1!important;align-items:center!important;gap:11px!important;margin:4px 0 0!important;padding:0!important}
.directory-form-actions .btn{display:inline-flex!important;justify-content:center!important;align-items:center!important;width:auto!important;min-width:160px!important;height:46px!important;min-height:46px!important;margin:0!important;padding:0 22px!important;border-radius:9px!important;font-size:13px!important;font-weight:700!important}
.directory-summary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin:0 0 18px!important}
.directory-summary>div{display:block!important;min-width:0!important;padding:17px 19px!important;border:1px solid #2b394b!important;border-radius:11px!important;background:#151e2a!important}
.directory-summary strong{display:block!important;margin:0 0 5px!important;color:#f2f5f9!important;font-size:24px!important;line-height:1.2!important}
.directory-summary span{display:block!important;color:#91a9c8!important;font-size:11px!important;line-height:1.4!important}
.directory-filters{display:grid!important;grid-template-columns:minmax(240px,1.5fr) minmax(190px,.8fr) auto auto!important;align-items:center!important;gap:12px!important;margin:0 0 20px!important;width:100%!important}
.directory-filters input,.directory-filters select{display:block!important;width:100%!important;min-width:0!important;height:48px!important;margin:0!important;padding:0 14px!important;border:1px solid #40536a!important;border-radius:9px!important;background:#0c1420!important;color:#f2f5f9!important;font:inherit!important;font-size:13px!important}
.directory-filters .btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;height:48px!important;min-width:100px!important;margin:0!important;padding:0 18px!important}
.filter-reset{white-space:nowrap!important;color:#a9c4e6!important;font-size:12px!important}
.directory-table{width:100%!important;min-width:760px!important;border-collapse:collapse!important}
.directory-table th{padding:14px 12px!important;color:#91a9c8!important;font-size:10px!important;letter-spacing:.7px!important;text-align:left!important}
.directory-table td{padding:15px 12px!important;border-top:1px solid #293849!important;color:#dce5ef!important;font-size:13px!important}
.directory-table tbody tr:hover{background:#1a2735!important}
.row-actions{white-space:nowrap!important}.row-actions a{display:inline-block!important;margin-right:13px!important;color:#a9c4e6!important;font-size:12px!important;font-weight:600!important}.row-actions a:last-child{color:#ef9a9d!important}
.success-banner{margin:0 0 16px!important;padding:13px 16px!important;border:1px solid #28614e!important;border-radius:9px!important;background:#173c32!important;color:#a8e3c9!important;font-size:13px!important}
.text-action{color:#a9c4e6!important;font-size:12px!important;white-space:nowrap!important}
@media(max-width:900px){form.directory-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}.directory-filters{grid-template-columns:1fr 1fr!important}}
@media(max-width:600px){.directory-heading{align-items:flex-start!important;flex-direction:column!important}.management-card{padding:17px!important}form.directory-form{grid-template-columns:1fr!important;gap:15px!important}.directory-form-actions{flex-direction:column!important;align-items:stretch!important}.directory-form-actions .btn{width:100%!important}.directory-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}.directory-filters{grid-template-columns:1fr!important}.directory-filters .btn{width:100%!important}.management-card-heading{flex-direction:column!important}}


/* OSP CONTROL – szybki powrót na górę */
.back-to-top{
  position:fixed;left:50%;bottom:22px;z-index:9999;
  width:48px;height:48px;display:flex;align-items:center;justify-content:center;
  border:1px solid #d65b61;border-radius:50%;
  background:rgba(179,38,45,.97);color:#fff;
  font-family:inherit;font-size:27px;font-weight:800;line-height:1;
  box-shadow:0 5px 22px rgba(0,0,0,.38);
  cursor:pointer;opacity:0;visibility:hidden;pointer-events:none;
  transform:translate(-50%,12px);
  transition:opacity .2s ease,transform .2s ease,visibility .2s ease,background .2s ease;
}
.back-to-top.is-visible{
  opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,0);
}
.back-to-top:hover{background:#cc343b}
.back-to-top:focus-visible{outline:3px solid #f2b8ba;outline-offset:3px}
@media(max-width:600px){.back-to-top{bottom:16px;width:46px;height:46px}}
@media(prefers-reduced-motion:reduce){.back-to-top{transition:none}}

/* OSP CONTROL – ujednolicony wygląd formularza historii na karcie osoby */
.panel-note .member-form{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:start!important;
  gap:18px 20px!important;
  width:100%!important;
  margin:18px 0 0!important;
}
.panel-note .member-form>label{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:8px!important;
  min-width:0!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  color:#c5d2e2!important;
  font-size:12px!important;
  line-height:1.4!important;
  font-weight:600!important;
}
.panel-note .member-form input,
.panel-note .member-form select{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:48px!important;
  min-height:48px!important;
  margin:0!important;
  padding:0 14px!important;
  border:1px solid #40536a!important;
  border-radius:9px!important;
  background:#0c1420!important;
  color:#f2f5f9!important;
  font:inherit!important;
  font-size:14px!important;
  line-height:normal!important;
  box-shadow:none!important;
  outline:none!important;
  color-scheme:dark;
}
.panel-note .member-form input:focus,
.panel-note .member-form select:focus{
  border-color:#8aa7cc!important;
  box-shadow:0 0 0 3px rgba(105,145,193,.15)!important;
}
.panel-note .member-form input::placeholder{color:#7f93ae!important;opacity:1!important}
.panel-note .member-form .form-actions{
  display:flex!important;
  grid-column:1/-1!important;
  align-items:center!important;
  gap:12px!important;
  margin:3px 0 0!important;
  padding:0!important;
}
.panel-note .member-form .form-actions .btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:170px!important;
  min-height:46px!important;
  margin:0!important;
  padding:0 22px!important;
  border-radius:9px!important;
  font-size:13px!important;
  font-weight:700!important;
}
.panel-note>.hint{
  margin:17px 0 0!important;
  padding-top:14px!important;
  border-top:1px solid #2b394b!important;
  color:#91a9c8!important;
  font-size:12px!important;
  line-height:1.6!important;
}
@media(max-width:650px){
  .panel-note .member-form{grid-template-columns:1fr!important;gap:15px!important}
  .panel-note .member-form .form-actions{grid-column:1!important}
  .panel-note .member-form .form-actions .btn{width:100%!important}
}

/* OSP CONTROL – pola o pełnej szerokości w formularzach modułów */
form.directory-form>.wide-field{grid-column:1/-1!important}
@media(max-width:600px){form.directory-form>.wide-field{grid-column:auto!important}}
