body {
  background-color: #f4f6f9;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 250px;
  background: #075e54;
  color: #fff;
  z-index: 1040;
  transition: transform 0.25s ease;
  overflow-y: auto;
}
.sidebar .brand {
  padding: 1.1rem 1.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.sidebar .brand i {
  color: #25d366;
}
.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.65rem 1.25rem;
  border-left: 3px solid transparent;
}
.sidebar .nav-link i {
  width: 1.25rem;
  text-align: center;
  margin-right: 0.6rem;
}
.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  border-left-color: #25d366;
  color: #fff;
  font-weight: 500;
}
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1035;
  display: none;
}

.content-wrapper {
  margin-left: 250px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 0.75rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
  .content-wrapper {
    margin-left: 0;
  }
}

/* Shared components */
.card {
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.badge-online {
  background-color: #25d366;
}
.table td,
.table th {
  vertical-align: middle;
}
.spinner-wrap {
  min-height: 260px;
}

/* Login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #075e54;
}
.login-card {
  max-width: 380px;
  width: 100%;
}

/* QR scan page */
.qr-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f6f9;
}
.qr-card {
  max-width: 360px;
  width: 100%;
}
.qr-card img {
  border: 3px solid #25d366;
  border-radius: 10px;
  width: 240px;
  height: 240px;
}

/* Dashboard stat cards */
.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}
.stat-card .stat-label {
  font-size: 0.8rem;
  color: #6c757d;
}

/* Docs page */
.endpoint-card .method-badge {
  font-family: "SFMono-Regular", Consolas, monospace;
  min-width: 62px;
  text-align: center;
}
.endpoint-card pre {
  background: #0d1117;
  color: #c9d1d9;
  border-radius: 6px;
  padding: 0.9rem 1rem;
  position: relative;
  margin-bottom: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.endpoint-card .nav-tabs {
  border-bottom: none;
}
.endpoint-card .nav-tabs .nav-link {
  border: 1px solid #dee2e6;
  border-bottom: none;
  color: #495057;
}
.endpoint-card .nav-tabs .nav-link.active {
  background: #0d1117;
  color: #fff;
  border-color: #0d1117;
}
.btn-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

/* API keys page */
.token-value {
  font-size: 0.85rem;
}

/* Riwayat pesan — bubble ala WhatsApp */
.wa-chat-bg {
  background: #e5ddd5;
  border-radius: 8px;
  padding: 16px;
}
.wa-bubble {
  background: #dcf8c6;
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-block;
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  color: #111;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
.wa-bubble code {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 4px;
  border-radius: 3px;
  color: #111;
}
