/* ============================================================
   SINGO MINGO &#8212; Auth Pages CSS
   Shared styles for login, register, forgot/reset password
   ============================================================ */

/* &#9472;&#9472; Auth Layout &#9472;&#9472; */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow-x: hidden;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 68px);
  overflow-x: hidden;
}

/* &#9472;&#9472; Auth Split Layout (desktop) &#9472;&#9472; */
.auth-split {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  overflow-x: hidden;
}

@media (min-width: 900px) {
  .auth-split {
    grid-template-columns: 1fr 1fr;
  }
}

/* &#9472;&#9472; Auth Branding Panel (left) &#9472;&#9472; */
.auth-brand-panel {
  display: none;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #4C1D95 0%, #6D28D9 40%, #0F766E 100%);
  padding: 60px 48px;
  flex-direction: column;
  justify-content: space-between;
}

@media (min-width: 900px) {
  .auth-brand-panel {
    display: flex;
  }
}

/* Pattern overlay */
.auth-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

.auth-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.08);
}

.auth-brand-content {
  position: relative;
  z-index: 1;
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 60px;
}

.auth-brand-logo .logo-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
}

.auth-brand-logo .logo-text {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: white;
  letter-spacing: -0.5px;
}

.auth-brand-tagline {
  color: white;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 20px;
}

.auth-brand-tagline span {
  color: rgba(255,255,255,0.7);
  font-size: 0.8em;
}

.auth-brand-desc {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 340px;
  margin-bottom: 40px;
}

/* Feature list in brand panel */
.auth-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-feature-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Bottom testimonial */
.auth-testimonial {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(10px);
}

.auth-testimonial-text {
  color: white;
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 16px;
  font-style: italic;
}

.auth-testimonial-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.auth-testimonial-name {
  font-weight: 700;
  color: white;
  font-size: 0.88rem;
}

.auth-testimonial-loc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
}

/* &#9472;&#9472; Auth Form Panel (right) &#9472;&#9472; */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--bg);
  transition: background 0.3s;
  overflow-x: hidden;
}

@media (min-width: 480px) {
  .auth-form-panel {
    padding: 40px 24px;
  }
}

@media (min-width: 640px) {
  .auth-form-panel {
    padding: 48px 40px;
  }
}

.auth-form-inner {
  width: 100%;
  max-width: 440px;
  min-width: 0; /* prevent overflow */
}

/* &#9472;&#9472; Auth Card Header &#9472;&#9472; */
.auth-header {
  text-align: center;
  margin-bottom: 36px;
}

.auth-header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

@media (min-width: 900px) {
  .auth-header-logo {
    display: none; /* hidden on desktop &#8212; shown in left panel */
  }
}

.auth-header-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: white;
}

.auth-header-logo .logo-text {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text);
}

.auth-header-logo .logo-text span { color: var(--primary); }

.auth-header h1 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  font-family: 'Sora', sans-serif;
}

.auth-header p {
  color: var(--text-sub);
  font-size: 0.95rem;
}

/* &#9472;&#9472; Auth Form &#9472;&#9472; */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Form Groups */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.form-label .optional {
  font-weight: 400;
  color: var(--text-mute);
  font-size: 0.78rem;
  margin-left: 4px;
}

/* Input wrapper for icon + eye */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-mute);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
  line-height: 1;
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
  background: var(--card);
}

.form-input::placeholder {
  color: var(--text-mute);
  font-size: 0.9rem;
}

/* With left icon */
.form-input.has-icon {
  padding-left: 42px;
}

/* With eye button */
.form-input.has-eye {
  padding-right: 46px;
}

/* Eye toggle button */
.eye-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-mute);
  font-size: 1.1rem;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  z-index: 2;
  line-height: 1;
}

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

/* Select */
select.form-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* Error state */
.form-input.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

/* Error message */
.field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #EF4444;
  font-size: 0.8rem;
  margin-top: 6px;
  font-weight: 500;
  display: none;
}

.field-error.show { display: flex; }

/* &#9472;&#9472; Password Strength Bar &#9472;&#9472; */
.password-strength {
  margin-top: 10px;
}

.strength-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}

.strength-label {
  font-size: 0.78rem;
  font-weight: 600;
  transition: color 0.3s;
  color: var(--text-mute);
}

/* Password checklist */
.pw-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}

.pw-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-mute);
  transition: color 0.2s;
}

.pw-check .check-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  flex-shrink: 0;
}

.pw-check.passed { color: #16A34A; }
.pw-check.passed .check-icon {
  background: #16A34A;
  border-color: #16A34A;
  color: white;
}
.pw-check.passed .check-icon::after { content: '&#10003;'; }

/* &#9472;&#9472; Divider with text &#9472;&#9472; */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--text-mute);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* &#9472;&#9472; Auth Submit Button &#9472;&#9472; */
.btn-auth {
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.btn-auth:hover:not(:disabled) {
  background: var(--primary-h);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124,58,237,0.35);
}

.btn-auth:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-auth .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* -- Animated loading dots -- */
.loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
}
.loading-dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
  animation: dotFade 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotFade {
  0%, 60%, 100% { opacity: 0.2; transform: translateY(0); }
  30%            { opacity: 1;   transform: translateY(-4px); }
}

/* &#9472;&#9472; Alert / Error Box &#9472;&#9472; */
.auth-alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
  display: none;
}

.auth-alert.show { display: flex; }
.auth-alert-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
}
.auth-alert-success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
}
.auth-alert-info {
  background: var(--primary-s);
  border: 1px solid rgba(124,58,237,0.2);
  color: var(--primary);
}

[data-theme="dark"] .auth-alert-error { background: #3B0A1422; border-color: #9B1239; color: #FB7185; }
[data-theme="dark"] .auth-alert-success { background: #14532D22; border-color: #4ADE80; color: #4ADE80; }

.auth-alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* &#9472;&#9472; Bottom links &#9472;&#9472; */
.auth-footer-link {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-sub);
}

.auth-footer-link a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-footer-link a:hover { color: var(--primary-h); text-decoration: underline; }

/* &#9472;&#9472; Remember me / checkbox &#9472;&#9472; */
.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.form-checkbox-label {
  font-size: 0.88rem;
  color: var(--text-sub);
  cursor: pointer;
  user-select: none;
}

/* &#9472;&#9472; Progress Steps (register) &#9472;&#9472; */
.register-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.reg-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-mute);
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
  font-family: 'Sora', sans-serif;
}

.step-circle.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.step-circle.done {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.step-line {
  width: 40px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  transition: background 0.3s;
}

.step-line.done { background: var(--accent); }

/* &#9472;&#9472; Success State &#9472;&#9472; */
.auth-success-state {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: #DCFCE7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 24px;
  animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] .success-icon { background: #14532D33; }

@keyframes successPop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* &#9472;&#9472; Terms checkbox &#9472;&#9472; */
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.terms-row .form-checkbox { margin-top: 2px; }

.terms-row label {
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.6;
  cursor: pointer;
}

.terms-row label a {
  color: var(--primary);
  font-weight: 600;
}

/* &#9472;&#9472; Interest Tags (register step 2) &#9472;&#9472; */
.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-tag {
  padding: 8px 16px;
  border-radius: 50px;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--text-sub);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  user-select: none;
}

.interest-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-s);
}

.interest-tag.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}
