/* ==========================================================================
   DAUR.NUKTALIX — DESAIN SISTEM LUXURY STUDIO (STUDIO NUKTALIX SPEC)
   Domain: daur.nuktalix.com
   Font: Geist, Inter & JetBrains Mono (Nuktalix Obsidian Design Language)
   Warna Khas: Obsidian Black, Pure White, Electric Blue (#2F7DFF), Emerald (#3FD49A)
   ========================================================================== */

:root, html[data-theme="dark"] {
  --void: #000000;
  --bg: #000000;
  --s1: #0A0A0C;
  --s2: #121216;
  --s3: #18181F;
  --s-hover: #202029;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --line-3: rgba(255, 255, 255, 0.28);
  --text: #FFFFFF;
  --text-2: #C8CCD2;
  --muted: #8A9099;
  --accent: #2F7DFF;
  --accent-hi: #6AA6FF;
  --accent-soft: rgba(47, 125, 255, 0.12);
  --accent-line: rgba(106, 166, 255, 0.35);
  --accent-glow: 0 0 24px rgba(47, 125, 255, 0.22);
  --ok: #3FD49A;
  --ok-soft: rgba(63, 212, 154, 0.12);
  --ok-line: rgba(63, 212, 154, 0.35);
  --warn: #F0B659;
  --warn-soft: rgba(240, 182, 89, 0.12);
  --danger: #F06C7E;
  --danger-soft: rgba(240, 108, 126, 0.12);
  --bubble-in: rgba(255, 255, 255, 0.05);
  --bubble-out: linear-gradient(135deg, rgba(47, 125, 255, 0.22) 0%, rgba(47, 125, 255, 0.08) 100%);
  --bubble-admin: linear-gradient(135deg, rgba(240, 182, 89, 0.2) 0%, rgba(240, 182, 89, 0.07) 100%);
  --font: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

html[data-theme="light"] {
  --void: #FFFFFF;
  --bg: #F8FAFC;
  --s1: #FFFFFF;
  --s2: #F1F5F9;
  --s3: #E2E8F0;
  --s-hover: #E6EDF5;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.15);
  --line-3: rgba(0, 0, 0, 0.25);
  --text: #09090B;
  --text-2: #3F3F46;
  --muted: #71717A;
  --accent: #1F63EA;
  --accent-hi: #1A56D6;
  --accent-soft: rgba(31, 99, 234, 0.10);
  --accent-line: rgba(31, 99, 234, 0.35);
  --accent-glow: 0 0 20px rgba(31, 99, 234, 0.15);
  --ok: #0F9D6B;
  --ok-soft: rgba(15, 157, 107, 0.10);
  --ok-line: rgba(15, 157, 107, 0.35);
  --warn: #D97706;
  --warn-soft: rgba(217, 119, 6, 0.10);
  --danger: #DC2626;
  --danger-soft: rgba(220, 38, 38, 0.10);
  --bubble-in: #EDF2F7;
  --bubble-out: linear-gradient(135deg, rgba(31, 99, 234, 0.15) 0%, rgba(31, 99, 234, 0.06) 100%);
  --bubble-admin: linear-gradient(135deg, rgba(217, 119, 6, 0.15) 0%, rgba(217, 119, 6, 0.06) 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
  display: flex;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ---------------- TOMBOL TEMA RESMI (MATAHARI & BULAN SABIT) ---------------- */
.theme {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  color: var(--text);
  background: var(--s2);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.theme:hover {
  background: var(--s-hover);
  border-color: var(--line-3);
  transform: translateY(-1px);
}

.theme svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.theme .ic-sun { display: none; }
.theme .ic-moon { display: block; }
html[data-theme="light"] .theme .ic-sun { display: block; }
html[data-theme="light"] .theme .ic-moon { display: none; }
html[data-theme="dark"] .theme .ic-sun { display: none; }
html[data-theme="dark"] .theme .ic-moon { display: block; }

/* ---------------- TABEL & FORM PRODUK / HARGA BOT STUDIO ---------------- */
.prod-grid-input {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr auto;
  gap: 8px;
  align-items: center;
}

@media (max-width: 680px) {
  .prod-grid-input { grid-template-columns: 1fr; }
}

.prod-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 10px;
}

.prod-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
}

.prod-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
}

.prod-table tr:hover td {
  background: var(--s2);
  color: var(--text);
}

.prod-price-badge {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ok);
  background: var(--ok-soft);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--ok-line);
  font-size: 12px;
}

/* ---------------- TATA LETAK UTAMA (APP CONTAINER) ---------------- */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* SIDEBAR KIRI MEWAH */
.app-sidebar {
  width: 240px;
  background: var(--s1);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 25;
  box-shadow: 1px 0 20px rgba(0, 0, 0, 0.12);
}

.sidebar-header {
  height: 60px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.brand-env {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent-hi);
  border: 1px solid var(--accent-line);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.08em;
  padding: 8px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: all 0.18s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.nav-item:hover {
  background: var(--s2);
  color: var(--text);
  border-color: var(--line);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--text);
  border-color: var(--accent-line);
  font-weight: 600;
  box-shadow: var(--accent-glow);
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--s2);
  color: var(--text-2);
  font-weight: 600;
  border: 1px solid var(--line);
}

.nav-badge.gold {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: rgba(240, 182, 89, 0.3);
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

/* ---------------- KONTEN UTAMA & TOPBAR ---------------- */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
  background: var(--bg);
}

.main-topbar {
  height: 60px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 12, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  gap: 16px;
  flex-shrink: 0;
  z-index: 20;
}

html[data-theme="light"] .main-topbar {
  background: rgba(255, 255, 255, 0.85);
}

.topbar-title {
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok-line);
  letter-spacing: 0.01em;
  white-space: nowrap !important;
  flex-shrink: 0;
  line-height: 1.2;
}

.status-badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: rgba(240, 182, 89, 0.35);
}

.status-badge.accent {
  background: var(--accent-soft);
  color: var(--accent-hi);
  border-color: var(--accent-line);
}

.status-badge.neutral {
  background: var(--s2);
  color: var(--muted);
  border-color: var(--line);
}

.badge-text-mobile {
  display: none;
}

.badge-text-full {
  display: inline;
}

.btn-mobile-back {
  display: none !important;
}

.mobile-bottom-bar {
  display: none;
}

.dot-live {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-dot 1.8s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.main-view {
  flex: 1;
  overflow-y: auto;
  position: relative;
  height: calc(100vh - 60px);
}

.view-section {
  display: none;
  height: 100%;
}

.view-section.active {
  display: block;
}

/* ---------------- TOMBOL & INPUT ELITE NUKTALIX ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border-radius: 99px;
  font-weight: 550;
  font-size: 13px;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
  white-space: nowrap;
}

.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 99px; }
.btn-primary { background: var(--text); color: var(--void); }
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-ghost { background: var(--s2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--s-hover); border-color: var(--line-2); color: #FFF; }
.btn-accent { background: var(--accent); color: #FFF; box-shadow: 0 4px 14px rgba(47, 125, 255, 0.35); }
.btn-accent:hover { background: var(--accent-hi); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(47, 125, 255, 0.45); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(240, 108, 126, 0.3); }
.btn-danger:hover { background: rgba(240, 108, 126, 0.2); }

.input, .select, .textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--s1);
  color: var(--text);
  outline: none;
  font-size: 13px;
  transition: all 0.2s ease;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--s2);
}

/* SAKELAR MODERN (IOS / VERCEL TOGGLE) */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--s3);
  border: 1px solid var(--line-2);
  transition: 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
  border-radius: 99px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #FFF;
  transition: 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

input:checked + .slider {
  background-color: var(--ok);
  border-color: var(--ok);
  box-shadow: 0 0 12px var(--ok-soft);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* ---------------- VIEW 1: INBOX CHAT MEWAH ---------------- */
.inbox-layout {
  display: grid;
  grid-template-columns: 290px 1fr 310px;
  height: 100%;
  overflow: hidden;
}

.inbox-list {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: var(--s1);
}

.inbox-search {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.chat-items {
  flex: 1;
  overflow-y: auto;
}

.chat-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.chat-item:hover { background: var(--s2); }
.chat-item.active {
  background: var(--s2);
  border-left: 3px solid var(--accent);
  box-shadow: inset 4px 0 12px var(--accent-soft);
}

.chat-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.chat-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.chat-time { font-size: 11px; color: var(--muted); }

.chat-snippet {
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-meta-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.tag-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok-line);
}

.tag-badge.paused {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: rgba(240, 182, 89, 0.35);
}

/* AREA PERCAKAPAN TENGAH (PREMIUM CONVERSATION CANVAS) */
.inbox-convo {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--void);
}

.convo-header {
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--s1);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}

.convo-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: radial-gradient(circle at 50% 0%, rgba(47, 125, 255, 0.03) 0%, transparent 60%);
}

.msg-row {
  display: flex;
  flex-direction: column;
  max-width: 74%;
}

.msg-row.in { align-self: flex-start; }
.msg-row.out { align-self: flex-end; }

.bubble {
  padding: 11px 16px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.msg-row.in .bubble {
  background: var(--bubble-in);
  color: var(--text);
  border: 1px solid var(--line);
  border-bottom-left-radius: 3px;
}

.msg-row.out .bubble {
  background: var(--bubble-out);
  color: #FFFFFF;
  border: 1px solid var(--accent-line);
  border-bottom-right-radius: 3px;
  box-shadow: 0 4px 16px rgba(47, 125, 255, 0.15);
}

.msg-row.admin .bubble {
  background: var(--bubble-admin);
  color: #FDE68A;
  border: 1px solid rgba(240, 182, 89, 0.35);
  border-bottom-right-radius: 3px;
}

.msg-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.msg-row.out .msg-info { align-self: flex-end; }

.convo-bar {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--s1);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* PANEL DETAIL KANAN (HANDOVER & KONTROL WA) */
.inbox-detail {
  border-left: 1px solid var(--line);
  background: var(--s1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

.luxury-card {
  padding: 16px;
  border-radius: 12px;
  background: var(--s2);
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.luxury-card.glow-accent {
  border-color: var(--accent-line);
  box-shadow: 0 0 20px rgba(47, 125, 255, 0.1);
}

/* ---------------- VIEW 2: BOT STUDIO (STUDIO NUKTALIX CODE / AI STUDIO STYLE) ---------------- */
.studio-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  height: 100%;
  overflow: hidden;
}

.studio-editor-pane {
  padding: 28px 32px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: var(--s1);
}

.studio-preview-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--void);
}

.playground-header {
  height: 56px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--s1);
}

.playground-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.playground-bar {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--s1);
  display: flex;
  gap: 12px;
}

/* ---------------- VIEW 3: LANGGANAN MEWAH (199K/BULAN & 1 BULAN GRATIS) ---------------- */
.sub-layout {
  padding: 40px 28px;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sub-hero {
  background: linear-gradient(135deg, rgba(47, 125, 255, 0.12) 0%, rgba(63, 212, 154, 0.08) 100%);
  border: 1px solid var(--accent-line);
  border-radius: 16px;
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sub-pricing-card {
  background: var(--s1);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.sub-pricing-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--ok) 100%);
}

.price-tag {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

.price-period {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.sub-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13.5px;
  margin-top: 18px;
}

.sub-feature-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.sub-feature-list li span.check {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok-line);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------------- MODAL ELEGAN (POPUP KONEKSI WA) ---------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--s1);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(10px) scale(0.98);
  transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* INPUT NOMOR HP DENGAN PREFIX +62 PATEN */
.phone-input-wrap {
  display: flex;
  align-items: center;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.phone-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.phone-prefix-paten {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border-right: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  user-select: none;
  flex-shrink: 0;
}

html[data-theme="light"] .phone-prefix-paten {
  background: rgba(0, 0, 0, 0.03);
}

.phone-input-field {
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  height: 44px !important;
  font-size: 15px !important;
  letter-spacing: 0.03em;
  font-weight: 600;
  color: var(--text) !important;
  width: 100%;
  padding: 0 14px !important;
}

.phone-input-field:focus {
  outline: none !important;
  box-shadow: none !important;
}

.phone-notice {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}

/* WADAH KODE QR ELEGAN */
.qr-canvas-box {
  background: #ffffff;
  padding: 14px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  margin: 8px 0;
}

.shake-anim {
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* ---------------- RESPONSIVE MEDIA QUERIES ---------------- */
@media (max-width: 1000px) and (min-width: 769px) {
  .app-sidebar { width: 64px; }
  .sidebar-header .brand-badge span:not(.brand-dot), .nav-item span:not(:first-child), .sidebar-footer, .menu-label { display: none; }
  .inbox-layout { grid-template-columns: 240px 1fr; }
  .inbox-detail { display: none; }
  .studio-layout { grid-template-columns: 1fr; }
  .sub-pricing-card { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .app-sidebar { display: none !important; }
  .app-container { display: block !important; }
  .app-main {
    width: 100% !important;
    min-width: 0 !important;
    padding-bottom: 64px !important;
  }
  .main-topbar {
    padding: 0 12px;
    height: 52px;
    gap: 6px;
  }
  .topbar-title {
    font-size: 14px;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .badge-text-full {
    display: none !important;
  }
  .badge-text-mobile {
    display: inline !important;
    font-size: 10.5px;
  }
  .btn-hide-mobile {
    display: none !important;
  }

  /* Mobile Bottom Navigation Bar */
  .mobile-bottom-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: rgba(10, 10, 12, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--line);
    z-index: 45;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
  }
  html[data-theme="light"] .mobile-bottom-bar {
    background: rgba(255, 255, 255, 0.96);
  }
  .mob-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 550;
    padding: 6px 0;
    cursor: pointer;
    position: relative;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-tab svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
  }
  .mob-tab.active {
    color: var(--accent-hi);
  }
  .mob-tab.active svg {
    stroke: var(--accent-hi);
  }
  .mob-badge {
    position: absolute;
    top: 3px;
    right: calc(50% - 18px);
    font-size: 9px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 99px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
  }
  .mob-badge.gold {
    background: var(--warn);
    color: #111;
  }

  /* INBOX ON MOBILE */
  .inbox-layout {
    display: block !important;
    height: calc(100vh - 110px) !important;
    position: relative !important;
  }
  .inbox-list {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    border-right: none !important;
  }
  .inbox-convo {
    display: none !important;
  }
  .inbox-convo.mobile-open {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 60 !important;
    background: var(--bg) !important;
    flex-direction: column !important;
  }
  .inbox-convo.mobile-open .btn-mobile-back {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    padding: 6px 9px;
    border-radius: 8px;
    background: var(--s2);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
  }
  .inbox-convo.mobile-open .convo-header {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .inbox-convo.mobile-open .convo-bar {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .inbox-detail {
    display: none !important;
  }

  /* BOT STUDIO ON MOBILE (FIXED SCROLL & FULLY EXPANDED CARDS) */
  #view-studio {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .studio-layout {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    padding: 16px 14px 110px 14px !important;
    gap: 20px !important;
  }
  .studio-editor-pane {
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    border-right: none !important;
    border-bottom: 1px solid var(--line) !important;
    padding-bottom: 24px !important;
    flex-shrink: 0 !important;
    gap: 18px !important;
  }
  .luxury-card {
    flex-shrink: 0 !important;
    overflow: visible !important;
    min-height: auto !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .prod-grid-input {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .studio-preview-pane {
    height: auto !important;
    min-height: 480px !important;
    overflow: visible !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    margin-bottom: 30px !important;
    flex-shrink: 0 !important;
    background: var(--surface) !important;
  }
  .playground-header {
    padding: 12px 14px !important;
  }
  .playground-body {
    min-height: 260px !important;
    max-height: 380px !important;
    overflow-y: auto !important;
    padding: 14px !important;
  }
  .playground-bar {
    position: relative !important;
    padding: 12px !important;
    background: var(--s1) !important;
  }

  /* SUBSCRIPTION ON MOBILE */
  #view-subscription {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .subscription-layout {
    height: auto !important;
    overflow: visible !important;
    padding: 16px 14px 110px 14px !important;
    gap: 18px !important;
  }
  .sub-hero {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
    padding: 16px !important;
  }
  .sub-pricing-card {
    grid-template-columns: 1fr !important;
    padding: 16px !important;
    gap: 20px !important;
  }

  /* MODAL ON MOBILE */
  .modal-tab-row {
    flex-direction: column !important;
    gap: 6px !important;
  }
  .modal-tab-btn {
    width: 100% !important;
    font-size: 11.5px !important;
    height: 36px !important;
  }
  .modal-grid-inputs {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .modal-overlay {
    padding: 10px !important;
    z-index: 200 !important;
  }
  .modal-card {
    max-height: 80vh !important;
    margin-bottom: 64px !important; /* Clear bottom nav bar */
  }
  .modal-body {
    padding: 16px !important;
    gap: 14px !important;
  }
}
