/* ================================================
   AUTH — strony logowania i rejestracji
   assets/css/pages/auth.css
   ================================================ */

/* ── Standalone page reset ── */
.auth-body {
  margin: 0;
  padding-top: 0;
  min-height: 100vh;
  background: #F8F7FF;
  font-family: var(--font-body, 'Inter', 'Arial', sans-serif);
}

/* ── Dwukolumnowy layout ── */
.auth-page {
  display: grid;
  grid-template-columns: 42% 58%;
  min-height: 100vh;
}

/* ================================================
   LEWA KOLUMNA — brand panel
   ================================================ */
.auth-brand {
  background: linear-gradient(150deg, #3B0764 0%, #5B21B6 40%, #7C3AED 75%, #9333EA 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 3.5rem 3rem 3.5rem 4.5rem;
  position: relative;
  overflow: hidden;
}

/* Dekoracyjne koła */
.auth-brand::before,
.auth-brand::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}
.auth-brand::before { width: 500px; height: 500px; top: -180px; right: -140px; }
.auth-brand::after  { width: 320px; height: 320px; bottom: -120px; left: -80px; }

/* Logo na lewym panelu */
.auth-brand__logo {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -.02em;
  color: #fff;
  text-decoration: none;
  margin-bottom: 3.5rem;
  position: relative;
  z-index: 1;
}
.auth-brand__logo-star { color: #E0A6F7; }

/* Nagłówek */
.auth-brand__tagline {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 1rem;
  position: relative;
  z-index: 1;
}
.auth-brand__tagline span { color: #E0A6F7; }

/* Podtytuł */
.auth-brand__desc {
  font-size: .97rem;
  color: rgba(255, 255, 255, .75);
  line-height: 1.65;
  max-width: 320px;
  margin: 0 0 2.5rem;
  position: relative;
  z-index: 1;
}

/* Lista cech */
.auth-brand__features {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}
.auth-brand__features li {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: rgba(255, 255, 255, .9);
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: .7rem;
}
.auth-brand__features li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #C4B5FD;
  flex-shrink: 0;
}

/* Statystyki */
.auth-brand__stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  position: relative;
  z-index: 1;
}
.auth-brand__stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.auth-brand__stat-label {
  font-size: .75rem;
  color: rgba(255, 255, 255, .65);
  margin-top: .2rem;
}

/* ================================================
   PRAWA KOLUMNA — panel formularza
   ================================================ */
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  background: #fff;
  overflow-y: auto;
}

.auth-panel__inner {
  width: 100%;
  max-width: 430px;
}

/* Logo w prawym panelu */
.auth-logo {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -.02em;
  color: #1A1A2E;
  text-decoration: none;
  margin-bottom: 2.75rem;
}
.auth-logo__star { color: var(--color-primary, #7C3AED); }

/* Tytuł strony */
.auth-heading {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1A1A2E;
  margin: 0 0 .35rem;
  letter-spacing: -.02em;
}
.auth-subheading {
  font-size: .9rem;
  color: #6B6B8A;
  margin: 0 0 2rem;
  line-height: 1.5;
}

/* ── Pola formularza ── */
.auth-field {
  margin-bottom: 1.1rem;
}

.auth-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: #3D3D5C;
  margin-bottom: .35rem;
  letter-spacing: .01em;
}

.auth-input {
  display: block;
  width: 100%;
  padding: .78rem 1rem;
  border: 1.5px solid #E2E0F0;
  border-radius: 10px;
  font-size: .93rem;
  color: #1A1A2E;
  background: #FAFAFA;
  transition: border-color .2s, box-shadow .2s, background .2s;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
  appearance: none;
}
.auth-input::placeholder { color: #B8B8D0; }
.auth-input:focus {
  border-color: var(--color-primary, #7C3AED);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .1);
  background: #fff;
}
.auth-input.is-invalid {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .08);
}

/* Hasło z przyciskiem pokaż */
.auth-pw-wrap { position: relative; }
.auth-pw-wrap .auth-input { padding-right: 2.75rem; }
.auth-pw-toggle {
  position: absolute;
  right: .8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
  color: #B8B8D0;
  display: flex;
  align-items: center;
  transition: color .2s;
}
.auth-pw-toggle:hover { color: var(--color-primary, #7C3AED); }

/* Link "zapomniałem hasła" */
.auth-forgot {
  display: block;
  text-align: right;
  font-size: .78rem;
  font-weight: 500;
  color: var(--color-primary, #7C3AED);
  text-decoration: none;
  margin-top: -.4rem;
  margin-bottom: 1.5rem;
}
.auth-forgot:hover { text-decoration: underline; }

/* ── Checkbox (regulamin) ── */
.auth-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-bottom: 1.25rem;
}
.auth-checkbox-wrap input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: .15rem;
  cursor: pointer;
}
.auth-checkbox-label {
  font-size: .82rem;
  color: #6B6B8A;
  line-height: 1.45;
}
.auth-checkbox-label a {
  color: var(--color-primary, #7C3AED);
  text-decoration: underline;
}

/* ── Główny przycisk ── */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .88rem 1.5rem;
  background: linear-gradient(135deg, #7C3AED, #9333EA);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  font-family: inherit;
  letter-spacing: .01em;
}
.auth-btn:hover {
  opacity: .92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, .3);
}
.auth-btn:active  { transform: translateY(0); opacity: 1; }
.auth-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Separator ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.5rem 0;
  color: #C5C5DC;
  font-size: .78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #EAE8F5;
}

/* ── Link pod formularzem ── */
.auth-bottom {
  margin-top: 1.75rem;
  text-align: center;
  font-size: .875rem;
  color: #6B6B8A;
}
.auth-bottom a {
  color: var(--color-primary, #7C3AED);
  text-decoration: none;
  font-weight: 600;
}
.auth-bottom a:hover { text-decoration: underline; }

/* ── Alerty ── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .9rem 1rem;
  border-radius: 10px;
  font-size: .875rem;
  margin-bottom: 1.35rem;
  line-height: 1.45;
}
.auth-alert svg { flex-shrink: 0; margin-top: .05rem; }
.auth-alert--error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}
.auth-alert--success {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #6EE7B7;
}
.auth-alert--info {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}
.auth-alert--warning {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FCD34D;
}

/* ── Karty wyboru typu konta (register.php) ── */
.auth-type-grid {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-bottom: 1.5rem;
}
.auth-type-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem 1.2rem;
  border: 2px solid #EAE8F5;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  color: #1A1A2E;
  transition: border-color .2s, box-shadow .2s, background .2s;
  background: #FAFAFA;
}
.auth-type-card:hover {
  border-color: var(--color-primary, #7C3AED);
  background: #FAF5FF;
  box-shadow: 0 4px 16px rgba(124, 58, 237, .1);
}
.auth-type-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #EDE9FE;
  color: var(--color-primary, #7C3AED);
  transition: background .2s;
}
.auth-type-card:hover .auth-type-card__icon {
  background: var(--color-primary, #7C3AED);
  color: #fff;
}
.auth-type-card__body { flex: 1; min-width: 0; }
.auth-type-card__title { font-weight: 700; font-size: .95rem; margin-bottom: .15rem; }
.auth-type-card__desc  { font-size: .78rem; color: #6B6B8A; }
.auth-type-card__arrow {
  color: #D4D4E8;
  flex-shrink: 0;
  transition: color .2s, transform .2s;
}
.auth-type-card:hover .auth-type-card__arrow {
  color: var(--color-primary, #7C3AED);
  transform: translateX(3px);
}

/* ── Wskaźnik siły hasła ── */
.auth-pw-strength {
  display: flex;
  gap: .3rem;
  margin-top: .45rem;
}
.auth-pw-strength__bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: #EAE8F5;
  transition: background .3s;
}
.auth-pw-strength__bar.pw-weak   { background: #EF4444; }
.auth-pw-strength__bar.pw-medium { background: #F59E0B; }
.auth-pw-strength__bar.pw-strong { background: #10B981; }

.auth-pw-hint {
  font-size: .73rem;
  color: #9A9ABA;
  margin-top: .35rem;
}

/* ── Sukces (weryfikacja email, reset hasła) ── */
.auth-success {
  text-align: center;
  padding: 1rem 0;
}
.auth-success__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ECFDF5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.auth-success__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1A1A2E;
  margin: 0 0 .6rem;
}
.auth-success__desc {
  font-size: .9rem;
  color: #6B6B8A;
  line-height: 1.6;
  margin: 0 0 2rem;
}

/* ── Formularz dwukolumnowy (na szerszych ekranach) ── */
.auth-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Placeholder na step-back link ── */
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: #6B6B8A;
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color .2s;
}
.auth-back:hover { color: var(--color-primary, #7C3AED); }

/* ================================================
   RESPONSYWNOŚĆ
   ================================================ */
@media (max-width: 800px) {
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    display: none; /* Ukryj brand panel na mobile */
  }
  .auth-panel {
    padding: 2.5rem 1.5rem;
    min-height: 100vh;
    align-items: flex-start;
  }
  .auth-panel__inner {
    padding-top: 1.5rem;
  }
  .auth-heading { font-size: 1.5rem; }
  .auth-row-2   { grid-template-columns: 1fr; }
}

@media (min-width: 801px) and (max-width: 1100px) {
  .auth-page { grid-template-columns: 38% 62%; }
  .auth-brand { padding: 3rem 2.5rem 3rem 3rem; }
  .auth-brand__tagline { font-size: 1.75rem; }
}
