/*
 * Partner sign-in (/msp/partner-sign-in) — no Tailwind; CSP-safe (no inline styles).
 * Load after oauth-provider-buttons.css for SSO button chrome.
 */

.psp-page {
  box-sizing: border-box;
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #0f172a;
  background-color: #f1f5f9;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(99, 102, 241, 0.12), transparent 55%),
    linear-gradient(to bottom, #f8fafc, #f1f5f9);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem 2rem;
}

.psp-page *,
.psp-page *::before,
.psp-page *::after {
  box-sizing: border-box;
}

.psp-trust-row {
  width: 100%;
  max-width: 28rem;
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.psp-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
}

.psp-trust-pill strong {
  color: #0f172a;
  font-weight: 600;
}

.psp-icon-sm {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #059669;
}

.psp-main {
  width: 100%;
  max-width: 28rem;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #fff;
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(15, 23, 42, 0.02);
  overflow: hidden;
}

.psp-hero {
  padding: 2.25rem 1.5rem 0.25rem;
  text-align: center;
}

@media (min-width: 640px) {
  .psp-hero {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.psp-hero-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.psp-hero-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom right, #4f46e5, #6d28d9);
  box-shadow:
    0 10px 15px -3px rgba(79, 70, 229, 0.25),
    0 0 0 4px rgba(99, 102, 241, 0.1);
}

.psp-hero-icon svg {
  width: 2rem;
  height: 2rem;
  color: #fff;
}

.psp-hero h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #0f172a;
}

@media (min-width: 640px) {
  .psp-hero h1 {
    font-size: 1.5rem;
  }
}

.psp-hero-lede {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
}

.psp-step-section {
  padding: 1rem 1.5rem 1.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .psp-step-section {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.psp-footnote {
  margin: 1rem auto 0;
  max-width: 24rem;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.6;
}

#partner-email-err {
  margin: 0 1.5rem 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #fde68a;
  background: #fffbeb;
  font-size: 0.875rem;
  color: #422006;
}

@media (min-width: 640px) {
  #partner-email-err {
    margin-left: 2rem;
    margin-right: 2rem;
  }
}

.psp-or-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 2rem;
}

.psp-or-line {
  height: 1px;
  flex: 1;
  max-width: 6.5rem;
  background: #e2e8f0;
}

.psp-or-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #94a3b8;
}

.psp-step2 {
  padding: 1.75rem 1.5rem;
  text-align: center;
  border-top: 1px solid #f1f5f9;
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0.98), #f8fafc);
}

@media (min-width: 640px) {
  .psp-step2 {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.psp-step2-copy {
  margin: 0 auto 1rem;
  max-width: 24rem;
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.6;
  text-align: left;
}

.psp-mail-tip {
  margin: 0 auto 1rem;
  max-width: 24rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e9d5ff;
  background: rgba(250, 245, 255, 0.65);
  font-size: 0.6875rem;
  line-height: 1.55;
  color: #5b21b6;
  text-align: left;
}

@media (min-width: 640px) {
  .psp-step2-copy {
    text-align: center;
  }
}

.psp-email-form {
  margin: 0 auto;
  max-width: 24rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  text-align: left;
}

.psp-email-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
}

.psp-email-form input[type="email"] {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 0.875rem;
  color: #0f172a;
}

.psp-email-form input[type="email"]::placeholder {
  color: #94a3b8;
}

.psp-email-form input[type="email"]:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.25);
}

.psp-submit {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: 0.5rem;
  background: #6d28d9;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(109, 40, 217, 0.2);
}

.psp-submit:hover:not(:disabled) {
  background: #5b21b6;
}

.psp-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.psp-msg {
  margin-top: 0.25rem;
  min-height: 3rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #0f172a;
  background: #f8fafc;
}

.psp-msg--sending {
  color: #334155;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.psp-msg--ok {
  color: #065f46;
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.psp-msg--err {
  color: #7f1d1d;
  background: #fef2f2;
  border-color: #fecaca;
}

.psp-msg--neterr {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.psp-step2-onboard {
  margin: 1rem 0 0;
  text-align: center;
}

.psp-onboard-link {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6d28d9;
  text-decoration: underline;
  text-decoration-color: #c4b5fd;
}

.psp-onboard-link:hover {
  color: #5b21b6;
}

.psp-inline-link {
  color: #5b21b6;
  font-weight: 600;
  text-decoration: underline;
}

details.ca-partner-details {
  border-top: 1px solid #f1f5f9;
  background: #fff;
  padding: 1.25rem 1.5rem;
}

@media (min-width: 640px) {
  details.ca-partner-details {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

details.ca-partner-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

details.ca-partner-details summary::-webkit-details-marker {
  display: none;
}

.ca-partner-details .psp-details-chev {
  color: #94a3b8;
  font-size: 1.125rem;
  line-height: 1;
}

.ca-partner-details .psp-details-body {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.6;
}

.ca-partner-details code {
  font-size: 10px;
  background: #f1f5f9;
  padding: 0.1rem 0.25rem;
  border-radius: 0.25rem;
  color: #1e293b;
}

.ca-partner-details .psp-invite-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
}

.ca-partner-details input[type="text"] {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  background: rgba(248, 250, 252, 0.9);
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
  color: #0f172a;
}

.ca-partner-details input[type="text"]::placeholder {
  color: #94a3b8;
}

.ca-partner-details input[type="text"]:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.35);
}

.psp-invite-btn {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: 0.5rem;
  background: #0f172a;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.psp-invite-btn:hover {
  background: #1e293b;
}

.psp-footer {
  width: 100%;
  max-width: 28rem;
  margin-top: 2.5rem;
  padding: 0 1rem;
  text-align: center;
}

.psp-footer p {
  margin: 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.6;
}

.psp-footer a {
  color: #334155;
  font-weight: 500;
  text-decoration: none;
}

.psp-footer a:hover {
  color: #4338ca;
}

.psp-footer-muted {
  margin-top: 0.5rem !important;
  color: #94a3b8 !important;
}

.psp-footer-muted a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #e2e8f0;
}

.psp-footer-muted a:hover {
  color: #475569;
}
