:root {
  --vh: 1vh;
  --gray-light: rgba(255,255,255,0.85);
  --gray-lighter: rgba(255, 255, 255);
  --gray-medium: rgba(0, 0, 0, 0.15);
  --bs-border-radius: 1.5rem!important;
  --bs-bg-opacity: 1;
  --bg:#f8fafc;
  --text:#0f172a;
  --muted:#475569;
  --card:#ffffff;
  --border:rgba(0,0,0,0.08);
  --linko: #4F46E5;
  --grad1:#8b5cf6;
  --grad2:#22d3ee;
}

.vh-100 {
  height: 100dvh !important;
}

#myDiv {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.nav-link {
    color: var(--linko);
}

.nav-link:hover {
    color: var(--bs-danger);
    opacity: 0.8; /* opsional biar ada efek */
}

.cropper-wrapper {
   width: 100%;
   height: 400px;
   min-height: 400px; /* 🔥 ini penting */
}

/* ========================= */
/* TYPOGRAPHY */
/* ========================= */
body{
  font-family: "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  transition:0.35s ease;
}

h1 { font-weight: 600; }
h2, h3, h4, h5, h6 { font-weight: 500; }

.card-title {
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: -0.3px;
}
.bg-body {
    background:var(--bg);
  color:var(--text);
}
/* BUTTON */
.btn-gradient{
  background: linear-gradient(90deg,var(--grad1),var(--grad2));
  border:none;
  color:#000;
  font-weight:600;
  border-radius:12px;
  transition:0.2s ease;
}

.btn-gradient:hover{
  transform:translateY(-2px);
  opacity:0.9;
}

.info {
  font-weight: 700;
  text-decoration: none;
}

.bg-light.linko {
  background-color: var(--gray-light) !important;
}

.bg-muted.linko {
  background-color: var(--gray-medium) !important;
}
.card {
  background-color: var(--gray-lighter)
}
a {
  color: rgba(var(--bs-gray-600-rgb), var(--bs-link-opacity, 1));
  text-decoration: none;
}

a:hover {
  cursor: pointer;
}

/* ========================= */
/* LIST & COLLECTION */
/* ========================= */
.collection-item {
  border: 1px solid #cccccc;
  margin: 5px;
  background: #eee;
  padding: 5px 0;
  font-size: 1.2em;
}

#sortable {
  margin: 0;
  padding: 0;
}

/* ========================= */
/* BOX & PROFILE */
/* ========================= */
.box {
  font-family: "Open Sans", sans-serif;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  margin-bottom: 0px;
  padding: 10px;
  z-index: 9999;
}

.box .profile-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.box .profile-name {
  font-size: 1.125rem;
  margin: 0;
}

.box .profile-position {
  color: var(--accent-color);
  margin: 0;
  font-size: 0.875rem;
}

/* ========================= */
/* SOCIAL PROOF */
/* ========================= */
.social-proof {
  font-family: "Open Sans", sans-serif;
  position: fixed;
  bottom: 5px;
  left: 10px;
  z-index: 9999;
  padding: 10px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.5s ease;
  pointer-events: none;
}

.social-proof.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.social-proof a {
  color: #fff;
}

/* ========================= */
/* TREE / MEMBER */
/* ========================= */
#downline1 {
  float: left;
  width: 100%;
  max-width: 600px;
  overflow: auto;
}

.geserkanan {
  margin: 0;
  padding: 0 0 0 15px;
  background: url("img/line.gif") repeat-y;
}

.listmember {
  background: url("img/line.gif") repeat-y;
}

/* ========================= */
/* MODAL */
/* ========================= */
#detilprofil {
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
}

#editorModal .modal-content {
   overflow: hidden;
}

#themember {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #ffffff;
  width: 100%;
  max-width: 500px;
  height: 80%;
  overflow-y: scroll;
  padding: 10px;
}

.close {
  position: fixed;
  top: 10px;
  right: 10px;
  padding: 5px;
  background-color: red;
  color: white;
}

/* ========================= */
/* FORM & INPUT */
/* ========================= */
.table {
  background: #ffffff;
}

.form-control:focus {
  box-shadow: none !important;
}

.password-wrapper {
  position: relative;
}

.password-wrapper input[type="password"] {
  padding-right: 30px;
}

.password-wrapper .toggle-password {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  cursor: pointer;
}

/* ========================= */
/* MEDIA */
/* ========================= */
.card-body img {
  max-width: 100%;
}

.carousel-img-container {
  width: 100%;
  padding-top: 100%;
  position: relative;
}

.carousel-img-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ========================= */
/* CHAT */
/* ========================= */
.chat-input {
  display: flex;
  align-items: center;
  border-radius: 25px;
  padding: 8px 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chat-input textarea {
  resize: none;
  overflow: hidden;
  min-height: 38px;
  border: none;
  outline: none;
  width: 100%;
}

.chat-input button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: none;
}

/* ========================= */
/* NAVIGATION */
/* ========================= */
.pagination .page-link {
  color: #212529;
}

.pagination .page-link:hover {
  color: #000;
}

.pagination .page-item.active .page-link {
  background-color: #343a40;
  border-color: #343a40;
  color: #fff;
}

.nav-pills .nav-link {
  color: #212529;
}

.nav-pills .nav-link.active {
  background-color: #343a40;
  color: #fff;
}

/* ========================= */
/* UTILITIES */
/* ========================= */
.transition { transition: all 0.2s ease-in-out; }

.bg-hover:hover {
  background-color: var(--gray-medium);
}

.bg-hover.active {
  background-color: #e0e0e0 !important;
  color: #000 !important;
  font-weight: bold;
}

/* ========================= */
/* ICON SYSTEM */
/* ========================= */
i {
  display: inline-flex;
  gap: 8px;
  vertical-align: middle; /* penting */
}

i::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: currentColor;

  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;

  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}
i.notifikasi::before { mask-image: url("/assets/icons/bell.svg"); }
i.bagikan::before { mask-image: url("/assets/icons/box-arrow-up.svg"); }
i.transaksi::before { mask-image: url("/assets/icons/wallet2.svg"); }
i.prospek::before { mask-image: url("/assets/icons/people.svg"); }
i.copy::before { mask-image: url("/assets/icons/copy.svg"); }
i.chat::before { mask-image: url("/assets/icons/chat-dots.svg"); }
i.check::before { mask-image: url("/assets/icons/check-circle.svg"); }
i.home::before { mask-image: url("/assets/icons/app-indicator.svg"); }
i.program::before { mask-image: url("/assets/icons/option.svg"); }
i.shortcut::before { mask-image: url("/assets/icons/three-dots.svg"); }
i.desain::before { mask-image: url("/assets/icons/images.svg"); }
i.lihat::before { mask-image: url("/assets/icons/eye.svg"); }
i.kunci::before { mask-image: url("/assets/icons/lock.svg"); }
i.tambah::before { mask-image: url("/assets/icons/plus-lg.svg"); }
i.simpan::before { mask-image: url("/assets/icons/save.svg"); }
i.edit::before { mask-image: url("/assets/icons/pencil-square.svg"); }
i.hapus::before { mask-image: url("/assets/icons/trash3.svg"); }
i.upgrade::before { mask-image: url("/assets/icons/lightning-charge.svg"); }
i.pengaturan::before { mask-image: url("/assets/icons/gear.svg"); }
i.whatsapp::before { mask-image: url("/assets/icons/whatsapp.svg"); }
i.sukses::before { mask-image: url("/assets/icons/check2-circle.svg"); }
i.gagal::before { mask-image: url("/assets/icons/exclamation-triangle.svg"); }
i.arsip::before { mask-image: url("/assets/icons/archive.svg"); }
i.drag::before { mask-image: url("/assets/icons/arrows-expand.svg"); }
i.kategori::before { mask-image: url("/assets/icons/inboxes.svg"); }
i.layout::before { mask-image: url("/assets/icons/layout-wtf.svg"); }
i.label::before { mask-image: url("/assets/icons/tags.svg"); }
i.matahari::before { mask-image: url("/assets/icons/sun.svg"); }
i.bulan::before { mask-image: url("/assets/icons/moon.svg"); }
i.kirim::before { mask-image: url("/assets/icons/send.svg"); }
i.sematkan::before { mask-image: url("/assets/icons/paperclip.svg"); }
i.pending::before { mask-image: url("/assets/icons/check.svg"); }
i.terkirim::before { mask-image: url("/assets/icons/check-all.svg"); }
i.tambah-p::before { mask-image: url("/assets/icons/person-add.svg"); }
i.scan::before { mask-image: url("/assets/icons/upc-scan.svg"); }
i.galeri::before { mask-image: url("/assets/icons/shop-window.svg"); }
i.promosi::before { mask-image: url("/assets/icons/tag.svg"); }
i.user::before { mask-image: url("/assets/icons/person-circle.svg"); }
i.link::before { mask-image: url("/assets/icons/link.svg"); }
i.cari::before { mask-image: url("/assets/icons/search.svg"); }
i.koleksi::before { mask-image: url("/assets/icons/collection.svg"); }
i.panah-kiri::before { mask-image: url("/assets/icons/chevron-compact-left.svg"); }
i.panah-kanan::before { mask-image: url("/assets/icons/chevron-compact-right.svg"); }
i.bookmark::before { mask-image: url("/assets/icons/bookmark.svg"); }
i.putar::before { mask-image: url("/assets/icons/play-circle.svg"); }
i.tanya::before { mask-image: url("/assets/icons/question-circle.svg"); }
i.pemenang::before { mask-image: url("/assets/icons/trophy.svg"); }
/* Base tombol */
.toggle-btn {
  position: relative;
  border: none !important;
  transition: transform 0.15s ease, color 0.2s ease;
}
/* Hilangkan semua efek default Bootstrap */
.toggle-btn:focus,
.toggle-btn:active,
.toggle-btn:focus-visible,
button.toggle-btn:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}
/* Jika pakai btn-check */
.btn-check:focus + .toggle-btn {
  outline: none !important;
  box-shadow: none !important;
}
/* Warna saat toggle terbuka */
.toggle-btn.show:not(.collapsed) {
  color: rgb(var(--bs-danger-rgb));
  opacity: 1;
}
/* Efek klik (zoom out) */
.toggle-btn:active {
  transform: scale(0.8);
}
/* Optional: tetap ada aksesibilitas keyboard */
.toggle-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
}
i.drag {
  cursor: pointer;
  width: 36px;
}
i.circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 56px;
  height: 56px;

  border-radius: 50%;

  transform: scale(1.8);
  transition: all 0.3s ease;
}

i.circle.scale {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 56px;
  height: 56px;

  border-radius: 50%;
  transform: scale(1.3);
}
i.circle:hover {
  transform: scale(1);
}

.back-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .back-icon::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask: url("/assets/icons/arrow-left.svg") no-repeat center;
    -webkit-mask-size: contain;
    mask: url("/assets/icons/arrow-left.svg") no-repeat center;
    mask-size: contain;
  }
}

/* ========================= */
/* CARD & PREVIEW */
/* ========================= */
.card.preview {
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: clamp(20px, 2.2vw, 20px)!important;
}

.preview .card-body {
   padding: 0;
   overflow: hidden;
   position: relative;
}

/* ini canvas */
.preview-scale {
   width: 375px;
   height: 667px;
   transform-origin: top left;
   opacity: 0;
   transition: opacity 0.2s ease;
}

.preview-scale.ready {
   opacity: 1;
}

/* iframe normal */
.preview-scale iframe {
   width: 100%;
   height: 100%;
   border: none;
}

iframe {
  width: 100%;
  height: 78vh;
  border: none;
}
/* frame HP */
.mobile-frame {
  width: 375px;        /* ukuran iPhone */
  height: 667px;       /* tinggi HP */
  border-radius: 30px;
  overflow: hidden;
  position: relative;
}

#modalBody iframe {
  width: 100%;
  height: 90vh;
  border: none;
}

/* isi iframe */
.mobile-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}
.mobile-frame::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 8px;
  background: #222;
  border-radius: 10px;
  z-index: 10;
}

.mobile-frame.small { width: 100%; height: 667px; }

.drop-zone {
  padding-top: 10px;
}
.drop-zone.active {
  min-height: 70px;
  outline: 2px dashed #0d6efd;
  background: rgba(13,110,253,0.05);
}

.preview-menu {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.preview-menu::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  background-color: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-image: url("/assets/icons/three-dots-vertical.svg");
}
/* ========================= */
/* BOTTOM NAV */
/* ========================= */
.bottom-wrapper {
  position: fixed;
  bottom: 1rem;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 10;
  transition: transform 0.3s ease;
}
.bottom-wrapper.hide {
  transform: translateY(150%);
}
.bottom-card {
  flex: 1;
  height: 70px;
  border-radius: 20px;
  padding: 10px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
}
.bottom-card-left {
  flex: 0;
  height: 40px;
  border-radius: 20px;
  padding: 10px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--linko);
  display: flex;
  align-items: center;
  color:var(--bs-white);
}
.bottom-nav {
  height: 60px;
}
/* ========================= */
/* MENU */
/* ========================= */
.menu-item {
  text-decoration: none;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 45px;
  width:70px;
  border: var(--bs-card-border-width) solid var(--bs-card-border-color);
  border-radius: clamp(14px, 2.2vw, 20px) !important;
  transition: all 0.2s ease;
}

.menu-item i {
  display: inline-flex;
  align-items: center;
  margin-bottom: 5px;
}

.menu-item i::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  background-color: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  gap: 8px;
}

.menu-item:hover {
  color: var(--linko);
  transform: translateY(5px); /* geser dikit */
}

.menu-item.active {
  opacity: 1;
  color: var(--linko);
  font-weight: 500;
}

.menu-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.menu-label {
  font-size: 0.75rem;
}

/* ========================= */
/* PROGRESS */
/* ========================= */
.progress-circle {
  height: 50px;
  min-width: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  text-align: center;
  color: #555;
}

.progress-circle span {
  background: var(--gray-white);
  opacity: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.progress-floating {
  position: fixed;
  bottom: 100px;
  z-index: 1050;
}

.menu-floating {
  position: fixed;
  bottom: 70px;
  display: flex;
  align-items: center;
  flex-direction: row-reverse; /* 👉 bikin tombol jadi paling kanan */
  z-index: 1050;
}

/* menu wrapper */
.fab-menu {
  position: absolute;

  /* 🔥 INI KUNCI CENTER VERTIKAL */
  top: 50%;
  transform: translateY(-50%);

  right: 70px; /* jarak dari tombol */
  display: flex;
  gap: 10px;
}

/* item */
.fab-item {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transform: translateX(20px);
  transition: 0.25s ease;
}

/* open */
.menu-floating.open .fab-item {
  opacity: 1;
  transform: translateX(0);
}

.sticky-progress {
  position: sticky;
  top: 56px;
  z-index: 10;
  padding-top: 10px;
}
.sortable-ghost {
        opacity: 0.5;
        border: 2px dashed #aaa;
    }
    
@media (min-width: 768px) {
  .border-md-end {
    border-right: 1px solid #dee2e6 !important;
  }

  .border-md-bottom {
    border-bottom: 1px solid #dee2e6 !important;
  }
}