:root{font-family:system-ui,sans-serif;color:#172033;background:#f4f6f9}body{margin:0}header{background:#173b66;color:#fff;padding:1rem;display:flex;gap:1rem;align-items:center;flex-wrap:wrap}header nav{display:flex;gap:1rem;flex:1}a{color:#145a9c}header a{color:#fff}main{max-width:1050px;margin:2rem auto;padding:0 1rem}.card{background:#fff;padding:1.25rem;margin:1rem 0;border-radius:.6rem;box-shadow:0 2px 12px #0001}.narrow{max-width:420px;margin:8vh auto}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem}label{display:block;margin:.7rem 0}input,textarea,button{font:inherit;padding:.65rem;border:1px solid #aab4c3;border-radius:.35rem;box-sizing:border-box}input,textarea{width:100%}textarea{min-height:8rem}button,.button{background:#1769aa;color:#fff;border:0;padding:.7rem 1rem;text-decoration:none;border-radius:.35rem;cursor:pointer}.choice input{width:auto}.flash{background:#fff4c2;padding:1rem;border-left:5px solid #d9a400}.table{overflow:auto}table{width:100%;border-collapse:collapse;background:#fff}th,td{padding:.7rem;border:1px solid #dce2e9;text-align:left}footer{text-align:center;padding:2rem;color:#647080}@media print{header,footer,.button{display:none}.card{box-shadow:none}}
/* Přesné rozestupy formulářů */
.category-filter{display:flex;align-items:center;gap:1.5rem;margin:1rem 0}
.category-filter span{min-width:90px;font-weight:600}
.category-filter select{flex:1;width:auto;min-width:220px}
.card form+form{margin-top:1.25rem}
.card form+details,.card details{margin-top:1.25rem}
.card details form{margin-top:1rem}
.card button{margin-top:.65rem}
@media(max-width:600px){.category-filter{align-items:flex-start;flex-direction:column;gap:.45rem}.category-filter select{width:100%;min-width:0}}
/* Rozbalovací karty administrace */
.collapsible-card{padding:0;overflow:hidden}
.collapsible-card>summary{display:block;cursor:pointer;padding:1rem 1.25rem;list-style:none;position:relative;padding-right:3rem}
.collapsible-card>summary::-webkit-details-marker{display:none}
.collapsible-card>summary::after{content:'+';position:absolute;right:1.25rem;top:50%;transform:translateY(-50%);font-size:1.5rem;color:#1769aa}
.collapsible-card[open]>summary::after{content:'−'}
.collapsible-card>summary span{display:block;margin-top:.35rem;font-size:.92rem;font-weight:400;color:#4d5968}
.collapsible-content{border-top:1px solid #dce2e9;padding:1.25rem}

/* Bezpečná responzivní vrstva pro mobilní zařízení */
html{-webkit-text-size-adjust:100%;overflow-x:hidden}
body{min-width:0;overflow-wrap:anywhere}
img,svg,video,canvas{max-width:100%;height:auto}
input,textarea,select,button{max-width:100%}
.table{-webkit-overflow-scrolling:touch;overflow-x:auto;max-width:100%}
.table table{min-width:680px}
th,td{overflow-wrap:normal;word-break:normal}
.card,.collapsible-content{min-width:0}
.card h1,.card h2,.card h3,.collapsible-card summary{overflow-wrap:anywhere}
form.inline{display:inline-block}
details summary{touch-action:manipulation}

@media(max-width:768px){
 header{display:block;padding:.85rem 1rem}
 header nav{display:flex;flex-wrap:wrap;gap:.4rem .55rem;margin-top:.75rem}
 header nav a{display:inline-flex;align-items:center;min-height:40px;padding:.2rem .45rem;border-radius:.3rem;background:#ffffff12;text-decoration:none}
 header form{margin-top:.75rem}
 header button{width:100%;min-height:44px;margin:0}
 main{width:auto;max-width:none;margin:1rem auto;padding:0 .75rem}
 footer{padding:1.25rem .75rem}
 .narrow{max-width:none;margin:1.25rem auto}
 .grid{grid-template-columns:minmax(0,1fr);gap:.75rem}
 .card{padding:1rem;margin:.75rem 0;border-radius:.5rem}
 .collapsible-card{padding:0}
 .collapsible-card>summary{padding:1rem 2.75rem 1rem 1rem}
 .collapsible-card>summary::after{right:1rem}
 .collapsible-content{padding:1rem}
 input,textarea,select,button,.button{font-size:16px}
 input,textarea,select{min-height:44px}
 textarea{min-height:130px}
 button,.button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;line-height:1.25;text-align:center}
 .card button,.card .button{margin-right:.35rem;margin-bottom:.35rem}
 form.inline{display:block}
 form.inline button{width:100%}
 .flash{margin:.75rem 0;padding:.85rem}
 .category-filter{align-items:stretch;flex-direction:column;gap:.45rem}
 .category-filter span{min-width:0}
 .category-filter select{width:100%;min-width:0}
 .table{margin-left:-.25rem;margin-right:-.25rem;padding-bottom:.35rem}
 .table::after{content:'Tabulku lze posunout do stran.';display:block;padding:.45rem .25rem 0;color:#647080;font-size:.82rem}
 .choice{display:flex;align-items:flex-start;gap:.6rem;min-height:44px;padding:.55rem 0}
 .choice input{flex:0 0 auto;width:22px;height:22px;margin:.05rem 0 0}
}

@media(max-width:420px){
 header nav a{flex:1 1 calc(50% - .55rem);justify-content:center;text-align:center}
 main{padding:0 .55rem}
 .card{padding:.85rem}
 .collapsible-card{padding:0}
 .collapsible-content{padding:.85rem}
 h1{font-size:1.55rem}
 h2{font-size:1.25rem}
 h3{font-size:1.08rem}
 .card button,.card .button{width:100%;margin-right:0}
}

@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}


/* Mobilní rozložení údajů vlastníka a dokumentů */
.owner-data-row,.document-meta p{margin:.55rem 0}
.document-filename{overflow-wrap:anywhere;word-break:break-word;hyphens:auto;max-width:100%}
.document-meta,.document-meta p,.document-meta span{min-width:0;max-width:100%}
@media(max-width:768px){
 .owner-data-row{display:flex;flex-direction:column;align-items:flex-start;gap:.18rem}
 .document-meta p{display:flex;flex-direction:column;align-items:flex-start;gap:.18rem}
 .document-filename{display:block;width:100%;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
 article.card h2,article.card h2 a{max-width:100%;overflow-wrap:anywhere;word-break:break-word}
}


/* Oprava dlouhých názvů souborů na mobilu */
.document-meta-row{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:start;column-gap:.4rem}
.document-meta-row>strong{white-space:nowrap}
.document-meta-row>span{min-width:0}
.document-filename{display:block;max-width:100%;white-space:normal;overflow-wrap:anywhere;word-break:break-all}
@media(max-width:768px){
 .document-meta p.document-meta-row{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:start;gap:0 .4rem}
 .document-file-row .document-filename{width:auto;min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-all}
}

/* Cílena oprava akcí v Dokumentech a Archivu */
.mobile-actions,.archive-actions{display:flex;flex-wrap:wrap;gap:.55rem;align-items:stretch}
.mobile-actions>* ,.archive-actions>*{box-sizing:border-box;min-width:0;max-width:100%;margin:0!important}
@media screen and (max-width:768px){
 .mobile-actions,.archive-actions{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;max-width:100%!important;gap:.55rem!important}
 .mobile-actions>button,.mobile-actions>a.button,.archive-actions>a.button{display:flex!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:.7rem .65rem!important;box-sizing:border-box!important;justify-content:center!important;text-align:center!important;white-space:normal!important}
 input[type="file"]{display:block;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;overflow:hidden}
}


/* Dokumenty: pouze tlačítko Stáhnout soubor */
.document-download-row{max-width:100%;min-width:0;box-sizing:border-box}
@media screen and (max-width:768px){
 .card .document-download-row{width:100%;max-width:100%;min-width:0;margin:1rem 0 .25rem;padding:0;box-sizing:border-box}
 .card .document-download-button{display:block;width:calc(100% - 2px);max-width:calc(100% - 2px);min-width:0;margin:0;padding:.7rem .65rem;box-sizing:border-box;text-align:center;white-space:normal;overflow-wrap:anywhere}
}

/* Archiv a Sprava hlasovani: kompaktni datumova pole */
input[type="date"],input[type="datetime-local"]{
 display:block!important;
 width:260px!important;
 max-width:100%!important;
 min-width:0!important;
 box-sizing:border-box!important;
}

/* Mobilni oprava tlacitka Hlasovat v2 2026-08 */
@media screen and (max-width:768px){
 main .card .button,main .card a.button{
  display:block!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
  text-align:center!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
 }
}

/* Presna oprava tlacitka Hlasovat 2026-08-22 */
.vote-action-row{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.vote-action-row .vote-action{display:block;width:100%;max-width:100%;min-width:0;margin:0;box-sizing:border-box;text-align:center;white-space:normal;overflow-wrap:anywhere}
@media screen and (max-width:768px){
 .vote-action-row{padding:0;margin-top:1rem}
 .vote-action-row .vote-action{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:.7rem .65rem!important;box-sizing:border-box!important}
}

/* Mobilni zarovnani volebnich moznosti 2026-08-22 */
@media screen and (max-width:768px){
 label.choice{display:flex!important;align-items:center!important;gap:.75rem!important;min-height:38px!important;margin:.15rem 0!important;padding:.25rem 0!important;line-height:1.25!important}
 label.choice input[type="radio"]{flex:0 0 22px!important;width:22px!important;height:22px!important;min-height:0!important;margin:0!important;padding:0!important;align-self:center!important}
}