/* === Paleta + layout proměnné === */
:root{
  --bg:#F7F7F4; --surface:#FFFFFF; --text:#1F2937; --text-strong:#111111;
  --muted:#475569; --line:#f6f7fa;
  --brand:#E67817; --brand-600:#D1640C; --brand-100:#FFF1DE;
  --accent:#14833B; --accent-600:#0F6B2E; --accent-100:#E9F7EE;
  --amber:#080704; --amber-100:#FFF7D6; --amber-200:#FFE9A6;
  --danger:#D92D20; --danger-100:#FFE5E1; --line-200:#a0a2a9;

  --page-pad:18px;   /* vnitřní odsazení stránky */
  --filter-w:0px;    /* šířka pravého panelu (0 = žádný sloupec) */
  --gap:12px;        /* mezera mezi obsahem a filtrem */

  /* === Brand parametry (NOVÉ) === */
  --brand-logo: 40px;        /* velikost loga (šířka i výška) */
  --brand-font-size: 20px;   /* velikost textu vedle loga */
  --brand-font-weight: 900;  /* tloušťka písma brandu */

  --btn-font-size: 12px;     /* uprav dle chuti */
  --btn-font-weight: 800;    /* 700–900 = tučnější */

  color-scheme: light;
}

/* === Základ === */
html, body{ background:var(--bg) !important; color:var(--text) !important; }
*, *::before, *::after{ box-sizing:border-box; }

/* === Full-width kontejnery === */
#container, .container, .content, .wrapper, .main, .inner,
#content, #content-main, .colM{
  max-width:none !important; width:100% !important; margin:0 !important; float:none !important;
}
#content{ padding-left:var(--page-pad) !important; padding-right:var(--page-pad) !important; }
div.breadcrumbs{ padding-left:var(--page-pad) !important; padding-right:var(--page-pad) !important; }

/* === CHANGELIST: obsah + případný filtr === */
body.change-list #content{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) var(--filter-w) !important;
  gap:var(--gap) !important;
  align-items:start !important;
}
#content > #content-main{ grid-column:1 !important; min-width:0 !important; }
#changelist, .change-list, #changelist-form, .module, .results, table{ width:100% !important; }
#content > #changelist-filter, #content > .filters{
  grid-column:2 !important;
  width:100% !important; max-width:var(--filter-w) !important;
  float:none !important; position:sticky !important; top:96px !important; align-self:start !important;
}
@media (max-width:1100px){
  body.change-list #content{ grid-template-columns:1fr !important; }
  #content > #changelist-filter, #content > .filters{ grid-column:1 !important; position:static !important; max-width:100% !important; }
}

/* odkazy v obsahu */
#content a, #content-main a, .module a, .results a, table a{
  color:var(--text-strong) !important; text-decoration:underline;
}
#content a:hover, #content-main a:hover, .module a:hover, .results a:hover, table a:hover{ text-decoration:none; }

/* kill dark-mode přepínače */
.theme-toggle, .dark-mode-toggle, [class*="theme-toggle"],
[aria-label*="Dark"], [aria-label*="Světl"], a[href*="theme="]{ display:none !important; }
@media (prefers-color-scheme: dark){
  :root, html, body, #header, #content{ background:var(--bg) !important; color:var(--text) !important; }
}

/* =================================================================== */
/* =========================== HLAVIČKA ============================== */
/* =================================================================== */

#header{
  position:relative;                          /* ukotvení pro utility odkazy */
  background:var(--surface) !important;
  border-bottom:3px solid var(--brand) !important;
  color:var(--text) !important;
  overflow:visible !important;
}


/* === Brand: velikost loga + text v jedné rovině (NOVÉ) === */
#branding .brand{
  display:flex;
  align-items:center;      /* zarovnání loga a textu */
  gap:10px;
  text-decoration:none;
}
#branding .brand .brand-logo{
  width:var(--brand-logo);
  height:var(--brand-logo);
  display:block;
  object-fit:contain;
}
#branding .brand .brand-title{
  font-size:var(--brand-font-size);
  font-weight:var(--brand-font-weight);
  line-height:1;
  letter-spacing:.2px;
  margin:0;
  color:var(--text);
}
@media (max-width:640px){
  :root{
    --brand-logo:28px;
    --brand-font-size:20px;
  }
}

/* TOP NAV: menu vlevo; prostor vpravo pro utility odkazy */
.ts-topnav, .topnav{
  position:relative;
  background:var(--surface) !important;
  display:flex; align-items:center; gap:2px;
  justify-content:flex-start !important;
  padding:0 var(--page-pad) !important;
  padding-right:calc(var(--page-pad) + 890px) !important; /* rezerva vpravo */
  overflow-x:auto !important; overflow-y:visible !important;
  flex-wrap:nowrap !important;      /* posun při nedostatku místa */
  scrollbar-width:thin;
}
.ts-topnav a, .topnav a{
  flex:0 0 auto;                       /* nepřetékají, drží šířku */
  white-space:nowrap;
  color:var(--text) !important;
  font-weight:900;
  padding:.75rem 1rem;
  border-radius:100px;
  border:1px solid transparent;
  position:relative;
  text-decoration:none !important;
  transition:background .15s ease, border-color .15s ease, box-shadow .15s ease;
  font-size:13px;                      /* jednotná velikost záložek */
}

.ts-topnav a:hover, .topnav a:hover{ background:var(--brand-100); border-color:var(--brand-100); }
.ts-topnav a.is-active, .topnav a.active{
  background:#E67817; border:1px solid var(--brand);
  box-shadow:inset 0 -3px 0 var(--brand);
  color:var(--text) !important;
}
.ts-topnav a:focus-visible, .topnav a:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; }

/* === Utility odkazy (ZMĚNIT HESLO / ODHlÁSIT SE) vpravo v pruhu === */
#user-tools{
  position:absolute !important;
  right:calc(var(--page-pad) - 8px) !important; /* víc vpravo k okraji */
  top:0 !important;                       /* zarovnání na horní lištu */
  height:100%;
  display:flex !important;
  align-items:center; gap:2px;             /* menší mezera mezi odkazy */
  padding:0 !important; margin:0 !important;
  background:transparent !important; border:0 !important;
  font-size:0 !important;                  /* skryje případný text „VÍTEJTE…“ */
  z-index:5;
}

/* schovej „Zobrazení webu“ – je první odkaz v #user-tools */
#user-tools a:first-of-type{ display:none !important; }

#user-tools a,
#user-tools a.button,
#user-tools button,
#user-tools input[type=submit]{
  font-size:13px !important;          /* menší než záložky */
  color:var(--text) !important;          /* černé, dobře čitelné */
  font-weight:900;
  text-decoration:none !important;
  padding:.55rem .75rem;                 /* menší vnitřní okraje */
  border-radius:100px;
  border:1px solid transparent;          /* kvůli hover efektu jako u menu */
  background:transparent !important;     /* ať nevypadá jako tlačítko */
  white-space:nowrap;
}
/* HOVER: pouze tlačítka zčervenají (přepiš tvůj původní HOVER blok tímto) */
#user-tools button:hover,
#user-tools input[type=submit]:hover,
#user-tools a.button:hover{
background: red !important;
border-color: red !important;
/* případně i text:
color: white !important;
*/
}

/* FOCUS (klávesnice) – můžeš nechat jak máš */
#user-tools a:focus-visible,
#user-tools button:focus-visible,
#user-tools input[type=submit]:focus-visible{
outline: 2px solid red;
outline-offset: 2px;
}

/* drobečky */
div.breadcrumbs{
  background:var(--surface) !important; border-bottom:1px solid var(--line) !important; color:var(--muted) !important;
}
div.breadcrumbs a{
  color:var(--text) !important; text-decoration:none !important;
  border-radius:6px; padding:2px 4px;
}
div.breadcrumbs a:hover{ background:var(--amber-100); }




/* =================================================================== */
/* ========================  OBSAH / BOXY  =========================== */
/* =================================================================== */

#nav-sidebar, .toggle-nav-sidebar, #content-related, .colMS{ display:none !important; }

#changelist-filter, .filters{
  background:var(--surface) !important; border:0px solid var(--line) !important; border-radius:10px !important; color:var(--text) !important;
}
#changelist-filter h2, #changelist-filter a, #changelist-filter li,
#changelist-filter .filter-title, #changelist-filter .filter{ color:var(--text) !important; }
#changelist-filter a:hover{ text-decoration:none; }

/* boxy */
.module, .panel, .card, .submit-row{
  background:var(--surface) !important; border:10px solid var(--line) !important; border-radius:30px !important; box-shadow:0 1px 2px rgba(0,0,0,.03);
}
.module caption, .grp-module h2, .module h2{
  background:var(--amber-100) !important; color:var(--text) !important; border-bottom:0px solid var(--line) !important;
}

/* payment box */
.payments-card {
  background:var(--surface) !important; border:10px solid var(--surface) !important; border-radius:0px !important;
}

/* horní pásy/akce */
#changelist, .change-list{ background:transparent !important; }
.change-list #toolbar, #changelist #toolbar, #toolbar, #changelist .actions{
  background:var(--surface) !important; color:var(--text) !important; border:0px solid var(--line) !important; border-radius:30px !important;
}

/* paginator */
.paginator{ background:transparent !important; border:0 !important; box-shadow:none !important; border-radius:0 !important; padding-left:0 !important; padding-right:0 !important; }

/* tabulky */
table{ background:var(--surface) !important; border-color:var(--line) !important; width:100% !important; table-layout:auto !important; }
th, td{ color:var(--text) !important; }
thead th{ background:var(--amber-100) !important; color:var(--text) !important; border-bottom:2px solid var(--amber) !important; }
#result_list tbody tr:nth-child(odd){ background:#FFFFFF !important; }
#result_list tbody tr:nth-child(even){ background:#fefefe !important; }
#result_list tbody tr.selected, tr.row-selected{ outline:2px solid var(--accent) !important; background:var(--accent-100) !important; }

/* platby tabulka */
table.payments thead th{ background:var(--amber-200) !important; border-bottom:0px solid var(--brand) !important; }
table.payments tbody tr:nth-child(even){ background:#FFF9EC !important; }

/* formuláře */
input, select, textarea{
  background:var(--surface) !important;
  border:1px solid var(--line-200) !important;  /* tvá standardní šedá */
  color:var(--text) !important;
  border-radius:8px !important;
}
input:focus, select:focus, textarea:focus{
  outline:2px solid var(--brand) !important;
  border-color:var(--brand) !important;
  box-shadow:0 0 0 3px rgba(230,120,23,.15) !important;
}

/* --- NOVÉ: jemné oddělovače řádků a černé labely ve formulářích --- */
/* (platí pro všechny add/edit stránky; historie/ledgeru se to netýká) */
body.change-form .aligned table,
body.change-form .aligned tbody,
body.change-form .aligned tr,
body.change-form .aligned th,
body.change-form .aligned td{
  border: none !important;
  border-bottom: 1px solid #e5e7eb !important;  /* velmi jemná šedá linka */
  box-shadow: none !important;
  background: transparent !important;
}

/* některé inlines mají místo <tr> jen .form-row */
body.change-form .form-row{
  border: none !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}

/* labely (Jméno, Email, Rodina…) černě a trochu výrazněji */
body.change-form .aligned th,
body.change-form label,
body.change-form .readonly label{
  color:#000 !important;
  font-weight:600;
}

/* příjemné odsazení buněk */
body.change-form .aligned th,
body.change-form .aligned td{
  padding:10px 12px !important;
}


/* tlačítka (globálně) */
.button, input[type=submit], .submit-row input, a.button{
  background:var(--brand) !important; border:3px solid var(--brand-600) !important; color:#fff !important;
  border-radius:100px !important; padding:7px 12px !important; text-decoration:none !important;

  /* typografie přidaná */
  font-family: var(--btn-font-family) !important;
  font-size: var(--btn-font-size) !important;
  font-weight: var(--btn-font-weight) !important;
  line-height: 1 !important;
  letter-spacing: .2px;
}
.button:hover, input[type=submit]:hover, a.button:hover{ filter:brightness(1.05); }
a.button.secondary, .btn-secondary{ background:#FFFFFF !important; color:var(--text) !important; border:1px solid var(--line) !important; }
a.button.secondary:hover{ background:#F7F7F7 !important; }

/* ============================= */
/* ZAROVNÁNÍ HLEDAT + POSUN AKCÍ */
/* ============================= */

/* univerzální výška ovládacích prvků (možno změnit) */
:root{ --ctl-h: 28px; }

/* toolbar se search formulářem do jedné řádky/středu */
.change-list #toolbar, #changelist #toolbar{
  display:flex !important;
  align-items:center !important;
  gap:.5rem !important;
  flex-wrap:wrap !important;
}

/* Operace: menší text + žádné ořezávání ve selectu */
.change-list .actions label {
  font-size: 14px !important;
}

.change-list .actions select{
  font-size: 14px !important;
  line-height: 1.2 !important;
  padding: 6px 12px !important;
  height: auto !important;
  min-height: var(--ctl-h) !important;
  width: auto !important;
  max-width: 100% !important;
}


/* samotný search formulář */
#changelist-search{
  display:flex !important;
  align-items:center !important;
  gap:.5rem !important;
  margin:0 !important;
}
#changelist-search label{ margin:0 !important; }

/* input „Hledat“ – stejná výška jako tlačítko */
#changelist-search #searchbar,
#changelist-search input[type="text"]{
  padding:7px 12px !important;
  border-radius:100px !important;
  min-height:var(--ctl-h) !important;
  line-height:1 !important;
}

/* submit „Hledat“ – jistota stejné výšky */
#changelist-search input[type="submit"]{
  min-height:var(--ctl-h) !important;
}

/* blok Operace/Provést – o kousek výš nad tabulkou */
.change-list .actions{
  display:flex !important;
  align-items:center !important;
  gap:.5rem !important;
  position:relative;
  top:-6px;                               /* zvednutí (doladíš podle oka) */
  margin:0 0 10px 0 !important;           /* mezera pod akcemi */
}

/* stejné „pill“ proporce i pro select a Go */
.change-list .actions select{
  padding:7px 10px !important;
  border-radius:100px !important;
  min-height:var(--ctl-h) !important;
  line-height:1 !important;
}
.change-list .actions .button,
.change-list .actions input[type=submit]{
  min-height:var(--ctl-h) !important;
}

/* Object tools (CENÍK: PŘIDAT, HRÁČ: PŘIDAT, …) – oranžová jako Hledat */
.object-tools, .object-tools li{ background:transparent !important; border:0 !important; box-shadow:none !important; }
.object-tools a, .object-tools li a, .addlink{
  background:var(--brand) !important;
  border:5px solid var(--brand-600) !important;
  color:#fff !important;
  border-radius:100px !important;
  padding:7px 12px !important;
  text-decoration:none !important;
  display:inline-flex; align-items:center; gap:.4rem;

  /* typografie přidaná */
  font-family: var(--btn-font-family) !important;
  font-size: var(--btn-font-size) !important;
  font-weight: var(--btn-font-weight) !important;
  line-height: 1 !important;
  letter-spacing: .2px;
}
.object-tools a:hover, .object-tools li a:hover{ filter:brightness(1.05); }
.object-tools a::before, .object-tools li a::before{ filter:invert(1) brightness(2); }

/* aby i „Odstranit“ měl stejnou typografii (pokud ho používáš) */
.submit-row a.deletelink{
  font-family: var(--btn-font-family) !important;
  font-size: var(--btn-font-size) !important;
  font-weight: var(--btn-font-weight) !important;
  line-height: 1 !important;
  letter-spacing: .2px;
}

/* messages */
ul.messagelist li{ border-radius:8px; }
ul.messagelist li.success{ background:var(--accent-100) !important; color:var(--accent-600) !important; border:1px solid var(--accent) !important; }
ul.messagelist li.error{ background:var(--danger-100) !important; color:var(--danger) !important; border:1px solid var(--danger) !important; }
ul.messagelist li.warning{ background:var(--amber-100) !important; color:#6B4E00 !important; border:1px solid var(--amber) !important; }

/* úklid */
.change-list .results, .results, .module table, .payments-card,
.grp-changelist-results, .grp-module, .grp-module .module,
#changelist-form, #changelist-form .results{ background:var(--surface) !important; color:var(--text) !important; }


/* historie/ledger boxy */
.history-wrapper, .history-card, .history-panel,
.ledger-wrapper, .ledger-card, .ledger-panel,
[class*="history"], [class*="ledger"]{
  background:var(--surface) !important; border:1px solid var(--line) !important;
  border-radius:12px !important; box-shadow:0 1px 2px rgba(0,0,0,.05) !important;
}
#content-main .module, #content-main .panel{ background:var(--surface) !important; }

/* === Odstranit (Delete) – stejny styl jako buttons + bez ořezu === */
.submit-row{
  display:flex !important;
  align-items:center;
  flex-wrap:wrap;
  gap:.5rem;
  padding:7px 12px !important;
  overflow:visible !important;
}
.submit-row .deletelink-box{ margin-left:auto; order:2; }

.submit-row a.deletelink{
  float:none !important;
  margin-left:auto;
  display:inline-flex !important;
  align-items:center;
  gap:.4rem;
  padding:10px 12px !important;
  border-radius:100px !important;
  background:var(--danger) !important;
  border:5px solid var(--danger) !important;
  color:#fff !important;
  text-decoration:none !important;
}
.submit-row a.deletelink:hover{ filter:brightness(1.05); }

/* === Jednotný searchbar na všech changelist stránkách (jako v Platbách) === */
:root{ --searchbar-w: 280px; }  /* šířka pole; když chceš, změň číslo */

#changelist-search{
  display:flex !important;
  align-items:center !important;
  gap:.5rem !important;
  flex-wrap:wrap !important;
  margin:0 !important;
}
#changelist-search label{ margin:0 !important; }

#changelist-search #searchbar,
#changelist-search input[type="text"]{
  flex:0 0 var(--searchbar-w) !important;
  width:var(--searchbar-w) !important;
  max-width:var(--searchbar-w) !important;
  min-height:var(--ctl-h) !important;   /* stejné jako ostatní prvky */
  height:auto !important;
  padding:7px 12px !important;
  border-radius:100px !important;
}

#changelist-search input[type="submit"]{
  min-height:var(--ctl-h) !important;
}

@media (max-width:700px){
  #changelist-search #searchbar,
  #changelist-search input[type="text"]{
    flex:1 1 100% !important;
    width:100% !important;
    max-width:100% !important;
  }
}




/* === Trenéři – souhrn ==================================== */

/* šířky sloupců (trochu víc místa) */
.tbl-treneri col.col-trener     { width: 26%; }
.tbl-treneri col.col-pocet      { width: 12%; }
.tbl-treneri col.col-hodiny     { width: 12%; }
.tbl-treneri col.col-dluzno     { width: 14%; }
.tbl-treneri col.col-zaplaceno  { width: 14%; }
.tbl-treneri col.col-kvyplaceni { width: 14%; }
.tbl-treneri col.col-akce       { width: 8%;  }

/* čísla na střed jen v této tabulce */
.tbl-treneri th.center,
.tbl-treneri td.center { text-align: center; }

/* první sloupec bez přehnaného odsazení, zarovnání na střed řádků */
.tbl-treneri th, .tbl-treneri td { vertical-align: middle; }
.tbl-treneri th:first-child,
.tbl-treneri td:first-child { padding-left: 14px !important; }

/* akční sloupec – tlačítko nezalamovat a zarovnat doprava */
.tbl-treneri td.akce { text-align: right; }
.tbl-treneri .btn-pay { white-space: nowrap; display: inline-block; }

/* jemnější horní linka první datové řádky */
.tbl-treneri tbody tr:first-child td { border-top: 1px solid #eee !important; }


/* ===== Trenéři – souhrn: řádek se součty pod tabulkou ===== */
.tbl-treneri tfoot tr.totals td {
  font-weight: 700;              /* výraznější písmo */
  font-size: 1.05rem;            /* o něco větší než zbytek tabulky */
  background: #ffffff;           /* jemné zvýraznění řádku */
  border-top: 2px solid #daba72 !important;  /* silná oddělovací čára */
  padding-top: 12px;
  padding-bottom: 12px;
}

/* text "Součty:" doprava, aby to působilo jako popisek řádku */
.tbl-treneri tfoot tr.totals td.label {
  text-align: right;
  color: #333;
}

/* čísla v součtovém řádku zarovnaná na střed, stejně jako ve sloupcích */
.tbl-treneri tfoot tr.totals td.center,
.tbl-treneri tfoot tr.totals td.num { 
  text-align: center;
}

/* ===== Souhrn hráče (pod tabulkou) ===== */
.player-summary{
  margin: 14px 0 8px;
  padding: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  background: #ffffff;
  border: 1px solid #e5e7eb;           /* jemná linka jako zbytek adminu */
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}

.player-summary .ps-item{
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(#fafafa, #fff);
  border: 1px solid #eef2f7;
  border-radius: 10px;
}

/* drobná tečka vlevo – barvy jen decentně odlišené */
.player-summary .ps-item::before{
  content: "";
  width: 10px; height: 10px;
  border-radius: 999px;
  background: #d1d5db;
  flex: 0 0 10px;
  box-shadow: 0 0 0 2px #fff inset;
}
.player-summary .ps-item:nth-child(1)::before{ background:#60a5fa; } /* tréninky */
.player-summary .ps-item:nth-child(2)::before{ background:#fbbf24; } /* součet cen */
.player-summary .ps-item:nth-child(3)::before{ background:#34d399; } /* součet zaplaceno */
.player-summary .ps-item:nth-child(4)::before{ background:#a78bfa; } /* aktuální kredit */

.player-summary .ps-label{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7280;                       /* šedá jako v adminu */
  font-weight: 700;
}

.player-summary .ps-value{
  margin-left: auto;                    /* čísla k pravému okraji “pill” */
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
  color: #111827;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}

/* Kredit – barvy podle znaménka */
.player-summary .ps-item.ps-credit .ps-value{
  transition: color .15s ease;
}
.player-summary .ps-item.ps-credit.is-positive .ps-value{ color:#16a34a; } /* green-600 */
.player-summary .ps-item.ps-credit.is-negative .ps-value{ color:#dc2626; } /* red-600 */

/* Tečka vlevo u kreditu bude taky podle znaménka (přebije dřívější nth-child) */
.player-summary .ps-item.ps-credit::before{ background:#a3e635; }          /* 0 jako neutrální lime */
.player-summary .ps-item.ps-credit.is-positive::before{ background:#22c55e; } /* green-500 */
.player-summary .ps-item.ps-credit.is-negative::before{ background:#ef4444; } /* red-500 */


/* responsivní drobnosti */
@media (max-width: 640px){
  .player-summary{ padding: 12px; gap: 10px; }
  .player-summary .ps-item{ padding: 10px 12px; }
  .player-summary .ps-value{ font-size: 18px; }
}


/* === ADMIN: sjednocený vzhled stránkování (paginator) ===================== */

/* Kontejner – bílá „karta“ jako zbytek UI */
.change-list .paginator{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0 0;
  padding:8px 10px;
  background:#fff;
  border:1px solid #e5e7eb;        /* stejná linka jako tabulky */
  border-radius:10px;
}

/* Čísla stránek jako malé „pill“ buttony */
.change-list .paginator a,
.change-list .paginator .this-page{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:34px;
  padding:0 10px;
  border-radius:8px;
  border:1px solid #e5e7eb;
  background:#fff;
  color:#111827;
  text-decoration:none;
  font-weight:600;
  line-height:1;
}

/* Hover efekt jako u oranžových tlačítek */
.change-list .paginator a:hover{
  background:#fff7ed;              /* lehce oranžové pozadí */
  border-color:#f59e0b;
  color:#7c2d12;
}

/* Aktivní stránka – plná oranžová */
.change-list .paginator .this-page{
  background:#E67817;
  border-color:#f59e0b;
  color:#fff;
}

/* „První/Poslední/Předchozí/Další“ – drobná odlišnost (volitelné) */
.change-list .paginator a.prev,
.change-list .paginator a.next,
.change-list .paginator a.end,
.change-list .paginator a.start{
  padding:0 12px;
  border-radius:9999px;
}

/* Text „X záznamů“ + „Zobrazit vše“ zarovnání a styl */
.change-list .paginator .showall,
.change-list .paginator .paginator-info{
  margin-left:auto;
  font-weight:600;
  color:#374151;
}

/* Odkaz „Zobrazit vše“ jako nenápadný čip */
.change-list .paginator .showall a{
  display:inline-flex;
  align-items:center;
  height:34px;
  padding:0 12px;
  border-radius:9999px;
  border:1px solid #e5e7eb;
  background:#f3f4f6;
  text-decoration:none;
  margin-left:8px;
  color:#111827;
}
.change-list .paginator .showall a:hover{
  background:#e5e7eb;
}

/* Responsive: ať se to hezky zalamuje na menších šířkách */
@media (max-width: 700px){
  .change-list .paginator{ gap:6px; }
  .change-list .paginator .showall,
  .change-list .paginator .paginator-info{ margin-left:0; }
}


/* ================================
   Django Admin Select2 (autocomplete)
   ================================ */

/* Vzhled samotného pole (input „combobox“) */
.select2-container--admin-autocomplete .select2-selection--single{
  height: 36px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
}
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__rendered{
  line-height: 34px;                 /* srovná vertikální zarovnání textu */
  padding-left: 10px;
}
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow{
  height: 34px;
}
.select2-container--admin-autocomplete.select2-container--focus
.select2-selection--single{
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,.20);
  outline: 0;
}

/* Dropdown bublina (appenduje se do <body>) */
.select2-container--admin-autocomplete .select2-dropdown{
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  overflow: hidden;                   /* aby zaoblení drželo i uvnitř */
}

/* Vyhledávací input uvnitř dropdownu */
.select2-container--admin-autocomplete .select2-search__field{
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 8px;
}
.select2-container--admin-autocomplete .select2-search__field:focus{
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245,158,11,.18);
  outline: 0;
}

/* Položky v seznamu – hover */
.select2-container--admin-autocomplete .select2-results__option{
  border-radius: 8px;
  padding: 8px 10px;
}
.select2-container--admin-autocomplete .select2-results__option--highlighted:not([aria-selected]){
  background: #fff7ed;                /* krémový hover */
  color: #111827;
}

/* >>> Aktivní/označená položka – ORANŽOVĚ <<< */
.select2-results__option--highlighted[aria-selected],
.select2-container--admin-autocomplete .select2-results__option--highlighted[aria-selected]{
  background: #f59e0b !important;     /* brand orange */
  color: #ffffff !important;          /* bílý text */
}

/* Vybraná položka (když je označená, ale neaktivní) */
.select2-container--admin-autocomplete .select2-results__option[aria-selected="true"]{
  background: #ffedd5;                /* světle oranžová */
  color: #92400e;
}
/* ===== HIDE: 'Uložit a pokračovat v úpravách' (name="_continue") na všech admin stránkách ===== */
.submit-row input[name="_continue"],
.submit-row button[name="_continue"],
#toolbar input[name="_continue"],
#toolbar button[name="_continue"],
.object-tools input[name="_continue"],
.object-tools button[name="_continue"],
.grp-submit-row input[name="_continue"],
.grp-submit-row button[name="_continue"]{
  display: none !important;
}

/* ===== FIX 1: Hlavička tabulek – žádný hover, drž krémovou ===== */
#result_list thead th,
.module table thead th,
.results thead th {
  background: var(--amber-100) !important;
  color: var(--text) !important;
}

/* jakýkoliv hover na thead zrušit (když přijde z default admin CSS) */
#result_list thead tr:hover th,
.module table thead tr:hover th,
.results thead tr:hover th,
table thead tr:hover th {
  background: var(--amber-100) !important;
  color: var(--text) !important;
}

/* hover jen na tělo tabulky, ne na thead */
#result_list tbody tr:hover td,
.module table tbody tr:hover td,
.results tbody tr:hover td {
  background: #fff8e6 !important; /* jemný krémový */
}

/* ===== FIX 2: Kalendář v „Přidat trénink“ ===== */
.calendarbox,
.clockbox {
  z-index: 10000 !important; /* ať je nad sticky věcmi */
}

/* pevné pozadí hlavičky kalendáře/caption */
.calendarbox table thead th,
.calendarbox table caption {
  background: var(--amber-100) !important;
  color: var(--text) !important;
}

/* zruš jakékoliv globální tr:hover uvnitř kalendáře */
.calendarbox table tr:hover th,
.calendarbox table tr:hover td {
  background: initial !important;
  color: inherit !important;
}

/* příjemný hover jen na konkrétní dny */
.calendarbox .calendar tbody td:hover {
  background: #fff8e6 !important;
}

/* === FINAL PATCH: světlo pro tabulky, Select2 a kalendář === */

/* vynutit světlé schéma i proti auto-dark */
html, body, .change-list, .results, table, .select2-container, .calendarbox { 
  color-scheme: light !important; 
}

/* TABULKY (hlavička + řádky + hover) */
table thead th{
  background: var(--amber-100) !important;
  color: var(--text) !important;
  background-image: none !important;
  box-shadow:none !important; filter:none !important;
}
table thead th::before, table thead th::after{ background:transparent !important; box-shadow:none !important; }

table tbody tr, table tbody td{ background:#fff !important; color:var(--text) !important; }
table tbody tr:nth-child(even){ background:#fffaf0 !important; }
table tbody tr:hover > td{ background:#fff3df !important; color:var(--text) !important; }

/* SELECT2 (dropdown, vyhledávací input, položky) */
.select2-container--admin-autocomplete .select2-selection--single{
  background:#fff !important; color:#111 !important; border:1px solid #E5E7EB !important; border-radius:8px !important;
}
.select2-container .select2-dropdown{
  background:#fff !important; color:#111 !important; border:1px solid #e5e7eb !important;
}
.select2-search--dropdown .select2-search__field{
  background:#fff !important; color:#111 !important; -webkit-text-fill-color:#111 !important;
  border:1px solid #e5e7eb !important; border-radius:8px !important;
}
.select2-results__option{ background:#fff !important; color:#111 !important; }
.select2-results__option--highlighted:not([aria-selected]){ background:#fff7ed !important; color:#111 !important; }
.select2-results__option--highlighted[aria-selected]{ background:#f59e0b !important; color:#fff !important; }

/* DOCHÁZKA – <select> v první buňce vždy světlý */
#dochazka_set-group td:first-child select,
.x-dochazka-inline td:first-child select,
.inline-group .related-widget-wrapper select{
  background:#fff !important; color:#111 !important; -webkit-text-fill-color:#111 !important;
  border:1px solid #E5E7EB !important; border-radius:8px !important; appearance:auto !important;
}

/* KALENDÁŘ (widget) */
.calendarbox table, .calendarbox .calendar td, .calendarbox .calendar th{
  background:#fff !important; color:var(--text) !important; box-shadow:none !important; filter:none !important;
}
.calendarbox table thead th, .calendarbox table caption{
  background:var(--amber-100) !important; color:var(--text) !important;
}
.calendarbox .calendar tbody td:hover{ background:#fff8e6 !important; }

/* Pojistka proti force-dark z prohlížeče */
html, body, #result_list, .results, table {
  color-scheme: light !important;
  filter: none !important;
  -webkit-filter: none !important;
  mix-blend-mode: normal !important;
}
#result_list tbody th[scope="row"] { position: static !important; }
#result_list td::before, #result_list td::after,
#result_list th::before, #result_list th::after { content: none !important; }
#result_list tbody tr:hover > td { background: #fff3df !important; }

/* =================================================================== */
/* === GLOBÁLNÍ FIX v2: Hover efekt pro všechny tabulky (agresivní) === */
/* =================================================================== */

/* 1. STATICKÝ STAV HLAVIČKY: Vynutí krémové pozadí a správnou barvu textu. */
table thead th,
table thead th a {
    background: var(--amber-100) !important;
    color: var(--text) !important;
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
    text-decoration: none !important;
}

/* 2. HOVER STAV HLAVIČKY: Zůstaň krémová, nic neměň! */
/* Toto je klíčová část, která aktivně bojuje proti nechtěnému černému hoveru. */
table thead tr:hover th,
table thead tr:hover th a {
    background: var(--amber-100) !important;
    color: var(--text) !important;
}

/* === GLOBÁLNÍ FIX: Hover efekt pro CELÝ řádek tabulky (včetně <th>) === */
table tbody tr:hover td,
table tbody tr:hover th {
  background: #fff3df !important; /* Váš stávající jemně oranžový hover */
  color: var(--text) !important;
}
/* =================================================================== */
/* === MOBILNÍ OPRAVY (přebijí vše ostatní) === */
/* =================================================================== */

@media (max-width: 820px) {

  /* Skryje název "Tenis systém Čimice" */
  #branding .brand .brand-title {
      display: none !important;
  }

  /* Skryje celý blok s odkazy vpravo */
  #user-tools {
      display: none !important;
  }
}