/* =============================================================================
   ByteZone — Auth Pages (login, register, forgot)
   Načítava sa len na auth stránkach cez <link> v <head>.
   Scope: .auth-page na <body>
   ========================================================================== */

/* --- Layout ------------------------------------------------------------ */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Animated background ----------------------------------------------- */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
}
.auth-bg-orb-1 {
  width: 50vw;
  height: 50vw;
  top: -15vw;
  left: -15vw;
  background: radial-gradient(circle, oklch(0.72 0.17 155 / 0.5), transparent 70%);
  animation: auth-orb-1 22s ease-in-out infinite;
}
.auth-bg-orb-2 {
  width: 45vw;
  height: 45vw;
  bottom: -15vw;
  right: -10vw;
  background: radial-gradient(circle, oklch(0.55 0.2 280 / 0.45), transparent 70%);
  animation: auth-orb-2 26s ease-in-out infinite;
}
.auth-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black, transparent);
  opacity: 0.4;
}
[data-theme='light'] .auth-bg-orb {
  opacity: 0.3;
}
@keyframes auth-orb-1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(8vw, 6vh) scale(1.1);
  }
}
@keyframes auth-orb-2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-6vw, -8vh) scale(1.05);
  }
}

/* --- Two-column wrapper ------------------------------------------------ */
.auth-page .auth-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--s-12) var(--s-8);
  width: 100%;
  align-items: center;
}

/* --- Side panel -------------------------------------------------------- */
.auth-side {
  padding: var(--s-8);
}
.auth-side-inner {
  max-width: 480px;
}
.auth-side-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
  margin: 40px 0 32px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.auth-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.auth-stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}
.auth-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.auth-side-quote {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.5;
}
.auth-side-quote-author {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
}

/* --- Main (right column) ---------------------------------------------- */
.auth-main {
  padding: var(--s-8);
  display: flex;
  justify-content: center;
}

/* --- Card -------------------------------------------------------------- */
.auth-page .auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
}
.auth-card-head {
  margin-bottom: 28px;
}

/* --- Back link --------------------------------------------------------- */
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  text-decoration: none;
}
.auth-back:hover {
  color: var(--accent);
  transform: translateX(-2px);
}

/* --- Social providers (zakomentované v HTML, pripravené na budúcnosť) --- */
.auth-providers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.auth-provider {
  width: 100%;
  justify-content: center;
  height: 46px;
  font-size: 14px;
}
.auth-provider-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 4px;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* --- Divider ----------------------------------------------------------- */
.auth-page .auth-divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.auth-page .auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}
.auth-page .auth-divider span {
  position: relative;
  background: var(--bg-card);
  padding: 0 12px;
}

/* --- Form -------------------------------------------------------------- */
.auth-page .auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-page .auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.auth-field-hint {
  font-size: 12px;
  color: var(--text-subtle);
  margin-top: -2px;
}

/* --- Input wrap -------------------------------------------------------- */
.auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 48px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 0.15s, background 0.15s;
}
.auth-input-wrap:focus-within {
  border-color: var(--accent);
  background: var(--bg-elev);
}
.auth-input-wrap > svg {
  color: var(--text-subtle);
  flex-shrink: 0;
}
.auth-input-wrap input,
.auth-input-wrap select {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  min-width: 0;
}
.auth-input-wrap select {
  cursor: pointer;
}
.auth-input-wrap select option {
  background: var(--bg-card);
  color: var(--text);
}
.auth-input-wrap--select {
  padding-right: 10px;
}
.auth-input-action {
  background: none;
  border: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 6px;
  flex-shrink: 0;
}
.auth-input-action:hover {
  color: var(--accent);
}

/* --- Password strength ------------------------------------------------- */
.auth-strength {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}
.auth-strength-bar {
  display: flex;
  gap: 4px;
  flex: 1;
}
.auth-strength-bar > span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.25s;
}
.auth-strength-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* --- Checkboxes -------------------------------------------------------- */
.auth-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-page .auth-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  user-select: none;
}
.auth-page .auth-check input {
  display: none;
}
.auth-check-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.15s;
  margin-top: 1px;
  color: transparent;
}
.auth-page .auth-check input:checked + .auth-check-box {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

/* --- Submit button ----------------------------------------------------- */
.auth-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  height: 52px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--accent-fg);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.auth-submit:hover {
  background: var(--accent-hover);
}
.auth-submit:active {
  transform: scale(0.98);
}
.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Links ------------------------------------------------------------- */
.auth-page .auth-link {
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.15s;
  text-decoration: none;
}
.auth-page .auth-link:hover {
  opacity: 0.75;
  text-decoration: underline;
}
.auth-link-sm {
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* --- Fine print -------------------------------------------------------- */
.auth-fineprint {
  margin: 24px 0 0;
  font-size: 12px;
  color: var(--text-subtle);
  text-align: center;
  line-height: 1.5;
}

/* --- Alerts (scoped override) ------------------------------------------ */
.auth-page .auth-alert {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.auth-page .auth-alert--error {
  background: oklch(0.35 0.12 25 / 0.25);
  border: 1px solid oklch(0.55 0.18 25 / 0.4);
  color: oklch(0.85 0.1 25);
}
.auth-page .auth-alert--info {
  background: oklch(0.35 0.12 155 / 0.25);
  border: 1px solid oklch(0.55 0.15 155 / 0.4);
  color: oklch(0.85 0.1 155);
}
[data-theme='light'] .auth-page .auth-alert--error {
  background: oklch(0.95 0.05 25);
  border-color: oklch(0.8 0.12 25);
  color: oklch(0.4 0.15 25);
}
[data-theme='light'] .auth-page .auth-alert--info {
  background: oklch(0.95 0.05 155);
  border-color: oklch(0.8 0.1 155);
  color: oklch(0.35 0.12 155);
}

/* --- Info card (forgot step 2) ----------------------------------------- */
.auth-page .auth-info-card {
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: var(--bg-inset);
  border: 1px solid var(--border);
}
.auth-page .auth-info-card-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 0;
}
.auth-page .auth-info-card-row + .auth-info-card-row {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 10px;
}
.auth-page .auth-info-card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.auth-page .auth-info-card-value {
  font-size: 15px;
  font-weight: 500;
}

/* --- Help steps (forgot step 1) ---------------------------------------- */
.auth-help {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.auth-help-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
}
.auth-help-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  width: 24px;
  padding-top: 2px;
}
.auth-help-item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.auth-help-item strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.auth-help-item span {
  font-size: 12px;
  color: var(--text-subtle);
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 980px) {
  .auth-page .auth-wrap {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: var(--s-6) var(--s-4);
  }
  .auth-side {
    padding: 0;
  }
  .auth-side-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .auth-page .auth-card {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .auth-page .auth-card {
    padding: 24px 16px;
    border-radius: var(--r-xl);
  }
  .auth-side-stats {
    gap: var(--s-3);
  }
  .auth-stat-num {
    font-size: 22px;
  }
}
