/* ============================================================
   DemandSphere Auth Screens — shared styles
   ============================================================ */

*, *::before, *::after { font-family: 'Inter', sans-serif; }
.font-mono, .font-mono * { font-family: 'JetBrains Mono', monospace !important; }
html, body { background: #0a0d10; color: #fff; -webkit-font-smoothing: antialiased; }

/* --- Brand panel gradient mesh --- */
.brand-panel {
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 30%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(168, 85, 247, 0.14), transparent 60%),
    linear-gradient(180deg, #0d1117 0%, #0a0d10 100%);
  position: relative;
  overflow: hidden;
}
.brand-panel::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 0%, transparent 80%);
}

/* --- Glassy card --- */
.glass {
  background: linear-gradient(180deg, rgba(32, 38, 44, 0.7) 0%, rgba(24, 29, 31, 0.6) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- Form column --- */
.form-col { background: #0a0d10; }

/* --- Inputs --- */
.ds-input {
  width: 100%;
  background: #131820;
  border: 1px solid #2a2f37;
  border-radius: 10px;
  color: #fff;
  padding: 12px 14px;
  font-size: 14px;
  transition: all 0.15s ease;
}
.ds-input::placeholder { color: #5b6470; }
.ds-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: #161c25;
}
.ds-input.error {
  border-color: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
}
.ds-input[readonly] {
  color: #9ca3af;
  cursor: default;
  border-color: #1e242c;
}
.ds-input[readonly]:focus {
  border-color: #1e242c;
  box-shadow: none;
  background: #131820;
}

/* --- Primary button --- */
.ds-btn-primary {
  background: #6366f1;
  color: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  transition: all 0.15s ease;
  border: 1px solid rgba(255,255,255,0.08);
}
.ds-btn-primary:hover { background: #4f46e5; }
.ds-btn-primary:active { transform: translateY(1px); }
.ds-btn-primary:disabled { background: #2a2f37; color: #5b6470; cursor: not-allowed; border-color: transparent; }

/* --- Secondary / SSO button --- */
.ds-btn-sso {
  background: #131820;
  border: 1px solid #2a2f37;
  color: #fff;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all 0.15s ease;
  text-decoration: none;
}
.ds-btn-sso:hover { background: #161c25; border-color: #3c4046; color: #fff; text-decoration: none; }
a.ds-btn-primary { display: block; text-align: center; text-decoration: none; }
a.ds-btn-sso { display: flex; text-decoration: none; }

/* --- OTP input boxes --- */
.otp-input {
  width: 48px; height: 56px;
  background: #131820;
  border: 1px solid #2a2f37;
  border-radius: 10px;
  color: #fff;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  transition: all 0.15s ease;
}
.otp-input.error {
  border-color: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
}
.otp-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: #161c25;
}

/* --- Field-level error messages --- */
.kc-feedback-text {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #f43f5e;
}

/* --- Strength meter --- */
.strength-bar { height: 4px; border-radius: 2px; background: #2a2f37; overflow: hidden; }
.strength-fill { height: 100%; transition: all 0.25s ease; border-radius: 2px; }

/* --- Mini dashboard mock cards --- */
.mini-card {
  background: rgba(15, 20, 25, 0.55);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.label-mono {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

/* --- Sparkline animation (subtle) --- */
@keyframes spark-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.pulse-dot { animation: spark-pulse 2.4s ease-in-out infinite; }

/* Logo fallback wordmark */
.ds-wordmark { font-weight: 700; letter-spacing: -0.02em; font-size: 18px; }
.ds-wordmark .accent { color: #818cf8; }

/* Custom scrollbar inside form column on tall screens */
.form-scroll::-webkit-scrollbar { width: 6px; }
.form-scroll::-webkit-scrollbar-track { background: transparent; }
.form-scroll::-webkit-scrollbar-thumb { background: #2a2f37; border-radius: 3px; }

/* ============================================================
   Language toggle
   ============================================================ */
.lang-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px;
  font-family: 'Inter', 'Noto Sans JP', sans-serif !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.lang-toggle .sep { color: #3c4046; }
.lang-toggle .current { color: #fff; font-weight: 600; }
.lang-toggle a,
.lang-toggle .lang-btn { color: #6b7280; transition: color 0.12s ease; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; text-decoration: none; }
.lang-toggle a:hover,
.lang-toggle .lang-btn:hover { color: #fff; }
.lang-toggle .lang-btn.current { color: #fff; font-weight: 600; cursor: default; }

/* ============================================================
   Plan selector cards
   ============================================================ */
.plan-card {
  background: #131820;
  border: 1px solid #2a2f37;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.14s ease;
  width: 100%;
  position: relative;
}
.plan-card:hover { border-color: #4f46e5; background: #161c25; }
.plan-card-selected {
  border-color: #818cf8;
  background: rgba(99, 102, 241, 0.18);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.55), 0 10px 28px -8px rgba(99, 102, 241, 0.45);
}
.plan-card-selected:hover { background: rgba(99, 102, 241, 0.22); }

.plan-radio {
  display: inline-flex;
  width: 16px; height: 16px; border-radius: 9999px;
  border: 1.5px solid #4b5563;
  background: transparent;
  flex-shrink: 0;
  position: relative;
  transition: all 0.14s ease;
}
.plan-card:hover .plan-radio { border-color: #818cf8; }
.plan-card-selected .plan-radio {
  border-color: #818cf8;
  background: #6366f1;
}
.plan-card-selected .plan-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 9999px;
  background: #fff;
}

/* Indigo check pill for feature bullets */
.check-pill {
  width: 1.25rem; height: 1.25rem; border-radius: 9999px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 0.125rem; flex-shrink: 0;
}

/* ============================================================
   Japanese locale overrides
   ============================================================ */
body.lang-ja, body.lang-ja * {
  font-family: 'Inter', 'Noto Sans JP', sans-serif !important;
}
body.lang-ja { line-break: strict; }

.brand-panel h1, .brand-panel h2, .brand-panel h3,
main h1, main h2 { text-wrap: balance; }

body.lang-ja h1,
body.lang-ja h2,
body.lang-ja h3,
body.lang-ja .ds-btn-primary,
body.lang-ja .ds-btn-sso { word-break: keep-all; }

body.lang-ja .font-mono,
body.lang-ja .font-mono *,
body.lang-ja .otp-input,
body.lang-ja code { font-family: 'JetBrains Mono', 'Noto Sans Mono', monospace !important; }

body.lang-ja .label-mono {
  font-family: 'Inter', 'Noto Sans JP', sans-serif !important;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 500;
}
