/* --- Layout (sdílené pro login & register) --- */
.auth-page {
  background: var(--bg);
}

/* VŽDY na střed; když je obsah vyšší, jen srovnáme nahoru, ale zůstane středově */
.auth-wrap {
  min-height: 100svh;
  display: flex;
  align-items: center;
  /* vertikální střed */
  justify-content: center;
  /* horizontální střed */
  padding: 24px;
}

/* pokud je obsah vyšší než viewport, zarovnej NAHORU, ale NECH STŘED HORIZONTÁLNĚ */
@media (max-height: 760px) {
  .auth-wrap {
    align-items: flex-start;
    /* nahoru */
    justify-content: center;
    /* stále na střed */
    padding-top: 24px;
  }
}

.auth-card {
  width: min(780px, 94vw);
  margin-inline: auto;
  /* pojistka horizontálního středu */
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(18px, 3vw, 28px);
  overflow: visible;
  /* jistota, ať se nic „neusekne“ */
}

/* Volitelné: pokud se na auth stránkách renderuje i hlavní sticky header, skryj ho */
.auth-page .nav-wrap {
  display: none;
}

/* --- Top bar s logem a akcemi --- */
.top-bar {
  display: flex;
  justify-content: center;
  /* logo na střed */
  align-items: center;
  margin-bottom: 18px;
}

.top-bar a {
  color: var(--muted);
  text-decoration: none;
}

.top-bar a:hover {
  color: #fff;
}

.top-bar img {
  display: block;
  height: auto;
  width: auto;
  max-height: 92px;
  /* větší logo na desktopu */
}

@media (max-width: 575.98px) {
  .top-bar img {
    max-height: 68px;
  }
}

.auth-title {
  font-weight: 800;
  margin: .3rem 0 0;
  text-align: center;
  font-size: 1.8rem;
}

.auth-sub {
  color: var(--muted);
  margin: .25rem 0 1.2rem;
  text-align: center;
}

/* --- Gridy --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* --- Form prvky --- */
.form-label {
  color: #dfe6f4;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-control,
.form-select {
  background: #0f213c;
  border: 1px solid rgba(255, 255, 255, .08);
  color: #eef4fb;
}

.form-control:focus,
.form-select:focus {
  background: #11243f;
  color: #fff;
  border-color: #345a83;
  box-shadow: none;
}

.help {
  color: var(--muted);
  font-size: .9rem;
}

/* --- Sekční oddělovač --- */
.section-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 10px;
  color: var(--gold);
}

.section-bar .line {
  flex: 1;
  height: 1px;
  background: #d0a04e5c;
}

.section-bar .title {
  white-space: nowrap;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .2px;
}

/* --- Oko v password inputu (zlatý outline) --- */
.btn-eye {
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  border-radius: 10px;
}

.btn-eye:hover {
  background: var(--gold);
  color: #0a1424;
}

/* --- CTA / akce --- */
.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.btn-gold {
  background: var(--gold);
  color: #0a1424;
  border: 0;
  border-radius: 10px;
  padding: .85rem 1.4rem;
  font-weight: 700;
  min-width: 220px;
  transition: background .25s ease, transform .05s ease;
}

.btn-gold:hover {
  background: var(--gold-700);
}

.btn-gold:active {
  transform: translateY(1px);
}

.back-link,
.alt-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover,
.alt-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* --- Mobile: CTA na plnou šířku --- */
@media (max-width: 640px) {
  .actions {
    justify-content: stretch;
  }

  .btn-gold {
    width: 100%;
    min-width: unset;
  }
}