:root {
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --page: #f5f7fb;
  --panel: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16845f;
  --danger: #c24136;
  --warning: #b7791f;
  --nav: #111827;
  --soft: #f8fafc;
  --soft-strong: #eef4ff;
  --shadow: rgba(15, 23, 42, .08);
  --dialog: #ffffff;
  --input-bg: #ffffff;
  --input-text: #1f2937;
  --table-hover: #f8fafc;
  --bs-body-bg: var(--page);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-secondary-color: var(--muted);
  --bs-primary: var(--primary);
  color-scheme: light;
}

[data-theme="dark"] {
  --ink: #f8fafc;
  --muted: #cbd5e1;
  --line: #334155;
  --page: #0f172a;
  --panel: #1e293b;
  --primary: #3b82f6;
  --primary-dark: #60a5fa;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --nav: #020617;
  --soft: #162033;
  --soft-strong: #172554;
  --shadow: rgba(2, 6, 23, .34);
  --dialog: #1e293b;
  --input-bg: #0f172a;
  --input-text: #f8fafc;
  --table-hover: #172033;
  --bs-body-bg: var(--page);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-secondary-color: var(--muted);
  --bs-primary: var(--primary);
  color-scheme: dark;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background-color .2s ease, color .2s ease;
}

button,
.btn,
.nav-link,
.metric,
.list-group-item {
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}

button:active,
.btn:active,
.metric:active {
  transform: scale(1.035);
}

.app-navbar {
  background: #111827;
  color: #fff;
  box-shadow: 0 1px 12px rgba(15, 23, 42, .18);
}

.app-navbar .navbar-brand,
.app-navbar .nav-link,
.app-navbar span {
  color: #fff;
}

.app-navbar .nav-link {
  align-items: center;
  border: 0;
  background: transparent;
  display: inline-flex;
  gap: 6px;
  padding: .55rem .85rem;
}

.nav-alert-badge {
  align-items: center;
  background: #dc2626;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(220, 38, 38, .28);
  color: #fff !important;
  display: none;
  font-size: .68rem;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  min-height: 19px;
  min-width: 19px;
  padding: 2px 5px;
}

.nav-alert-badge.show {
  display: inline-flex;
}

.app-navbar .nav-link.has-nav-alert:hover .nav-alert-badge {
  transform: scale(1.08);
}

.app-navbar .nav-link.active {
  color: #9cc3ff;
}

.app-navbar .nav-link:hover {
  color: #bfdbfe;
  transform: translateY(-1px);
}

.app-menu-toggle {
  align-items: center;
  gap: 8px;
  border-color: rgba(255, 255, 255, .34);
  color: #fff;
  padding: 7px 10px;
}

.app-menu-toggle .menu-label {
  font-size: .88rem;
  font-weight: 800;
}

.app-shell {
  padding: 24px;
}

.app-credit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: calc(100vw - 32px);
  margin: 18px auto 0;
  padding: 10px 20px;
  border-radius: 14px;
  color: rgba(226, 232, 240, 0.62);
  background: rgba(30, 41, 59, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.14);
  font-size: 0.86rem;
  line-height: 1.2;
  text-align: center;
}

.app-credit strong {
  color: rgba(226, 232, 240, 0.86);
}

.app-credit-main {
  display: flex;
  margin-top: 34px;
  margin-bottom: 6px;
}

.view {
  display: none;
  opacity: 0;
  transform: translateX(14px);
}

.view.active {
  display: block;
  animation: viewSlideIn .24s ease both;
}

@keyframes viewSlideIn {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.app-brand img {
  width: 42px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.section-heading h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 750;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.panel:hover {
  box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.panel-title {
  font-weight: 750;
  margin-bottom: 12px;
}

.compact-panel {
  padding: 12px;
}

.compact-panel .panel-title {
  margin-bottom: 8px;
}

.soft-box {
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  background: #f8fafc;
  padding: 14px;
}


.tekno-return-filters {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px);
  gap: 10px;
  margin: 12px 0;
}

@media (max-width: 576px) {
  .tekno-return-filters {
    grid-template-columns: 1fr;
  }
}

.data-tools {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.data-tools .data-size {
  width: 76px;
}

.data-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.compact-panel .data-tools {
  grid-template-columns: 1fr auto;
}

.compact-panel .data-pager {
  justify-content: flex-end;
}

.compact-panel .list-data-tools {
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: center;
  margin-bottom: 12px;
}

.compact-panel .list-data-tools .form-control {
  height: 34px;
  border-radius: 10px;
  font-size: 0.84rem;
}

.compact-panel .list-data-tools .data-pager {
  gap: 6px;
}

.compact-panel .list-data-tools .data-prev,
.compact-panel .list-data-tools .data-next {
  padding: 4px 9px;
  font-size: 0.78rem;
  border-radius: 9px;
}

.app-notice {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 2000;
  background: #16a34a;
  color: #fff;
  border-radius: 16px;
  padding: 16px 22px;
  min-width: min(420px, calc(100vw - 32px));
  text-align: center;
  font-weight: 800;
  box-shadow: 0 22px 56px rgba(22, 163, 74, .28);
  opacity: 0;
  transform: translate(-50%, -44%) scale(.96);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.app-notice.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.app-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .42);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(4px);
  transition: opacity .18s ease;
}

.app-dialog-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.app-dialog {
  width: min(430px, 100%);
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 28px 72px rgba(15, 23, 42, .28);
  transform: translateY(12px) scale(.96);
  transition: transform .18s ease;
}

.app-dialog-backdrop.show .app-dialog {
  transform: translateY(0) scale(1);
}

.app-dialog-icon {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-weight: 900;
  font-size: 1.35rem;
}

.app-dialog-error .app-dialog-icon,
.app-dialog-danger .app-dialog-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.app-dialog h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
  color: #0f172a;
}

.app-dialog p {
  margin: 9px 0 0;
  color: #64748b;
  line-height: 1.45;
  white-space: pre-line;
}

.app-dialog-detail {
  width: 100%;
  max-height: 260px;
  overflow: auto;
  margin-top: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fafc;
  text-align: left;
}

.app-dialog-detail-row {
  padding: 10px 12px;
  border-bottom: 1px solid #e5edf7;
}

.app-dialog-detail-row:last-child {
  border-bottom: 0;
}

.app-dialog-detail-row strong,
.app-dialog-detail-row span {
  display: block;
}

.app-dialog-detail-row strong {
  color: #172033;
  font-size: .86rem;
}

.app-dialog-detail-row span {
  color: #64748b;
  font-size: .78rem;
  margin-top: 2px;
}

.app-dialog-input {
  margin-top: 14px;
  text-align: left;
  resize: vertical;
}

.app-dialog-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.app-dialog-actions .btn {
  min-width: 120px;
}

.app-dialog-actions-stack .btn {
  min-width: 150px;
}

.selected-site-bar {
  border: 1px solid #c8d5ea;
  background: #f8fafc;
  color: var(--muted);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: .92rem;
}

.selected-site-bar.selected {
  border-color: #8bb7ff;
  background: #eef4ff;
  color: var(--primary-dark);
  font-weight: 650;
}

.technician-native-select {
  display: none !important;
}

.technician-combobox {
  position: relative;
  min-width: 0;
}

.technician-search.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 .2rem rgba(239, 68, 68, .14);
}

.technician-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1200;
  display: none;
  max-height: 270px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, .18);
}

.technician-combobox.open .technician-results {
  display: grid;
  gap: 4px;
}

.technician-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 9px 10px;
  text-align: left;
  color: #0f172a;
}

.technician-option:hover,
.technician-option:focus {
  background: #eef4ff;
}

.technician-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.technician-option em {
  align-self: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: .74rem;
  font-style: normal;
  font-weight: 800;
}

.technician-option small {
  grid-column: 1 / -1;
  color: #64748b;
}

.technician-empty {
  padding: 10px;
  color: #64748b;
  font-size: .9rem;
}

.out-site {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
  background: #fff;
}

.out-site.active {
  border-color: #6aa5ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.import-template {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
  font-size: .88rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  text-align: left;
  color: inherit;
  width: 100%;
}

.metric-click {
  cursor: pointer;
}

.metric-click:hover {
  border-color: #8bb7ff;
  box-shadow: 0 16px 38px rgba(37, 99, 235, .12);
  transform: translateY(-2px);
}

.metric span {
  color: var(--muted);
  font-size: .86rem;
}

.metric strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
  margin-top: 8px;
}

.list-group-item:hover {
  background: #f8fafc;
}

.skeleton-card,
.skeleton-line {
  position: relative;
  overflow: hidden;
  background: #eef2f7;
}

.skeleton-card span,
.skeleton-card strong,
.skeleton-line {
  display: block;
  border-radius: 999px;
}

.skeleton-card span {
  width: 42%;
  height: 14px;
  background: #dbe3ee;
}

.skeleton-card strong {
  width: 22%;
  height: 30px;
  background: #dbe3ee;
}

.skeleton-line {
  height: 16px;
  width: 100%;
}

.skeleton-line.short {
  width: 58%;
}

.skeleton-card::after,
.skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: shimmer 1.25s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.badge-soft {
  border-radius: 999px;
  padding: .3rem .55rem;
  font-weight: 700;
  font-size: .75rem;
}

.level-Warning { background: #fff7da; color: var(--warning); }
.level-Overdue { background: #ffe8dd; color: #b45309; }
.level-Critical { background: #ffe4e6; color: var(--danger); }
.status-Tersedia,
.status-Kembali-ke-Gudang,
.status-Masuk-Kantor,
.status-Terinstal { background: #dff7ec; color: var(--success); }
.status-Drop-Gudang-Tekno { background: #e0f2fe; color: #0369a1; }
.status-Pending,
.status-Gagal-Instal,
.status-Keluar-Kantor,
.status-Dibawa-Teknisi,
.status-Sampai-Lokasi,
.status-Dibawa-Kembali { background: #eef4ff; color: var(--primary-dark); }
.status-Drop-Gudang-Tekno,
.status-Rusak,
.status-Hilang,
.status-Rusak-tercatat,
.status-Hilang-tercatat { background: #ffe4e6; color: var(--danger); }

.scanner-box {
  position: relative;
  width: 100%;
  min-height: 260px;
  border: 1px dashed #aeb8c8;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.scanner-start {
  display: grid;
  place-items: center;
  cursor: pointer;
}

.scanner-stop {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 5;
}

.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 55%, #ecfdf5 100%);
}

.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-panel {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 20px 70px rgba(15, 23, 42, .12);
}

.mobile-body {
  background: #edf2f7;
  min-height: 100vh;
}

.mobile-appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}

.mobile-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  line-height: 1;
}

.mobile-title {
  flex: 1;
  min-width: 0;
}

.mobile-title span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
}

.mobile-title strong {
  display: block;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-exit {
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  text-decoration: none;
  font-size: .86rem;
  background: #fff;
}

.mobile-shell {
  width: min(430px, 100%);
  margin: 0 auto;
  padding: 14px 12px calc(82px + env(safe-area-inset-bottom));
  display: grid;
  gap: 12px;
}

.mobile-hero {
  border-radius: 18px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.mobile-hero span {
  font-size: .78rem;
  opacity: .82;
}

.mobile-hero h1 {
  font-size: 1.22rem;
  line-height: 1.18;
  margin: 4px 0 0;
  max-width: 250px;
}

.mobile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .08);
}

.mobile-card-title {
  font-weight: 800;
  margin-bottom: 12px;
}

.mobile-screen {
  display: none;
}

.mobile-screen.active {
  display: block;
  padding-bottom: 0;
}

.mobile-scanner {
  min-height: 320px;
  border-radius: 16px;
  border: 1px dashed #b7c2d3;
  background: #f8fafc;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.mobile-scanner video {
  width: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: 16px;
}

.mobile-scanner-idle {
  display: grid;
  place-items: center;
  padding: 24px;
}

.zxing-scanner-shell {
  position: relative;
  width: 100%;
  min-height: 320px;
  overflow: hidden;
  border-radius: 16px;
  background: #020617;
}

.zxing-video {
  display: block;
  width: 100%;
  min-height: 320px;
  max-height: 58vh;
  object-fit: cover;
  background: #020617;
}

.zxing-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.42),
    rgba(2, 6, 23, 0.08) 38%,
    rgba(2, 6, 23, 0.08) 62%,
    rgba(2, 6, 23, 0.46)
  );
}

.zxing-frame {
  position: relative;
  width: min(92%, 410px);
  aspect-ratio: 2.45;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(2, 6, 23, 0.18);
}

.zxing-frame span {
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: #38bdf8;
  border-style: solid;
}

.zxing-frame span:nth-child(1) {
  left: -2px;
  top: -2px;
  border-width: 4px 0 0 4px;
  border-top-left-radius: 18px;
}

.zxing-frame span:nth-child(2) {
  right: -2px;
  top: -2px;
  border-width: 4px 4px 0 0;
  border-top-right-radius: 18px;
}

.zxing-frame span:nth-child(3) {
  right: -2px;
  bottom: -2px;
  border-width: 0 4px 4px 0;
  border-bottom-right-radius: 18px;
}

.zxing-frame span:nth-child(4) {
  left: -2px;
  bottom: -2px;
  border-width: 0 0 4px 4px;
  border-bottom-left-radius: 18px;
}

.zxing-scanline {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 16%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #22c55e, #38bdf8, transparent);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.9);
  animation: zxing-scanline 1.65s ease-in-out infinite;
}

@keyframes zxing-scanline {
  0% { transform: translateY(0); opacity: 0.45; }
  50% { opacity: 1; }
  100% { transform: translateY(132px); opacity: 0.45; }
}

.zxing-status {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  padding: 10px 12px;
  font-size: 0.88rem;
  backdrop-filter: blur(8px);
}

.zxing-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.6);
  animation: zxing-pulse 1.2s infinite;
}

.zxing-status.ready .zxing-dot {
  background: #22c55e;
}

.zxing-status.success {
  background: rgba(4, 120, 87, 0.92);
}

.zxing-status.success .zxing-dot {
  background: #bbf7d0;
}

.zxing-status.warning {
  background: rgba(146, 64, 14, 0.92);
}

.zxing-status.warning .zxing-dot {
  background: #fed7aa;
}

@keyframes zxing-pulse {
  100% { box-shadow: 0 0 0 12px rgba(56, 189, 248, 0); }
}

.scan-success .zxing-frame {
  border-color: #86efac;
  box-shadow: 0 0 0 999px rgba(2, 6, 23, 0.2), 0 0 28px rgba(34, 197, 94, 0.85);
}

.scan-success .zxing-scanline {
  background: #86efac;
  animation-play-state: paused;
}

.scanner-manual {
  position: absolute;
  left: 50%;
  top: 12px;
  z-index: 6;
  transform: translateX(-50%);
  white-space: nowrap;
}

.mobile-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(406px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, .16);
  z-index: 30;
}

.mobile-bottom-nav button {
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 9px 3px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.86rem;
}

.mobile-bottom-nav button.active {
  background: #2563eb;
  color: #fff;
}

.device-info {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.mobile-register-device {
  text-align: left;
}

.mobile-register-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.mobile-register-form {
  display: grid;
  gap: 4px;
}

.mobile-register-form .form-label {
  color: #475569;
  font-size: .82rem;
  font-weight: 700;
}

.mobile-register-form .form-control,
.mobile-register-form .form-select {
  border-radius: 12px;
}

.gps-pill {
  background: #eef4ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .86rem;
}

.mobile-history-empty {
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

@media (max-width: 900px) {
  .app-shell { padding: 14px; }
  .section-heading { align-items: start; flex-direction: column; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .app-navbar .navbar-collapse {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 82vw);
    background: #111827;
    padding: 72px 16px 16px;
    transform: translateX(-105%);
    transition: transform .24s ease;
    box-shadow: 20px 0 45px rgba(15, 23, 42, .25);
    z-index: 1050;
  }

  .app-navbar .navbar-collapse.show {
    transform: translateX(0);
  }

  .app-navbar .navbar-toggler {
    display: inline-flex;
    z-index: 1100;
  }

  .app-navbar .navbar-nav {
    gap: 4px;
  }

  .app-navbar .nav-link {
    width: 100%;
    text-align: left;
    border-radius: 10px;
    padding: .78rem .9rem;
  }

  .app-navbar .nav-link.active {
    background: rgba(37, 99, 235, .24);
    color: #fff;
  }

  .app-navbar .navbar-collapse .d-flex {
    align-items: stretch !important;
    flex-direction: column;
    margin-top: 14px;
  }
}

@media (max-width: 520px) {
  .metric-grid { grid-template-columns: 1fr; }
  .panel { padding: 12px; }
}
.mobile-login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(180deg, #eef5ff 0%, #f8fafc 54%, #e8f0fb 100%);
}

.mobile-login-credit {
  margin-top: 18px;
  font-size: 0.82rem;
  padding: 9px 16px;
}

.mobile-login-card {
  width: min(100%, 420px);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
  padding: 28px 22px 22px;
}

.mobile-login-brand {
  margin-bottom: 24px;
}

.mobile-login-brand span {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.85rem;
}

.mobile-login-brand h1 {
  margin: 14px 0 0;
  font-size: 2rem;
  line-height: 1.08;
  color: var(--ink);
}

.mobile-login-card .form-control {
  border-radius: 16px;
  min-height: 54px;
}

.mobile-login-card .btn {
  min-height: 54px;
  border-radius: 16px;
  font-weight: 700;
}

.mobile-web-link {
  display: block;
  margin-top: 18px;
  color: #475569;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
}


[data-theme="dark"] body.mobile-body {
  background: var(--page);
}

[data-theme="dark"] .mobile-login-shell {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.20), transparent 34%),
    radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.12), transparent 28%),
    linear-gradient(180deg, #0f172a 0%, #111827 54%, #020617 100%);
}

[data-theme="dark"] .mobile-login-card {
  background: rgba(30, 41, 59, 0.96);
  border-color: var(--line);
}

[data-theme="dark"] .mobile-login-brand span {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}

[data-theme="dark"] .mobile-login-brand h1,
[data-theme="dark"] .mobile-login-card .form-label {
  color: var(--ink);
}

[data-theme="dark"] .mobile-web-link {
  color: var(--muted);
}

.mobile-password-overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  transition: opacity 0.16s ease;
}

.mobile-password-overlay.show {
  opacity: 1;
}

.mobile-password-card {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  padding: 18px;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.16s ease;
}

.mobile-password-overlay.show .mobile-password-card {
  transform: translateY(0) scale(1);
}

.mobile-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(420px, calc(100% - 36px));
  z-index: 1080;
  transform: translate(-50%, -44%) scale(.96);
  opacity: 0;
  pointer-events: none;
  border-radius: 18px;
  padding: 14px 16px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.24);
  font-weight: 700;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-toast.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.mobile-toast.success {
  background: #047857;
}

.mobile-toast.error {
  background: #b91c1c;
}

.mobile-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(6px);
}

.mobile-confirm-card {
  width: min(360px, 100%);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  padding: 24px;
  text-align: center;
  animation: dialogPop .16s ease both;
}

.mobile-confirm-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dbeafe;
  color: #2563eb;
  font-weight: 900;
  font-size: 1.6rem;
}

.mobile-confirm-icon.success {
  background: #dcfce7;
  color: #15803d;
}

.mobile-confirm-card h2 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  font-weight: 900;
}

.mobile-confirm-card p {
  margin: 0;
  color: #64748b;
}

.mobile-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.mobile-history-list {
  display: grid;
  gap: 10px;
}

.mobile-history-item {
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px;
}

.mobile-history-item span {
  color: #64748b;
  font-size: 0.78rem;
  white-space: nowrap;
}

.mobile-history-note {
  margin-top: 6px;
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
  color: #334155;
  font-size: 0.9rem;
}

.mobile-batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.mobile-batch-toolbar div {
  display: grid;
  gap: 2px;
}

.mobile-batch-toolbar small,
.mobile-batch-summary span,
.mobile-batch-summary small,
.mobile-batch-photo-heading small,
.mobile-batch-photo-item small {
  color: var(--muted);
}

.mobile-batch-toolbar .btn {
  flex: 0 0 auto;
}
.mobile-batch-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.mobile-handover-card-wrap {
  margin-top: 12px;
}

.mobile-handover-list {
  display: grid;
  gap: 10px;
}

.mobile-handover-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.mobile-handover-head,
.mobile-handover-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mobile-handover-head small,
.mobile-handover-note small,
.mobile-handover-devices small,
.mobile-handover-selected small {
  display: block;
  color: var(--muted);
}

.mobile-handover-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 14%, var(--panel));
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-handover-note,
.mobile-handover-selected {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.mobile-handover-devices {
  display: grid;
  gap: 4px;
}

.mobile-handover-actions {
  justify-content: flex-end;
}

.mobile-assignment-list {
  display: grid;
  gap: 12px;
}

.mobile-assignment-site {
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: #f8fafc;
  padding: 12px;
}

.mobile-assignment-site-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.mobile-assignment-site-head span {
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}

.mobile-assignment-devices {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.mobile-assignment-device-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.mobile-assignment-device-row:has(.mobile-assignment-check:checked) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, var(--panel));
}

.mobile-assignment-check-wrap {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  cursor: pointer;
}

.mobile-assignment-check {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

.mobile-assignment-device {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 11px 12px;
  text-align: left;
}

.mobile-batch-summary {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 7%, var(--panel));
}

.mobile-batch-summary div {
  display: grid;
  gap: 3px;
  margin-top: 5px;
}

.mobile-customer-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
  gap: 8px;
  margin-top: -4px;
}

.mobile-customer-detail > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.mobile-customer-detail span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
}

.mobile-customer-detail strong {
  color: var(--ink);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.mobile-customer-detail[hidden] {
  display: none !important;
}

.mobile-combobox-option {
  display: grid;
  gap: 2px;
}

.mobile-combobox-option small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
}

.mobile-batch-photo-list {
  display: grid;
  gap: 10px;
}

.mobile-batch-photo-heading {
  display: grid;
  gap: 2px;
}

.mobile-batch-photo-item {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.mobile-batch-photo-item span {
  display: grid;
  gap: 2px;
}

.mobile-assignment-device span,
.mobile-assignment-device em {
  display: block;
  color: #64748b;
  font-style: normal;
  font-size: 0.82rem;
}

.mobile-assignment-device strong {
  display: block;
  color: #0f172a;
}

.table:has(#alertsTable),
#alertsTable {
  display: none;
}

.dashboard-extras {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 16px;
  margin-top: 16px;
}

.link-button {
  border: 0;
  background: transparent;
  color: #1d4ed8;
  padding: 0;
}

.link-button:hover {
  color: #0f172a;
  text-decoration: underline;
}

.status-chart {
  display: grid;
  gap: 12px;
}

.chart-row {
  display: grid;
  grid-template-columns: 82px minmax(120px, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.chart-row span {
  color: #475569;
  font-weight: 700;
}

.chart-row strong {
  text-align: right;
}

.chart-track {
  height: 12px;
  border-radius: 999px;
  background: #e8eef7;
  overflow: hidden;
}

.chart-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #0f766e);
}

.activity-feed {
  display: grid;
  gap: 10px;
}

.priority-panel {
  display: grid;
  gap: 14px;
}

.priority-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.priority-card {
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px;
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.priority-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.priority-card.active {
  outline: 2px solid #2563eb;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.16);
}

.priority-card span,
.priority-card small {
  display: block;
  color: #64748b;
  font-weight: 700;
}

.priority-card strong {
  display: block;
  margin: 6px 0;
  font-size: 2rem;
  line-height: 1;
}

.priority-card.critical {
  border-color: #fecaca;
  background: #fff1f2;
}

.priority-card.overdue {
  border-color: #fed7aa;
  background: #fff7ed;
}

.priority-card.warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.priority-list {
  display: grid;
  gap: 8px;
}

.priority-toolbar,
.priority-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 0.9rem;
}

.priority-search {
  max-width: 280px;
  border-radius: 12px;
}

.priority-item {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  padding: 11px 12px;
  text-align: left;
}

.priority-item span,
.priority-item em {
  display: block;
  color: #64748b;
  font-style: normal;
  font-size: 0.88rem;
}

.activity-item {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #f8fafc;
  padding: 11px 12px;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.activity-item:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  background: #fff;
}

.activity-item span,
.activity-item small {
  display: block;
  color: #64748b;
}

.device-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: #f8fafc;
  padding: 16px;
}

.device-detail-head h3 {
  margin: 0 0 4px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.detail-grid div {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 11px 12px;
}

.detail-grid span {
  display: block;
  color: #64748b;
  font-size: 0.82rem;
}

.detail-nojar-chip {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
}

.customer-detail-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.customer-detail-row,
.customer-detail-tx-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.customer-detail-row {
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr) auto;
}

.customer-detail-tx-row {
  grid-template-columns: minmax(120px, auto) minmax(120px, auto) minmax(0, 1fr) auto auto;
}

.customer-detail-row.is-installed {
  border-color: #22c55e;
  background: #ecfdf5;
}

.customer-detail-tx-row.is-open {
  border-color: #2563eb;
  background: #eff6ff;
}

.customer-detail-row .text-muted,
.customer-detail-tx-row .text-muted {
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .customer-detail-row,
  .customer-detail-tx-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

.movement-timeline {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 4px #dbeafe;
}

.timeline-note {
  margin-top: 6px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
}

@media (max-width: 900px) {
  .dashboard-extras,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
.app-shell,
.view,
.panel,
.dashboard-extras,
.activity-head,
.activity-tools,
.priority-toolbar,
.priority-pager,
.table-responsive {
  max-width: 100%;
  min-width: 0;
}

body {
  overflow-x: hidden;
}

.activity-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.activity-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.65fr) 140px auto;
  gap: 8px;
  margin-bottom: 12px;
}

.activity-tools > * {
  min-width: 0;
}

.activity-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
}

.activity-status-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 4px #dbeafe;
}

.activity-status-dot.status-Terinstal,
.activity-status-dot.status-Kembali-ke-Gudang,
.activity-status-dot.status-Masuk-Kantor {
  background: #059669;
  box-shadow: 0 0 0 4px #d1fae5;
}

.activity-status-dot.status-Pending,
.activity-status-dot.status-Gagal-Instal {
  background: #d97706;
  box-shadow: 0 0 0 4px #fef3c7;
}

.activity-status-dot.status-Hilang-tercatat,
.activity-status-dot.status-Rusak-tercatat {
  background: #dc2626;
  box-shadow: 0 0 0 4px #fee2e2;
}

.activity-copy span,
.activity-copy small,
.activity-copy em {
  display: block;
  color: #64748b;
}

.activity-copy em {
  margin-top: 5px;
  font-style: normal;
  color: #334155;
}

.activity-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 0.9rem;
  padding-top: 2px;
}

.mini-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 14px;
  color: #64748b;
}

.mini-empty-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 12px;
  background:
    linear-gradient(90deg, #2563eb 0 45%, transparent 45%),
    linear-gradient(#dbeafe, #dbeafe);
  box-shadow: inset 0 0 0 1px #bfdbfe;
  opacity: 0.9;
}

.mini-empty strong {
  display: block;
  color: #0f172a;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.mini-empty span {
  display: block;
  font-size: 0.8rem;
  line-height: 1.35;
}

.out-site .btn-outline-danger {
  --bs-btn-padding-y: 0.2rem;
  --bs-btn-padding-x: 0.45rem;
  --bs-btn-font-size: 0.76rem;
}

.outbound-wizard {
  display: grid;
  gap: 14px;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fff;
  padding: 12px 14px;
  text-align: left;
  color: #64748b;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.wizard-step span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #e8eef7;
  color: #475569;
  font-weight: 800;
}

.wizard-step strong {
  color: #0f172a;
}

.wizard-step.active {
  border-color: #93c5fd;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.wizard-step.active span {
  background: #2563eb;
  color: #fff;
}

.wizard-pane {
  display: none;
  animation: viewSlideIn 0.22s ease;
}

.wizard-pane.active {
  display: block;
}

.wizard-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.wizard-pane-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.wizard-active-tx {
  max-width: 420px;
}

.wizard-form,
.wizard-device-input {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wizard-form textarea,
.wizard-form button[type="submit"],
.wizard-device-input input {
  grid-column: 1 / -1;
}

.wizard-device-input {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.wizard-device-input input {
  grid-column: auto;
}

.dismantle-flow {
  display: grid;
  gap: 10px;
}

.dismantle-flow div {
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px;
}

.dismantle-flow strong,
.dismantle-flow span {
  display: block;
}

.dismantle-flow span {
  color: #64748b;
  font-size: 0.88rem;
  margin-top: 2px;
}

.task-sent {
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  background: #f0fdf4;
  padding: 12px;
  color: #166534;
  box-shadow: 0 12px 30px rgba(22, 101, 52, 0.12);
}

.task-sent strong,
.task-sent span {
  display: block;
}

.task-sent strong::before {
  content: "OK ";
}

.task-sent span {
  margin-top: 3px;
  font-size: 0.88rem;
}

.mobile-combobox {
  position: relative;
  margin-top: 4px;
}

.mobile-combobox .form-control {
  margin-top: 0 !important;
}

.mobile-combobox-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1060;
  display: none;
  max-height: 236px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.mobile-combobox.open .mobile-combobox-results {
  display: grid;
  gap: 6px;
}

.mobile-combobox-option {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 11px 12px;
  color: #111827;
  font-weight: 700;
  text-align: left;
}

.mobile-combobox-option:active,
.mobile-combobox-option:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.mobile-combobox-empty {
  padding: 11px 12px;
  color: #64748b;
  font-size: 0.9rem;
}

.customer-combobox {
  position: relative;
  min-width: 0;
}

.customer-combobox-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1080;
  display: none;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.customer-combobox.open .customer-combobox-results {
  display: grid;
  gap: 6px;
}

.customer-combobox-option {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
  color: #111827;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.customer-combobox-option span,
.customer-combobox-option small {
  display: block;
}

.customer-combobox-option small {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.customer-combobox-option:hover,
.customer-combobox-option:active {
  background: #dbeafe;
  color: #1d4ed8;
}

.customer-combobox-option:hover small,
.customer-combobox-option:active small {
  color: #315a9f;
}

.customer-combobox-empty {
  padding: 10px 12px;
  color: #64748b;
  font-size: 0.9rem;
}

.customer-nojar-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f1ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 800;
}

.out-site {
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  margin-bottom: 10px;
}

.out-site.active {
  border-color: #93c5fd;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.1);
}

@media (max-width: 900px) {
  .wizard-steps,
  .wizard-form,
  .wizard-device-input {
    grid-template-columns: 1fr;
  }

  .wizard-pane-head {
    display: grid;
  }

  .wizard-active-tx {
    max-width: none;
  }
}

#picList,
#siteList {
  font-size: 0.88rem;
}

.dashboard-summary-item {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 9px 11px;
  margin-bottom: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}

.dashboard-summary-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: #60a5fa;
  opacity: 0;
  transition: opacity .16s ease, top .16s ease, bottom .16s ease;
}

.dashboard-summary-item:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .08);
  transform: translateY(-1px);
}

.dashboard-summary-item:hover::before {
  opacity: 1;
  top: 7px;
  bottom: 7px;
}

.dashboard-summary-item:active {
  transform: translateY(0) scale(.99);
}

.summary-main {
  min-width: 0;
  flex: 1;
}

.summary-main strong {
  display: block;
  color: #0f172a;
  font-size: 0.88rem;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .16s ease;
}

.summary-main small {
  display: block;
  color: #64748b;
  font-size: 0.7rem;
  line-height: 1.25;
  margin-top: 2px;
}

.summary-count {
  min-width: 28px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.78rem;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.dashboard-summary-item:hover .summary-main strong {
  color: #1e40af;
}

.dashboard-summary-item:hover .summary-count {
  background: #dbeafe;
  color: #1d4ed8;
  transform: scale(1.02);
}

.dashboard-detail-list {
  display: grid;
  gap: 9px;
}

.dashboard-detail-row {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.dashboard-detail-row:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}

.dashboard-detail-row span,
.dashboard-detail-row small {
  display: block;
  color: #64748b;
}

#picList .data-tools,
#siteList .data-tools {
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .activity-head {
    display: grid;
  }

  .activity-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .dashboard-extras {
    grid-template-columns: 1fr;
  }

  .activity-tools {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 0.5fr) 140px auto;
  }
}
.section-heading h1 {
  font-size: 1.55rem;
  line-height: 1.2;
}

.section-heading p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.metric {
  padding: 16px 18px;
  min-height: 104px;
}

.metric span {
  font-size: 0.9rem;
}

.metric strong {
  font-size: 2rem;
  line-height: 1.05;
}

.panel-title,
.panel h2 {
  font-size: 1rem;
}

.priority-card {
  padding: 10px 11px;
  border-radius: 12px;
}

.priority-card strong {
  font-size: 1.35rem;
}

.priority-card span,
.priority-card small {
  font-size: 0.82rem;
}

.activity-item,
.priority-item {
  padding: 8px 10px;
  border-radius: 12px;
}

.activity-copy strong,
.priority-item strong {
  font-size: 0.88rem;
}

.activity-copy span,
.activity-copy small,
.activity-copy em,
.priority-item span,
.priority-item em {
  font-size: 0.78rem;
}

.activity-tools .form-control,
.activity-tools .form-select,
.activity-tools .btn,
.priority-toolbar .form-control,
.priority-toolbar .btn,
.priority-pager .btn,
.activity-pager .btn {
  font-size: 0.78rem;
  min-height: 30px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.priority-toolbar,
.priority-pager,
.activity-pager {
  font-size: 0.78rem;
}
.dashboard-extras {
  gap: 12px;
  margin-top: 12px;
}

.priority-panel {
  gap: 10px;
}

.priority-cards {
  gap: 8px;
}

.activity-feed {
  gap: 8px;
}

.activity-head {
  margin-bottom: 10px;
}

.dashboard-extras .panel {
  padding: 16px;
}

.dashboard-extras .panel-title {
  font-size: 0.95rem;
}

.dashboard-extras .small {
  font-size: 0.76rem;
}

.activity-tools {
  margin-bottom: 10px;
}

html,
body,
.app-shell,
.view,
.panel,
.metric,
.soft-box,
.out-site,
.mobile-card,
.mobile-appbar,
.mobile-bottom-nav,
.login-panel,
.app-dialog,
.mobile-confirm-card,
.mobile-password-card,
.mobile-login-card,
.modal-content,
.list-group-item,
.table,
.form-control,
.form-select,
.input-group-text,
.btn,
.badge-soft,
.device-info,
.activity-item,
.priority-item,
.dashboard-summary-item,
.dashboard-detail-row,
.mobile-history-item,
.mobile-history-note,
.mobile-assignment-site,
.mobile-assignment-device,
.mobile-history-empty,
.wizard-step,
.dismantle-flow div,
.import-template,
.selected-site-bar,
.customer-combobox-results,
.technician-results,
.mobile-combobox-results {
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.app-navbar {
  background: var(--nav);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  padding: 6px 11px;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, .16);
  transform: translateY(-1px);
}

.theme-toggle [data-theme-icon] {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  font-size: 1rem;
}

.theme-toggle-soft {
  border-color: var(--line);
  background: var(--soft);
  color: var(--ink);
}

.theme-toggle-soft:hover {
  background: var(--soft-strong);
}

.mobile-theme-toggle {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border-color: var(--line);
  background: var(--soft);
  color: var(--ink);
}

.panel,
.metric,
.login-panel,
.mobile-card,
.modal-content,
.app-dialog,
.mobile-confirm-card,
.mobile-password-card,
.mobile-login-card {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 14px 38px var(--shadow);
}

.modal-header,
.modal-footer {
  border-color: var(--line);
}

.btn-close {
  filter: none;
}

[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(180%);
}

.text-muted,
.form-text,
.section-heading p,
.mobile-title span,
.app-dialog p,
.mobile-confirm-card p,
.activity-copy span,
.activity-copy small,
.activity-copy em,
.priority-item span,
.priority-item em,
.dashboard-detail-row span,
.dashboard-detail-row small,
.summary-main small,
.detail-grid span,
.mobile-history-item span,
.mobile-history-item em,
.mobile-assignment-device span,
.mobile-assignment-device em,
.mobile-register-form .form-label,
.wizard-pane-head p,
.dismantle-flow span {
  color: var(--muted) !important;
}

.form-control,
.form-select,
.input-group-text {
  background-color: var(--input-bg);
  border-color: var(--line);
  color: var(--input-text);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--input-bg);
  border-color: var(--primary);
  color: var(--input-text);
  box-shadow: 0 0 0 .2rem rgba(59, 130, 246, .18);
}

.form-control::placeholder {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ink);
  --bs-table-border-color: var(--line);
  --bs-table-striped-bg: var(--soft);
  --bs-table-hover-bg: var(--table-hover);
  color: var(--ink);
}

.table > :not(caption) > * > * {
  background-color: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.soft-box,
.device-info,
.selected-site-bar,
.mobile-history-empty,
.mobile-history-note,
.import-template,
.dismantle-flow div,
.activity-item,
.priority-item,
.mobile-history-item,
.mobile-assignment-site,
.mobile-assignment-device,
.dashboard-detail-row,
.timeline-note,
.customer-detail-row,
.customer-detail-tx-row {
  background: var(--soft);
  border-color: var(--line);
  color: var(--ink);
}

.customer-detail-row.is-installed {
  border-color: #22c55e;
  background: color-mix(in srgb, #22c55e 14%, var(--soft));
}

.customer-detail-tx-row.is-open {
  border-color: #2563eb;
  background: color-mix(in srgb, #2563eb 12%, var(--soft));
}

.app-dialog-detail,
.app-dialog-detail-row,
.detail-grid div,
.device-detail-head,
.priority-card,
.mini-empty,
.customer-combobox-results,
.technician-results,
.mobile-combobox-results {
  background: var(--soft);
  border-color: var(--line);
  color: var(--ink);
}

.app-dialog h3,
.app-dialog-detail-row strong,
.summary-main strong,
.dashboard-detail-row strong,
.device-detail-head h3,
.detail-grid strong,
.mobile-assignment-device strong,
.mini-empty strong,
.wizard-step strong,
.mobile-confirm-card h2,
.mobile-register-heading strong {
  color: var(--ink);
}

.list-group-item,
.dashboard-summary-item,
.wizard-step,
.out-site {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

.list-group-item:hover,
.dashboard-summary-item:hover,
.activity-item:hover,
.dashboard-detail-row:hover,
.mobile-assignment-device:hover,
.customer-combobox-option:hover,
.technician-option:hover,
.mobile-combobox-option:hover {
  background: var(--soft-strong);
  border-color: color-mix(in srgb, var(--primary) 48%, var(--line));
}

.customer-combobox-option,
.technician-option,
.mobile-combobox-option {
  background: var(--soft);
  color: var(--ink);
}

.technician-option small,
.technician-empty,
.customer-combobox-empty,
.mobile-combobox-empty {
  color: var(--muted);
}

.mobile-body {
  background: var(--page);
}

.mobile-appbar {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

.mobile-exit {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

.mobile-bottom-nav {
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border-color: var(--line);
}

.mobile-bottom-nav button {
  color: var(--muted);
}

.mobile-scanner,
.scanner-box,
.zxing-scanner-shell {
  background: var(--soft);
  border-color: var(--line);
}

.login-page {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--primary) 16%, transparent), transparent 34%),
    linear-gradient(135deg, var(--page) 0%, color-mix(in srgb, var(--page) 86%, var(--panel)) 100%);
}

.app-credit {
  background: color-mix(in srgb, var(--nav) 84%, transparent);
  border-color: color-mix(in srgb, var(--line) 40%, transparent);
  color: color-mix(in srgb, var(--muted) 84%, #ffffff);
}

.app-credit strong {
  color: color-mix(in srgb, var(--ink) 86%, #ffffff);
}

.skeleton-card,
.skeleton-line {
  background: var(--soft);
}

.skeleton-card span,
.skeleton-card strong {
  background: color-mix(in srgb, var(--line) 70%, var(--panel));
}

.metric-click:hover,
.out-site.active,
.wizard-step.active,
.selected-site-bar.selected {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  box-shadow: 0 14px 34px color-mix(in srgb, var(--primary) 16%, transparent);
}

.status-Tersedia,
.status-Kembali-ke-Gudang,
.status-Masuk-Kantor,
.status-Terinstal {
  background: color-mix(in srgb, var(--success) 18%, var(--panel));
  color: var(--success);
}

.status-Pending,
.status-Gagal-Instal,
.status-Keluar-Kantor,
.status-Dibawa-Teknisi,
.status-Sampai-Lokasi,
.status-Dibawa-Kembali {
  background: color-mix(in srgb, var(--primary) 17%, var(--panel));
  color: var(--primary-dark);
}

.status-Rusak,
.status-Hilang,
.status-Rusak-tercatat,
.status-Hilang-tercatat,
.level-Critical {
  background: color-mix(in srgb, var(--danger) 18%, var(--panel));
  color: var(--danger);
}

.level-Warning {
  background: color-mix(in srgb, var(--warning) 18%, var(--panel));
  color: var(--warning);
}

.level-Overdue {
  background: color-mix(in srgb, #f97316 18%, var(--panel));
  color: #fb923c;
}

.priority-card.critical {
  background: color-mix(in srgb, var(--danger) 10%, var(--panel));
  border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
}

.priority-card.overdue {
  background: color-mix(in srgb, #f97316 10%, var(--panel));
  border-color: color-mix(in srgb, #f97316 36%, var(--line));
}

.priority-card.warning {
  background: color-mix(in srgb, var(--warning) 10%, var(--panel));
  border-color: color-mix(in srgb, var(--warning) 36%, var(--line));
}

.activity-status-dot {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, var(--panel));
}

.activity-status-dot.status-Terinstal,
.activity-status-dot.status-Kembali-ke-Gudang,
.activity-status-dot.status-Masuk-Kantor {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, var(--panel));
}

.activity-status-dot.status-Pending,
.activity-status-dot.status-Gagal-Instal {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 22%, var(--panel));
}

.activity-status-dot.status-Hilang-tercatat,
.activity-status-dot.status-Rusak-tercatat {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 22%, var(--panel));
}

[data-theme="dark"] .btn-outline-secondary {
  --bs-btn-color: var(--muted);
  --bs-btn-border-color: var(--line);
  --bs-btn-hover-bg: var(--soft);
  --bs-btn-hover-border-color: var(--primary);
}

[data-theme="dark"] .btn-outline-primary {
  --bs-btn-color: var(--primary-dark);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
}

[data-theme="dark"] .btn-outline-danger {
  --bs-btn-color: var(--danger);
  --bs-btn-border-color: color-mix(in srgb, var(--danger) 72%, var(--line));
}

[data-theme="dark"] .alert-danger {
  background: color-mix(in srgb, var(--danger) 18%, var(--panel));
  border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
  color: #fecaca;
}

[data-theme="dark"] .modal-backdrop.show,
[data-theme="dark"] .app-dialog-backdrop,
[data-theme="dark"] .mobile-confirm-overlay,
[data-theme="dark"] .mobile-password-overlay {
  background: rgba(2, 6, 23, .72);
}

@media (max-width: 480px) {
  .mobile-batch-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-batch-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mobile-batch-toolbar .btn,
  .mobile-handover-actions .btn {
    width: 100%;
  }

  .mobile-handover-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.mobile-batch-summary[hidden],
.mobile-batch-photo-list[hidden],
#singlePhotoField[hidden] {
  display: none !important;
}

@media (max-width: 420px) {
  .mobile-customer-detail {
    grid-template-columns: 1fr;
  }
}

/* Keep dashboard follow-up and activity panels compact and balanced. */
.dashboard-extras {
  align-items: stretch;
}

.dashboard-extras > .panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dashboard-extras .priority-panel,
.dashboard-extras .activity-feed {
  flex: 1 1 auto;
}

.dashboard-extras .priority-panel {
  grid-template-rows: auto auto 1fr auto;
}

.dashboard-extras .priority-pager,
.dashboard-extras .activity-pager {
  margin-top: auto;
  padding-top: 4px;
}


/* Two-step inbound staging before warehouse confirmation. */
.return-workspace > [class*="col-"] {
  display: flex;
}

.return-workspace .panel {
  width: 100%;
}

.return-scan-panel,
.return-confirm-panel {
  min-height: 430px;
}

.return-scan-count {
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 9%, var(--panel));
  color: var(--primary);
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.return-staging-list {
  display: grid;
  gap: 8px;
  max-height: 390px;
  overflow-y: auto;
}

.return-staging-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.return-staging-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.return-staging-copy > span,
.return-staging-copy > small,
.return-staging-copy > em {
  color: var(--muted);
  font-style: normal;
  overflow-wrap: anywhere;
}

.return-staging-copy > span {
  color: var(--ink);
  font-weight: 600;
}

.return-staging-copy > small,
.return-staging-copy > em {
  font-size: 0.78rem;
}

.return-staging-actions {
  display: flex;
  gap: 6px;
}

.return-staging-empty {
  display: grid;
  place-items: center;
  min-height: 110px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .return-staging-item {
    grid-template-columns: 1fr;
  }

  .return-staging-actions .btn {
    flex: 1 1 0;
  }
}


.transaction-number-link {
  appearance: none;
  border: 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--primary) 55%, transparent);
  background: transparent;
  color: var(--primary);
  padding: 0 0 2px;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.transaction-number-link:hover,
.transaction-number-link:focus-visible {
  border-bottom-color: var(--primary);
  color: color-mix(in srgb, var(--primary) 78%, var(--ink));
}

.transaction-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.transaction-summary-head h3 {
  margin: 2px 0 10px;
  font-size: 1.35rem;
}

.transaction-summary-eyebrow {
  color: var(--muted);
  font-size: 0.78rem;
}

.transaction-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--muted);
  font-size: 0.84rem;
}

.transaction-summary-meta strong,
.transaction-device-result-meta strong {
  color: var(--ink);
}

.transaction-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.transaction-summary-card {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.transaction-summary-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.transaction-summary-card strong {
  font-size: 1.35rem;
}

.transaction-result-groups {
  display: grid;
  gap: 14px;
}

.transaction-result-group {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.transaction-result-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.transaction-result-group h4 {
  margin: 0;
  font-size: 1rem;
}

.transaction-result-group > header span {
  color: var(--muted);
  font-size: 0.8rem;
}

.transaction-device-results {
  display: grid;
  gap: 8px;
}

.transaction-device-result {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.transaction-device-result-main,
.transaction-device-result-status {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.transaction-device-result-main > div:first-child {
  display: grid;
  gap: 2px;
}

.transaction-device-result-main span,
.transaction-device-result-main small {
  color: var(--muted);
}

.transaction-device-result-status {
  align-items: center;
}

.transaction-device-result-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.transaction-device-result-note {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .transaction-summary-head,
  .transaction-device-result-main {
    flex-direction: column;
  }

  .transaction-device-result-meta {
    grid-template-columns: 1fr;
  }
}


.vendor-receipt-count {
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 9%, var(--panel));
  color: var(--primary);
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

#vendorDestinationInfo {
  min-height: 58px;
  color: var(--muted);
  font-size: 0.84rem;
}

#vendorReceiptTable td {
  vertical-align: middle;
}


.vendor-redirect-panel {
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
}

.vendor-redirect-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  align-items: center;
}

.vendor-redirect-form .btn {
  min-height: 44px;
}

.soft-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 992px) {
  .vendor-redirect-form {
    grid-template-columns: 1fr;
  }
}

.backup-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.backup-mini-card {
  border: 1px solid var(--border);
  background: var(--card-soft, rgba(37, 99, 235, 0.04));
  border-radius: 8px;
  padding: 12px;
}

.backup-mini-card span,
.backup-config-line span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.backup-mini-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text-main);
  font-size: 1.2rem;
}

.backup-config-box {
  display: grid;
  gap: 10px;
}

.backup-config-line {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.backup-config-line strong,
.backup-config-line code {
  color: var(--text-main);
  word-break: break-word;
}

.backup-error-log summary {
  cursor: pointer;
  color: var(--danger, #dc3545);
  font-weight: 700;
}

.backup-error-log pre {
  white-space: pre-wrap;
  max-width: 520px;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-main);
  color: var(--text-main);
}

.vendor-handover-panel {
  border-color: color-mix(in srgb, var(--primary) 18%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 4%, var(--panel)), var(--panel));
}

.vendor-handover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.vendor-handover-note {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 7%, var(--panel));
  color: var(--muted);
  font-size: 0.82rem;
}

.vendor-handover-table .data-table-toolbar {
  margin-bottom: 10px;
}

.vendor-handover-table .table {
  margin-bottom: 0;
}

.vendor-handover-table .btn-success {
  box-shadow: 0 8px 18px color-mix(in srgb, #16a34a 18%, transparent);
}

@media (max-width: 768px) {
  .vendor-handover-note {
    border-radius: 12px;
    align-items: flex-start;
  }
}



.navbar-user-profile {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .92);
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  padding: .25rem .35rem;
  border-radius: 10px;
  transition: background-color .2s ease, color .2s ease;
}
.navbar-user-profile:hover {
  background: rgba(255, 255, 255, .10);
  color: #fff;
}
.navbar-user-profile small {
  color: rgba(255, 255, 255, .72);
  font-size: .72rem;
}
.mobile-profile-lines {
  display: grid;
  gap: .55rem;
  margin: .75rem 0 1rem;
}
.mobile-profile-lines div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .65rem .75rem;
  background: var(--soft);
}
.mobile-profile-lines span {
  color: var(--text-secondary);
  font-size: .86rem;
}
.mobile-profile-lines strong {
  color: var(--text-main);
  text-align: right;
  word-break: break-word;
}

/* User profile and clickable PIC */
.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #14b8a6);
  color: #fff;
  font-weight: 800;
  border: 1px solid var(--border);
}
.profile-avatar img,
.mobile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar-xs { width: 24px; height: 24px; font-size: .75rem; }
.profile-avatar-sm { width: 34px; height: 34px; font-size: .9rem; }
.profile-avatar-md { width: 44px; height: 44px; font-size: 1rem; }
.profile-avatar-lg { width: 76px; height: 76px; font-size: 1.8rem; }
.pic-profile-btn {
  border: 0;
  background: transparent;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .1rem .2rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
}
.pic-profile-btn:hover {
  background: rgba(37, 99, 235, .08);
  color: var(--primary);
}
.user-profile-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.user-profile-head h4 { margin: 0; }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.profile-line {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem;
  background: var(--card-soft, rgba(148, 163, 184, .08));
}
.profile-line span {
  display: block;
  color: var(--text-secondary);
  font-size: .8rem;
  margin-bottom: .2rem;
}
.profile-line strong {
  color: var(--text-main);
  word-break: break-word;
}
.mobile-profile-card {
  max-height: min(86vh, 720px);
  overflow: auto;
}
.mobile-profile-preview {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-soft, rgba(148, 163, 184, .08));
}
.mobile-avatar-preview { width: 56px; height: 56px; }
.mobile-profile-preview small {
  display: block;
  color: var(--text-secondary);
}
@media (max-width: 576px) {
  .profile-grid { grid-template-columns: 1fr; }
}


.mail-config-box {
  font-size: 0.92rem;
}

.mail-status-grid {
  display: grid;
  gap: 0.65rem;
}

.mail-status-grid > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 88%, var(--primary) 12%);
}

.mail-status-grid span {
  color: var(--text-secondary);
}

.mail-status-grid strong {
  text-align: right;
  color: var(--text);
}

.message-panel textarea[name="message"] {
  min-height: 180px;
}


.role-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.55rem;
}

.role-check-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.role-check-option:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, var(--input-bg));
  transform: translateY(-1px);
}

.role-check-option .form-check-input {
  margin: 0;
  flex: 0 0 auto;
}

.role-check-option span {
  font-weight: 700;
  font-size: 0.92rem;
}.message-help-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-secondary);
  display: grid;
  gap: 0.65rem;
}

.message-help-panel {
  height: 100%;
}
