/* ==========================================================================
   Prihlasovacie stránky
   ========================================================================== */
.auth-body {
  min-height: 100vh;
  margin: 0;
  background: var(--surface-muted);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: 100vh;
}

/* ľavý panel – značka */
.auth-brand {
  position: relative;
  overflow: hidden;
  background: #404041;
  color: #f4f4f2;
  display: flex;
  align-items: flex-end;
  padding: clamp(2rem, 5vw, 4rem);
}
.auth-brand::before {
  /* jemná mriežka ako technický výkres */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 32px 32px;
}
.auth-brand-inner { position: relative; }
.auth-arc {
  position: absolute;
  width: clamp(260px, 30vw, 460px);
  height: auto;
  top: 10%;
  right: -12%;
  color: #f37121;
}
.auth-brand-logo {
  display: block;
  width: clamp(180px, 18vw, 260px);
  height: auto;
  margin: 0 0 1.25rem;
}
.auth-brand-kicker {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: 300;
  letter-spacing: .02em;
  line-height: 1.3;
  margin: 0;
  color: #d8d8d5;
}
.auth-brand-line {
  margin: 0;
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #f37121;
}

/* pravá časť – formulár */
.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 1rem 2rem;
  position: relative;
}
.auth-topbar {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: .5rem;
  align-items: center;
}
.auth-lang {
  font-size: .875rem;
  text-decoration: none;
  padding: .35rem .65rem;
  border-radius: 999px;
  color: var(--bs-secondary-color);
}
.auth-lang:hover { background: var(--surface-sunken); color: var(--bs-body-color); }
.auth-theme {
  border: 0;
  background: transparent;
  color: var(--bs-secondary-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
}
.auth-theme:hover { background: var(--surface-sunken); color: var(--bs-body-color); }

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 1rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -12px rgba(0,0,0,.12);
}
.auth-card-wide { max-width: 560px; }
.auth-logo {
  display: block;
  height: 44px;
  width: auto;
  margin: 0 0 1.75rem;
}
.logo-on-dark { display: none; }
[data-bs-theme="dark"] .logo-on-light { display: none; }
[data-bs-theme="dark"] .logo-on-dark { display: block; }

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 .35rem;
  letter-spacing: -.01em;
}
.auth-lead {
  color: var(--bs-secondary-color);
  margin: 0 0 1.5rem;
}
.auth-alert { font-size: .925rem; }
.auth-foot {
  margin: 1.5rem 0 0;
  font-size: .8rem;
  color: var(--bs-secondary-color);
}

.auth-card .form-control {
  padding: .7rem .85rem;
  background-color: var(--surface);
}
.auth-card .btn-lg { padding: .75rem 1rem; font-size: 1rem; }

.pw-field { position: relative; }
.pw-field .form-control { padding-right: 3rem; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: .35rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .5rem;
  color: var(--bs-secondary-color);
}
.pw-toggle:hover { background: var(--surface-sunken); color: var(--bs-body-color); }

.capslock-hint { display: none; font-size: .825rem; color: var(--brand-accent-text); margin-top: .35rem; }
.capslock-hint.show { display: block; }

/* 6-miestny kód */
.otp-input {
  font-variant-numeric: tabular-nums;
  font-size: 1.75rem !important;
  letter-spacing: .5em;
  text-align: center;
  padding-left: calc(.85rem + .5em) !important;
  font-weight: 600;
}
.backup-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.25rem !important;
  letter-spacing: .15em;
  text-align: center;
  text-transform: uppercase;
}

/* nastavenie Authenticatora */
.enroll-steps { list-style: none; padding: 0; margin: 0 0 1.25rem; counter-reset: step; }
.enroll-steps > li {
  position: relative;
  padding: 0 0 1.5rem 2.75rem;
  counter-increment: step;
}
.enroll-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -.1rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: .9rem;
  background: var(--brand-accent-soft);
  color: var(--brand-accent-text);
}
.enroll-steps > li::after {
  content: "";
  position: absolute;
  left: .93rem;
  top: 2.1rem;
  bottom: .4rem;
  width: 1px;
  background: var(--border-soft);
}
.enroll-steps > li:last-child { padding-bottom: 0; }
.enroll-steps > li:last-child::after { display: none; }
.enroll-steps h2 { font-size: 1rem; font-weight: 600; margin: 0 0 .25rem; }
.enroll-steps p { color: var(--bs-secondary-color); margin: 0 0 .75rem; font-size: .925rem; }

.qr-box {
  display: inline-block;
  background: #fff;
  padding: 12px;
  border-radius: .75rem;
  border: 1px solid var(--border-soft);
  line-height: 0;
}
.qr-box canvas, .qr-box img { width: 192px; height: 192px; image-rendering: pixelated; }
.secret-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  letter-spacing: .06em;
  word-break: break-all;
  background: var(--surface-sunken);
  border-radius: .5rem;
  padding: .5rem .75rem;
}

/* záložné kódy */
.codes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin: 0 0 1rem;
  padding: 1rem;
  list-style: none;
  background: var(--surface-sunken);
  border-radius: .75rem;
  counter-reset: code;
}
.codes-grid li {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  letter-spacing: .08em;
  padding: .35rem .5rem;
  background: var(--surface);
  border-radius: .4rem;
  text-align: center;
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--bs-link-color);
  text-decoration: underline;
  text-underline-offset: .2em;
}
.link-btn:hover { color: var(--bs-link-hover-color); }

.auth-divider {
  border-top: 1px solid var(--border-soft);
  margin: 1.5rem 0 1rem;
}

.pw-meter { height: 4px; border-radius: 2px; background: var(--surface-sunken); overflow: hidden; margin-top: .5rem; }
.pw-meter span { display: block; height: 100%; width: 0; background: #c0392b; transition: width .2s, background-color .2s; }

/* mobil a tablet */
@media (max-width: 991.98px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-main { padding-top: 4rem; justify-content: flex-start; }
}
@media (max-width: 575.98px) {
  .auth-main { padding: 3.75rem 1rem 1.5rem; }
  .auth-card { border: 0; box-shadow: none; background: transparent; padding: .5rem 0; }
  .auth-body { background: var(--surface); }
  .codes-grid { grid-template-columns: 1fr 1fr; padding: .75rem; }
}

@media print {
  .auth-brand, .auth-topbar, .auth-foot, .no-print, form, .alert { display: none !important; }
  .auth-shell { display: block; }
  .auth-card { border: 0; box-shadow: none; max-width: none; }
  .codes-grid { background: none; }
  .codes-grid li { border: 1px solid #999; }
}
