/* FolioIO auth — split layout: form kiri, logo hero kanan */
.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #000;
  font-family: var(--fn, 'Geist', system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
}

.auth-overlay.open {
  display: flex;
}

.auth-overlay.auth-required.open {
  pointer-events: auto;
}

.auth-overlay.open:not(.auth-required) {
  pointer-events: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app.auth-locked {
  visibility: hidden;
  pointer-events: none;
}

.auth-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-panel {
  flex: 0 0 46%;
  min-width: 340px;
  max-width: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  background: #000;
  border-right: 1px solid rgba(255, 255, 255, .06);
  overflow-y: auto;
  position: relative;
  z-index: 2;
}

.auth-modal {
  width: 100%;
  max-width: 380px;
  pointer-events: auto;
}

.auth-form-title {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -.02em;
  margin: 0 0 6px;
}

.auth-form-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, .45);
  line-height: 1.5;
  margin: 0 0 24px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
  touch-action: manipulation;
}

.auth-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .22);
}

.auth-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.auth-btn-google {
  justify-content: flex-start;
  padding-left: 14px;
}

.auth-google-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 4px;
  flex-shrink: 0;
}

.auth-google-icon img {
  width: 18px;
  height: 18px;
  display: block;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 11px;
  color: rgba(255, 255, 255, .35);
}

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

.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, .75);
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: rgba(96, 165, 250, .5);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .12);
}

.auth-field input::placeholder {
  color: rgba(255, 255, 255, .28);
}

.auth-btn-primary {
  margin-top: 4px;
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
  font-weight: 600;
}

.auth-btn-primary:hover:not(:disabled) {
  background: #2563eb;
  border-color: #2563eb;
}

.auth-hint {
  margin-top: 14px;
  font-size: 11px;
  color: rgba(255, 255, 255, .32);
  line-height: 1.55;
}

.auth-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.auth-status-info {
  color: #93c5fd;
  background: rgba(59, 130, 246, .1);
  border: 1px solid rgba(59, 130, 246, .25);
}

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

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

.auth-status-error a {
  color: #93c5fd;
}

.auth-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  font-size: 11px;
  color: rgba(255, 255, 255, .28);
  text-align: center;
}

.auth-social {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 28px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  color: rgba(255, 255, 255, .5);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: .02em;
  transition: color .15s, border-color .15s, background .15s;
  pointer-events: auto;
}

.auth-social:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .04);
}

.auth-footer a {
  color: rgba(255, 255, 255, .45);
  text-decoration: none;
}

.auth-footer a:hover {
  color: #fff;
}

.auth-skip {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .45);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.auth-skip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
}

/* ── Kanan: logo hero ── */
.auth-visual {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  pointer-events: none;
}

.auth-hero-logo {
  position: relative;
  z-index: 1;
  width: min(28vmin, 200px);
  height: min(28vmin, 200px);
  object-fit: contain;
  opacity: .95;
  animation: authLogoFloat 6s ease-in-out infinite;
}

.auth-hero-wordmark {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, .9);
  text-transform: uppercase;
}

.auth-hero-tagline {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  max-width: 320px;
  padding: 0 24px;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .4);
  letter-spacing: .04em;
}

@keyframes authLogoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 900px) {
  .auth-shell {
    flex-direction: column;
  }

  .auth-panel {
    flex: 1;
    max-width: none;
    border-right: none;
    padding: 32px 24px 40px;
  }

  .auth-visual {
    flex: 0 0 auto;
    order: -1;
    padding: 32px 24px 8px;
  }

  .auth-hero-logo {
    width: 80px;
    height: 80px;
  }

  .auth-hero-wordmark {
    font-size: 18px;
    margin-top: 12px;
  }

  .auth-hero-tagline {
    font-size: 11px;
    max-width: 280px;
  }

  .auth-social {
    margin-top: 16px;
    font-size: 11px;
    padding: 6px 12px;
  }
}

.auth-loading {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: #000;
  color: rgba(255, 255, 255, .7);
  font-size: 14px;
  align-items: center;
  justify-content: center;
  font-family: var(--fn, 'Geist', system-ui, sans-serif);
}
