
.mobile-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #ffffff;
  flex-direction: column;
  animation: mpm-in 0.22s ease-out;
}
@keyframes mpm-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-bottom-bar { display: none !important; }
.mobile-side-panel-overlay { display: none !important; }
.mobile-side-panel { display: none !important; }

.mpm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.5rem;
  background: #ffffff;
  color: #0f1530;
  flex-shrink: 0;
}
.mpm-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #0f1530;
}
.mpm-title-num {
  background: #5076ff;
  color: #ffffff;
  padding: 3px 8px;
  font-family: 'Aiva', sans-serif;
  border-radius: 4px;
}
.mpm-close {
  width: 38px;
  height: 38px;
  border: none;
  background: #e3e3e3;
  color: #0f1530;
  display: grid;
  place-items: center;
  border-radius: 25px;
}
.mpm-close:hover { background: #61e3ff; }
.mpm-close svg { width: 18px; height: 18px; }
.mpm-body {
  flex: 1;
  overflow: auto;
  padding: 16px 12px 32px;
  background: #dfdfdf;
  display: flex;
  justify-content: center;
}
.mpm-body .preview-stack { gap: 16px; }
.mpm-foot {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.mpm-foot .btn {
  flex: 1;
  justify-content: center;
  padding: 12px;
  font-size: 12px;
}

/* ============================================================
   BREAKPOINT — Tablet & Mobile (≤ 960px)
   Header pindah ke BAWAH layar
   ============================================================ */
@media screen and (max-width: 960px) {
  body { padding-bottom: 76px; }

  .app {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .app-header {
    display: none !important;
  }

  .page-topbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    padding: 10px;
    gap: 10px;
  }
  .page-topbar-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2196F3;
  }
  .mobile-back-top {
    display: inline-flex !important;
    flex-direction: row !important;
    align-self: flex-start;
    align-items: center;
    justify-content: center;
    padding: 6px 14px 6px 10px;
    gap: 6px;
    background: #ffffff;
    color: #2b2b2b !important;
    border-radius: 20px;
    text-decoration: none !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    margin-bottom: 8px;
    margin-left: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
  }
  .mobile-back-top:hover, .mobile-back-top:active, .mobile-back-top:visited, .mobile-back-top span {
    color: #2b2b2b !important;
    text-decoration: none !important;
    border: none !important;
  }

  .mobile-bottom-bar {
      display: flex !important;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 56px;
      background: linear-gradient(120deg, #9d00ff, #1c75ff, #6197ff, #22b8ff);
      z-index: 1000;
      box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
  }

  .mobile-bottom-bar .panel-toggle-btn {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: linear-gradient(90deg, #ff00cc, #ff9701);
      border: none;
      color: #ffffff;
      font-size: 1.2rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s;
  }

  .mobile-bottom-bar .panel-toggle-btn:active {
      background: rgba(255, 255, 255, 0.15);
  }

  .mobile-menu-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 56px;
      background: #24a2fb;
      border: none;
      border-left: 1px solid rgba(255, 255, 255, 0.2);
      color: #fff;
      cursor: pointer;
      transition: background 0.2s;
  }

  .mobile-menu-btn:active {
      background: rgba(255, 255, 255, 0.25);
  }

  .mobile-side-panel-overlay {
      display: none !important;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgb(255 255 255 / 75%);
      z-index: 5999;
      opacity: 0;
      transition: opacity 0.3s ease;
      backdrop-filter: blur(4px);
  }

  .mobile-side-panel-overlay.open {
      display: block !important;
      opacity: 1;
  }
label.lbl {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #294b77ed;
    margin-bottom: 5px;
}
.input, .textarea, .select {
    width: 100%;
    padding: 10px 8px;
    background: #ffffff;
    border: 1px solid #ff0000a6;
    font-size: 13px;
    color: #0f1530;
    font-weight: 500;
    transition: border-color 0.15s, box-shadow 0.15s;
    border-radius: 6px;
}

  .mobile-side-panel {
      display: flex !important;
      position: fixed;
      top: 0;
      left: 0;
      width: 90%;
      max-width: 90%;
      height: auto;
      max-height: 100%;
      background: #ffffff;
      z-index: 6000;
      transform: translateX(-110%);
      transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
      box-shadow: 0 0 2px rgb(0 0 0 / 40%);
      flex-direction: column;
  }

  .mobile-side-panel.open {
      transform: translateX(0);
      border: 1px solid #5eb3f9;
  }

  .mobile-side-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      background: #5eb3f9;
      flex-shrink: 0;
      font-size: 1.2rem;
      color: #fff;
  }

  .panel-close-menu-btn {
      position: absolute;
      top: 50%;
      left: 100%;
      right: auto;
      transform: translateY(-50%);
      width: 20px;
      height: 80px;
      background: #5eb3f9;
      border: 0px solid #ffffff;
      border-left: none;
      border-radius: 0 8px 8px 0;
      color: #ffffff;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
      z-index: 10;
      font-size: 0.75rem;
      box-shadow: 4px 0 6px rgba(0, 0, 0, 0.1);
  }

  .mobile-side-content {
      flex: 1;
      overflow-y: auto;
  }

  .mobile-menu-group {
      border-bottom: 1px solid #eee;
  }

  .mobile-menu-group-title {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      padding: 15px 20px;
      font-size: 15px;
      font-weight: 400;
      color: #333;
      cursor: pointer;
      transition: background 0.2s;
      border-bottom: 1px solid #dbdada;
      gap: 12px;
  }

  .mobile-menu-group-title:active {
      background: #f5f5f5;
  }

  .mobile-submenu {
      display: none;
      background: #f9f9f9;
      padding: 0;
  }

  .mobile-submenu.open {
      display: block;
  }

  .mobile-submenu a {
        display: block;
        padding: 14px 16px 14px 30px;
        font-size: 1rem;
        color: #054087;
        text-decoration: none;
        transition: background 0.2s, color 0.2s;
        background: #b6d2ff;
        border-bottom: 1px solid #fff;
  }

  .mobile-submenu a:last-child {
      border-bottom: none;
  }

  .mobile-submenu a:active {
      background: #e8f4ff;
      color: #0072ff;
  }
  .brand-sub { display: none; }
  .brand { display: none; }
  .brand-name { font-size: 13px; letter-spacing: 0.03em; }
  .actions { flex-wrap: wrap; gap: 6px; flex: 1; justify-content: flex-end; }

  .mobile-only { display: inline-flex !important; }
  .desktop-only { display: none !important; }
  .btn-preview {
    background: #5076ff;
    color: #ffffff;
  }
  .section {
    border-bottom: 1px solid #000000;
    padding: 22px 14px;
}
  .btn-preview:not(:disabled):hover { background: #6786ff; color: #ffffff; }

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
    background: #57a8ff;
    color: #ffffff;
    border: none;
    font-weight: 500;
    border-radius: 25px;
}

  .form-panel {
    border-right: none;
    overflow-y: visible;
    max-height: none;
    order: 1;
    background: #b1d2ff;
  }

  .preview-panel { display: none; }
  .mobile-preview-modal { display: flex; }
}
