/* ══════════════════════════════════════════════════════
   WritingReview – belépő oldal (index.html)
   app.css UTÁN töltődik, annak tokenjeire épül
   ══════════════════════════════════════════════════════ */

body.auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ── BAL PANEL ── */
.left-panel {
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.left-panel::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,80,10,0.35) 0%, transparent 70%);
  pointer-events: none;
}
.left-panel .brand { font-size: 1.6rem; color: #fff; }

.hero-text { z-index: 1; }
.hero-text h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1.2rem;
}
.hero-text h1 em { font-style: normal; color: var(--accent); }
.hero-text p {
  color: #aaa9a5;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 340px;
  font-weight: 300;
}

.step-list { display: flex; flex-direction: column; gap: 1rem; z-index: 1; }
.step { display: flex; align-items: center; gap: 1rem; }
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step p { color: #888; font-size: 0.85rem; font-weight: 300; }

/* ── JOBB PANEL ── */
.right-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
}
.auth-card .subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* ── FÜLVÁLTÓ ── */
.tabs {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.8rem;
}
.tab-btn {
  flex: 1;
  padding: 0.65rem;
  border: none;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn.active { background: var(--ink); color: #fff; }

/* ── REGISZTRÁCIÓ: diák / tanár választó (csak ott látszik, ahol be van kapcsolva) ── */
.szerep-valaszto { margin-bottom: 0; }
.szerep-valaszto .tab-btn[aria-checked="true"] { background: var(--ink); color: #fff; }

/* ── TANÁRI REGISZTRÁCIÓ: e-mail-megerősítés ── */
.megerosites h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.megerosites p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 1.2rem; }
.megerosites .btn-google { margin-top: 0.6rem; }
.megerosites .btn-kilepes {
  display: block; margin: 1rem auto 0; background: none; border: none;
  color: var(--muted); font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer;
}

/* ── FORM: a belépő oldalon teljes szélességű gombok ── */
.auth-card .form-group { margin-bottom: 1rem; }
.auth-card .btn-primary {
  display: block;
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  margin-top: 0.5rem;
  text-align: center;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.2rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  width: 100%;
  padding: 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.btn-google:hover { border-color: #aaa; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.btn-google:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-google svg { width: 18px; height: 18px; }

/* ── ÁTIRÁNYÍTÁS OVERLAY ── */
#redirect-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  color: var(--muted);
}
#redirect-overlay.show { display: flex; }
.big-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@media (max-width: 700px) {
  body.auth-page { grid-template-columns: 1fr; }
  .left-panel { display: none; }
  .right-panel { padding: 2rem 1.2rem; }
}

/* ══════════════════════════════════════════════════════
   TELEPÍTŐ SÁV (pwa.js)

   Rejtve indul, és a pwa.js nyitja ki – csak ha van mit felkínálni,
   és nem telepített appból nézik.
   ══════════════════════════════════════════════════════ */
.telepito {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.telepito-fo {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.telepito-ikon { flex-shrink: 0; line-height: 0; }
.telepito-ikon img { border-radius: 8px; display: block; }
.telepito-fo strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.15rem;
}
.telepito-fo span {
  display: block;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}
.btn-telepito {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--card, #fff);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn-telepito:hover { border-color: var(--accent); background: var(--accent-light); }
.btn-telepito:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.telepito-tipp {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--paper);
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}
.telepito-tipp p + p { margin-top: 0.55rem; }
.telepito-tipp strong { color: var(--ink); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .btn-telepito { transition: none; }
}

/* Nyelvválasztó a belépő lapon (világos háttéren) */
.right-panel { position: relative; }
.nyelv-hely { position: absolute; top: 1rem; right: 1rem; }
.auth-page .nyelvvalaszto { color: var(--muted); border-color: var(--border); }
.auth-page .nyelvvalaszto:hover { color: var(--text, #111); border-color: var(--text, #111); }

/* belépő űrlap: elfelejtett jelszó (tanár) és útmutató (diák) */
.auth-card #btn-elfelejtett {
 display: block; margin: 0.9rem auto 0; background: none; border: none;
 color: var(--muted); font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer;
}
.auth-card .jelszo-sugo { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.85rem; line-height: 1.5; text-align: center; }
