:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --bg: #f5f7fb;
  --card: #fff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
button,
input,
textarea {
  font: inherit;
}
.hidden {
  display: none !important;
}
.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 74px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #eef2ff;
  font-size: 22px;
}
.brand strong,
.brand small {
  display: block;
}
.brand small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.online-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
  margin-right: 6px;
}
.chat-layout {
  width: min(1180px, calc(100% - 32px));
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 64px;
  align-items: center;
  padding: 50px 0;
}
.intro-panel h1 {
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.05;
  margin: 16px 0 20px;
  letter-spacing: -2px;
}
.intro-panel p {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}
.eyebrow {
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.5px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}
.feature-grid div {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px;
  font-weight: 650;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}
.chat-card {
  height: 650px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.start-view {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px;
}
.agent-avatar {
  width: 70px;
  height: 70px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  font-weight: 900;
  margin: 0 auto 20px;
  box-shadow: 0 12px 25px rgba(79, 70, 229, 0.3);
}
.agent-avatar.small {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  margin: 0;
}
.start-view h2,
.start-view > p {
  text-align: center;
}
.start-view h2 {
  margin: 0 0 8px;
}
.start-view > p {
  color: var(--muted);
  margin: 0 0 26px;
}
.start-view label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin: 14px 0;
}
.start-view label span {
  font-weight: 400;
  color: var(--muted);
}
input,
textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  background: #fff;
  color: var(--text);
}
input {
  margin-top: 7px;
}
input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.primary-btn,
.secondary-btn {
  border: 0;
  text-decoration: none;
  text-align: center;
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 800;
  cursor: pointer;
  display: block;
}
.primary-btn {
  background: var(--primary);
  color: white;
  width: 100%;
  margin-top: 18px;
}
.primary-btn:hover {
  background: var(--primary-dark);
}
.secondary-btn {
  color: var(--primary);
  background: #eef2ff;
  margin-top: 10px;
}
.form-error {
  color: var(--danger) !important;
  font-size: 13px !important;
  min-height: 18px;
  margin: 9px 0 0 !important;
}
.chat-view {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.chat-header {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.chat-header > div:nth-child(2) {
  flex: 1;
}
.chat-header strong,
.chat-header small {
  display: block;
}
.chat-header small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.icon-btn {
  border: 0;
  background: #f3f4f6;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
}
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: linear-gradient(#fbfcff, #f6f7fb);
  scroll-behavior: smooth;
}
.msg-row {
  display: flex;
  margin: 8px 0;
}
.msg-row.visitor {
  justify-content: flex-end;
}
.bubble {
  max-width: 82%;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.operator .bubble,
.system .bubble {
  background: #fff;
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
}
.visitor .bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 5px;
}
.system .bubble {
  color: var(--muted);
  font-style: italic;
}
.bubble time {
  display: block;
  font-size: 10px;
  opacity: 0.7;
  margin-top: 5px;
}
.message-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.message-form textarea {
  resize: none;
  max-height: 120px;
  min-height: 46px;
}
.message-form button {
  flex: 0 0 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  font-size: 21px;
  cursor: pointer;
}
.typing-hint {
  padding: 0 18px 8px;
  color: var(--muted);
  font-size: 12px;
}
.setup-page,
.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
}
.setup-card,
.login-card {
  width: min(440px, 100%);
  background: white;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.operator-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 340px 1fr;
}
.conversation-list {
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.operator-brand {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.operator-brand a {
  color: var(--danger);
  text-decoration: none;
  font-size: 13px;
}
.conversation-items {
  overflow-y: auto;
  flex: 1;
}
.conversation-item {
  display: block;
  padding: 15px 18px;
  border-bottom: 1px solid #f0f1f4;
  text-decoration: none;
  color: var(--text);
}
.conversation-item.active {
  background: #eef2ff;
}
.conversation-item strong {
  display: flex;
  justify-content: space-between;
}
.conversation-item span,
.conversation-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.badge {
  background: var(--primary);
  color: #fff !important;
  border-radius: 99px;
  padding: 2px 7px;
  margin: 0 !important;
}
.operator-chat {
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.empty-state {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  text-align: center;
  padding: 30px;
}
.operator-header {
  height: 74px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.operator-header small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.operator-actions button {
  border: 1px solid var(--border);
  background: #fff;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.operator-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.operator-message-form {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  background: white;
  border-top: 1px solid var(--border);
}
.operator-message-form input {
  margin: 0;
}
.operator-message-form button {
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  padding: 0 22px;
  font-weight: 800;
}
.mobile-list-btn {
  display: none;
}
.operator-login-error {
  color: var(--danger);
}
footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 900px) {
  .chat-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 0;
  }
  .intro-panel {
    text-align: center;
  }
  .intro-panel p {
    margin-left: auto;
    margin-right: auto;
  }
  .feature-grid {
    max-width: 600px;
    margin: 25px auto 0;
  }
  .chat-card {
    height: min(680px, calc(100vh - 110px));
    min-height: 580px;
  }
  .operator-shell {
    grid-template-columns: 1fr;
  }
  .conversation-list {
    position: fixed;
    left: 0;
    top: 0;
    width: min(340px, 88vw);
    z-index: 20;
    transform: translateX(-101%);
    transition: 0.25s;
    box-shadow: var(--shadow);
  }
  .conversation-list.open {
    transform: none;
  }
  .mobile-list-btn {
    display: inline-block;
  }
  .operator-chat {
    height: 100vh;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: 64px;
    padding: 0 14px;
  }
  .chat-layout {
    width: 100%;
    padding: 0;
  }
  .intro-panel {
    display: none;
  }
  .chat-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: calc(100vh - 64px);
    min-height: 0;
  }
  .start-view {
    padding: 24px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .messages {
    padding: 15px;
  }
  .bubble {
    max-width: 88%;
  }
  .operator-header {
    padding: 12px;
  }
  .operator-messages {
    padding: 14px;
  }
  .operator-message-form {
    padding: 10px;
  }
  .operator-message-form button {
    padding: 0 15px;
  }
}
@supports (padding: max(0px)) {
  .message-form {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
}
/* LiveChat Bosku v4 */
.demo-site {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 80% 15%,
      rgba(79, 70, 229, 0.16),
      transparent 30%
    ),
    linear-gradient(145deg, #f8fafc, #eef2ff);
  padding: 0 7vw;
}
.demo-site header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
.demo-site header strong {
  font-size: 22px;
}
.demo-site header a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 800;
}
.demo-site main {
  max-width: 900px;
  padding: 12vh 0;
}
.demo-site h1 {
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -3px;
  margin: 18px 0;
}
.demo-site p {
  font-size: 20px;
  color: #64748b;
  line-height: 1.7;
  max-width: 760px;
}
.demo-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.demo-features div {
  padding: 13px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 22px;
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  box-shadow: 0 18px 45px rgba(79, 70, 229, 0.35);
  z-index: 1000;
  cursor: pointer;
}
.chat-launcher.left {
  left: 24px;
  right: auto;
}
.chat-launcher i {
  position: absolute;
  right: -3px;
  top: -5px;
  background: #ef4444;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-style: normal;
  font-size: 12px;
  display: grid;
  place-items: center;
}
.floating-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(390px, calc(100vw - 28px));
  height: min(650px, calc(100vh - 40px));
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  z-index: 1001;
  display: flex;
  flex-direction: column;
}
.floating-widget.left {
  left: 24px;
  right: auto;
}
.widget-head {
  min-height: 82px;
  background: linear-gradient(
    135deg,
    var(--primary),
    color-mix(in srgb, var(--primary) 65%, #7c3aed)
  );
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.widget-head > div:nth-child(2) {
  flex: 1;
}
.widget-head strong,
.widget-head small {
  display: block;
}
.widget-head small {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 4px;
}
.widget-head button {
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.start-view.compact {
  padding: 24px;
  justify-content: flex-start;
  overflow: auto;
}
.start-view.compact h2,
.start-view.compact > p {
  text-align: left;
}
.start-view select,
.stack-form select,
.info-block select,
.integration-card select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.end-chat-link {
  border: 0;
  background: #fff;
  color: #94a3b8;
  padding: 8px;
  font-size: 12px;
}
.proactive-toast {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  background: #0f172a;
  color: #fff;
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  font-size: 14px;
}
.pro-dashboard {
  background: #f3f6fb;
  overflow: hidden;
}
.admin-topbar {
  height: 68px;
  background: #111827;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 22px;
}
.admin-logo {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  display: flex;
  gap: 8px;
}
.admin-search {
  flex: 1;
  max-width: 560px;
  background: #1f2937;
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-search input {
  margin: 0;
  padding: 5px;
  border: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
}
.agent-presence {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.agent-presence strong,
.agent-presence small {
  display: block;
}
.agent-presence small {
  color: #94a3b8;
  font-size: 11px;
}
.agent-presence a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 12px;
}
.presence-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}
.page-title {
  font-weight: 800;
  color: #cbd5e1;
}
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: calc(100vh - 68px);
}
.admin-sidebar {
  background: #fff;
  border-right: 1px solid #e2e8f0;
  padding: 16px 10px;
  overflow: auto;
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #475569;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 10px;
  font-weight: 650;
  font-size: 14px;
  margin: 2px 0;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: #eef2ff;
  color: var(--primary);
}
.admin-sidebar a b {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  padding: 2px 7px;
  font-size: 11px;
}
.admin-sidebar span {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  letter-spacing: 1.2px;
  margin: 20px 12px 7px;
}
.inbox-grid {
  display: grid;
  grid-template-columns: 340px minmax(420px, 1fr) 300px;
  min-width: 0;
}
.conversation-panel,
.customer-panel,
.chat-workspace {
  min-width: 0;
  height: calc(100vh - 68px);
}
.conversation-panel {
  background: #fff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}
.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 14px;
  border-bottom: 1px solid #e2e8f0;
}
.mini-stats div {
  text-align: center;
}
.mini-stats b,
.mini-stats span {
  display: block;
}
.mini-stats b {
  font-size: 20px;
}
.mini-stats span {
  font-size: 10px;
  color: #94a3b8;
}
.list-tabs {
  display: flex;
  gap: 4px;
  padding: 9px;
  border-bottom: 1px solid #e2e8f0;
  overflow: auto;
}
.list-tabs a {
  padding: 7px 9px;
  border-radius: 8px;
  text-decoration: none;
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}
.list-tabs a.active {
  background: #eef2ff;
  color: var(--primary);
  font-weight: 800;
}
.conversation-items {
  overflow: auto;
  flex: 1;
}
.conversation-item {
  display: flex;
  gap: 10px;
  padding: 13px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: #0f172a;
}
.conversation-item.active {
  background: #eef2ff;
}
.conversation-item > div:last-child {
  min-width: 0;
  flex: 1;
}
.conversation-item strong,
.conversation-item span,
.conversation-item small {
  display: block;
}
.conversation-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #64748b;
  font-size: 12px;
  margin: 4px 0;
}
.conversation-item small {
  font-size: 10px;
  color: #94a3b8;
}
.avatar-circle,
.big-avatar {
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e0e7ff;
  color: var(--primary);
  font-weight: 900;
}
.avatar-circle {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}
.big-avatar {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  font-size: 25px;
  margin: auto;
}
.empty-list {
  padding: 28px;
  color: #94a3b8;
  text-align: center;
}
.chat-workspace {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}
.workspace-header {
  height: 72px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
}
.workspace-header strong,
.workspace-header small {
  display: block;
}
.workspace-header small {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}
.channel-pill {
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 7px;
  border-radius: 20px;
}
.workspace-actions {
  display: flex;
  gap: 7px;
}
.workspace-actions a,
.workspace-actions button,
.take-btn {
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #334155;
  padding: 8px 10px;
  border-radius: 9px;
  text-decoration: none;
  font-size: 12px;
}
.operator-messages {
  min-height: 0;
}
.operator-message-form {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "tools tools" "input send";
  gap: 8px;
}
.composer-tools {
  grid-area: tools;
  display: flex;
  gap: 6px;
}
.composer-tools button,
.composer-tools select {
  border: 1px solid #dbe3ef;
  background: #fff;
  border-radius: 8px;
  padding: 6px 9px;
}
.operator-message-form textarea {
  grid-area: input;
  resize: none;
  min-height: 48px;
}
.operator-message-form > button {
  grid-area: send;
  min-width: 76px;
}
.workspace-empty {
  margin: auto;
  text-align: center;
  color: #64748b;
}
.workspace-empty > div {
  font-size: 54px;
}
.customer-panel {
  background: #fff;
  border-left: 1px solid #e2e8f0;
  overflow: auto;
  padding: 18px;
}
.customer-card {
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
}
.customer-card h3 {
  margin: 10px 0 4px;
}
.customer-card p {
  font-size: 12px;
  color: #64748b;
}
.info-block {
  padding: 14px 0;
  border-bottom: 1px solid #e2e8f0;
}
.info-block h4 {
  margin: 0 0 12px;
}
.info-block dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  margin: 0;
  font-size: 12px;
}
.info-block dt {
  color: #94a3b8;
}
.info-block dd {
  margin: 0;
}
.wrap {
  overflow-wrap: anywhere;
}
.info-block form {
  display: grid;
  gap: 8px;
}
.info-block button,
.stack-form button,
.integration-card button,
.btn {
  border: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 13px;
  border-radius: 9px;
  font-weight: 800;
  text-decoration: none;
}
.tag-list {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.tag-list span {
  background: #f1f5f9;
  padding: 5px 8px;
  border-radius: 20px;
  font-size: 11px;
}
.ai-suggestion {
  margin: 0 16px 8px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 12px;
  padding: 10px 12px;
}
.ai-suggestion span {
  font-size: 11px;
  color: #7e22ce;
  font-weight: 800;
}
.ai-suggestion p {
  margin: 5px 0;
  font-size: 13px;
}
.ai-suggestion button {
  border: 0;
  background: #7e22ce;
  color: #fff;
  padding: 6px 9px;
  border-radius: 7px;
}
.admin-content {
  overflow: auto;
  padding: 24px;
}
.content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.content-head h1 {
  margin: 0 0 5px;
}
.content-head p {
  margin: 0;
  color: #64748b;
}
.admin-cards.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}
.panel h2 {
  margin-top: 0;
}
.stack-form {
  display: grid;
  gap: 12px;
}
.stack-form label {
  font-size: 13px;
  font-weight: 700;
}
.stack-form input,
.stack-form textarea {
  margin-top: 6px;
}
.notice {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.notice.success {
  background: #ecfdf5;
  color: #047857;
}
.notice.info {
  background: #eff6ff;
  color: #1d4ed8;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th,
td {
  text-align: left;
  padding: 11px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}
th {
  color: #64748b;
  background: #f8fafc;
}
td small {
  display: block;
  color: #94a3b8;
  margin-top: 3px;
}
.status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
}
.status.online {
  background: #dcfce7;
  color: #15803d;
}
.status.away {
  background: #fef3c7;
  color: #b45309;
}
.status.offline {
  background: #f1f5f9;
  color: #64748b;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metric-grid div {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 15px;
}
.metric-grid span,
.metric-grid b {
  display: block;
}
.metric-grid span {
  font-size: 11px;
  color: #64748b;
}
.metric-grid b {
  font-size: 22px;
  margin-top: 8px;
}
.bar-chart {
  height: 230px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 15px 0;
}
.bar-chart div {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.bar-chart i {
  display: block;
  width: min(30px, 80%);
  background: linear-gradient(var(--primary), #8b5cf6);
  border-radius: 7px 7px 0 0;
}
.bar-chart span {
  font-size: 10px;
  color: #64748b;
  margin-top: 6px;
}
.bar-chart b {
  font-size: 10px;
}
.integration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.integration-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  padding: 15px;
  display: grid;
  gap: 10px;
}
.integration-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #eef2ff;
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 900;
}
.integration-card h3 {
  margin: 0;
}
.integration-card label {
  font-size: 12px;
  font-weight: 700;
}
.integration-card input,
.integration-card select {
  margin-top: 5px;
}
.widget-preview {
  margin-top: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
}
.preview-head {
  background: var(--preview);
  color: #fff;
  padding: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.preview-head b {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px;
  border-radius: 9px;
}
.widget-preview p {
  padding: 12px;
  margin: 0;
}
.widget-preview button {
  margin: 0 12px 14px;
  border: 0;
  background: var(--preview);
  color: #fff;
  padding: 9px 12px;
  border-radius: 8px;
}
.feature-check {
  padding-left: 0;
  list-style: none;
  line-height: 2;
}
.panel pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px;
  border-radius: 10px;
}
.url-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-nav-toggle {
  display: none;
}
.login-help {
  display: block;
  text-align: center;
  color: #64748b;
  margin: 12px 0;
}
@media (max-width: 1250px) {
  .inbox-grid {
    grid-template-columns: 320px 1fr;
  }
  .customer-panel {
    display: none;
  }
  .metric-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .integration-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: fixed;
    z-index: 50;
    top: 68px;
    bottom: 0;
    left: 0;
    width: 240px;
    transform: translateX(-101%);
    transition: 0.2s;
  }
  .nav-open .admin-sidebar {
    transform: none;
  }
  .mobile-nav-toggle {
    display: block;
    border: 0;
    background: #1f2937;
    color: #fff;
    padding: 8px;
    border-radius: 8px;
  }
  .admin-search {
    display: none;
  }
  .inbox-grid {
    grid-template-columns: 1fr;
  }
  .conversation-panel {
    position: fixed;
    z-index: 30;
    left: 0;
    top: 68px;
    bottom: 0;
    width: min(340px, 90vw);
    transform: translateX(-101%);
    transition: 0.2s;
  }
  .list-open .conversation-panel {
    transform: none;
  }
  .admin-cards.two {
    grid-template-columns: 1fr;
  }
  .integration-grid {
    grid-template-columns: 1fr;
  }
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .agent-presence small {
    display: none;
  }
}
@media (max-width: 600px) {
  .floating-widget,
  .floating-widget.left {
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }
  .chat-launcher {
    right: 16px;
    bottom: 16px;
  }
  .demo-site {
    padding: 0 20px;
  }
  .demo-site h1 {
    letter-spacing: -1.5px;
  }
  .admin-content {
    padding: 14px;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .content-head {
    align-items: flex-start;
    gap: 10px;
  }
  .admin-topbar {
    padding: 0 10px;
  }
  .page-title {
    display: none;
  }
}

/* Pembeda pesan pengunjung, operator, dan sistem */
.msg-row {
  align-items: flex-end;
  gap: 8px;
  margin: 12px 0;
}
.msg-row .message-stack {
  display: flex;
  flex-direction: column;
  max-width: min(78%, 680px);
}
.msg-row .sender-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.25px;
  color: #64748b;
  margin: 0 6px 4px;
}
.msg-row .message-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}
.msg-row.visitor-message {
  justify-content: flex-start;
}
.msg-row.visitor-message .message-avatar {
  order: 0;
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

/* V18: emoji picker dan foto profil operator */
.message-form,
.composer-tools {
  position: relative;
}
.emoji-trigger {
  position: relative;
  flex: 0 0 42px !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: #111827 !important;
  font-size: 21px !important;
  cursor: pointer;
}
.emoji-picker {
  position: absolute;
  z-index: 200;
  width: min(350px, calc(100vw - 28px));
  height: 330px;
  bottom: 70px;
  left: 10px;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 15px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}
.composer-tools .emoji-picker {
  bottom: 67px;
  left: 18px;
}
.emoji-tabs {
  display: flex;
  gap: 5px;
  padding: 9px;
  overflow-x: auto;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
}
.emoji-tabs button {
  white-space: nowrap;
  border: 0 !important;
  background: transparent !important;
  color: #64748b !important;
  border-radius: 8px !important;
  padding: 7px 9px !important;
  font-size: 11px !important;
}
.emoji-tabs button.active {
  background: #e0e7ff !important;
  color: #4338ca !important;
}
.emoji-grid {
  height: 278px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 9px;
}
.emoji-grid button {
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  padding: 4px !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 0 !important;
  font-size: 23px !important;
  border-radius: 8px !important;
  cursor: pointer;
}
.emoji-grid button:hover {
  background: #eef2ff !important;
}
.topbar-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  overflow: hidden;
  display: grid !important;
  place-items: center;
  background: #e0e7ff;
  color: #4338ca !important;
  text-decoration: none !important;
  font-weight: 900;
}
.topbar-avatar img,
.profile-preview img,
.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-editor {
  display: grid;
  grid-template-columns: 170px minmax(0, 480px);
  gap: 28px;
  align-items: start;
}
.profile-preview {
  width: 150px;
  height: 150px;
  border-radius: 32px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-size: 45px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.22);
}
.profile-editor form + form {
  margin-top: 12px;
}
.message-avatar {
  overflow: hidden;
}
.profile-divider {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 22px 0;
}
.subscription-menu-link {
  margin-top: 8px !important;
  background: #eef2ff;
  color: var(--primary) !important;
}
@media (max-width: 600px) {
  .emoji-picker {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 78px;
    width: auto;
  }
  .emoji-grid {
    grid-template-columns: repeat(7, 1fr);
  }
  .profile-editor {
    grid-template-columns: 1fr;
  }
  .profile-preview {
    margin: auto;
  }
}
.msg-row.visitor-message .message-stack {
  order: 1;
  align-items: flex-start;
}
.msg-row.visitor-message .bubble {
  background: #fff7ed;
  color: #7c2d12;
  border: 1px solid #fed7aa;
  border-radius: 16px 16px 16px 5px;
  box-shadow: 0 4px 12px rgba(124, 45, 18, 0.06);
}
.msg-row.visitor-message .sender-label {
  color: #c2410c;
}
.msg-row.operator-message {
  justify-content: flex-end;
}
.msg-row.operator-message .message-avatar {
  order: 2;
  background: #eef2ff;
  color: var(--primary);
  border-color: #c7d2fe;
}
.msg-row.operator-message .message-stack {
  order: 1;
  align-items: flex-end;
}
.msg-row.operator-message .bubble {
  background: linear-gradient(135deg, var(--primary), #4338ca);
  color: #fff;
  border: 0;
  border-radius: 16px 16px 5px 16px;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.18);
}
.msg-row.operator-message .sender-label {
  color: var(--primary);
}
.msg-row.system-message {
  justify-content: center;
  align-items: center;
}
.msg-row.system-message .message-avatar,
.msg-row.system-message .sender-label {
  display: none;
}
.msg-row.system-message .message-stack {
  align-items: center;
  max-width: 90%;
}
.msg-row.system-message .bubble {
  background: #f1f5f9;
  color: #64748b;
  border: 1px dashed #cbd5e1;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-style: italic;
  text-align: center;
}
.msg-row.system-message .bubble time {
  display: inline;
  margin-left: 6px;
}
.operator-messages .visitor-message .bubble {
  background: #fff7ed;
  color: #7c2d12;
  border-color: #fed7aa;
}
.operator-messages .operator-message .bubble {
  background: linear-gradient(135deg, var(--primary), #4338ca);
  color: #fff;
}
@media (max-width: 600px) {
  .msg-row .message-stack {
    max-width: 82%;
  }
  .msg-row .message-avatar {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    border-radius: 9px;
  }
  .msg-row .bubble {
    font-size: 13px;
  }
  .msg-row .sender-label {
    font-size: 9px;
  }
}
.notice.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.templates-layout {
  align-items: start;
}
.templates-layout .panel {
  margin-bottom: 0;
}
.stack-form small {
  display: block;
  color: #94a3b8;
  font-weight: 400;
  margin-top: 6px;
}
.form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn.secondary {
  background: #e2e8f0;
  color: #334155;
}
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-title-row h2 {
  margin: 0;
}
.panel-title-row input {
  max-width: 230px;
}
.template-list {
  display: grid;
  gap: 12px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 3px;
}
.template-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.template-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.template-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.template-card-head span {
  font-size: 11px;
  color: #64748b;
}
.template-card p {
  margin: 12px 0 0;
  color: #334155;
  line-height: 1.55;
  font-size: 13px;
  white-space: normal;
}
.template-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.template-actions form {
  margin: 0;
}
.template-actions a,
.template-actions button {
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #334155;
  padding: 6px 9px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 11px;
  cursor: pointer;
}
.template-actions .danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff7f7;
}
@media (max-width: 900px) {
  .templates-layout {
    grid-template-columns: 1fr;
  }
  .panel-title-row {
    align-items: stretch;
    flex-direction: column;
  }
  .panel-title-row input {
    max-width: none;
  }
  .template-card-head {
    flex-direction: column;
  }
  .template-actions {
    width: 100%;
  }
}

/* Histori, laporan tanggal, dan instalasi widget */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.filter-grid label {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
}
.filter-grid input,
.filter-grid select {
  margin-top: 6px;
}
.filter-grid .filter-search {
  grid-column: span 2;
}
.filter-grid .btn {
  height: 42px;
  display: grid;
  place-items: center;
}
.muted {
  color: #64748b;
  font-size: 12px;
}
.status.missed {
  background: #fee2e2;
  color: #b91c1c;
}
.table-link {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 8px;
  background: #eef2ff;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}
.empty-cell {
  text-align: center;
  color: #94a3b8;
  padding: 28px;
}
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 18px;
}
.pagination a {
  min-width: 34px;
  height: 34px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #334155;
}
.pagination a.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.history-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.history-transcript {
  max-height: 70vh;
  overflow: auto;
  padding: 8px;
}
.history-info {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  font-size: 13px;
}
.history-info dt {
  color: #94a3b8;
}
.history-info dd {
  margin: 0;
}
.report-metrics small {
  display: block;
  color: #94a3b8;
  margin-top: 5px;
}
.code-area {
  width: 100%;
  min-height: 180px;
  background: #0f172a;
  color: #e2e8f0;
  border: 0;
  border-radius: 12px;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  line-height: 1.55;
}
.install-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 15px;
}
.install-steps div {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px;
  border-radius: 12px;
}
.install-steps b {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
}
.report-filter {
  grid-template-columns: repeat(2, minmax(160px, 220px)) auto auto;
  justify-content: start;
}
@media (max-width: 900px) {
  .filter-grid,
  .report-filter {
    grid-template-columns: 1fr 1fr;
  }
  .filter-grid .filter-search {
    grid-column: span 2;
  }
  .history-detail-grid {
    grid-template-columns: 1fr;
  }
  .install-steps {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .filter-grid,
  .report-filter {
    grid-template-columns: 1fr;
  }
  .filter-grid .filter-search {
    grid-column: auto;
  }
  .install-steps {
    grid-template-columns: 1fr;
  }
  .history-info {
    grid-template-columns: 86px 1fr;
  }
}

/* Mode widget tertanam: hanya ikon tampil sebelum dibuka */
html:has(body.embed-mode),
body.embed-mode {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: transparent !important;
  overflow: hidden;
}
body.embed-mode .demo-site {
  display: none !important;
}
body.embed-mode .chat-launcher {
  right: 16px;
  bottom: 16px;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  box-shadow:
    0 14px 38px rgba(15, 23, 42, 0.28),
    0 0 0 6px rgba(255, 255, 255, 0.9);
}
body.embed-mode .chat-launcher.left {
  left: 16px;
  right: auto;
}
body.embed-mode .floating-widget {
  right: 16px;
  bottom: 16px;
  width: min(390px, calc(100vw - 24px));
  height: min(650px, calc(100vh - 24px));
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.3);
}
body.embed-mode .floating-widget.left {
  left: 16px;
  right: auto;
}
@media (max-width: 600px) {
  body.embed-mode .floating-widget,
  body.embed-mode .floating-widget.left {
    inset: 0;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
  body.embed-mode .chat-launcher {
    right: 16px;
    bottom: 16px;
  }
  body.embed-mode .chat-launcher.left {
    left: 16px;
    right: auto;
  }
}

/* Ikon LiveChat branding transparan */
.chat-launcher {
  padding: 0;
  background: transparent !important;
  border-radius: 24px;
  box-shadow: none !important;
  overflow: visible;
  display: grid;
  place-items: center;
}
.chat-launcher img {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(86, 0, 52, 0.38));
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
  pointer-events: none;
}
.chat-launcher:hover img {
  transform: translateY(-2px) scale(1.045);
  filter: drop-shadow(0 15px 28px rgba(142, 0, 83, 0.48));
}
.chat-launcher:active img {
  transform: scale(0.97);
}
body.embed-mode .chat-launcher {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  box-shadow: none !important;
}
body.embed-mode .chat-launcher img {
  width: 82px;
  height: 82px;
}
@media (max-width: 600px) {
  body.embed-mode .chat-launcher {
    width: 82px;
    height: 82px;
  }
  body.embed-mode .chat-launcher img {
    width: 76px;
    height: 76px;
  }
}

/* FIX FINAL: hilangkan kotak putih di sekitar ikon pada iframe */
html,
body.embed-mode {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
}
body.embed-mode {
  position: relative;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
body.embed-mode .chat-launcher,
body.embed-mode .chat-launcher.left {
  inset: auto 0 0 auto !important;
  width: 96px !important;
  height: 96px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  overflow: visible !important;
}
body.embed-mode .chat-launcher.left {
  inset: auto auto 0 0 !important;
}
body.embed-mode .chat-launcher img {
  display: block !important;
  width: 92px !important;
  height: 92px !important;
  margin: auto !important;
  object-fit: contain !important;
  background: transparent !important;
  border: 0 !important;
}
@media (max-width: 600px) {
  body.embed-mode .chat-launcher,
  body.embed-mode .chat-launcher.left {
    width: 88px !important;
    height: 88px !important;
  }
  body.embed-mode .chat-launcher img {
    width: 84px !important;
    height: 84px !important;
  }
}

/* RESTORE ICON AWAL: tombol ungu dengan gelembung chat putih, area luar transparan */
.chat-launcher,
body.embed-mode .chat-launcher,
body.embed-mode .chat-launcher.left {
  width: 64px !important;
  height: 64px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: linear-gradient(
    145deg,
    var(--primary),
    var(--primary-dark)
  ) !important;
  color: #fff !important;
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.34) !important;
  display: grid !important;
  place-items: center !important;
  overflow: visible !important;
  cursor: pointer !important;
}
.chat-launcher .launcher-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  line-height: 0;
  transition: transform 0.18s ease;
}
.chat-launcher .launcher-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chat-launcher:hover .launcher-icon {
  transform: translateY(-1px) scale(1.05);
}
.chat-launcher:active .launcher-icon {
  transform: scale(0.96);
}
body.embed-mode .chat-launcher,
body.embed-mode .chat-launcher.left {
  inset: auto 12px 12px auto !important;
  margin: 0 !important;
}
body.embed-mode .chat-launcher.left {
  inset: auto auto 12px 12px !important;
}
body.embed-mode .chat-launcher img {
  display: none !important;
}
html:has(body.embed-mode),
body.embed-mode {
  background: transparent !important;
  background-color: transparent !important;
}
@media (max-width: 600px) {
  body.embed-mode .chat-launcher,
  body.embed-mode .chat-launcher.left {
    width: 60px !important;
    height: 60px !important;
    border-radius: 20px !important;
  }
  .chat-launcher .launcher-icon {
    width: 35px;
    height: 35px;
  }
}

/* FINAL TRANSPARENT EMBED ROOT — area di luar tombol tidak memiliki warna */
html.embed-root,
html.embed-root body,
html.embed-root body.embed-mode {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: none !important;
  background-color: transparent !important;
}
html.embed-root body.embed-mode .chat-launcher,
html.embed-root body.embed-mode .chat-launcher.left {
  position: absolute !important;
  inset: 0 !important;
  width: 64px !important;
  height: 64px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 22px !important;
  background: linear-gradient(
    145deg,
    var(--primary),
    var(--primary-dark)
  ) !important;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.32) !important;
}
html.embed-root body.embed-mode .floating-widget {
  position: fixed !important;
}

/* EMBED LAUNCHER EXTERNAL FINAL
   Launcher ditampilkan oleh widget.js langsung pada website induk.
   Launcher di dalam iframe disembunyikan agar tidak ada bidang putih. */
html.embed-root,
html.embed-root body,
body.embed-mode {
  background: transparent !important;
  background-color: transparent !important;
}
body.embed-mode #chatLauncher {
  display: none !important;
}
body.embed-mode .floating-widget,
body.embed-mode .floating-widget.left {
  right: 12px !important;
  left: auto !important;
  bottom: 12px !important;
}
body.embed-mode .floating-widget.left {
  left: 12px !important;
  right: auto !important;
}
@media (max-width: 600px) {
  body.embed-mode .floating-widget,
  body.embed-mode .floating-widget.left {
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
  }
}

/* MINIMIZE BUTTON FIX FINAL */
#minimizeChat {
  position: relative !important;
  z-index: 20 !important;
  display: grid !important;
  place-items: center !important;
  flex: 0 0 38px !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  pointer-events: auto !important;
  font-size: 24px !important;
  line-height: 1 !important;
  font-family: Arial, sans-serif !important;
}
#minimizeChat:hover {
  background: rgba(255, 255, 255, 0.28) !important;
}
#minimizeChat:active {
  transform: scale(0.94);
}

/* ENTER SEND + FAST RESPONSIVE FINAL */
.enter-hint {
  display: block;
  padding: 0 14px 9px;
  background: #fff;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.2;
  text-align: left;
}
.operator-enter-hint {
  grid-column: 1/-1;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.2;
  padding: 0 2px;
}
.message-form textarea,
.operator-message-form textarea {
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: manipulation;
}
.message-form button,
.operator-message-form > button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.messages,
.conversation-items,
.customer-panel {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.floating-widget,
.chat-workspace,
.conversation-panel,
.customer-panel {
  contain: layout paint;
}
.msg-row {
  content-visibility: auto;
  contain-intrinsic-size: 58px;
}

@media (max-width: 900px) {
  .admin-layout {
    min-height: 100dvh;
  }
  .conversation-panel,
  .customer-panel,
  .chat-workspace {
    height: calc(100dvh - 68px);
  }
  .chat-workspace {
    min-width: 0;
  }
  .operator-message-form {
    padding: 10px 12px;
    gap: 7px;
  }
  .operator-message-form textarea {
    min-height: 46px;
    max-height: 150px;
    font-size: 16px;
  }
  .operator-message-form > button {
    min-width: 68px;
    min-height: 46px;
    padding: 0 14px;
  }
}
@media (max-width: 600px) {
  html,
  body {
    overflow-x: hidden;
  }
  .floating-widget,
  .floating-widget.left {
    height: 100dvh !important;
    width: 100vw !important;
    max-height: 100dvh !important;
  }
  .widget-head {
    padding: 10px 12px;
    min-height: 62px;
  }
  .start-view.compact {
    padding: 18px 16px;
  }
  .messages {
    padding: 12px 10px;
  }
  .message-form {
    padding: 10px;
    gap: 8px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .message-form textarea {
    min-height: 44px;
    max-height: 112px;
    padding: 11px 12px;
    font-size: 16px;
    border-radius: 12px;
  }
  .message-form button {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .enter-hint {
    display: none;
  }
  .bubble {
    max-width: 90%;
    font-size: 13px;
  }
  .admin-topbar {
    height: 60px;
    min-height: 60px;
  }
  .admin-sidebar {
    top: 60px;
  }
  .conversation-panel {
    top: 60px;
    height: calc(100dvh - 60px);
  }
  .chat-workspace {
    height: calc(100dvh - 60px);
  }
  .workspace-header {
    height: auto;
    min-height: 60px;
    padding: 9px 10px;
    gap: 8px;
  }
  .workspace-actions {
    gap: 5px;
  }
  .workspace-actions a,
  .workspace-actions button,
  .take-btn {
    padding: 7px 8px;
  }
  .operator-messages {
    padding: 10px;
  }
  .operator-message-form {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px 9px max(8px, env(safe-area-inset-bottom));
    position: sticky;
    bottom: 0;
    z-index: 5;
  }
  .composer-tools {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .composer-tools::-webkit-scrollbar {
    display: none;
  }
  .composer-tools select {
    max-width: 190px;
  }
  .operator-enter-hint {
    display: none;
  }
  .customer-panel {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Upload attachment + responsive final */
.attach-btn,
.operator-attach-btn {
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
}
.attach-btn {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  font-size: 20px;
}
.operator-attach-btn {
  width: 36px;
  height: 34px;
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  background: #fff;
  font-size: 17px;
}
.upload-status {
  padding: 6px 12px;
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  border-top: 1px solid #eef2f7;
}
.chat-attachment {
  display: flex;
  max-width: 260px;
  margin-top: 6px;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.chat-attachment.image {
  flex-direction: column;
  background: rgba(255, 255, 255, 0.15);
}
.chat-attachment.image img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  background: #e5e7eb;
}
.chat-attachment.image span {
  padding: 7px 9px;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.chat-attachment.file {
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.visitor-message .chat-attachment.file,
.visitor-message .chat-attachment.image {
  background: #fff7ed;
  border-color: #fed7aa;
}
.chat-attachment.file b {
  font-size: 22px;
}
.chat-attachment.file span {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.chat-attachment.file small {
  display: block;
  opacity: 0.72;
}
.message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.operator-message-form .upload-status {
  grid-column: 1/-1;
}
button[type="submit"] {
  cursor: pointer;
}
@media (max-width: 600px) {
  .attach-btn {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }
  .chat-attachment {
    max-width: min(235px, 70vw);
  }
  .chat-attachment.image img {
    max-height: 180px;
  }
  .operator-attach-btn {
    width: 38px;
    height: 36px;
  }
  .operator-message-form .composer-tools {
    flex-wrap: wrap;
  }
}

.upload-status:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.upload-status button {
  border: 0;
  background: transparent;
  color: #ef4444;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.upload-status span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Upload progress yang jelas untuk pengunjung dan operator */
.upload-progress-wrap {
  width: 100%;
  display: grid;
  gap: 6px;
}
.upload-progress-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.upload-progress-title span {
  white-space: normal;
  overflow-wrap: anywhere;
}
.upload-progress-title b {
  flex: 0 0 auto;
  color: #4f46e5;
}
.upload-progress-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.upload-progress-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: inherit;
  transition: width 0.18s ease;
}
.upload-progress-wrap small {
  font-size: 10px;
  color: #64748b;
}
.upload-status.upload-error {
  color: #b91c1c;
  background: #fef2f2;
}
.upload-status.upload-success {
  color: #166534;
  background: #f0fdf4;
}
@media (max-width: 600px) {
  .upload-progress-title {
    font-size: 11px;
  }
  .upload-progress-track {
    height: 7px;
  }
}

/* BLOCK IP, REOPEN & RESPONSIVE FINAL */
.danger-btn {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  padding: 10px 12px;
  cursor: pointer;
}
.danger-btn:hover {
  background: #b91c1c;
}
.secondary-btn,
.reopen-btn {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-weight: 700;
  padding: 9px 12px;
  cursor: pointer;
}
.reopen-btn {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}
.ip-state {
  font-size: 12px;
  margin: 0 0 9px;
}
.ip-state.blocked {
  color: #b91c1c;
  font-weight: 700;
}
.ip-state.allowed {
  color: #15803d;
}
.responsive-table {
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.responsive-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.responsive-table th,
.responsive-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 13px;
}
.status-chip {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.status-chip.danger {
  background: #fee2e2;
  color: #b91c1c;
}
.status-chip.muted {
  background: #e2e8f0;
  color: #475569;
}
@media (max-width: 1100px) {
  .inbox-grid {
    grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  }
  .customer-panel {
    position: fixed;
    right: 0;
    top: 68px;
    width: min(330px, 92vw);
    height: calc(100dvh - 68px);
    z-index: 35;
    box-shadow: -12px 0 28px rgba(15, 23, 42, 0.18);
    transform: translateX(105%);
    transition: transform 0.2s ease;
  }
  .customer-panel.mobile-open {
    transform: none;
  }
}
@media (max-width: 760px) {
  .inbox-grid {
    display: block;
  }
  .conversation-panel {
    width: 100%;
    max-width: none;
  }
  .chat-workspace {
    position: fixed;
    inset: 60px 0 0;
    background: #fff;
    z-index: 20;
    transform: translateX(100%);
    transition: transform 0.18s ease;
  }
  .list-open .chat-workspace,
  .chat-workspace:has(.workspace-header) {
    transform: none;
  }
  .conversation-item {
    min-height: 72px;
  }
  .workspace-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .workspace-actions button,
  .workspace-actions a {
    font-size: 12px;
  }
  .operator-message-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .operator-message-form textarea {
    width: 100%;
  }
  .admin-search {
    display: none;
  }
  .agent-presence small {
    display: none;
  }
}
@media (max-width: 420px) {
  .admin-logo strong {
    display: none;
  }
  .workspace-header strong {
    font-size: 14px;
  }
  .bubble {
    max-width: 94%;
  }
  .operator-message-form > button {
    min-width: 56px;
    padding: 0 10px;
  }
  .composer-tools select {
    max-width: 145px;
  }
}

/* FINAL PERFORMANCE + RESPONSIVE AUDIT */
* {
  box-sizing: border-box;
}
img,
video {
  max-width: 100%;
  height: auto;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
label[for] {
  touch-action: manipulation;
}
.admin-layout,
.inbox-grid,
.chat-workspace,
.conversation-panel,
.customer-panel {
  min-width: 0;
}
.messages,
.operator-messages {
  scrollbar-gutter: stable;
  will-change: scroll-position;
}
.conversation-item,
.msg-row {
  contain: layout style paint;
}
.chat-attachment img {
  content-visibility: auto;
}
@media (min-width: 1400px) {
  .inbox-grid {
    grid-template-columns: 310px minmax(560px, 1fr) 300px;
  }
  .admin-sidebar {
    width: 196px;
  }
  .admin-content {
    max-width: 1500px;
  }
}
@media (max-width: 1024px) {
  .admin-topbar {
    padding-inline: 12px;
  }
  .admin-search {
    max-width: 360px;
  }
  .inbox-grid {
    grid-template-columns: 290px minmax(0, 1fr);
  }
  .customer-panel {
    display: none;
  }
  .conversation-panel,
  .chat-workspace {
    height: calc(100dvh - 68px);
  }
}
@media (max-width: 760px) {
  body.pro-dashboard {
    overflow: hidden;
  }
  .admin-topbar {
    height: 60px;
  }
  .admin-sidebar {
    width: min(280px, 86vw);
  }
  .conversation-panel {
    height: calc(100dvh - 60px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .chat-workspace {
    height: calc(100dvh - 60px);
  }
  .operator-messages {
    min-height: 0;
  }
  .workspace-header {
    position: sticky;
    top: 0;
    z-index: 7;
  }
  .operator-message-form {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .message-form textarea,
  .operator-message-form textarea {
    font-size: 16px !important;
  }
  .popup-card,
  .livechat-pro-popup {
    max-width: calc(100vw - 24px) !important;
  }
}
@media (max-width: 480px) {
  .conversation-item {
    padding: 10px;
  }
  .mini-stats {
    gap: 4px;
  }
  .mini-stats > div {
    padding: 8px 4px;
  }
  .workspace-actions {
    max-width: 46%;
  }
  .workspace-header small {
    max-width: 52vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .operator-message-form {
    gap: 6px;
  }
  .operator-message-form > button {
    min-width: 54px;
  }
  .chat-attachment {
    max-width: 72vw;
  }
}
@supports (height: 100svh) {
  @media (max-width: 760px) {
    .conversation-panel,
    .chat-workspace {
      height: calc(100svh - 60px);
    }
    .floating-widget,
    .floating-widget.left {
      height: 100svh !important;
      max-height: 100svh !important;
    }
  }
}

/* V414: Pengaturan akun demo oleh Owner. */
.trial-plan-grid.without-trial {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.demo-owner-metrics article b {
  font-size: clamp(20px, 2vw, 28px);
}
.demo-owner-metrics article small {
  color: #64748b;
}
.demo-settings-panel {
  border-top: 4px solid #8b5cf6;
}
.demo-enabled-switch {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 13px 14px;
  border: 1px solid #c4b5fd;
  border-radius: 12px;
  background: #f5f3ff;
  color: #4c1d95 !important;
}
.demo-enabled-switch input {
  width: 20px !important;
  height: 20px;
  margin: 0 !important;
}
.demo-account-list {
  display: grid;
  gap: 14px;
}
.demo-account-card {
  padding: 16px;
  border: 1px solid #dbe3ef;
  border-left: 5px solid #22c55e;
  border-radius: 15px;
  background: #fff;
}
.demo-account-card.expired {
  border-left-color: #ef4444;
  background: #fffafa;
}
.demo-account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.demo-account-head h3,
.demo-account-head p {
  margin: 0;
}
.demo-account-head p {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.demo-account-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 13px 0;
}
.demo-account-info span {
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
}
.demo-account-info b {
  display: block;
  margin-top: 3px;
  color: #1e293b;
  font-size: 12px;
}
.demo-account-actions {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(90px, 120px) auto auto;
  gap: 8px;
  align-items: end;
}
.demo-account-actions label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 11px;
  font-weight: 750;
}
.demo-account-actions input {
  min-height: 42px;
  margin: 0;
}
.demo-account-actions button {
  min-height: 42px;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .demo-account-actions {
    grid-template-columns: 1fr 1fr;
  }
  .demo-account-actions label:first-of-type {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  .trial-plan-grid.without-trial,
  .demo-account-info,
  .demo-account-actions {
    grid-template-columns: 1fr;
  }
  .demo-account-head {
    align-items: stretch;
    flex-direction: column;
  }
  .demo-account-head .subscription-status {
    align-self: flex-start;
  }
  .demo-account-actions label:first-of-type {
    grid-column: auto;
  }
  .demo-account-actions button {
    width: 100%;
  }
}

/* LiveChat viewport/responsive hardening v32 */
html.embed-root,
html.embed-root body,
body.embed-mode {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: transparent !important;
  overscroll-behavior: none;
}
body.embed-mode {
  position: fixed;
  inset: 0;
}
body.embed-mode .chat-launcher {
  display: none !important;
}
body.embed-mode .floating-widget {
  position: absolute;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.floating-widget,
.chat-view,
.start-view.compact {
  min-height: 0;
}
.widget-head {
  flex: 0 0 auto;
  padding-top: max(14px, env(safe-area-inset-top));
}
.chat-view {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.messages {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.typing-hint,
.upload-status,
.enter-hint,
.end-chat-link,
.message-form {
  flex: 0 0 auto;
}
.message-form {
  position: relative;
  z-index: 3;
  align-items: flex-end;
  padding: 10px 12px;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  background: #fff;
}
.message-form textarea {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  max-height: min(120px, 28vh);
  line-height: 1.35;
  overflow-y: auto;
}
.attach-btn,
.message-form > button {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}
.enter-hint {
  display: block;
  padding: 0 12px 4px;
  color: #94a3b8;
  text-align: center;
  background: #fff;
}
.end-chat-link {
  padding: 5px 10px max(8px, env(safe-area-inset-bottom));
  line-height: 1.2;
}
.start-view.compact {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
@media (max-width: 600px) {
  .widget-head {
    min-height: 66px;
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .agent-avatar.small {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
  .messages {
    padding: 12px;
  }
  .bubble {
    max-width: 90%;
  }
  .message-form {
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .message-form textarea {
    font-size: 16px;
    min-height: 42px;
  }
  .attach-btn,
  .message-form > button {
    flex-basis: 42px;
    width: 42px;
    min-width: 42px;
    height: 42px;
  }
  .enter-hint {
    font-size: 10px;
    padding-bottom: 3px;
  }
  .end-chat-link {
    font-size: 11px;
  }
  .start-view.compact {
    padding: 18px 16px max(18px, env(safe-area-inset-bottom));
  }
}
@media (max-height: 560px) {
  .widget-head {
    min-height: 58px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .messages {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .enter-hint {
    display: none;
  }
  .end-chat-link {
    padding-top: 3px;
    padding-bottom: max(5px, env(safe-area-inset-bottom));
  }
  .message-form {
    padding-top: 7px;
    padding-bottom: 7px;
  }
}
@supports (height: 100dvh) {
  body.embed-mode .floating-widget {
    height: 100dvh !important;
  }
}

/* Notification sound settings */
.notification-sound-form {
  max-width: 760px;
}
.sound-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}
.sound-preview audio {
  width: min(100%, 420px);
  height: 42px;
}
.inline-check {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
}
.inline-check input {
  width: auto !important;
}
@media (max-width: 640px) {
  .sound-preview {
    align-items: stretch;
  }
  .sound-preview audio {
    width: 100%;
  }
}

/* Reports & Analytics charts */
.report-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 20px;
  align-items: end;
}
.report-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.report-presets button {
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #475569;
  border-radius: 10px;
  padding: 9px 13px;
  font-weight: 750;
  cursor: pointer;
}
.report-presets button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.report-filter {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 240px)) auto;
  gap: 12px;
  align-items: end;
}
.report-filter label {
  font-size: 12px;
  font-weight: 750;
  color: #475569;
}
.report-filter input {
  margin-top: 6px;
}
.report-filter input:disabled {
  background: #f8fafc;
  color: #94a3b8;
}
.report-live-status {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  color: #64748b;
  font-size: 12px;
}
.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
  animation: livePulse 1.8s infinite;
}
@keyframes livePulse {
  50% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
}
.report-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 18px;
}
.chart-panel {
  min-width: 0;
}
.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.panel-title-row h2 {
  margin: 0;
}
.panel-title-row p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
}
.chart-wrap {
  position: relative;
  min-height: 260px;
  width: 100%;
  overflow: hidden;
}
.chart-wrap canvas {
  display: block;
  max-width: 100%;
}
.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #94a3b8;
  background: #f8fafc;
  border-radius: 12px;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 9px;
  color: #64748b;
  font-size: 11px;
}
.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chart-legend i {
  width: 18px;
  height: 4px;
  border-radius: 9px;
}
.legend-total {
  background: #4f46e5;
}
.legend-closed {
  background: #16a34a;
}
.legend-missed {
  background: #ef4444;
}
.legend-rating {
  background: #f59e0b;
}
/* Consistent conversation UI */
.messages,
.operator-messages {
  padding: 20px 18px;
  scroll-padding-bottom: 18px;
}
.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 12px 0;
}
.msg-row .message-stack {
  max-width: min(76%, 680px);
  min-width: 0;
}
.msg-row .sender-label {
  line-height: 1.2;
  margin: 0 7px 5px;
  text-transform: none;
}
.msg-row .bubble {
  position: relative;
  max-width: 100%;
  padding: 11px 13px 9px;
  font-size: 14px;
  line-height: 1.48;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.msg-row .bubble time {
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  line-height: 1;
  margin-top: 7px;
  opacity: 0.72;
  text-align: right;
}
.msg-row.visitor-message .bubble time {
  text-align: left;
}
.msg-row .message-avatar {
  margin-bottom: 2px;
}
.system-message {
  justify-content: center !important;
  margin: 16px 0;
}
.system-message .bubble {
  max-width: min(88%, 620px);
  padding: 9px 14px;
  text-align: center;
  border-style: dashed;
  border-radius: 999px !important;
  font-size: 12px;
  box-shadow: none !important;
}
@media (max-width: 1100px) {
  .report-chart-grid {
    grid-template-columns: 1fr;
  }
  .report-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .report-controls {
    grid-template-columns: 1fr;
  }
  .report-live-status {
    justify-self: start;
  }
  .report-filter {
    grid-template-columns: 1fr 1fr;
  }
  .report-filter .btn {
    grid-column: 1/-1;
  }
  .report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .chart-wrap {
    min-height: 230px;
  }
  .msg-row {
    gap: 6px;
    margin: 10px 0;
  }
  .messages,
  .operator-messages {
    padding: 14px 10px;
  }
  .msg-row .message-stack {
    max-width: 84%;
  }
  .msg-row .bubble {
    font-size: 13.5px;
    padding: 10px 12px 8px;
  }
}
@media (max-width: 480px) {
  .report-filter {
    grid-template-columns: 1fr;
  }
  .report-filter .btn {
    grid-column: auto;
  }
  .report-presets button {
    flex: 1 1 calc(50% - 8px);
  }
  .report-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .report-metrics div {
    padding: 12px;
  }
  .report-metrics b {
    font-size: 19px;
  }
  .msg-row .message-stack {
    max-width: 86%;
  }
  .msg-row .message-avatar {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }
  .system-message .bubble {
    max-width: 94%;
    font-size: 11.5px;
  }
}
/* Operator service monitoring */
.violation-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.violation-metrics > div {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.violation-metrics span,
.violation-metrics small {
  display: block;
  color: #64748b;
  font-size: 12px;
}
.violation-metrics b {
  display: block;
  margin: 7px 0;
  font-size: 26px;
  color: #0f172a;
}
.severity {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}
.severity.ringan {
  background: #fef3c7;
  color: #92400e;
}
.severity.sedang {
  background: #ffedd5;
  color: #c2410c;
}
.severity.berat {
  background: #fee2e2;
  color: #b91c1c;
}
.violation-chart {
  min-height: 240px;
}
.violation-chart canvas {
  width: 100%;
  height: 240px;
}
.detail-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 16px;
}
.detail-list dt {
  color: #64748b;
}
.detail-list dd {
  margin: 0;
}
.matched-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.matched-list span {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 8px;
  padding: 6px 9px;
  font-weight: 700;
}
.violation-quote {
  margin: 18px 0 0;
  border-left: 4px solid #ef4444;
  background: #fff7f7;
  padding: 14px;
  border-radius: 8px;
}
.review-conversation {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.review-message {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f1f5f9;
}
.review-message.operator {
  align-self: flex-end;
  background: #eef2ff;
}
.review-message.visitor {
  align-self: flex-start;
}
.review-message.system {
  align-self: center;
  max-width: 90%;
}
.review-message.ai {
  align-self: flex-end;
  background: #eef2ff;
}
.review-message p {
  margin: 6px 0;
}
.review-message small {
  color: #64748b;
}
.action-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.action-row form {
  display: flex;
  gap: 10px;
}
.btn.danger {
  background: #dc2626;
  color: #fff;
}
@media (max-width: 900px) {
  .violation-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .violation-metrics {
    grid-template-columns: 1fr;
  }
  .detail-list {
    grid-template-columns: 1fr;
  }
  .review-message {
    max-width: 92%;
  }
  .action-row,
  .action-row form {
    align-items: stretch;
    flex-direction: column;
  }
}

/* V4: Operator dan AI BOT memakai satu format visual. Hanya label nama yang berbeda. */
.msg-row.service-message,
.msg-row.operator-message {
  justify-content: flex-end !important;
  align-items: flex-end !important;
}
.msg-row.service-message .message-avatar,
.msg-row.operator-message .message-avatar {
  order: 2 !important;
  background: #eef2ff !important;
  color: var(--primary) !important;
  border-color: #c7d2fe !important;
}
.msg-row.service-message .message-stack,
.msg-row.operator-message .message-stack {
  order: 1 !important;
  align-items: flex-end !important;
}
.msg-row.service-message .sender-label,
.msg-row.operator-message .sender-label {
  color: var(--primary) !important;
  text-align: right !important;
}
.msg-row.service-message .bubble,
.msg-row.operator-message .bubble {
  background: linear-gradient(135deg, var(--primary), #4338ca) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 16px 16px 5px 16px !important;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.18) !important;
  font-style: normal !important;
  text-align: left !important;
}
.msg-row.service-message .bubble time,
.msg-row.operator-message .bubble time {
  text-align: right !important;
  color: inherit !important;
}

/* V5: AI BOT CHAT dan Customer Service memakai komponen visual yang sama persis. */
.messages .msg-row.operator-message,
.operator-messages .msg-row.operator-message {
  justify-content: flex-end !important;
  align-items: flex-end !important;
}
.messages .msg-row.operator-message .message-avatar,
.operator-messages .msg-row.operator-message .message-avatar {
  order: 2 !important;
  background: #eef2ff !important;
  color: var(--primary) !important;
  border: 1px solid #c7d2fe !important;
}
.messages .msg-row.operator-message .message-stack,
.operator-messages .msg-row.operator-message .message-stack {
  order: 1 !important;
  align-items: flex-end !important;
}
.messages .msg-row.operator-message .sender-label,
.operator-messages .msg-row.operator-message .sender-label {
  color: var(--primary) !important;
  text-align: right !important;
}
.messages .msg-row.operator-message .bubble,
.operator-messages .msg-row.operator-message .bubble {
  background: linear-gradient(135deg, var(--primary), #4338ca) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 16px 16px 5px 16px !important;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.18) !important;
  font-style: normal !important;
  text-align: left !important;
}
.messages .msg-row.operator-message .bubble time,
.operator-messages .msg-row.operator-message .bubble time {
  text-align: right !important;
  color: inherit !important;
}

/* V7: AI dan Customer Service memakai class serta layout yang sama tanpa reset CSS. */
.msg-row.operator-message[data-sender="ai"],
.msg-row.operator-message[data-sender="operator"] {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 8px;
  margin: 12px 0;
}
.message-text .message-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.message-text .message-link:hover,
.message-text .message-link:focus {
  opacity: 0.82;
}

/* V8: halaman utama, langganan, dan billing */
.landing-site {
  min-height: 100vh;
  background: #07101f;
  color: #eaf0ff;
  font-family: Inter, system-ui, sans-serif;
}
.landing-nav {
  height: 76px;
  max-width: 1180px;
  margin: auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.landing-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 850;
  font-size: 19px;
}
.landing-logo span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #6557ff, #2dd4bf);
}
.landing-nav nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.landing-nav nav a {
  color: #9eacc5;
  text-decoration: none;
}
.landing-login,
.hero-actions a,
.public-plan-grid a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 11px;
  font-weight: 800;
}
.landing-login {
  padding: 11px 16px;
  background: #fff;
  color: #101828;
}
.landing-hero {
  max-width: 1180px;
  margin: auto;
  padding: 82px 24px 92px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 70px;
  align-items: center;
  background: radial-gradient(
    circle at 20% 15%,
    rgba(101, 87, 255, 0.24),
    transparent 35%
  );
}
.landing-hero h1 {
  font-size: clamp(42px, 5vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin: 15px 0 22px;
}
.landing-hero > div > p {
  font-size: 18px;
  line-height: 1.7;
  color: #aab7ce;
  max-width: 650px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin: 30px 0 22px;
}
.hero-actions a {
  padding: 14px 19px;
  background: #6657ff;
  color: #fff;
}
.hero-actions a + a {
  background: transparent;
  border: 1px solid #35425a;
  color: #dbe5f7;
}
.hero-points {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: #94a3b8;
  font-size: 13px;
}
.hero-console {
  border: 1px solid #2b3850;
  border-radius: 22px;
  background: #101b2e;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-3deg);
}
.console-head {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid #29354b;
}
.console-head span {
  color: #4ade80;
  font-size: 12px;
}
.console-body {
  height: 390px;
  display: grid;
  grid-template-columns: 58px 1fr;
}
.mini-side {
  border-right: 1px solid #29354b;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.mini-side i {
  height: 28px;
  border-radius: 9px;
  background: #26344d;
}
.mini-chat {
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.mini-chat small {
  color: #8fa0ba;
}
.mini-chat p {
  align-self: flex-start;
  margin: 0;
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 14px 14px 14px 4px;
  background: #6657ff;
  font-size: 13px;
}
.mini-chat p.visitor {
  align-self: flex-end;
  background: #26344d;
  border-radius: 14px 14px 4px 14px;
}
.mini-input {
  margin-top: auto;
  padding: 13px;
  border: 1px solid #36445e;
  border-radius: 12px;
  color: #74839c;
}
.mini-input b {
  float: right;
  color: #8f82ff;
}
.trusted-strip {
  max-width: 1180px;
  margin: auto;
  padding: 22px 24px;
  border-top: 1px solid #1d2a3f;
  border-bottom: 1px solid #1d2a3f;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: #73829b;
  font-weight: 750;
}
.landing-section,
.pricing-section {
  max-width: 1180px;
  margin: auto;
  padding: 100px 24px;
}
.section-intro {
  max-width: 680px;
  margin-bottom: 42px;
}
.section-intro > span,
.billing-hero > span,
.crypto-section > div > span {
  color: #8c7fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}
.section-intro h2 {
  font-size: clamp(31px, 4vw, 48px);
  margin: 12px 0;
  letter-spacing: -0.035em;
}
.section-intro p {
  color: #98a7bf;
  line-height: 1.7;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-grid article {
  padding: 25px;
  border: 1px solid #27344a;
  border-radius: 18px;
  background: linear-gradient(145deg, #111e32, #0d1728);
}
.feature-grid article > b {
  font-size: 25px;
}
.feature-grid h3 {
  margin: 18px 0 8px;
}
.feature-grid p {
  margin: 0;
  color: #92a0b7;
  line-height: 1.6;
  font-size: 14px;
}
.pricing-section {
  padding-top: 70px;
}
.public-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  gap: 18px;
}
.public-plan-grid article {
  padding: 32px;
  border: 1px solid #2b3850;
  border-radius: 22px;
  background: #101b2e;
}
.public-plan-grid article.featured {
  border-color: #7162ff;
  box-shadow: 0 0 0 1px #7162ff;
}
.public-plan-grid > article > span {
  font-size: 12px;
  font-weight: 850;
  color: #8c7fff;
}
.public-plan-grid h3 {
  font-size: 16px;
}
.public-plan-grid h3 b {
  font-size: 42px;
}
.public-plan-grid p {
  color: #97a6bd;
}
.public-plan-grid a {
  margin-top: 14px;
  width: 100%;
  padding: 13px;
  background: #6657ff;
  color: #fff;
}
.crypto-section {
  max-width: 1132px;
  margin: 0 auto 90px;
  padding: 45px;
  border: 1px solid #2c3950;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(101, 87, 255, 0.18),
    rgba(45, 212, 191, 0.08)
  );
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.crypto-section h2 {
  font-size: 32px;
  margin: 10px 0;
}
.crypto-section p {
  color: #9babc2;
  line-height: 1.7;
}
.crypto-flow {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 14px;
  align-items: center;
}
.crypto-flow b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #6657ff;
}
.landing-site footer {
  max-width: 1180px;
  margin: auto;
  padding: 30px 24px 45px;
  border-top: 1px solid #1d2a3f;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  color: #75849c;
}
.billing-page {
  margin: 0;
  min-height: 100vh;
  background: #f4f7fb;
  color: #172033;
  font-family: Inter, system-ui, sans-serif;
}
.billing-shell {
  width: min(1080px, calc(100% - 32px));
  margin: auto;
  padding-bottom: 50px;
}
.billing-shell > header {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.billing-brand {
  font-weight: 850;
  font-size: 19px;
  text-decoration: none;
  color: #172033;
}
.billing-shell > header > a:last-child {
  color: #64748b;
}
.billing-hero {
  padding: 50px 0 28px;
}
.billing-hero h1 {
  font-size: 42px;
  margin: 10px 0;
}
.billing-hero p {
  color: #64748b;
  max-width: 680px;
  line-height: 1.6;
}
.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 18px 0;
}
.plan-grid article,
.payment-panel,
.payment-history {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.05);
}
.plan-grid h2 {
  margin: 0;
}
.plan-price {
  margin: 15px 0;
}
.plan-price b {
  font-size: 38px;
}
.plan-price span,
.plan-grid p {
  color: #64748b;
}
.payment-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 18px;
}
.wallet-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f1f5f9;
  border-radius: 10px;
}
.wallet-box code {
  overflow-wrap: anywhere;
  min-width: 0;
}
.wallet-box button {
  margin-left: auto;
}
.payment-warning {
  color: #b45309;
  font-size: 13px;
  line-height: 1.55;
}
.payment-history {
  margin-top: 18px;
}
.subscription-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.subscription-status.pending {
  background: #fef3c7;
  color: #92400e;
}
.subscription-status.approved {
  background: #dcfce7;
  color: #166534;
}
.subscription-status.rejected {
  background: #fee2e2;
  color: #991b1b;
}
.billing-settings {
  max-width: 760px;
}
.review-actions {
  display: grid;
  gap: 7px;
  min-width: 180px;
}
.tx-code {
  display: block;
  max-width: 180px;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 11px;
}
@media (max-width: 850px) {
  .landing-nav nav {
    display: none;
  }
  .landing-hero {
    grid-template-columns: 1fr;
    padding-top: 50px;
  }
  .hero-console {
    transform: none;
  }
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
  .crypto-section {
    margin-left: 16px;
    margin-right: 16px;
    grid-template-columns: 1fr;
  }
  .payment-panel {
    grid-template-columns: 1fr;
  }
  .landing-site footer {
    flex-direction: column;
  }
  .billing-hero h1 {
    font-size: 34px;
  }
}
@media (max-width: 560px) {
  .landing-nav {
    padding: 0 16px;
  }
  .landing-logo {
    font-size: 16px;
  }
  .landing-login {
    padding: 9px 11px;
    font-size: 12px;
  }
  .landing-hero,
  .landing-section,
  .pricing-section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .landing-hero h1 {
    font-size: 41px;
  }
  .feature-grid,
  .public-plan-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .trusted-strip {
    justify-content: flex-start;
  }
  .hero-console {
    display: none;
  }
  .crypto-section {
    padding: 25px;
  }
  .billing-shell {
    width: min(100% - 20px, 1080px);
  }
  .billing-hero {
    padding-top: 28px;
  }
  .payment-panel,
  .payment-history,
  .plan-grid article {
    padding: 18px;
  }
}
.subscription-grace-banner {
  position: fixed;
  left: 260px;
  right: 20px;
  bottom: 18px;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid #f59e0b;
  border-radius: 14px;
  background: #fffbeb;
  color: #78350f;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.18);
}
.subscription-grace-banner.urgent {
  border-color: #ef4444;
  background: #fff1f2;
  color: #881337;
}
.subscription-grace-banner div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.subscription-grace-banner span {
  font-size: 12px;
}
.subscription-grace-banner a {
  flex: 0 0 auto;
  padding: 10px 13px;
  border-radius: 9px;
  background: #d97706;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.subscription-grace-banner.urgent a {
  background: #dc2626;
}
.subscription-renew-modal[hidden] {
  display: none;
}
.subscription-renew-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(5px);
}
.subscription-renew-card {
  position: relative;
  width: min(440px, 100%);
  padding: 30px;
  border-radius: 22px;
  background: #fff;
  color: #172033;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
  text-align: center;
}
.renew-close {
  position: absolute;
  right: 13px;
  top: 13px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-size: 22px;
}
.renew-icon {
  font-size: 42px;
}
.renew-label {
  display: block;
  margin-top: 9px;
  color: #d97706;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.subscription-renew-card h2 {
  margin: 8px 0;
}
.subscription-renew-card p {
  color: #64748b;
  line-height: 1.6;
}
.subscription-renew-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
  padding: 13px;
  border-radius: 12px;
  background: #f8fafc;
  text-align: left;
  font-size: 12px;
}
.subscription-renew-card dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}
.subscription-renew-card .primary-btn,
.subscription-renew-card .secondary-btn {
  width: 100%;
  margin-top: 9px;
}
.subscription-expired-alert {
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid #ef4444;
  border-radius: 15px;
  background: #fff1f2;
  color: #881337;
}
.subscription-expired-alert b {
  font-size: 17px;
}
.subscription-expired-alert p {
  margin: 6px 0 0;
  line-height: 1.55;
}
@media (max-width: 900px) {
  .subscription-grace-banner {
    left: 16px;
    right: 16px;
  }
}
@media (max-width: 600px) {
  .subscription-grace-banner {
    align-items: stretch;
    flex-direction: column;
  }
  .subscription-grace-banner a {
    text-align: center;
  }
  .subscription-renew-card {
    padding: 25px 18px;
  }
  .subscription-renew-card dl {
    grid-template-columns: 1fr;
  }
  .subscription-renew-card dd {
    text-align: left;
  }
}
.account-control-list {
  display: grid;
  gap: 18px;
}
.account-control-card {
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #22c55e;
  border-radius: 16px;
  background: #fff;
}
.account-control-card.state-suspended {
  border-left-color: #f59e0b;
}
.account-control-card.state-banned {
  border-left-color: #ef4444;
}
.account-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.account-card-head h3 {
  margin: 0 0 5px;
}
.account-card-head p {
  margin: 0;
  color: #64748b;
}
.owner-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 10px;
  vertical-align: middle;
}
.account-state {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.account-state.active {
  background: #dcfce7;
  color: #166534;
}
.account-state.suspended {
  background: #fef3c7;
  color: #92400e;
}
.account-state.banned {
  background: #fee2e2;
  color: #991b1b;
}
.account-state-actions {
  padding: 14px 0;
  border-bottom: 1px solid #e2e8f0;
}
.account-state-actions form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn.warning {
  background: #d97706;
  color: #fff;
}
.permission-form {
  padding-top: 15px;
}
.permission-form h4 {
  margin: 0 0 12px;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}
.permission-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}
.permission-grid input {
  width: auto;
  margin: 0;
}
.clean-list {
  padding-left: 20px;
  color: #475569;
  line-height: 1.9;
}
@media (max-width: 850px) {
  .permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .account-card-head {
    flex-direction: column;
  }
  .permission-grid {
    grid-template-columns: 1fr;
  }
  .account-state-actions form button {
    flex: 1;
  }
}
.account-card-collapsed > :not(.account-card-head) {
  display: none !important;
}
.account-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.account-toggle {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 9px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.account-toggle:hover {
  background: #eef2ff;
  color: var(--primary);
}
.owner-livechat-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 8px 11px !important;
  border-radius: 10px;
  background: #4f46e5 !important;
  color: #fff !important;
  font-weight: 800 !important;
  white-space: nowrap;
}
.owner-livechat-btn:hover {
  background: #3730a3 !important;
}
@media (max-width: 720px) {
  .owner-livechat-btn {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    font-size: 0;
  }
  .owner-livechat-btn::first-letter {
    font-size: 17px;
  }
}
@media (max-width: 560px) {
  .account-head-actions {
    justify-content: flex-start;
  }
}
html.embed-root body.mobile-direct .floating-widget,
html.embed-root body.mobile-direct .floating-widget.left {
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
html.embed-root body.mobile-direct .chat-launcher {
  display: none !important;
}
@supports (height: 100svh) {
  html.embed-root body.mobile-direct .floating-widget,
  html.embed-root body.mobile-direct .floating-widget.left {
    height: 100svh !important;
    max-height: 100svh !important;
  }
}

/* V26 SEO Manager + final chat responsive hardening */
.seo-manager-panel {
  border-top: 4px solid var(--primary);
}
.seo-manager-panel form {
  gap: 18px;
}
.seo-setting-group {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fbfdff;
}
.seo-setting-group h3 {
  margin: 0 0 13px;
  color: #1e293b;
}
.seo-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.seo-form-grid .full {
  grid-column: 1/-1;
}
.seo-setting-group label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 750;
  color: #334155;
}
.seo-setting-group label small {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}
.seo-setting-group input,
.seo-setting-group textarea,
.seo-setting-group select {
  margin: 0;
}
.seo-setting-group textarea {
  min-height: 92px;
  resize: vertical;
}
.seo-setting-group .code-area {
  min-height: 150px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}
.seo-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.seo-tools button {
  min-width: 190px;
}
.chat-workspace,
.chat-view,
.operator-messages,
.messages {
  min-height: 0;
}
.operator-message-form,
.message-form {
  flex: 0 0 auto;
}
.operator-message-form textarea,
.message-form textarea {
  min-width: 0;
}
.workspace-header > div:first-child {
  min-width: 0;
}
.workspace-header small {
  overflow-wrap: anywhere;
}
.workspace-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.msg-row .message-stack,
.bubble,
.message-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.operator-message-form button:disabled,
.message-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
@media (max-width: 900px) {
  .seo-form-grid {
    grid-template-columns: 1fr;
  }
  .seo-form-grid .full {
    grid-column: auto;
  }
  .seo-tools {
    justify-content: stretch;
  }
  .seo-tools .btn,
  .seo-tools button {
    flex: 1 1 180px;
    text-align: center;
  }
  .admin-topbar {
    gap: 10px;
  }
  .agent-presence {
    min-width: 0;
  }
  .agent-presence > div {
    min-width: 0;
  }
  .agent-presence strong {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-width: 600px) {
  .seo-manager-panel,
  .seo-setting-group {
    padding: 13px;
  }
  .seo-tools {
    display: grid;
    grid-template-columns: 1fr;
  }
  .seo-tools .btn,
  .seo-tools button {
    width: 100%;
  }
  .workspace-header {
    align-items: flex-start;
  }
  .workspace-actions {
    max-width: 55%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 3px;
  }
  .workspace-actions > * {
    flex: 0 0 auto;
  }
  .operator-message-form {
    background: #fff;
  }
  .operator-messages,
  .messages {
    overscroll-behavior-y: contain;
  }
  .agent-presence .topbar-avatar,
  .agent-presence .presence-dot {
    display: none;
  }
  .agent-presence strong {
    max-width: 90px;
  }
  .admin-topbar {
    padding-inline: 9px;
  }
}
@supports (height: 100dvh) {
  @media (max-width: 900px) {
    .chat-workspace,
    .conversation-panel {
      height: calc(100dvh - 60px) !important;
    }
  }
}
.required-mark {
  color: #dc2626;
}
.proof-view-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border-radius: 9px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.proof-view-btn:hover {
  background: #e0e7ff;
}
.owner-login-link {
  color: #a5b4fc;
  text-decoration: none;
}
.selected-plan-login {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 14px 0;
  padding: 13px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #eef2ff;
  color: #3730a3;
}
.selected-plan-login span,
.selected-plan-login small {
  font-size: 11px;
}
.selected-plan-login b {
  font-size: 15px;
}
.invoice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 5px 0 20px;
  padding: 24px 28px;
  border-radius: 18px;
  background: linear-gradient(135deg, #312e81, #4f46e5);
  color: #fff;
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.22);
}
.invoice-card span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #c7d2fe;
}
.invoice-card h2 {
  font-size: 28px;
  margin: 7px 0;
}
.invoice-card p {
  margin: 0;
  color: #dbeafe;
}
.invoice-total {
  text-align: right;
}
.invoice-total small,
.invoice-total em {
  display: block;
}
.invoice-total b {
  display: block;
  margin: 4px 0;
  font-size: 30px;
}
.invoice-total b span {
  font-size: inherit;
  color: #fff;
  letter-spacing: 0;
}
.invoice-total em {
  font-size: 11px;
  font-style: normal;
  color: #fde68a;
}
.plan-grid article.selected {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px #c7d2fe;
}
.owner-panel {
  --primary: #7c3aed;
}
.owner-topbar {
  background: linear-gradient(90deg, #23123d, #4c1d95) !important;
}
.owner-sidebar {
  background: #1d1230 !important;
}
.owner-sidebar a:hover {
  background: #392050 !important;
}
.owner-sidebar span {
  color: #c4b5fd !important;
}
.owner-login-page {
  background: radial-gradient(circle at top, #37205f, #111827 55%);
}
.owner-login-card {
  border: 1px solid #6d4ba0;
}
.owner-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}
.owner-metrics article {
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);
}
.owner-metrics span,
.owner-metrics a {
  display: block;
  font-size: 12px;
  color: #64748b;
}
.owner-metrics b {
  display: block;
  margin: 7px 0;
  font-size: 30px;
}
.owner-metrics a {
  color: #6d28d9;
  text-decoration: none;
  font-weight: 750;
}
.owner-function-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}
.owner-function-grid > a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  color: #172033;
  text-decoration: none;
}
.owner-function-grid > a:hover {
  border-color: #8b5cf6;
  transform: translateY(-2px);
}
.owner-function-grid span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 1000px) {
  .owner-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .owner-function-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .invoice-card {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }
  .invoice-total {
    text-align: left;
  }
  .owner-metrics,
  .owner-function-grid {
    grid-template-columns: 1fr;
  }
}
.payment-path {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}
.payment-path span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 850;
}
.payment-path b {
  color: #94a3b8;
}
.payment-qr {
  width: min(100%, 360px);
  margin: 0 auto 20px;
  text-align: center;
}
.payment-qr img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}
.payment-qr small {
  display: block;
  margin-top: 9px;
  color: #64748b;
  font-weight: 750;
}
.copy-notice {
  min-height: 18px;
  margin: 7px 0;
  color: #15803d;
  font-size: 12px;
}
.payment-submit-form {
  align-self: start;
  position: sticky;
  top: 20px;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #f8fafc;
}
.payment-submit-form h2 {
  margin-top: 0;
}
.billing-owner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}
.owner-qr-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}
.owner-qr-preview > span {
  font-size: 12px;
  font-weight: 850;
  color: #15803d;
}
.owner-qr-preview img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 12px;
}
.owner-qr-preview code {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  font-size: 11px;
}
@media (max-width: 820px) {
  .billing-owner-layout {
    grid-template-columns: 1fr;
  }
  .owner-qr-preview {
    max-width: 360px;
  }
  .payment-submit-form {
    position: static;
  }
}
@media (max-width: 560px) {
  .payment-qr {
    max-width: 290px;
  }
  .wallet-box {
    align-items: stretch;
    flex-direction: column;
  }
  .wallet-box button {
    margin: 0;
  }
  .payment-submit-form {
    padding: 16px;
  }
}
.payment-method-list {
  display: grid;
  gap: 18px;
}
.payment-method-list-heading {
  padding: 0 2px;
}
.payment-method-list-heading h2 {
  margin: 0 0 5px;
}
.payment-method-card {
  border-left: 4px solid #16a34a;
}
.payment-method-card.is-inactive {
  border-left-color: #94a3b8;
  opacity: 0.92;
}
.payment-method-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.payment-method-card-head h3 {
  margin: 8px 0 2px;
}
.payment-method-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.payment-method-card-head img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #dbe3ef;
  padding: 7px;
}
.payment-method-toggle {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.payment-method-toggle:hover {
  background: #eef2ff;
  color: var(--primary);
}
.payment-method-card.payment-method-collapsed
  > :not(.payment-method-card-head) {
  display: none !important;
}
.payment-method-card.payment-method-collapsed .payment-method-card-head {
  margin-bottom: 0;
  align-items: center;
}
.payment-method-card.payment-method-collapsed .payment-method-card-head img {
  width: 62px;
  height: 62px;
}
.payment-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.payment-method-editor .toggle-label {
  display: flex;
  align-items: center;
  gap: 9px;
}
.payment-method-editor .toggle-label input {
  width: auto;
}
.approval-waiting {
  animation: approvalPulse 2s ease-in-out infinite;
}
.approval-waiting p {
  margin: 6px 0 0;
}
@keyframes approvalPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.12);
  }
}
@media (max-width: 700px) {
  .payment-method-grid {
    grid-template-columns: 1fr;
  }
  .payment-method-card-head {
    align-items: center;
  }
  .payment-method-card-actions {
    justify-content: flex-end;
  }
  .payment-method-card-head img {
    width: 84px;
    height: 84px;
  }
  .payment-method-card.payment-method-collapsed .payment-method-card-head img {
    width: 54px;
    height: 54px;
  }
}
.payment-approved-toast {
  position: fixed;
  right: 20px;
  top: 84px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 380px;
  padding: 15px 18px;
  border: 1px solid #86efac;
  border-radius: 14px;
  background: #f0fdf4;
  color: #166534;
  box-shadow: 0 16px 40px rgba(22, 101, 52, 0.18);
  animation: toastIn 0.3s ease-out;
}
.payment-approved-toast span {
  font-size: 12px;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 600px) {
  .payment-approved-toast {
    left: 12px;
    right: 12px;
    top: 70px;
  }
}

/* V36: hanya riwayat Billing & Persetujuan berstatus ditolak yang diminimize. */
.billing-approval-panel {
  overflow: hidden;
  border-top: 4px solid #7c3aed;
}
.billing-approval-head {
  align-items: center;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef2f7;
}
.billing-approval-head h2 {
  margin-bottom: 6px;
}
.billing-rejected-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 8px 10px 8px 12px;
  border: 1px solid #fecaca;
  border-radius: 13px;
  background: linear-gradient(135deg, #fff7f7, #fff1f2);
  color: #9f1239;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(190, 24, 93, 0.09);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.billing-rejected-toggle:hover {
  transform: translateY(-1px);
  border-color: #fda4af;
  box-shadow: 0 9px 22px rgba(190, 24, 93, 0.15);
}
.billing-rejected-toggle:focus-visible {
  outline: 3px solid rgba(244, 63, 94, 0.22);
  outline-offset: 2px;
}
.billing-toggle-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #ffe4e6;
  color: #be123c;
  font-size: 17px;
  line-height: 1;
  transition: transform 0.2s ease;
}
.billing-rejected-toggle.is-open .billing-toggle-icon {
  transform: rotate(180deg);
}
.billing-toggle-count {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  border-radius: 999px;
  background: #be123c;
  color: #fff;
  font-size: 11px;
}
.billing-approval-panel .rejected-billing-row {
  background: #fffafb;
}
.billing-approval-panel .rejected-billing-row td:first-child {
  box-shadow: inset 3px 0 #f43f5e;
}
.billing-approval-panel .rejected-billing-row[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  .billing-approval-head {
    align-items: stretch;
    flex-direction: column;
  }
  .billing-rejected-toggle {
    align-self: flex-start;
  }
  .billing-toggle-label {
    min-width: 118px;
    text-align: left;
  }
}
.billing-approval-panel .table-wrap {
  border: 1px solid var(--border, #dbe1ea);
  border-radius: 14px;
}
.billing-approval-panel table {
  min-width: 1120px;
}
.billing-approval-panel th {
  white-space: nowrap;
  background: rgba(99, 102, 241, 0.06);
}
.billing-approval-panel td {
  vertical-align: top;
  padding: 14px 12px;
}
.billing-approval-panel td > strong {
  display: block;
  margin-bottom: 4px;
}
.billing-approval-panel td > small {
  display: block;
  line-height: 1.5;
  margin-top: 5px;
}
.billing-approval-panel td input,
.billing-approval-panel td select,
.billing-approval-panel td textarea {
  width: 100%;
  min-width: 115px;
  margin: 0 0 7px;
  padding: 9px 10px;
  border: 1px solid var(--border, #dbe1ea);
  border-radius: 9px;
  background: var(--card, #fff);
  color: inherit;
}
.billing-approval-panel td input:focus,
.billing-approval-panel td select:focus,
.billing-approval-panel td textarea:focus {
  outline: 2px solid rgba(79, 70, 229, 0.18);
  border-color: #6366f1;
}
.billing-approval-panel td textarea {
  min-height: 68px;
  resize: vertical;
}
.billing-approval-panel td label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.billing-payment-editor {
  min-width: 180px;
}
.billing-amount-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto;
  gap: 7px;
  align-items: center;
}
.billing-amount-row span {
  font-weight: 800;
  padding: 9px 0;
}
.billing-edit-actions {
  display: grid;
  gap: 7px;
  min-width: 96px;
}
.billing-edit-actions button {
  width: 100%;
}
.billing-approval-panel .proof-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Panduan API key pada AI Assistant */
.ai-key-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ai-key-guide {
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}
.ai-key-guide[open] {
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}
.ai-key-guide summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}
.ai-key-guide summary::-webkit-details-marker {
  display: none;
}
.ai-key-guide summary > span:nth-child(2) {
  min-width: 0;
}
.ai-key-guide summary strong,
.ai-key-guide summary small {
  display: block;
}
.ai-key-guide summary strong {
  color: #0f172a;
}
.ai-key-guide summary small {
  color: #64748b;
  font-size: 11px;
  margin-top: 3px;
  line-height: 1.4;
}
.ai-key-guide summary > b {
  font-size: 11px;
  color: var(--primary);
  white-space: nowrap;
}
.ai-guide-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: #e0e7ff;
  color: #4338ca;
}
.gemini-guide .ai-guide-icon {
  background: linear-gradient(135deg, #e0f2fe, #ede9fe);
  color: #2563eb;
}
.openai-guide .ai-guide-icon {
  background: #dcfce7;
  color: #047857;
}
.ai-key-guide-content {
  border-top: 1px solid #e2e8f0;
  padding: 15px;
}
.ai-key-guide-content ol {
  margin: 0 0 14px;
  padding-left: 22px;
  color: #334155;
  font-size: 13px;
  line-height: 1.65;
}
.ai-key-guide-content li + li {
  margin-top: 7px;
}
.ai-key-guide-content a {
  overflow-wrap: anywhere;
}
.ai-guide-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.ai-guide-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}
.ai-guide-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.ai-youtube-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #dc2626;
}
@media (max-width: 900px) {
  .ai-key-guide-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .ai-key-guide summary {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .ai-key-guide summary > b {
    grid-column: 2;
  }
  .ai-guide-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* Demo gratis 3 hari */
.trial-countdown-banner {
  position: relative;
  z-index: 25;
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(270px, 1fr);
  align-items: center;
  gap: 22px;
  padding: 13px 22px;
  color: #fff;
  background:
    radial-gradient(
      circle at 10% 20%,
      rgba(255, 255, 255, 0.2),
      transparent 26%
    ),
    linear-gradient(115deg, #4f46e5, #7c3aed 52%, #db2777);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.24);
}
.trial-countdown-banner.urgent {
  background: linear-gradient(115deg, #b45309, #ea580c 52%, #dc2626);
}
.trial-banner-intro {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trial-banner-intro b,
.trial-banner-intro small {
  display: block;
}
.trial-banner-intro b {
  font-size: 16px;
}
.trial-banner-intro small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 11px;
  line-height: 1.45;
}
.trial-gift {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 24px;
}
.trial-clock {
  display: flex;
  align-items: center;
  gap: 6px;
}
.trial-clock div {
  min-width: 54px;
  padding: 8px 7px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(8px);
}
.trial-clock b,
.trial-clock span {
  display: block;
}
.trial-clock b {
  font-size: 19px;
  line-height: 1;
}
.trial-clock span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 9px;
  text-transform: uppercase;
}
.trial-clock i {
  font-style: normal;
  font-weight: 900;
}
.trial-upgrade {
  justify-self: end;
  text-align: right;
}
.trial-upgrade > span {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 700;
}
.trial-upgrade div {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
}
.trial-upgrade a {
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 9px;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 850;
}
.trial-upgrade a.recommended {
  border-color: #fff;
  background: #fff;
  color: #6d28d9;
}
.trial-countdown-banner + .admin-layout,
.trial-countdown-banner + .admin-layout .conversation-panel,
.trial-countdown-banner + .admin-layout .customer-panel,
.trial-countdown-banner + .admin-layout .chat-workspace {
  height: calc(100vh - 164px);
}
.trial-login-cta {
  display: block;
  margin: 10px 0;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
}
.trial-selected-plan {
  border: 1px solid #c4b5fd;
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
}
.trial-plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.trial-public-plan {
  border-color: #8b5cf6 !important;
  background: linear-gradient(160deg, #fff, #f5f3ff) !important;
}
.trial-expired-alert {
  border: 1px solid #fecaca;
  background: linear-gradient(135deg, #fff1f2, #fff7ed);
}
@media (max-width: 1120px) {
  .trial-countdown-banner {
    grid-template-columns: 1fr auto;
  }
  .trial-upgrade {
    grid-column: 1 / -1;
    justify-self: stretch;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
  .trial-upgrade > span {
    margin: 0;
  }
  .trial-countdown-banner + .admin-layout,
  .trial-countdown-banner + .admin-layout .conversation-panel,
  .trial-countdown-banner + .admin-layout .customer-panel,
  .trial-countdown-banner + .admin-layout .chat-workspace {
    height: calc(100vh - 205px);
  }
}
@media (max-width: 760px) {
  .trial-countdown-banner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }
  .trial-clock {
    justify-content: center;
  }
  .trial-clock div {
    min-width: 48px;
  }
  .trial-upgrade {
    grid-column: auto;
    display: block;
  }
  .trial-upgrade > span {
    margin-bottom: 7px;
    text-align: center;
  }
  .trial-upgrade div {
    justify-content: center;
  }
  .trial-upgrade a {
    flex: 1;
    text-align: center;
  }
  .trial-countdown-banner + .admin-layout,
  .trial-countdown-banner + .admin-layout .conversation-panel,
  .trial-countdown-banner + .admin-layout .customer-panel,
  .trial-countdown-banner + .admin-layout .chat-workspace {
    height: calc(100vh - 305px);
  }
  .trial-plan-grid {
    grid-template-columns: 1fr;
  }
}

/* Desktop/mobile hardening: navigasi panel, tabel, formulir, dan safe-area. */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  border: 0;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(2px);
}
.table-wrap,
.responsive-table {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
img,
video,
iframe {
  max-width: 100%;
}
input,
select,
textarea,
button {
  max-width: 100%;
}
.admin-content,
.admin-content > *,
.panel,
.admin-card,
.billing-shell,
.login-card {
  min-width: 0;
}
@supports (height: 100dvh) {
  .admin-layout {
    height: calc(100dvh - 68px);
  }
  .trial-countdown-banner + .admin-layout,
  .trial-countdown-banner + .admin-layout .conversation-panel,
  .trial-countdown-banner + .admin-layout .customer-panel,
  .trial-countdown-banner + .admin-layout .chat-workspace {
    height: calc(100dvh - 164px);
  }
}
@media (max-width: 1120px) {
  @supports (height: 100dvh) {
    .trial-countdown-banner + .admin-layout,
    .trial-countdown-banner + .admin-layout .conversation-panel,
    .trial-countdown-banner + .admin-layout .customer-panel,
    .trial-countdown-banner + .admin-layout .chat-workspace {
      height: calc(100dvh - 205px);
    }
  }
}
@media (max-width: 900px) {
  .nav-open .mobile-nav-backdrop {
    display: block;
  }
  .admin-sidebar {
    top: 68px;
    height: calc(100dvh - 68px);
    overflow-y: auto;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    box-shadow: 18px 0 40px rgba(2, 6, 23, 0.25);
  }
  .admin-content {
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .content-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  .admin-form-grid,
  .settings-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .admin-topbar {
    min-width: 0;
    gap: 8px;
    padding-inline: max(9px, env(safe-area-inset-left)) max(9px, env(safe-area-inset-right));
  }
  .admin-logo {
    min-width: 0;
  }
  .admin-logo strong,
  .page-title,
  .agent-presence > div,
  .owner-livechat-btn,
  .presence-dot {
    display: none;
  }
  .agent-presence {
    margin-left: auto;
    gap: 7px;
  }
  .agent-presence > a:last-child {
    white-space: nowrap;
    font-size: 12px;
  }
  .admin-sidebar {
    top: 60px;
    height: calc(100dvh - 60px);
  }
  .admin-layout {
    height: calc(100dvh - 60px);
  }
  .admin-content {
    padding: 14px 12px max(22px, env(safe-area-inset-bottom));
  }
  .admin-content h1 {
    font-size: clamp(22px, 7vw, 30px);
  }
  .panel,
  .admin-card,
  .metric-card {
    padding: 14px;
  }
  .content-head > a,
  .content-head > button {
    width: 100%;
    text-align: center;
  }
  .landing-nav {
    padding-inline: 14px;
  }
  .landing-hero h1 {
    font-size: clamp(32px, 10vw, 43px);
  }
  .hero-actions {
    align-items: stretch;
  }
  .hero-actions a {
    text-align: center;
  }
  .login-page {
    align-items: flex-start;
    overflow-y: auto;
    padding: max(18px, env(safe-area-inset-top)) 12px max(18px, env(safe-area-inset-bottom));
  }
  .login-card {
    width: 100%;
  }
  @supports (height: 100dvh) {
    .trial-countdown-banner + .admin-layout,
    .trial-countdown-banner + .admin-layout .conversation-panel,
    .trial-countdown-banner + .admin-layout .customer-panel,
    .trial-countdown-banner + .admin-layout .chat-workspace {
      height: max(320px, calc(100dvh - 305px));
    }
  }
}
@media (max-width: 380px) {
  .admin-logo strong {
    display: none;
  }
  .trial-clock div {
    min-width: 42px;
    padding-inline: 4px;
  }
  .trial-clock b {
    font-size: 17px;
  }
}

/* Mobile polish v411: LiveChat jelas, tombol rapi, dan nyaman disentuh. */
@media (max-width: 600px) {
  .floating-widget,
  .floating-widget.left {
    inset: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
  .widget-head {
    min-height: 64px;
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  }
  .widget-head > div:nth-child(2) {
    min-width: 0;
  }
  .widget-head strong,
  .widget-head small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .widget-head strong {
    font-size: 15px;
  }
  .widget-head button,
  .mobile-nav-toggle,
  .mobile-list-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    display: inline-grid;
    place-items: center;
  }
  .start-view.compact {
    padding: 20px 16px max(24px, env(safe-area-inset-bottom));
  }
  .start-view.compact h2 {
    margin-top: 2px;
    font-size: clamp(22px, 7vw, 28px);
    line-height: 1.2;
  }
  .start-view.compact > p {
    margin-bottom: 18px;
    line-height: 1.55;
  }
  .start-view.compact form {
    display: grid;
    gap: 13px;
  }
  .start-view.compact label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 750;
  }
  .start-view.compact input,
  .start-view.compact select {
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 11px 12px;
    font-size: 16px;
  }
  .start-view.compact .primary-btn {
    width: 100%;
    min-height: 48px;
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .messages {
    padding: 12px 10px;
  }
  .msg-row .message-stack {
    max-width: 88%;
  }
  .bubble {
    max-width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
  }
  .message-form {
    gap: 7px;
    padding: 8px 9px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid #e2e8f0;
  }
  .message-form .emoji-trigger,
  .message-form .attach-btn,
  .message-form > button {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
  }
  .message-form textarea {
    min-height: 44px;
    max-height: 112px;
    padding: 10px 11px;
    font-size: 16px !important;
    line-height: 1.4;
    border-radius: 12px;
  }
  .enter-hint {
    display: none;
  }
  .upload-status,
  .typing-hint {
    padding-inline: 12px;
    font-size: 12px;
  }
  .end-chat-link {
    min-height: 36px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    font-size: 12px;
  }
}

@media (max-width: 760px) {
  .admin-topbar {
    position: relative;
    z-index: 60;
  }
  .mobile-nav-toggle {
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 20px;
  }
  .topbar-avatar {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }
  .admin-sidebar a {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 11px 13px;
    line-height: 1.35;
  }
  .conversation-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
  }
  .conversation-items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
  .conversation-item {
    min-height: 76px;
    padding: 11px 12px;
  }
  .list-tabs a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .workspace-header {
    display: block;
    min-height: 0;
    padding: 9px 10px;
  }
  .workspace-header > div:first-child {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
  }
  .workspace-header > div:first-child strong,
  .workspace-header > div:first-child small {
    grid-column: 2;
  }
  .workspace-header > div:first-child .mobile-list-btn {
    grid-column: 1;
    grid-row: 1 / span 2;
  }
  .workspace-header small {
    max-width: none;
    white-space: normal;
    line-height: 1.35;
  }
  .workspace-actions {
    width: 100%;
    max-width: none;
    margin-top: 8px;
    padding: 1px 0 4px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .workspace-actions::-webkit-scrollbar {
    display: none;
  }
  .workspace-actions > *,
  .workspace-actions button,
  .workspace-actions a {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }
  .operator-messages {
    padding: 10px 9px;
  }
  .operator-message-form {
    gap: 7px;
    padding: 8px 9px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid #e2e8f0;
  }
  .composer-tools {
    width: 100%;
    gap: 6px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .composer-tools::-webkit-scrollbar {
    display: none;
  }
  .composer-tools button,
  .composer-tools select,
  .operator-attach-btn {
    flex: 0 0 auto;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
  .operator-message-form textarea {
    min-height: 46px;
    padding: 10px 11px;
    font-size: 16px !important;
  }
  .operator-message-form > button {
    min-width: 64px;
    min-height: 46px;
    padding: 0 12px;
  }
  .filter-grid,
  .report-filter,
  .popup-form-actions,
  .form-actions,
  .seo-tools {
    display: grid;
    grid-template-columns: 1fr;
  }
  .filter-grid .btn,
  .report-filter .btn,
  .popup-form-actions .btn,
  .popup-form-actions button,
  .form-actions .btn,
  .form-actions button {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .template-actions,
  .account-head-actions,
  .account-state-actions form {
    gap: 8px;
    flex-wrap: wrap;
  }
  .template-actions a,
  .template-actions button,
  .account-head-actions button,
  .account-state-actions button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .billing-shell > header {
    gap: 10px;
  }
  .wallet-box {
    align-items: stretch;
    flex-direction: column;
  }
  .wallet-box button {
    width: 100%;
    min-height: 44px;
    margin-left: 0;
  }
}

@media (max-width: 380px) {
  .message-form {
    gap: 5px;
    padding-inline: 6px;
  }
  .message-form .emoji-trigger,
  .message-form .attach-btn,
  .message-form > button {
    flex-basis: 40px;
    width: 40px;
    min-width: 40px;
    height: 42px;
    min-height: 42px;
  }
  .admin-content {
    padding-inline: 9px;
  }
  .panel,
  .admin-card,
  .metric-card {
    padding: 12px;
  }
}

/* V412: LiveChat mobile terlihat langsung dan topbar tetap rapi. */
.owner-livechat-btn {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 136px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .agent-presence {
    flex: 0 0 auto;
    min-width: 0;
  }
  .owner-livechat-btn {
    max-width: 116px;
    padding-inline: 9px !important;
    font-size: 12px;
  }
}
@media (max-width: 760px) {
  .owner-livechat-btn {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center;
    flex: 0 0 40px;
    overflow: hidden;
    font-size: 0 !important;
    line-height: 1;
  }
  .owner-livechat-btn::before {
    content: "💬";
    font-size: 18px;
    line-height: 1;
  }
  .owner-livechat-btn::first-letter {
    font-size: 0;
  }
  .agent-presence .topbar-avatar {
    width: 38px;
    min-width: 38px;
    height: 38px;
    display: inline-flex !important;
    flex: 0 0 38px;
  }
  .agent-presence > a:last-child {
    max-width: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (max-width: 600px) {
  body.mobile-direct #chatWidget,
  body.embed-mode.mobile-direct #chatWidget {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1001 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    visibility: visible;
  }
  body.mobile-direct #minimizeChat,
  body.embed-mode.mobile-direct #minimizeChat {
    display: none !important;
  }
}

/* V413: alur Inbox mobile — daftar tampil dulu, chat tampil setelah dipilih. */
@media (max-width: 760px) {
  .inbox-grid {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #f8fafc;
  }
  .conversation-panel {
    position: absolute !important;
    inset: 0 !important;
    z-index: 10;
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    display: flex !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #fff;
  }
  .conversation-items {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .chat-workspace {
    position: absolute !important;
    inset: 0 !important;
    z-index: 20;
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    transform: translateX(100%) !important;
    visibility: hidden;
    background: #fff;
  }
  body.has-selected-chat .chat-workspace {
    transform: none !important;
    visibility: visible;
  }
  body.show-conversation-list .chat-workspace,
  body.has-selected-chat.show-conversation-list .chat-workspace {
    transform: translateX(100%) !important;
    visibility: hidden;
  }
  .mobile-list-btn {
    display: inline-grid !important;
    place-items: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #dbe3ef;
    border-radius: 11px;
    background: #f8fafc;
    color: #334155;
    font-size: 23px;
    line-height: 1;
  }
  .workspace-empty {
    display: none;
  }
  .mini-stats,
  .list-tabs {
    flex: 0 0 auto;
  }
}
@supports (height: 100svh) {
  @media (max-width: 760px) {
    .inbox-grid {
      height: 100%;
    }
  }
}
