/* ============================================================
   AUTH SCREEN
   ============================================================ */
.auth-section {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg3);
  align-items: center;
  justify-content: center;
}
.auth-section.active { display: flex; }

.theme-toggle-auth {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border2);
  background: var(--bg);
  color: var(--txt2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
}
.theme-toggle-auth:hover { background: var(--bg2); color: var(--txt); }

.auth-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 420px;
  padding: 24px;
}

.auth-header { text-align: center; }

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.logo-img {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  object-fit: cover;
  display: block;
}

.logo-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--txt);
  letter-spacing: -0.5px;
}

.auth-tagline {
  font-size: 14px;
  color: var(--txt2);
}

.auth-card {
  width: 100%;
  background: var(--bg);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

/* Вкладки auth */
.auth-tabs {
  display: flex;
  background: var(--bg3);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: none;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--txt2);
  transition: all var(--ease);
}

.auth-tab.active {
  background: var(--bg);
  color: var(--txt);
  box-shadow: var(--shadow-sm);
}

/* Поля форм */
.auth-form { display: none; }
.auth-form.active { display: block; }

.field-group { margin-bottom: 16px; }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--txt2);
  margin-bottom: 6px;
}

.optional {
  font-weight: 400;
  color: var(--txt3);
  font-size: 12px;
}

.field-input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border2);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--txt);
  font-size: 14px;
  transition: border-color var(--ease), box-shadow var(--ease);
  outline: none;
}

.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.field-input::placeholder { color: var(--txt3); }

.field-password {
  position: relative;
}

.field-password .field-input {
  padding-right: 42px;
}

.password-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--txt3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--ease);
}
.password-eye:hover { color: var(--txt); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-prefix {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border2);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.field-prefix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.prefix-at {
  padding: 0 10px;
  color: var(--txt3);
  font-size: 14px;
  background: var(--bg3);
  border-right: 1.5px solid var(--border2);
  height: 100%;
  display: flex;
  align-items: center;
  user-select: none;
}
.field-prefix .field-input {
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.field-prefix .field-input:focus {
  box-shadow: none;
  border: none;
}

.auth-error {
  padding: 10px 13px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--r-sm);
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 14px;
}

