/* ==========================================================================
   SEKAI JAPAN — Neumorphic / Claymorphic Login Experience
   Matches reference: Soft 3D extruded shapes, pill inputs, electric blue CTA
   ========================================================================== */

:root {
  --neu-bg: #f1f5f9;
  --neu-bg-grad: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  --neu-surface: rgba(255, 255, 255, 0.94);
  --neu-surface-solid: #ffffff;
  --neu-card-border: #e2e8f0;
  --neu-card-shadow: 0 4px 14px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
  
  --neu-tile-bg: #ffffff;
  --neu-tile-shadow: 0 2px 6px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  
  --neu-input-bg: #f8fafc;
  --neu-input-border: #cbd5e1;
  --neu-input-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  --neu-input-focus-border: #2563eb;
  --neu-input-focus-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  
  --neu-btn-bg: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --neu-btn-shadow: 0 2px 6px rgba(37, 99, 235, 0.16);
  --neu-btn-hover-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
  
  --neu-text-title: #0f172a;
  --neu-text-sub: #64748b;
  --neu-text-body: #334155;
  --neu-text-muted: #94a3b8;
  --neu-icon-color: #64748b;
  --neu-link: #2563eb;
  --neu-divider: #e2e8f0;
  
  --neu-font: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  --neu-bg: #0b111e;
  --neu-bg-grad: linear-gradient(180deg, #0f172a 0%, #0b111e 100%);
  --neu-surface: rgba(17, 26, 46, 0.94);
  --neu-surface-solid: #111a2e;
  --neu-card-border: rgba(255, 255, 255, 0.09);
  --neu-card-shadow: 0 6px 20px rgba(0, 0, 0, 0.24), 0 1px 3px rgba(0, 0, 0, 0.14);
  
  --neu-tile-bg: #152037;
  --neu-tile-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  
  --neu-input-bg: #0d1527;
  --neu-input-border: rgba(255, 255, 255, 0.12);
  --neu-input-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  --neu-input-focus-border: #60a5fa;
  --neu-input-focus-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
  
  --neu-text-title: #f8fafc;
  --neu-text-sub: #94a3b8;
  --neu-text-body: #cbd5e1;
  --neu-text-muted: #64748b;
  --neu-icon-color: #94a3b8;
  --neu-link: #60a5fa;
  --neu-divider: rgba(255, 255, 255, 0.09);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  width: 100%;
}

body.neu-login-body {
  font-family: var(--neu-font);
  background: var(--neu-bg-grad);
  background-attachment: fixed;
  color: var(--neu-text-body);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient Floating Background Spheres - Disabled to eliminate glowing orbs */
.neu-bg-orb,
.orb-top-left,
.orb-mid-right,
.orb-bottom-left,
.orb-bottom-right {
  display: none !important;
}

/* ==========================================================================
   Outer Wrapper & Container
   ========================================================================== */
.neu-login-wrap {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: auto;
}

/* ==========================================================================
   Top Header: Brand Pill & Dark/Light Toggle
   ========================================================================== */
.neu-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 4px;
}

.neu-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--neu-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--neu-card-border);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] .neu-brand-pill {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.neu-brand-kanji,
.neu-brand-logo-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
  flex-shrink: 0;
}

.neu-brand-kanji {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.neu-brand-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--neu-text-title);
}

.neu-theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--neu-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--neu-card-border);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--neu-icon-color);
  transition: all 0.22s ease;
  outline: none;
}

[data-theme="dark"] .neu-theme-toggle {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.neu-theme-toggle:hover {
  transform: translateY(-2px);
  color: var(--neu-link);
}

.neu-theme-toggle svg {
  width: 19px;
  height: 19px;
}

.neu-theme-toggle .icon-sun { display: none; }
.neu-theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .neu-theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .neu-theme-toggle .icon-moon { display: none; }

/* ==========================================================================
   The Main Neumorphic Card
   ========================================================================== */
.neu-card {
  width: 100%;
  background: var(--neu-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid var(--neu-card-border);
  border-radius: 38px;
  box-shadow: var(--neu-card-shadow);
  padding: 38px 30px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

@media (max-width: 480px) {
  .neu-card {
    padding: 30px 20px 26px;
    border-radius: 32px;
  }
}

/* ==========================================================================
   3D Emblem Squircle Tile
   ========================================================================== */
.neu-logo-box {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.neu-logo-tile {
  width: 108px;
  height: 108px;
  border-radius: 36px;
  background: var(--neu-tile-bg);
  box-shadow: var(--neu-tile-shadow);
  border: 1px solid rgba(255, 255, 255, 0.95);
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

[data-theme="dark"] .neu-logo-tile {
  border-color: rgba(255, 255, 255, 0.08);
}

.neu-logo-tile:hover {
  transform: scale(1.05) rotate(-1deg);
}

.neu-3d-logo-img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.16));
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  pointer-events: none;
}

.neu-logo-tile:hover .neu-3d-logo-img {
  transform: scale(1.08);
}

.neu-flame-svg {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.16));
}

/* ==========================================================================
   Headings: Welcome Back & Sign in to continue
   ========================================================================== */
.neu-header {
  text-align: center;
  margin-bottom: 26px;
}

.neu-title {
  font-size: clamp(26px, 5vw, 30px);
  font-weight: 850;
  color: var(--neu-text-title);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 6px;
}

.neu-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--neu-text-sub);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */
.neu-alert {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
  line-height: 1.45;
  text-align: center;
}

.neu-alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #dc2626;
}

[data-theme="dark"] .neu-alert-error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.neu-alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #059669;
}

[data-theme="dark"] .neu-alert-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

/* ==========================================================================
   Form & Pill Inputs
   ========================================================================== */
.neu-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.neu-field-group {
  width: 100%;
}

.neu-input-pill {
  width: 100%;
  min-height: 56px;
  border-radius: 28px;
  background: var(--neu-input-bg);
  border: 1.5px solid var(--neu-input-border);
  box-shadow: var(--neu-input-shadow);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
}

.neu-input-pill:focus-within {
  border-color: var(--neu-input-focus-border);
  box-shadow: var(--neu-input-focus-shadow);
}

.neu-input-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--neu-icon-color);
  width: 20px;
  height: 20px;
}

.neu-input-icon svg {
  width: 19px;
  height: 19px;
}

.neu-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--neu-text-title);
  padding: 14px 0;
}

.neu-input::placeholder {
  color: var(--neu-text-muted);
  font-weight: 500;
  opacity: 0.85;
}

.neu-eye-toggle {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--neu-icon-color);
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.18s ease;
  outline: none;
}

.neu-eye-toggle:hover {
  color: var(--neu-link);
}

.neu-eye-toggle svg {
  width: 18px;
  height: 18px;
}

.neu-eye-toggle .eye-closed { display: none; }
.neu-eye-toggle .eye-open { display: block; }
.neu-eye-toggle[aria-pressed="true"] .eye-closed { display: block; }
.neu-eye-toggle[aria-pressed="true"] .eye-open { display: none; }

/* ==========================================================================
   Options Row: Remember Me & Forgot Password
   ========================================================================== */
.neu-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2px 4px 6px;
  font-size: 13px;
}

.neu-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.neu-checkbox-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.neu-checkbox-custom {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--neu-input-bg);
  border: 1px solid var(--neu-card-border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  display: grid;
  place-items: center;
  color: #fff;
  transition: all 0.18s ease;
}

[data-theme="dark"] .neu-checkbox-custom {
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.neu-checkbox-custom svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.neu-checkbox-input:checked + .neu-checkbox-custom {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.neu-checkbox-input:checked + .neu-checkbox-custom svg {
  opacity: 1;
  transform: scale(1);
}

.neu-checkbox-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--neu-text-sub);
}

.neu-forgot-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--neu-link);
  text-decoration: none;
  transition: opacity 0.18s ease;
}

.neu-forgot-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* ==========================================================================
   Primary Action Button (Pill Capsule with Arrow Badge)
   ========================================================================== */
.neu-btn-primary {
  width: 100%;
  min-height: 56px;
  border-radius: 999px;
  background: var(--neu-btn-bg);
  border: none;
  outline: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--neu-btn-shadow);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0 54px 0 20px;
}

.neu-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--neu-btn-hover-shadow);
}

.neu-btn-primary:active {
  transform: translateY(1px);
}

.neu-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.neu-btn-text {
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.neu-btn-arrow {
  position: absolute;
  right: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4);
  display: grid;
  place-items: center;
  color: #ffffff;
  transition: transform 0.2s ease;
}

.neu-btn-primary:hover .neu-btn-arrow {
  transform: translateX(2px);
}

.neu-btn-arrow svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Divider: OR CONTINUE WITH
   ========================================================================== */
.neu-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px;
}

.neu-divider-line {
  flex: 1;
  height: 1px;
  background: var(--neu-divider);
}

.neu-divider-text {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--neu-text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   Social / Quick Action Buttons (3 Squircle Tiles in Reference Image)
   ========================================================================== */
.neu-social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 22px;
}

.neu-social-btn {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--neu-tile-bg);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  border: 1px solid var(--neu-card-border);
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--neu-icon-color);
  transition: all 0.22s ease;
}

[data-theme="dark"] .neu-social-btn {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.neu-social-btn:hover {
  transform: translateY(-3px);
  color: var(--neu-link);
}

.neu-social-btn svg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   Footer Tagline
   ========================================================================== */
.neu-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--neu-text-muted);
  text-transform: uppercase;
  padding-top: 4px;
}

.neu-dot {
  opacity: 0.6;
}

/* ==========================================================================
   Loading state & Spinner
   ========================================================================== */
.neu-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: neuSpinCircle 0.75s linear infinite;
  margin-right: 4px;
}

@keyframes neuSpinCircle {
  to { transform: rotate(360deg); }
}

.neu-btn-primary.is-loading .neu-spinner {
  display: inline-block;
}

.neu-btn-primary.is-loading .neu-btn-arrow {
  display: none;
}

.neu-btn-primary.is-loading {
  opacity: 0.88;
  cursor: not-allowed;
}

/* ==========================================================================
   Input Contrast & Affordance
   ========================================================================== */
.neu-input-pill {
  border: 1.5px solid var(--neu-input-border) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.neu-input-pill:focus-within {
  border-color: var(--neu-input-focus-border) !important;
  box-shadow: var(--neu-input-focus-shadow) !important;
}

/* ==========================================================================
   Informative Action Cards (Replaces Confusing Social Icons)
   ========================================================================== */
.neu-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

@media (min-width: 420px) {
  .neu-action-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.neu-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--neu-tile-bg);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  border: 1px solid var(--neu-card-border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .neu-action-card {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.neu-action-card:hover {
  transform: translateY(-2px);
  border-color: var(--neu-input-focus-border);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.neu-action-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.neu-icon-status {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.neu-icon-wa {
  background: rgba(37, 211, 102, 0.14);
  color: #16a34a;
}

.neu-action-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-align: left;
}

.neu-action-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--neu-text-title);
}

.neu-action-desc {
  font-size: 11px;
  color: var(--neu-text-sub);
  margin-top: 2px;
}
