/* Tulis Engine — auth (extracted from app.css) */

/* ── AUTH PAGES (light; nuansa mengikuti --primary) ── */
.auth-body {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow-x: hidden; overflow-y: auto;
  padding: 24px 16px;
  color: var(--text);
  background:
    radial-gradient(ellipse 110% 75% at 50% -18%, color-mix(in srgb, var(--primary) 22%, transparent) 0%, transparent 52%),
    radial-gradient(ellipse 85% 60% at 105% 25%, color-mix(in srgb, var(--primary-hover) 14%, transparent) 0%, transparent 48%),
    radial-gradient(ellipse 75% 55% at -8% 85%, color-mix(in srgb, var(--primary) 10%, transparent) 0%, transparent 50%),
    linear-gradient(168deg, var(--primary-light) 0%, color-mix(in srgb, var(--primary-light) 35%, white) 42%, var(--bg) 100%);
}
.auth-container { position: relative; z-index: 2; width: 100%; max-width: 400px; }
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--primary) 8%, transparent);
}
.auth-header { text-align: center; margin-bottom: 22px; }
.auth-logo { margin-bottom: 0; }
.auth-brand-logo-link {
  display: inline-block;
  line-height: 0;
  border-radius: 16px;
  transition: var(--transition);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--primary) 18%, transparent);
}
.auth-brand-logo-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--primary) 26%, transparent);
}
.auth-brand-logo-img {
  width: 64px; height: 64px; object-fit: contain;
  display: block; margin: 0 auto;
}
.auth-product-title {
  font-size: 1.25rem; font-weight: 800; color: var(--text);
  margin: 14px 0 0; letter-spacing: -0.03em; line-height: 1.2;
}
.auth-product-by {
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  margin: 6px 0 0; letter-spacing: 0.02em;
}
.auth-product-by a {
  color: var(--primary); font-weight: 600; text-decoration: none;
}
.auth-product-by a:hover { color: var(--primary-hover); text-decoration: underline; }
.auth-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 10px; line-height: 1.45; }

.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 2px; }
.auth-form--compact { gap: 10px; }
.auth-form--compact .form-group { margin-bottom: 0; }
.auth-form--compact label {
  font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--text-secondary);
}
.auth-form--compact input {
  padding: 8px 12px; font-size: 13px; border-radius: var(--radius);
}
.auth-btn-submit {
  margin-top: 4px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
}

.auth-google-btn { margin-bottom: 0; }
.auth-google-btn--solo { margin-top: 4px; }

.auth-error {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px;
  background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius); color: #DC2626; font-size: 13px; line-height: 1.45; margin-bottom: 16px;
}
.auth-error--block { display: block; }
.auth-error svg { flex-shrink: 0; margin-top: 2px; }

.auth-notice {
  padding: 11px 13px; margin-bottom: 16px; font-size: 13px; line-height: 1.45;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--text);
}
.auth-notice strong { font-weight: 600; }

.auth-register-hint {
  margin: 14px 0 0;
  font-size: 12px; line-height: 1.5;
  color: var(--text-secondary);
  text-align: center;
}

.auth-footer {
  text-align: center; margin-top: 22px; padding-top: 20px;
  border-top: 1px solid var(--border-light);
  font-size: 13px; color: var(--text-secondary);
}
.auth-footer a { color: var(--primary); font-weight: 600; }
.auth-footer a:hover { color: var(--primary-hover); }

/* Google sign-in */
.btn-google {
  background: #fff !important;
  color: #3c4043 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  font-weight: 600 !important;
}
.btn-google:hover {
  background: #f8f9fa !important;
  color: #202124 !important;
  filter: none !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}
.btn-google:active { transform: translateY(0); }
.auth-google-icon { flex-shrink: 0; }

.auth-google-idle,
.auth-google-busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.auth-google-busy { display: none; }
.btn-google.is-loading .auth-google-idle { display: none; }
.btn-google.is-loading .auth-google-busy { display: inline-flex; }

.auth-google-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(60, 64, 67, 0.2);
  border-top-color: #4285f4;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
.btn-google.is-loading {
  pointer-events: none;
  cursor: wait !important;
  opacity: 0.95;
  transform: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}
.btn-google.is-loading:hover {
  background: #fff !important;
  transform: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

.auth-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 16px 0 14px;
  color: var(--text-muted);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
}

/* Auth background orbs */
.auth-decoration { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; pointer-events: none; }
.auth-deco-circle { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.2; }
.auth-deco-1 { width: min(480px, 90vw); height: min(480px, 90vw); background: var(--primary); top: -200px; right: -100px; animation: float1 10s ease-in-out infinite; }
.auth-deco-2 { width: min(380px, 75vw); height: min(380px, 75vw); background: color-mix(in srgb, var(--primary) 55%, white); bottom: -120px; left: -90px; opacity: 0.16; animation: float2 12s ease-in-out infinite; }
.auth-deco-3 { width: min(280px, 60vw); height: min(280px, 60vw); background: var(--primary-hover); top: 44%; left: 50%; opacity: 0.14; animation: float3 14s ease-in-out infinite; }
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-24px, 16px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(18px,-22px); } }
@keyframes float3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-16px,-18px); } }


.auth-footer-legal {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
}
.auth-footer-legal a {
  color: var(--primary);
  font-weight: 600;
}
