:root{
  --bg: #0b1220;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.09);
  --border: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --muted2: rgba(255,255,255,.55);
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --radius: 18px;
  --radius2: 14px;
  --pad: 18px;
  --accent: #7c5cff;
  --accent2: #2dd4bf;
  --danger: #ff4d6d;
}

*{ box-sizing:border-box; }

body{
  font-family: system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  margin:0;
  padding:28px;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 20% 0%, rgba(124,92,255,.25), transparent 60%),
    radial-gradient(1200px 700px at 90% 10%, rgba(45,212,191,.18), transparent 55%),
    radial-gradient(900px 600px at 50% 100%, rgba(255,255,255,.07), transparent 60%),
    var(--bg);
}

/* Layout */
.wrap{
  max-width: 1280px;
  margin: 0 auto;
}

/* ===== LOGIN LOGO (stabilní) ===== */
.loginLogo{
  display:block;
  margin: 6px auto 18px;
  max-width: 100%;
  width: 420px;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.35));
}

/* ===== TOP BAR (vpravo pill + odhlásit) ===== */
.top{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap: 10px;
  margin-bottom: 0px;
}

/* (používá admin.html: <div class="topRight">...) */
.topRight{
  display:flex;
  gap:10px;
  align-items:center;
}

/* ===== CARDS / HEADINGS ===== */
h1{
  margin:0;
  font-size: 34px;
  letter-spacing: .2px;
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

h2{
  margin: 0 0 10px 0;
  font-size: 20px;
}

h3{
  margin: 8px 0 10px 0;
  font-size: 16px;
  color: var(--text);
}

/* ===== Buttons ===== */
.btn{
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: transform .06s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);

  /* ✅ sjednocení vzhledu pro <a> i <button> */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;   /* <a> nebude podtržené */
  line-height: 1;          /* stejné vertikální vycentrování */
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
}

.btn:active{
  transform: translateY(1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.16);
}

.btn.secondary{
  background: rgba(255,255,255,.06);
}

.btn.primary{
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(45,212,191,.75));
  border-color: rgba(255,255,255,.22);
}

.btn.primary:hover{
  filter: brightness(1.05);
}

.btn:disabled{
  opacity: .55;
  cursor: not-allowed;
}
/* ✅ a.btn a button.btn se budou chovat stejně */
a.btn{ color: inherit; }
button.btn{ font: inherit; }

/* ===== Forms ===== */
label{
  display:block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

input{
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  color: var(--text);
  width: 100%;
  outline: none;
}

input:focus{
  border-color: rgba(124,92,255,.55);
  box-shadow: 0 0 0 4px rgba(124,92,255,.18);
}

.msg{
  margin-top: 10px;
  font-weight: 700;
}

.msg.ok{ color: #4ade80; }
.msg.bad{ color: #ff8fa3; }

.hint{
  color: var(--muted);
  margin-top: 10px;
}

/* ===== Rows / toolbars ===== */
.row{
  margin: 12px 0;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.row.stack{
  flex-direction: column;
  align-items: flex-start;
}

/* File input wrapper look (keeps native input) */
input[type="file"]{
  padding: 10px;
  background: rgba(0,0,0,.14);
}

/* ===== Status pill (legacy) ===== */
.status{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
}

/* ===== pill vedle Odhlásit ===== */
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  font-weight: 700;
  font-size: 13px;
  backdrop-filter: blur(10px);
}

/* ===== horní lišta adminu ===== */
.adminTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.adminActions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap: wrap;
}

.tabsRight{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap: wrap;
}

/* ===== Import box (užší) ===== */
.importBox{
  margin-top: 6px;
  margin-bottom: 16px;
}

.importRow{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap: wrap;
  max-width: 520px;
}

#xlsxFile{
  width: 260px;
  max-width: 100%;
}

#importBtn{
  white-space: nowrap;
}

/* ===== NADPIS NAD TABULKOU + tlačítko vpravo (správně) ===== */
/* Tohle je jediný “správný” layout pro hlavičku panelu */
.panelHeader{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 14px 0 14px;
}

/* Nadpis vždy uprostřed nad TABULKOU */
.panelTitle{
  grid-column: 2;
  justify-self: center;
  margin: 0;
  text-align: center;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .3px;
  white-space: nowrap;
}

/* Tlačítko vždy vpravo */
.panelHeader .genBtn{
  grid-column: 3;
  justify-self: end;
  white-space: nowrap;
}

/* ===== Tabulky ===== */
.tableWrap{
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius2);
  background: rgba(0,0,0,.12);
  -webkit-overflow-scrolling: touch;
}

.tbl{
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.tbl th, .tbl td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: left;
  white-space: nowrap;
}

.tbl thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(10,16,30,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  font-size: 13px;
  letter-spacing: .2px;
}

.tbl tbody tr:nth-child(2n){
  background: rgba(255,255,255,.03);
}

.tbl tbody tr:hover{
  background: rgba(124,92,255,.10);
}

/* Sticky last column (Start číslo / Uložit) */
.tbl th:last-child,
.tbl td:last-child{
  position: sticky;
  right: 0;
  z-index: 3;
  background: rgba(10,16,30,.92);
  backdrop-filter: blur(8px);
  box-shadow: -10px 0 20px rgba(0,0,0,.25);
  font-weight: 800;
}

/* Keep buttons above table */
.row{ position: relative; z-index: 5; }
.tableWrap{ position: relative; z-index: 1; }

/* ===== Small screens ===== */
@media (max-width: 720px){
  body{ padding: 16px; }
  h1{ font-size: 26px; }
  .card{ padding: 14px; }
  .importRow{ max-width: 100%; }
  #xlsxFile{ width: 100%; }

  /* na mobilu dovol nadpis zlomit (jinak může přetékat) */
  .panelTitle{ white-space: normal; }
}

/* ===== LOGIN: užší karta + centrované prvky ===== */
.card.login{
  max-width: 520px;
  margin: 40px auto 0 auto;
  padding: 32px 28px;
}

.loginForm{
  display:flex;
  flex-direction: column;
  align-items: stretch;
}

.loginLabel{
  display:block;
  text-align:center;
  margin: 4px 0 10px;
  font-size: 0.95rem;
  color: rgba(255,255,255,.75);
}

.loginBtn{
  width: fit-content;
  align-self: center;
  margin-top: 14px;
}

/* ===== sjednocení <a> a <button> v navigaci ===== */
a.btn{
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Teams – tlačítko Obnovit: užší + doprava */
#panelTeams .panelHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

#panelTeams .teamsRefreshBtn{
  width: auto;
  min-width: 120px;     /* uprav dle chuti (např. 110–140) */
  padding: 10px 14px;   /* užší než default */
  white-space: nowrap;
  margin-left: auto;    /* dorazí doprava */
}
/* Teams – tmavší poslední sloupec (Celkem) */
#panelTeams th.colTotal,
#panelTeams td.colTotal{
  background: rgba(0,0,0,.28);
}

/* ať se to hezky spojí s designem tabulky (volitelné) */
#panelTeams td.colTotal b{
  font-size: 1.05em;
}
/* ===== Horní pravé ovládací prvky – sjednocení vzhledu ===== */

.topRight a,
.topRight .pill,
.topRight button {
  appearance: none;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: default;
}

/* odkazy a tlačítka reagují stejně */
.topRight a,
.topRight button {
  cursor: pointer;
}

.topRight a:hover,
.topRight button:hover {
  background: rgba(255,255,255,.12);
}

/* stavový pill (Přihlášeno) – bez hoveru, ale stejný look */
.topRight .pill {
  cursor: default;
  opacity: .9;
}

/* sjednocení rozestupů */
.topRight {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* ===== ADMIN BRAND (stejné chování jako na indexu) ===== */
.adminBrandTop{
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 14px 0;   /* ještě o chlup výš */
}

.adminBrandTop .adminBrandLogo{
  height: 78px;
  width: auto;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,.28));
}

.adminBrandTop .adminBrandTitle{
  font-size: 34px;
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.05;
  margin: 0;
}
