.header-glass[data-astro-cid-3ef6ksr2]{background-color:rgba(255,255,255,0);backdrop-filter:blur(16px)}@media (min-width: 768px){.hide-mobile-auth[data-astro-cid-3ef6ksr2]{display:none}}.logo-image[data-astro-cid-3ef6ksr2]{max-height:4rem;height:auto;width:auto;max-width:none}@media (min-width: 768px) and (max-width: 1104px){#main-header[data-astro-cid-3ef6ksr2]>.container[data-astro-cid-3ef6ksr2]{padding-left:1.5rem;padding-right:1.5rem}}@media (max-width: 1024px){.logo-image[data-astro-cid-3ef6ksr2]{max-height:3.4rem}}@media (max-width: 768px){.logo-image[data-astro-cid-3ef6ksr2]{max-height:3.1rem}}@media (max-width: 480px){.logo-image[data-astro-cid-3ef6ksr2]{max-height:3rem}}.ai-chat-float {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 1000;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* Tombol hamburger utama */
.ai-menu-toggle {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: none;
  background-color: #111827;
  color: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.5);
  cursor: pointer;
  display: none;               /* HILANGKAN hamburger dari UI */
  flex-direction: column;
  justify-content: center;
  padding: 0 18px;
  gap: 5px;
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,
    background-color 0.15s ease-out;
}

.ai-menu-toggle:hover {
  background-color: #020617;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.55);
}

.ai-menu-line {
  height: 2px;
  border-radius: 999px;
  background-color: #e5e7eb;
}

/* Container tombol (sekarang hanya AI), selalu kelihatan */
.ai-menu-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  opacity: 1;                  /* selalu terlihat */
  transform: translateY(0);    /* tidak ada animasi naik */
  pointer-events: auto;        /* bisa diklik */
  transition:
    opacity 0.15s ease-out,
    transform 0.15s ease-out;
}

/* Kelas .ai-chat-float.ai-panel-open → bubble disembunyikan */
.ai-chat-float.ai-panel-open .ai-menu-actions {
  display: none;
}

.ai-menu-btn {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.4);
  cursor: pointer;
}

.ai-menu-btn-wa {
  background-color: #25d366;
  display: none;               /* sembunyikan WA */
  pointer-events: none;        /* pastikan tidak bisa diklik */
}

.ai-menu-btn-ai {
  background-color: #1e3a8a;
}

.ai-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-menu-icon svg {
  display: block;
}

.ai-chat-panel {
  position: fixed;
  right: 40px;
  bottom: 140px;           /* sedikit di atas bubble 88px di bottom:40 */
  left: auto;
  top: auto;
  width: 380px;
  max-width: calc(100% - 48px);
  height: 850px;           /* TINGGI KONSTAN desktop — lebih panjang */
  max-height: 70vh;        /* kalau layar pendek, tetap dibatasi */
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Saat panel AI terbuka: turunkan posisi saja, tinggi ikuti 70vh */
.ai-chat-float.ai-panel-open .ai-chat-panel {
  bottom: 40px;
}

.ai-chat-panel.hidden {
  display: none;
}

.ai-chat-header {
  padding: 12px 14px;
  background: linear-gradient(135deg, #1e3a8a, #162c77);
  color: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.ai-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-chat-reset {
  border: none;
  background: rgba(15, 23, 42, 0.16);
  color: #e5e7eb;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.ai-chat-reset:hover {
  background: rgba(15, 23, 42, 0.28);
}

.ai-chat-close {
  border-radius: 999px;
  border: 1px solid rgba(239, 246, 255, 0.6);
  background: rgba(15, 23, 42, 0.16);
  color: #e5e7eb;
  font-size: 11px;
  line-height: 1;
  padding: 4px 10px;
  cursor: pointer;
}

.ai-chat-close:hover {
  background: rgba(15, 23, 42, 0.30);
}

.ai-chat-header-actions button[data-tooltip] {
  position: relative;
}

.ai-chat-header-actions button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.96);
  color: #f9fafb;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.45);
  z-index: 20;
  transition:
    opacity 0.15s ease-out,
    transform 0.15s ease-out;
}

.ai-chat-header-actions button[data-tooltip]:hover::after,
.ai-chat-header-actions button[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
  outline: none;
}

.ai-chat-title {
  font-size: 14px;
  font-weight: 600;
}

.ai-chat-subtitle {
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.9;
}

/* Tabs Chat / Riwayat */
.ai-chat-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 10px 0;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.ai-chat-tab {
  border: none;
  background: transparent;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  color: #6b7280;
}

.ai-chat-tab-active {
  background-color: #1e3a8a;
  color: #ffffff;
}

.ai-chat-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0; /* penting supaya child bisa menyusut & scroll */
}

.ai-chat-new-session-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;          /* tengah vertikal */
  justify-content: center;      /* tengah horizontal */
  padding: 16px;
  box-sizing: border-box;
  z-index: 10;
}

.ai-chat-new-session-backdrop.hidden {
  display: none;
}

.ai-chat-new-session-dialog {
  width: 100%;
  max-width: 360px;
  background-color: #ffffff;
  border-radius: 16px;
  padding: 16px 16px 14px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.45);
}

.ai-chat-new-session-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.ai-chat-new-session-text {
  font-size: 12px;
  color: #4b5563;
  margin-bottom: 12px;
}

.ai-chat-new-session-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ai-chat-new-session-cancel {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 6px 12px;
  font-size: 12px;
  background-color: #ffffff;
  color: #374151;
  cursor: pointer;
}

.ai-chat-new-session-confirm {
  border-radius: 999px;
  border: none;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  background-color: #1e3a8a;
  color: #ffffff;
  cursor: pointer;
}
@media (min-width: 640px) {
  .ai-chat-new-session-dialog {
    max-width: 380px;
  }
}

/* Area pesan utama */
.ai-chat-messages {
  padding: 10px 12px;
  background-color: #f9fafb;
  flex: 1;
  min-height: 0;          /* penting untuk scroll di dalam */
  overflow-y: auto;
  font-size: 13px;
  display: flex;          /* untuk mengatur bubble kiri/kanan */
  flex-direction: column;
  gap: 6px;               /* jarak antar bubble */
}

/* Area riwayat */
.ai-chat-history {
  padding: 10px 12px;
  background-color: #f9fafb;
  flex: 1;
  min-height: 0;          /* sama: izinkan scroll */
  overflow-y: auto;
  font-size: 12px;
}

.ai-chat-messages,
.ai-chat-history {
  scrollbar-gutter: stable;  /* jaga lebar tetap, hilangkan flick saat scrollbar muncul */
}

.ai-chat-messages.hidden {
  display: none;
}

.ai-chat-history.hidden {
  display: none;
}

.ai-history-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 12px;    /* samakan dengan .ai-chat-bubble */
  line-height: 1.4;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  margin-bottom: 8px;
  cursor: pointer;
  display: block;         /* SATU baris penuh, tidak nempel kiri-kanan */
}
.ai-history-item:hover {
  background-color: #eff6ff;
  border-color: #bfdbfe;
}

.ai-history-question {
  font-size: 12px;
  color: #111827;
  margin-bottom: 4px;
}

.ai-history-meta {
  font-size: 11px;
  color: #6b7280;
}

/* Bubble chat */
.ai-chat-bubble {
  padding: 8px 10px;
  border-radius: 12px;
  max-width: 90%;
  line-height: 1.4;
  white-space: pre-line;
  display: inline-block;   /* lebar mengikuti isi, bukan penuh */
}

.ai-chat-bubble-user {
  align-self: flex-end;    /* geser ke kanan */
  background-color: #1e3a8a;
  color: #ffffff;
}

.ai-chat-bubble-ai {
  align-self: flex-start;  /* geser ke kiri */
  background-color: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
}

.ai-chat-bubble-ai a.ai-chat-link {
  color: #1e3a8a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.ai-chat-bubble-ai a.ai-chat-link:hover {
  color: #162c77;
}

.ai-chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-chat-typing span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background-color: #9ca3af;
  animation: ai-chat-typing-bounce 1s infinite ease-in-out;
}

.ai-chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.ai-chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes ai-chat-typing-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.ai-chat-quick {
  padding: 8px 12px 10px;
  border-top: none;              /* hilangkan garis pemisah */
  background-color: #f9fafb;     /* samakan dengan background area chat */
}

.ai-chat-quick.hidden {
  display: none;
}

.ai-chat-quick-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;                      /* jarak antar quick prompt */
  margin-bottom: 8px;
}

.ai-chat-quick-item {
  width: 100%;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;     /* kotak putih seperti bubble */
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  border-radius: 12px;           /* sama dengan .ai-chat-bubble */
  font-size: 13px;
  color: #111827;
}

.ai-chat-quick-item:hover {
  background-color: #eff6ff;
}

.ai-chat-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-chat-quick-chip {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  padding: 4px 10px;
  font-size: 11px;
  color: #374151;
  cursor: pointer;
}

.ai-chat-quick-chip-active {
  background-color: #eff6ff;
  border-color: #1e3a8a;
  color: #1e3a8a;
}

/* Form input */
.ai-chat-form {
  display: flex;
  gap: 6px;
  padding: 8px 10px 10px;
  border-top: 1px solid #e5e7eb;
  background-color: #ffffff;
}

.ai-chat-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
  font-size: 13px;
}

.ai-chat-input:focus {
  outline: none;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 1px rgba(30, 58, 138, 0.2);
}

.ai-chat-submit {
  border-radius: 999px;
  border: none;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  background-color: #1e3a8a;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
}
.ai-chat-submit:disabled {
  opacity: 0.7;
  cursor: default;
}

.ai-chat-error {
  padding: 6px 10px 10px;
  font-size: 11px;
  color: #b91c1c;
  background-color: #fef2f2;
  border-top: 1px solid #fecaca;
}

.ai-chat-error.hidden {
  display: none;
}

@media (max-width: 640px) {
  .ai-chat-float {
    right: 22px;
    bottom: 22px;
  }

  .ai-chat-panel {
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    height: auto;      /* override tinggi tetap */
    max-width: none;
    max-height: none;  /* full height di mobile */
    border-radius: 0;
  }

  /* override juga untuk state panel-open di mobile */
  .ai-chat-float.ai-panel-open .ai-chat-panel {
    bottom: 0;
    max-height: none;
  }
}

.ai-chat-disclaimer {
  padding: 4px 10px 10px;
  font-size: 11px;
  color: #6b7280;
  background-color: #ffffff;
  text-align: center;
}
[data-astro-cid-sckkx6r4],[data-astro-cid-sckkx6r4]::before,[data-astro-cid-sckkx6r4]::after{box-sizing:border-box;outline:none!important}body,html{margin:0;padding:0}body.admin-dashboard header[data-astro-cid-sckkx6r4]{display:none!important}