/* Product Backstage Theme */
/* Color palette: Light cyan (#c2ebff) with teal/blue accents */

/* Scope CSS variables to backstage body to avoid conflicts with other product themes */
body[data-product="backstage"] {
  --product-bg: #F3FBFF;
  --product-btn: #002852;
  --product-wave1: #EBF4FE;
  --product-wave1-opacity: 1;
  --product-wave2: #EBF4FE;
  --product-wave2-opacity: 1;
  --product-text: #4a5565;

  /* Background */
  background-color: var(--product-bg);
  position: relative;
  overflow: hidden;
  height: 100vh;
  max-height: 100vh;
}

/* Override old layout - make full width centered */
body[data-product="backstage"] #layout-main {
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  max-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px;
}

body[data-product="backstage"] #container {
  height: 100vh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}

body[data-product="backstage"] #left-area {
  width: 100%;
  max-width: 600px;
  float: none;
  background: transparent;
  margin: 0 auto;
  height: auto;
  min-height: 0;
  padding: 0;
}

body[data-product="backstage"] .inner-form {
  width: 100%;
  padding-top: 0;
  margin: 0;
  padding: 0;
}

/* Override old form heading styles */
body[data-product="backstage"] .inner-form h3 {
  font-family: 'Roboto', sans-serif;
  padding-top: 0;
}

/* Wave shapes - decorative background elements */
body[data-product="backstage"]::before {
  content: '';
  position: absolute;
  width: 900px;
  height: 463px;
  top: -40px;
  left: 50px;
  background-image: url('./images/shape1.svg');
  background-size: contain;
  background-repeat: no-repeat;
  transform: rotate(180deg);
  transform-origin: center center;
  opacity: var(--product-wave1-opacity);
  animation: wave-float-1 9s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

body[data-product="backstage"]::after {
  content: '';
  position: absolute;
  width: 900px;
  height: 463px;
  top: auto;
  bottom: -40px;
  left: auto;
  right: 50px;
  background-image: url('./images/shape2.svg');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: var(--product-wave2-opacity);
  animation: wave-float-2 8s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

/* Wave animations - floating motion */
@keyframes wave-float-1 {
  0%, 100% {
    transform: translate(0, 0) rotate(180deg);
  }
  50% {
    transform: translate(15px, 10px) rotate(180deg);
  }
}

@keyframes wave-float-2 {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-15px, -10px);
  }
}

/* Button styling */
body[data-product="backstage"] .cta-button,
body[data-product="backstage"] button[type="submit"] {
  background-color: var(--product-btn);
  border-color: var(--product-btn);
}

body[data-product="backstage"] .cta-button:hover,
body[data-product="backstage"] button[type="submit"]:hover {
  background-color: #001a3a;
  border-color: #001a3a;
}

/* Text colors */
body[data-product="backstage"] .footer-text,
body[data-product="backstage"] .page-footer {
  color: var(--product-text);
}

/* Product branding */
body[data-product="backstage"] .product-branding .backstage-logo {
  max-width: 180px;
  height: auto;
}

body[data-product="backstage"] .product-branding {
  margin-bottom: 16px;
}

body[data-product="backstage"] .product-tagline {
  color: var(--product-text);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.3125px;
}

/* Main section container */
body[data-product="backstage"] .main-login-section {
  position: relative;
  z-index: 10;
  background: white;
  border-radius: 16px;
  box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 32px;
  max-width: 480px;
  margin: 0 auto;
}

/* Login card positioning */
body[data-product="backstage"] .login-card,
body[data-product="backstage"] #signin {
  position: relative;
  z-index: 10;
  background: white;
  border-radius: 16px;
  box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Form title */
body[data-product="backstage"] .main-login-section h3 {
  font-size: 24px;
  font-weight: 600;
  line-height: 36px;
  letter-spacing: 0.0703px;
  color: var(--product-btn);
  margin: 24px 0 16px 0;
  text-align: center;
}

/* Form elements */
body[data-product="backstage"] input[type="text"],
body[data-product="backstage"] input[type="email"],
body[data-product="backstage"] input[type="password"] {
  height: 44px;
  background: #f3f3f5;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.1504px;
  color: #4a5565;
}

body[data-product="backstage"] input::placeholder {
  color: #717182;
}

/* Primary CTA button */
body[data-product="backstage"] button[type="submit"],
body[data-product="backstage"] .cta-button {
  height: 44px;
  border-radius: 10px;
  background-color: var(--product-btn);
  border-color: var(--product-btn);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.1504px;
  transition: background-color 0.6s ease-in-out;
}

/* Google Sign-in button - see complete styles below at line 443 */

/* Checkbox */
body[data-product="backstage"] input[type="checkbox"] {
  border: 1px solid #e5e7eb;
  background: #f3f3f5;
  border-radius: 4px;
}

body[data-product="backstage"] input[type="checkbox"]:checked {
  background: #002852;
  border-color: #002852;
}

/* Form labels */
body[data-product="backstage"] label,
body[data-product="backstage"] .form-group label,
body[data-product="backstage"] .simplified-login-form label {
  font-family: 'Poppins', sans-serif !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: -0.1504px;
  color: #212832;
}

/* Footer text transition */
body[data-product="backstage"] .footer-text,
body[data-product="backstage"] .page-footer,
body[data-product="backstage"] .page-footer a {
  transition: color 0.6s ease-in-out;
}

/* Tablet and below - smooth transition */
@media (max-width: 710px) {
  body[data-product="backstage"] {
    overflow-x: hidden;
  }

  body[data-product="backstage"] #layout-main {
    padding: 10px;
    overflow-y: auto;
  }

  body[data-product="backstage"] #container {
    width: 100%;
    padding: 0;
  }

  body[data-product="backstage"] #left-area {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  body[data-product="backstage"] .inner-form {
    padding: 0;
    margin: 0;
  }

  body[data-product="backstage"]::before,
  body[data-product="backstage"]::after {
    opacity: 0.2;
  }

  body[data-product="backstage"] .main-login-section {
    padding: 28px 24px;
    max-width: 100%;
    width: 100%;
    margin: 0;
  }
}

/* Tablet - medium screens */
@media (max-width: 768px) {
  body[data-product="backstage"]::before,
  body[data-product="backstage"]::after {
    opacity: 0.15;
  }

  body[data-product="backstage"] .product-branding .backstage-logo {
    max-width: 140px;
  }

  body[data-product="backstage"] .product-tagline {
    font-size: 14px;
    line-height: 20px;
  }

  body[data-product="backstage"] .main-login-section {
    padding: 24px 20px;
  }

  body[data-product="backstage"] .product-title {
    font-size: 20px;
    line-height: 30px;
  }

  body[data-product="backstage"] .product-description {
    font-size: 14px;
    line-height: 20px;
  }
}

/* Small tablet */
@media (max-width: 640px) {
  body[data-product="backstage"] .main-login-section {
    padding: 22px 18px;
  }
}

/* Product selector tabs */
body[data-product="backstage"] .product-selector {
  display: flex;
  gap: 8px;
  margin-top: 0;
  margin-bottom: 32px;
  background: #eef0f2;
  border-radius: 10px;
  padding: 4px;
}

body[data-product="backstage"] .product-tab {
  flex: 1;
  padding: 10.5px 16px;
  background: #eef0f2;
  border: none;
  color: #4c5560;
  cursor: pointer;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.3125px;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-align: center;
}

body[data-product="backstage"] .product-tab:hover {
  background: #ffffff;
  color: #212832;
}

body[data-product="backstage"] .product-tab.active {
  background: white;
  box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px -1px rgba(0, 0, 0, 0.1);
  color: #212832;
}

/* Product header */
body[data-product="backstage"] .product-header {
  text-align: center;
  margin-bottom: 24px;
}

body[data-product="backstage"] .product-title {
  font-size: 24px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  line-height: 36px;
  letter-spacing: 0.0703px;
  color: #212832;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-product="backstage"] .product-title-logo {
  display: inline-flex;
  align-items: center;
}

body[data-product="backstage"] .product-title-logo img {
  height: 24px;
  width: auto;
  display: block;
}

body[data-product="backstage"] .product-description {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 24px;
  letter-spacing: -0.3125px;
  color: #4a5565;
  margin: 0;
  padding: 0;
}

/* Footer text */
body[data-product="backstage"] .signin-footer-text {
  text-align: center;
  margin-top: 16px;
}

body[data-product="backstage"] .signin-footer-text p {
  font-size: 12px;
  line-height: 16px;
  color: #717182;
  margin: 0;
}

/* Card sizing */
body[data-product="backstage"] .main-login-section {
  max-width: 420px;
  padding: 32px;
  margin: 0 auto;
}

/* Form elements */
body[data-product="backstage"] input[type="text"],
body[data-product="backstage"] input[type="email"],
body[data-product="backstage"] input[type="password"] {
  width: 100%;
  height: 44px;
  background: #f6f7f8;
  border: 1px solid #e5e6ec;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 20px;
  letter-spacing: -0.1504px;
  color: #212832;
  padding: 4px 12px;
  box-sizing: border-box;
}

body[data-product="backstage"] input::placeholder {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 300;
  color: #9ca8b5;
}

/* Primary button */
body[data-product="backstage"] button[type="submit"],
body[data-product="backstage"] .cta-button,
body[data-product="backstage"] .btn {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  background-color: var(--product-btn);
  border-color: var(--product-btn);
  border: none;
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.1504px;
  font-weight: 500;
  cursor: pointer;
  text-transform: none;
}

/* or divider */
body[data-product="backstage"] .divider-or {
  text-align: center;
  margin: 16px 0;
  position: relative;
}

body[data-product="backstage"] .divider-or::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #e5e7eb;
}

body[data-product="backstage"] .divider-or span {
  background: white;
  padding: 0 12px;
  position: relative;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  color: #4c5560;
  font-size: 14px;
}

/* Google button */
body[data-product="backstage"] .oauth-button,
body[data-product="backstage"] .google-signin-button,
body[data-product="backstage"] #google-signin-btn {
  width: 100%;
  height: 48px !important;
  background: white !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: none !important;
  color: #364153 !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  text-decoration: none !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 14px !important;
  font-weight: 500;
  padding: 12px 16px !important;
  box-sizing: border-box !important;
  position: relative !important;
  text-transform: none !important;
  line-height: 20px !important;
  letter-spacing: -0.1504px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

body[data-product="backstage"] .google-signin-button:hover,
body[data-product="backstage"] #google-signin-btn:hover {
  background: #f9fafb !important;
}

body[data-product="backstage"] .google-icon {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
  display: block !important;
  margin-right: 8px !important;
}

body[data-product="backstage"] .google-signin-button span,
body[data-product="backstage"] #google-signin-btn span {
  display: inline-block;
  color: #364153;
}

/* Override old pconsole.css styles for Google button */
body[data-product="backstage"] #google-signin-btn .image,
body[data-product="backstage"] a#google-signin-btn .image {
  display: none !important;
}

body[data-product="backstage"] .oauth-providers {
  margin-bottom: 0 !important;
  gap: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

/* Checkbox */
body[data-product="backstage"] input[type="checkbox"] {
  border: 1px solid #e5e7eb;
  background: #f3f3f5;
  border-radius: 4px;
}

/* Simplified form */
body[data-product="backstage"] .simplified-login-form {
  width: 100%;
}

body[data-product="backstage"] .simplified-login-form .form-group {
  margin-bottom: 12px;
}

body[data-product="backstage"] .simplified-login-form .form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #364153;
}

body[data-product="backstage"] .simplified-login-form .password-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

body[data-product="backstage"] .simplified-login-form .forgot-link {
  font-size: 12px;
  color: #717182;
  text-decoration: none;
}

body[data-product="backstage"] .simplified-login-form .checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 14px;
}

body[data-product="backstage"] .simplified-login-form .form-actions {
  margin-top: 16px;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body[data-product="backstage"] .simplified-login-form .btn-secondary {
  background: white;
  color: #364153;
  border: 1px solid #e5e7eb;
  box-shadow: none;
  text-shadow: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.1504px;
}

body[data-product="backstage"] .one-time-link-form .btn-secondary {
  background: white;
  color: #364153;
  border: 1px solid #e5e7eb;
  box-shadow: none;
  text-shadow: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.1504px;
}

body[data-product="backstage"] .one-time-link-form .btn-secondary:hover {
  background: #f9fafb;
}

/* Footer */
body[data-product="backstage"] .signin-footer-text {
  text-align: center;
  margin-top: 16px;
}

body[data-product="backstage"] .signin-footer-text p {
  font-size: 12px;
  line-height: 16px;
  color: #717182;
  margin: 0;
}

body[data-product="backstage"] .bottom-support-link {
  position: relative;
  margin-top: 24px;
  text-align: center;
  z-index: 100;
}

body[data-product="backstage"] .bottom-support-link a {
  font-size: 14px;
  color: #002852;
  text-decoration: none;
}

/* Hide old authFooter */
body[data-product="backstage"] .authFooter {
  display: none !important;
}

/* Taboola logo in top left corner */
body[data-product="backstage"] .taboola-logo-header {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 1000;
  width: 100px;
  height: 24px;
  pointer-events: none;
}

body[data-product="backstage"] .taboola-logo {
  height: 24px;
  width: auto;
  max-width: 100%;
  display: block;
  opacity: 1;
  filter: none;
  pointer-events: auto;
}

/* Support link styling - only link on "Contact Support" */
body[data-product="backstage"] .bottom-support-link span {
  color: #002852;
  font-size: 14px;
}

@media (max-width: 480px) {
  body[data-product="backstage"] {
    overflow-x: hidden;
    min-height: 100vh;
  }

  body[data-product="backstage"] #layout-main {
    padding: 10px;
    min-height: 100vh;
  }

  body[data-product="backstage"] #container {
    overflow-x: hidden;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  body[data-product="backstage"] #left-area {
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  body[data-product="backstage"] .inner-form {
    padding: 0;
    margin: 0;
    width: 100%;
  }

  body[data-product="backstage"]::before {
    top: -5%;
    bottom: 55%;
    left: -20%;
    right: 40%;
    opacity: 0.1;
  }

  body[data-product="backstage"]::after {
    top: 55%;
    bottom: -5%;
    left: 40%;
    right: -20%;
    opacity: 0.1;
  }

  body[data-product="backstage"] .product-selector {
    flex-direction: row;
    gap: 4px;
  }

  body[data-product="backstage"] .product-selector .product-tab {
    padding: 8px 10px;
    font-size: 14px;
  }

  body[data-product="backstage"] .main-login-section {
    padding: 20px 16px;
    border-radius: 12px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
  }

  body[data-product="backstage"] .product-title {
    font-size: 18px;
    line-height: 26px;
  }

  body[data-product="backstage"] .product-description {
    font-size: 13px;
    line-height: 18px;
  }

  body[data-product="backstage"] .taboola-logo-header {
    position: fixed;
    top: 12px;
    left: 12px;
    width: 70px;
    height: 18px;
  }

  body[data-product="backstage"] .taboola-logo {
    height: 18px;
    max-width: 70px;
  }

  body[data-product="backstage"] .bottom-support-link {
    margin-top: 16px;
    padding: 0 12px;
  }

  body[data-product="backstage"] .simplified-login-form .form-group {
    margin-bottom: 10px;
  }

  body[data-product="backstage"] .product-header {
    margin-bottom: 20px;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  body[data-product="backstage"] #layout-main {
    padding: 10px;
  }

  body[data-product="backstage"] #left-area {
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  body[data-product="backstage"] .main-login-section {
    padding: 16px 12px;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
  }

  body[data-product="backstage"] .product-tab {
    font-size: 14px;
    padding: 8px 12px;
  }

  body[data-product="backstage"] .taboola-logo-header {
    position: fixed;
    top: 8px;
    left: 8px;
    width: 60px;
    height: 16px;
  }

  body[data-product="backstage"] .taboola-logo {
    height: 16px;
    max-width: 60px;
  }
}

/* Auth Pages (Password Management, Magic Link, etc.) */
body[data-product="backstage"].auth-page-v2 {
  background-color: var(--product-bg);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

body[data-product="backstage"] .auth-page-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  z-index: 10;
  position: relative;
}

body[data-product="backstage"] .auth-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 420px;
  width: 100%;
  padding: 40px 32px;
  margin: 20px;
}

body[data-product="backstage"] .auth-card-header {
  margin-bottom: 24px;
}

body[data-product="backstage"] .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

body[data-product="backstage"] .back-link:hover {
  color: #374151;
}

body[data-product="backstage"] .auth-title {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px 0;
  text-align: center;
}

body[data-product="backstage"] .auth-description {
  color: #6b7280;
  font-size: 14px;
  line-height: 20px;
  margin: 0 0 32px 0;
  text-align: center;
}

body[data-product="backstage"] .form-field-wrapper {
  margin-bottom: 24px;
}

body[data-product="backstage"] .form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

body[data-product="backstage"] .auth-card input[type="email"],
body[data-product="backstage"] .auth-card input[type="text"],
body[data-product="backstage"] .auth-card input[type="password"] {
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  background: #f6f7f8;
  border: 1px solid #e5e6ec;
  border-radius: 10px;
  font-size: 14px;
  color: #111827;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body[data-product="backstage"] .auth-card input::placeholder {
  color: #9ca3af;
}

body[data-product="backstage"] .auth-card input:focus {
  outline: none;
  border-color: rgba(82, 168, 236, 0.8);
  box-shadow: 0 0 8px rgba(82, 168, 236, 0.6);
}

body[data-product="backstage"] .auth-card .btn-primary-themed {
  width: 100%;
  height: 44px;
  background: var(--product-btn);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-transform: capitalize;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

body[data-product="backstage"] .auth-card .btn-primary-themed:hover {
  background: #212832;
  transform: translateY(-1px);
}

body[data-product="backstage"] .auth-card .btn-primary-themed:active {
  transform: translateY(0);
}

body[data-product="backstage"] .support-link {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  margin-top: 24px;
}

body[data-product="backstage"] .support-link a {
  color: var(--product-btn);
  text-decoration: underline;
}

body[data-product="backstage"] .support-link a:hover {
  color: #001d3d;
}

/* Hide old elements */
body[data-product="backstage"] .auth-card .blueLink {
  display: none;
}

/* Updated: Support link outside card */
body[data-product="backstage"] .support-link-external {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 24px;
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}

body[data-product="backstage"] .support-link-external a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
}

body[data-product="backstage"] .support-link-external a:hover {
  color: white;
}

/* Updated: Narrower card */
body[data-product="backstage"] .auth-card {
  max-width: 380px;
  padding: 32px 28px;
}

/* Updated: Back button at top of card */
body[data-product="backstage"] .back-link {
  margin-bottom: 20px;
}

/* Hide old support link inside card */
body[data-product="backstage"] .support-link {
  display: none;
}

/* Fix: Container needs position relative for absolute support link */
body[data-product="backstage"] .auth-page-container {
  position: relative;
  padding-bottom: 80px;
}

/* Updated: Back button with subtle background */
body[data-product="backstage"] .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 20px;
  transition: background-color 0.2s, border-color 0.2s;
}

body[data-product="backstage"] .back-link:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

/* Auth Pages - Updated to match Figma */
body[data-product="backstage"].auth-page-v2 {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body[data-product="backstage"] .auth-card {
  max-width: 480px;
  padding: 32px;
  gap: 32px;
  display: flex;
  flex-direction: column;
}

body[data-product="backstage"] .back-link {
  gap: 12px;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.3125px;
  padding: 10.5px 24px 8px 8px;
  border-radius: 10px;
  width: fit-content;
}

body[data-product="backstage"] .auth-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 36px;
  letter-spacing: 0.0703px;
}

body[data-product="backstage"] .auth-description {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.3125px;
}

body[data-product="backstage"] .form-label {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: -0.1504px;
}

body[data-product="backstage"] .auth-card input[type="email"],
body[data-product="backstage"] .auth-card input[type="text"],
body[data-product="backstage"] .auth-card input[type="password"] {
  padding: 4px 12px;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  line-height: 21px;
  letter-spacing: -0.1504px;
}

body[data-product="backstage"] .auth-card .btn-primary-themed {
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  line-height: 20px;
  letter-spacing: -0.1504px;
}

body[data-product="backstage"] .support-link-external {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  line-height: 20px;
  letter-spacing: -0.1504px;
}

body[data-product="backstage"] .passwd-article {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0;
}

body[data-product="backstage"] .fields {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

body[data-product="backstage"] .form-field-wrapper {
  margin-bottom: 0;
  gap: 8px;
}

body[data-product="backstage"] .form-actions {
  margin: 0;
}

/* ========================================
   Auth Confirmation Pages (Password Reset, Magic Link)
   ======================================== */

body[data-product="backstage"]#passwd-init-thanks .auth-card,
body[data-product="backstage"]#passwd-reminder-thanks .auth-card,
body[data-product="backstage"]#magic-link-thanks .auth-card {
  max-width: 480px;
  padding: 32px;
  gap: 32px;
  align-items: center;
  text-align: center;
}

body[data-product="backstage"]#passwd-init-thanks .success-icon,
body[data-product="backstage"]#passwd-reminder-thanks .success-icon,
body[data-product="backstage"]#magic-link-thanks .success-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

body[data-product="backstage"]#passwd-init-thanks .auth-title,
body[data-product="backstage"]#passwd-reminder-thanks .auth-title,
body[data-product="backstage"]#magic-link-thanks .auth-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 36px;
  letter-spacing: 0.0703px;
  color: #212832;
  margin: 0;
}

body[data-product="backstage"]#passwd-init-thanks .auth-description,
body[data-product="backstage"]#passwd-reminder-thanks .auth-description,
body[data-product="backstage"]#magic-link-thanks .auth-description {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.3125px;
  color: #4C5560;
  margin: 0;
}

body[data-product="backstage"]#passwd-init-thanks .btn-back-signin,
body[data-product="backstage"]#passwd-reminder-thanks .btn-back-signin,
body[data-product="backstage"]#magic-link-thanks .btn-back-signin {
  width: 100%;
  height: 44px;
  background: #002852;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.1504px;
  color: #FFFFFF;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

body[data-product="backstage"]#passwd-init-thanks .btn-back-signin:hover,
body[data-product="backstage"]#passwd-reminder-thanks .btn-back-signin:hover,
body[data-product="backstage"]#magic-link-thanks .btn-back-signin:hover {
  background: #001a3a;
}

/* Hide back button on confirmation page */
body[data-product="backstage"]#passwd-init-thanks .back-link,
body[data-product="backstage"]#passwd-reminder-thanks .back-link,
body[data-product="backstage"]#magic-link-thanks .back-link {
  display: none;
}

/* ========================================
   2FA / Two-Step Verification Page
   ======================================== */

body[data-product="backstage"]#twoStepAuthMethod {
  background-color: var(--product-bg);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Hide default layout elements */
body[data-product="backstage"]#twoStepAuthMethod #right-area {
  display: none;
}

body[data-product="backstage"]#twoStepAuthMethod #container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  background: transparent;
  position: relative;
}

body[data-product="backstage"]#twoStepAuthMethod #layout-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  padding: 0;
  min-height: 100vh;
}

body[data-product="backstage"]#twoStepAuthMethod #left-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  float: none !important;
  position: static;
  background: transparent !important;
}

body[data-product="backstage"]#twoStepAuthMethod .inner-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: transparent !important;
  padding: 0;
  margin: 0;
}

/* Logo - positioned top-left, dark color (matching login page) */
body[data-product="backstage"]#twoStepAuthMethod .taboolaLogoSVG,
body[data-product="backstage"]#twoStepAuth .taboolaLogoSVG,
body[data-product="backstage"]#emailVerificationCode .taboolaLogoSVG {
  position: fixed;
  top: 16px;
  left: 16px;
  width: 100px;
  height: 24px;
  z-index: 100;
}

body[data-product="backstage"]#twoStepAuthMethod .taboolaLogoSVG g,
body[data-product="backstage"]#twoStepAuth .taboolaLogoSVG g,
body[data-product="backstage"]#emailVerificationCode .taboolaLogoSVG g {
  fill: #002852 !important;
}

/* 2FA Card Container */
body[data-product="backstage"] .twoStepAuthMethod-article {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 480px;
  max-width: calc(100% - 40px);
}

/* 2FA Card */
body[data-product="backstage"] .tfa-card {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 480px;
  max-width: 100%;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}

body[data-product="backstage"] .tfa-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 36px;
  letter-spacing: 0.0703px;
  color: #212832;
  text-align: center;
  margin: 0;
  padding: 0;
}

/* Method Tabs */
body[data-product="backstage"] .tfa-method-tabs {
  display: flex;
  gap: 8px;
  background: #EEF0F2;
  border-radius: 10px;
  padding: 4px;
}

body[data-product="backstage"] .tfa-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10.5px 8px;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.3125px;
  color: #4C5560;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

body[data-product="backstage"] .tfa-tab svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

body[data-product="backstage"] .tfa-tab:hover {
  background: rgba(255, 255, 255, 0.5);
}

body[data-product="backstage"] .tfa-tab.active {
  background: #FFFFFF;
  color: #212832;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px -1px rgba(0, 0, 0, 0.1);
}

body[data-product="backstage"] .tfa-tab.active svg {
  color: #212832;
}

/* Panels */
body[data-product="backstage"] .tfa-panel {
  display: none;
  flex-direction: column;
  gap: 24px;
  min-height: 320px;
}

body[data-product="backstage"] .tfa-panel.active {
  display: flex;
}

body[data-product="backstage"] .tfa-description {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.3125px;
  color: #4C5560;
  text-align: center;
  margin: 0;
}

/* Form Fields */
body[data-product="backstage"] .tfa-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body[data-product="backstage"] .tfa-label {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 14px;
  letter-spacing: -0.1504px;
  color: #212832;
}

body[data-product="backstage"] .tfa-input {
  width: 100%;
  height: 44px;
  padding: 4px 12px;
  background: #F6F7F8;
  border: 1px solid #E5E6EC;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 21px;
  letter-spacing: -0.1504px;
  color: #212832;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body[data-product="backstage"] .tfa-input::placeholder {
  color: #9CA8B5;
}

body[data-product="backstage"] .tfa-input:focus {
  outline: none;
  border-color: rgba(82, 168, 236, 0.8);
  box-shadow: 0 0 8px rgba(82, 168, 236, 0.6);
}

body[data-product="backstage"] .tfa-input-readonly {
  width: 100%;
  height: 44px;
  padding: 4px 12px;
  background: #F6F7F8;
  border: 1px solid #E5E6EC;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 36px;
  letter-spacing: -0.1504px;
  color: #9CA8B5;
  box-sizing: border-box;
}

/* Fields Container */
body[data-product="backstage"] .tfa-fields-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* SMS Panel - Two-field layout using CSS Grid */
body[data-product="backstage"] .tfa-panel-sms .tfa-field-group {
  display: grid;
  grid-template-areas:
    "country-label"
    "country-input"
    "number-label"
    "number-input";
  gap: 8px;
}

body[data-product="backstage"] .tfa-panel-sms .tfa-label-country {
  grid-area: country-label;
}

body[data-product="backstage"] .tfa-panel-sms .tfa-label-number {
  grid-area: number-label;
  margin-top: 16px;
}

body[data-product="backstage"] .tfa-panel-sms .intl-tel-input {
  grid-area: country-input;
  display: block;
  width: 100%;
}

body[data-product="backstage"] .tfa-panel-sms .phone-num-input {
  grid-area: number-input;
}

/* Style the intl-tel-input (country code selector) */
body[data-product="backstage"] .tfa-panel .intl-tel-input .phone-code-input {
  width: 100%;
  height: 44px;
  padding: 4px 12px 4px 52px;
  background: #F6F7F8;
  border: 1px solid #E5E6EC;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 21px;
  letter-spacing: -0.1504px;
  color: #212832;
  box-sizing: border-box;
  cursor: pointer;
}

body[data-product="backstage"] .tfa-panel .intl-tel-input .flag-dropdown {
  background: transparent;
  border: none;
  border-radius: 10px 0 0 10px;
  height: 100%;
}

body[data-product="backstage"] .tfa-panel .intl-tel-input .selected-flag {
  width: 48px;
  height: 100%;
  border-radius: 10px 0 0 10px;
  background: transparent;
  display: flex;
  align-items: center;
  padding-left: 12px;
}

body[data-product="backstage"] .tfa-panel .intl-tel-input .selected-flag .arrow {
  display: none;
}

body[data-product="backstage"] .tfa-panel .intl-tel-input .selected-flag:hover {
  background: rgba(0, 0, 0, 0.03);
}

body[data-product="backstage"] .tfa-panel .intl-tel-input .country-list {
  border-radius: 10px;
  box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.15);
  border: 1px solid #E5E6EC;
  max-height: 250px;
  width: 100%;
  min-width: 300px;
}

body[data-product="backstage"] .tfa-panel .intl-tel-input .country-list .country {
  padding: 10px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
}

body[data-product="backstage"] .tfa-panel .intl-tel-input .country-list .country.highlight {
  background: #F6F7F8;
}

/* Phone number input */
body[data-product="backstage"] .tfa-panel .phone-num-input {
  width: 100%;
  height: 44px;
  padding: 4px 12px;
  background: #F6F7F8;
  border: 1px solid #E5E6EC;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 21px;
  letter-spacing: -0.1504px;
  color: #212832;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body[data-product="backstage"] .tfa-panel .phone-num-input::placeholder {
  color: #9CA8B5;
}

body[data-product="backstage"] .tfa-panel .phone-num-input:focus {
  outline: none;
  border-color: rgba(82, 168, 236, 0.8);
  box-shadow: 0 0 8px rgba(82, 168, 236, 0.6);
}

/* QR Code */
body[data-product="backstage"] .tfa-qr-container {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

body[data-product="backstage"] .tfa-qr-code {
  width: 150px;
  height: 150px;
}

/* Submit Button */
body[data-product="backstage"] .tfa-actions {
  margin-top: 8px;
}

body[data-product="backstage"] .tfa-submit-btn {
  width: 100%;
  height: 44px;
  background: #002852;
  border: none;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.1504px;
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

body[data-product="backstage"] .tfa-submit-btn:hover {
  background: #001a3a;
}

body[data-product="backstage"] .tfa-submit-btn .tfa-btn-text-login {
  display: none;
}

body[data-product="backstage"] .tfa-submit-btn.show-login .tfa-btn-text-send {
  display: none;
}

body[data-product="backstage"] .tfa-submit-btn.show-login .tfa-btn-text-login {
  display: inline;
}

body[data-product="backstage"] button.tfa-cancel-btn {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  background: white;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.1504px;
  color: #364153;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

body[data-product="backstage"] button.tfa-cancel-btn:hover {
  background: #f9fafb;
  background-color: #f9fafb;
}

/* Footer - Outside card, on background */
body[data-product="backstage"] .tfa-footer {
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.1504px;
  color: #4C5560;
  position: relative;
  z-index: 10;
}

body[data-product="backstage"] .tfa-footer a {
  color: #4C5560;
  text-decoration: underline;
}

body[data-product="backstage"] .tfa-footer a:hover {
  color: #364153;
}

/* Error styling */
body[data-product="backstage"] .tfa-error {
  color: #DC2626;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  margin-top: 4px;
}

/* Hide old elements */
body[data-product="backstage"]#twoStepAuthMethod .authFooter {
  display: none !important;
}

body[data-product="backstage"]#twoStepAuthMethod .twoStepAuthMethod-article > p {
  display: none;
}

/* Mobile responsive */
@media (max-width: 480px) {
  body[data-product="backstage"] .tfa-card {
    padding: 24px 20px;
    margin: 10px;
  }

  body[data-product="backstage"] .tfa-tab {
    font-size: 14px;
    padding: 8px 4px;
  }

  body[data-product="backstage"] .tfa-tab span {
    display: none;
  }

  body[data-product="backstage"] .tfa-tab svg {
    width: 20px;
    height: 20px;
  }
}

/* ========================================
   2FA Code Verification Page (#twoStepAuth)
   This is the page shown after method selection
   ======================================== */

body[data-product="backstage"]#twoStepAuth,
body[data-product="backstage"]#emailVerificationCode {
  background-color: var(--product-bg);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Hide default layout elements and background */
body[data-product="backstage"]#twoStepAuth #right-area,
body[data-product="backstage"]#emailVerificationCode #right-area {
  display: none !important;
}

body[data-product="backstage"]#twoStepAuth #container,
body[data-product="backstage"]#emailVerificationCode #container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  background: transparent !important;
  position: relative;
}

body[data-product="backstage"]#twoStepAuth #layout-main,
body[data-product="backstage"]#emailVerificationCode #layout-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  padding: 0;
  min-height: 100vh;
  background: transparent !important;
}

body[data-product="backstage"]#twoStepAuth #left-area,
body[data-product="backstage"]#emailVerificationCode #left-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  float: none !important;
  position: static;
  background: transparent !important;
}

body[data-product="backstage"]#twoStepAuth .inner-form,
body[data-product="backstage"]#emailVerificationCode .inner-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: transparent !important;
  padding: 0;
  margin: 0;
}

/* Method indicator styling */
body[data-product="backstage"] .tfa-method-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: #EEF0F2;
  border-radius: 10px;
  width: fit-content;
  margin: 0 auto;
}

body[data-product="backstage"] .tfa-method-indicator svg {
  width: 24px;
  height: 24px;
  color: #4C5560;
}

body[data-product="backstage"] .tfa-method-indicator span {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: #212832;
}

/* Resend link styling */
body[data-product="backstage"] .tfa-resend-link {
  text-align: center;
  margin-top: 8px;
}

body[data-product="backstage"] .tfa-resend-link a {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--product-btn);
  text-decoration: underline;
}

body[data-product="backstage"] .tfa-resend-link a:hover {
  color: #001a3a;
}

/* Checkbox group styling */
body[data-product="backstage"] .tfa-checkbox-group {
  margin-top: 16px;
}

body[data-product="backstage"] .tfa-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: #4C5560;
  cursor: pointer;
}

body[data-product="backstage"] .tfa-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 1px solid #E5E6EC;
  border-radius: 4px;
  background: #F6F7F8;
  cursor: pointer;
}

body[data-product="backstage"] .tfa-checkbox-label input[type="checkbox"]:checked {
  background: var(--product-btn);
  border-color: var(--product-btn);
}

body[data-product="backstage"] .tfa-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #EEF0F2;
  color: #4C5560;
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  margin-left: 4px;
}

body[data-product="backstage"] .tfa-help-icon:hover {
  background: #E5E6EC;
}

/* Hide old footer */
body[data-product="backstage"]#twoStepAuth .authFooter,
body[data-product="backstage"]#emailVerificationCode .authFooter {
  display: none !important;
}
