@CHARSET "ISO-8859-1";



/* =========================
   PAGE BACKGROUND + SCROLL
   ========================= */
.dash-page,
.dash-page>.z-window-content {
	background: #f8fafc;
}

.dash-page>.z-window-content {
	padding: 0 !important;
	height: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	box-sizing: border-box;
	padding-bottom: 16px;
}

/* ❌ REMOVE these globally — they break ZK layouts */
/* html, body { height:100%; overflow:hidden; } */


/* =========================
   HEADER
   ========================= */
.dash-header {
	padding: 14px 16px;
	border-bottom: 1px solid #e5e7eb;
	background: #f8fafc;
}

.dash-title {
	font-size: 20px;
	font-weight: 800;
	color: #111827;
}

.dash-subtitle {
	font-size: 13px;
	color: #6b7280;
}

.dash-filters {
	display: flex;
	align-items: center;
	gap: 10px;
}

.dash-input {
	border-radius: 10px;
	padding: 6px 10px;
	border: 1px solid #e5e7eb;
	background: #fff;
}

.dash-btn-primary {
	background: #7c3aed;
	color: #fff;
	border-radius: 10px;
	padding: 8px 16px;
	border: 0;
	font-weight: 700;
	cursor: pointer;
}

.dash-asof-row {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	width: 100%;
	margin-top: 6px;
}

.dash-asof-label,
.dash-asof-hint {
	font-size: 12px;
	color: #6b7280;
	font-weight: 600;
}

.dash-asof-value {
	font-size: 12px;
	color: #111827;
	font-weight: 800;
}

.dash-asof-sep {
	font-size: 12px;
	color: #9ca3af;
}


/* =========================
   KPI SECTION
   ========================= */
.dash-kpi-section {
	background: #f8fafc;
	padding: 16px 0;
	border-bottom: 1px solid #eef2f7;
}

.dash-kpi-row {
	margin: 0 16px;
	width: calc(100% - 32px);
	display: flex;
	gap: 16px;
	align-items: stretch;
	flex-wrap: nowrap;
	box-sizing: border-box;
}

.dash-kpi-card {
	flex: 1 1 0;
	min-width: 0;
	background: #fff;
	border-radius: 14px;
	padding: 16px 18px;
	border: 1px solid #eef2f7;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
	box-sizing: border-box;
}

.dash-kpi-title {
	font-size: 13px;
	font-weight: 700;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.dash-kpi-value {
	font-size: 44px;
	font-weight: 900;
	color: #111827;
	line-height: 1;
	margin-top: 6px;
}

.dash-kpi-icon {
	width: 50px;
	height: 50px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
}

.dash-kpi-blue {
	background: #e0f2fe;
	color: #0284c7;
}

.dash-kpi-green {
	background: #dcfce7;
	color: #16a34a;
}

.dash-kpi-orange {
	background: #fff7ed;
	color: #ea580c;
}

.dash-kpi-purple {
	background: #f3e8ff;
	color: #7c3aed;
}

.dash-kpi-green-text {
	color: #16a34a;
}

.dash-kpi-orange-text {
	color: #ea580c;
}

.dash-kpi-purple-text {
	color: #7c3aed;
}


/* =========================
   DASH GRID ROWS (2 columns)
   ========================= */
.dash-section {
	margin: 12px 16px;
	width: calc(100% - 32px);
	display: flex;
	gap: 12px;
	box-sizing: border-box;
	align-items: stretch;
}

/* =========================
   CARDS
   ========================= */
.dash-card {
	flex: 1;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
	box-sizing: border-box;
	min-width: 0;
}

.dash-card-title {
	font-weight: 800;
	font-size: 16px;
	color: #111827;
}

.dash-card-sub {
	font-size: 12px;
	color: #6b7280;
	margin-top: 2px;
}

/* Placeholder keeps column alignment */
.dash-card-placeholder {
	background: transparent;
	border: 1px dashed #e5e7eb;
	box-shadow: none;
}

 

.dash-kpi-unit {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  margin-top: -4px;
}

/* Reduce Avg Days to Convert only */
.dash-kpi-card:last-child .dash-kpi-value {
  font-size: 36px;   /* adjust: try 34–38 */
  line-height: 1.05;
}

/* =========================
   BARS
   ========================= */
.dash-bar {
	height: 16px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #f3f4f6;
	overflow: hidden;
}

.dash-bar-fill {
	height: 100%;
	background: #9ca3af;
	border-radius: 3px;
}


/* =========================
   AGING GRID
   ========================= */
.dash-aging-grid {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dash-aging-row {
	display: grid;
	grid-template-columns: 120px 1fr 60px;
	gap: 10px;
	align-items: center;
	font-size: 13px;
	font-weight: 600;
}


/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 1100px) {
	.dash-kpi-row {
		flex-wrap: wrap;
	}

	.dash-kpi-card {
		flex: 1 1 calc(50% - 16px);
	}

	.dash-section {
		flex-wrap: wrap;
	}

	.dash-card {
		flex: 1 1 100%;
	}
}

@media (max-width: 700px) {
	.dash-kpi-card {
		flex: 1 1 100%;
	}
}


/* =======================================================================================
   DASHBOARD LISTBOX THEME (isolated)
   Applies ONLY when listbox has sclass="dash-list" and is inside .dash-page
   ======================================================================================= */

.dash-page .dash-list.z-listbox{
  border: 0 !important;
  background: transparent;
}

/* header strip */
.dash-page .dash-list .z-listhead{
  background: #f8fafc;
}

.dash-page .dash-list .z-listheader{
  border-color: #e5e7eb !important;
  background: #f8fafc;
}

.dash-page .dash-list .z-listheader-content{
  font-size: 12px;
  font-weight: 800;
  color: #374151;
  padding: 10px 10px !important;
}

/* body rows */
.dash-page .dash-list .z-listitem{
  border-color: #eef2f7 !important;
}

.dash-page .dash-list .z-listcell{
  border-color: #eef2f7 !important;
}

.dash-page .dash-list .z-listcell-content{
  padding: 10px 10px !important;
  font-size: 13px;
  color: #111827;
}

/* zebra */
.dash-page .dash-list .z-listitem:nth-child(even){
  background: #fafafa;
}

/* hover */
.dash-page .dash-list .z-listitem:hover{
  background: #f3f4f6;
}

/* selected */
.dash-page .dash-list .z-listitem.z-listitem-selected{
  background: #eef2ff;
}
.dash-page .dash-list .z-listitem.z-listitem-selected .z-listcell-content{
  font-weight: 700;
}

/* right aligned number cell helper */
.dash-page .dash-num{
  text-align: right;
  font-weight: 800;
  color: #111827;
}


/* bar base */
.dash-bar{ height:16px; border:1px solid #d1d5db; border-radius:4px; background:#f3f4f6; overflow:hidden; }
.dash-bar-fill{ height:100%; border-radius:3px; }

/* number cell */
.dash-page .dash-num{
  text-align:right;
  font-weight:900;
}

/* ---------- Bar colors by widget ---------- */
.dash-page .dash-list-fac .dash-bar-fill { background:#60a5fa; }
.dash-page .dash-list-prov .dash-bar-fill { background:#34d399; }
.dash-page .dash-list-pay .dash-bar-fill { background:#a78bfa; }


/* make numbers match */
.dash-page .dash-list-fac .dash-num { color:#2563eb; }
.dash-page .dash-list-prov .dash-num { color:#059669; }
.dash-page .dash-list-pay .dash-num { color:#7c3aed; }
.dash-page .dash-list-status .dash-num { color:#ea580c; }


.dash-num-link {
  color: #2563eb;              /* blue */
  font-weight: 700;
  font-size: 14px;             /* increase */
  text-decoration: underline;
  cursor: pointer;
}

.dash-num-link:hover {
  color: #1d4ed8;
}


.dash-num-link-label {
  color: #2563eb !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  text-decoration: underline !important;
  cursor: pointer !important;
}
.dash-num-link-label:hover {
  color: #1d4ed8 !important;
}


.dash-kpi-link {
  cursor: pointer !important;
  text-decoration: underline;
}

.dash-kpi-link:hover {
  opacity: 0.85;
}


.dash-date-label {
    min-width: 120px;
    padding: 6px 10px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    background-color: #f9f9f9;
    color: #333;
    font-size: 13px;
    text-align: center;
}




/* Aging colors */
.aging-0-7  { background:#22c55e; }  /* green */
.aging-8-15 { background:#eab308; }  /* yellow */
.aging-16-30{ background:#f59e0b; }  /* orange */
.aging-31-60{ background:#ef4444; }  /* red */
.aging-60p  { background:#991b1b; }  /* dark red */

.aging-unknown{
	background:#9ca3af; /* gray fallback */
}

/* bar shell (if not already defined) */
.dash-bar{
	height:16px;
	width:100%;
	background:#f3f4f6;
	border:1px solid #d1d5db;
	border-radius:4px;
	overflow:hidden;
}

.dash-bar-fill{
	height:16px;
	border-radius:4px;
}


.dash-bar-fill.status-c0 { background: #22c55e; } /* green */
.dash-bar-fill.status-c1 { background: #3b82f6; } /* blue */
.dash-bar-fill.status-c2 { background: #f59e0b; } /* amber */
.dash-bar-fill.status-c3 { background: #ef4444; } /* red */
.dash-bar-fill.status-c4 { background: #a855f7; } /* purple */
.dash-bar-fill.status-c5 { background: #14b8a6; } /* teal */
.dash-bar-fill.status-c6 { background: #f97316; } /* orange */
.dash-bar-fill.status-c7 { background: #64748b; } /* slate */


/* ================= AGING COLORS (FINAL) ================= */

.dash-page .dash-bar-fill.aging-c0 { background:#22c55e; } /* 0–30 */
.dash-page .dash-bar-fill.aging-c1 { background:#eab308; } /* 31–60 */
.dash-page .dash-bar-fill.aging-c2 { background:#f59e0b; } /* 61–90 */
.dash-page .dash-bar-fill.aging-c3 { background:#ef4444; } /* 91–120 */
.dash-page .dash-bar-fill.aging-c4 { background:#991b1b; } /* 120+ */
