/* NCCI Figma-aligned common layout and branding CSS */
/* Shared across all login/auth pages */

html,
html.login-template-layout {
  height: 100%;
  margin: 0;
  padding: 0;
}

body,
body.login-template-layout {
  height: 100%;
  overflow-y: auto;
  margin: 0;
  padding: 0;
}

.login-template,
.recover-userid-template {
  --fg-page-bg: #f3f5f7;
  --fg-panel-bg: #0b1120;
  --fg-panel-fg: #e2e8f0;
  --fg-panel-muted: rgba(226, 232, 240, 0.72);
  --fg-card-border: #d8dee5;
  --fg-input-border: #d5dbe3;
  --fg-input-focus: #2563a6;
  --fg-primary: #008afe;
  --fg-primary-hover: #007ae0;
  --fg-text: #0f172a;
  --fg-muted: #64748b;
  --fg-link: #008afe;
  --fg-error: #b42318;
  --fg-error-bg: #fef0f0;
  --fg-error-border: #fecdca;
  min-height: 100vh;
  background: var(--fg-page-bg);
  color: var(--fg-text);
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.ping-container.login-template,
.ping-container.recover-userid-template {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: 100%;
}

.login-template .ping-layout,
.recover-userid-template .ping-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(460px, 1fr) minmax(420px, 1fr);
}

/* Brand Pane - Left Side */
.login-template .brand-pane,
.recover-userid-template .brand-pane {
  position: relative;
  overflow: hidden;
  background: rgb(0, 138, 254);
  color: var(--fg-panel-fg);
  padding: clamp(34px, 5vw, 56px) clamp(30px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-template .brand-pane-decoration,
.recover-userid-template .brand-pane-decoration {
  position: absolute;
  pointer-events: none;
  filter: blur(12px);
}

.login-template .brand-pane-decoration-top,
.recover-userid-template .brand-pane-decoration-top {
  inset: -20% -20% auto auto;
  width: 85%;
  aspect-ratio: 1 / 1;
  background: radial-gradient(
    closest-side,
    rgba(255, 255, 255, 0.28),
    transparent 65%
  );
}

.login-template .brand-pane-decoration-bottom,
.recover-userid-template .brand-pane-decoration-bottom {
  inset: auto auto -30% -25%;
  width: 85%;
  aspect-ratio: 1 / 1;
  filter: blur(10px);
  background: radial-gradient(
    closest-side,
    rgba(255, 255, 255, 0.22),
    transparent 65%
  );
}

.login-template .brand-grid,
.recover-userid-template .brand-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(at 30% 40%, black 30%, transparent 75%);
  mask-image: radial-gradient(at 30% 40%, black 30%, transparent 75%);
}

.login-template .brand-content,
.login-template .brand-footer,
.recover-userid-template .brand-content,
.recover-userid-template .brand-footer {
  position: relative;
  z-index: 2;
}

.login-template .brand-logo-row,
.recover-userid-template .brand-logo-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(34px, 5vw, 54px);
}

.login-template .brand-copy,
.recover-userid-template .brand-copy {
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-panel-muted);
  border-left: 1px solid rgba(226, 232, 240, 0.22);
  padding-left: 12px;
}

.login-template .brand-copy span,
.recover-userid-template .brand-copy span {
  display: inline-block;
  color: rgba(148, 163, 184, 0.95);
  margin-top: 2px;
}

.login-template .brand-title,
.recover-userid-template .brand-title {
  max-width: 560px;
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.9);
}

.login-template .brand-subtitle,
.recover-userid-template .brand-subtitle {
  max-width: 540px;
  margin: 0;
  color: var(--fg-panel-muted);
  font-size: 15px;
  line-height: 1.6;
}

.login-template .brand-stats,
.recover-userid-template .brand-stats {
  margin-top: 34px;
  max-width: 520px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.login-template .brand-stat,
.recover-userid-template .brand-stat {
  border-top: 1px solid rgba(226, 232, 240, 0.22);
  padding-top: 10px;
}

.login-template .brand-stat .label,
.recover-userid-template .brand-stat .label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.95);
  margin-bottom: 4px;
}

.login-template .brand-stat .value,
.recover-userid-template .brand-stat .value {
  display: block;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login-template .brand-footer,
.recover-userid-template .brand-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  font-size: 11px;
  color: rgb(45 49 54 / 95%);
  text-transform: none;
  letter-spacing: 0.01em;
}

.login-template .status,
.recover-userid-template .status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-copyright {
  flex: 1 1 auto;
  white-space: nowrap;
  flex-wrap: nowrap;
  line-height: 1.35;
}

.login-template .brand-legal-links,
.recover-userid-template .brand-legal-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  white-space: nowrap;
}

.login-template .brand-legal-links a,
.recover-userid-template .brand-legal-links a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 11px;
}

.login-template .brand-legal-links a:hover,
.login-template .brand-legal-links a:focus,
.recover-userid-template .brand-legal-links a:hover,
.recover-userid-template .brand-legal-links a:focus {
  text-decoration: underline;
}

.login-template .brand-legal-links .divider,
.recover-userid-template .brand-legal-links .divider {
  color: rgba(255, 255, 255, 0.72);
}

.login-template .status .copyright-mark,
.recover-userid-template .status .copyright-mark {
  display: inline-block;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-1px);
}

/* Form Pane - Right Side */
.login-template .form-pane,
.recover-userid-template .form-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  background: linear-gradient(180deg, #f8fafb 0%, var(--fg-page-bg) 100%);
  margin: 0;
}

.login-template .form-shell,
.recover-userid-template .form-shell {
  width: 100%;
  max-width: 430px;
}

.login-template .mobile-brand,
.recover-userid-template .mobile-brand {
  display: none;
}

.login-template .ping-header,
.recover-userid-template .ping-header {
  display: none;
}

.login-template .ping-body-container,
.recover-userid-template .ping-body-container {
  margin: 0;
  max-width: none;
  padding: 18px 0 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  text-align: left;
}

.login-template .ping-title,
.recover-userid-template .ping-title {
  margin: 0 0 8px;
  color: var(--fg-text);
  font-size: 29px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.login-template .ping-subtitle,
.recover-userid-template .ping-subtitle {
  margin: 0 0 22px;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.55;
}

.login-template #divAlert,
.login-template .ping-error,
.recover-userid-template #divAlert,
.recover-userid-template .ping-error {
  border-radius: 10px;
  border: 1px solid var(--fg-error-border);
  background: var(--fg-error-bg);
  color: var(--fg-error);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.login-template #divAlert,
.recover-userid-template #divAlert {
  margin-bottom: 12px;
}

.login-template .ping-messages,
.recover-userid-template .ping-messages {
  margin-bottom: 14px;
}

.login-template .ping-messages > div,
.recover-userid-template .ping-messages > div {
  margin: 0 0 8px;
}

.login-template .ping-input-label,
.recover-userid-template .ping-input-label {
  width: auto;
  margin: 0;
  float: none;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.login-template .inline-actions,
.recover-userid-template .inline-actions {
  display: inline-flex;
  align-items: center;
}

.login-template .forgot-password,
.recover-userid-template .forgot-password {
  color: var(--fg-link);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.login-template .forgot-password:hover,
.login-template .forgot-password:focus,
.recover-userid-template .forgot-password:hover,
.recover-userid-template .forgot-password:focus {
  text-decoration: underline;
}

.login-template .ping-footer-container,
.recover-userid-template .ping-footer-container {
  position: static;
  width: auto;
  height: auto;
  margin-top: 18px;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

.login-template .account-actions,
.recover-userid-template .account-actions {
  text-align: center;
  margin: 6px 0 0;
}

.login-template .ping-copyright,
.recover-userid-template .ping-copyright {
  display: block;
}

.login-template .ping-input-link a,
.recover-userid-template .ping-input-link a {
  color: var(--fg-link);
  font-weight: 600;
  text-decoration: none;
}

.login-template .ping-input-link a:hover,
.login-template .ping-input-link a:focus,
.recover-userid-template .ping-input-link a:hover,
.recover-userid-template .ping-input-link a:focus {
  text-decoration: underline;
}

/* Buttons - Shared */
.login-template .ping-button,
.recover-userid-template .ping-button {
  width: 100%;
  margin: 0;
  height: 44px;
  line-height: 44px;
  border-radius: 10px;
  font-size: 14px;
  letter-spacing: 0.01em;
}

/* Shared forgot/change flows */
.forgot-password-template .back-button,
.forgot-password-change-template .back-button,
.forgot-password-error-template .back-button,
.forgot-password-success-template .back-button,
.change-password-template .back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.forgot-password-template .back-button:hover,
.forgot-password-template .back-button:focus,
.forgot-password-change-template .back-button:hover,
.forgot-password-change-template .back-button:focus,
.forgot-password-error-template .back-button:hover,
.forgot-password-error-template .back-button:focus,
.forgot-password-success-template .back-button:hover,
.forgot-password-success-template .back-button:focus,
.change-password-template .back-button:hover,
.change-password-template .back-button:focus {
  color: var(--fg-text);
  text-decoration: none;
}

.forgot-password-template .back-button svg,
.forgot-password-change-template .back-button svg,
.forgot-password-error-template .back-button svg,
.forgot-password-success-template .back-button svg,
.change-password-template .back-button svg {
  width: 16px;
  height: 16px;
}

.forgot-password-template .ping-buttons,
.forgot-password-change-template .ping-buttons,
.forgot-password-error-template .ping-buttons,
.forgot-password-success-template .ping-buttons,
.change-password-template .ping-buttons {
  margin: 18px 0 0;
  width: 100%;
  display: flex;
  gap: 8px;
}

.forgot-password-template .ping-buttons input[type='hidden'],
.forgot-password-change-template .ping-buttons input[type='hidden'],
.forgot-password-success-template .ping-buttons input[type='hidden'],
.change-password-template .ping-buttons input[type='hidden'] {
  display: none !important;
}

.forgot-password-template .ping-button,
.forgot-password-change-template .ping-button,
.forgot-password-error-template .ping-button,
.change-password-template .ping-button {
  width: calc(50% - 4px);
  flex: 1 1 0;
  height: 44px;
  line-height: 44px;
  border-radius: 10px;
  border: 0;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.forgot-password-template .ping-button.secondary,
.forgot-password-change-template .ping-button.secondary,
.forgot-password-error-template .ping-button.secondary,
.change-password-template .ping-button.secondary {
  background: #fff;
  border: 1px solid var(--fg-card-border);
  color: #334155;
}

.forgot-password-template .ping-button.secondary:hover,
.forgot-password-change-template .ping-button.secondary:hover,
.forgot-password-error-template .ping-button.secondary:hover,
.change-password-template .ping-button.secondary:hover {
  background: #f8fafc;
}

.forgot-password-template .ping-button.normal.allow,
.forgot-password-change-template .ping-button.normal.allow,
.forgot-password-error-template .ping-button.normal.allow,
.forgot-password-success-template .ping-button.normal.allow,
.change-password-template .ping-button.normal.allow {
  background: var(--fg-primary);
  color: #fff;
}

.forgot-password-template .ping-button.normal.allow:hover,
.forgot-password-change-template .ping-button.normal.allow:hover,
.forgot-password-error-template .ping-button.normal.allow:hover,
.forgot-password-success-template .ping-button.normal.allow:hover,
.change-password-template .ping-button.normal.allow:hover {
  background: var(--fg-primary-hover);
}

.forgot-password-template .ping-input-link.ping-pass-change,
.forgot-password-change-template .ping-input-link.ping-pass-change,
.forgot-password-error-template .ping-input-link.ping-pass-change,
.forgot-password-success-template .ping-input-link.ping-pass-change,
.change-password-template .ping-input-link.ping-pass-change {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--fg-muted);
}

.forgot-password-change-template .ping-input-link.ping-pass-change,
.forgot-password-error-template .ping-input-link.ping-pass-change,
.change-password-template .ping-input-link.ping-pass-change {
  justify-content: flex-end;
}

.forgot-password-template .ping-input-link.ping-pass-change,
.forgot-password-success-template .ping-input-link.ping-pass-change {
  justify-content: center;
}

.forgot-password-template .support-info,
.forgot-password-change-template .support-info,
.forgot-password-error-template .support-info,
.forgot-password-success-template .support-info,
.change-password-template .support-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-family: Consolas, 'Courier New', monospace;
}

.forgot-password-template .support-info svg,
.forgot-password-change-template .support-info svg,
.forgot-password-error-template .support-info svg,
.forgot-password-success-template .support-info svg,
.change-password-template .support-info svg {
  width: 14px;
  height: 14px;
}

.forgot-password-template .ping-footer-container,
.forgot-password-change-template .ping-footer-container,
.forgot-password-error-template .ping-footer-container,
.forgot-password-success-template .ping-footer-container,
.change-password-template .ping-footer-container {
  position: static;
  width: auto;
  height: auto;
  margin-top: 18px;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

/* Responsive */
@media (max-width: 1080px) {
  .login-template .ping-layout,
  .recover-userid-template .ping-layout {
    grid-template-columns: 1fr;
  }

  .forgot-password-template .ping-header,
  .forgot-password-change-template .ping-header,
  .forgot-password-error-template .ping-header,
  .forgot-password-success-template .ping-header,
  .change-password-template .ping-header {
    margin-bottom: 18px;
  }

  .login-template .brand-pane,
  .recover-userid-template .brand-pane {
    display: none;
  }

  .login-template .mobile-brand,
  .recover-userid-template .mobile-brand {
    display: block;
    margin-bottom: 16px;
  }

  .login-template .ping-header,
  .recover-userid-template .ping-header {
    display: none;
  }
}

@media (max-width: 640px) {
  .login-template .form-pane,
  .recover-userid-template .form-pane {
    padding: 24px 16px;
  }

  .login-template .ping-title,
  .recover-userid-template .ping-title {
    font-size: 25px;
  }
}
