/* v228 — dopracowanie panelu właściciela desktop/mobile */
body.theme-owner{
  --owner-sidebar-width:280px;
}
body.theme-owner .main{
  min-height:100vh;
  min-width:0!important;
}
body.theme-owner .sidebar-toggle{
  border-radius:16px!important;
  background:#1f2937!important;
  color:#fff!important;
  border:0!important;
  font-weight:950!important;
  width:48px!important;
  height:48px!important;
  padding:0!important;
  display:none;
  align-items:center;
  justify-content:center;
  box-shadow:0 14px 28px rgba(31, 41, 55,.22)!important;
}
body.theme-owner .owner-portal-v219{
  width:100%;
  max-width:1580px;
  min-width:0;
}
body.theme-owner .owner-topbar-v219{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(251,253,255,.92);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(238, 242, 247,.9);
  margin:-20px -4px 22px;
  padding:14px 4px 16px;
}
body.theme-owner .owner-title-row-v219,
body.theme-owner .owner-title-v219{
  min-width:0;
}
body.theme-owner .owner-title-v219 h1{
  overflow-wrap:anywhere;
}
body.theme-owner .owner-kpi-v219,
body.theme-owner .owner-card-v219,
body.theme-owner .owner-row-v219,
body.theme-owner .owner-table-wrap-v219,
body.theme-owner .owner-filterbar-v219{
  min-width:0;
}
body.theme-owner .owner-kpi-grid-v219{
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
}
body.theme-owner .owner-kpi-grid-v219.cols-3{
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
}
body.theme-owner .owner-grid-v219,
body.theme-owner .owner-grid-v219.two-one,
body.theme-owner .owner-grid-v219.one-two{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
body.theme-owner .owner-grid-v219.two-one{grid-template-columns:minmax(0,1.35fr) minmax(360px,.85fr)}
body.theme-owner .owner-grid-v219.one-two{grid-template-columns:minmax(360px,.9fr) minmax(0,1.3fr)}
body.theme-owner .owner-row-v219{
  grid-template-columns:auto minmax(0,1fr) auto auto;
}
body.theme-owner .owner-row-main-v219,
body.theme-owner .owner-row-main-v219 strong,
body.theme-owner .owner-row-main-v219 span{
  min-width:0;
  overflow-wrap:anywhere;
}
body.theme-owner .owner-actions-v219 .owner-btn-v219{
  min-height:38px;
}
body.theme-owner .owner-table-wrap-v219{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
body.theme-owner .owner-table-v219{
  min-width:820px;
}
body.theme-owner .owner-filterbar-v219>div{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
body.theme-owner .owner-field-v219{
  max-width:100%;
}
body.theme-owner .owner-vote-options-v219{
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
}
body.theme-owner .owner-event-v219{
  grid-template-columns:minmax(110px,140px) minmax(0,1fr) auto;
}
body.theme-owner .owner-doc-preview-v219,
body.theme-owner .owner-pref-row-v226{
  min-width:0;
}
body.theme-owner .owner-preview-banner-v219{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}
body.theme-owner .owner-preview-banner-v219 .owner-btn-v219{
  margin-left:0;
}

@media (min-width:1600px){
  body.theme-owner .owner-kpi-grid-v219{grid-template-columns:repeat(4,minmax(0,1fr));}
}

@media (max-width:1320px){
  body.theme-owner .owner-grid-v219,
  body.theme-owner .owner-grid-v219.two-one,
  body.theme-owner .owner-grid-v219.one-two{
    grid-template-columns:1fr;
  }
  body.theme-owner .owner-card-v219 aside,
  body.theme-owner aside .owner-card-v219{
    min-width:0;
  }
}

@media (max-width:992px){
  body.theme-owner .sidebar-toggle{
    display:flex!important;
  }
  body.theme-owner .sidebar{
    transform:translateX(-110%);
    transition:transform .22s ease;
    z-index:1000!important;
    width:min(310px,86vw)!important;
    min-width:0!important;
    max-width:86vw!important;
  }
  body.theme-owner.sidebar-open .sidebar,
  body.sidebar-open.theme-owner .sidebar{
    transform:translateX(0);
  }
  body.theme-owner .sidebar-backdrop{
    z-index:999!important;
  }
  body.theme-owner.sidebar-open .sidebar-backdrop,
  body.sidebar-open.theme-owner .sidebar-backdrop{
    opacity:1;
    pointer-events:auto;
  }
  body.theme-owner .main{
    margin-left:0!important;
    width:100vw!important;
    max-width:100vw!important;
    padding:72px 16px 28px!important;
    overflow-x:hidden!important;
  }
  body.theme-owner .owner-topbar-v219{
    margin:-72px -16px 18px;
    padding:12px 16px 14px 76px;
    min-height:64px;
    flex-direction:row;
    align-items:center;
  }
  body.theme-owner .owner-search-v219{
    height:44px;
    border-radius:15px;
    flex:1 1 auto;
    min-width:0;
    width:auto;
  }
  body.theme-owner .owner-user-v219{
    flex:0 0 auto;
    gap:8px;
  }
  body.theme-owner .owner-name-v219{
    display:none;
  }
  body.theme-owner .owner-avatar-v219{
    width:38px;
    height:38px;
  }
  body.theme-owner .owner-bell-v219{
    font-size:20px;
  }
  body.theme-owner .owner-title-v219 h1{
    font-size:28px;
  }
  body.theme-owner .owner-title-v219 p{
    font-size:14px;
  }
  body.theme-owner .owner-kpi-grid-v219,
  body.theme-owner .owner-kpi-grid-v219.cols-3{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }
  body.theme-owner .owner-kpi-v219{
    min-height:82px;
    padding:14px;
    gap:12px;
    border-radius:16px;
  }
  body.theme-owner .owner-kpi-icon-v219{
    width:46px;
    height:46px;
    border-radius:14px;
    font-size:23px;
  }
  body.theme-owner .owner-kpi-v219 strong{
    font-size:24px;
  }
  body.theme-owner .owner-card-v219{
    border-radius:16px;
    padding:15px;
  }
  body.theme-owner .owner-card-head-v219 h2{
    font-size:17px;
  }
  body.theme-owner .owner-row-v219{
    grid-template-columns:auto minmax(0,1fr);
    gap:10px;
    padding:11px;
  }
  body.theme-owner .owner-row-v219 > .owner-actions-v219,
  body.theme-owner .owner-row-v219 > .owner-btn-v219,
  body.theme-owner .owner-row-v219 > .owner-muted-v219,
  body.theme-owner .owner-row-v219 > .owner-badge-v219,
  body.theme-owner .owner-row-v219 > .owner-progress-v219{
    grid-column:2 / -1;
    justify-self:start;
  }
  body.theme-owner .owner-actions-v219{
    width:100%;
  }
  body.theme-owner .owner-actions-v219 .owner-btn-v219{
    flex:1 1 140px;
  }
  body.theme-owner .owner-filterbar-v219{
    align-items:stretch;
  }
  body.theme-owner .owner-filterbar-v219>div,
  body.theme-owner .owner-filterbar-v219 .owner-tabs-v219{
    width:100%;
  }
  body.theme-owner .owner-field-v219{
    flex:1 1 220px;
    min-width:0;
  }
  body.theme-owner .owner-tabs-v219{
    overflow-x:auto;
    flex-wrap:nowrap;
    padding-bottom:3px;
  }
  body.theme-owner .owner-tab-v219{
    white-space:nowrap;
  }
}

@media (max-width:640px){
  body.theme-owner .main{
    padding:70px 12px 24px!important;
  }
  body.theme-owner .owner-topbar-v219{
    margin:-70px -12px 16px;
    padding:10px 12px 12px 66px;
  }
  body.theme-owner .owner-search-v219 span{
    max-width:130px;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
  }
  body.theme-owner .owner-breadcrumb-v219{
    font-size:12px;
    overflow:auto;
    white-space:nowrap;
  }
  body.theme-owner .owner-title-row-v219{
    margin-bottom:12px;
  }
  body.theme-owner .owner-title-v219 h1{
    font-size:25px;
  }
  body.theme-owner .owner-kpi-grid-v219,
  body.theme-owner .owner-kpi-grid-v219.cols-3{
    grid-template-columns:1fr;
  }
  body.theme-owner .owner-kpi-v219{
    min-height:76px;
  }
  body.theme-owner .owner-kpi-v219 .chev{
    font-size:20px;
  }
  body.theme-owner .owner-info-v219{
    align-items:flex-start;
    padding:11px 12px;
    font-size:13px;
  }
  body.theme-owner .owner-grid-v219,
  body.theme-owner .owner-grid-v219.two-one,
  body.theme-owner .owner-grid-v219.one-two{
    gap:12px;
    margin-top:12px;
  }
  body.theme-owner .owner-table-wrap-v219{
    border-radius:14px;
  }
  body.theme-owner .owner-table-v219{
    min-width:680px;
  }
  body.theme-owner .owner-vote-options-v219{
    grid-template-columns:1fr;
  }
  body.theme-owner .owner-vote-choice-v219{
    padding:12px;
  }
  body.theme-owner .owner-event-v219{
    grid-template-columns:1fr;
    gap:4px;
    padding:11px 0 11px 12px;
  }
  body.theme-owner .owner-event-v219:before{
    left:-5px;
  }
  body.theme-owner .owner-doc-preview-v219{
    flex-direction:column;
    align-items:flex-start;
  }
  body.theme-owner .owner-doc-thumb-v219{
    width:100%;
  }
  body.theme-owner .owner-pagination-v219{
    flex-direction:column;
    align-items:flex-start;
  }
  body.theme-owner .owner-pages-v219{
    width:100%;
    overflow-x:auto;
  }
  body.theme-owner .owner-form-grid-v219{
    grid-template-columns:1fr!important;
  }
  body.theme-owner .owner-full{
    grid-column:auto!important;
  }
  body.theme-owner .owner-pref-row-v226{
    grid-template-columns:1fr auto;
  }
  body.theme-owner .owner-pref-row-v226 .owner-row-icon-v219{
    display:none;
  }
  body.theme-owner .owner-btn-v219{
    min-height:42px;
  }
}

@media (max-width:420px){
  body.theme-owner .owner-search-v219{
    padding:0 12px;
  }
  body.theme-owner .owner-search-v219 span{
    max-width:92px;
  }
  body.theme-owner .owner-avatar-v219{
    width:34px;
    height:34px;
  }
  body.theme-owner .owner-bell-v219 span{
    width:18px;
    height:18px;
    font-size:10px;
  }
  body.theme-owner .owner-kpi-v219 strong{
    font-size:22px;
  }
  body.theme-owner .owner-card-v219{
    padding:13px;
  }
}

/* v249 — mobile polish for owner portal */
body.theme-owner .owner-property-name-v249,
body.theme-owner .owner-community-name-v249,
body.theme-owner .owner-row-main-v219 strong,
body.theme-owner .owner-row-main-v219 span,
body.theme-owner .owner-card-v219,
body.theme-owner .owner-kpi-v219,
body.theme-owner .owner-table-v219 td,
body.theme-owner .owner-table-v219 th{overflow-wrap:anywhere;word-break:normal;min-width:0}
@media(max-width:720px){
  body.theme-owner .main{padding-left:12px!important;padding-right:12px!important;width:100%!important;max-width:100%!important;overflow-x:hidden!important}
  body.theme-owner .owner-portal-v219{max-width:100%;overflow-x:hidden}
  body.theme-owner .owner-topbar-v219{margin-left:-12px;margin-right:-12px;padding-left:68px;padding-right:12px}
  body.theme-owner .owner-kpi-grid-v219,
  body.theme-owner .owner-kpi-grid-v219.cols-3{grid-template-columns:1fr!important;gap:10px!important}
  body.theme-owner .owner-kpi-v219{padding:12px!important;min-height:70px!important;gap:10px!important}
  body.theme-owner .owner-kpi-icon-v219{width:40px!important;height:40px!important;font-size:20px!important}
  body.theme-owner .owner-kpi-v219 strong{font-size:21px!important;line-height:1.1!important}
  body.theme-owner .owner-grid-v219,
  body.theme-owner .owner-grid-v219.two-one,
  body.theme-owner .owner-grid-v219.one-two{grid-template-columns:1fr!important;gap:12px!important}
  body.theme-owner .owner-row-v219{display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;gap:9px!important;padding:10px!important;max-width:100%;overflow:hidden}
  body.theme-owner .owner-row-icon-v219,
  body.theme-owner .owner-file-icon-v219{width:38px!important;height:38px!important;font-size:18px!important}
  body.theme-owner .owner-row-v219 .owner-progress-v219,
  body.theme-owner .owner-row-v219 .owner-actions-v219,
  body.theme-owner .owner-row-v219 .owner-btn-v219,
  body.theme-owner .owner-row-v219 .owner-badge-v219{grid-column:2!important;max-width:100%}
  body.theme-owner .owner-progress-v219{width:100%!important;min-width:0!important;margin-top:6px}
  body.theme-owner .owner-actions-v219{display:grid!important;grid-template-columns:1fr!important;width:100%!important;gap:8px!important}
  body.theme-owner .owner-actions-v219 .owner-btn-v219{width:100%;min-width:0;white-space:normal;text-align:center}
  body.theme-owner .owner-card-v219{padding:12px!important;border-radius:15px!important;max-width:100%;overflow:hidden}
  body.theme-owner .owner-card-head-v219{align-items:flex-start;gap:8px;flex-wrap:wrap}
  body.theme-owner .owner-card-head-v219 h2{font-size:16px!important;line-height:1.25!important}
  body.theme-owner .owner-title-v219 h1{font-size:25px!important;overflow-wrap:anywhere}
  body.theme-owner .owner-title-v219 p{font-size:13px!important;overflow-wrap:anywhere}
  body.theme-owner .owner-table-wrap-v219{overflow-x:auto;max-width:100%;border-radius:14px}
  body.theme-owner .owner-table-v219{min-width:0!important;width:100%!important}
  body.theme-owner .owner-table-v219 thead{display:none}
  body.theme-owner .owner-table-v219 tr{display:block;border-bottom:1px solid #edf2f8;padding:8px 0}
  body.theme-owner .owner-table-v219 td{display:grid;grid-template-columns:110px minmax(0,1fr);gap:8px;border:0!important;padding:6px 8px!important;font-size:13px!important;overflow-wrap:anywhere}
  body.theme-owner .owner-table-v219 td:before{content:attr(data-label);font-weight:900;color:#64748b;text-transform:none;font-size:12px}
  body.theme-owner .owner-vote-options-v219{grid-template-columns:1fr!important}
  body.theme-owner .owner-filterbar-v219{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  body.theme-owner .owner-field-v219{width:100%!important;min-width:0!important}
  body.theme-owner .owner-form-grid-v219{grid-template-columns:1fr!important}
  body.theme-owner .owner-event-v219{grid-template-columns:1fr!important;gap:4px!important;padding-left:8px}
}

/* v251 — owner mobile final polish */
@media(max-width:720px){
  body.theme-owner .owner-portal-v219 .owner-card-v219,
  body.theme-owner .owner-portal-v219 .owner-row-v219,
  body.theme-owner .owner-portal-v219 .owner-kpi-v219{width:100%;max-width:100%;}

  /* Mój panel: lokal + udział + status w jednej czytelnej karcie */
  body.theme-owner .owner-portal-v219 .owner-card-v219:has(.owner-row-main-v219) .owner-row-v219{
    grid-template-columns:40px minmax(0,1fr) auto!important;
    align-items:center!important;
  }
  body.theme-owner .owner-portal-v219 .owner-row-v219 > .owner-badge-v219,
  body.theme-owner .owner-portal-v219 .owner-row-v219 > .owner-muted-v219{
    grid-column:3!important;
    justify-self:end!important;
    white-space:nowrap!important;
  }
  body.theme-owner .owner-portal-v219 .owner-row-main-v219 strong,
  body.theme-owner .owner-portal-v219 .owner-row-main-v219 span{
    display:block;
    max-width:100%;
    overflow-wrap:break-word!important;
    word-break:normal!important;
  }

  /* Uchwały wymagające działania: tytuł pełną szerokością, postęp nad przyciskiem */
  body.theme-owner .owner-portal-v219 .owner-row-v219:has(.owner-progress-v219){
    grid-template-columns:40px minmax(0,1fr)!important;
    align-items:start!important;
  }
  body.theme-owner .owner-portal-v219 .owner-row-v219:has(.owner-progress-v219) .owner-row-main-v219{grid-column:2!important;width:100%;}
  body.theme-owner .owner-portal-v219 .owner-row-v219:has(.owner-progress-v219) .owner-progress-v219{
    grid-column:2!important;
    width:100%!important;
    max-width:100%!important;
    margin:8px 0 0!important;
  }
  body.theme-owner .owner-portal-v219 .owner-row-v219:has(.owner-progress-v219) .owner-actions-v219,
  body.theme-owner .owner-portal-v219 .owner-row-v219:has(.owner-progress-v219) .owner-btn-v219{
    grid-column:2!important;
    width:100%!important;
    margin-top:8px!important;
  }
  body.theme-owner .owner-portal-v219 .owner-progress-v219 span,
  body.theme-owner .owner-portal-v219 .owner-progress-v219 strong{white-space:nowrap!important;}

  /* Moje uchwały / wyniki: nie zwijaj w wąski pasek z lewej */
  body.theme-owner .owner-portal-v219 .owner-row-v219[style]{
    grid-template-columns:40px minmax(0,1fr)!important;
  }
  body.theme-owner .owner-portal-v219 .owner-row-v219[style] > *{
    max-width:100%;
  }
  body.theme-owner .owner-portal-v219 .owner-row-v219[style] > .owner-actions-v219,
  body.theme-owner .owner-portal-v219 .owner-row-v219[style] > .owner-btn-v219,
  body.theme-owner .owner-portal-v219 .owner-row-v219[style] > .owner-progress-v219,
  body.theme-owner .owner-portal-v219 .owner-row-v219[style] > .owner-badge-v219,
  body.theme-owner .owner-portal-v219 .owner-row-v219[style] > .owner-muted-v219{
    grid-column:2!important;
    justify-self:stretch!important;
  }

  /* Profil konta: wszystkie formularze i panele mieszczą się w ekranie */
  body.theme-owner .owner-portal-v219 .owner-form-grid-v219,
  body.theme-owner .owner-portal-v219 .owner-form-grid-v219 *{min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
  body.theme-owner .owner-portal-v219 input,
  body.theme-owner .owner-portal-v219 select,
  body.theme-owner .owner-portal-v219 textarea{
    width:100%!important;
    max-width:100%!important;
  }
  body.theme-owner .owner-portal-v219 .owner-grid-v219 > *,
  body.theme-owner .owner-portal-v219 aside,
  body.theme-owner .owner-portal-v219 section{
    min-width:0!important;
    max-width:100%!important;
  }
  body.theme-owner .owner-portal-v219 .owner-actions-v219{grid-template-columns:1fr!important;display:grid!important;}
}

@media(max-width:430px){
  body.theme-owner .owner-portal-v219 .owner-row-v219{padding:9px!important;gap:8px!important;}
  body.theme-owner .owner-portal-v219 .owner-row-icon-v219{width:34px!important;height:34px!important;}
  body.theme-owner .owner-portal-v219 .owner-badge-v219{font-size:11px!important;padding:5px 8px!important;}
  body.theme-owner .owner-portal-v219 .owner-card-v219{padding:11px!important;}
}

/* v257 — mobile: wyniki głosowań nie są wąskim paskiem z lewej */
@media(max-width:760px){
  body.theme-owner .owner-portal-v219 .owner-result-row-v257{display:grid!important;grid-template-columns:1fr!important;width:100%!important;padding:14px!important;gap:12px!important;}
  body.theme-owner .owner-portal-v219 .owner-result-row-v257>*{grid-column:1!important;width:100%!important;max-width:100%!important;justify-self:stretch!important;}
  body.theme-owner .owner-portal-v219 .owner-result-row-v257 .owner-row-icon-v219{display:none!important;}
  body.theme-owner .owner-portal-v219 .owner-result-actions-v257{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;min-width:0!important;width:100%!important;white-space:normal!important;}
  body.theme-owner .owner-portal-v219 .owner-result-actions-v257 .owner-btn-v219{width:100%!important;min-width:0!important;padding-left:10px!important;padding-right:10px!important;white-space:nowrap!important;}
  body.theme-owner .owner-portal-v219 .owner-result-stats-v257{grid-template-columns:1fr 1fr!important;gap:10px!important;}
  body.theme-owner .owner-portal-v219 .owner-result-stats-v257>div{background:#fff;border:1px solid #eef2f7;border-radius:14px;padding:10px;}
  body.theme-owner .owner-portal-v219 .owner-result-bar-clean-v257{min-width:0!important;}
}
@media(max-width:430px){body.theme-owner .owner-portal-v219 .owner-result-actions-v257{grid-template-columns:1fr!important;}}
