/* =========================================
   ZERRA CLOUD - auth.css
   Login & Register page styles
   ========================================= */

.auth-body {
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
}

/* ── AUTH PAGE LAYOUT ─────────────────────── */
.auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── LEFT ASIDE ───────────────────────────── */
.auth-aside {
  background: linear-gradient(145deg, #0c1220 0%, #1a2d5a 55%, #0c1a3a 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 48px;
}

.aside-grid-bg {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
}

.auth-aside-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 36px;
}

.auth-aside .logo { color: #fff; font-size: 1.3rem; }
.auth-aside .logo i { color: #4da6ff; }
.auth-aside .logo em { color: #4da6ff; }



.aside-headline h1 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 12px;
}
.aside-headline h1 span { color: #4da6ff; }
.aside-headline p { color: rgba(255,255,255,.55); font-size: 14px; }

.aside-features {
  display: flex; flex-direction: column; gap: 14px;
}
.aside-feature {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: rgba(255,255,255,.75);
}
.aside-feature i {
  width: 32px; height: 32px;
  background: rgba(77,166,255,.15);
  border: 1px solid rgba(77,166,255,.25);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #4da6ff; font-size: .9rem; flex-shrink: 0;
}

/* ── RIGHT MAIN ───────────────────────────── */
.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--surface);
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

/* ── TABS ─────────────────────────────────── */
.auth-tabs {
  display: flex;
  position: relative;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: 28px;
  overflow: hidden;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border: none; background: transparent;
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  position: relative; z-index: 1;
  transition: color .2s;
}
.auth-tab.active { color: var(--text); }
.auth-tab-indicator {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.auth-tab-indicator.right { transform: translateX(100%); }

/* ── ALERT ────────────────────────────────── */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 18px;
  display: flex; align-items: flex-start; gap: 8px;
}
.alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-info    { background: var(--accent-lt); color: var(--accent); border: 1px solid #bfdbfe; }
.alert i { margin-top: 1px; flex-shrink: 0; }

/* ── PANEL ────────────────────────────────── */
.auth-panel {
  display: flex; flex-direction: column; gap: 18px;
}
.auth-panel.hidden { display: none; }

.panel-head { margin-bottom: 24px; }
.panel-head h2 { font-size: 1.4rem; margin-bottom: 4px; }
.panel-head p  { color: var(--text-muted); font-size: 13px; }

/* ── GOOGLE BUTTON ────────────────────────── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 13px 20px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.btn-google:hover {
  border-color: #4285f4;
  box-shadow: 0 2px 10px rgba(66,133,244,.18);
  transform: translateY(-1px);
}

/* ── DIVIDER ──────────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0;
  color: var(--text-muted); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── NOTE ─────────────────────────────────── */
.auth-google-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--accent-lt);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.6;
}
.auth-google-note i { margin-top: 2px; flex-shrink: 0; }

/* ── FOOTER LINK ──────────────────────────── */
.auth-footer-link {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.link-btn {
  background: none; border: none;
  color: var(--accent); font-size: 13px; font-weight: 600;
  cursor: pointer; padding: 0;
  transition: opacity .2s;
}
.link-btn:hover { opacity: .75; text-decoration: underline; }

/* ── REGISTER STEPS ───────────────────────── */
.register-steps {
  display: flex; flex-direction: column; gap: 12px;
}
.reg-step {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.reg-step-num {
  width: 28px; height: 28px;
  background: var(--accent); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.reg-step strong { display: block; font-size: 13px; margin-bottom: 2px; }
.reg-step p { font-size: 12px; color: var(--text-muted); }

/* ── AUTH PAGE FOOTER ─────────────────────── */
.auth-page-footer {
  margin-top: 28px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.auth-page-footer a { color: var(--accent); }
.auth-page-footer a:hover { text-decoration: underline; }

/* ===========================================
   MODAL - SETUP ACCOUNT (WAJIB)
   =========================================== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(10,15,30,.65);
  backdrop-filter: blur(4px);
}

.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  /* display diatur oleh JS: 'none' atau 'flex' */
  align-items: center; justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.modal-overlay.is-open {
  display: flex;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  animation: modalIn .3s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes modalIn {
  from { opacity:0; transform: scale(.94) translateY(10px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}

.modal-header { text-align: center; margin-bottom: 28px; }
.modal-icon {
  width: 56px; height: 56px;
  background: var(--accent-lt);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 1.4rem;
  margin: 0 auto 14px;
}
.modal-header h2 { font-size: 1.2rem; margin-bottom: 8px; }
.modal-header p  { font-size: 13px; color: var(--text-muted); }

/* ── FORM FIELDS ──────────────────────────── */
.field-group { margin-bottom: 18px; }
.field-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 7px;
}
.field-label i { color: var(--accent); font-size: .85rem; }

.field-wrap {
  position: relative;
  display: flex; align-items: center;
}
.field-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body); font-size: 14px;
  background: var(--bg); color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,109,255,.1);
  background: var(--surface);
}
.field-input.error   { border-color: var(--danger); }
.field-input.success { border-color: var(--success); }

.field-status {
  position: absolute; right: 12px;
  font-size: .85rem; pointer-events: none;
}
.field-status.ok  { color: var(--success); }
.field-status.err { color: var(--danger); }

.pw-toggle {
  position: absolute; right: 12px;
  background: none; border: none;
  color: var(--text-muted); cursor: pointer; padding: 4px;
  font-size: .9rem;
  transition: color .2s;
}
.pw-toggle:hover { color: var(--accent); }

.field-hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; display: block; }

/* ── PASSWORD STRENGTH ────────────────────── */
.pw-strength {
  display: flex; align-items: center; gap: 10px;
  margin-top: 7px;
}
.pw-bar {
  flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden;
}
.pw-bar span {
  display: block; height: 100%; border-radius: 2px;
  transition: width .3s ease, background .3s ease;
  width: 0;
}
#pwStrengthLabel { font-size: 11px; white-space: nowrap; }

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 820px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { min-height: 100vh; }
}

@media (max-width: 480px) {
  .modal-box { padding: 24px 18px; }
  .auth-card { max-width: 100%; }
}