/* B2B Auth — login & register */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(217, 41, 79, 0.12), transparent),
    linear-gradient(180deg, var(--teal-50) 0%, #fff 45%);
}

.auth-header {
  background: linear-gradient(135deg, var(--teal-700) 0%, var(--cyan-600) 100%);
  color: #fff;
  box-shadow: var(--shadow);
}
.auth-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.auth-brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}
.auth-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.35);
}
.auth-brand-text h1 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.auth-brand-text span {
  font-size: 0.65rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-header-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: background 0.2s;
}
.auth-header-link:hover {
  background: rgba(255, 255, 255, 0.15);
}

.auth-main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}
.auth-main.auth-main-wide {
  max-width: 720px;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--teal-100);
  overflow: hidden;
}
.auth-card-head {
  padding: 28px 24px 20px;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, var(--teal-50) 100%);
}
.auth-card-head h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 8px;
}
.auth-card-head p {
  font-size: 0.875rem;
  color: var(--slate-600);
  line-height: 1.55;
  max-width: 420px;
  margin: 0 auto;
}

.auth-form {
  padding: 24px;
}
.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}
.auth-form-grid .auth-field-full {
  grid-column: 1 / -1;
}

.auth-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-600);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-field label .req {
  color: var(--teal-700);
}
.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--teal-900);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.auth-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.auth-field textarea {
  resize: vertical;
  min-height: 72px;
}
.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(228, 72, 103, 0.18);
}
.auth-field input::placeholder,
.auth-field textarea::placeholder {
  color: #94a3b8;
}

.auth-actions {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.2s, box-shadow 0.2s;
}
.auth-btn-primary {
  background: linear-gradient(135deg, var(--teal-700), var(--cyan-600));
  color: #fff;
  box-shadow: 0 4px 14px rgba(217, 41, 79, 0.28);
}
.auth-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(217, 41, 79, 0.35);
}
.auth-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.auth-footer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--slate-600);
}
.auth-footer a {
  color: var(--teal-700);
  font-weight: 600;
  text-decoration: none;
}
.auth-footer a:hover {
  color: var(--cyan-600);
}
.auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-note {
  margin-top: 20px;
  padding: 12px 14px;
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--slate-600);
  line-height: 1.5;
}

.auth-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(120%);
  max-width: calc(100vw - 32px);
  width: max-content;
  min-width: 260px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  pointer-events: none;
}
.auth-toast.show {
  transform: translateX(-50%) translateY(0);
}
.auth-toast.success {
  background: #ecfdf5;
  color: var(--green-dark);
  border: 1px solid #a7f3d0;
}
.auth-toast.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

@media (max-width: 600px) {
  .auth-main {
    padding: 20px 12px max(32px, env(safe-area-inset-bottom));
  }
  .auth-card-head {
    padding: 22px 18px 16px;
  }
  .auth-card-head h2 {
    font-size: 1.2rem;
  }
  .auth-form {
    padding: 18px 16px;
  }
  .auth-form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .auth-field input,
  .auth-field select,
  .auth-field textarea {
    font-size: 16px;
  }
  .auth-header-inner {
    padding: 12px 14px;
    padding-top: max(12px, env(safe-area-inset-top));
  }
  .auth-header-link {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  .auth-brand-text h1 {
    font-size: 0.92rem;
  }
  .auth-toast {
    bottom: max(24px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .auth-header-link {
    padding: 6px 8px;
    font-size: 0.7rem;
  }
}
