/* login.php — вход / регистрация (без header) */

body.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0,255,179,0.06), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0,208,255,0.04), transparent 50%),
    var(--bg-deep);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.auth-container {
  max-width: 440px;
  width: 100%;
  padding: var(--sp-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card {
  background: var(--bg-soft);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.02) inset;
}

.auth-logo { display: flex; justify-content: center; margin-bottom: var(--sp-5); }
.auth-logo .logo {
  font-size: 1.8rem;
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
  color: white;
}
.auth-logo .logo i {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.6rem;
}

.auth-welcome { text-align: center; margin-bottom: var(--sp-6); }
.auth-title {
  font-size: 1.4rem;
  font-weight: 400;
  color: white;
  margin-bottom: var(--sp-2);
  letter-spacing: -0.02em;
}
.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 300;
  line-height: 1.4;
}

.tab-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
  background: var(--bg-card);
  padding: var(--sp-1);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
  margin-bottom: var(--sp-6);
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.9rem;
  font-weight: 400;
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}
.tab-btn.active {
  background: var(--accent-light);
  color: #0b0e12;
}
.tab-btn:not(.active):hover { color: var(--text-secondary); }

.role-switcher {
  display: flex;
  gap: var(--sp-2);
  background: var(--bg-card);
  padding: var(--sp-1);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
  margin-bottom: var(--sp-2);
}
.role-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
  transition: 0.2s ease;
}
.role-btn.active { background: rgba(0,255,179,0.12); color: var(--accent-light); border: 1px solid rgba(0,255,179,0.25); }

.auth-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.auth-form .form-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.auth-form .form-label { display: flex; align-items: center; gap: var(--sp-2); color: var(--text-secondary); font-size: 0.82rem; }
.auth-form .form-label .required-mark { color: var(--accent-light); font-style: normal; }
.auth-form .input-wrapper { position: relative; display: flex; align-items: center; }
.auth-form .input-icon { position: absolute; left: var(--sp-4); color: var(--text-tertiary); font-size: 0.9rem; pointer-events: none; z-index: 1; }
.auth-form .form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: var(--sp-3) var(--sp-4) var(--sp-3) 44px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-form .form-input:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(0,255,179,0.08);
}
.auth-form .password-toggle {
  position: absolute;
  right: var(--sp-4);
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.auth-form .password-toggle:hover { color: var(--accent-light); }
.auth-form .form-options { display: flex; align-items: center; justify-content: space-between; margin: var(--sp-1) 0; flex-wrap: wrap; gap: var(--sp-2); }
.auth-form .checkbox { display: flex; align-items: flex-start; gap: var(--sp-2); color: var(--text-secondary); font-size: 0.82rem; line-height: 1.4; cursor: pointer; }
.auth-form .checkbox input { width: 16px; height: 16px; accent-color: var(--accent-light); margin-top: 2px; flex-shrink: 0; }
.auth-form .forgot-link { color: var(--text-tertiary); text-decoration: none; font-size: 0.82rem; white-space: nowrap; }
.auth-form .forgot-link:hover { color: var(--accent-light); }

.password-strength { display: flex; align-items: center; gap: var(--sp-3); margin-top: 2px; }
.strength-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.06); border-radius: var(--radius-full); overflow: hidden; }
.strength-fill { height: 100%; width: 0; border-radius: var(--radius-full); transition: width 0.3s, background 0.3s; background: #ff5f5f; }
.strength-fill.weak { background: #ff5f5f; }
.strength-fill.fair { background: #ffb347; }
.strength-fill.good { background: #ffd700; }
.strength-fill.strong { background: #00e6b3; }
.strength-fill.excellent { background: var(--accent-light); }
.strength-label { font-size: 0.7rem; color: var(--text-tertiary); min-width: 60px; text-align: right; }
.strength-label.weak { color: #ff8a8a; }
.strength-label.fair { color: #ffb347; }
.strength-label.good { color: #ffd700; }
.strength-label.strong, .strength-label.excellent { color: var(--accent-light); }

.field-hint { font-size: 0.75rem; margin-top: 2px; }
.match-hint.ok { color: var(--success); }
.match-hint.err { color: #ff8a8a; }

.seller-info-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  background: rgba(0,255,179,0.05);
  border: 1px solid rgba(0,255,179,0.12);
  border-radius: var(--radius-lg);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-2);
}
.seller-info-banner i { font-size: 1.4rem; color: var(--accent-light); margin-top: 2px; }
.seller-info-banner strong { display: block; color: white; font-size: 0.9rem; font-weight: 400; margin-bottom: 2px; }
.seller-info-banner p { font-size: 0.78rem; color: var(--text-tertiary); margin: 0; }

.register-fields { display: none; }
.register-fields.active, .register-fields.seller-panel { display: flex; flex-direction: column; gap: var(--sp-3); }

.auth-form .btn-primary {
  background: var(--accent-gradient);
  border: none;
  padding: var(--sp-4);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 500;
  color: #0b0e12;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  cursor: pointer;
  margin-top: var(--sp-2);
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
}
.auth-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,255,179,0.25);
}
.auth-form .btn-primary:active { transform: translateY(0); }

.auth-benefits {
  margin-top: var(--sp-4);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border-glass);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
.benefit-item { text-align: center; }
.benefit-item i { font-size: 1.2rem; color: var(--accent-light); margin-bottom: var(--sp-2); display: block; }
.benefit-item span { display: block; font-size: 0.68rem; color: var(--text-tertiary); line-height: 1.3; }

.auth-footer {
  text-align: center;
  margin-top: var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.auth-footer a {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.auth-footer a:hover { color: var(--accent-light); }
.auth-footer-sep { color: var(--text-tertiary); opacity: 0.4; font-size: 0.8rem; }

.auth-lang-picker {
  position: fixed;
  bottom: var(--sp-4);
  right: var(--sp-4);
  z-index: 10;
}
.auth-lang-picker select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-4);
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  line-height: 1.4;
}
.alert i { flex-shrink: 0; margin-top: 2px; }
.alert-error { background: rgba(255,95,95,0.1); border: 1px solid rgba(255,95,95,0.3); color: #ff8a8a; }
.alert-success { background: rgba(0,255,179,0.08); border: 1px solid rgba(0,255,179,0.2); color: var(--accent-light); }

@media (max-width: 480px) {
  .auth-container { padding: var(--sp-3); }
  .auth-card { padding: var(--sp-5) var(--sp-4); border-radius: var(--radius-lg); }
  .auth-title { font-size: 1.2rem; }
  .auth-subtitle { font-size: 0.8rem; }
  .tab-btn { font-size: 0.82rem; padding: var(--sp-2) var(--sp-3); }
  .auth-benefits { grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
  .benefit-item span { font-size: 0.62rem; }
  .benefit-item i { font-size: 1rem; }
  .auth-lang-picker { bottom: var(--sp-3); right: var(--sp-3); }
}
