/* =========================================================
   TEMA BERSAMA (Admin, User, Auth)
   Konsep: modern, permukaan berlapis, aksen bergradasi halus,
   bayangan bertingkat, dan gerak mikro yang tenang.
   Dimuat SETELAH <style> bawaan halaman agar menimpanya.
   ========================================================= */

:root {
  color-scheme: light;

  /* Aksen: satu hue utama + turunannya supaya tetap kalem */
  --t-accent: #4f46e5;
  --t-accent-2: #7c3aed;
  --t-accent-3: #06b6d4;
  --t-accent-grad: linear-gradient(135deg, #4f46e5, #7c3aed);
  --t-accent-soft: rgba(79, 70, 229, 0.09);
  --t-accent-softer: rgba(79, 70, 229, 0.045);
  --t-accent-line: rgba(79, 70, 229, 0.26);
  --t-accent-ring: rgba(79, 70, 229, 0.16);

  /* Warna status, dipakai badge & tombol */
  --t-ok: #059669;
  --t-warn: #d97706;
  --t-bad: #e11d48;
  --t-info: #0891b2;

  /* Skala radius & spasi konsisten */
  --t-radius-sm: 10px;
  --t-radius: 14px;
  --t-radius-lg: 20px;
  --t-radius-xl: 26px;
  --t-gap: 20px;

  /* Bayangan bertingkat: dekat + jauh, bukan satu blur besar */
  --t-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --t-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 2px 6px -2px rgba(16, 24, 40, 0.06),
    0 16px 32px -22px rgba(16, 24, 40, 0.28);
  --t-shadow-hover:
    0 1px 2px rgba(16, 24, 40, 0.05),
    0 6px 14px -6px rgba(16, 24, 40, 0.1),
    0 26px 46px -26px rgba(16, 24, 40, 0.36);
  --t-shadow-pop: 0 32px 70px -28px rgba(16, 24, 40, 0.42);
  --t-glow: 0 8px 22px -10px rgba(79, 70, 229, 0.55);

  --t-surface: #ffffff;
  --t-surface-2: #f5f6f9;
  --t-surface-3: #eef0f5;
  --t-line: #e6e8ee;
  --t-line-soft: rgba(16, 24, 40, 0.06);
  --t-text: #14171d;
  --t-muted: #697086;

  --t-page: #f3f4f8;
  --t-mesh-1: rgba(79, 70, 229, 0.1);
  --t-mesh-2: rgba(6, 182, 212, 0.08);

  --t-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-bs-theme="dark"] {
  color-scheme: dark;

  --t-accent: #8b8fff;
  --t-accent-2: #a78bfa;
  --t-accent-3: #22d3ee;
  --t-accent-grad: linear-gradient(135deg, #6366f1, #8b5cf6);
  --t-accent-soft: rgba(139, 143, 255, 0.12);
  --t-accent-softer: rgba(139, 143, 255, 0.06);
  --t-accent-line: rgba(139, 143, 255, 0.28);
  --t-accent-ring: rgba(139, 143, 255, 0.22);

  --t-ok: #34d399;
  --t-warn: #fbbf24;
  --t-bad: #fb7185;
  --t-info: #38bdf8;

  --t-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
  --t-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 2px 8px -2px rgba(0, 0, 0, 0.5),
    0 20px 38px -24px rgba(0, 0, 0, 0.9);
  --t-shadow-hover:
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 8px 18px -8px rgba(0, 0, 0, 0.6),
    0 30px 54px -28px rgba(0, 0, 0, 0.95);
  --t-shadow-pop: 0 38px 80px -30px rgba(0, 0, 0, 0.95);
  --t-glow: 0 8px 24px -10px rgba(99, 102, 241, 0.7);

  --t-surface: #161a22;
  --t-surface-2: #1c212b;
  --t-surface-3: #232935;
  --t-line: #2a3140;
  --t-line-soft: rgba(255, 255, 255, 0.06);
  --t-text: #e8eaf0;
  --t-muted: #98a1b3;

  --t-page: #0d1016;
  --t-mesh-1: rgba(99, 102, 241, 0.16);
  --t-mesh-2: rgba(34, 211, 238, 0.09);
}

/* ---------- Dasar ---------- */
body {
  font-family:
    "Poppins",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0.1px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

/* Latar: warna dasar + dua mesh lembut di sudut, tetap tenang */
[data-bs-theme="light"] body,
html[data-bs-theme="light"] body,
[data-bs-theme="dark"] body {
  --bs-body-bg: var(--t-page);
  --bs-body-color: var(--t-text);
  background-color: var(--t-page);
  color: var(--t-text);
  background-image:
    radial-gradient(58rem 32rem at 100% -8%, var(--t-mesh-1), transparent 62%),
    radial-gradient(48rem 30rem at -8% 104%, var(--t-mesh-2), transparent 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: -0.32px;
  font-weight: 700;
}
h4 {
  font-size: 1.28rem;
}
h5 {
  font-size: 1.06rem;
}
p {
  color: inherit;
}
a {
  text-decoration: none;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(120, 132, 165, 0.32);
  border-radius: 20px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 132, 165, 0.6);
  background-clip: padding-box;
}
::selection {
  background: var(--t-accent-ring);
}

:focus-visible {
  outline: 2px solid var(--t-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Sidebar ---------- */
.sidebar,
[data-bs-theme="dark"] .sidebar,
[data-bs-theme="light"] .sidebar {
  background: color-mix(in srgb, var(--t-surface) 86%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-right: 1px solid var(--t-line);
  box-shadow: 1px 0 0 var(--t-line-soft);
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.sidebar-header,
[data-bs-theme="dark"] .sidebar-header {
  background: var(--t-surface) !important;
  border-bottom: 1px solid var(--t-line);
  padding: 16px 20px;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.sidebar-header h4 {
  margin-bottom: 0;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.3px;
  background: var(--t-accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--t-accent);
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-sidebar-close {
  background: transparent;
  border: none;
  color: var(--t-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--t-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: 0.2s var(--t-ease);
}
.btn-sidebar-close:hover {
  background: var(--t-surface-2);
  color: var(--t-text);
}

@media (min-width: 992px) {
  .btn-sidebar-close {
    display: none !important;
  }
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 12px 0 28px;
}

.sidebar-menu::-webkit-scrollbar {
  width: 5px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: var(--t-line, #cbd5e1);
  border-radius: 10px;
}
.nav-item {
  margin: 2px 12px;
}

.nav-link {
  position: relative;
  color: var(--t-muted);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: var(--t-radius-sm);
  transition:
    background-color 0.2s var(--t-ease),
    color 0.2s var(--t-ease),
    padding-left 0.2s var(--t-ease);
}
.nav-link i {
  color: var(--t-muted);
  transition:
    color 0.2s var(--t-ease),
    transform 0.2s var(--t-ease);
}

.nav-link:hover,
[data-bs-theme="dark"] .nav-link:hover {
  background: var(--t-surface-2);
  color: var(--t-text);
  padding-left: 17px;
  transform: none;
}
.nav-link:hover i {
  color: var(--t-accent);
  transform: scale(1.08);
}

[data-bs-theme="dark"] .nav-link {
  color: var(--t-muted);
}

/* Menu aktif: isi lembut + penanda bergradasi di tepi */
.nav-link.active,
[data-bs-theme="dark"] .nav-link.active,
[data-bs-theme="light"] .nav-link.active {
  background: linear-gradient(
    90deg,
    var(--t-accent-soft),
    var(--t-accent-softer)
  ) !important;
  color: var(--t-accent) !important;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--t-accent-line);
}
.nav-link.active i {
  color: var(--t-accent) !important;
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 18%;
  height: 64%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--t-accent-grad);
  box-shadow: var(--t-glow);
}

/* Netralkan warna inline mencolok pada menu tertentu */
.sidebar .nav-link[style] {
  color: var(--t-muted) !important;
}
.sidebar .nav-link[style].active {
  color: var(--t-accent) !important;
}

.sidebar-menu .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-menu .nav-link i {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* ---------- Topbar ---------- */
.topbar,
[data-bs-theme="dark"] .topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 32px;
  min-height: 68px;
  background: color-mix(in srgb, var(--t-surface) 78%, transparent);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  border-bottom: 1px solid var(--t-line);
  position: sticky;
  top: 0;
  z-index: 1030;
}

@media (max-width: 991.98px) {
  .topbar,
  [data-bs-theme="dark"] .topbar {
    padding: 12px 16px;
    min-height: 60px;
  }
}

.btn-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--t-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--t-muted);
  transition: 0.2s var(--t-ease);
}
.btn-toggle:hover {
  background: var(--t-surface-2);
  color: var(--t-accent);
}

/* ---------- Kartu ---------- */
.card-custom,
[data-bs-theme="dark"] .card-custom,
[data-bs-theme="light"] .card-custom,
.stat-box,
[data-bs-theme="dark"] .stat-box {
  position: relative;
  background: var(--t-surface);
  border: 1px solid var(--t-line);
  border-radius: var(--t-radius-lg);
  box-shadow: var(--t-shadow);
  transition:
    box-shadow 0.28s var(--t-ease),
    border-color 0.28s var(--t-ease),
    transform 0.28s var(--t-ease);
  margin-bottom: var(--t-gap);
}

/* Garis kilau tipis di sisi atas: memberi kesan material, bukan kotak polos */
.card-custom::before,
.stat-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  pointer-events: none;
}
[data-bs-theme="dark"] .card-custom::before,
[data-bs-theme="dark"] .stat-box::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
}

.card-custom:hover,
.stat-box:hover {
  border-color: var(--t-accent-line);
  box-shadow: var(--t-shadow-hover);
  transform: translateY(-2px);
}

.card-header-custom,
[data-bs-theme="dark"] .card-header-custom {
  background: transparent;
  border-bottom: 1px solid var(--t-line);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.15px;
  padding: 16px 20px;
}
.card-body {
  padding: 20px;
}

.stat-box {
  overflow: hidden;
  padding: 20px 22px;
}
/* Cahaya sudut sangat halus, menggantikan lingkaran dekoratif lama */
.stat-box::after {
  content: "";
  display: block;
  position: absolute;
  top: -40%;
  right: -12%;
  width: 58%;
  height: 160%;
  background: radial-gradient(
    closest-side,
    var(--t-accent-soft),
    transparent 70%
  );
  pointer-events: none;
}

.stat-icon,
.icon-box {
  border-radius: var(--t-radius);
  box-shadow: var(--t-shadow-xs);
  background: var(--t-surface-2);
  color: var(--t-muted);
  transition: transform 0.28s var(--t-ease);
}
.stat-box:hover .stat-icon,
.stat-box:hover .icon-box,
.card-custom:hover .icon-box {
  transform: translateY(-1px) scale(1.04);
}
.icon-primary {
  background: var(--t-accent-soft) !important;
  color: var(--t-accent) !important;
}
.icon-success {
  background: color-mix(in srgb, var(--t-ok) 13%, transparent) !important;
  color: var(--t-ok) !important;
}
.icon-warning {
  background: color-mix(in srgb, var(--t-warn) 15%, transparent) !important;
  color: var(--t-warn) !important;
}
.icon-info {
  background: color-mix(in srgb, var(--t-info) 14%, transparent) !important;
  color: var(--t-info) !important;
}
.icon-danger {
  background: color-mix(in srgb, var(--t-bad) 13%, transparent) !important;
  color: var(--t-bad) !important;
}

/* ---------- Dompet / ringkasan saldo ---------- */
.wallet-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      120% 130% at 100% 0%,
      rgba(124, 58, 237, 0.55),
      transparent 58%
    ),
    radial-gradient(
      110% 120% at 0% 100%,
      rgba(6, 182, 212, 0.28),
      transparent 55%
    ),
    linear-gradient(135deg, #171c33, #0c1020);
  border-radius: var(--t-radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--t-shadow-hover);
  color: #fff;
}
/* Kilau diagonal tipis di permukaan kartu */
.wallet-card::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0) 42%
  );
  pointer-events: none;
}
.wallet-card::after {
  content: "";
  display: block;
  position: absolute;
  bottom: -55%;
  right: -10%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(255, 255, 255, 0.1),
    transparent 70%
  );
  pointer-events: none;
}
.wallet-card > * {
  position: relative;
  z-index: 1;
}
.wallet-title {
  color: rgba(255, 255, 255, 0.72) !important;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  font-size: 11.5px;
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(2, 6, 23, 0.85);
}
.wallet-balance {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -1.2px;
  text-shadow:
    0 2px 14px rgba(2, 6, 23, 0.9),
    0 0 2px rgba(2, 6, 23, 0.7);
  font-variant-numeric: tabular-nums;
}
.wallet-card .btn-light {
  background: rgba(255, 255, 255, 0.96);
  border-color: transparent;
  color: #14171d !important;
  box-shadow: 0 8px 20px -12px rgba(0, 0, 0, 0.8);
}
.wallet-card .btn-light:hover {
  background: #fff;
  color: #14171d !important;
}
.wallet-card .btn-outline-light {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.wallet-card .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff !important;
}

/* ---------- Tombol ---------- */
.btn {
  position: relative;
  border-radius: var(--t-radius-sm);
  font-weight: 600;
  font-size: 14px;
  padding: 0.58rem 1.05rem;
  letter-spacing: 0.1px;
  transition:
    background 0.2s var(--t-ease),
    border-color 0.2s var(--t-ease),
    box-shadow 0.2s var(--t-ease),
    transform 0.2s var(--t-ease),
    filter 0.2s var(--t-ease);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0) scale(0.99);
}

.btn-primary {
  background: var(--t-accent-grad);
  border-color: transparent;
  box-shadow: var(--t-glow);
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--t-accent-grad);
  border-color: transparent;
  filter: brightness(1.08) saturate(1.05);
  box-shadow: 0 12px 28px -12px rgba(79, 70, 229, 0.7);
}

.btn-outline-primary {
  border-color: var(--t-accent-line);
  color: var(--t-accent);
  background: var(--t-accent-softer);
}
.btn-outline-primary:hover {
  background: var(--t-accent-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--t-glow);
}

.btn-success {
  background: var(--t-ok);
  border-color: transparent;
  color: #fff;
}
.btn-danger {
  background: var(--t-bad);
  border-color: transparent;
  color: #fff;
}
.btn-warning {
  background: var(--t-warn);
  border-color: transparent;
  color: #fff !important;
}
.btn-info {
  background: var(--t-info);
  border-color: transparent;
  color: #fff;
}
.btn-success:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-info:hover {
  filter: brightness(1.08);
}

.btn-light,
.btn-secondary {
  background: var(--t-surface-2);
  border-color: var(--t-line);
  color: var(--t-text);
}
.btn-light:hover,
.btn-secondary:hover {
  background: var(--t-surface-3);
  border-color: var(--t-accent-line);
  color: var(--t-text);
}

.btn-lg {
  border-radius: var(--t-radius);
  padding: 0.82rem 1.25rem;
  font-size: 15px;
}
.btn-sm {
  border-radius: 9px;
  padding: 0.36rem 0.78rem;
  font-size: 12.5px;
}
.rounded-pill,
.rounded-custom-pill,
.rounded-pill-custom {
  border-radius: 50rem !important;
}
.btn:disabled,
.btn.disabled {
  filter: grayscale(0.35);
  box-shadow: none;
  transform: none;
}

/* ---------- Form ---------- */
.form-control,
.form-select {
  border-radius: var(--t-radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--t-line);
  background: var(--t-surface);
  color: var(--t-text);
  box-shadow: inset 0 1px 2px var(--t-line-soft);
  transition:
    border-color 0.2s var(--t-ease),
    box-shadow 0.2s var(--t-ease),
    background-color 0.2s var(--t-ease);
}
.form-control:hover,
.form-select:hover {
  border-color: color-mix(in srgb, var(--t-accent) 34%, var(--t-line));
}
.form-control:focus,
.form-select:focus {
  border-color: var(--t-accent);
  box-shadow: 0 0 0 4px var(--t-accent-ring);
  background: var(--t-surface);
}
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background: var(--t-surface-2);
  border-color: var(--t-line);
  color: var(--t-text);
}
[data-bs-theme="dark"] .form-control::placeholder {
  color: var(--t-muted);
}
.form-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--t-muted);
  margin-bottom: 6px;
}
.input-group-text {
  border-radius: var(--t-radius-sm);
  border-color: var(--t-line);
  background: var(--t-surface-2);
  color: var(--t-muted);
}
.form-check-input:checked {
  background-color: var(--t-accent);
  border-color: var(--t-accent);
}
.form-check-input:focus {
  border-color: var(--t-accent);
  box-shadow: 0 0 0 4px var(--t-accent-ring);
}

/* ---------- Tabel ---------- */
.table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}
.table thead th {
  background: var(--t-surface-2);
  color: var(--t-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--t-line);
}
[data-bs-theme="dark"] .table thead th,
[data-bs-theme="dark"] .table-light {
  background: var(--t-surface-2) !important;
  color: var(--t-muted) !important;
}
.table tbody tr {
  transition: background-color 0.16s var(--t-ease);
}
.table tbody tr:hover > * {
  background: var(--t-accent-softer);
}
.table tbody td {
  border-color: var(--t-line);
  padding: 14px 16px;
  font-size: 13.5px;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------- Badge (lembut, tidak menyala) ---------- */
.badge {
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.3px;
  border-radius: 7px;
  padding: 0.4em 0.72em;
  border: 1px solid transparent;
}
.badge.bg-primary {
  background: var(--t-accent-soft) !important;
  color: var(--t-accent) !important;
  border-color: var(--t-accent-line);
}
.badge.bg-success {
  background: color-mix(in srgb, var(--t-ok) 14%, transparent) !important;
  color: var(--t-ok) !important;
  border-color: color-mix(in srgb, var(--t-ok) 32%, transparent);
}
.badge.bg-danger {
  background: color-mix(in srgb, var(--t-bad) 14%, transparent) !important;
  color: var(--t-bad) !important;
  border-color: color-mix(in srgb, var(--t-bad) 32%, transparent);
}
.badge.bg-warning {
  background: color-mix(in srgb, var(--t-warn) 16%, transparent) !important;
  color: var(--t-warn) !important;
  border-color: color-mix(in srgb, var(--t-warn) 34%, transparent);
}
.badge.bg-info {
  background: color-mix(in srgb, var(--t-info) 14%, transparent) !important;
  color: var(--t-info) !important;
  border-color: color-mix(in srgb, var(--t-info) 32%, transparent);
}
.badge.bg-secondary,
.badge.bg-light,
.badge.bg-dark {
  background: var(--t-surface-2) !important;
  color: var(--t-muted) !important;
  border-color: var(--t-line);
}

/* ---------- Alert ---------- */
.alert {
  border-radius: var(--t-radius);
  border: 1px solid var(--t-line);
  border-left: 3px solid var(--t-accent);
  background: var(--t-surface-2);
  color: var(--t-text);
}
.alert.bg-info-subtle,
.alert.bg-primary-subtle,
.alert.bg-warning-subtle,
.alert.bg-danger-subtle {
  background: var(--t-surface-2) !important;
  color: var(--t-muted) !important;
  border: 1px solid var(--t-line) !important;
}
.alert.bg-warning-subtle {
  border-left: 3px solid var(--t-warn) !important;
}
.alert.bg-danger-subtle {
  border-left: 3px solid var(--t-bad) !important;
}
.alert.bg-info-subtle {
  border-left: 3px solid var(--t-info) !important;
}

/* ---------- Modal ---------- */
.modal-content {
  border-radius: var(--t-radius-xl);
  background: var(--t-surface);
  border: 1px solid var(--t-line);
  box-shadow: var(--t-shadow-pop);
  overflow: hidden;
}
.modal-header {
  border-bottom: 1px solid var(--t-line);
  background: transparent !important;
  padding: 16px 20px;
}
.modal-header .modal-title {
  color: var(--t-text) !important;
  font-size: 15px;
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  border-top: 1px solid var(--t-line);
  background: var(--t-surface-2);
}
.modal-backdrop.show {
  opacity: 1;
  background: rgba(8, 11, 18, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* ---------- Kartu produk & hub ---------- */
.product-card,
.reseller-hub-card,
.store-product-card {
  border-radius: var(--t-radius-lg);
  border: 1px solid var(--t-line) !important;
  transition:
    border-color 0.26s var(--t-ease),
    box-shadow 0.26s var(--t-ease),
    transform 0.26s var(--t-ease);
}
/* Selektor dilingkupi [data-bs-theme] agar tidak kalah dari
   `[data-bs-theme="dark"] .border` yang ada di bawah berkas ini. */
[data-bs-theme] .product-card:hover,
[data-bs-theme] .reseller-hub-card:hover,
[data-bs-theme] .store-product-card:hover {
  transform: translateY(-3px);
  border-color: var(--t-accent-line) !important;
  box-shadow: var(--t-shadow-hover);
}
[data-bs-theme] .store-product-card.is-selected {
  border-color: var(--t-accent) !important;
  box-shadow:
    0 0 0 3px var(--t-accent-ring),
    var(--t-shadow-hover) !important;
}
.store-selected-badge {
  background: var(--t-accent-grad) !important;
  box-shadow: var(--t-glow);
}

/* ---------- Etalase: kepala langkah ---------- */
.store-step-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.store-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--t-shadow-xs);
}
/* ---------- Etalase: kotak cari & urutkan ---------- */
.store-tools {
  flex: 1 1 auto;
  justify-content: flex-end;
}
.store-search {
  position: relative;
  flex: 1 1 200px;
  max-width: 260px;
  min-width: 0;
}
.store-search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--t-muted);
  pointer-events: none;
  transition: color 0.2s var(--t-ease);
}
.store-search input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 32px;
  border-radius: 999px;
  background: var(--t-surface-2);
  border: 1px solid var(--t-line);
  color: var(--t-text);
  font-size: 12.5px;
  outline: none;
  transition:
    border-color 0.2s var(--t-ease),
    box-shadow 0.2s var(--t-ease),
    background 0.2s var(--t-ease);
}
.store-search input::placeholder {
  color: var(--t-muted);
}
.store-search input:focus {
  background: var(--t-surface);
  border-color: var(--t-accent);
  box-shadow: 0 0 0 3px var(--t-accent-ring);
}
.store-search input:focus ~ .store-search-icon,
.store-search:focus-within .store-search-icon {
  color: var(--t-accent);
}
/* Silang hanya muncul saat ada teks; kelas ditambah oleh filterStoreProducts(). */
.store-search-clear {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%) scale(0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--t-surface-3);
  color: var(--t-muted);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.18s var(--t-ease),
    transform 0.18s var(--t-ease),
    color 0.18s var(--t-ease);
}
.store-search.has-text .store-search-clear {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  pointer-events: auto;
}
.store-search-clear:hover {
  color: var(--t-text);
}
.store-sort {
  height: 38px;
  flex: 0 0 auto;
  padding: 0 32px 0 14px;
  border-radius: 999px;
  background-color: var(--t-surface-2);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2398a1b3'%3e%3cpath d='M8 11 3.5 6h9L8 11z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  border: 1px solid var(--t-line);
  color: var(--t-text);
  font-size: 12.5px;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  transition:
    border-color 0.2s var(--t-ease),
    box-shadow 0.2s var(--t-ease);
}
.store-sort:focus {
  border-color: var(--t-accent);
  box-shadow: 0 0 0 3px var(--t-accent-ring);
}

/* Hasil cari kosong. */
.store-empty {
  padding: 48px 16px;
  text-align: center;
  border-radius: var(--t-radius-lg);
  border: 1px dashed var(--t-line);
  background: var(--t-surface-2);
}
.store-empty > i {
  font-size: 28px;
  color: var(--t-muted);
  opacity: 0.5;
  margin-bottom: 12px;
}

/* ---------- Etalase: kartu produk ---------- */
.store-product-card {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
  position: relative;
}
.store-product-card .store-selected-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  margin: 0 !important;
}
.store-card-body {
  padding: 14px 14px 12px;
  flex: 1 1 auto;
}
.store-card-title {
  font-size: 14px;
  line-height: 1.35;
}
.store-egg {
  font-size: 11px;
  color: var(--t-muted);
  margin-top: 3px;
}

/* Kisi spesifikasi: angka menonjol, label kecil di bawahnya. */
.store-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0;
  padding: 9px 0;
  border-top: 1px solid var(--t-line);
  border-bottom: 1px solid var(--t-line);
  text-align: center;
}
.store-spec-grid.store-spec-2 {
  grid-template-columns: repeat(2, 1fr);
}
.store-spec-grid > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
}
.store-spec-grid i {
  font-size: 12px;
  opacity: 0.9;
}
.store-spec-grid b {
  font-size: 12.5px;
  color: var(--t-text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-spec-grid span {
  font-size: 9.5px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--t-muted);
}

/* Label kecil seragam, menggantikan campuran badge Bootstrap. */
.store-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.store-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid transparent;
  line-height: 1.5;
}
.store-tag i {
  font-size: 9.5px;
}
.store-tag.tag-green {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
}
.store-tag.tag-blue {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.3);
}
.store-tag.tag-violet {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.3);
}
.store-tag.tag-amber {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
}
.store-tag.tag-red {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
}
.store-tag.tag-grey {
  color: var(--t-muted);
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.28);
}

/* Kaki kartu: harga kiri, ajakan aksi kanan. */
.store-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--t-surface-2);
  border-top: 1px solid var(--t-line);
}
.store-price {
  font-weight: 700;
  font-size: 15px;
  color: #34d399;
  line-height: 1.2;
}
.store-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}
.store-sold {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--t-muted);
}
.store-stars {
  color: #facc15;
  font-size: 9.5px;
  letter-spacing: 0.5px;
}
.store-stars-off {
  opacity: 0.28;
}
.store-pick-btn {
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--t-muted);
  border: 1px solid var(--t-line);
  transition:
    color 0.2s var(--t-ease),
    border-color 0.2s var(--t-ease),
    background 0.2s var(--t-ease);
}
.store-product-card:hover .store-pick-btn {
  color: #fff;
  background: var(--t-accent-grad);
  border-color: transparent;
}
.store-product-card.is-selected .store-pick-btn {
  color: #fff;
  background: var(--t-accent-grad);
  border-color: transparent;
}
/* Stok habis: kartu diredupkan tapi tetap bisa diklik agar alasannya terbaca. */
.store-card-off .store-card-body {
  opacity: 0.55;
}
.store-card-off .store-pick-btn {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
}
.store-card-off:hover .store-pick-btn {
  background: none;
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
}

/* ---------- Etalase: ringkasan pesanan ---------- */
.store-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: var(--t-radius);
  background: var(--t-surface-2);
  border: 1px solid var(--t-line);
  border-left: 3px solid var(--t-accent);
}
.store-desc {
  padding: 12px 14px;
  margin-bottom: 20px;
  border-radius: var(--t-radius);
  background: var(--t-surface-2);
  border: 1px solid var(--t-line);
  font-size: 12.5px;
  color: var(--t-muted);
  line-height: 1.6;
  /* Deskripsi produk bisa panjang; dibatasi tinggi agar tombol beli tetap terlihat. */
  max-height: 190px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* ---------- Etalase: judul kelompok field pesanan ---------- */
.store-field-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--t-line);
}
.store-field-head > i {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--t-surface-2);
  border: 1px solid var(--t-line);
  color: var(--t-accent);
  font-size: 13px;
}

/* ---------- Detail aset: kredensial akun ---------- */
.asset-cred {
  border: 1px solid var(--t-line);
  border-radius: var(--t-radius);
  overflow: hidden;
}
.asset-cred-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--t-surface-2);
  border-top: 1px solid var(--t-line);
}
.asset-cred-row:first-child {
  border-top: 0;
}
.asset-cred-key {
  flex: 0 0 88px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--t-muted);
}
.asset-cred-val {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--t-text);
  word-break: break-all;
}
.asset-detail-text {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--t-radius);
  background: var(--t-surface-2);
  border: 1px solid var(--t-line);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--t-text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
}
/* Cuplikan detail di tabel: satu baris, sisanya dipotong "…" biar kolom lain tak terdorong. */
.asset-detail-cut {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  /* Di layar sempit alat cari & urut tetap satu baris supaya kepala tak memakan tempat. */
  .store-tools {
    width: 100%;
  }
  .store-search {
    flex: 1 1 110px;
    max-width: none;
  }
  .store-sort {
    flex: 1 1 100px;
    min-width: 0;
    padding-left: 12px;
    font-size: 12px;
  }
  .store-spec-grid b {
    font-size: 11.5px;
  }
  /* Kredensial: label pindah ke atas nilai supaya nilai panjang tidak terpotong. */
  .asset-cred-row {
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .asset-cred-key {
    flex: 1 1 100%;
  }
  .asset-detail-cut {
    max-width: 150px;
  }
}

/* ---------- Chat ---------- */
.wa-container {
  border-radius: var(--t-radius-lg);
  border-color: var(--t-line);
  overflow: hidden;
  box-shadow: var(--t-shadow);
}
.wa-chat-body {
  background-color: var(--t-surface-2) !important;
}
.bubble {
  border-radius: var(--t-radius);
  font-size: 13.5px;
  box-shadow: var(--t-shadow-xs);
}
.bubble.admin {
  background: var(--t-surface) !important;
  color: var(--t-text) !important;
  border: 1px solid var(--t-line);
}
.bubble.user {
  background: var(--t-accent-grad) !important;
  color: #fff !important;
  border: 1px solid transparent;
}
.wa-chat-footer {
  background: var(--t-surface) !important;
  border-top: 1px solid var(--t-line) !important;
}

/* ---------- Konsol SSH ---------- */
.live-console,
[data-bs-theme="dark"] .live-console {
  border-radius: var(--t-radius);
  border-color: var(--t-line);
  box-shadow: inset 0 1px 0 var(--t-line-soft);
}
.job-card {
  border-radius: var(--t-radius-sm);
}

/* ---------- Transisi halaman ---------- */
.page-section {
  animation: tFadeUp 0.34s var(--t-ease) both;
}
@keyframes tFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Halaman auth ---------- */
.auth-card {
  position: relative;
  background: color-mix(in srgb, var(--t-surface) 92%, transparent) !important;
  backdrop-filter: blur(18px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
  border: 1px solid var(--t-line) !important;
  border-radius: var(--t-radius-xl) !important;
  box-shadow: var(--t-shadow-pop) !important;
  padding: 32px 28px !important;
  overflow: hidden;
}
/* Garis aksen bergradasi di puncak kartu login */
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--t-accent-grad);
}
.auth-logo-fallback {
  background: var(--t-accent-grad) !important;
  color: #fff !important;
  border-radius: var(--t-radius) !important;
  box-shadow: var(--t-glow);
}
/* Tombol Google punya warna inline putih: beri batas agar terlihat di tema terang */
.btn-google {
  background: var(--t-surface) !important;
  color: var(--t-text) !important;
  border: 1px solid var(--t-line) !important;
  border-radius: var(--t-radius-sm) !important;
  font-weight: 600;
  box-shadow: var(--t-shadow-xs);
}
.btn-google:hover {
  background: var(--t-surface-2) !important;
  border-color: var(--t-accent-line) !important;
  color: var(--t-text) !important;
  transform: translateY(-1px);
}
.divider {
  color: var(--t-muted);
}
.divider::before,
.divider::after {
  background: var(--t-line);
}
.btn-gradient {
  background: var(--t-accent-grad) !important;
  border: 0 !important;
  border-radius: var(--t-radius-sm) !important;
  font-weight: 600;
  color: #fff !important;
  box-shadow: var(--t-glow);
}
.btn-gradient:hover {
  filter: brightness(1.08) saturate(1.05);
  transform: translateY(-1px);
}
a.link-soft {
  color: var(--t-accent);
  transition: opacity 0.18s var(--t-ease);
}
a.link-soft:hover {
  color: var(--t-accent);
  opacity: 0.78;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Utility ---------- */
.fs-7 {
  font-size: 0.8125rem !important;
}
.text-grad {
  background: var(--t-accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--t-accent);
}
.text-body-secondary {
  color: var(--t-muted) !important;
}
hr {
  border-color: var(--t-line);
  opacity: 1;
}
.border,
[data-bs-theme="dark"] .border {
  border-color: var(--t-line) !important;
}
.shadow,
.shadow-sm,
.shadow-lg {
  box-shadow: var(--t-shadow) !important;
}
.content-wrapper {
  padding: 28px;
  max-width: 1400px;
  width: 100%;
}
.row > [class*="col-"] {
  margin-bottom: 0;
}
.dropdown-menu {
  border-radius: var(--t-radius);
  border: 1px solid var(--t-line);
  background: var(--t-surface);
  box-shadow: var(--t-shadow-hover);
  padding: 6px;
}
.dropdown-item {
  border-radius: 8px;
  font-size: 13.5px;
  padding: 8px 10px;
}
.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--t-accent-soft);
  color: var(--t-accent);
}
.nav-tabs {
  border-bottom-color: var(--t-line);
}
.nav-tabs .nav-link {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--t-muted);
}
.nav-tabs .nav-link:hover {
  padding-left: 14px;
  background: transparent;
}
.nav-tabs .nav-link.active {
  background: transparent !important;
  box-shadow: none;
  border-bottom-color: var(--t-accent);
  color: var(--t-accent) !important;
}
.nav-tabs .nav-link.active::before {
  display: none;
}
.progress {
  background: var(--t-surface-2);
  border-radius: 50rem;
}
.progress-bar {
  background: var(--t-accent-grad);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .btn:hover,
  .card-custom:hover,
  .stat-box:hover,
  .product-card:hover,
  .store-product-card:hover,
  .reseller-hub-card:hover {
    transform: none;
  }
}

@media (max-width: 991.98px) {
  .content-wrapper {
    padding: 18px 14px;
  }
  .card-custom,
  .stat-box {
    border-radius: var(--t-radius);
  }
  .card-body,
  .card-header-custom {
    padding: 16px;
  }
  .table tbody td,
  .table thead th {
    padding: 12px;
  }
  .wallet-card {
    border-radius: var(--t-radius-lg);
  }
  .auth-card {
    padding: 24px 20px !important;
  }
  /* Sidebar geser: matikan blur agar tidak berat di ponsel */
  .sidebar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--t-surface);
  }
}

/* =========================================================
   TAMPILAN SATU BARIS RAPI & ELIPSIS RESPONSIF (DPI/MOBILE/DESKTOP)
   Mencegah teks tabel/daftar terlipat berantakan (multi-line).
   ========================================================= */
.table th,
.table td {
  vertical-align: middle;
}
.table td.text-nowrap,
.table th.text-nowrap,
.table-nowrap th,
.table-nowrap td {
  white-space: nowrap !important;
}

.cell-truncate {
  display: inline-block;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.cell-truncate-xs {
  display: inline-block;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.cell-truncate-sm {
  display: inline-block;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.cell-truncate-md {
  display: inline-block;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.cell-truncate-lg {
  display: inline-block;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .cell-truncate,
  .cell-truncate-md {
    max-width: 150px;
  }
  .cell-truncate-lg {
    max-width: 200px;
  }
  .cell-truncate-sm {
    max-width: 120px;
  }
}
@media (max-width: 480px) {
  .cell-truncate,
  .cell-truncate-md {
    max-width: 110px;
  }
  .cell-truncate-lg {
    max-width: 140px;
  }
  .cell-truncate-sm {
    max-width: 90px;
  }
}

.cursor-pointer {
  cursor: pointer;
}
.hover-underline:hover {
  text-decoration: underline !important;
}

