/**
 * BDE Authentication System - Unified Login & Registration
 * Google Account Style UI
 * Version: 1.3.8
 * ID: bde_auth_sys_001
 */

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
  box-sizing: border-box;
}

/* ========================================
   GLOBAL CONTAINER
   ======================================== */
.bde-auth-container {
  max-width: 450px;
  margin: 60px auto;
  padding: 20px;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Google Logo Style (Optional) */
.bde-auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.bde-auth-logo img {
  max-width: 120px;
  height: auto;
}

/* ========================================
   AUTHENTICATION BOX
   ======================================== */
.bde-auth-box {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 48px 40px;
  transition: box-shadow 0.3s ease;
  border: 1px solid #e8eaed;
}

.bde-auth-box:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ========================================
   TITLES & HEADERS
   ======================================== */
.bde-auth-title {
  font-size: 28px;
  font-weight: 600;
  color: #202124;
  margin: 0 0 12px;
  text-align: center;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.bde-auth-subtitle {
  font-size: 16px;
  color: #5f6368;
  text-align: center;
  margin: 0 0 32px;
  line-height: 1.5;
}

/* ========================================
   VIEW STATES (Login, Register, Type Selection)
   ======================================== */
.bde-auth-view {
  display: none;
}

.bde-auth-view.active {
  display: block;
  animation: bde-fade-slide-in 0.3s ease;
}

@keyframes bde-fade-slide-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   USER IDENTIFIER (Step 2 Login)
   ======================================== */
.bde-user-identifier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 0 0 28px;
  border: 1px solid #e8eaed;
}

.bde-username-display {
  font-size: 15px;
  font-weight: 500;
  color: #202124;
  flex: 1;
}

.bde-btn-change-account {
  font-size: 14px;
  font-weight: 500;
  color: #1a73e8;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.bde-btn-change-account:hover {
  background: #e8f0fe;
}

.bde-btn-change-account:active {
  background: #d2e3fc;
}

/* ========================================
   ACCOUNT TYPE SELECTION CARDS
   ======================================== */
.bde-account-type-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.bde-account-type-card {
  position: relative;
  cursor: pointer;
  display: block;
}

.bde-account-type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.bde-type-card-content {
  background: #f8f9fa;
  border: 2px solid #e8eaed;
  border-radius: 12px;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
  position: relative;
}

.bde-account-type-card:hover .bde-type-card-content {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.bde-account-type-card input[type="radio"]:checked+.bde-type-card-content {
  background: #ffffff;
  border-color: #1a73e8;
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.2);
}

.bde-account-type-card input[type="radio"]:checked+.bde-type-card-content::after {
  content: '✓';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  background: #1a73e8;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.bde-type-card-icon {
  font-size: 48px;
  line-height: 1;
  flex-shrink: 0;
}

.bde-type-card-text {
  flex: 1;
}

.bde-type-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #202124;
  margin: 0 0 4px;
  line-height: 1.3;
}

.bde-type-card-desc {
  font-size: 13px;
  color: #5f6368;
  margin: 0;
  line-height: 1.4;
}

/* Disabled Account Type Card */
.bde-account-type-card.disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.bde-account-type-card.disabled .bde-type-card-content {
  background: #f1f3f4;
  border-color: #e8eaed;
  pointer-events: none;
}

.bde-account-type-card.disabled:hover .bde-type-card-content {
  background: #f1f3f4;
  border-color: #e8eaed;
  box-shadow: none;
  transform: none;
}

.bde-account-type-card.disabled input[type="radio"] {
  pointer-events: none;
  cursor: not-allowed;
}

.bde-account-type-card.disabled input[type="radio"]:checked+.bde-type-card-content::after {
  display: none;
}

.bde-account-type-card.disabled .bde-type-card-title,
.bde-account-type-card.disabled .bde-type-card-desc {
  color: #9aa0a6;
}

.bde-account-type-card.disabled .bde-type-card-icon {
  opacity: 0.4;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.bde-auth-form {
  width: 100%;
}

.bde-form-group {
  margin-bottom: 24px;
}

.bde-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #5f6368;
  margin-bottom: 8px;
  letter-spacing: 0.1px;
}

.bde-form-group label .required {
  color: #d93025;
  margin-left: 2px;
}

/* Password Wrapper for Toggle Button */
.bde-password-wrapper {
  position: relative;
  width: 100%;
}

.bde-password-wrapper input {
  padding-right: 48px !important;
}

.bde-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5f6368;
  transition: color 0.2s ease;
  outline: none;
  border-radius: 50%;
}

.bde-toggle-password:hover {
  color: #202124;
  background: rgba(0, 0, 0, 0.04);
}

.bde-toggle-password:focus {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

.bde-toggle-password svg {
  width: 20px;
  height: 20px;
}

/* Text Inputs */
.bde-form-group input[type="text"],
.bde-form-group input[type="email"],
.bde-form-group input[type="password"],
.bde-form-group input[type="number"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  color: #202124;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bde-form-group input:hover {
  border-color: #bdc1c6;
  background: #fafafa;
}

.bde-form-group input:focus {
  background: #ffffff;
  border-color: #1a73e8;
  border-width: 2px;
  padding: 13px 15px;
  /* Adjust for border width change */
  box-shadow: none;
}

.bde-form-group input::placeholder {
  color: #80868b;
}

.bde-form-group input:disabled {
  background: #f1f3f4;
  color: #80868b;
  cursor: not-allowed;
}

/* Email Wrapper with OTP Button */
.bde-email-wrapper {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.bde-email-wrapper input {
  flex: 1;
}

/* Select Dropdown */
.bde-form-group select.bde-select {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  color: #202124;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
  cursor: pointer;
  appearance: none;
  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='%235f6368' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.bde-form-group select.bde-select:hover {
  border-color: #bdc1c6;
  background-color: #fafafa;
}

.bde-form-group select.bde-select:focus {
  border-color: #1a73e8;
  border-width: 2px;
  padding: 13px 15px 13px 15px;
  padding-right: 43px;
  background-color: #ffffff;
}

.bde-form-group select.bde-select:disabled {
  background-color: #f1f3f4;
  color: #80868b;
  cursor: not-allowed;
}

/* Checkbox */
.bde-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.bde-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0 10px 0 0;
  cursor: pointer;
  accent-color: #1a73e8;
}

.bde-checkbox-label span {
  font-size: 14px;
  color: #5f6368;
  font-weight: 400;
}

/* Field Status & Hints */
.bde-field-status {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
}

.bde-field-status.success {
  color: #0d7c33;
}

.bde-field-status.error {
  color: #d93025;
  font-weight: 500;
}

/* Special style for organization claimed error below company field */
.bde-field-status.organization-claimed {
  display: block !important;
  font-size: 18px !important;
  text-align: center !important;
  padding: 16px 20px !important;
  margin-top: 12px !important;
  font-weight: 600 !important;
  line-height: 1.6 !important;
  color: #d93025 !important;
  background: #fce8e6 !important;
  border: 2px solid #d93025 !important;
  border-radius: 8px !important;
  animation: bde-pulse-error 2s ease-in-out infinite;
}

/* Responsive: Smaller font on mobile */
@media (max-width: 480px) {
  .bde-field-status.organization-claimed {
    font-size: 16px !important;
    padding: 14px 16px !important;
  }
}

.bde-field-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #5f6368;
  line-height: 1.4;
}

/* Autocomplete List */
.bde-autocomplete-wrapper {
  position: relative;
}

.bde-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 1000;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  display: none;
}

.bde-autocomplete-list.active {
  display: block;
}

.bde-autocomplete-list li {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 14px;
  color: #202124;
}

.bde-autocomplete-list li:hover,
.bde-autocomplete-list li.selected {
  background: #f1f3f4;
}

.bde-autocomplete-list li.highlighted {
  background: #e8eaed;
}

.bde-autocomplete-list li:active {
  background: #e8eaed;
}

/* Claimed/Disabled Department Styling */
.bde-autocomplete-list li.claimed,
.bde-autocomplete-list li.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f8f9fa;
  color: #9aa0a6;
  pointer-events: none;
}

.bde-autocomplete-list li.claimed:hover,
.bde-autocomplete-list li.disabled:hover {
  background: #f8f9fa;
}

.bde-autocomplete-list li .claimed-indicator {
  display: inline-block;
  font-size: 12px;
  color: #dc3545;
  font-weight: 500;
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(220, 53, 69, 0.1);
  border-radius: 4px;
}

/* Company Input Wrapper with inline USE button */
.bde-company-wrapper {
  display: flex;
  gap: 10px;
  align-items: stretch;
  position: relative;
}

.bde-company-wrapper input {
  flex: 1;
}

/* Inline USE Button - Green Style */
.bde-btn-use-inline {
  position: relative;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  background: #34a853;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(52, 168, 83, 0.3);
}

.bde-btn-use-inline:hover {
  background: #2d9248;
  box-shadow: 0 4px 8px rgba(52, 168, 83, 0.4);
  transform: translateY(-1px);
}

.bde-btn-use-inline:active {
  background: #287d3c;
  box-shadow: 0 1px 2px rgba(52, 168, 83, 0.4);
  transform: translateY(0);
}

/* Responsive: Smaller button on mobile */
@media (max-width: 480px) {
  .bde-btn-use-inline {
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* Scrollbar styling for autocomplete */
.bde-autocomplete-list::-webkit-scrollbar {
  width: 8px;
}

.bde-autocomplete-list::-webkit-scrollbar-track {
  background: #f1f3f4;
}

.bde-autocomplete-list::-webkit-scrollbar-thumb {
  background: #dadce0;
  border-radius: 4px;
}

.bde-autocomplete-list::-webkit-scrollbar-thumb:hover {
  background: #bdc1c6;
}

/* ========================================
   RADIO CARDS (Organization Type)
   ======================================== */
.bde-radio-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.bde-radio-card {
  position: relative;
  cursor: pointer;
  display: block;
}

.bde-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.bde-card-content {
  background: #f8f9fa;
  border: 1px solid #dadce0;
  border-radius: 10px;
  padding: 20px 12px;
  text-align: center;
  transition: all 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bde-radio-card:hover .bde-card-content {
  background: #ffffff;
  border-color: #bdc1c6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bde-radio-card input[type="radio"]:checked+.bde-card-content {
  background: #ffffff;
  border-color: #1a73e8;
  border-width: 2px;
  box-shadow: 0 2px 12px rgba(26, 115, 232, 0.2);
}

.bde-radio-card input[type="radio"]:checked+.bde-card-content::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: #1a73e8;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.bde-card-icon {
  font-size: 40px;
  margin-bottom: 8px;
  line-height: 1;
}

.bde-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #202124;
  margin-bottom: 2px;
  line-height: 1.3;
}

.bde-card-subtitle {
  font-size: 12px;
  color: #5f6368;
  font-weight: 400;
}

/* ========================================
   BUTTONS
   ======================================== */

/* Primary Button (Login, Register, Continue) */
.bde-btn-primary {
  position: relative;
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: #1a73e8;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bde-btn-primary:hover:not(:disabled) {
  background: #1765cc;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.bde-btn-primary:active:not(:disabled) {
  background: #1557b0;
}

.bde-btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  background: #a8c7fa;
}

.bde-btn-primary.loading {
  background: #1765cc;
}

.bde-btn-primary.loading .bde-btn-text {
  opacity: 0;
}

.bde-btn-primary.loading .bde-btn-loader {
  display: block;
}

/* Secondary Button (OTP Request) */
.bde-btn-secondary {
  position: relative;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #1a73e8;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 120px;
}

.bde-btn-secondary:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #bdc1c6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bde-btn-secondary:active:not(:disabled) {
  background: #f1f3f4;
}

.bde-btn-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  color: #80868b;
}

.bde-btn-secondary.loading {
  background: #f8f9fa;
}

.bde-btn-secondary.loading .bde-btn-text {
  opacity: 0;
}

.bde-btn-secondary.loading .bde-btn-loader {
  display: block;
}

/* Text Button (Back, Create Account) */
.bde-btn-text-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: #1a73e8;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
  border: none;
}

.bde-btn-text-link:hover {
  background: #e8f0fe;
  text-decoration: none;
}

.bde-btn-text-link:active {
  background: #d2e3fc;
}

/* Logout Button */
.bde-btn-logout {
  display: inline-block;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background: #d93025;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.bde-btn-logout:hover {
  background: #c5221f;
  box-shadow: 0 2px 8px rgba(217, 48, 37, 0.3);
  text-decoration: none;
}

.bde-btn-logout:active {
  background: #a50e0e;
}

/* Button Loader Spinner */
.bde-btn-loader {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: bde-spinner-rotate 0.8s linear infinite;
}

.bde-btn-loader.active {
  display: block;
}

.bde-btn-secondary .bde-btn-loader {
  border: 3px solid rgba(26, 115, 232, 0.3);
  border-top-color: #1a73e8;
}

@keyframes bde-spinner-rotate {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ========================================
   MESSAGES & ALERTS
   ======================================== */
/* Hide inline form messages - now using modal system */
.bde-form-message {
  display: none !important;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  border-left: 4px solid;
  animation: bde-message-slide-in 0.3s ease;
}

@keyframes bde-message-slide-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bde-form-message.success {
  background: #e6f4ea;
  color: #137333;
  border-color: #0d7c33;
}

.bde-form-message.error {
  background: #fce8e6;
  color: #c5221f;
  border-color: #d93025;
}

.bde-form-message.info {
  background: #e8f0fe;
  color: #174ea6;
  border-color: #1a73e8;
}

/* Preserve inline field validation indicators */
.bde-field-status,
.bde-password-match,
.bde-password-strength,
.bde-field-status.organization-claimed {
  display: block !important;
}

/* ========================================
   ORGANIZATION CLAIMED ERROR ANIMATION
   ======================================== */

/* Pulse animation for claimed organization error */
@keyframes bde-pulse-error {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(217, 48, 37, 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(217, 48, 37, 0);
  }
}

/* ========================================
   FOOTER & NAVIGATION
   ======================================== */
.bde-auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e8eaed;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bde-auth-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}

.bde-auth-actions .bde-btn-text-link {
  padding: 8px 0;
}

.bde-auth-actions .bde-btn-primary {
  width: auto;
  min-width: 120px;
}

/* ========================================
   MODAL OVERLAY (Password Setup)
   ======================================== */
.bde-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  animation: bde-modal-fade-in 0.3s ease;
}

@keyframes bde-modal-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.bde-modal-content {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: bde-modal-slide-up 0.3s ease;
  position: relative;
}

@keyframes bde-modal-slide-up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.bde-modal-header {
  padding: 32px 32px 24px;
  border-bottom: 1px solid #e8eaed;
  text-align: center;
}

.bde-modal-title {
  font-size: 24px;
  font-weight: 600;
  color: #202124;
  margin: 0 0 8px;
  line-height: 1.3;
}

.bde-modal-subtitle {
  font-size: 14px;
  color: #5f6368;
  margin: 0;
  line-height: 1.5;
}

.bde-modal-form {
  padding: 24px 32px 32px;
}

.bde-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 24px;
  border: 1px solid #e8eaed;
}

.bde-info-label {
  font-size: 13px;
  color: #5f6368;
  font-weight: 500;
}

.bde-info-value {
  font-size: 14px;
  color: #202124;
  font-weight: 600;
}

/* ========================================
   PROCESSING OVERLAY
   ======================================== */
.bde-process-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: bde-overlay-fade-in 0.2s ease;
}

@keyframes bde-overlay-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.bde-process-content {
  text-align: center;
  color: #ffffff;
  max-width: 400px;
  padding: 40px;
  background: rgba(32, 33, 36, 0.95);
  border-radius: 16px;
}

.bde-process-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 24px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: bde-spinner-rotate 1s linear infinite;
}

.bde-process-text {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px;
}

.bde-process-subtext {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  line-height: 1.5;
}

/* ========================================
   LOGGED IN STATE
   ======================================== */
.bde-auth-container.logged-in .bde-auth-box {
  text-align: center;
}

.bde-auth-container.logged-in .bde-auth-title {
  font-size: 28px;
  margin-bottom: 12px;
}

.bde-auth-container.logged-in p {
  font-size: 16px;
  color: #5f6368;
  margin: 0 0 28px;
}

/* ========================================
   PENDING APPROVAL STATE
   ======================================== */
.bde-pending-approval {
  text-align: center;
  padding: 24px;
}

.bde-pending-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.bde-pending-title {
  font-size: 24px;
  font-weight: 600;
  color: #202124;
  margin: 0 0 12px;
}

.bde-pending-text {
  font-size: 15px;
  color: #5f6368;
  line-height: 1.6;
  margin: 0 0 8px;
}

.bde-pending-email {
  font-size: 14px;
  color: #1a73e8;
  font-weight: 500;
  margin: 0 0 24px;
}

/* ========================================
   FOCUS VISIBLE (Accessibility)
   ======================================== */
.bde-btn-primary:focus-visible,
.bde-btn-secondary:focus-visible,
.bde-btn-text-link:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

.bde-form-group input:focus-visible,
.bde-form-group select:focus-visible {
  outline: none;
}

/* ========================================
   DISABLED SELECT OPTIONS STYLING
   ======================================== */
.bde-form-group select option:disabled {
  color: #bdc1c6 !important;
  font-style: italic;
  background: #f8f9fa;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Desktop: 2-Column Grid Layout (769px and above) */
@media (min-width: 769px) {

  /* Increase container width for 2-column layout */
  .bde-auth-container {
    max-width: 800px;
  }

  /* 2-column grid wrapper for registration form */
  .bde-register-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
    /* row-gap column-gap */
  }

  /* Full-width fields that span both columns */
  .bde-register-form-grid .full-width {
    grid-column: 1 / -1;
  }

  /* Specific fields that should be full-width */
  .bde-register-form-grid .bde-form-message {
    grid-column: 1 / -1;
  }

  .bde-register-form-grid #bde-email,
  .bde-register-form-grid .bde-email-wrapper {
    grid-column: 1 / -1;
  }

  /* Email field wrapper */
  .bde-register-form-grid>.bde-form-group:has(.bde-email-wrapper) {
    grid-column: 1 / -1;
  }

  /* OTP field */
  .bde-register-form-grid #bde-otp-group {
    grid-column: 1 / -1;
  }

  /* Organization type radio cards */
  .bde-register-form-grid #bde-org-type-group {
    grid-column: 1 / -1;
  }

  /* Department field (has autocomplete dropdown) */
  .bde-register-form-grid #bde-department-group {
    grid-column: 1 / -1;
  }

  /* Company field (has autocomplete dropdown) */
  .bde-register-form-grid #bde-company-group {
    grid-column: 1 / -1;
  }

  /* Industry Type field (has autocomplete dropdown) */
  .bde-register-form-grid #bde-industry-type-group {
    grid-column: 1 / -1;
  }

  /* Personal Group field (for Personal Account + Private in Thailand) */
  .bde-register-form-grid #bde-personal-group-group {
    grid-column: 1 / -1;
  }

  /* Personal Industry field (for Personal Account + Private in Thailand) */
  .bde-register-form-grid #bde-personal-industry-group {
    grid-column: 1 / -1;
  }

  /* Total Organization Members - FORCE FULL WIDTH */
  .bde-register-form-grid #bde-total-org-members-group {
    grid-column: 1 / -1 !important;
  }

  /* Organization Size Display - FORCE FULL WIDTH */
  .bde-register-form-grid #bde-org-size-display-group {
    grid-column: 1 / -1 !important;
  }

  /* IT Staff field - FORCE FULL WIDTH */
  .bde-register-form-grid #bde-total-it-emp-group {
    grid-column: 1 / -1 !important;
  }

  /* Auth actions (buttons) */
  .bde-register-form-grid .bde-auth-actions {
    grid-column: 1 / -1;
  }

  /* Auth footer */
  .bde-register-form-grid .bde-auth-footer {
    grid-column: 1 / -1;
  }

  /* Submit button group */
  .bde-register-form-grid>button[type="submit"] {
    grid-column: 1 / -1;
  }
}

/* Tablet and below: Single column layout */
@media (max-width: 768px) {
  .bde-auth-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 16px;
  }

  .bde-auth-box {
    padding: 40px 48px;
  }

  .bde-account-type-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bde-type-card-content {
    flex-direction: row;
    text-align: left;
    min-height: auto;
    padding: 24px 20px;
  }

  .bde-type-card-icon {
    font-size: 48px;
    margin-bottom: 0;
  }

  .bde-type-card-title {
    font-size: 16px;
  }

  .bde-type-card-desc {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .bde-auth-container {
    margin: 30px auto;
    padding: 15px;
  }

  .bde-auth-box {
    padding: 32px 24px;
  }

  .bde-auth-title {
    font-size: 24px;
  }

  .bde-auth-subtitle {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .bde-form-group input,
  .bde-form-group select {
    font-size: 16px;
    /* Prevent zoom on iOS */
  }

  .bde-email-wrapper {
    flex-direction: column;
  }

  .bde-btn-secondary {
    width: 100%;
  }

  .bde-radio-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .bde-auth-footer {
    flex-direction: column;
    gap: 12px;
  }

  .bde-auth-footer a {
    width: 100%;
    text-align: center;
  }

  .bde-auth-actions {
    flex-direction: column;
    gap: 12px;
  }

  .bde-auth-actions .bde-btn-text-link {
    width: 100%;
    text-align: center;
  }

  .bde-auth-actions .bde-btn-primary {
    width: 100%;
  }

  .bde-process-content {
    padding: 30px 20px;
  }

  .bde-process-text {
    font-size: 18px;
  }

  .bde-account-type-cards {
    gap: 12px;
  }

  .bde-type-card-icon {
    font-size: 40px;
  }

  .bde-type-card-title {
    font-size: 15px;
  }

  .bde-type-card-desc {
    font-size: 12px;
  }

  .bde-user-identifier {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}


/* ========================================
   UTILITY CLASSES
   ======================================== */
.bde-hidden {
  display: none !important;
}

.bde-text-center {
  text-align: center;
}

.bde-mb-8 {
  margin-bottom: 8px;
}

.bde-mb-16 {
  margin-bottom: 16px;
}

.bde-mb-24 {
  margin-bottom: 24px;
}

.bde-mt-8 {
  margin-top: 8px;
}

.bde-mt-16 {
  margin-top: 16px;
}

.bde-mt-24 {
  margin-top: 24px;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .bde-auth-container {
    box-shadow: none;
  }

  .bde-auth-box {
    box-shadow: none;
    border: 1px solid #dadce0;
  }

  .bde-btn-primary,
  .bde-btn-secondary,
  .bde-btn-text-link {
    display: none;
  }

  .bde-process-overlay {
    display: none !important;
  }
}

/* ========================================
   PASSWORD STRENGTH INDICATOR
   ======================================== */
.bde-password-strength {
  margin-top: 10px;
  margin-bottom: 8px;
}

.bde-strength-bar {
  height: 6px;
  background: #e8eaed;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.bde-strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
  border-radius: 3px;
}

.bde-strength-fill.weak {
  background: #d93025;
}

.bde-strength-fill.medium {
  background: #f9ab00;
}

.bde-strength-fill.strong {
  background: #0d7c33;
}

.bde-strength-text {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  display: block;
}

.bde-strength-text.weak {
  color: #d93025;
}

.bde-strength-text.medium {
  color: #f9ab00;
}

.bde-strength-text.strong {
  color: #0d7c33;
}

/* Password Match Indicator */
.bde-password-match {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
}

.bde-password-match.success {
  color: #0d7c33;
}

.bde-password-match.error {
  color: #d93025;
}

/* ========================================
   OTP ERROR ANIMATION
   ======================================== */

/* OTP Error State - Red Glowing Animation */
.bde-form-group input.error-shake {
  border-color: #d93025 !important;
  animation: bde-error-glow 1.5s ease-in-out 3;
}

@keyframes bde-error-glow {

  0%,
  100% {
    border-color: #d93025;
    box-shadow: 0 0 0 0 rgba(217, 48, 37, 0);
  }

  50% {
    border-color: #d93025;
    box-shadow: 0 0 0 4px rgba(217, 48, 37, 0.4);
  }
}

/* ========================================
   DARK MODE SUPPORT (Optional)
   ======================================== */
@media (prefers-color-scheme: dark) {
  .bde-auth-container {
    background: transparent;
  }

  .bde-auth-box {
    background: #202124;
    border-color: #3c4043;
  }

  .bde-auth-title {
    color: #e8eaed;
  }

  .bde-auth-subtitle {
    color: #9aa0a6;
  }

  .bde-form-group label {
    color: #9aa0a6;
  }

  .bde-form-group input,
  .bde-form-group select {
    background: #303134;
    border-color: #5f6368;
    color: #e8eaed;
  }

  .bde-form-group input:hover,
  .bde-form-group select:hover {
    background: #3c4043;
    border-color: #9aa0a6;
  }

  .bde-form-group input:focus,
  .bde-form-group select:focus {
    background: #303134;
  }

  .bde-form-group input::placeholder {
    color: #9aa0a6;
  }

  .bde-type-card-content,
  .bde-card-content {
    background: #303134;
    border-color: #5f6368;
  }

  .bde-account-type-card:hover .bde-type-card-content,
  .bde-radio-card:hover .bde-card-content {
    background: #3c4043;
    border-color: #9aa0a6;
  }

  .bde-type-card-title,
  .bde-card-title {
    color: #e8eaed;
  }

  .bde-type-card-desc,
  .bde-card-subtitle {
    color: #9aa0a6;
  }

  .bde-autocomplete-list {
    background: #303134;
    border-color: #5f6368;
  }

  .bde-autocomplete-list li {
    color: #e8eaed;
  }

  .bde-autocomplete-list li:hover {
    background: #3c4043;
  }

  .bde-autocomplete-list li.highlighted {
    background: #3c4043;
  }

  /* Dark mode - Claimed/Disabled Department */
  .bde-autocomplete-list li.claimed,
  .bde-autocomplete-list li.disabled {
    opacity: 0.5;
    background: #252526;
    color: #6c757d;
  }

  .bde-autocomplete-list li.claimed:hover,
  .bde-autocomplete-list li.disabled:hover {
    background: #252526;
  }

  .bde-autocomplete-list li .claimed-indicator {
    background: rgba(220, 53, 69, 0.2);
    color: #f28b82;
  }

  .bde-auth-footer {
    border-color: #5f6368;
  }

  .bde-form-message.success {
    background: #1e3a2a;
    color: #81c995;
    border-color: #0d7c33;
  }

  .bde-form-message.error {
    background: #3d1f1c;
    color: #f28b82;
    border-color: #d93025;
  }

  .bde-form-message.info {
    background: #1a2d42;
    color: #8ab4f8;
    border-color: #1a73e8;
  }

  /* Password Strength in Dark Mode */
  .bde-strength-bar {
    background: #3c4043;
  }

  .bde-strength-text.weak {
    color: #f28b82;
  }

  .bde-strength-text.medium {
    color: #fdd663;
  }

  .bde-strength-text.strong {
    color: #81c995;
  }

  .bde-password-match.success {
    color: #81c995;
  }

  .bde-password-match.error {
    color: #f28b82;
  }

  /* Disabled Account Type Card in Dark Mode */
  .bde-account-type-card.disabled .bde-type-card-content {
    background: #202124;
    border-color: #3c4043;
  }

  .bde-account-type-card.disabled:hover .bde-type-card-content {
    background: #202124;
    border-color: #3c4043;
  }

  .bde-account-type-card.disabled .bde-type-card-title,
  .bde-account-type-card.disabled .bde-type-card-desc {
    color: #5f6368;
  }
}

/* ========================================
   ACCOUNT TYPE CONFIRMATION MODAL
   ======================================== */

/* Confirmation Modal Content - Wider for longer text */
.bde-confirmation-modal-content {
  max-width: 550px !important;
}

/* Confirmation Message Box */
.bde-confirmation-message {
  font-size: 15px;
  line-height: 1.7;
  color: #5f6368;
  background: #f8f9fa;
  padding: 20px 24px;
  border-radius: 12px;
  border-left: 4px solid #1a73e8;
  margin-bottom: 28px;
  text-align: left;
}

/* Confirmation Buttons Container */
.bde-confirmation-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}

/* Cancel Button Styling */
.bde-confirmation-buttons .bde-btn-cancel {
  flex: 0 0 auto;
  width: auto;
  min-width: 120px;
  padding: 14px 28px;
}

/* OK Button Styling */
.bde-confirmation-buttons .bde-btn-confirm {
  flex: 0 0 auto;
  width: auto;
  min-width: 140px;
  padding: 14px 28px;
}

/* Responsive: Mobile - Stack buttons vertically */
@media (max-width: 480px) {
  .bde-confirmation-modal-content {
    max-width: 90% !important;
  }

  .bde-confirmation-message {
    font-size: 14px;
    padding: 16px 20px;
  }

  .bde-confirmation-buttons {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .bde-confirmation-buttons .bde-btn-cancel,
  .bde-confirmation-buttons .bde-btn-confirm {
    width: 100%;
    min-width: auto;
  }
}

/* Dark Mode Support for Confirmation Modal */
@media (prefers-color-scheme: dark) {
  .bde-confirmation-message {
    background: #303134;
    color: #e8eaed;
    border-color: #8ab4f8;
  }
}

/* ========================================
   FULL WIDTH ORGANIZATION FIELDS
   ======================================== */
/* FORCE Total Organization Members, Organization Size, and IT Staff fields to be full width and stacked vertically */
#bde-total-org-members-group,
#bde-org-size-display-group,
#bde-total-it-emp-group {
  width: 100% !important;
  max-width: 100% !important;
  /* display controlled by JavaScript */
  clear: both !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  flex: none !important;
  grid-column: 1 / -1 !important;
}

/* Normal margin for Total Organization Members */
#bde-total-org-members-group {
  margin-bottom: 24px !important;
}

/* No margin when hidden, animate margin when visible */
#bde-org-size-display-group {
  margin-bottom: 0 !important;
}

#bde-org-size-display-group.bde-org-size-visible {
  margin-bottom: 24px !important;
}

/* IT Staff always has margin */
#bde-total-it-emp-group {
  margin-bottom: 24px !important;
}

#bde-total-org-members-group input[type="number"],
#bde-total-it-emp-group .bde-slider-container,
#bde-total-it-emp-group .bde-it-staff-display {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ========================================
   ORGANIZATION SIZE DISPLAY
   ======================================== */
/* Organization Size Display Group - Animation States */
#bde-org-size-display-group {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    margin-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
  will-change: max-height, margin-bottom, opacity;
}

/* Hidden state - collapses to 0 height */
#bde-org-size-display-group.bde-org-size-hidden {
  max-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  opacity: 0;
}

/* Visible state - expands to show content */
#bde-org-size-display-group.bde-org-size-visible {
  max-height: 200px !important;
  opacity: 1;
}

.bde-org-size-display {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  transform-origin: top;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scale animation when appearing */
#bde-org-size-display-group.bde-org-size-hidden .bde-org-size-display {
  transform: scaleY(0);
}

#bde-org-size-display-group.bde-org-size-visible .bde-org-size-display {
  transform: scaleY(1);
}

.org-size-category {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 20px 24px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.org-size-category strong {
  font-weight: 600;
  font-size: 20px;
}

/* Size Category Colors */
.org-size-category.very-small {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
  border: 2px solid #66bb6a;
}

.org-size-category.small {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
  border: 2px solid #42a5f5;
}

.org-size-category.medium {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
  border: 2px solid #ff9800;
}

.org-size-category.large {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
  color: #c2185b;
  border: 2px solid #ec407a;
}

/* ========================================
   IT STAFF SLIDER
   ======================================== */
.bde-slider-container {
  margin-top: 12px;
  margin-bottom: 8px;
  width: 100%;
}

/* Range Slider Styling */
.bde-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #1a73e8 0%, #1a73e8 0%, #dadce0 0%, #dadce0 100%);
  outline: none;
  transition: background 0.15s ease-in-out;
  cursor: pointer;
}

/* Slider Track - Webkit */
.bde-range-slider::-webkit-slider-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  border-radius: 4px;
}

/* Slider Track - Firefox */
.bde-range-slider::-moz-range-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: #dadce0;
  border-radius: 4px;
}

/* Slider Thumb - Webkit */
.bde-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1a73e8;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.15s ease;
  border: 3px solid #ffffff;
}

.bde-range-slider::-webkit-slider-thumb:hover {
  background: #1765cc;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
}

.bde-range-slider::-webkit-slider-thumb:active {
  background: #174ea6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

/* Slider Thumb - Firefox */
.bde-range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #1a73e8;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.15s ease;
}

.bde-range-slider::-moz-range-thumb:hover {
  background: #1765cc;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
}

.bde-range-slider::-moz-range-thumb:active {
  background: #174ea6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

/* Slider Labels */
.bde-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 2px;
}

.bde-slider-labels span {
  font-size: 12px;
  color: #5f6368;
  user-select: none;
}

/* ========================================
   IT STAFF DISPLAY
   ======================================== */
.bde-it-staff-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  margin-top: 16px;
  padding: 16px 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dadce0;
  box-sizing: border-box;
}

.bde-it-percentage {
  font-size: 28px;
  font-weight: 600;
  color: #1a73e8;
  flex-shrink: 0;
}

.bde-it-staff-count {
  font-size: 15px;
  color: #202124;
  font-weight: 500;
  text-align: right;
}

.bde-it-staff-count span {
  font-size: 18px;
  font-weight: 600;
  color: #1a73e8;
}

/* ========================================
   READ-ONLY STATE FOR CLAIMED ORGANIZATIONS
   ======================================== */
.bde-readonly {
  background-color: #f5f5f5 !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

.bde-range-slider.bde-readonly {
  pointer-events: none;
}

.bde-range-slider.bde-readonly::-webkit-slider-thumb {
  background: #9e9e9e;
  cursor: not-allowed;
}

.bde-range-slider.bde-readonly::-moz-range-thumb {
  background: #9e9e9e;
  cursor: not-allowed;
}

input.bde-readonly:disabled {
  color: #202124;
  -webkit-text-fill-color: #202124;
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */
@media (prefers-color-scheme: dark) {

  /* Organization Size Display - Dark Mode */
  .org-size-category.very-small {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.25) 0%, rgba(46, 125, 50, 0.15) 100%);
    color: #81c784;
    border-color: #66bb6a;
  }

  .org-size-category.small {
    background: linear-gradient(135deg, rgba(21, 101, 192, 0.25) 0%, rgba(21, 101, 192, 0.15) 100%);
    color: #64b5f6;
    border-color: #42a5f5;
  }

  .org-size-category.medium {
    background: linear-gradient(135deg, rgba(230, 81, 0, 0.25) 0%, rgba(230, 81, 0, 0.15) 100%);
    color: #ffb74d;
    border-color: #ff9800;
  }

  .org-size-category.large {
    background: linear-gradient(135deg, rgba(194, 24, 91, 0.25) 0%, rgba(194, 24, 91, 0.15) 100%);
    color: #f48fb1;
    border-color: #ec407a;
  }

  /* IT Staff Slider - Dark Mode */
  .bde-range-slider {
    background: linear-gradient(to right, #8ab4f8 0%, #8ab4f8 0%, #5f6368 0%, #5f6368 100%);
  }

  .bde-range-slider::-moz-range-track {
    background: #5f6368;
  }

  .bde-range-slider::-webkit-slider-thumb {
    background: #8ab4f8;
  }

  .bde-range-slider::-webkit-slider-thumb:hover {
    background: #aecbfa;
  }

  .bde-range-slider::-webkit-slider-thumb:active {
    background: #669df6;
  }

  .bde-range-slider::-moz-range-thumb {
    background: #8ab4f8;
  }

  .bde-range-slider::-moz-range-thumb:hover {
    background: #aecbfa;
  }

  .bde-range-slider::-moz-range-thumb:active {
    background: #669df6;
  }

  .bde-slider-labels span {
    color: #9aa0a6;
  }

  /* IT Staff Display - Dark Mode */
  .bde-it-staff-display {
    background-color: #303134;
    border-color: #5f6368;
  }

  .bde-it-percentage {
    color: #8ab4f8;
  }

  .bde-it-staff-count {
    color: #e8eaed;
  }

  .bde-it-staff-count span {
    color: #8ab4f8;
  }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {

  /* Ensure full width on tablets */
  #bde-total-org-members-group,
  #bde-org-size-display-group,
  #bde-total-it-emp-group {
    width: 100%;
    max-width: 100%;
  }

  #bde-total-org-members-group input[type="number"],
  .bde-org-size-display,
  .org-size-category,
  .bde-slider-container,
  .bde-it-staff-display {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {

  /* Ensure full width on mobile phones */
  #bde-total-org-members-group,
  #bde-org-size-display-group,
  #bde-total-it-emp-group {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
  }

  #bde-total-org-members-group input[type="number"] {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
  }

  /* Organization Size Display - Mobile */
  .bde-org-size-display,
  .org-size-category {
    width: 100%;
    max-width: 100%;
  }

  .org-size-category {
    padding: 16px 20px;
    font-size: 16px;
    border-radius: 10px;
  }

  .org-size-category strong {
    font-size: 18px;
  }

  /* IT Staff Slider - Mobile */
  .bde-slider-container {
    width: 100%;
    max-width: 100%;
  }

  /* IT Staff Display - Mobile */
  .bde-it-staff-display {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
  }

  .bde-it-percentage {
    font-size: 24px;
  }

  .bde-it-staff-count {
    font-size: 14px;
    text-align: left;
  }

  .bde-it-staff-count span {
    font-size: 16px;
  }
}

/* ========================================
   PDPA CONSENT CHECKBOX
   ======================================== */
.bde-pdpa-consent-group {
  margin-top: 24px;
  margin-bottom: 24px;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.bde-pdpa-checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
  gap: 12px;
  padding: 16px 20px;
  background: #f8f9fa;
  border: 1px solid #dadce0;
  border-radius: 10px;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.bde-pdpa-checkbox-label:hover {
  background: #ffffff;
  border-color: #1a73e8;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.15);
}

.bde-pdpa-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: #1a73e8;
  flex-shrink: 0;
  margin-top: 2px;
}

.bde-pdpa-checkmark {
  display: none;
}

.bde-pdpa-text {
  font-size: 13px;
  color: #5f6368;
  line-height: 1.6;
  flex: 1;
}

/* PDPA Checkbox Checked State */
.bde-pdpa-checkbox-label:has(input:checked) {
  background: #e8f5e9;
  border-color: #4caf50;
}

.bde-pdpa-checkbox-label:has(input:checked) .bde-pdpa-text {
  color: #2e7d32;
}

/* PDPA Disabled Button State */
.bde-btn-primary.bde-btn-pdpa-disabled {
  background: #9e9e9e !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

.bde-btn-primary.bde-btn-pdpa-disabled:hover {
  background: #9e9e9e !important;
  box-shadow: none !important;
  transform: none !important;
}

/* PDPA Button Enabled State */
.bde-btn-primary.bde-btn-pdpa-enabled {
  background: #1a73e8 !important;
  cursor: pointer !important;
  opacity: 1;
}

.bde-btn-primary.bde-btn-pdpa-enabled:hover {
  background: #1765cc !important;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3) !important;
}

/* ========================================
   PDPA DARK MODE SUPPORT
   ======================================== */
@media (prefers-color-scheme: dark) {
  .bde-pdpa-checkbox-label {
    background: #303134;
    border-color: #5f6368;
  }

  .bde-pdpa-checkbox-label:hover {
    background: #3c4043;
    border-color: #8ab4f8;
  }

  .bde-pdpa-text {
    color: #9aa0a6;
  }

  .bde-pdpa-checkbox-label:has(input:checked) {
    background: rgba(46, 125, 50, 0.2);
    border-color: #81c784;
  }

  .bde-pdpa-checkbox-label:has(input:checked) .bde-pdpa-text {
    color: #81c784;
  }

  .bde-btn-primary.bde-btn-pdpa-disabled {
    background: #5f6368 !important;
  }
}

/* ========================================
   PDPA RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 480px) {
  .bde-pdpa-consent-group {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .bde-pdpa-checkbox-label {
    padding: 14px;
    gap: 10px;
  }

  .bde-pdpa-text {
    font-size: 12px;
    line-height: 1.5;
  }

  .bde-pdpa-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
  }
}

/* ========================================
   NOTIFICATION MODAL SYSTEM
   ======================================== */

/* CSS Variables for Notification Modal */
:root {
  --bde-notif-success: #10b981;
  --bde-notif-error: #ef4444;
  --bde-notif-info: #3b82f6;
  --bde-notif-backdrop: rgba(0, 0, 0, 0.6);
  --bde-notif-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Backdrop */
.bde-notification-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bde-notif-backdrop);
  backdrop-filter: blur(4px);
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}

.bde-notification-modal.show {
  display: flex;
  opacity: 1;
}

/* Content Box */
.bde-notification-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 40px;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--bde-notif-shadow);
  animation: notifSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-align: center;
}

@keyframes notifSlideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Icon Styles */
.bde-notification-icon {
  font-size: 64px;
  margin-bottom: 16px;
  line-height: 1;
}

.bde-notification-modal.success .bde-notification-icon {
  color: var(--bde-notif-success);
}

.bde-notification-modal.error .bde-notification-icon {
  color: var(--bde-notif-error);
}

.bde-notification-modal.info .bde-notification-icon {
  color: var(--bde-notif-info);
}

/* Message Text */
.bde-notification-message {
  font-size: 18px;
  line-height: 1.6;
  color: #1f2937;
  margin-bottom: 0;
}

/* Close Button */
.bde-notification-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 32px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.bde-notification-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

/* Hide close button for success/info (auto-dismiss) */
.bde-notification-modal.success .bde-notification-close,
.bde-notification-modal.info .bde-notification-close {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .bde-notification-content {
    padding: 24px 28px;
    width: 95%;
  }

  .bde-notification-icon {
    font-size: 48px;
  }

  .bde-notification-message {
    font-size: 16px;
  }
}

/* ========================================
   INFO ICON WITH TOOLTIP
   ======================================== */
.bde-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  color: #5f6368;
  cursor: help;
  position: relative;
  vertical-align: middle;
}

.bde-info-icon svg {
  width: 16px;
  height: 16px;
}

.bde-info-icon:hover {
  color: #1a73e8;
}

/* Tooltip */
.bde-info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background-color: #202124;
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  width: 280px;
  max-width: 90vw;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

/* Tooltip Arrow */
.bde-info-icon::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #202124;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1001;
}

.bde-info-icon:hover::after,
.bde-info-icon:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Responsive: Show tooltip below on small screens */
@media (max-width: 480px) {
  .bde-info-icon::after {
    bottom: auto;
    top: calc(100% + 8px);
    width: 240px;
  }

  .bde-info-icon::before {
    bottom: auto;
    top: calc(100% + 2px);
    border-top-color: transparent;
    border-bottom-color: #202124;
  }
}

/* ========================================
   CHROME AUTOFILL DETECTION & OVERRIDE
   ======================================== */

/* Keyframes for detecting Chrome autofill via animationstart event in JS */
@keyframes bde-autofill-detected {
    from { opacity: 1; }
    to { opacity: 1; }
}

/* Override Chrome autofill styling and attach detection animation */
.bde-auth-form input:-webkit-autofill,
.bde-auth-form input:-webkit-autofill:hover,
.bde-auth-form input:-webkit-autofill:focus,
.bde-auth-form input:-webkit-autofill:active {
    animation-name: bde-autofill-detected;
    animation-duration: 0.01s;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #202124 !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Dark mode autofill override */
@media (prefers-color-scheme: dark) {
    .bde-auth-form input:-webkit-autofill,
    .bde-auth-form input:-webkit-autofill:hover,
    .bde-auth-form input:-webkit-autofill:focus,
    .bde-auth-form input:-webkit-autofill:active {
        -webkit-box-shadow: 0 0 0 1000px #303134 inset !important;
        -webkit-text-fill-color: #e8eaed !important;
        box-shadow: 0 0 0 1000px #303134 inset !important;
    }
}
