/* ==========================================================================
   CLEARPROOF — UNIFIED SINGLE-PAGE AUTHENTICATION STYLESHEET
   Executive Dark SaaS Design (Linear / Apple / Vercel Aesthetic)
   ========================================================================== */

:root {
  --auth-bg: #090c14;
  --auth-card-bg: #0d101b;
  --auth-border: rgba(255, 255, 255, 0.09);
  --auth-border-focus: #6366f1;
  --auth-text-main: #f1f5f9;
  --auth-text-sub: #8b949e;
  --auth-text-muted: #64748b;
  --auth-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --auth-font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.auth-body {
  font-family: var(--auth-font-sans);
  background-color: var(--auth-bg);
  color: var(--auth-text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle Ambient Gradient Mesh (Non-intrusive) */
.auth-ambient-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
}

.auth-blob-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  top: -80px;
  left: 15%;
}

.auth-blob-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #3b82f6, transparent 70%);
  bottom: -60px;
  right: 15%;
}

/* Auth Card Container */
.auth-container {
  width: 100%;
  max-width: 430px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  padding: 30px 26px;
  box-shadow: 0 24px 50px -8px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

@media (max-width: 480px) {
  .auth-card {
    padding: 24px 18px;
    border-radius: 14px;
  }
}

/* Brand Header */
.auth-brand-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-bottom: 12px;
}

.auth-brand-logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
  display: block;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 12.5px;
  color: var(--auth-text-sub);
  line-height: 1.5;
}

/* Segmented Control Switcher (Masuk vs Daftar) */
.auth-segmented-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #070910;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 18px;
}

.auth-nav-tab {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--auth-text-sub);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  text-decoration: none;
}

.auth-nav-tab:hover {
  color: #ffffff;
}

.auth-nav-tab.is-active {
  background: #171d2e;
  color: #ffffff;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Tab Panes */
.auth-tab-pane {
  display: none;
  flex-direction: column;
}

.auth-tab-pane.is-active {
  display: flex;
  animation: authFadeIn 0.18s ease forwards;
}

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

/* Quick Demo Role Chips (No Personal Names) */
.demo-role-strip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 9px 11px;
  margin-bottom: 18px;
}

.demo-role-header {
  font-size: 11px;
  color: #8b949e;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.demo-role-header svg {
  width: 12px;
  height: 12px;
  color: #a5b4fc;
}

.demo-role-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.btn-role-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-role-chip:hover,
.btn-role-chip:active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.btn-role-chip svg {
  width: 12px;
  height: 12px;
  color: #94a3b8;
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-link {
  font-size: 11.5px;
  color: #818cf8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

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

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

.input-icon {
  position: absolute;
  left: 12px;
  color: var(--auth-text-muted);
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  height: 40px;
  background: #111422;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  padding: 0 12px 0 36px;
  font-size: 13px;
  font-family: inherit;
  color: #ffffff;
  transition: all 0.15s ease;
}

.auth-input::placeholder {
  color: #555e70;
}

.auth-input:focus {
  outline: none;
  border-color: var(--auth-border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
  background: #131728;
}

.btn-toggle-pwd {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--auth-text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.btn-toggle-pwd svg {
  width: 15px;
  height: 15px;
}

/* Checkbox */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--auth-text-sub);
  cursor: pointer;
  user-select: none;
  line-height: 1.4;
}

.checkbox-row input[type="checkbox"] {
  accent-color: #6366f1;
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-row a {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Primary Executive White Button */
.btn-auth-submit {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  border: none;
  color: #0b0f19;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.12);
  transition: all 0.15s ease;
  font-family: inherit;
  margin-top: 4px;
}

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

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

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

.btn-auth-submit svg {
  width: 15px;
  height: 15px;
  color: #0b0f19;
  transition: transform 0.15s ease;
}

.btn-auth-submit:hover svg {
  transform: translateX(2px);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: var(--auth-text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.auth-divider span {
  padding: 0 10px;
}

/* SSO / Direct Guest Button */
.btn-auth-sso {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #cbd5e1;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-auth-sso:hover,
.btn-auth-sso:active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.btn-auth-sso svg {
  width: 14px;
  height: 14px;
  color: #10b981;
}

/* Switch & Navigation Links */
.auth-switch-box {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--auth-text-muted);
}

.auth-switch-link {
  color: #818cf8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 12px;
}

.auth-switch-link:hover {
  color: #ffffff;
}

.auth-back-home {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--auth-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.auth-back-home:hover {
  color: #ffffff;
}

.auth-back-home svg {
  width: 13px;
  height: 13px;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #111422;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 12.5px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.2s ease;
  pointer-events: auto;
}

.toast.toast-error {
  border-color: rgba(244, 63, 94, 0.4);
}

.toast.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
}

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