/* ==========================================================================
   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;
  }
}
