/* Vakara līga — vienots moderns dizains spēlētāju lapai (index.html) un reitingam (reitings.html).
   Tumši zila galvene, hero un apakšējā navigācija; baltas vai tumšas kartes; bez gradientiem un caurspīdības.
   Ielādē pēdējais, pēc minimal.css un accessibility.css. Faila nosaukums palicis no iepriekšējās versijas. */
:root{
  --nv:#17306B;--nv-hi:#244A9A;--nv-line:rgba(255,255,255,.16);--nv-text:#FFFFFF;--nv-mute:#B9CAEE;
  --sf-bg:#EEF2F8;--sf-card:#FFFFFF;--sf-line:#D6DEEC;--sf-th:#E7EDF8;--sf-solid:#FFFFFF;
  --sf-shadow:0 1px 2px rgba(23,48,107,.06),0 4px 14px rgba(23,48,107,.07);
}
html[data-theme="dark"]{
  --nv:#14294F;--nv-hi:#2F5FC4;--nv-line:rgba(255,255,255,.14);
  --sf-bg:#0E1626;--sf-card:#172338;--sf-line:#2D3E5B;--sf-th:#1F2F4D;--sf-solid:#172338;
  --sf-shadow:0 1px 2px rgba(0,0,0,.3),0 4px 14px rgba(0,0,0,.25);
}

/* ---------- pamats ---------- */
html{background:var(--sf-bg)!important}
html body.pub,html body.stats-page{background:var(--sf-bg)!important;padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
body.pub::before,body.stats-page::before{display:none!important}

/* ---------- galvene: tumši zila, balts logotips ---------- */
html body .pub-header{background:var(--nv)!important;color:var(--nv-text)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;border-bottom:1px solid var(--nv-line)!important;box-shadow:0 2px 10px rgba(10,25,60,.25)!important}
html body .pub-header .top-in{padding-top:10px;padding-bottom:10px}
html body .pub-header .logo-img{width:40px;height:40px;object-fit:contain;border-radius:0;background:none;box-shadow:none}
html body .pub-header .brand{color:#fff;font-size:19px;font-weight:700;letter-spacing:-.02em}
html body .appsw{background:rgba(255,255,255,.10)!important;border:1px solid var(--nv-line);border-radius:12px!important;box-shadow:none}
html body .appsw a{border-radius:9px!important;color:var(--nv-mute)!important;transition:background-color .15s ease-out,color .15s ease-out}
html body .appsw a:hover{color:#fff!important}
html body .appsw a[aria-current=page]{background:#fff!important;color:var(--nv)!important;box-shadow:none!important}
html body .pub-header :is([data-language-control],select,button){background:rgba(255,255,255,.10)!important;border:1px solid var(--nv-line)!important;border-radius:10px!important;color:#fff!important;box-shadow:none!important}
html body .pub-header [data-language-control] option{color:#152c4b;background:#fff}
html body .pub-header svg{color:currentColor}

/* ---------- hero: tumši zils bloks ---------- */
html body.pub .pub-t>div,html body.stats-page #stats .st-head,
html body.pub :is(.me-card .now,.minibar,.tournament-current){
  background:var(--nv)!important;color:#fff!important;border:0!important;box-shadow:none!important;border-radius:16px!important}
html body.pub .pub-t>div,html body.stats-page #stats .st-head{padding:22px 24px!important}
html body.pub .pub-t>div::before,html body.pub .pub-t>div::after,html body.stats-page #stats .st-head::before,html body.stats-page #stats .st-head::after,
html body.pub :is(.me-card .now,.minibar)::after{display:none!important}
html body.pub .pub-t :is(h1,p),html body.stats-page #stats .st-head :is(h1,.st-title,p,.st-brand){color:#fff!important}
html body.pub .pub-t p,html body.stats-page #stats .st-head p,html body.stats-page #stats .st-head .st-brand{color:var(--nv-mute)!important;opacity:1}

/* ---------- kartes: baltas / tumšas, plānas līnijas ---------- */
html body.pub :is(.card,.tbl,.queue,.gsum),
html body.stats-page #stats :is(.card,.tile,.pd,.hero){
  background:var(--sf-card)!important;border:1px solid var(--sf-line)!important;border-radius:16px!important;box-shadow:var(--sf-shadow)!important;
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html body.stats-page #stats :is(.tile,.pd){border-radius:14px!important}
html body.pub .xwrap,html body.stats-page #stats .xw{background:transparent!important;border:1px solid var(--sf-line)!important;border-radius:12px!important;box-shadow:none!important}
html body.pub .me-card:not(.pick){background:none!important;border:0!important;box-shadow:none!important}
html body.pub :is(.me-card .next,.myres){background:var(--sf-card)!important;border:1px solid var(--sf-line)!important;border-radius:14px!important;box-shadow:none!important}

/* ---------- pogas un lauki ---------- */
html body.pub .btn,html body.stats-page #stats .btn{background:var(--blue)!important;color:#fff!important;border:0!important;box-shadow:none!important;border-radius:10px!important}
html body.pub .btn.ghost,html body.stats-page #stats .btn.ghost{background:transparent!important;color:var(--blue)!important;border:1px solid var(--sf-line)!important}
html body.pub :is(input:not([type=checkbox]),select),html body.stats-page #stats :is(input[type=search],select){background:var(--sf-card)!important;border:1px solid var(--sf-line)!important;color:var(--ink)!important;box-shadow:none!important;border-radius:10px!important}

/* ---------- tabulas ---------- */
html body.stats-page #stats .tb thead th,html body.pub .rt thead th,html body.pub .xt thead th{background:var(--sf-th)!important;color:var(--mute)!important}
html body.stats-page #stats #st-rt :is(td:first-child,td.l),html body.pub .rt :is(td:first-child,td.xn),html body.pub .xt td.xn{background:var(--sf-solid)!important}
html body.stats-page #stats #st-rt thead :is(th:first-child,th.l){background:var(--sf-th)!important}
html body.stats-page #stats :is(.tb,.xt) :is(td,th),html body.pub :is(.rt,.xt) :is(td,th){border-color:var(--sf-line)!important}

/* ---------- apakšējā navigācija: tumši zila, viena un tā pati abās lapās ---------- */
html body.pub nav.tabs.pubtabs,html body.stats-page #stats .st-tabs{
  position:fixed!important;top:auto!important;left:12px!important;right:12px!important;bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;margin:0 auto!important;width:auto!important;max-width:640px!important;
  display:flex!important;gap:2px;padding:6px!important;border:0!important;border-radius:20px!important;overflow-x:auto;scrollbar-width:none;z-index:45;
  background:var(--nv)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;box-shadow:0 8px 24px rgba(10,25,60,.35)!important}
html body.pub .pubtabs::-webkit-scrollbar,html body.stats-page #stats .st-tabs::-webkit-scrollbar{display:none}
html body.pub .pubtabs button,html body.stats-page #stats .st-tabs a{flex:1 0 auto;min-width:66px;min-height:54px;border-radius:14px!important;padding:6px 10px;color:var(--nv-mute)!important;font-size:11.5px;font-weight:600;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-decoration:none;background:transparent!important;transition:background-color .15s ease-out,color .15s ease-out,transform .12s ease-out}
html body.pub .pubtabs button:hover,html body.stats-page #stats .st-tabs a:hover{color:#fff!important}
html body.pub .pubtabs button:active,html body.stats-page #stats .st-tabs a:active{transform:scale(.96)}
html body.pub .pubtabs button[aria-pressed=true],html body.stats-page #stats .st-tabs a[aria-current=page]{color:#fff!important;background:var(--nv-hi)!important;box-shadow:none!important}
@media (min-width:900px){html body.pub nav.tabs.pubtabs,html body.stats-page #stats .st-tabs{max-width:720px;justify-content:center}html body.pub .pubtabs button,html body.stats-page #stats .st-tabs a{flex:0 0 auto;min-width:96px}}

/* ---------- mazie elementi ---------- */
html body.pub .pfoot,html body.stats-page .pfoot-s{color:var(--mute)}
html[data-theme="dark"] body.pub{--mute:#b2c0d4}
@media (prefers-reduced-motion:reduce){html body .appsw a,html body.pub .pubtabs button,html body.stats-page #stats .st-tabs a{transition:none}}

/* galvenes lauki (valoda, iestatījumi) tumšajā joslā — pārraksta vispārējos lauku noteikumus */
html body.pub .pub-header :is([data-language-control],select,button),html body.stats-page .pub-header :is([data-language-control],select,button){
  background:rgba(255,255,255,.10)!important;border:1px solid var(--nv-line)!important;color:#fff!important;border-radius:10px!important;box-shadow:none!important}
@media (max-width:540px){
  html body .pub-header .top-in{gap:8px;padding-left:12px;padding-right:12px}
  html body .pub-header .brand{font-size:17px}
  html body .pub-header .logo-img{width:34px;height:34px}
  html body .appsw a{padding:0 10px;gap:5px;font-size:12.5px}
  html body .pub-header [data-language-control]{max-width:74px}
}

/* ---------- spēlētāju tabulas: lasāmas, nesaplok ---------- */
html body.pub .xt{font-size:15px;border-collapse:separate;border-spacing:0}
html body.pub .xt th,html body.pub .xt td{min-width:60px;padding:6px 4px}
html body.pub .xt td{height:56px}
html body.pub .xt td.xn{min-width:150px;max-width:180px;white-space:normal;line-height:1.2;text-align:left;padding-left:10px}
html body.pub .xt td.xn b{display:block}
html body.pub .xt .xnr{display:inline;font-style:normal;color:var(--mute);font-weight:700;margin-right:2px}
html body.pub .xt thead th:first-child,html body.pub .xt tbody td:first-child:not(.xn){min-width:34px;width:34px}
@media (max-width:700px){html body.pub .xt thead th:first-child,html body.pub .xt tbody td:first-child:not(.xn){display:none}}
html body.pub .xt .group-score-info{display:none}
html body.pub .xt .group-score{font-size:19px;font-weight:800}
html body.pub .xt td.xd{background:var(--sf-th)!important}
html[data-theme="dark"] body.pub .xt td.xd{background:#0f1a2d!important}
html body.pub .xt td.xw{background:rgba(24,128,72,.12)!important;color:#127a3e!important}
html body.pub .xt td.xl{background:rgba(190,35,60,.10)!important;color:#b3203a!important;font-weight:700}
html[data-theme="dark"] body.pub .xt td.xw{background:rgba(52,200,120,.16)!important;color:#7be2a8!important}
html[data-theme="dark"] body.pub .xt td.xl{background:rgba(255,100,120,.14)!important;color:#ff9aa8!important}
html body.pub .xt td.xp{background:rgba(229,36,59,.10)!important;color:inherit!important}
html body.pub .xleg{margin-top:10px}
html body.pub .live-dot{background:#E5243B}
html body.pub .xt td.xp .group-table b{color:var(--ink)!important}
