/* ============================================================
   z-auth.css - ZALIN LABS AKUN (SSO) G454, G460, G465, G469
   Styling komponen akun universal (navbar + modal + member zone).
   G460: catatan SSO bottom (note + tombol "Buat Akun / Masuk")
   dihapus per arahan Boss (cukup tombol akun di navbar); blok
   member zone ditambahkan untuk halaman layanan (/gis/, /ai-tech/).
   G469: foto profil - .z-auth-avatar-img (bulat, object-fit cover)
   + .z-auth-menu-ava + tombol .z-auth-menu-photo di dropdown akun.
   Berdiri sendiri; tidak menimpa styles.css / app.css / 3d.css.
   ============================================================ */

/* ---------- Slot di navbar ---------- */
.z-auth-slot-li { display: flex; align-items: center; }
.z-auth-slot-m3d { display: inline-flex; align-items: center; margin-left: 6px; }
[data-z-auth-slot] { min-width: 0; }

.z-auth-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 12px; border-radius: 999px; /* G534: tombol nav lebih ramping per arahan Boss RK-PILECB */
  border: 1px solid rgba(90, 106, 245, 0.45);
  background: rgba(90, 106, 245, 0.10);
  color: #5a6af5; font: inherit; font-size: 0.86rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; min-height: 34px;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.z-auth-btn:hover, .z-auth-btn:focus-visible {
  background: #5a6af5; color: #ffffff;
  box-shadow: 0 4px 14px rgba(90, 106, 245, 0.35);
  outline: none;
}

.z-auth-user { position: relative; display: inline-flex; }
.z-auth-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(135deg, #5a6af5, #7c8cff);
  color: #ffffff; font: inherit; font-size: 0.9rem; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(90, 106, 245, 0.35);
  overflow: hidden; padding: 0;
}
.z-auth-avatar:hover, .z-auth-avatar:focus-visible { outline: 2px solid rgba(90, 106, 245, 0.6); outline-offset: 2px; }

/* G469: foto profil memenuhi lingkaran avatar */
.z-auth-avatar-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  display: block;
}
/* G469: foto + tombol ganti foto di dropdown akun */
.z-auth-menu-ava {
  float: right; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #5a6af5, #7c8cff);
  color: #ffffff; font-size: 0.95rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.z-auth-menu-photo {
  display: block; width: 100%; margin-bottom: 6px; padding: 9px 10px;
  border-radius: 9px; border: 1px solid rgba(90, 106, 245, 0.35);
  background: rgba(90, 106, 245, 0.08); color: #3f4dd8;
  font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer;
}
.z-auth-menu-photo:hover { background: #5a6af5; border-color: #5a6af5; color: #ffffff; }
.z-auth-menu-photo:disabled { opacity: 0.6; cursor: wait; }
.z-auth-file { display: none !important; }

.z-auth-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 250px; padding: 10px;
  background: #ffffff; color: #12152b;
  border: 1px solid rgba(18, 21, 43, 0.08);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(10, 12, 30, 0.22);
  z-index: 1200;
}
.z-auth-menu-head { padding: 6px 8px 10px; border-bottom: 1px solid rgba(18, 21, 43, 0.08); margin-bottom: 6px; }
.z-auth-menu-email { display: block; font-size: 0.86rem; font-weight: 700; overflow-wrap: anywhere; }
.z-auth-menu-sub { display: block; margin-top: 3px; font-size: 0.72rem; color: #6a7090; }
.z-auth-menu-link {
  display: block; padding: 8px 10px; border-radius: 9px;
  color: #12152b; text-decoration: none; font-size: 0.86rem; font-weight: 500;
}
.z-auth-menu-link:hover { background: rgba(90, 106, 245, 0.10); color: #3f4dd8; }
.z-auth-menu-out {
  display: block; width: 100%; margin-top: 6px; padding: 9px 10px;
  border-radius: 9px; border: 1px solid rgba(215, 63, 72, 0.35);
  background: rgba(215, 63, 72, 0.08); color: #c62f39;
  font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer;
}
.z-auth-menu-out:hover { background: #d33f48; border-color: #d33f48; color: #ffffff; }

/* ---------- Member zone (G460) ---------- */
.member-zone { padding: 66px 0 74px; background: #05060f; color: #eef0fb; }
.member-card {
  max-width: 760px; margin: 0 auto; padding: 32px 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  text-align: center;
}
.member-head { display: flex; gap: 14px; align-items: center; justify-content: center; }
.member-avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #5a6af5, #7c8cff); color: #ffffff;
  font-size: 1.1rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(90, 106, 245, 0.4);
}
.member-eyebrow {
  margin: 0 0 5px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: #9aa3ff;
  text-align: left;
}
.member-name { margin: 0; font-size: 1.22rem; font-weight: 800; text-align: left; }
.member-email { color: #b9beff; font-weight: 700; overflow-wrap: anywhere; }
.member-list {
  margin: 22px auto 0; padding: 0; list-style: none;
  text-align: left; max-width: 560px;
}
.member-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; font-size: 0.94rem; font-weight: 500;
}
.member-list svg { flex: none; margin-top: 3px; color: #8f9bff; }
.member-status {
  margin: 20px auto 0; max-width: 560px;
  font-size: 0.9rem; color: #b9bedd; line-height: 1.65;
}
.member-status strong { color: #7ddba3; }
.member-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 11px 24px; margin-top: 24px;
  border-radius: 999px; background: linear-gradient(135deg, #5a6af5, #7c8cff);
  color: #ffffff; font: inherit; font-size: 0.92rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(90, 106, 245, 0.38);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.member-cta:hover, .member-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(90, 106, 245, 0.45);
  outline: none;
}
.member-zone[hidden] { display: none; }

/* ---------- Modal ---------- */
.z-auth-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 12, 30, 0.58);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 16px;
}
.z-auth-overlay[hidden] { display: none; }
.z-auth-modal {
  position: relative; width: 100%; max-width: 400px; max-height: 92vh; overflow-y: auto;
  background: #ffffff; color: #12152b;
  border-radius: 18px; padding: 26px 24px 20px;
  box-shadow: 0 30px 80px rgba(10, 12, 30, 0.4);
}
.z-auth-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: rgba(18, 21, 43, 0.06); color: #4a4f68;
  font-size: 1.15rem; line-height: 1; cursor: pointer;
}
.z-auth-close:hover { background: rgba(18, 21, 43, 0.12); }
.z-auth-title { margin: 0 0 6px; font-size: 1.18rem; font-weight: 800; letter-spacing: -0.01em; }
.z-auth-sub { margin: 0 0 16px; font-size: 0.84rem; color: #565d78; line-height: 1.45; }

.z-auth-tabs { display: flex; gap: 6px; background: rgba(18, 21, 43, 0.05); border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.z-auth-tab {
  flex: 1; padding: 8px 0; border: none; border-radius: 8px;
  background: transparent; color: #565d78;
  font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.z-auth-tab.is-active { background: #ffffff; color: #12152b; box-shadow: 0 1px 6px rgba(10, 12, 30, 0.12); }

.z-auth-google {
  display: flex; width: 100%; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 10px 14px; border-radius: 11px;
  border: 1px solid rgba(18, 21, 43, 0.16); background: #ffffff; color: #12152b;
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.z-auth-google:hover:not(:disabled) { background: rgba(90, 106, 245, 0.06); border-color: rgba(90, 106, 245, 0.45); }
.z-auth-google:disabled { opacity: 0.6; cursor: wait; }
.z-auth-g {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, #ea4335, #fbbc05, #34a853, #4285f4);
  color: #ffffff; font-size: 0.72rem; font-weight: 800;
}
.z-auth-or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: #8a90ab; font-size: 0.75rem; }
.z-auth-or::before, .z-auth-or::after { content: ""; flex: 1; height: 1px; background: rgba(18, 21, 43, 0.1); }

.z-auth-label { display: block; margin: 10px 0 5px; font-size: 0.78rem; font-weight: 600; color: #3a3f58; }
.z-auth-input {
  width: 100%; box-sizing: border-box; padding: 11px 13px;
  border-radius: 11px; border: 1px solid rgba(18, 21, 43, 0.16);
  background: #fafbfe; color: #12152b; font: inherit; font-size: 0.92rem;
}
.z-auth-input:focus { outline: 2px solid rgba(90, 106, 245, 0.5); outline-offset: 1px; border-color: #5a6af5; }
.z-auth-err { margin: 10px 0 0; font-size: 0.8rem; color: #c62f39; background: rgba(215, 63, 72, 0.08); border-radius: 8px; padding: 8px 10px; }
.z-auth-err[hidden] { display: none; }
.z-auth-submit {
  display: block; width: 100%; margin-top: 14px; min-height: 44px;
  border: none; border-radius: 11px; color: #ffffff;
  background: linear-gradient(135deg, #5a6af5, #7c8cff);
  font: inherit; font-size: 0.92rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 18px rgba(90, 106, 245, 0.35);
}
.z-auth-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(90, 106, 245, 0.45); }
.z-auth-submit:disabled { opacity: 0.65; cursor: wait; }
.z-auth-forgot { margin: 12px 0 0; text-align: center; font-size: 0.8rem; }
.z-auth-forgot a { color: #3f4dd8; text-decoration: none; }
.z-auth-forgot a:hover { text-decoration: underline; }
.z-auth-sso-note {
  margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed rgba(18, 21, 43, 0.12);
  text-align: center; font-size: 0.74rem; color: #6a7090;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .z-auth-slot-li { margin: 10px 0 0; }
  .z-auth-menu { width: min(240px, 86vw); }
  .z-auth-modal { padding: 22px 18px 16px; }
  .member-zone { padding: 52px 0 60px; }
  .member-card { padding: 26px 18px; }
  .member-head { flex-direction: column; gap: 10px; }
  .member-eyebrow, .member-name { text-align: center; }
  .member-name { font-size: 1.08rem; }
}
@media (max-width: 480px) {
  .z-auth-btn { padding: 6px 12px; font-size: 0.8rem; }
  .member-list li { font-size: 0.9rem; }
}
