:root {
  --spmb-primary: #38bdf8;
  --spmb-primary-dark: #0284c7;
  --spmb-soft: #e0f2fe;
  --spmb-green: #22c55e;
  --spmb-bg: #f7fbff;
  --spmb-text: #0f172a;
  --spmb-muted: #64748b;
  --spmb-border: #dbeafe;
}
* {
  box-sizing: border-box;
}
body {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  background: linear-gradient(180deg, #effaff 0%, #fff 40%, #f8fafc 100%);
  color: var(--spmb-text);
  min-height: 100vh;
}
a {
  text-decoration: none;
}
.bg-spmb {
  background: linear-gradient(135deg, var(--spmb-primary), #7dd3fc);
}
.text-spmb {
  color: var(--spmb-primary-dark);
}
.navbar {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.86) !important;
  border-bottom: 1px solid rgba(186, 230, 253, 0.75);
}
.hero-card,
.glass-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(186, 230, 253, 0.75);
  box-shadow: 0 20px 60px rgba(2, 132, 199, 0.1);
  border-radius: 28px;
}
.hero-card {
  overflow: hidden;
}
.rounded-4xl {
  border-radius: 2rem;
}
.btn-spmb {
  --bs-btn-bg: var(--spmb-primary-dark);
  --bs-btn-border-color: var(--spmb-primary-dark);
  --bs-btn-hover-bg: #0369a1;
  --bs-btn-hover-border-color: #0369a1;
  --bs-btn-color: #fff;
}
.btn-soft {
  background: var(--spmb-soft);
  color: #075985;
  border: 1px solid #bae6fd;
}
.btn-soft:hover {
  background: #bae6fd;
  color: #075985;
}
.form-control,
.form-select,
.select2-container--bootstrap-5 .select2-selection {
  border-color: #cfe8ff;
  border-radius: 14px !important;
  min-height: 44px;
}
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.18);
  border-color: #7dd3fc;
}
.required:after {
  content: " *";
  color: #ef4444;
}
.mini-stat {
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.08);
}
.mini-stat .icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #e0f2fe;
  color: #0284c7;
}
.ticket-card {
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: #fff;
  transition: 0.2s;
  cursor: pointer;
}
.ticket-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(2, 132, 199, 0.12);
}
.badge-status {
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  font-weight: 700;
}
.status-menunggu {
  background: #fef3c7;
  color: #92400e;
}
.status-diproses {
  background: #dbeafe;
  color: #1d4ed8;
}
.status-dijawab {
  background: #dcfce7;
  color: #166534;
}
.status-selesai {
  background: #ccfbf1;
  color: #0f766e;
}
.status-ditolak {
  background: #fee2e2;
  color: #991b1b;
}
.chat-shell {
  height: 68vh;
  min-height: 480px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.chat-header {
  background: linear-gradient(135deg, #e0f2fe, #fff);
  border-bottom: 1px solid #dbeafe;
  padding: 16px 18px;
}
.chat-body {
  flex: 1;
  overflow: auto;
  padding: 18px;
  background:
    radial-gradient(
      circle at top left,
      rgba(56, 189, 248, 0.13),
      transparent 30%
    ),
    #f8fbff;
}
.chat-row {
  display: flex;
  margin-bottom: 14px;
}
.chat-row.me {
  justify-content: flex-end;
}
.chat-bubble {
  max-width: min(76%, 680px);
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}
.chat-row.me .chat-bubble {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #fff;
  border-color: #38bdf8;
  border-bottom-right-radius: 6px;
}
.chat-row.them .chat-bubble {
  border-bottom-left-radius: 6px;
}
.chat-meta {
  font-size: 0.78rem;
  opacity: 0.78;
  margin-bottom: 4px;
}
.chat-time {
  font-size: 0.72rem;
  opacity: 0.7;
  margin-top: 5px;
}
.attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(125, 211, 252, 0.65);
  border-radius: 999px;
  padding: 5px 10px;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.35);
}
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248, 250, 252, 0.76);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 0;
}
.loading-overlay.show {
  display: flex;
}
.empty-state {
  border: 2px dashed #bae6fd;
  border-radius: 22px;
  background: #f0f9ff;
  padding: 32px;
  text-align: center;
  color: #075985;
}
.table-responsive {
  border-radius: 20px;
  border: 1px solid #dbeafe;
  background: #fff;
}
.sidebar {
  background: #fff;
  border-right: 1px solid #dbeafe;
  min-height: 100vh;
}
.sidebar .nav-link {
  border-radius: 14px;
  color: #334155;
  font-weight: 600;
}
.sidebar .nav-link.active,
.sidebar .nav-link:hover {
  background: #e0f2fe;
  color: #0369a1;
}
.login-card {
  max-width: 460px;
  margin: auto;
}
.small-muted {
  font-size: 0.88rem;
  color: var(--spmb-muted);
}
body.dark {
  background: #08111f;
  color: #e2e8f0;
}
body.dark .navbar,
body.dark .glass-card,
body.dark .mini-stat,
body.dark .ticket-card,
body.dark .chat-shell,
body.dark .table-responsive,
body.dark .sidebar {
  background: #0f172a !important;
  color: #e2e8f0;
  border-color: #1e3a5f;
}
body.dark .chat-body {
  background: #0b1220;
}
body.dark .chat-bubble {
  background: #172033;
  color: #e2e8f0;
  border-color: #263b5a;
}
body.dark .form-control,
body.dark .form-select {
  background: #111827;
  color: #e5e7eb;
  border-color: #334155;
}
@media (max-width: 767px) {
  .chat-shell {
    height: 72vh;
    min-height: 420px;
  }
  .chat-bubble {
    max-width: 88%;
  }
  .hero-card {
    border-radius: 18px;
  }
  .sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #dbeafe;
  }
}
