/* App clean UI — tema Finance untuk seluruh modul (body.app-shell) */
.app-shell {
  --app-bg: #eef2f6;
  --app-card: #ffffff;
  --app-line: #e2e8f0;
  --app-muted: #64748b;
  --app-text: #0f172a;
  --app-accent: #0f1115;
  --app-gold: #d4af37;
  --app-radius: 14px;
  --app-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  --app-read: 14px;
}

.app-shell main.app-main {
  padding: 14px 18px 28px;
  background: var(--app-bg);
}

/* Judul halaman — ringkas & mudah dibaca */
.app-shell .page-title-row.ws-auto-page-title {
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  padding: 14px 18px;
  margin: 0 0 16px;
  box-shadow: var(--app-shadow);
}

.app-shell .ws-auto-page-title .note,
.app-shell .ws-auto-page-title .ws-page-subtitle {
  display: block !important;
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--app-muted);
  font-weight: 500;
  max-width: 72ch;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.app-shell .ws-auto-page-title h2,
.app-shell .page-title-row h2 {
  margin: 0 0 2px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--app-text);
}

/* Cards */
.app-shell .card,
.app-shell .page-card,
.app-shell .menu-page-card,
.app-shell .fin-card,
.app-shell .fl-card,
.app-shell .foav-card,
.app-shell .fopv-card,
.app-shell .fhs-card,
.app-shell .rev520-card,
.app-shell .frf-card,
.app-shell .frf-wrap,
.app-shell .rev333-wrap,
.app-shell .apm-lap-card,
.app-shell .ws-panel,
.app-shell .hrd-section,
.app-shell .panel,
.app-shell .ws-card,
.app-shell .form-card,
.app-shell .box-panel,
.app-shell .pf-card,
.app-shell .pgm-card,
.app-shell .ums-card,
.app-shell .section,
.app-shell .ws-section,
.app-shell .box-panel.ws-section-operan {
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
  padding: 16px 18px;
  margin: 0 0 14px;
}

.app-shell .card > h3,
.app-shell .page-card > h3,
.app-shell .menu-page-card > h3,
.app-shell .fl-card > h3,
.app-shell .foav-card > h3,
.app-shell .fopv-card > h3,
.app-shell .apm-lap-card > h3,
.app-shell .rev520-card > h3,
.app-shell .frf-card > h3 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--app-line);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--app-text);
  letter-spacing: 0.01em;
}

/* KPI / stat grids */
.app-shell .dashboard-grid,
.app-shell .stat-grid,
.app-shell .fin-kpi,
.app-shell .fst-kpi,
.app-shell .kpi-row,
.app-shell .rev627-kpi,
.app-shell .flpt-grid,
.app-shell .foav-grid,
.app-shell .fopv-grid,
.app-shell .fhs-grid,
.app-shell .rev520-grid,
.app-shell .frf-grid,
.app-shell .finance-kpi,
.app-shell .finance-grid-2,
.app-shell .apm-lap-kpi,
.app-shell .asr-fin-kpi {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.app-shell .dashboard-grid,
.app-shell .stat-grid,
.app-shell .fin-kpi,
.app-shell .fst-kpi {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.app-shell .kpi-row,
.app-shell .rev627-kpi,
.app-shell .flpt-grid,
.app-shell .foav-grid,
.app-shell .fopv-grid,
.app-shell .rev520-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.app-shell .finance-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-shell .apm-lap-kpi,
.app-shell .asr-fin-kpi {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* KPI cards â€” override dark stat-card bars */
.app-shell .stat-card,
.app-shell .dashboard-card,
.app-shell .kpi-box,
.app-shell .rev627-kpi .box,
.app-shell .flpt-card,
.app-shell .foav-stat,
.app-shell .fopv-stat,
.app-shell .fhs-stat,
.app-shell .rev520-stat,
.app-shell .fst-kpi-card,
.app-shell .fin-kpi-card,
.app-shell .apm-lap-kpi-item,
.app-shell .asr-fin-kpi > div,
.app-shell .summary-money .box,
.app-shell .finance-card,
.app-shell .dashboard-grid .box,
.app-shell .ws-card,
.app-shell .pf-stat,
.app-shell .pf-card .box {
  background: var(--app-card) !important;
  color: var(--app-text) !important;
  border: 1px solid var(--app-line) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  box-shadow: var(--app-shadow) !important;
  position: relative;
  overflow: hidden;
}

.app-shell .stat-card::after,
.app-shell .dashboard-card::after,
.app-shell .finance-card::after {
  display: none !important;
}

.app-shell .stat-card span,
.app-shell .stat-card small,
.app-shell .dashboard-card span,
.app-shell .kpi-box small,
.app-shell .rev627-kpi small,
.app-shell .flpt-card span,
.app-shell .foav-stat small,
.app-shell .fopv-stat small,
.app-shell .fst-kpi-card small,
.app-shell .fin-kpi-card small,
.app-shell .apm-lap-kpi-item small,
.app-shell .asr-fin-kpi small,
.app-shell .finance-card small {
  display: block;
  color: var(--app-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-shell .stat-card b,
.app-shell .dashboard-card b,
.app-shell .kpi-box b,
.app-shell .rev627-kpi b,
.app-shell .flpt-card b,
.app-shell .foav-stat b,
.app-shell .fopv-stat b,
.app-shell .fst-kpi-card b,
.app-shell .fin-kpi-card b,
.app-shell .apm-lap-kpi-item b,
.app-shell .asr-fin-kpi b {
  display: block;
  font-size: 1.45rem !important;
  line-height: 1.15;
  color: var(--app-text) !important;
  margin-top: 6px;
}

.app-shell .stat-card.warn,
.app-shell .stat-card.danger,
.app-shell .fst-kpi-card.warn,
.app-shell .fin-kpi-card.warn {
  border-color: #fecaca !important;
  background: linear-gradient(180deg, #fff 0%, #fff7f7 100%) !important;
}

.app-shell .stat-card.warn b,
.app-shell .stat-card.danger b,
.app-shell .fst-kpi-card.warn b,
.app-shell .fin-kpi-card.warn b {
  color: #991b1b !important;
}

.app-shell .stat-card.ok b {
  color: #166534 !important;
}

/* Filters / toolbars */
.app-shell .topbar,
.app-shell .filter-bar,
.app-shell .form-grid,
.app-shell .ws-card-form,
.app-shell form.filter,
.app-shell .filter,
.app-shell .filter-bar,
.app-shell .rev627-filter,
.app-shell .flpt-filter,
.app-shell .fst-filter,
.app-shell .fin-filter,
.app-shell form.filter,
.app-shell .apm-lap-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--app-shadow);
}

.app-shell .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.app-shell .topbar label,
.app-shell .filter-bar label,
.app-shell .form-grid label,
.app-shell .finance-filter label,
.app-shell .rev627-filter label,
.app-shell .flpt-filter label,
.app-shell .fst-filter label,
.app-shell .fin-filter label,
.app-shell form.filter label,
.app-shell .apm-lap-filter label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--app-muted);
  margin: 0;
}

.app-shell input,
.app-shell select,
.app-shell textarea {
  border: 1px solid var(--app-line);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 14px;
  min-height: 40px;
  background: #fff;
}

.app-shell input:focus,
.app-shell select:focus,
.app-shell textarea:focus {
  outline: none;
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
}

/* Tabs */
.app-shell .rev627-tabs,
.app-shell .fl-tabs,
.app-shell .foav-tabs,
.app-shell .fopv-tabs,
.app-shell .fhs-tabs,
.app-shell .rev520-tabs,
.app-shell .asr-fin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.app-shell .rev627-tabs a,
.app-shell .fl-tabs a,
.app-shell .foav-tabs a,
.app-shell .fopv-tabs a,
.app-shell .fhs-tabs a,
.app-shell .rev520-tabs a,
.app-shell .asr-fin-tabs a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--app-line);
  background: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  color: #334155;
}

.app-shell .rev627-tabs a.active,
.app-shell .fl-tabs a.active,
.app-shell .foav-tabs a.active,
.app-shell .fopv-tabs a.active,
.app-shell .fhs-tabs a.active,
.app-shell .rev520-tabs a.active,
.app-shell .asr-fin-tabs a.active {
  background: var(--app-accent);
  border-color: var(--app-accent);
  color: #fff;
}

/* Tables */
.app-shell .table-responsive,
.app-shell .table-wrap,
.app-shell .table-scroll,
.app-shell .apm-lap-table-wrap {
  overflow: auto;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  margin-top: 4px;
}

.app-shell table,
.app-shell .crm-table,
.app-shell .pf-table,
.app-shell .list-table,
.app-shell .service-table,
.app-shell .sort-table,
.app-shell .sc-table,
.app-shell .ws-responsive-table,
.app-shell .foav-table,
.app-shell .fopv-table,
.app-shell .fl-table,
.app-shell .frf-table,
.app-shell .rev333-table,
.app-shell .rev520-table,
.app-shell .bank-table,
.app-shell .apm-lap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--app-read);
  line-height: 1.5;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  margin: 0;
}

.app-shell table thead th,
.app-shell .crm-table thead th,
.app-shell .pf-table thead th,
.app-shell .sc-crm-table thead th,
.app-shell .sc-fu-table thead th,
.app-shell .foav-table th,
.app-shell .fopv-table th,
.app-shell .fl-table th,
.app-shell .frf-table th,
.app-shell .rev333-table th,
.app-shell .rev520-table th,
.app-shell .bank-table th,
.app-shell .apm-lap-table thead th {
  background: #0f1115 !important;
  color: #f8fafc !important;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.03em;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
  -webkit-font-smoothing: antialiased;
}

.app-shell table tbody td,
.app-shell .crm-table tbody td,
.app-shell .foav-table td,
.app-shell .fopv-table td,
.app-shell .fl-table td,
.app-shell .frf-table td,
.app-shell .rev333-table td,
.app-shell .rev520-table td,
.app-shell .bank-table td,
.app-shell .apm-lap-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  color: #1e293b;
  font-size: var(--app-read);
}

.app-shell table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.app-shell table tbody tr:hover td,
.app-shell .crm-table tbody tr:hover td {
  background: #f1f5f9 !important;
}

.app-shell table tfoot th,
.app-shell table tfoot td {
  background: #f8fafc !important;
  color: #0f172a !important;
  font-weight: 700;
  border-top: 2px solid var(--app-line) !important;
  border-bottom: 0 !important;
  padding: 11px 14px;
}

.app-shell table tbody td.empty,
.app-shell table tbody tr:only-child td[colspan] {
  text-align: center;
  color: var(--app-muted);
  padding: 22px 14px;
}

.app-shell .money,
.app-shell .frf-money,
.app-shell td.money,
.app-shell th.money,
.app-shell .apm-lap-table .num {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Alerts — keep visible, compact */
.app-shell .alert,
.app-shell .alert.success,
.app-shell .alert.danger,
.app-shell .alert-success,
.app-shell .alert-danger,
.app-shell .pf-alert,
.app-shell .finance-alert,
.app-shell .fhs-warn,
.app-shell .finance-metric-warn,
.app-shell .frf-msg,
.app-shell .frf-err,
.app-shell .rev333-msg,
.app-shell .asr-fin-note[style*="ecfdf5"] {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.5;
}

/* Alerts — warna */
.app-shell .alert-success,
.app-shell .alert.success,
.app-shell .pf-alert.ok {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.app-shell .alert-danger,
.app-shell .alert.danger,
.app-shell .pf-alert.err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.app-shell .pf-alert.note,
.app-shell .alert.note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

/* Sembunyikan banner info berulang saja — catatan penting tetap tampil */
.app-shell .badge-note,
.app-shell .finance-metric-notice {
  display: none !important;
}

.app-shell .card .note,
.app-shell .page-card .note,
.app-shell .fin-hint,
.app-shell .apm-lap-note {
  display: block !important;
  background: #f8fafc;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

.app-shell .muted,
.app-shell .foav-muted,
.app-shell .fopv-muted {
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1.45;
}

.app-shell .page-title-row p.muted {
  margin: 0;
  font-size: 13px;
}

/* Tombol & aksi */
.app-shell .btn {
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 10px;
  min-height: 38px;
}

.app-shell .btn.secondary,
.app-shell a.btn.secondary {
  background: #f1f5f9 !important;
  color: var(--app-text) !important;
  border: 1px solid var(--app-line);
  box-shadow: none !important;
}

.app-shell td .btn,
.app-shell .table-responsive .btn,
.app-shell table .btn {
  padding: 6px 11px;
  min-height: 32px;
  font-size: 12px;
}

.app-shell .action-row,
.app-shell .quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.app-shell .action-row {
  margin-top: 12px;
}

/* Pagination */
.app-shell .ws-pagination-bar {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--app-line);
}

.app-shell .ws-pagination-info,
.app-shell .ws-pagination-limit label {
  color: var(--app-muted);
  font-size: 13px;
}

/* Dashboard Finance */
.app-shell .finance-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  margin-bottom: 14px;
}

.app-shell .finance-panel {
  background: linear-gradient(135deg, #0f172a, #1e293b) !important;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--app-radius);
  padding: 20px;
  box-shadow: var(--app-shadow);
}

.app-shell .finance-panel h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  color: #fff;
}

.app-shell .finance-panel p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.5;
}

.app-shell .finance-panel .quick-actions .btn {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: none !important;
}

.app-shell .finance-panel .quick-actions .btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}

.app-shell .finance-kpi {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}

.app-shell .finance-card {
  border-radius: var(--app-radius) !important;
  padding: 14px 16px !important;
  border: 1px solid var(--app-line) !important;
  box-shadow: var(--app-shadow) !important;
  color: var(--app-text) !important;
}

.app-shell .finance-card::after {
  display: none !important;
}

.app-shell .finance-card.green {
  background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%) !important;
  border-left: 4px solid #16a34a !important;
}

.app-shell .finance-card.blue {
  background: linear-gradient(180deg, #fff 0%, #eff6ff 100%) !important;
  border-left: 4px solid #2563eb !important;
}

.app-shell .finance-card.orange {
  background: linear-gradient(180deg, #fff 0%, #fff7ed 100%) !important;
  border-left: 4px solid #ea580c !important;
  color: var(--app-text) !important;
}

.app-shell .finance-card.red {
  background: linear-gradient(180deg, #fff 0%, #fef2f2 100%) !important;
  border-left: 4px solid #dc2626 !important;
}

.app-shell .finance-card .big {
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  line-height: 1.2;
  margin: 6px 0 4px;
  color: var(--app-text) !important;
}

.app-shell .finance-card.green .big { color: #166534 !important; }
.app-shell .finance-card.blue .big { color: #1d4ed8 !important; }
.app-shell .finance-card.orange .big { color: #c2410c !important; }
.app-shell .finance-card.red .big { color: #b91c1c !important; }

.app-shell .finance-card h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  border: 0;
  padding: 0;
}

.app-shell .finance-card p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.45;
  color: #334155;
}

.app-shell .finance-alert {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: var(--app-radius);
  padding: 12px 14px;
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
}

.app-shell .badge-soft {
  display: inline-block;
  border-radius: 999px;
  background: #f1f5f9;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

/* Modul umum — panel, section, tombol pf */
.app-shell .section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--app-line);
}

.app-shell .section-title > span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--app-text);
}

.app-shell .section-title > small {
  color: var(--app-muted);
  font-weight: 600;
  font-size: 12px;
}

.app-shell .ws-panel-head h3,
.app-shell .ws-card-head h3,
.app-shell .form-card-head h3,
.app-shell .box-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--app-text);
}

.app-shell .ws-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.app-shell .ws-cards .ws-card {
  text-align: center;
  padding: 16px;
}

.app-shell .ws-cards .ws-card .num {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--app-text);
}

.app-shell .ws-cards .ws-card .lbl {
  font-size: 12px;
  color: var(--app-muted);
  font-weight: 600;
  margin-top: 4px;
}

.app-shell .pf-btn,
.app-shell .pf-btn.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  padding: 9px 14px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  min-height: 38px;
  cursor: pointer;
}

.app-shell .pf-btn {
  background: var(--app-accent);
  color: #fff !important;
  border: 0;
}

.app-shell .pf-btn.secondary {
  background: #f1f5f9 !important;
  color: var(--app-text) !important;
  border: 1px solid var(--app-line);
}

.app-shell .pf-table-wrap,
.app-shell .pf-form {
  margin-top: 4px;
}

.app-shell .pf-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.app-shell .pf-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--app-muted);
}

.app-shell .pf-form .full {
  grid-column: 1 / -1;
}

/* Laporan WA vs Kunjungan */
.app-shell .wa-report-page {
  max-width: 1280px;
}

.app-shell .wa-report-filter {
  margin-bottom: 0;
  box-shadow: none;
  border: 0;
  padding: 0;
  background: transparent;
}

.app-shell .wa-report-scope {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--app-muted);
  font-weight: 600;
}

.app-shell .wa-report-kpi {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-shell .wa-funnel-card .pf-title {
  margin-bottom: 16px;
}

.app-shell .wa-funnel {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}

.app-shell .wa-funnel-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  min-height: 120px;
  padding: 16px 12px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: #fafbfc;
}

.app-shell .wa-funnel-step--deal {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.app-shell .wa-funnel-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.app-shell .wa-funnel-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--app-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.app-shell .wa-funnel-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--app-text);
  line-height: 1.1;
}

.app-shell .wa-funnel-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 48px;
  color: var(--app-muted);
  font-weight: 700;
}

.app-shell .wa-funnel-arrow span {
  font-size: 1.25rem;
  line-height: 1;
}

.app-shell .wa-funnel-arrow small {
  font-size: 11px;
  font-weight: 700;
  color: var(--app-accent);
  background: #f1f5f9;
  border-radius: 999px;
  padding: 2px 8px;
}

@media (max-width: 900px) {
  .app-shell .wa-report-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app-shell .wa-funnel {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .app-shell .wa-funnel-arrow {
    flex-direction: row;
    min-width: 0;
    padding: 4px 0;
  }
  .app-shell .wa-funnel-arrow span {
    transform: rotate(90deg);
  }
}

@media (max-width: 560px) {
  .app-shell .wa-report-kpi {
    grid-template-columns: 1fr;
  }
}

/* SC — daftar layanan service */
.app-shell .sc-service-page {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.app-shell .sc-service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.app-shell .sc-service-notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.app-shell .sc-service-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.app-shell .sc-service-tab {
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid var(--app-line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  color: #334155;
  font-weight: 600;
  font-size: 13px;
}

.app-shell .sc-service-tab.active {
  background: var(--app-accent);
  border-color: var(--app-accent);
  color: #fff;
}

.app-shell .sc-service-filter {
  margin-bottom: 0;
  box-shadow: none;
  border: 0;
  padding: 0;
  background: transparent;
}

.app-shell .sc-service-filter .sc-service-search {
  flex: 1 1 220px;
  min-width: 180px;
}

.app-shell .sc-service-table td small {
  color: var(--app-muted);
  font-size: 12px;
}

.app-shell .sc-service-table .ket-box {
  max-width: 260px;
  font-size: 12px;
  line-height: 1.4;
  color: #334155;
}

.app-shell .sc-service-table .ket-box b {
  display: block;
  margin-bottom: 2px;
  color: var(--app-text);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.app-shell .sc-service-table .ket-line {
  display: block;
  margin-top: 2px;
}

.app-shell .sc-service-table .ket-box .muted {
  color: var(--app-muted);
  font-style: italic;
}

.app-shell .sc-service-table td a {
  font-weight: 600;
  text-decoration: none;
  color: #1d4ed8;
}

.app-shell .sc-service-table td a:hover {
  text-decoration: underline;
}

.app-shell .status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  color: #334155;
}

.app-shell .status-badge.booking { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.app-shell .status-badge.menunggu { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.app-shell .status-badge.proses { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
.app-shell .status-badge.qc { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.app-shell .status-badge.selesai { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.app-shell .status-badge.batal { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }

.app-shell .hrd-section > h3,
.app-shell .section > h3 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--app-line);
  font-size: 0.95rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .app-shell .finance-hero,
  .app-shell .finance-grid-2 {
    grid-template-columns: 1fr;
  }
  .app-shell .finance-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app-shell .finance-grid-2 {
    grid-template-columns: 1fr;
  }
  .app-shell .kpi-row,
  .app-shell .rev627-kpi,
  .app-shell .flpt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.app-shell .finance-card.green .fin-link-light {
  color: #166534 !important;
  font-weight: 700;
  text-decoration: underline;
}

.app-shell .print-only {
  display: none;
}

@media (max-width: 800px) {
  .app-shell .finance-filter label,
  .app-shell .fin-filter label {
    width: 100%;
  }
  .app-shell .finance-filter input,
  .app-shell .finance-filter select,
  .app-shell .fin-filter input,
  .app-shell .fin-filter select {
    width: 100%;
    min-width: 0;
  }
}

@media print {
  .app-shell .sidebar-modern,
  .app-shell .ws-mobile-topbar,
  .app-shell .bottom-nav-v3,
  .app-shell .finance-filter,
  .app-shell .fin-filter,
  .app-shell .action-row,
  .app-shell .rev627-tabs,
  .app-shell .btn {
    display: none !important;
  }
  .app-shell main.app-main {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .app-shell .card,
  .app-shell .page-card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
  .app-shell .print-only {
    display: block !important;
  }
}

@media (max-width: 560px) {
  .app-shell main.app-main {
    padding: 12px 12px 24px;
  }
  .app-shell .finance-kpi,
  .app-shell .kpi-row,
  .app-shell .rev627-kpi,
  .app-shell .flpt-grid,
  .app-shell .dashboard-grid,
  .app-shell .fin-kpi {
    grid-template-columns: 1fr;
  }
}

/* Legacy list / CRM / SC / Tele — otomatis rapi tanpa migrasi penuh */
.app-shell .ws-list-page {
  max-width: 1400px;
}

.app-shell .ws-list-page.sc-followup-page,
.app-shell .ws-list-page.sc-riwayat-crm-page {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.app-shell .sc-crm-stat-grid,
.app-shell .sc-crm-grid,
.app-shell .sc-fu-stat-grid,
.app-shell .crm-summary-clean {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.app-shell .sc-crm-stat,
.app-shell .sc-fu-stat,
.app-shell .crm-summary-clean .card {
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--app-shadow);
}

.app-shell .sc-crm-stat span,
.app-shell .sc-fu-stat span,
.app-shell .crm-summary-clean .card span {
  display: block;
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-shell .sc-crm-stat b,
.app-shell .sc-fu-stat b,
.app-shell .crm-summary-clean .card b {
  display: block;
  font-size: 1.45rem;
  line-height: 1.15;
  color: var(--app-text);
  margin-top: 6px;
}

.app-shell .sc-fu-filter,
.app-shell .filter-grid,
.app-shell .list-filter-grid,
.app-shell .filter-panel form,
.app-shell .crm-search-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--app-shadow);
}

.app-shell .sc-fu-filter label,
.app-shell .filter-grid label,
.app-shell .list-filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--app-muted);
  margin: 0;
}

.app-shell .sc-fu-table,
.app-shell .sc-crm-table,
.app-shell .pf-table,
.app-shell .fu-table,
.app-shell .master-table {
  width: 100%;
  border-collapse: collapse;
}

.app-shell .ws-list-actions,
.app-shell .action-inline,
.app-shell .sc-fu-actions,
.app-shell .ws-chip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.app-shell .ws-list-tabs,
.app-shell .quick-fu-tabs,
.app-shell .status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.app-shell .ws-list-tab,
.app-shell .quick-fu-tabs a,
.app-shell .status-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--app-line);
  background: #fff;
  color: #334155;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.app-shell .ws-list-tab.active,
.app-shell .quick-fu-tabs a.active,
.app-shell .status-tabs a.active {
  background: var(--app-accent);
  border-color: var(--app-accent);
  color: #fff;
}

.app-shell .quick-fu-tabs a.today {
  border-color: #facc15;
  color: #854d0e;
  background: #fffbeb;
}

.app-shell .quick-fu-tabs a.tomorrow {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #eff6ff;
}

.app-shell .quick-fu-tabs a.late {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff1f2;
}

.app-shell .empty-box,
.app-shell .empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--app-muted);
  background: #f8fafc;
  border: 1px dashed var(--app-line);
  border-radius: 12px;
}

.app-shell .empty-box h2,
.app-shell .empty h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--app-text);
}

.app-shell .sc-crm-badge,
.app-shell .sc-fu-badge {
  display: inline-block;
  background: #eef2ff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #1e3a8a;
}

.app-shell .sc-crm-muted,
.app-shell .sc-fu-muted,
.app-shell .readonly-lock {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 600;
}

.app-shell .ws-list-scope {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--app-muted);
}

.app-shell .page-card.ws-list-no-dup-title .page-title-row {
  display: none;
}

.app-shell .btn-view,
.app-shell .btn-wa,
.app-shell .ws-chip-wa {
  background: #fffbeb !important;
  border: 1px solid #fcd34d !important;
  color: #92400e !important;
}

.app-shell .btn-edit,
.app-shell .ws-chip-edit,
.app-shell .sc-fu-actions a {
  background: #eef2ff !important;
  border: 1px solid #c7d2fe !important;
  color: #1e3a8a !important;
  border-radius: 10px;
  padding: 6px 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.app-shell .btn.follow,
.app-shell a.btn.follow {
  background: #ecfdf5 !important;
  border: 1px solid #bbf7d0 !important;
  color: #166534 !important;
}

.app-shell .danger-link,
.app-shell a.btn.danger-link {
  background: #fff1f2 !important;
  border: 1px solid #fecdd3 !important;
  color: #9f1239 !important;
}

.app-shell .ws-list-actions .pf-btn,
.app-shell .ws-chip-actions .ws-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--app-line);
  background: #f8fafc;
  color: var(--app-text);
}

.app-shell .ws-chip-actions .ws-chip-wa {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.app-shell .crm-search-panel,
.app-shell .crm-section-head + .cards {
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
  background: var(--app-card);
  margin-bottom: 14px;
}

.app-shell .crm-section-head {
  background: #0f1115;
  color: #fff;
  border-radius: var(--app-radius) var(--app-radius) 0 0;
  padding: 14px 16px;
  border-bottom: 3px solid #d4af37;
}

.app-shell .crm-section-head small {
  color: #fde68a;
  font-weight: 600;
}

.app-shell .sc-crm-filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.app-shell .sc-crm-panel {
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--app-shadow);
}

.app-shell .sc-crm-history-item {
  border-left: 4px solid #d4af37;
  background: #fffbeb;
  padding: 10px 12px;
  margin: 8px 0;
  border-radius: 10px;
}

.app-shell .sc-crm-btn,
.app-shell .sc-crm-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}
