/* ==========================================================================
   DREAM OF STROKES — LUXURY AUTHENTICATION DESIGN SYSTEM (Sign In & Sign Up)
   Theme: Obsidian Dark Focused Card | Zero Gold | Zero Pills | Pure Fine Art
   ========================================================================== */

:root {
  --auth-bg: #090a0d;
  --auth-surface: #111319;
  --auth-surface-elevated: #151821;
  --auth-card-bg: rgba(16, 18, 25, 0.9);
  
  --auth-border-subtle: rgba(255, 255, 255, 0.08);
  --auth-border-medium: rgba(255, 255, 255, 0.16);
  --auth-border-focus: rgba(255, 255, 255, 0.35);
  
  --auth-text-primary: #ffffff;
  --auth-text-secondary: #94a3b8;
  --auth-text-muted: #64748b;
  
  --auth-input-bg: rgba(255, 255, 255, 0.035);
  --auth-input-border: rgba(255, 255, 255, 0.12);
  
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Page Baseline */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.auth-page-body {
  min-height: 100vh;
  background-color: var(--auth-bg);
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(28, 33, 46, 0.38) 0%, rgba(9, 10, 13, 0.96) 65%),
    radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 28px 28px;
  color: var(--auth-text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Main Centered Wrapper */
.auth-main-wrapper {
  flex: 1;
  width: 100%;
  max-width: 520px;
  margin: 40px auto 80px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Obsidian Dark Auth Card (Clean, Centered, NO PILLS) */
.auth-card {
  width: 100%;
  background: var(--auth-card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--auth-border-subtle);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s ease;
  animation: authFadeUp 0.45s ease-out;
}

.auth-card:hover {
  border-color: var(--auth-border-medium);
}

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

/* Clean Typographic Curation Kicker (NO PILLS) */
.auth-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--auth-text-muted);
  margin-bottom: 14px;
}

.kicker-lead {
  color: #ffffff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kicker-lead i {
  font-size: 0.75rem;
  color: var(--auth-text-secondary);
}

.kicker-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.7rem;
}

.kicker-sub {
  color: var(--auth-text-secondary);
  font-weight: 400;
}

/* Headings */
.auth-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.2vw, 2.35rem);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.auth-subtitle {
  color: var(--auth-text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 26px;
}

/* Role Selector for Sign Up (Rectangular Museum Tabs, NO PILLS) */
.role-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.role-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--auth-border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.role-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-option i {
  font-size: 0.95rem;
  color: var(--auth-text-muted);
  transition: color 0.2s ease;
}

.role-option .role-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--auth-text-secondary);
  transition: color 0.2s ease;
}

.role-option:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--auth-border-medium);
}

.role-option.is-active,
.role-option:has(input:checked) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.role-option.is-active i,
.role-option:has(input:checked) i,
.role-option.is-active .role-label,
.role-option:has(input:checked) .role-label {
  color: #ffffff;
  font-weight: 600;
}

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

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 7px;
  letter-spacing: 0.2px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-input-border);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: all 0.22s ease;
}

.input-with-icon {
  padding-right: 46px;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 300;
}

.form-input:focus {
  border-color: var(--auth-border-focus);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.toggle-password-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--auth-text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 6px;
  transition: color 0.2s ease;
}

.toggle-password-btn:hover {
  color: #ffffff;
}

/* Flex Row between Password & Submit (Remember / Forgot) */
.form-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  font-size: 0.85rem;
}

.custom-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--auth-text-secondary);
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-label input[type="checkbox"] {
  accent-color: #ffffff;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.forgot-password-link {
  color: var(--auth-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Submit Button (Crisp White Luxury Rectangle, NO PILL) */
.auth-submit-btn {
  width: 100%;
  padding: 14px 24px;
  background: #ffffff;
  color: #090a0d;
  border: 1px solid #ffffff;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.12);
  transition: all 0.22s ease;
}

.auth-submit-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.2);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 22px 0;
  text-align: center;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider span {
  padding: 0 14px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--auth-text-muted);
}

/* Google Social Auth Button (Obsidian Glass, Rectangular, NO PILL) */
.auth-google-btn {
  width: 100%;
  padding: 13px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--auth-border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.22s ease;
}

.auth-google-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--auth-border-medium);
  transform: translateY(-1px);
}

/* Auth Switch Text */
.auth-switch-text {
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--auth-text-secondary);
}

.auth-switch-text a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-switch-text a:hover {
  color: #cbd5e1;
}

/* Toast Alert Messages */
.auth-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: authAlertFade 0.25s ease;
}

.auth-alert-info {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
}

.auth-alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.auth-alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

@keyframes authAlertFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 640px) {
  .auth-main-wrapper {
    padding: 0 16px;
    margin: 20px auto 50px;
  }

  .auth-card {
    padding: 32px 22px;
  }

  .auth-title {
    font-size: 1.85rem;
  }

  .role-picker {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   WHATSAPP PHONE VERIFICATION & 6-DIGIT OTP MODAL (Zero Gold, Obsidian Theme)
   ========================================================================== */
.input-with-action {
  display: flex;
  align-items: center;
  position: relative;
}

.input-with-action .form-input {
  padding-right: 110px;
}

.btn-inline-verify {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s ease;
}

.btn-inline-verify:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.02);
}

.btn-inline-verify.is-verified {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
  pointer-events: none;
  cursor: default;
}

.form-input.is-phone-verified {
  border-color: rgba(16, 185, 129, 0.45) !important;
  background: rgba(16, 185, 129, 0.04) !important;
}

.phone-verified-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-size: 0.78rem;
  color: #34d399;
  font-weight: 500;
}

/* OTP Modal Backdrop */
.otp-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(5, 6, 9, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease;
}

.otp-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* OTP Modal Card (Obsidian Glass + Monochromatic Platinum) */
.otp-modal-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, #13151f 0%, #090a0e 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 36px 32px 30px;
  position: relative;
  text-align: center;
  color: #ffffff;
  font-family: var(--font-sans);
  transform: scale(0.95) translateY(16px);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.otp-modal-backdrop.is-open .otp-modal-card {
  transform: scale(1) translateY(0);
}

.otp-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--auth-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.otp-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transform: scale(1.06);
}

.otp-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  margin: 0 auto 16px;
}

.otp-modal-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
}

.otp-modal-sub {
  font-size: 0.86rem;
  line-height: 1.5;
  color: #94a3b8;
  margin-bottom: 22px;
}

.otp-target-phone {
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Alert inside modal */
.otp-modal-alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  margin-bottom: 18px;
  line-height: 1.4;
  text-align: left;
}

.otp-alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.otp-alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.otp-alert-info {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
}

/* 6-Digit Grid */
.otp-inputs-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.otp-digit-box {
  width: 44px;
  height: 54px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 600;
  text-align: center;
  font-family: monospace;
  outline: none;
  transition: all 0.2s ease;
}

.otp-digit-box:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.otp-divider {
  color: var(--auth-text-muted);
  font-weight: 300;
  font-size: 1.2rem;
  user-select: none;
}

.btn-otp-confirm {
  width: 100%;
  padding: 13px 20px;
  background: #ffffff;
  color: #07080a;
  border: 1px solid #ffffff;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.22s ease;
  margin-bottom: 18px;
}

.btn-otp-confirm:hover:not(:disabled) {
  background: #e2e8f0;
  border-color: #e2e8f0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}

.btn-otp-confirm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.otp-modal-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.otp-resend-text {
  font-size: 0.82rem;
  color: var(--auth-text-secondary);
}

.btn-resend-link {
  background: none;
  border: none;
  color: #ffffff;
  font-weight: 500;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.btn-resend-link:disabled {
  color: var(--auth-text-muted);
  text-decoration: none;
  cursor: not-allowed;
}

.btn-change-number {
  background: none;
  border: none;
  color: var(--auth-text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-change-number:hover {
  color: #ffffff;
}

@media (max-width: 480px) {
  .otp-modal-card {
    padding: 28px 18px 22px;
  }
  .otp-digit-box {
    width: 38px;
    height: 48px;
    font-size: 1.25rem;
  }
  .otp-inputs-grid {
    gap: 5px;
  }
}
