:root{--sidebar-width:250px;--surface:var(--bs-body-bg);--muted:var(--bs-secondary-color);--border:var(--bs-border-color);--page:var(--bs-tertiary-bg)}body{background:var(--page);color:var(--bs-body-color);min-height:100vh}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);padding:1.25rem;background:#111827;color:#e5e7eb;z-index:1030}.brand{font-size:1.35rem;font-weight:700;color:#fff;text-decoration:none;margin-bottom:1.5rem}.app-nav-link{color:#cbd5e1;border-radius:.65rem;padding:.65rem .8rem}.app-nav-link:hover,.app-nav-link.active{color:#fff;background:#273449}.main-content{margin-left:var(--sidebar-width);padding:2rem;max-width:1800px}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:1rem;background:linear-gradient(145deg,var(--bs-tertiary-bg),var(--bs-body-bg))}.auth-card{width:min(100%,460px)}.page-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1.5rem}.page-heading h1{font-size:1.8rem;margin:0}.page-heading p{color:var(--muted);margin:.35rem 0 0}.metric-card{height:100%;position:relative;background:var(--surface);border:1px solid var(--border);border-radius:.9rem;padding:1.1rem;box-shadow:0 1px 2px rgba(15,23,42,.04);overflow:hidden}.metric-link{color:var(--bs-body-color);text-decoration:none;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}.metric-link:hover{color:var(--bs-body-color);transform:translateY(-2px);border-color:rgba(var(--bs-primary-rgb),.45);box-shadow:0 .4rem 1rem rgba(15,23,42,.09)}.metric-accent{position:absolute;inset:0 auto 0 0;width:.28rem}.metric-value{font-size:1.8rem;font-weight:750;line-height:1.1}.metric-small{font-size:1.15rem}.metric-label{margin-top:.4rem;color:var(--muted);font-size:.88rem}.card{border-color:var(--border);border-radius:.9rem}.table>:not(caption)>*>*{padding:.85rem 1rem}.table-note{max-width:420px}.form-card{max-width:900px}.participant-list{display:grid;gap:.55rem;max-height:58vh;overflow:auto;padding-right:.25rem}.participant-row{display:flex;align-items:center;gap:.75rem;padding:.75rem;border:1px solid var(--border);border-radius:.7rem;cursor:pointer;background:var(--surface)}.participant-row:hover{border-color:#94a3b8}.participant-row.is-hidden{display:none}.generator-options{top:1rem}.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:.6rem}.stats-grid>div{border:1px solid var(--border);border-radius:.7rem;padding:.75rem}.stats-grid span{display:block;font-size:1.35rem;font-weight:700}.stats-grid small{color:var(--muted)}.pair-card{height:100%;background:var(--surface);border:1px solid var(--border);border-radius:.9rem;padding:1rem}.pair-accepted{border-color:rgba(var(--bs-success-rgb),.55);background:rgba(var(--bs-success-rgb),.1)}.pair-rejected{opacity:.65}.person-side{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.pair-plus{text-align:center;color:var(--muted);font-weight:800;font-size:1.2rem;padding:.55rem}code{color:var(--bs-code-color)}.dashboard-kpi-grid .col-xl-2{flex:0 0 20%;max-width:20%}.dashboard-progress{height:.55rem}.dashboard-progress-lg{height:.8rem}.dashboard-chart-wrap{position:relative;min-height:230px}.dashboard-chart-wide{min-height:260px}.dashboard-empty-chart{min-height:180px;display:grid;place-items:center;color:var(--muted);border:1px dashed var(--border);border-radius:.75rem;background:var(--bs-tertiary-bg)}.attention-problem{min-width:240px;max-width:520px}.dashboard-filter .form-label{font-weight:600}.volunteer-combobox{position:relative;min-width:210px}.volunteer-combobox-input{min-width:0}.volunteer-combobox-menu{position:fixed;z-index:2000;overflow-y:auto;overscroll-behavior:contain;background:var(--bs-body-bg);color:var(--bs-body-color);border:1px solid var(--bs-border-color);border-radius:.55rem;box-shadow:0 .75rem 1.75rem rgba(0,0,0,.16);padding:.25rem}.volunteer-combobox-option{display:block;width:100%;border:0;border-radius:.4rem;background:transparent;color:inherit;text-align:left;padding:.6rem .7rem;line-height:1.25}.volunteer-combobox-option:hover,.volunteer-combobox-option.is-active{background:rgba(var(--bs-primary-rgb),.12);color:var(--bs-body-color)}.volunteer-combobox-option:focus-visible{outline:2px solid rgba(var(--bs-primary-rgb),.7);outline-offset:-2px}.volunteer-combobox-empty,.volunteer-combobox-more{padding:.65rem .7rem;color:var(--bs-secondary-color);font-size:.875rem}.visits-table{min-width:1260px}.visits-family-cell{min-width:130px}.visits-address-cell{min-width:220px;max-width:360px}.visits-volunteer-cell{min-width:250px}.visits-actions-cell{min-width:120px}.visits-row-status{max-width:170px;margin-left:auto}.visits-table .volunteer-combobox>label{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}[data-family-inline-root]>.card>.table-responsive{overflow-x:visible}[data-family-inline-root]>.card>.table-responsive>.table{width:100%;table-layout:fixed;font-size:.88rem}[data-family-inline-root]>.card>.table-responsive>.table>:not(caption)>*>*{min-width:0;padding:.65rem .55rem;white-space:normal!important;overflow-wrap:anywhere;word-break:break-word;vertical-align:middle}[data-family-inline-root]>.card>.table-responsive>.table th[data-table-column-original="1"]{width:48px}[data-family-inline-root]>.card>.table-responsive>.table td.table-action-cell a,[data-family-inline-root]>.card>.table-responsive>.table td.table-action-cell form{margin:.15rem 0 .15rem .2rem}[data-family-inline-root]>.card>.table-responsive>.table td.table-action-cell .btn{white-space:normal}[data-family-inline-root]>.card>.table-responsive>.table select{min-width:0;width:100%}[data-family-inline-root]>.alert.alert-warning{display:none}[data-family-inline-root]:has(>.alert.alert-warning)>.d-flex:first-of-type>.d-flex:last-child{position:relative;padding-bottom:2.7rem}[data-family-inline-root]:has(>.alert.alert-warning)>.d-flex:first-of-type>.d-flex:last-child::after{content:"Generator wymaga co najmniej dwóch aktywnych wolontariuszy, którzy przyjmują nowe wizyty i nie osiągnęli limitu przypisań.";position:absolute;right:0;bottom:.15rem;width:min(420px,80vw);font-size:.78rem;line-height:1.3;color:var(--bs-warning-text-emphasis);text-align:right}[data-bs-theme=dark] .metric-card,[data-bs-theme=dark] .card,[data-bs-theme=dark] .participant-row,[data-bs-theme=dark] .pair-card{box-shadow:none}[data-bs-theme=dark] .volunteer-combobox-menu{box-shadow:0 .75rem 1.75rem rgba(0,0,0,.35)}@media(max-width:1399.98px){.dashboard-kpi-grid .col-xl-2{flex:0 0 25%;max-width:25%}}@media(max-width:991.98px){.main-content{margin-left:0;padding:1rem}.page-heading{flex-direction:column}.generator-options{position:static!important}.dashboard-kpi-grid .col-xl-2{flex:0 0 33.333333%;max-width:33.333333%}.volunteer-combobox-menu{z-index:2055}[data-family-inline-root]>.card>.table-responsive>.table{font-size:.8rem}[data-family-inline-root]>.card>.table-responsive>.table>:not(caption)>*>*{padding:.55rem .4rem}}@media(max-width:767.98px){.dashboard-kpi-grid .col-xl-2{flex:0 0 50%;max-width:50%}.dashboard-chart-wrap{min-height:210px}.visits-table{min-width:1160px}.visits-volunteer-cell{min-width:220px}[data-family-inline-root]>.card>.table-responsive>.table th[data-table-column-original="4"],[data-family-inline-root]>.card>.table-responsive>.table td[data-table-column-original="4"],[data-family-inline-root]>.card>.table-responsive>.table th[data-table-column-original="11"],[data-family-inline-root]>.card>.table-responsive>.table td[data-table-column-original="11"]{display:none}[data-family-inline-root]:has(>.alert.alert-warning)>.d-flex:first-of-type>.d-flex:last-child::after{left:0;right:auto;width:100%;text-align:left}}@media(max-width:575.98px){.table>:not(caption)>*>*{padding:.7rem}.participant-row{align-items:flex-start;flex-wrap:wrap}.page-heading h1{font-size:1.5rem}.metric-card{padding:.9rem}.metric-value{font-size:1.55rem}.volunteer-combobox{min-width:190px}[data-family-inline-root]>.card>.table-responsive>.table{font-size:.74rem}[data-family-inline-root]>.card>.table-responsive>.table th[data-table-column-original="6"],[data-family-inline-root]>.card>.table-responsive>.table td[data-table-column-original="6"],[data-family-inline-root]>.card>.table-responsive>.table th[data-table-column-original="7"],[data-family-inline-root]>.card>.table-responsive>.table td[data-table-column-original="7"]{display:none}}

/* Neutral badges that combine text-bg-light with theme-aware text utilities must remain readable in both themes. */
.badge.text-bg-light.text-body,.badge.text-bg-light.text-body-secondary{color:var(--app-text,var(--bs-body-color))!important;background:var(--app-surface-soft,var(--bs-tertiary-bg))!important;border-color:var(--app-border-strong,var(--bs-border-color))!important}
[data-bs-theme=dark] .badge.text-bg-light.text-body,[data-bs-theme=dark] .badge.text-bg-light.text-body-secondary{color:#e7edf7!important;background:#1e293b!important;border-color:#475569!important}

/* Policy > Authentication and recovery: keep recovery controls compact and visually grouped. */
form[action$="/settings/policy/hardening"]{
  display:grid!important;
  grid-template-columns:minmax(250px,1fr) minmax(210px,.72fr) minmax(250px,1fr);
  gap:1rem!important;
  align-items:stretch;
  padding:1rem!important;
}
form[action$="/settings/policy/hardening"]>div{
  width:auto!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}
form[action$="/settings/policy/hardening"]>div:nth-of-type(-n+3){
  min-height:94px;
  padding:1rem!important;
  border:1px solid var(--bs-border-color);
  border-radius:.75rem;
  background:var(--bs-tertiary-bg);
}
form[action$="/settings/policy/hardening"]>div:nth-of-type(1),
form[action$="/settings/policy/hardening"]>div:nth-of-type(3){
  display:flex;
  align-items:center;
}
form[action$="/settings/policy/hardening"]>div:nth-of-type(1) .form-check,
form[action$="/settings/policy/hardening"]>div:nth-of-type(3) .form-check{
  margin:0;
}
form[action$="/settings/policy/hardening"]>div:nth-of-type(3) .form-check{
  margin-top:0!important;
  padding-top:0!important;
}
form[action$="/settings/policy/hardening"]>div:nth-of-type(2){
  display:flex;
  flex-direction:column;
  justify-content:center;
}
form[action$="/settings/policy/hardening"]>div:nth-of-type(2) .form-label{
  margin-bottom:.45rem;
  font-weight:600;
}
form[action$="/settings/policy/hardening"]>div:nth-of-type(2) .input-group{
  width:100%;
  max-width:220px;
}
form[action$="/settings/policy/hardening"]>div:nth-of-type(4){
  grid-column:1/-1;
  display:flex;
  justify-content:flex-end;
  padding-top:1rem!important;
  border-top:1px solid var(--bs-border-color);
}
form[action$="/settings/policy/hardening"]>div:nth-of-type(4) .btn{
  min-width:220px;
}
@media(max-width:991.98px){
  form[action$="/settings/policy/hardening"]{grid-template-columns:1fr;}
  form[action$="/settings/policy/hardening"]>div:nth-of-type(4){grid-column:auto;}
}
@media(max-width:575.98px){
  form[action$="/settings/policy/hardening"]>div:nth-of-type(4) .btn{width:100%;min-width:0;}
}
