/* =======================================================================
   Fanbel Owner — App (auth, dashboard, cards, forms, tables, toasts)
   ======================================================================= */

/* ----------- Buttons ----------- */
.fb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--fb-radius-pill);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fb-text);
  cursor: pointer;
  transition: var(--fb-transition);
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}
.fb-btn i { font-size: 16px; }
.fb-btn-block { width: 100%; }

.fb-btn-primary {
  background: linear-gradient(135deg, var(--fb-primary), var(--fb-primary-600));
  color: #fff;
  box-shadow: var(--fb-shadow-primary);
}
.fb-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(232, 74, 31, 0.32);
  color: #fff;
}

.fb-btn-ghost {
  background: rgba(232, 74, 31, 0.08);
  color: var(--fb-primary);
}
.fb-btn-ghost:hover { background: rgba(232, 74, 31, 0.16); color: var(--fb-primary-700); }

.fb-btn-danger {
  background: linear-gradient(135deg, var(--fb-red), #dc2626);
  color: #fff;
}
.fb-btn-danger:hover { transform: translateY(-2px); color: #fff; }

/* Spinner inside button */
.fb-btn-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: fb-spin 0.8s linear infinite;
}
.fb-btn.is-loading .fb-btn-spinner { display: inline-block; }
.fb-btn.is-loading .fb-btn-label { opacity: 0.6; }
@keyframes fb-spin { to { transform: rotate(360deg); } }

.fb-link {
  color: var(--fb-primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.fb-link:hover { border-bottom-color: var(--fb-primary); }

/* ----------- Form ----------- */
.fb-form { display: flex; flex-direction: column; gap: 16px; }
.fb-form-group { display: flex; flex-direction: column; gap: 6px; }
.fb-form-label { font-size: 13px; font-weight: 600; color: var(--fb-heading); }

.fb-form-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--fb-surface);
  border: 1.5px solid var(--fb-border);
  border-radius: var(--fb-radius-sm);
  transition: var(--fb-transition);
}
.fb-form-input-wrap:focus-within {
  border-color: var(--fb-primary);
  box-shadow: 0 0 0 4px var(--fb-primary-soft);
}
.fb-form-input-icon {
  padding: 0 12px;
  color: var(--fb-muted);
  font-size: 16px;
}
.fb-form-input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px 14px 12px 0;
  font-size: 14px;
  font-family: inherit;
  color: var(--fb-heading);
  outline: none;
  min-width: 0;
}
.fb-form-input::placeholder { color: var(--fb-muted); }

.fb-form-input-action {
  border: 0;
  background: transparent;
  padding: 0 12px;
  color: var(--fb-muted);
  font-size: 16px;
}
.fb-form-input-action:hover { color: var(--fb-primary); }

/* Checkbox */
.fb-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--fb-text);
  user-select: none;
}
.fb-checkbox input { display: none; }
.fb-checkbox-mark {
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--fb-border-strong);
  border-radius: 6px;
  background: #fff;
  color: transparent;
  font-size: 14px;
  transition: var(--fb-transition);
}
.fb-checkbox input:checked + .fb-checkbox-mark {
  background: var(--fb-primary);
  border-color: var(--fb-primary);
  color: #fff;
}
.fb-checkbox-label { line-height: 1.4; }

/* ----------- Auth Pages ----------- */
.fb-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  background:
    radial-gradient(1200px 600px at 0% 0%, var(--fb-primary-50), transparent 60%),
    radial-gradient(1000px 500px at 100% 100%, rgba(255, 0, 107, 0.06), transparent 60%),
    var(--fb-bg);
}
.fb-auth-back {
  position: fixed;
  top: 20px; left: 20px;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fb-surface);
  border-radius: 50%;
  color: var(--fb-text);
  box-shadow: var(--fb-shadow-sm);
  z-index: 5;
  font-size: 18px;
}
.fb-auth-back:hover { color: var(--fb-primary); transform: translateX(-3px); }

.fb-auth-card {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  background: var(--fb-surface);
  border-radius: var(--fb-radius-lg);
  box-shadow: var(--fb-shadow-lg);
  overflow: hidden;
  max-width: 920px;
  width: 100%;
  animation: fb-fade-up 0.6s ease both;
}
.fb-auth-card-narrow { grid-template-columns: 1fr; max-width: 520px; }
.fb-auth-card-narrow .fb-auth-illustration { display: none; }

.fb-auth-illustration {
  position: relative;
  background: linear-gradient(160deg, var(--fb-primary) 0%, var(--fb-primary-700) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 36px;
  overflow: hidden;
}
.fb-auth-illustration::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(400px 200px at 80% 20%, rgba(255, 255, 255, 0.18), transparent 60%),
    radial-gradient(300px 200px at 10% 80%, rgba(0, 0, 0, 0.18), transparent 60%);
  pointer-events: none;
}
.fb-auth-image {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  border-radius: var(--fb-radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.fb-auth-body { padding: 44px 40px; }
.fb-auth-body-center { text-align: center; padding: 48px 40px; }

.fb-auth-title { font-size: 26px; font-weight: 700; margin: 0 0 8px; }
.fb-auth-subtitle { color: var(--fb-paragraph); margin: 0 0 28px; }
.fb-auth-foot { text-align: center; margin: 22px 0 0; color: var(--fb-paragraph); font-size: 14px; }

.fb-error-code {
  font-size: 80px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--fb-primary), var(--fb-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

@media (max-width: 767.98px) {
  .fb-auth { padding: 16px 12px 28px; }
  .fb-auth-card {
    grid-template-columns: 1fr;
    grid-template-rows: 180px auto;
  }
  .fb-auth-illustration {
    display: flex;
    padding: 18px;
  }
  .fb-auth-image {
    max-width: 220px;
    max-height: 100%;
    object-fit: cover;
  }
  .fb-auth-body { padding: 28px 22px 32px; }
  .fb-auth-title { font-size: 22px; }
  .fb-auth-subtitle { margin-bottom: 22px; }
}

/* ----------- Page Head ----------- */
.fb-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.fb-page-title { font-size: 26px; font-weight: 700; margin: 0 0 4px; }
.fb-page-subtitle { color: var(--fb-paragraph); margin: 0; font-size: 14px; }

/* ----------- Welcome Card ----------- */
.fb-welcome-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  background: linear-gradient(135deg, var(--fb-primary) 0%, var(--fb-primary-700) 100%);
  color: #fff;
  border-radius: var(--fb-radius-lg);
  padding: 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--fb-shadow-primary);
}
.fb-welcome-card::before {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}
.fb-welcome-card::after {
  content: '';
  position: absolute; right: 100px; bottom: -100px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
}
.fb-welcome-content { position: relative; z-index: 1; }
.fb-welcome-eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 12px;
  border-radius: var(--fb-radius-pill);
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  font-weight: 500;
}
.fb-welcome-title { color: #fff; font-size: 30px; margin: 0 0 8px; }
.fb-welcome-text { color: rgba(255, 255, 255, 0.9); margin: 0 0 22px; max-width: 480px; }
.fb-welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fb-welcome-actions .fb-btn-ghost { background: rgba(255, 255, 255, 0.18); color: #fff; }
.fb-welcome-actions .fb-btn-ghost:hover { background: rgba(255, 255, 255, 0.28); color: #fff; }
.fb-welcome-actions .fb-btn-primary {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  color: #fff;
}
.fb-welcome-actions .fb-btn-primary:hover { background: rgba(255, 255, 255, 0.3); }

.fb-welcome-illustration { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; }
.fb-welcome-illustration img { max-width: 200px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.25)); }

@media (max-width: 767.98px) {
  .fb-welcome-card { grid-template-columns: 1fr; padding: 24px; }
  .fb-welcome-illustration { display: none; }
  .fb-welcome-title { font-size: 24px; }
}

/* ----------- Stat Grid ----------- */
.fb-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.fb-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  padding: 18px;
  transition: var(--fb-transition);
}
.fb-stat-card:hover { transform: translateY(-3px); box-shadow: var(--fb-shadow); }
.fb-stat-card-primary { background: linear-gradient(135deg, var(--fb-primary), var(--fb-primary-600)); color: #fff; border: 0; }
.fb-stat-card-primary .fb-stat-label,
.fb-stat-card-primary .fb-stat-trend { color: rgba(255, 255, 255, 0.85); }

.fb-stat-icon {
  width: 50px; height: 50px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--fb-radius);
  background: var(--fb-primary-soft);
  color: var(--fb-primary);
  font-size: 22px;
  flex-shrink: 0;
}
.fb-stat-icon-purple { background: var(--fb-purple-soft); color: var(--fb-purple); }
.fb-stat-icon-yellow { background: var(--fb-yellow-soft); color: var(--fb-yellow); }
.fb-stat-icon-blue   { background: var(--fb-blue-soft);   color: var(--fb-blue); }
.fb-stat-icon-green  { background: var(--fb-green-soft);  color: var(--fb-green); }

.fb-stat-card-primary .fb-stat-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.fb-stat-body { display: flex; flex-direction: column; min-width: 0; }
.fb-stat-label { font-size: 12px; color: var(--fb-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.fb-stat-value { font-size: 24px; font-weight: 700; color: var(--fb-heading); margin: 2px 0; }
.fb-stat-card-primary .fb-stat-value { color: #fff; }
.fb-stat-trend {
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.fb-trend-up   { color: var(--fb-green); }
.fb-trend-down { color: var(--fb-red); }
.fb-stat-card-primary .fb-trend-up   { color: #d1fae5; }
.fb-stat-card-primary .fb-trend-down { color: #fecaca; }

/* ----------- Section ----------- */
.fb-section { margin-bottom: 28px; }
.fb-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.fb-section-title { font-size: 18px; margin: 0; }
.fb-section-subtitle { font-size: 13px; color: var(--fb-muted); margin: 2px 0 0; }
.fb-section-link { font-size: 13px; font-weight: 600; color: var(--fb-primary); }
.fb-section-link:hover { color: var(--fb-primary-700); }

/* ----------- Quick Grid ----------- */
.fb-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.fb-quick-card {
  display: block;
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  padding: 18px;
  color: var(--fb-text);
  transition: var(--fb-transition);
}
.fb-quick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--fb-shadow);
  border-color: var(--fb-primary-100);
  color: var(--fb-text);
}
.fb-quick-icon {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--fb-radius);
  background: var(--fb-primary-soft);
  color: var(--fb-primary);
  font-size: 22px;
  margin-bottom: 12px;
}
.fb-quick-icon-purple { background: var(--fb-purple-soft); color: var(--fb-purple); }
.fb-quick-icon-yellow { background: var(--fb-yellow-soft); color: var(--fb-yellow); }
.fb-quick-icon-blue   { background: var(--fb-blue-soft);   color: var(--fb-blue); }
.fb-quick-icon-green  { background: var(--fb-green-soft);  color: var(--fb-green); }
.fb-quick-icon-gray   { background: var(--fb-gray-soft);   color: #64748b; }

.fb-quick-title { font-size: 15px; margin: 0 0 4px; }
.fb-quick-text  { font-size: 13px; color: var(--fb-paragraph); margin: 0 0 12px; line-height: 1.5; }
.fb-quick-link  { font-size: 13px; font-weight: 600; color: var(--fb-primary); display: inline-flex; align-items: center; gap: 4px; }
.fb-quick-card:hover .fb-quick-link { gap: 8px; }

/* ----------- Card ----------- */
.fb-card {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  overflow: hidden;
}
.fb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--fb-border);
  flex-wrap: wrap;
}
.fb-card-title { font-size: 15px; margin: 0; }
.fb-card-body { padding: 18px 20px; }
.fb-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ----------- List (key/value) ----------- */
.fb-list { display: flex; flex-direction: column; gap: 4px; }
.fb-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--fb-border);
  font-size: 14px;
}
.fb-list-item:last-child { border-bottom: 0; }
.fb-list-title { color: var(--fb-muted); font-weight: 500; }
.fb-list-text  { color: var(--fb-heading); font-weight: 500; }

/* ----------- Badges ----------- */
.fb-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--fb-radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--fb-primary-soft);
  color: var(--fb-primary);
}
.fb-badge-primary { background: var(--fb-primary-soft); color: var(--fb-primary); }
.fb-badge-purple  { background: var(--fb-purple-soft);  color: var(--fb-purple); }
.fb-badge-yellow  { background: var(--fb-yellow-soft);  color: #b45309; }
.fb-badge-blue    { background: var(--fb-blue-soft);    color: #1d4ed8; }
.fb-badge-green   { background: var(--fb-green-soft);   color: #047857; }
.fb-badge-cyan    { background: var(--fb-cyan-soft);    color: #0e7490; }
.fb-badge-red     { background: var(--fb-red-soft);     color: #b91c1c; }
.fb-badge-gray    { background: var(--fb-gray-soft);    color: #475569; }

/* ----------- Activity Feed ----------- */
.fb-activity { list-style: none; margin: 0; padding: 0; }
.fb-activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--fb-border);
  transition: var(--fb-transition);
}
.fb-activity-item:last-child { border-bottom: 0; }
.fb-activity-item:hover { background: var(--fb-surface-2); }
.fb-activity-avatar {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--fb-primary-soft);
  color: var(--fb-primary);
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
}
.fb-activity-avatar-primary { background: var(--fb-primary-soft); color: var(--fb-primary); }
.fb-activity-avatar-yellow  { background: var(--fb-yellow-soft);  color: #b45309; }
.fb-activity-avatar-purple  { background: var(--fb-purple-soft);  color: var(--fb-purple); }
.fb-activity-avatar-blue    { background: var(--fb-blue-soft);    color: #1d4ed8; }
.fb-activity-avatar-green   { background: var(--fb-green-soft);   color: #047857; }

.fb-activity-body { flex: 1; min-width: 0; }
.fb-activity-text { margin: 0; font-size: 14px; color: var(--fb-text); }
.fb-activity-time { font-size: 12px; color: var(--fb-muted); }

/* ----------- Settings Grid ----------- */
.fb-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

/* ----------- Table ----------- */
.fb-table-wrap {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  overflow: hidden;
}
.fb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.fb-table thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fb-muted);
  background: var(--fb-surface-2);
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--fb-border);
}
.fb-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--fb-border);
  color: var(--fb-text);
}
.fb-table tbody tr:last-child td { border-bottom: 0; }
.fb-table tbody tr { transition: var(--fb-transition); }
.fb-table tbody tr:hover { background: var(--fb-primary-soft); }

.fb-table-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius-pill);
  padding: 4px 6px 4px 14px;
  margin-bottom: 16px;
  max-width: 360px;
}
.fb-table-search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  padding: 10px 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--fb-heading);
}
.fb-table-search i { color: var(--fb-muted); }

@media (max-width: 767.98px) {
  .fb-table thead { display: none; }
  .fb-table tbody td { display: block; padding: 8px 16px; }
  .fb-table tbody td:first-child { padding-top: 14px; font-weight: 600; }
  .fb-table tbody td:last-child { padding-bottom: 14px; }
  .fb-table tbody tr { display: block; border-bottom: 6px solid var(--fb-bg); }
}

/* ----------- Toast helper (non-Swal) ----------- */
.fb-toast-stack {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}
.fb-toast {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-left: 4px solid var(--fb-primary);
  border-radius: var(--fb-radius);
  padding: 14px 16px;
  box-shadow: var(--fb-shadow);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: fb-slide-in 0.3s ease;
  font-size: 14px;
}
.fb-toast-success { border-left-color: var(--fb-green); }
.fb-toast-error   { border-left-color: var(--fb-red); }
.fb-toast-warning { border-left-color: var(--fb-yellow); }
.fb-toast-info    { border-left-color: var(--fb-blue); }
.fb-toast.is-leaving { animation: fb-slide-out 0.3s ease forwards; }
.fb-toast i { font-size: 18px; }
.fb-toast-success i { color: var(--fb-green); }
.fb-toast-error i   { color: var(--fb-red); }
.fb-toast-warning i { color: var(--fb-yellow); }
.fb-toast-info i    { color: var(--fb-blue); }

@keyframes fb-slide-in {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes fb-slide-out {
  to { transform: translateX(120%); opacity: 0; }
}

/* ----------- Empty state ----------- */
.fb-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--fb-muted);
}
.fb-empty i { font-size: 48px; opacity: 0.5; }
.fb-empty p { margin-top: 10px; font-size: 14px; }

/* ----------- Alert (DB error etc.) ----------- */
.fb-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--fb-radius);
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.fb-alert i { font-size: 22px; flex-shrink: 0; }
.fb-alert strong { display: block; margin-bottom: 2px; }
.fb-alert code {
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.fb-alert-danger {
  background: #fff5f5;
  color: #9b1c1c;
  border-color: #fecaca;
}
.fb-alert-danger i { color: var(--fb-red, #ef4444); }

/* ----------- Table empty state ----------- */
.fb-table-empty {
  text-align: center !important;
  padding: 40px 20px !important;
  color: var(--fb-muted);
}
.fb-table-empty i { display: block; font-size: 32px; opacity: 0.4; margin-bottom: 8px; }
.fb-table-empty span { font-size: 13px; }

/* ----------- Red stat icon (used by sparepart/dokumentasi pages) ----------- */
.fb-stat-icon-red { background: var(--fb-red-soft); color: var(--fb-red); }

/* ----------- Placeholder card (coming soon modules) ----------- */
.fb-placeholder-card { padding: 0; }
.fb-placeholder-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px 56px;
}
.fb-placeholder-icon {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  font-size: 40px;
  margin-bottom: 18px;
  background: var(--fb-primary-soft);
  color: var(--fb-primary);
}
.fb-placeholder-icon-purple { background: var(--fb-purple-soft); color: var(--fb-purple); }
.fb-placeholder-icon-yellow { background: var(--fb-yellow-soft); color: var(--fb-yellow); }
.fb-placeholder-icon-green  { background: var(--fb-green-soft);  color: var(--fb-green); }
.fb-placeholder-icon-blue   { background: var(--fb-blue-soft);   color: var(--fb-blue); }
.fb-placeholder-icon-red    { background: var(--fb-red-soft);    color: var(--fb-red); }
.fb-placeholder-title { font-size: 20px; margin: 0 0 8px; }
.fb-placeholder-text  { color: var(--fb-paragraph); max-width: 540px; margin: 0 0 22px; line-height: 1.6; }
.fb-placeholder-text code { background: var(--fb-bg); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.fb-placeholder-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ----------- Truncated cell ----------- */
.fb-cell-truncate {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

/* Subtext inside a table cell (brand, code, etc.) */
.fb-cell-subtext {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--fb-muted);
  margin-top: 2px;
  font-weight: 500;
}
.fb-cell-subtext i { font-size: 11px; }

/* ----------- Report Card Grid (laporan) ----------- */
.fb-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.fb-report-card {
  display: flex;
  flex-direction: column;
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  overflow: hidden;
  transition: var(--fb-transition);
}
.fb-report-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--fb-shadow);
  border-color: var(--fb-primary-100);
}

.fb-report-photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--fb-surface-2);
  overflow: hidden;
  text-decoration: none;
}
.fb-report-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.fb-report-photo:hover img { transform: scale(1.04); }
.fb-report-photo-badge {
  position: absolute;
  top: 10px; left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.95);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--fb-radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  backdrop-filter: blur(4px);
}
.fb-report-photo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(160deg, var(--fb-surface-2) 0%, var(--fb-bg) 100%);
  color: var(--fb-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: default;
}
.fb-report-photo-empty i { font-size: 32px; }

.fb-report-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  flex: 1;
}
.fb-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.fb-report-plate {
  font-size: 18px;
  font-weight: 700;
  color: var(--fb-heading);
  margin: 0;
  letter-spacing: 0.3px;
  word-break: break-word;
}
.fb-report-date {
  font-size: 12px;
  color: var(--fb-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-weight: 500;
}

.fb-report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  color: var(--fb-text);
}
.fb-report-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fb-report-meta-item i { color: var(--fb-primary); font-size: 14px; }
.fb-report-meta-item .fb-meta-label {
  font-size: 11px;
  color: var(--fb-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}
.fb-report-meta-item strong { color: var(--fb-heading); font-weight: 600; }

.fb-report-desc {
  margin: 0;
  font-size: 14px;
  color: var(--fb-text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.fb-report-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fb-primary);
  text-decoration: none;
}
.fb-report-action:hover { color: var(--fb-primary-700); gap: 10px; }

/* Mobile: 1-column cards, hide date next to plate (put it inline below) */
@media (max-width: 575.98px) {
  .fb-report-grid { grid-template-columns: 1fr; gap: 14px; }
  .fb-report-photo { aspect-ratio: 16 / 10; }
  .fb-report-head { flex-direction: column; gap: 4px; }
  .fb-report-date { font-size: 11px; }
  .fb-report-body { padding: 14px; gap: 8px; }
  .fb-report-plate { font-size: 17px; }
  .fb-report-desc { font-size: 13px; -webkit-line-clamp: 3; line-clamp: 3; }
}

/* ----------- Subtitle sentence-case: only first letter of subtitle upper ----------- */
/* This is the existing behavior (page subtitle in views uses sentence case).
   We just expose a helper class to make labels more readable on mobile. */
.fb-stat-label { font-size: 12px; }

/* ----------- Back link (detail pages) ----------- */
.fb-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fb-muted);
  text-decoration: none;
  margin-bottom: 6px;
  transition: var(--fb-transition);
}
.fb-back-link:hover {
  color: var(--fb-primary);
  gap: 9px;
}

/* ----------- Chip (status / meta inline tag) ----------- */
.fb-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--fb-radius-pill);
  background: var(--fb-surface-2);
  color: var(--fb-text);
  border: 1px solid var(--fb-border);
  margin-right: 6px;
  margin-top: 4px;
}
.fb-chip i { font-size: 12px; }
.fb-chip-green   { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.fb-chip-blue    { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.fb-chip-gray    { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.fb-chip-yellow  { background: #fef3c7; color: #92400e; border-color: #fde68a; }

/* ----------- Details / Disclosure (collapsible "Lihat Semua") ----------- */
.fb-details {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.fb-details-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fb-heading);
  user-select: none;
  transition: background 0.15s ease;
}
.fb-details-summary::-webkit-details-marker { display: none; }
.fb-details-summary:hover { background: var(--fb-surface-2); }
.fb-details-summary i.bi { font-size: 16px; color: var(--fb-primary); }
.fb-details-chevron {
  margin-left: auto !important;
  color: var(--fb-muted) !important;
  transition: transform 0.2s ease;
}
.fb-details[open] .fb-details-chevron { transform: rotate(180deg); }
.fb-details-body {
  padding: 0 16px 16px 16px;
  border-top: 1px solid var(--fb-border);
  margin-top: -1px;
}

/* Mobile: tighten detail-page header */
@media (max-width: 575.98px) {
  .fb-back-link { font-size: 12px; }
  .fb-page-title { font-size: 22px; }
  .fb-chip { font-size: 11px; padding: 3px 8px; }
}

/* ----------- Dokumentasi card grid (mobile-first) ----------- */
.fb-dok-filterbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.fb-dok-search {
  position: relative;
  display: flex;
  align-items: center;
}
.fb-dok-search i {
  position: absolute;
  left: 14px;
  color: var(--fb-muted);
  font-size: 16px;
  pointer-events: none;
}
.fb-dok-search input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  background: var(--fb-surface);
  font-size: 14px;
  color: var(--fb-heading);
  transition: var(--fb-transition);
}
.fb-dok-search input:focus {
  outline: none;
  border-color: var(--fb-primary);
  box-shadow: 0 0 0 4px var(--fb-primary-soft);
}

.fb-dok-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fb-chip-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--fb-radius-pill);
  background: var(--fb-surface);
  color: var(--fb-text);
  border: 1px solid var(--fb-border);
  cursor: pointer;
  transition: var(--fb-transition);
  font-family: inherit;
  white-space: nowrap;
}
.fb-chip-filter i { font-size: 12px; }
.fb-chip-filter:hover {
  background: var(--fb-primary-soft);
  border-color: var(--fb-primary-100);
  color: var(--fb-primary);
}
.fb-chip-filter.is-active {
  background: var(--fb-primary);
  color: #fff;
  border-color: var(--fb-primary);
  box-shadow: 0 4px 12px var(--fb-primary-soft);
}
.fb-chip-filter.is-active .fb-chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.fb-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  background: var(--fb-surface-2);
  color: var(--fb-muted);
  border-radius: var(--fb-radius-pill);
}

/* Card grid */
.fb-dok-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* Empty state when filter has no match */
.fb-dok-empty {
  text-align: center;
  padding: 40px 16px;
  background: var(--fb-surface);
  border: 1px dashed var(--fb-border);
  border-radius: var(--fb-radius);
  color: var(--fb-muted);
}
.fb-dok-empty i { font-size: 36px; display: block; margin-bottom: 8px; }

/* Individual card */
.fb-dok-card {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  overflow: hidden;
  transition: var(--fb-transition);
}
.fb-dok-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(232, 74, 31, 0.12);
  border-color: var(--fb-primary-100);
}
.fb-dok-card-link {
  display: block;
  padding: 16px;
  text-decoration: none;
  color: inherit;
}

/* Card head: icon + title + status badge */
.fb-dok-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.fb-dok-card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  font-size: 22px;
  flex-shrink: 0;
  background: var(--fb-primary-soft);
  color: var(--fb-primary);
}
.fb-dok-icon-alat   { background: #FFF4E5; color: #E84A1F; }
.fb-dok-icon-mobil  { background: #E3F2FD; color: #1E5A8E; }
.fb-dok-icon-mjr    { background: #F3E5F5; color: #7B1FA2; }
.fb-dok-icon-bengkel{ background: #ECEFF1; color: #455A64; }
.fb-dok-icon-ponton { background: #E0F7FA; color: #00838F; }
.fb-dok-icon-proyek { background: #FFF3E0; color: #E65100; }
.fb-dok-icon-lainnya{ background: var(--fb-primary-soft); color: var(--fb-primary); }

.fb-dok-card-title-wrap {
  flex: 1;
  min-width: 0;
}
.fb-dok-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--fb-heading);
  margin: 0 0 2px 0;
  line-height: 1.25;
  word-break: break-word;
}
.fb-dok-card-kategori {
  font-size: 11px;
  color: var(--fb-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fb-dok-card-kategori i { font-size: 10px; }

.fb-chip-status {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  flex-shrink: 0;
}
.fb-chip-status-green { background: #D1FAE5; color: #065F46; }
.fb-chip-status-blue  { background: #DBEAFE; color: #1E40AF; }

/* Meta row: pengemudi, no_wa, count_perbaikan */
.fb-dok-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--fb-border);
}
.fb-dok-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--fb-text);
}
.fb-dok-card-meta-item i { color: var(--fb-muted); font-size: 12px; }

/* 3-metric grid (pengeluaran, jam, transaksi) */
.fb-dok-card-metrics {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: 6px;
  margin-bottom: 12px;
}
.fb-dok-metric {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  background: var(--fb-surface-2);
  border-radius: var(--fb-radius-sm);
  min-width: 0;
}
.fb-dok-metric-primary { background: var(--fb-primary-soft); }
.fb-dok-metric i { font-size: 16px; color: var(--fb-primary); flex-shrink: 0; }
.fb-dok-metric:not(.fb-dok-metric-primary) i { color: var(--fb-muted); }
.fb-dok-metric-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fb-dok-metric-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--fb-heading);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-dok-metric-label {
  font-size: 9.5px;
  color: var(--fb-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  margin-top: 1px;
}

/* Progress bar */
.fb-dok-bar-wrap {
  display: flex;
  align-items: center;
  height: 6px;
  background: var(--fb-surface-2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}
.fb-dok-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fb-primary) 0%, var(--fb-accent) 100%);
  border-radius: 3px;
  transition: width 0.6s ease;
}
.fb-dok-bar-empty {
  height: auto;
  padding: 6px 10px;
  background: transparent;
  color: var(--fb-muted);
  font-size: 11px;
  text-align: center;
  font-weight: 500;
}
.fb-dok-bar-empty i { margin-right: 3px; }

/* Footer: id + action */
.fb-dok-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.fb-dok-card-id {
  color: var(--fb-muted);
  font-weight: 600;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px;
}
.fb-dok-card-action {
  color: var(--fb-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--fb-transition);
}
.fb-dok-card:hover .fb-dok-card-action { gap: 8px; }

/* Tablet & desktop: 2/3 column */
@media (min-width: 576px) {
  .fb-dok-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .fb-dok-filterbar { flex-direction: row; align-items: center; }
  .fb-dok-search { flex: 1; max-width: 320px; }
}
@media (min-width: 992px) {
  .fb-dok-grid { grid-template-columns: repeat(3, 1fr); }
  .fb-dok-filterbar { gap: 12px; }
  .fb-dok-search { max-width: 380px; }
}

/* Mobile: 1-col cards, tighter padding */
@media (max-width: 575.98px) {
  .fb-dok-card-link { padding: 14px; }
  .fb-dok-card-icon { width: 42px; height: 42px; font-size: 18px; }
  .fb-dok-card-title { font-size: 15px; }
  .fb-dok-card-metrics { grid-template-columns: 1fr 1fr; }
  .fb-dok-metric:last-child { grid-column: 1 / -1; }
  .fb-dok-metric-value { font-size: 11.5px; }
}

/* ----------- List Transaksi: timeline per hari ----------- */
.fb-trx-search-form {
  display: flex;
  flex: 1;
  max-width: 380px;
}
.fb-trx-search-form .fb-dok-search { width: 100%; }

.fb-dok-filters-divider {
  width: 1px;
  height: 20px;
  background: var(--fb-border);
  margin: 0 4px;
  align-self: center;
}

.fb-trx-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fb-trx-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.fb-trx-toolbar-hint {
  font-size: 12px;
  color: var(--fb-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.fb-trx-toolbar-hint i { font-size: 13px; }
.fb-trx-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fb-btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  min-height: 32px;
}
.fb-btn-sm i { font-size: 12px; }

/* Reset details/summary defaults */
.fb-trx-day {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  overflow: hidden;
  transition: var(--fb-transition);
}
.fb-trx-day[open] { border-color: var(--fb-primary-100); }
.fb-trx-day[open] > .fb-trx-day-head { border-bottom: 1px solid var(--fb-border); }
.fb-trx-day > summary::-webkit-details-marker { display: none; }
.fb-trx-day > summary { list-style: none; cursor: pointer; }
.fb-trx-day > summary:focus { outline: none; }
.fb-trx-day > summary:focus-visible {
  outline: 2px solid var(--fb-primary);
  outline-offset: -2px;
}

.fb-trx-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--fb-surface);
  transition: background 0.15s ease;
  user-select: none;
}
.fb-trx-day-head:hover { background: var(--fb-primary-soft); }
.fb-trx-day[open] > .fb-trx-day-head {
  background: linear-gradient(135deg, var(--fb-primary-soft) 0%, var(--fb-surface) 100%);
}

.fb-trx-day-date {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.fb-trx-day-chevron {
  font-size: 14px;
  color: var(--fb-primary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.fb-trx-day[open] > .fb-trx-day-head .fb-trx-day-chevron {
  transform: rotate(90deg);
}
.fb-trx-day-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--fb-heading);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-trx-date-long {
  font-size: 11px;
  color: var(--fb-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.fb-trx-day-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}
.fb-trx-day-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--fb-text);
}
.fb-trx-day-count i { color: var(--fb-primary); font-size: 13px; }
.fb-trx-day-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--fb-radius-pill);
  white-space: nowrap;
}
.fb-trx-day-chip i { font-size: 11px; }
.fb-trx-day-masuk  { background: #D1FAE5; color: #065F46; }
.fb-trx-day-keluar { background: #FEF3C7; color: #92400E; }

.fb-trx-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fb-trx-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--fb-border);
  transition: background 0.15s ease;
}
.fb-trx-item:last-child { border-bottom: 0; }
.fb-trx-item:hover { background: var(--fb-primary-soft); }

.fb-trx-item-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-size: 17px;
  flex-shrink: 0;
  background: var(--fb-primary-soft);
  color: var(--fb-primary);
}
.fb-trx-icon-gudang    { background: #FFF4E5; color: #E84A1F; }
.fb-trx-icon-sparepart { background: #E3F2FD; color: #1E5A8E; }
.fb-trx-icon-jasa      { background: #F3E5F5; color: #7B1FA2; }
.fb-trx-icon-kantor    { background: #E0F2F1; color: #00695C; }
.fb-trx-icon-bengkel   { background: #ECEFF1; color: #455A64; }
.fb-trx-icon-storing   { background: #FFEBEE; color: #C62828; }

.fb-trx-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fb-trx-item-row1 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.fb-trx-item-nama {
  font-size: 14px;
  font-weight: 600;
  color: var(--fb-heading);
  word-break: break-word;
  flex: 1;
  min-width: 0;
}
.fb-trx-item-harga {
  font-size: 14px;
  font-weight: 700;
  color: var(--fb-primary);
  white-space: nowrap;
}
.fb-trx-item-row2 {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 11.5px;
  color: var(--fb-muted);
}
.fb-trx-item-meta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.fb-trx-item-meta i { font-size: 10.5px; }

.fb-trx-item-status {
  flex-shrink: 0;
  font-size: 11px;
  padding: 4px 8px;
  align-self: flex-start;
}

/* Orphan barang: ID exists in transaksi but not in barang master (deleted) */
.fb-trx-item-orphan {
  color: var(--fb-muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: help;
}
.fb-trx-item-orphan i {
  color: #B45309; /* amber-700 for warning */
  font-size: 12px;
}

.fb-trx-loadmore {
  text-align: center;
  margin-top: 18px;
  padding: 16px;
  background: var(--fb-surface);
  border: 1px dashed var(--fb-border);
  border-radius: var(--fb-radius);
}
.fb-trx-loadmore-text {
  font-size: 13px;
  color: var(--fb-muted);
  margin-bottom: 10px;
}

/* ----------- Pagination ----------- */
.fb-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 22px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.fb-page-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--fb-surface);
  color: var(--fb-text);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius-pill);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--fb-transition);
  white-space: nowrap;
  min-height: 38px;
}
.fb-page-link i { font-size: 14px; }
.fb-page-link:hover {
  background: var(--fb-primary-soft);
  border-color: var(--fb-primary-100);
  color: var(--fb-primary);
}
.fb-page-link.is-disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

.fb-page-numbers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.fb-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  background: var(--fb-surface);
  color: var(--fb-text);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--fb-transition);
}
.fb-page-num:hover {
  background: var(--fb-primary-soft);
  border-color: var(--fb-primary-100);
  color: var(--fb-primary);
}
.fb-page-num.is-active {
  background: var(--fb-primary);
  color: #fff;
  border-color: var(--fb-primary);
  box-shadow: 0 4px 10px var(--fb-primary-soft);
}
.fb-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 38px;
  color: var(--fb-muted);
  font-weight: 600;
  font-size: 14px;
}
.fb-pagination-meta {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--fb-muted);
  margin: 6px 0 0 0;
}

@media (max-width: 575.98px) {
  .fb-pagination { gap: 6px; }
  .fb-page-link span, .fb-page-link-next span { display: none; }
  .fb-page-link-prev span, .fb-page-link-next i { display: inline; }
  .fb-page-link { padding: 8px 10px; }
  .fb-page-num { min-width: 34px; height: 34px; font-size: 12px; }
  .fb-page-ellipsis { height: 34px; }
}

@media (max-width: 575.98px) {
  .fb-trx-day-head { padding: 10px 12px; gap: 8px; }
  .fb-trx-day-label { font-size: 13.5px; }
  .fb-trx-date-long { display: none; } /* hide long date on mobile */
  .fb-trx-day-summary { width: 100%; }
  .fb-trx-day-summary .fb-trx-day-chip { font-size: 11px; padding: 3px 8px; }
  .fb-trx-item { padding: 10px 14px; gap: 10px; }
  .fb-trx-item-icon { width: 34px; height: 34px; font-size: 15px; border-radius: 8px; }
  .fb-trx-item-nama { font-size: 13.5px; }
  .fb-trx-item-harga { font-size: 13.5px; }
  .fb-trx-item-status { font-size: 10px; padding: 3px 6px; }
}

/* ----------- Mobile: tighten topbar title font on very small screens ----------- */
@media (max-width: 380px) {
  .fb-topbar-title { font-size: 15px; }
  .fb-page-title { font-size: 20px; }
  .fb-page-subtitle { font-size: 12.5px; }
  .fb-stat-value { font-size: 20px; }
  .fb-stat-icon { width: 42px; height: 42px; font-size: 18px; }
}
