/**
 * Dashboard Perkara & Penagihan — seluruh style modul ada di file ini.
 * Dimuat hanya di /dashboard/* dan di halaman yang memakai shortcode portal/statistik.
 *
 * Semua selector diawali .dwp-* dan mayoritas di-scope ke .dwp-dash supaya
 * tidak bocor ke halaman Themify, dan sebaliknya CSS Themify (yang ikut termuat
 * lewat wp_head) tidak menabrak layout dashboard.
 */

.dwp-dash {
	--dwp-bg: #f4f6f9;
	--dwp-surface: #ffffff;
	--dwp-ink: #1c2430;
	--dwp-ink-soft: #5b6875;
	--dwp-line: #dfe4ea;
	--dwp-brand: #123a6b;
	--dwp-brand-dark: #0d2b50;
	--dwp-accent: #b8892c;

	--dwp-green: #17693f;
	--dwp-green-bg: #e4f4ea;
	--dwp-amber: #7a5300;
	--dwp-amber-bg: #fdf1d8;
	--dwp-red: #a11d1d;
	--dwp-red-bg: #fbe6e6;
	--dwp-blue: #1b4f9c;
	--dwp-blue-bg: #e5eefb;
	--dwp-grey: #4a5561;
	--dwp-grey-bg: #eceff3;

	--dwp-radius: 10px;
	--dwp-shadow: 0 1px 2px rgba(16, 30, 54, .06), 0 4px 14px rgba(16, 30, 54, .06);
	--dwp-sidebar-w: 244px;

	color: var(--dwp-ink);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------ Reset lokal */

.dwp-dash *,
.dwp-dash *::before,
.dwp-dash *::after {
	box-sizing: border-box;
}

body.dwp-body {
	margin: 0;
	background: #f4f6f9;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.dwp-dash h1,
.dwp-dash h2,
.dwp-dash h3,
.dwp-dash h4 {
	margin: 0 0 .5em;
	line-height: 1.3;
	color: var(--dwp-ink);
	font-weight: 600;
}

.dwp-dash p {
	margin: 0 0 .75em;
}

.dwp-dash a {
	color: var(--dwp-bg);
}

.dwp-dash ul,
.dwp-dash ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Fokus keyboard harus selalu kelihatan — jangan pernah dihapus. */
.dwp-dash a:focus-visible,
.dwp-dash button:focus-visible,
.dwp-dash input:focus-visible,
.dwp-dash select:focus-visible,
.dwp-dash textarea:focus-visible {
	outline: 2px solid var(--dwp-brand);
	outline-offset: 2px;
}

/* ------------------------------------------------------------ Shell & nav */

.dwp-shell {
	display: flex;
	min-height: 100vh;
	align-items: stretch;
}

.dwp-sidebar {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 40;
	display: flex;
	width: var(--dwp-sidebar-w);
	flex-direction: column;
	padding: 20px 14px;
	background: var(--dwp-brand-dark);
	color: #e8edf4;
	overflow-y: auto;
}

.dwp-main {
	min-width: 0;
	flex: 1;
	margin-left: var(--dwp-sidebar-w);
}

.dwp-content {
	padding: 22px clamp(14px, 3vw, 30px) 60px;
}

.dwp-brand {
	display: flex;
	flex-direction: column;
	margin-bottom: 22px;
	gap: 2px;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: .2px;
}

.dwp-sidebar .dwp-brand a,
.dwp-sidebar .dwp-brand span:first-child {
	color: #fff;
	text-decoration: none;
}

.dwp-brand-sub {
	color: #a9bdd6;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: .3px;
	text-transform: uppercase;
}

.dwp-brand--center {
	align-items: center;
	text-align: center;
}

.dwp-brand--center span:first-child {
	color: var(--dwp-brand);
	font-size: 20px;
}

.dwp-brand--center .dwp-brand-sub {
	color: var(--dwp-ink-soft);
}

.dwp-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.dwp-nav--foot {
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, .14);
}

.dwp-nav-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	border-radius: 8px;
	color: #cfdcec;
	font-size: 14.5px;
	gap: 8px;
	text-decoration: none;
}

.dwp-nav-item:hover,
.dwp-nav-item:focus {
	background: rgba(255, 255, 255, .09);
	color: #fff;
}

.dwp-nav-item.is-active {
	background: var(--dwp-accent);
	color: #1f1704;
	font-weight: 600;
}

/* ------------------------------------------------------------ Topbar */

.dwp-topbar {
	position: sticky;
	top: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	padding: 12px clamp(14px, 3vw, 30px);
	border-bottom: 1px solid var(--dwp-line);
	background: var(--dwp-surface);
	gap: 12px;
}

.dwp-page-title {
	overflow: hidden;
	margin: 0;
	font-size: 19px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.dwp-topbar-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin-left: auto;
	gap: 8px;
}

.dwp-user {
	color: var(--dwp-ink-soft);
	font-size: 13.5px;
}

.dwp-burger {
	display: none;
	padding: 6px 10px;
	border: 1px solid var(--dwp-line);
	border-radius: 8px;
	background: #fff;
	color: var(--dwp-ink);
	cursor: pointer;
	font-size: 17px;
	line-height: 1;
}

/* ------------------------------------------------------------ Kartu */

.dwp-card {
	margin-bottom: 18px;
	padding: 18px;
	border: 1px solid var(--dwp-line);
	border-radius: var(--dwp-radius);
	background: var(--dwp-surface);
	box-shadow: var(--dwp-shadow);
}

.dwp-card-title {
	margin: 0 0 14px;
	font-size: 15.5px;
	font-weight: 600;
}

.dwp-card-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	gap: 10px;
}

.dwp-card-head .dwp-card-title {
	margin: 0;
}

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

/* ------------------------------------------------------------ Metrik */

.dwp-metrics {
	display: grid;
	margin-bottom: 18px;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.dwp-metric {
	display: flex;
	flex-direction: column;
	padding: 14px 16px;
	border: 1px solid var(--dwp-line);
	border-left: 4px solid var(--dwp-grey);
	border-radius: var(--dwp-radius);
	background: var(--dwp-surface);
	box-shadow: var(--dwp-shadow);
	color: inherit;
	gap: 2px;
	text-decoration: none;
}

a.dwp-metric:hover {
	border-color: var(--dwp-brand);
}

.dwp-metric-value {
	font-size: 25px;
	font-weight: 700;
	letter-spacing: -.4px;
	line-height: 1.2;
}

.dwp-metric-label {
	color: var(--dwp-ink-soft);
	font-size: 13px;
}

.dwp-metric--green { border-left-color: var(--dwp-green); }
.dwp-metric--amber { border-left-color: var(--dwp-amber); }
.dwp-metric--red   { border-left-color: var(--dwp-red); }
.dwp-metric--blue  { border-left-color: var(--dwp-blue); }

.dwp-metric--green .dwp-metric-value { color: var(--dwp-green); }
.dwp-metric--amber .dwp-metric-value { color: var(--dwp-amber); }
.dwp-metric--red .dwp-metric-value   { color: var(--dwp-red); }
.dwp-metric--blue .dwp-metric-value  { color: var(--dwp-blue); }

/* Nilai rupiah bisa panjang; jangan sampai memecah grid. */
.dwp-metric-value {
	overflow-wrap: anywhere;
}

/* ------------------------------------------------------------ Tombol */

.dwp-dash .dwp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 16px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: var(--dwp-brand);
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	gap: 6px;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background .12s ease, border-color .12s ease;
}

.dwp-dash .dwp-btn:hover {
	background: var(--dwp-brand-dark);
	color: #fff;
}

.dwp-dash .dwp-btn--primary {
	background: var(--dwp-brand);
	color: #fff;
}

.dwp-dash .dwp-btn--ghost {
	border-color: var(--dwp-line);
	background: #fff;
	color: var(--dwp-ink);
}

.dwp-dash .dwp-btn--ghost:hover {
	border-color: var(--dwp-brand);
	background: #f2f5fa;
	color: var(--dwp-brand);
}

.dwp-dash .dwp-btn--danger {
	background: var(--dwp-red);
	color: #fff;
}

.dwp-dash .dwp-btn--danger:hover {
	background: #861717;
}

.dwp-dash .dwp-btn--sm {
	padding: 5px 10px;
	font-size: 13px;
}

.dwp-dash .dwp-btn--block {
	width: 100%;
}

.dwp-dash .dwp-btn[disabled],
.dwp-dash .dwp-btn[aria-busy="true"] {
	cursor: default;
	opacity: .6;
}

.dwp-row-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

/* ------------------------------------------------------------ Tabel */

.dwp-table-wrap {
	overflow-x: auto;
	margin: 0 -4px;
	padding: 0 4px;
}

.dwp-dash .dwp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.dwp-dash .dwp-table th,
.dwp-dash .dwp-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--dwp-line);
	text-align: left;
	vertical-align: middle;
}

.dwp-dash .dwp-table thead th {
	background: #f7f9fc;
	color: var(--dwp-ink-soft);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .3px;
	text-transform: uppercase;
	white-space: nowrap;
}

.dwp-dash .dwp-table tbody tr:hover {
	background: #fafbfd;
}

.dwp-dash .dwp-table .dwp-num,
.dwp-dash .dwp-table th.dwp-num {
	text-align: right;
	white-space: nowrap;
}

.dwp-dash .dwp-table .dwp-invoice-link {
	color: var(--dwp-ink) !important;
}

.dwp-dash .dwp-table .dwp-invoice-link:hover {
	color: var(--dwp-blue) !important;
}

.dwp-dash .dwp-table tfoot th,
.dwp-dash .dwp-table tfoot td {
	border-bottom: none;
	font-weight: 600;
}

.dwp-dash .dwp-invoice-total th,
.dwp-dash .dwp-invoice-total td {
	border-top: 2px solid var(--dwp-ink);
	font-size: 15.5px;
}

/* Baris item invoice: input harus penuh selebar kolom. */
.dwp-items input {
	width: 100%;
}

.dwp-items .dwp-num input {
	text-align: right;
}

.dwp-items td:nth-child(2) { width: 80px; }
.dwp-items td:nth-child(3) { width: 150px; }
.dwp-items td:nth-child(5) { width: 44px; }

/* ------------------------------------------------------------ Form */

.dwp-form .dwp-grid-2 {
	margin-bottom: 4px;
}

.dwp-field {
	display: flex;
	flex-direction: column;
	margin-bottom: 14px;
	gap: 5px;
}

.dwp-field--full {
	grid-column: 1 / -1;
}

.dwp-dash label {
	color: var(--dwp-ink);
	font-size: 13.5px;
	font-weight: 500;
}

.dwp-dash .dwp-form > label {
	display: block;
	margin-bottom: 5px;
}

.dwp-dash input[type="text"],
.dwp-dash input[type="search"],
.dwp-dash input[type="email"],
.dwp-dash input[type="password"],
.dwp-dash input[type="number"],
.dwp-dash input[type="date"],
.dwp-dash input[type="file"],
.dwp-dash select,
.dwp-dash textarea {
	width: 100%;
	max-width: 100%;
	padding: 9px 11px;
	border: 1px solid var(--dwp-line);
	border-radius: 8px;
	background: #fff;
	color: var(--dwp-ink);
	font: inherit;
	font-size: 14px;
}

.dwp-dash .dwp-form > input,
.dwp-dash .dwp-form > select,
.dwp-dash .dwp-form > textarea {
	margin-bottom: 14px;
}

.dwp-dash textarea {
	min-height: 80px;
	resize: vertical;
}

.dwp-dash input:focus,
.dwp-dash select:focus,
.dwp-dash textarea:focus {
	border-color: var(--dwp-brand);
}

.dwp-check {
	display: flex;
	align-items: center;
	margin-bottom: 10px;
	font-weight: 400;
	gap: 8px;
}

.dwp-check input {
	width: auto;
	margin: 0;
}

.dwp-form-actions,
.dwp-modal-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	margin-top: 14px;
	gap: 8px;
}

.dwp-form-msg {
	margin: 8px 0 0;
	color: var(--dwp-ink-soft);
	font-size: 13.5px;
	min-height: 1.2em;
}

.dwp-form-msg.is-error {
	color: var(--dwp-red);
	font-weight: 500;
}

.dwp-filters {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 14px;
	gap: 8px;
}

.dwp-filters input[type="search"] {
	min-width: 220px;
	flex: 1 1 240px;
}

.dwp-filters select {
	width: auto;
	min-width: 150px;
}

/* Drag & drop lampiran */
.dwp-drop {
	padding: 16px;
	border: 2px dashed var(--dwp-line);
	border-radius: var(--dwp-radius);
	background: #fafbfd;
	text-align: center;
}

.dwp-drop.is-over {
	border-color: var(--dwp-brand);
	background: #eef3fb;
}

.dwp-drop input[type="file"] {
	border: none;
	background: transparent;
}

.dwp-droplist {
	margin-top: 8px;
	color: var(--dwp-ink-soft);
	font-size: 13px;
	text-align: left;
}

.dwp-droplist li {
	padding: 2px 0;
}

/* Total invoice di form */
.dwp-totals {
	display: flex;
	flex-direction: column;
	max-width: 340px;
	margin: 14px 0 14px auto;
	gap: 8px;
}

.dwp-totals > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.dwp-totals label {
	margin: 0;
}

.dwp-totals input {
	max-width: 160px;
	text-align: right;
}

.dwp-totals-grand {
	padding-top: 8px;
	border-top: 2px solid var(--dwp-ink);
	font-size: 17px;
	font-weight: 700;
}

/* ------------------------------------------------------------ Badge & pill */

.dwp-badge,
.dwp-pill,
.dwp-chip {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--dwp-grey-bg);
	color: var(--dwp-grey);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
}

.dwp-badge--green { background: var(--dwp-green-bg); color: var(--dwp-green); }
.dwp-badge--amber { background: var(--dwp-amber-bg); color: var(--dwp-amber); }
.dwp-badge--red   { background: var(--dwp-red-bg);   color: var(--dwp-red); }
.dwp-badge--blue  { background: var(--dwp-blue-bg);  color: var(--dwp-blue); }
.dwp-badge--grey  { background: var(--dwp-grey-bg);  color: var(--dwp-grey); }

.dwp-pill--red    { background: var(--dwp-red);   color: #fff; }
.dwp-pill--green  { background: var(--dwp-green); color: #fff; }

.dwp-chip {
	margin: 0 6px 6px 0;
	background: var(--dwp-blue-bg);
	color: var(--dwp-blue);
	font-weight: 500;
}

/* ------------------------------------------------------------ Alert */

.dwp-alert {
	margin: 0 0 12px;
	padding: 10px 13px;
	border-left: 4px solid var(--dwp-grey);
	border-radius: 8px;
	background: var(--dwp-grey-bg);
	color: var(--dwp-grey);
	font-size: 14px;
}

.dwp-alert--red   { border-color: var(--dwp-red);   background: var(--dwp-red-bg);   color: var(--dwp-red); }
.dwp-alert--amber { border-color: var(--dwp-amber); background: var(--dwp-amber-bg); color: var(--dwp-amber); }
.dwp-alert--green { border-color: var(--dwp-green); background: var(--dwp-green-bg); color: var(--dwp-green); }

/* ------------------------------------------------------------ Teks bantu */

.dwp-muted { color: var(--dwp-ink-soft); }
.dwp-small { font-size: 12.8px; }

.dwp-code {
	display: inline-block;
	padding: 2px 7px;
	border: 1px solid var(--dwp-line);
	border-radius: 6px;
	background: #f4f6f9;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	letter-spacing: .5px;
}

.dwp-code--big {
	padding: 8px 14px;
	font-size: 19px;
	font-weight: 600;
}

.dwp-prose {
	color: var(--dwp-ink);
	font-size: 14.5px;
}

.dwp-prose p:last-child {
	margin-bottom: 0;
}

.dwp-list li {
	display: flex;
	flex-wrap: wrap;
	padding: 8px 0;
	border-bottom: 1px solid var(--dwp-line);
	font-size: 14px;
	gap: 6px;
}

.dwp-list li:last-child {
	border-bottom: none;
}

.dwp-deflist {
	margin: 0;
}

.dwp-deflist > div {
	display: flex;
	flex-wrap: wrap;
	padding: 7px 0;
	border-bottom: 1px solid var(--dwp-line);
	gap: 8px;
}

.dwp-deflist > div:last-child {
	border-bottom: none;
}

.dwp-deflist dt {
	flex: 0 0 170px;
	color: var(--dwp-ink-soft);
	font-size: 13.5px;
}

.dwp-deflist dd {
	flex: 1 1 180px;
	margin: 0;
	font-size: 14px;
}

/* ------------------------------------------------------------ Klien ID */

.dwp-clientid {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin-bottom: 14px;
	gap: 10px;
}

.dwp-wa {
	margin-bottom: 10px;
	font-family: inherit;
	font-size: 13px;
}

/* ------------------------------------------------------------ Lampiran */

.dwp-filelist li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	padding: 7px 0;
	border-bottom: 1px solid var(--dwp-line);
	font-size: 14px;
	gap: 8px;
}

.dwp-filelist li:last-child {
	border-bottom: none;
}

/* ------------------------------------------------------------ Timeline */

.dwp-timeline {
	position: relative;
	padding-left: 22px;
}

.dwp-timeline::before {
	position: absolute;
	top: 6px;
	bottom: 6px;
	left: 5px;
	border-left: 2px solid var(--dwp-line);
	content: "";
}

.dwp-timeline-item {
	position: relative;
	padding: 0 0 20px;
}

.dwp-timeline-item::before {
	position: absolute;
	top: 6px;
	left: -22px;
	width: 12px;
	height: 12px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--dwp-brand);
	content: "";
}

.dwp-timeline-date {
	color: var(--dwp-ink-soft);
	font-size: 12.8px;
	font-weight: 600;
	text-transform: uppercase;
}

.dwp-timeline-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.dwp-timeline-title {
	margin: 2px 0 6px;
	font-size: 15px;
}

/* ------------------------------------------------------------ Bukti bayar */

.dwp-prooflist {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dwp-proof {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	padding: 14px;
	border: 1px solid var(--dwp-line);
	border-radius: var(--dwp-radius);
	background: #fafbfd;
	gap: 12px;
}

.dwp-proof-main {
	min-width: 240px;
	flex: 1 1 320px;
}

.dwp-proof-main p:last-child {
	margin-bottom: 0;
}

.dwp-proof-side {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.dwp-proof-thumb {
	display: inline-block;
	max-width: 220px;
	overflow: hidden;
	padding: 6px 10px;
	border: 1px solid var(--dwp-line);
	border-radius: 8px;
	background: #fff;
	font-size: 13px;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ------------------------------------------------------------ Tabs */

.dwp-tabs {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--dwp-line);
	gap: 4px;
}

.dwp-tab {
	padding: 8px 14px;
	border-bottom: 2px solid transparent;
	color: var(--dwp-ink-soft);
	font-size: 14px;
	text-decoration: none;
}

.dwp-tab:hover {
	color: var(--dwp-brand);
}

.dwp-tab.is-active {
	border-bottom-color: var(--dwp-brand);
	color: var(--dwp-brand);
	font-weight: 600;
}

/* ------------------------------------------------------------ Pagination */

.dwp-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	margin-top: 14px;
	gap: 10px;
}

.dwp-pagination-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}

.dwp-page-link {
	display: inline-block;
	min-width: 34px;
	padding: 6px 10px;
	border: 1px solid var(--dwp-line);
	border-radius: 7px;
	background: #fff;
	color: var(--dwp-ink);
	font-size: 13.5px;
	text-align: center;
	text-decoration: none;
}

.dwp-page-link:hover {
	border-color: var(--dwp-brand);
	color: var(--dwp-brand);
}

.dwp-page-link.is-active {
	border-color: var(--dwp-brand);
	background: var(--dwp-brand);
	color: #fff;
	font-weight: 600;
}

.dwp-page-dots {
	padding: 0 4px;
	color: var(--dwp-ink-soft);
}

/* ------------------------------------------------------------ Modal */

.dwp-modal {
	position: fixed;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(16, 26, 40, .55);
	inset: 0;
}

.dwp-modal[hidden] {
	display: none;
}

.dwp-modal-box {
	width: 100%;
	max-width: 460px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 20px;
	border-radius: var(--dwp-radius);
	background: #fff;
	box-shadow: 0 18px 50px rgba(10, 20, 35, .3);
}

.dwp-modal-box--wide {
	max-width: 680px;
}

body.dwp-modal-open {
	overflow: hidden;
}

/* ------------------------------------------------------------ Toast */

.dwp-toast {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 100001;
	max-width: 340px;
	padding: 12px 16px;
	border-radius: 9px;
	background: var(--dwp-ink);
	box-shadow: 0 10px 30px rgba(10, 20, 35, .28);
	color: #fff;
	font-size: 14px;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .18s ease, transform .18s ease;
}

.dwp-toast[hidden] {
	display: none;
}

.dwp-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.dwp-toast--success { background: var(--dwp-green); }
.dwp-toast--error   { background: var(--dwp-red); }

/* ------------------------------------------------------------ Login staf */

body.dwp-body--login {
	background: linear-gradient(160deg, #0d2b50 0%, #123a6b 60%, #1b4f9c 100%);
}

.dwp-login-wrap {
	display: flex;
	min-height: 100vh;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
}

.dwp-login-card {
	width: 100%;
	max-width: 400px;
	margin: 0;
	padding: 26px;
}

.dwp-login-title {
	margin-bottom: 6px;
	font-size: 20px;
}

/* ------------------------------------------------------------ Grafik */

.dwp-dash canvas {
	max-width: 100%;
}

/* ------------------------------------------------------------ Skeleton */

.dwp-skeleton {
	border-radius: 6px;
	background: linear-gradient(90deg, #eceff3 25%, #f6f8fa 50%, #eceff3 75%);
	background-size: 200% 100%;
	animation: dwp-shimmer 1.2s linear infinite;
	color: transparent;
}

.dwp-skeleton--row {
	height: 16px;
	margin-bottom: 8px;
}

@keyframes dwp-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
	.dwp-dash *,
	.dwp-skeleton {
		animation: none !important;
		transition: none !important;
	}
}

/* ------------------------------------------------------------ Portal klien
   Dirender di dalam konten Themify, jadi tanpa shell/sidebar. */

.dwp-portal {
	max-width: 900px;
	margin: 0 auto;
}

.dwp-portal .dwp-login-card {
	margin: 0 auto;
}

.dwp-portal-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	gap: 12px;
}

.dwp-portal-title {
	margin: 0;
	font-size: 22px;
}

.dwp-invoice {
	margin-bottom: 18px;
	padding: 16px;
	border: 1px solid var(--dwp-line);
	border-radius: var(--dwp-radius);
}

.dwp-invoice-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.dwp-invoice-head h4 {
	margin: 0;
	font-size: 16px;
}

.dwp-invoice-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dwp-bankbox {
	margin: 12px 0;
	padding: 12px 14px;
	border-radius: 8px;
	background: #f4f6f9;
}

.dwp-bankbox p:last-child {
	margin-bottom: 0;
}

.dwp-account {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .6px;
}

/* ------------------------------------------------------------ Lembar invoice */

.dwp-invoice-header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 2px solid var(--dwp-brand);
	gap: 14px;
}

.dwp-invoice-brand {
	margin: 0;
	color: var(--dwp-brand);
	font-size: 22px;
}

.dwp-invoice-meta {
	text-align: right;
}

.dwp-invoice-meta h3 {
	margin: 0;
	color: var(--dwp-ink-soft);
	font-size: 16px;
	letter-spacing: 2px;
}

.dwp-invoice-meta p {
	margin: 0 0 4px;
}

/* ------------------------------------------------------------ Statistik publik */

.dwp-public-stats {
	margin: 20px 0;
}

.dwp-stats-title {
	margin-bottom: 14px;
}

.dwp-types {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 18px;
	gap: 6px;
}

.dwp-public-case {
	padding: 12px 0;
	border-bottom: 1px solid var(--dwp-line);
}

.dwp-public-case:last-child {
	border-bottom: none;
}

.dwp-metrics--public .dwp-metric {
	text-align: center;
	align-items: center;
	border-left-width: 1px;
	border-top: 4px solid var(--dwp-brand);
}

/* ------------------------------------------------------------ Responsif */

@media (max-width: 900px) {
	.dwp-grid-2 {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 782px) {
	.dwp-burger {
		display: inline-flex;
	}

	.dwp-main {
		margin-left: 0;
	}

	.dwp-sidebar {
		transform: translateX(-100%);
		transition: transform .2s ease;
		box-shadow: 0 0 40px rgba(0, 0, 0, .3);
	}

	.dwp-sidebar.is-open {
		transform: translateX(0);
	}

	.dwp-page-title {
		font-size: 16.5px;
	}

	.dwp-deflist dt {
		flex-basis: 100%;
	}

	.dwp-totals {
		max-width: none;
	}
}

/* Admin bar WordPress ikut tampil untuk administrator. */
@media screen {
	body.admin-bar .dwp-sidebar {
		top: 32px;
	}

	body.admin-bar .dwp-topbar {
		top: 32px;
	}
}

@media screen and (max-width: 782px) {
	body.admin-bar .dwp-sidebar,
	body.admin-bar .dwp-topbar {
		top: 46px;
	}
}

/* ------------------------------------------------------------ Cetak
   dashboard.js menandai elemen target dengan .dwp-print-target lalu
   menambahkan .dwp-printing ke <body>; semua sisanya disembunyikan. */

@media print {
	.dwp-sidebar,
	.dwp-topbar,
	.dwp-noprint,
	.dwp-toast,
	.dwp-modal,
	#wpadminbar {
		display: none !important;
	}

	body,
	body.dwp-body {
		background: #fff !important;
	}

	.dwp-main {
		margin-left: 0 !important;
	}

	.dwp-card {
		border: none;
		box-shadow: none;
	}

	body.dwp-printing .dwp-print-target {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
	}

	body.dwp-printing > *:not(.dwp-print-target) {
		display: none !important;
	}
}
