.dash-title {
	font-family: 'DM Sans', sans-serif;
	font-size: 22px;
	font-weight: 700;
	margin: 0;
	margin-right: auto;
	color: #000;
}
.pTop .ections {
	margin-left: auto;
}

/* Desktop: boxes + bars on the left lined up with the donut's bottom, donut full height on the right */
.dash {
	border-top: solid 1px rgb(36, 35, 35);
	padding-top: 24px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr auto auto;
	grid-template-areas:
		'. donut'
		'stats donut'
		'months donut';
	gap: 24px;
}
.dash-status {
	grid-column: 1 / -1;
	color: #888;
}
.dash-top {
	display: contents;
}
.donut-card {
	grid-area: donut;
}
.stats {
	grid-area: stats;
}
.months-card {
	grid-area: months;
}
.dash-top[hidden],
.months-card[hidden] {
	display: none;
}

/* Donut */
.donut-card {
	/* Donut colors — swap these two values to flip the look */
	--donut-done: #000;
	--donut-left: #f5a800;
	--donut-logo: #000;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
}
.donut-goal {
	text-align: center;
}
.donut-goal label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #666;
	margin-bottom: 4px;
}
.donut-goal div {
	font-family: 'DM Sans', sans-serif;
	font-size: 28px;
	font-weight: 700;
	color: #000;
}
.donut {
	position: relative;
	width: 100%;
	max-width: min(560px, 60vh);
	aspect-ratio: 1;
}
.donut svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}
.donut circle {
	fill: none;
	stroke-width: 28;
}
.donut-track {
	stroke: var(--donut-left);
}
.donut-fill {
	stroke: var(--donut-done);
	transition: stroke-dasharray 1s ease;
}
/* Ring's hole is 66% wide (r 80 − half of 28 stroke); 60% leaves a small gap. Mask recolors the logo. */
.donut-logo {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 60%;
	height: 60%;
	transform: translate(-50%, -50%);
	background: var(--donut-logo);
	-webkit-mask: url('../logo/g.png') center / contain no-repeat;
	mask: url('../logo/g.png') center / contain no-repeat;
}
.donut-pct {
	font-family: 'DM Sans', sans-serif;
	font-size: 32px;
	font-weight: 700;
	color: #000;
}
.donut-legend {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	color: #666;
	width: 100%;
}
.donut-legend span {
	display: flex;
	align-items: center;
	gap: 8px;
}
.donut-legend b {
	margin-left: auto;
	color: #000;
}
.dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	display: inline-block;
}
.dot-done {
	background: var(--donut-done);
}
.dot-left {
	background: var(--donut-left);
}

/* Stat cards */
.stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	align-content: start;
}
.stat {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-left: 4px solid #f5a800;
	border-radius: 8px;
	padding: 14px 16px;
}
.stat label {
	display: block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #666;
	margin-bottom: 6px;
}
.stat div {
	font-family: 'DM Sans', sans-serif;
	font-size: 22px;
	font-weight: 700;
	color: #000;
}
.stat small {
	display: block;
	margin-top: 6px;
	font-size: 11px;
	line-height: 1.4;
	color: #888;
}
.stat .behind {
	color: #c62828;
}

/* Monthly bars */
.months-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	padding: 20px 24px;
}
.months-card h2 {
	font-family: 'DM Sans', sans-serif;
	font-size: 16px;
	margin: 0 0 16px;
}
.months {
	position: relative;
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 8px;
}
.month {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}
.month-value {
	font-size: 11px;
	font-weight: 600;
	color: #444;
	white-space: nowrap;
}
.month-bar {
	position: relative;
	width: 100%;
	max-width: 48px;
	height: 200px;
	background: #f5f5f5;
	border-radius: 4px;
	display: flex;
	align-items: flex-end;
}
.month-bar div {
	width: 100%;
	background: #f5a800;
	border-radius: 4px;
}
/* monthly goal line */
.month-bar::after {
	content: '';
	position: absolute;
	left: -4px;
	right: -4px;
	bottom: var(--goal);
	border-top: 2px dashed #000;
}
.month-name {
	font-size: 12px;
	color: #666;
}
.months-note {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: #666;
	margin: 14px 0 0;
}
.goal-swatch {
	width: 20px;
	border-top: 2px dashed #000;
}

/* Phone / tablet: stacked — donut, boxes, bars */
@media (max-width: 1024px) {
	.dash {
		grid-template-columns: 1fr;
		grid-template-rows: none;
		grid-template-areas:
			'donut'
			'stats'
			'months';
	}
	.donut {
		max-width: 240px;
	}
	.stats {
		grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	}
	.pTop {
		gap: 16px;
		flex-wrap: wrap;
	}
	/* Logo | title | icons — equal side columns keep the title exactly centered without overlapping */
	.pTop {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
	}
	.pTop .logo img {
		width: auto;
		height: 32px;
		margin-top: 6px;
	}
	.pTop .ections {
		justify-self: end;
		gap: 0;
	}
	.dash-title {
		font-size: 18px;
		margin-right: 0;
		text-align: center;
		white-space: nowrap;
	}
}

/* The whole page scrolls here and the app draws under the phone / tablet's see-through status bar —
   a white strip behind it so the boxes don't slide under the clock / battery (0 tall in a browser) */
body::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: env(safe-area-inset-top);
	background: #fff;
	z-index: 1000;
}
@media (max-width: 600px) {
	.months {
		gap: 3px;
	}
	.month-value {
		font-size: 9px;
		writing-mode: vertical-rl;
		transform: rotate(180deg);
		height: 44px;
	}
	.month-bar {
		height: 150px;
	}
}

/* pull-to-refresh spinner (added by main.js) sits at the top of the dashboard */
.dash {
	position: relative;
}

/* "Jobs Signed" opens the list of signed jobs */
.stat-link {
	display: block;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.stat-link:hover {
	border-color: #f5a800;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.stat-link small::after {
	content: ' →';
}

/* iPhone: nothing may be wider than the screen, so the page only scrolls up and down
   (it was sliding sideways when dragged) */
html,
body {
	overflow-x: hidden;
	max-width: 100%;
}
.dash > * {
	min-width: 0;
}
.months {
	grid-template-columns: repeat(12, minmax(0, 1fr));
}
.months-card {
	overflow: hidden;
}
@media (max-width: 1024px) {
	.pTop {
		grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	}
	.stats {
		grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr));
	}
}

/* Phone: no "2026 Goal" in the header (the donut card already says it) */
@media (max-width: 600px) {
	.dash-title {
		display: none;
	}
	.pTop {
		grid-template-columns: auto 1fr;
	}
}
