/* ПРИЗВАНЯ — страница входа / регистрации */

html, body.auth-page {
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--color-cream);
}

.auth-nav {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-cream);
  position: sticky;
  top: 0;
  z-index: 100;
}

.auth-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
}

.auth-nav-link:hover { color: var(--color-red); }

.login-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-lg);
  align-items: stretch;
  min-height: calc(100vh - 80px);
  position: relative;
  z-index: 1;
}

.login-form-section {
  animation: fadeInLeft 0.8s ease-out;
  min-width: 0;
  width: 100%;
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.login-header { margin-bottom: var(--space-lg); }

.login-header h1,
.f-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-sm);
  letter-spacing: 0;
  line-height: 1.15;
  word-break: break-word;
}

.login-header p,
.f-sub {
  font-size: 16px;
  color: var(--color-text-light);
  margin-bottom: 0;
  line-height: 1.6;
}

.f-sub b { color: var(--color-red); font-weight: 500; cursor: pointer; }
.f-sub b:hover { text-decoration: underline; }

/* Tabs */
.tab-switcher,
.tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  border-bottom: 2px solid var(--color-border);
  background: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.tab-btn,
.tab {
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--color-text-light);
  position: relative;
  flex: none;
  border-radius: 0;
  box-shadow: none;
}

.tab-btn.active,
.tab.act {
  color: var(--color-navy);
  background: transparent;
}

.tab-btn.active::after,
.tab.act::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-red);
  display: block;
  animation: none;
}

.tab-btn:hover:not(.active),
.tab:hover:not(.act) { color: var(--color-navy); }

/* Fields */
.field,
.form-group { margin-bottom: var(--space-md); }

.f-label,
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.inp-w { position: relative; }

.inp-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
}

input[type=text],
input[type=email],
input[type=password],
.form-input {
  width: 100%;
  padding: 14px 44px 14px 44px;
  font-size: 15px;
  font-family: var(--font-sans);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-cream-light);
  transition: all 0.3s;
  outline: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.form { display: flex; flex-direction: column; gap: 0; }

input:focus {
  border-color: var(--color-navy);
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(33, 40, 66, 0.1);
}

input.err { border-color: var(--err) !important; animation: shake 0.3s ease; }

.pwd-eye {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-light);
  padding: 4px;
}

.form-options {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: var(--space-md);
  margin-top: -8px;
}

.forgot {
  font-size: 14px;
  color: var(--color-red);
  font-weight: 500;
  cursor: pointer;
  text-align: right;
}

.forgot:hover { text-decoration: underline; opacity: 1; }

.btn-sub,
.submit-btn {
  width: 100%;
  padding: 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--color-navy);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
  margin-bottom: var(--space-md);
  box-shadow: none;
  position: relative;
}

.btn-sub::after { display: none; }

.btn-sub:hover {
  background: var(--color-red);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(78, 0, 0, 0.2);
}

.pz-theme.auth-page .btn-sub:hover {
  transform: translateY(-2px) !important;
}

.btn-sub.loading { pointer-events: none; opacity: 0.8; }

.divider {
  text-align: center;
  margin: var(--space-md) 0;
  position: relative;
  color: var(--color-text-light);
  font-size: 14px;
  display: block;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--color-border);
  flex: none;
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* Decor panel */
.login-decor-section {
  background: var(--color-navy);
  padding: var(--space-lg);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  min-height: 420px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--color-white);
  animation: fadeInRight 0.8s ease-out;
  min-width: 0;
}

.decor-ornament {
  position: absolute;
  width: 300px;
  height: 300px;
  opacity: 0.1;
  animation: rotateOrnament 120s linear infinite;
  pointer-events: none;
}

.decor-ornament svg { width: 100%; height: 100%; }

.decor-content {
  position: relative;
  z-index: 2;
  max-width: 320px;
}

.decor-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: var(--space-md);
  color: var(--color-white);
  font-weight: 700;
  line-height: 1.2;
}

.decor-content p {
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: var(--space-lg);
}

.decor-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.decor-stat-number {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-xs);
}

.decor-stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

/* Checkbox, pwd strength, errors */
.f-err { font-size: 12px; color: var(--err); display: none; margin-top: 4px; }
.f-err.show { display: block; }

.pwd-str { margin-top: 8px; display: none; }
.pwd-str.show { display: block; }
.str-bars { display: flex; gap: 4px; margin-bottom: 4px; }
.str-bar { flex: 1; height: 3px; border-radius: 2px; background: var(--color-border); }
.str-bar.w { background: var(--err); }
.str-bar.m { background: var(--warn); }
.str-bar.s { background: var(--ok); }
.str-lbl { font-size: 12px; color: var(--color-text-light); }

.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--color-text-light); cursor: pointer; margin-bottom: var(--space-sm); line-height: 1.5; }
.check-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--color-red); margin-top: 3px; display: block; flex-shrink: 0; }
.check-row .check-text { flex: 1; min-width: 0; }
.check-text a { color: var(--color-navy); }

.back-link { font-size: 14px; color: var(--color-text-light); cursor: pointer; margin-bottom: var(--space-md); display: inline-block; }
.back-link:hover { color: var(--color-navy); }

.code-hint { font-size: 13px; color: var(--color-text-light); text-align: center; margin-top: 12px; }
.code-hint b { color: var(--color-red); cursor: pointer; }

.oauth-banner { display: none; margin-bottom: 16px; padding: 12px 14px; border-radius: 4px; background: rgba(224,54,54,.08); border: 1px solid rgba(224,54,54,.2); color: var(--err); font-size: 13px; }
.oauth-banner.show { display: block; }

.success-wrap { display: none; text-align: center; padding: 24px 0; }
.success-wrap.show { display: block; animation: fadeInLeft 0.5s ease; }
.form.hide { display: none; }

.s-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--color-navy);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.s-h { font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--color-navy); margin-bottom: 8px; }
.s-p { font-size: 14px; color: var(--color-text-light); }

.btn-loader { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.btn-sub.loading .btn-loader { display: flex; }
.btn-sub.loading .btn-txt { opacity: 0; }
.ring { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin 0.7s linear infinite; }

@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .login-container { grid-template-columns: 1fr; padding: var(--space-lg) var(--space-md); min-height: auto; }
  .login-decor-section { display: none; }
}
