/* ==========================================================================
   SCE Auth Modal — v1.0.0
   Login / Register / Forgot Password overlay
   ========================================================================== */

/* Overlay backdrop */
.sce-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 9, 16, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 16px;
}
.sce-auth-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Modal card */
.sce-auth-modal {
  position: relative;
  background: #0f0f1e;
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 20px;
  padding: 36px 40px 32px;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 212, 170, 0.08);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sce-auth-overlay.is-open .sce-auth-modal {
  transform: translateY(0) scale(1);
}

/* Close button */
.sce-auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  transition: background 0.2s, color 0.2s;
}
.sce-auth-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Brand header */
.sce-auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.sce-auth-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sce-auth-brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  letter-spacing: -0.01em;
}
.sce-auth-brand-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'DM Sans', sans-serif;
}

/* Tabs */
.sce-auth-tabs {
  display: flex;
  gap: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}
.sce-auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.sce-auth-tab.active {
  background: #00d4aa;
  color: #090910;
  font-weight: 600;
}
.sce-auth-tab:hover:not(.active) {
  color: rgba(255, 255, 255, 0.85);
}

/* Message bar */
.sce-auth-message {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 16px;
  line-height: 1.4;
}
.sce-auth-message.is-error {
  background: rgba(220, 60, 60, 0.15);
  border: 1px solid rgba(220, 60, 60, 0.3);
  color: #ff8080;
}
.sce-auth-message.is-success {
  background: rgba(0, 212, 170, 0.12);
  border: 1px solid rgba(0, 212, 170, 0.3);
  color: #00d4aa;
}

/* Panels */
.sce-auth-panel {
  display: none;
}
.sce-auth-panel.active {
  display: block;
}
.sce-auth-panel-intro {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Form rows (2-col) */
.sce-auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 480px) {
  .sce-auth-form-row { grid-template-columns: 1fr; }
}

/* Form groups */
.sce-auth-form-group {
  margin-bottom: 16px;
}
.sce-auth-form-group label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.sce-auth-form-group input[type="text"],
.sce-auth-form-group input[type="email"],
.sce-auth-form-group input[type="password"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.sce-auth-form-group input:focus {
  border-color: #00d4aa;
  background: rgba(0, 212, 170, 0.06);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.12);
}
.sce-auth-form-group input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}
.sce-auth-field-hint {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  font-family: 'DM Sans', sans-serif;
  margin-top: 5px;
}

/* Password input with toggle */
.sce-auth-pass-wrap {
  position: relative;
}
.sce-auth-pass-wrap input {
  padding-right: 44px;
}
.sce-auth-pass-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.sce-auth-pass-toggle:hover { color: rgba(255, 255, 255, 0.7); }

/* Remember / forgot row */
.sce-auth-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 8px;
}

/* Checkbox labels */
.sce-auth-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}
.sce-auth-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  accent-color: #00d4aa;
  margin-top: 1px;
}
.sce-auth-checkbox-label a {
  color: #00d4aa;
  text-decoration: none;
}
.sce-auth-checkbox-label a:hover { text-decoration: underline; }

/* Terms row */
.sce-auth-terms-row {
  margin-bottom: 20px;
}

/* Password strength */
.sce-auth-strength-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.sce-auth-strength-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.sce-auth-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}
.sce-auth-strength-fill.weak     { background: #e05555; }
.sce-auth-strength-fill.fair     { background: #f4a118; }
.sce-auth-strength-fill.good     { background: #70c040; }
.sce-auth-strength-fill.strong   { background: #00d4aa; }
.sce-auth-strength-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'DM Sans', sans-serif;
  min-width: 50px;
  text-align: right;
}

/* Link buttons */
.sce-auth-link {
  background: transparent;
  border: none;
  color: #00d4aa;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sce-auth-link:hover { color: #00ffcc; }
.sce-auth-back { margin-top: 16px; display: flex; }

/* Submit button */
.sce-auth-submit {
  width: 100%;
  background: linear-gradient(135deg, #00d4aa, #00b890);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #090910;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  letter-spacing: 0.01em;
}
.sce-auth-submit:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}
.sce-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Spinner */
.sce-auth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(9, 9, 16, 0.3);
  border-top-color: #090910;
  border-radius: 50%;
  animation: sce-spin 0.7s linear infinite;
}
@keyframes sce-spin { to { transform: rotate(360deg); } }

/* Divider */
.sce-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 12px;
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sce-auth-divider::before,
.sce-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* Footer note */
.sce-auth-footer-note {
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .sce-auth-modal {
    padding: 28px 22px 24px;
    border-radius: 16px;
  }
}
