/*
 * PropertyCare Desk — private operations app.
 * App shell: dark sidebar, light work area, KPI tiles, responsive tables,
 * a simple Gantt/timeline, and modal forms. Shares tokens with public.css.
 */

:root {
	--pcd-green: #7ed321;
	--pcd-green-600: #6bb81b;
	--pcd-ink: #0e0f0e;
	--pcd-sidebar: #121412;
	--pcd-sidebar-hover: #1e211d;
	--pcd-grey-600: #5b6470;
	--pcd-grey-500: #7a8378;
	--pcd-grey-400: #97a0ac;
	--pcd-line: #e9ece8;
	--pcd-bg: #f4f6f2;
	--pcd-card: #ffffff;
	--pcd-radius: 14px;
	--pcd-radius-sm: 10px;
	--pcd-shadow: 0 1px 2px rgba(14, 15, 14, .04), 0 6px 24px rgba(14, 15, 14, .06);
	--pcd-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.pcd-app,
.pcd-app * { box-sizing: border-box; }
.pcd-app {
	font-family: var(--pcd-font);
	color: var(--pcd-ink);
	background: var(--pcd-bg);
	min-height: 100vh;
	display: flex;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* ---- Sidebar --------------------------------------------------------- */
.pcd-side {
	width: 248px;
	background: var(--pcd-sidebar);
	color: #fff;
	display: flex;
	flex-direction: column;
	position: fixed;
	inset: 0 auto 0 0;
	z-index: 60;
	transition: transform .2s ease;
}
.pcd-side__brand {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 20px 20px 18px;
	font-weight: 800;
	font-size: 17px;
	letter-spacing: -.01em;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.pcd-side__brand img { height: 34px; width: auto; }
.pcd-side__brand .pcd-side__mark {
	width: 34px; height: 34px; border-radius: 9px;
	background: var(--pcd-green); color: var(--pcd-ink);
	display: grid; place-items: center; font-weight: 900; font-size: 18px;
}
.pcd-side__nav {
	padding: 12px 12px 20px;
	overflow-y: auto;
	flex: 1;
}
.pcd-side__group {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--pcd-grey-400);
	padding: 16px 12px 7px;
	font-weight: 700;
}
.pcd-side__link {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 10px 12px;
	border-radius: 9px;
	color: rgba(255, 255, 255, .82);
	font-weight: 600;
	font-size: 14.5px;
	margin-bottom: 2px;
}
.pcd-side__link:hover { background: var(--pcd-sidebar-hover); color: #fff; text-decoration: none; }
.pcd-side__link.is-active { background: var(--pcd-green); color: var(--pcd-ink); }
.pcd-side__link .pcd-ic { width: 19px; text-align: center; font-size: 15px; }
.pcd-side__badge {
	margin-left: auto;
	background: rgba(255,255,255,.14);
	color: #fff;
	border-radius: 999px;
	padding: 1px 8px;
	font-size: 11px;
	font-weight: 800;
}
.pcd-side__link.is-active .pcd-side__badge { background: rgba(0,0,0,.18); color: #0e0f0e; }

/* ---- Main area ------------------------------------------------------- */
.pcd-main {
	flex: 1;
	margin-left: 248px;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.pcd-topnav {
	background: #fff;
	border-bottom: 1px solid var(--pcd-line);
	padding: 14px 26px;
	display: flex;
	align-items: center;
	gap: 16px;
	position: sticky;
	top: 0;
	z-index: 40;
}
.pcd-topnav__title {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -.02em;
}
.pcd-topnav__sp { flex: 1; }
.pcd-topnav__user {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	font-weight: 600;
	color: var(--pcd-grey-600);
}
.pcd-avatar {
	width: 34px; height: 34px; border-radius: 50%;
	background: var(--pcd-green); color: var(--pcd-ink);
	display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.pcd-burger {
	display: none;
	width: 48px; height: 48px;
	border: 1px solid var(--pcd-line);
	border-radius: 9px;
	background: #fff;
	font-size: 18px;
	cursor: pointer;
}
.pcd-burger:focus-visible,
.pcd-bottomnav button:focus-visible,
.pcd-side__link:focus-visible,
.pcd-side__brand:focus-visible {
	outline: 3px solid var(--pcd-green);
	outline-offset: 2px;
}
.pcd-side-backdrop { display: none; }
.pcd-content {
	padding: 26px;
	max-width: 1280px;
	width: 100%;
}

/* The signed-in testing control belongs in the ManjeProp app chrome. Keep it
 * clear of the fixed sidebar and use the same black/lime palette as the desk. */
#manje_testing_tools-open {
	left: auto !important;
	right: 24px !important;
	bottom: 86px !important;
	border-color: var(--pcd-green) !important;
	background: var(--pcd-green) !important;
	color: var(--pcd-ink) !important;
	box-shadow: 0 8px 24px rgba(14, 15, 14, .2) !important;
}
#manje_testing_tools {
	border-color: var(--pcd-green) !important;
	background: var(--pcd-bg) !important;
	color: var(--pcd-ink) !important;
}
#manje_testing_tools .ctt-head {
	background: var(--pcd-ink) !important;
}
#manje_testing_tools .ctt-kicker,
#manje_testing_tools .ctt-close {
	color: var(--pcd-green) !important;
}
#manje_testing_tools .ctt-close {
	border-color: var(--pcd-green) !important;
}
#manje_testing_tools .ctt-card {
	border-color: #d5e2cf !important;
	background: var(--pcd-card) !important;
	color: var(--pcd-ink) !important;
}
#manje_testing_tools .ctt-card:hover {
	border-color: var(--pcd-green) !important;
	background: #effbdd !important;
}
#manje_testing_tools .ctt-card strong {
	color: var(--pcd-ink) !important;
}
#manje_testing_tools .ctt-card span,
#manje_testing_tools p {
	color: var(--pcd-grey-600) !important;
}
#manje_testing_tools .ctt-download {
	border-color: var(--pcd-ink) !important;
	background: var(--pcd-ink) !important;
}
#manje_testing_tools .ctt-download strong,
#manje_testing_tools .ctt-download span {
	color: #fff !important;
}
#manje_testing_tools .ctt-download:hover,
#manje_testing_tools .ctt-download:focus-visible {
	background: #1d2b1d !important;
	border-color: #1d2b1d !important;
}
#manje_testing_tools .ctt-download:hover strong,
#manje_testing_tools .ctt-download:hover span,
#manje_testing_tools .ctt-download:focus-visible strong,
#manje_testing_tools .ctt-download:focus-visible span {
	color: #fff !important;
}
@media (max-width: 520px) {
	#manje_testing_tools-open {
		left: auto !important;
		right: 12px !important;
		bottom: 78px !important;
	}
}

/* ---- KPI tiles ------------------------------------------------------- */
.pcd-kpis {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}
.pcd-kpi {
	background: var(--pcd-card);
	border: 1px solid var(--pcd-line);
	border-radius: var(--pcd-radius);
	padding: 18px;
	box-shadow: var(--pcd-shadow);
	position: relative;
	overflow: hidden;
}
.pcd-kpi::before {
	content: "";
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 4px;
	background: var(--pcd-green);
}
.pcd-kpi.is-alert::before { background: #e0533f; }
.pcd-kpi.is-warn::before { background: #e8a13a; }
.pcd-kpi__label {
	font-size: 13px;
	font-weight: 600;
	color: var(--pcd-grey-600);
	margin: 0 0 8px;
}
.pcd-kpi__value {
	font-size: 32px;
	font-weight: 800;
	letter-spacing: -.02em;
	line-height: 1;
}
.pcd-kpi__sub {
	font-size: 12.5px;
	color: var(--pcd-grey-400);
	margin-top: 6px;
}

/* ---- Cards / panels -------------------------------------------------- */
.pcd-panel {
	background: var(--pcd-card);
	border: 1px solid var(--pcd-line);
	border-radius: var(--pcd-radius);
	box-shadow: var(--pcd-shadow);
	margin-bottom: 22px;
	overflow: hidden;
}
.pcd-panel__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--pcd-line);
}
.pcd-panel__head h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: -.01em;
}
.pcd-panel__head .pcd-topnav__sp { flex: 1; }
.pcd-panel__body { padding: 18px; }
.pcd-panel__body--flush { padding: 0; }

.pcd-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 22px;
	align-items: start;
}
.pcd-cols--3 { grid-template-columns: 1fr 1fr 1fr; }

/* ---- Tables ---------------------------------------------------------- */
.pcd-table-wrap { overflow-x: auto; }
.pcd-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.pcd-table th,
.pcd-table td {
	text-align: left;
	padding: 12px 16px;
	border-bottom: 1px solid var(--pcd-line);
	vertical-align: middle;
}
.pcd-table th {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--pcd-grey-600);
	background: #fafbf9;
	font-weight: 700;
	white-space: nowrap;
}
.pcd-table tr:last-child td { border-bottom: none; }
.pcd-table tbody tr:hover { background: #fafdf6; }
.pcd-table__strong { font-weight: 700; }
.pcd-table__muted { color: var(--pcd-grey-400); font-size: 13px; }
.pcd-row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- Forms (app) ----------------------------------------------------- */
.pcd-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.pcd-form-grid .pcd-field--full { grid-column: 1 / -1; }

/* ---- Modal ----------------------------------------------------------- */
.pcd-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(14, 15, 14, .55);
	display: none;
	align-items: flex-start;
	justify-content: center;
	z-index: 100;
	padding: 30px 16px;
	overflow-y: auto;
}
.pcd-modal-overlay.is-open { display: flex; }
.pcd-modal {
	background: #fff;
	border-radius: var(--pcd-radius);
	width: 100%;
	max-width: 600px;
	box-shadow: 0 24px 70px rgba(0,0,0,.3);
	margin: auto;
}
.pcd-modal__head {
	display: flex;
	align-items: center;
	padding: 18px 20px;
	border-bottom: 1px solid var(--pcd-line);
}
.pcd-modal__head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.pcd-modal__close {
	margin-left: auto;
	border: none;
	background: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: var(--pcd-grey-400);
}
.pcd-modal__body { padding: 20px; }
.pcd-modal__foot {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 16px 20px;
	border-top: 1px solid var(--pcd-line);
	background: #fafbf9;
	border-radius: 0 0 var(--pcd-radius) var(--pcd-radius);
}

/* ---- Timeline / Gantt ----------------------------------------------- */
.pcd-timeline {
	overflow-x: auto;
	padding: 4px 0;
}
.pcd-timeline__head,
.pcd-timeline__row {
	display: grid;
	grid-template-columns: 160px 1fr;
	min-width: 640px;
}
.pcd-timeline__days {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	border-left: 1px solid var(--pcd-line);
}
.pcd-timeline__day {
	font-size: 11px;
	color: var(--pcd-grey-400);
	text-align: center;
	padding: 6px 0;
	border-right: 1px solid var(--pcd-line);
	font-weight: 600;
}
.pcd-timeline__day.is-today { color: var(--pcd-ink); background: #f0fae3; }
.pcd-timeline__label {
	padding: 12px;
	font-size: 13.5px;
	font-weight: 600;
	border-bottom: 1px solid var(--pcd-line);
	border-right: 1px solid var(--pcd-line);
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.pcd-timeline__label small { color: var(--pcd-grey-400); font-weight: 500; }
.pcd-timeline__track {
	position: relative;
	border-bottom: 1px solid var(--pcd-line);
	border-left: 1px solid var(--pcd-line);
	height: 52px;
}
.pcd-timeline__bar {
	position: absolute;
	top: 11px;
	height: 30px;
	border-radius: 7px;
	background: var(--pcd-green);
	color: var(--pcd-ink);
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	padding: 0 10px;
	overflow: hidden;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.pcd-timeline__bar.is-overdue { background: #e0533f; color: #fff; }
.pcd-timeline__bar.is-done { background: #cfe9b6; color: #3f7d12; }
.pcd-timeline__bar.is-progress { background: #bfe0fd; color: #18537f; }

/* ---- Calendar list --------------------------------------------------- */
.pcd-cal-day {
	border-bottom: 1px solid var(--pcd-line);
	padding: 14px 18px;
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 14px;
}
.pcd-cal-day__date { font-weight: 800; }
.pcd-cal-day__date small { display: block; color: var(--pcd-grey-400); font-weight: 600; font-size: 12px; }
.pcd-cal-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 0;
	font-size: 14px;
}
.pcd-cal-item .pcd-dotmark { width: 9px; height: 9px; border-radius: 50%; background: var(--pcd-green); flex: none; }

/* ---- Ticket thread --------------------------------------------------- */
.pcd-thread { display: flex; flex-direction: column; gap: 12px; }
.pcd-msg {
	border: 1px solid var(--pcd-line);
	border-radius: var(--pcd-radius-sm);
	padding: 12px 14px;
	background: #fff;
}
.pcd-msg__head { display: flex; gap: 8px; font-size: 12.5px; color: var(--pcd-grey-600); margin-bottom: 5px; }
.pcd-msg__author { font-weight: 800; color: var(--pcd-ink); }
.pcd-msg--system { background: #fafbf9; }
.pcd-msg--staff { border-left: 3px solid var(--pcd-green); }
.pcd-msg--tenant { border-left: 3px solid #2563a8; }

/* ---- Login ----------------------------------------------------------- */
.pcd-login {
	min-height: 100vh;
	display: grid;
	place-items: center;
	background: var(--pcd-ink);
	padding: 24px;
	font-family: var(--pcd-font);
}
.pcd-login__card {
	background: #fff;
	border-radius: 18px;
	width: 100%;
	max-width: 400px;
	padding: 34px 30px;
	box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.pcd-login__brand {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 800;
	font-size: 20px;
	margin-bottom: 6px;
}
.pcd-login__brand .pcd-side__mark { width: 40px; height: 40px; border-radius: 11px; font-size: 21px; }
.pcd-login__sub { color: var(--pcd-grey-600); font-size: 14px; margin: 0 0 22px; }

/* ---- Utilities ------------------------------------------------------- */
.pcd-flex { display: flex; align-items: center; gap: 10px; }
.pcd-flex--between { justify-content: space-between; }
.pcd-flex--wrap { flex-wrap: wrap; }
.pcd-muted { color: var(--pcd-grey-600); }
.pcd-mt { margin-top: 14px; }
.pcd-mb { margin-bottom: 14px; }
.pcd-right { text-align: right; }
.pcd-nowrap { white-space: nowrap; }
.pcd-hide { display: none !important; }
.pcd-toolbar {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
	margin-bottom: 18px;
}
.pcd-toolbar__sp { flex: 1; }
.pcd-search {
	border: 1.5px solid var(--pcd-line);
	border-radius: var(--pcd-radius-sm);
	padding: 10px 14px;
	font-size: 14px;
	min-width: 220px;
	font-family: inherit;
}
.pcd-search:focus { outline: none; border-color: var(--pcd-green); box-shadow: 0 0 0 3px rgba(126,211,33,.18); }
.pcd-filterbar {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	margin: 0 0 12px;
}
.pcd-filterbar .pcd-input {
	width: auto;
	min-width: 9.5rem;
	min-height: 44px;
	flex: 0 1 12rem;
	box-sizing: border-box;
}
.pcd-filterbar input[type="search"] { flex: 1 1 14rem; max-width: 22rem; }
.pcd-filterbar .pcd-btn,
.pcd-toolbar .pcd-btn,
.pcd-inline-upload .pcd-btn,
.pcd-input--inline { min-height: 44px; box-sizing: border-box; }
.pcd-toolbar .pcd-segment__btn { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; }
.pcd-inline-upload { flex-wrap: wrap; }
.pcd-inline-upload input[type="file"] { min-width: min(100%, 16rem); max-width: 100%; }
.pcd-app .pcd-btn:focus-visible,
.pcd-toolbar .pcd-segment__btn:focus-visible,
.pcd-filterbar .pcd-input:focus-visible,
.pcd-input--inline:focus-visible {
	outline: 3px solid var(--pcd-green);
	outline-offset: 2px;
}

/* Toast */
.pcd-toast {
	position: fixed;
	bottom: 22px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: var(--pcd-ink);
	color: #fff;
	padding: 13px 20px;
	border-radius: 11px;
	font-weight: 600;
	font-size: 14px;
	box-shadow: 0 12px 40px rgba(0,0,0,.3);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
	z-index: 200;
}
.pcd-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pcd-toast.is-err { background: #c0392b; }

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 980px) {
	.pcd-cols, .pcd-cols--3 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
	.pcd-side {
		transform: translateX(-100%);
		visibility: hidden;
		pointer-events: none;
		box-shadow: 0 0 60px rgba(0,0,0,.5);
		transition: transform .2s ease, visibility 0s linear .2s;
	}
	.pcd-app.is-side-open .pcd-side {
		transform: translateX(0);
		visibility: visible;
		pointer-events: auto;
		transition-delay: 0s;
	}
	.pcd-side-backdrop:not([hidden]) {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 55;
		border: 0;
		background: rgba(14,15,14,.58);
		cursor: pointer;
	}
	.pcd-main { margin-left: 0; }
	.pcd-burger { display: block; }
	.pcd-form-grid { grid-template-columns: 1fr; }
	.pcd-content { padding: 18px; }
	.pcd-topnav { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
	.pcd-topnav__title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
	.pcd-topnav__sp { display: none; }
	.pcd-topnav__user { flex: 0 0 auto; margin-left: auto; gap: 6px; }
	.pcd-topnav > .pcd-btn { order: 3; max-width: 100%; }
	.pcd-gsearch { order: 4; flex: 1 1 100% !important; margin: 0 !important; }
}

/* =====================================================================
 * Supplementary: form controls, KPIs tones, panels, segments, chips,
 * stacks, flags, calendar, timeline bars, dl/kv, switches, notes.
 * ===================================================================== */

/* Form fields */
.pcd-field { display: block; margin-bottom: 14px; }
.pcd-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--pcd-grey-600); margin-bottom: 6px; letter-spacing: .01em; }
.pcd-input,
.pcd-app select.pcd-input,
.pcd-app textarea.pcd-input {
	width: 100%;
	border: 1.5px solid var(--pcd-line);
	border-radius: var(--pcd-radius-sm);
	padding: 10px 12px;
	font: inherit;
	color: var(--pcd-ink);
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.pcd-input:focus { outline: none; border-color: var(--pcd-green); box-shadow: 0 0 0 3px rgba(126,211,33,.18); }
.pcd-input--inline { width: auto; display: inline-block; padding: 7px 10px; }
.pcd-input--mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; margin: 4px 0 10px; }
.pcd-input--readonly { display: block; min-height: 44px; box-sizing: border-box; }
textarea.pcd-input { resize: vertical; }
.pcd-help { font-size: 12.5px; color: var(--pcd-grey-400); margin: 4px 0 0; }
.pcd-check { display: flex; align-items: center; gap: 8px; min-height: 44px; box-sizing: border-box; padding: 8px 0; font-size: 14px; margin: 8px 0; cursor: pointer; }
.pcd-check--inline { display: inline-flex; }
.pcd-check input, .pcd-switch input { width: auto; }

/* Switches */
.pcd-switch { display: flex; align-items: center; gap: 10px; min-height: 44px; box-sizing: border-box; padding: 8px 0; font-size: 14.5px; cursor: pointer; }
.pcd-switch input { width: 42px; height: 24px; appearance: none; background: #d6dad3; border-radius: 999px; position: relative; cursor: pointer; transition: background .2s; flex: 0 0 auto; }
.pcd-switch input:checked { background: var(--pcd-green); }
.pcd-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.pcd-switch input:checked::after { transform: translateX(18px); }

/* KPI tones */
.pcd-kpi--good .pcd-kpi__value { color: #3f7d12; }
.pcd-kpi--warn .pcd-kpi__value { color: #b3590f; }
.pcd-kpi--bad .pcd-kpi__value { color: #c0392b; }
.pcd-kpi--warn { box-shadow: inset 0 0 0 1px #f6e0c2, var(--pcd-shadow); }
.pcd-kpi--bad { box-shadow: inset 0 0 0 1px #f3cfca, var(--pcd-shadow); }

/* Columns */
.pcd-cols--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* Panels extra */
.pcd-panel--narrow { max-width: 760px; }
.pcd-panel__head h2 { font-size: 16px; margin: 0; display: flex; align-items: center; gap: 8px; }
.pcd-empty-inline { padding: 28px; text-align: center; color: var(--pcd-grey-400); }

/* Toolbar */
.pcd-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.pcd-toolbar--end { justify-content: flex-end; }
.pcd-toolbar__sp { flex: 1; }

/* Segment control */
.pcd-segment { display: inline-flex; background: #fff; border: 1.5px solid var(--pcd-line); border-radius: 999px; padding: 3px; }
.pcd-segment__btn { padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--pcd-grey-600); text-decoration: none; }
.pcd-segment__btn.is-active { background: var(--pcd-ink); color: #fff; }

/* Chips */
.pcd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.pcd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1.5px solid var(--pcd-line); border-radius: 999px; font-size: 13px; cursor: pointer; user-select: none; }
.pcd-chip input { width: auto; }
.pcd-chip:has(input:checked) { border-color: var(--pcd-green); background: #f3fbe9; }

/* Stacks */
.pcd-stack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pcd-stack--divided li { border-bottom: 1px solid var(--pcd-line); padding-bottom: 10px; }
.pcd-stack--divided li:last-child { border-bottom: none; padding-bottom: 0; }
.pcd-stack li { font-size: 14px; }

/* Flex helpers */
.pcd-flex { display: flex; gap: 10px; }
.pcd-flex--between { justify-content: space-between; align-items: center; }
.pcd-flex--wrap { flex-wrap: wrap; }

/* Flags */
.pcd-flag { padding: 9px 12px; border-radius: var(--pcd-radius-sm); font-size: 13.5px; font-weight: 600; margin: 0 0 12px; }
.pcd-flag--bad { background: #fdecea; color: #c0392b; }

/* Notes */
.pcd-note { padding: 14px 16px; border-radius: var(--pcd-radius-sm); margin: 12px 0; font-size: 14px; }
.pcd-note--info { background: #eef6ff; border: 1px solid #d4e6fb; }
.pcd-note--error { background: #fdecea; border: 1px solid #f3cfca; color: #c0392b; }

/* Definition list */
.pcd-dl { display: grid; gap: 0; margin: 0 0 16px; }
.pcd-dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--pcd-line); }
.pcd-dl dt { color: var(--pcd-grey-400); font-size: 13px; margin: 0; }
.pcd-dl dd { margin: 0; font-size: 14px; }

/* Key-value table */
.pcd-kv { width: 100%; border-collapse: collapse; }
.pcd-kv td { padding: 8px 0; border-bottom: 1px solid var(--pcd-line); font-size: 14px; }
.pcd-kv td:last-child { text-align: right; font-weight: 700; }
.pcd-num-bad { color: #c0392b; }

/* Total box */
.pcd-total { font-size: 22px; font-weight: 800; color: var(--pcd-ink); padding-top: 6px; }

/* Modal wide + foot */
.pcd-modal--wide { max-width: 720px; }
.pcd-modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--pcd-line); }
.pcd-modal__close { background: none; border: none; font-size: 24px; line-height: 1; color: var(--pcd-grey-400); cursor: pointer; }
.pcd-modal-open { overflow: hidden; }

/* Sticky save bar */
.pcd-sticky-save { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--pcd-bg) 40%); padding: 16px 0; display: flex; justify-content: flex-end; margin-top: 8px; }

/* Search input shorthand */
.pcd-search { max-width: 280px; }

/* Bar / back link */
.pcd-bar { margin: 0 0 14px; }
.pcd-bar a { color: var(--pcd-grey-600); text-decoration: none; font-weight: 600; font-size: 14px; }
.pcd-bar a:hover { color: var(--pcd-green-600); }

/* Timeline bar tones (map status badge classes to fills) */
.pcd-timeline__bar { background: var(--pcd-green); }
.pcd-timeline__bar--pcd-badge--green { background: #7ed321; }
.pcd-timeline__bar--pcd-badge--blue { background: #4a90e2; }
.pcd-timeline__bar--pcd-badge--amber { background: #e8a13a; }
.pcd-timeline__bar--pcd-badge--red { background: #e2574c; }
.pcd-timeline__bar--pcd-badge--grey { background: #b3bbc4; }
.pcd-timeline__bar--pcd-badge--orange { background: #e0833a; }
.pcd-timeline__bar--pcd-badge--purple { background: #9b6fd0; }

/* Calendar */
.pcd-cal { padding: 4px; }
.pcd-cal__dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.pcd-cal__dow span { font-size: 11.5px; font-weight: 700; color: var(--pcd-grey-400); text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.pcd-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pcd-cal-day { min-width: 0; min-height: 92px; border: 1px solid var(--pcd-line); border-radius: 8px; padding: 6px; background: #fff; display: flex; flex-direction: column; gap: 3px; }
.pcd-cal-day--empty { background: transparent; border: none; }
.pcd-cal-day.is-today { border-color: var(--pcd-green); box-shadow: inset 0 0 0 1px var(--pcd-green); }
.pcd-cal-day__date { font-size: 12.5px; font-weight: 700; color: var(--pcd-grey-600); }
.pcd-cal-item { min-width: 0; font-size: 11px; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #eef1ee; color: var(--pcd-ink); }
.pcd-cal-item--book { background: #eafbe0; color: #3f7d12; }
.pcd-cal-item--task { background: #e6f0fd; color: #2563a8; }
.pcd-cal-item--done { background: #eef1ee; color: #5b6470; text-decoration: line-through; }
.pcd-cal-item--more { background: transparent; color: var(--pcd-grey-400); padding: 0 6px; }
.pcd-cal__legend { display: flex; gap: 10px; padding: 12px 6px 4px; flex-wrap: wrap; }

/* Avatar */
.pcd-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--pcd-green); color: var(--pcd-ink); font-weight: 800; font-size: 13px; }

/* Hide small */
@media (max-width: 600px) { .pcd-hide-sm { display: none; } }

/* Sidebar icon */
.pcd-side__ico { display: inline-block; width: 20px; text-align: center; opacity: .85; }
.pcd-side__badge { margin-left: auto; background: var(--pcd-green); color: var(--pcd-ink); font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 7px; }

/* Modal body scroll */
.pcd-modal__body { max-height: 72vh; overflow-y: auto; }

/* Responsive cols */
@media (max-width: 980px) {
	.pcd-cols--2 { grid-template-columns: 1fr; }
	.pcd-cal-day { min-height: 64px; }
}

/* My day: Up next card */
.pcd-upnext { border-left: 4px solid var(--pcd-green, #7ed321); background: #f6fbef; padding: 16px 18px; margin: 0; }
.pcd-upnext__label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #4a7d0e; font-weight: 700; margin-bottom: 4px; }
.pcd-upnext__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.pcd-upnext__meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.pcd-upnext__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Upload centre big buttons */
.pcd-upload-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pcd-upload-big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 26px 12px; border: 2px dashed #b9c4b4; border-radius: 14px; background: #fafcf8; cursor: pointer; text-align: center; transition: border-color .15s; }
.pcd-upload-big:active, .pcd-upload-big:hover { border-color: var(--pcd-green, #7ed321); }
.pcd-upload-big__ico { font-size: 2rem; }
.pcd-upload-big__txt { font-weight: 700; }
.pcd-upload-preview { display: flex; align-items: center; gap: 10px; margin-top: 12px; background: #f4f6f2; border-radius: 10px; padding: 10px 12px; }
.pcd-upload-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }

/* Emergency pin + severity strip + quick actions + popup */
.pcd-emergency-pin { background: #fdecea; border: 2px solid #c0392b; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.pcd-emergency-pin__head { color: #c0392b; font-weight: 800; letter-spacing: .04em; margin-bottom: 8px; }
.pcd-emergency-pin__row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid #f5c6c0; flex-wrap: wrap; }
.pcd-sev-strip { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.pcd-sev { background: #eef1ec; border-radius: 999px; padding: 7px 14px; font-size: .9rem; color: #23272e; text-decoration: none; }
.pcd-sev b { margin-right: 4px; }
.pcd-sev--emergency { background: #fdecea; color: #c0392b; font-weight: 700; }
.pcd-sev--urgent { background: #fdf3e0; color: #9a6b00; font-weight: 700; }
.pcd-sev--high { background: #fff8e6; color: #8a6d00; }
.pcd-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.pcd-fault-popup { position: fixed; inset: 0; background: rgba(14,15,14,.55); z-index: 999; display: flex; align-items: center; justify-content: center; padding: 18px; }
.pcd-fault-popup__box { background: #fff; border-radius: 16px; padding: 20px; max-width: 560px; width: 100%; max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.pcd-fault-popup__row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef1ec; flex-wrap: wrap; }

/* Bottom mobile nav (app-style) */
.pcd-bottomnav { display: none; }
@media (max-width: 860px) {
	.pcd-bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; display: flex; background: #0e0f0e; border-top: 1px solid rgba(255,255,255,.1); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
	.pcd-bottomnav a { flex: 1; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content:center; gap: 2px; color: rgba(255,255,255,.85); text-decoration: none; font-size: .68rem; padding: 4px 2px; }
	.pcd-bottomnav a.is-active { color: var(--pcd-green); background: rgba(126,211,33,.1); border-radius: 9px; font-weight: 800; }
	.pcd-bottomnav a span { font-size: 1.15rem; line-height: 1; }
	.pcd-main { padding-bottom: 76px !important; }
}

/* Attachment grid + WA helpers */
.pcd-attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.pcd-attach { text-align: center; }
.pcd-attach img { width: 100%; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid #e6eae2; }
.pcd-attach__file { font-size: 2.2rem; display: block; padding: 24px 0; background: #f4f6f2; border-radius: 10px; }
.pcd-attach__meta { font-size: .78rem; color: #5b6470; margin: 6px 0; word-break: break-word; }
.pcd-wa-helpers { display: flex; gap: 8px; flex-wrap: wrap; }
.pcd-bottomnav button { flex: 1; min-height:48px; display: flex; flex-direction: column; align-items: center; justify-content:center; gap: 2px; color: rgba(255,255,255,.85); background: none; border: 0; font-size: .68rem; padding: 4px 2px; cursor: pointer; font-family: inherit; }
.pcd-bottomnav button span { font-size: 1.15rem; line-height: 1; }

/* Export bar + print styles */
.pcd-export-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.pcd-export-bar__hint { color: #7a8378; font-size: .8rem; }
@media print {
	.pcd-sidebar, .pcd-topnav, .pcd-bottomnav, .pcd-export-bar, .pcd-btn,
	button, .pcd-fault-popup, .pcd-toolbar, .pcd-upnext__actions { display: none !important; }
	.pcd-main { padding: 0 !important; margin: 0 !important; }
	.pcd-content { max-width: 100% !important; }
	.pcd-panel { break-inside: avoid; border: 1px solid #ccc !important; box-shadow: none !important; }
	body { background: #fff !important; }
}

/* Money in/out */
.pcd-money-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 14px; }
.pcd-money { background: #fafcf8; border: 1px solid #e6eae2; border-radius: 12px; padding: 14px 16px; }
.pcd-money--in { border-left: 4px solid #1a7f37; }
.pcd-money--out { border-left: 4px solid #c0392b; }
.pcd-money__label { font-size: .72rem; letter-spacing: .06em; color: #7a8378; font-weight: 700; }
.pcd-money__big { font-size: 1.5rem; font-weight: 800; margin: 6px 0 2px; }
.pcd-money__big span { font-size: .8rem; color: #7a8378; font-weight: 500; }
.pcd-money__sub { font-size: .82rem; color: #5b6470; }

/* Email attach picker */
.pcd-attach-pick { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; background: #fafcf8; border: 1px solid #e6eae2; border-radius: 10px; padding: 10px 12px; }
.pcd-attach-pick__item { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.pcd-attach-pick__item em { color: #7a8378; font-style: normal; font-size: .78rem; }

/* Mail workspace: folders / messages / reader, collapsing cleanly on phones. */
.pcd-mail-toolbar h1 { margin: 0 0 2px; }
.pcd-mail-toolbar .pcd-help { margin: 0; }
.pcd-mail-search { width: min(280px, 100%); }
.pcd-mail-accounts { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 8px; padding-bottom: 3px; }
.pcd-mail-account { flex: 0 0 auto; min-width: 170px; padding: 9px 12px; border: 1px solid var(--pcd-line); border-radius: 10px; background: #fff; color: var(--pcd-ink); text-align: left; cursor: pointer; font: inherit; }
.pcd-mail-account strong, .pcd-mail-account span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcd-mail-account span { margin-top: 2px; color: var(--pcd-grey-400); font-size: .76rem; }
.pcd-mail-account.is-active { border-color: var(--pcd-green); box-shadow: inset 0 0 0 1px var(--pcd-green); background: #f7fced; }
.pcd-domain-meters { display: flex; gap: 8px 18px; flex-wrap: wrap; margin: 0 0 14px; color: var(--pcd-grey-500); font-size: .78rem; }
.pcd-mail-notice { min-height: 0; margin-bottom: 8px; color: #476c19; font-size: .82rem; }
.pcd-mail-notice.is-error { color: #a4342b; }
.pcd-mail-workspace { display: grid; grid-template-columns: 170px minmax(260px, 330px) minmax(360px, 1fr); min-height: 620px; max-height: calc(100vh - 250px); overflow: hidden; border: 1px solid var(--pcd-line); border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgba(29, 43, 26, .06); }
.pcd-mail-pane { min-width: 0; min-height: 0; overflow: auto; border-right: 1px solid var(--pcd-line); background: #fff; }
.pcd-mail-pane:last-child { border-right: 0; }
.pcd-mail-pane__head { position: sticky; top: 0; z-index: 2; min-height: 49px; display: flex; align-items: center; padding: 10px 13px; border-bottom: 1px solid var(--pcd-line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); }
.pcd-mail-folder { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--pcd-grey-600); cursor: pointer; text-align: left; font: inherit; font-size: .86rem; }
.pcd-mail-folder:hover { background: #f3f6ef; }
.pcd-mail-folder.is-active { background: #eaf5d9; color: #315c13; font-weight: 700; }
.pcd-mail-folders nav { padding: 7px; }
.pcd-mail-list { min-height: 100%; }
.pcd-mail-row { width: 100%; display: block; padding: 12px 13px; border: 0; border-bottom: 1px solid var(--pcd-line); background: #fff; color: var(--pcd-ink); cursor: pointer; text-align: left; font: inherit; }
.pcd-mail-row:hover, .pcd-mail-row.is-active { background: #f5f8f2; }
.pcd-mail-row.is-active { box-shadow: inset 3px 0 var(--pcd-green); }
.pcd-mail-row__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pcd-mail-row__top strong { max-width: 68%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.pcd-mail-row__top time { flex: 0 0 auto; color: var(--pcd-grey-400); font-size: .68rem; }
.pcd-mail-row__subject { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pcd-grey-500); font-size: .8rem; }
.pcd-mail-row.is-unseen .pcd-mail-row__subject { color: var(--pcd-ink); font-weight: 700; }
.pcd-mail-row__subject i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--pcd-green); }
.pcd-mail-reader { padding: 22px; }
.pcd-mail-reader__empty { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--pcd-grey-400); text-align: center; }
.pcd-mail-reader__empty > span { font-size: 2rem; opacity: .55; }
.pcd-mail-reader__empty h2 { margin: 10px 0 2px; color: var(--pcd-grey-500); }
.pcd-mail-reader__head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--pcd-line); }
.pcd-mail-reader__head h2 { margin: 0 0 8px; font-size: 1.28rem; }
.pcd-mail-reader__head p { margin: 0; color: var(--pcd-grey-500); font-size: .8rem; line-height: 1.55; overflow-wrap: anywhere; }
.pcd-mail-reader__actions { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.pcd-mail-body { min-height: 160px; margin: 0; padding: 20px 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: .9rem; line-height: 1.65; color: var(--pcd-ink); }
.pcd-mail-attachments { padding-top: 16px; border-top: 1px solid var(--pcd-line); }
.pcd-mail-attachments h3 { margin: 0 0 4px; }
.pcd-mail-attachment { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--pcd-line); border-radius: 10px; background: #fafcf8; }
.pcd-mail-attachment strong, .pcd-mail-attachment span { display: block; overflow-wrap: anywhere; }
.pcd-mail-attachment span { margin-top: 2px; color: var(--pcd-grey-400); font-size: .73rem; }
.pcd-mail-attachment.is-risky { border-color: #e1ab56; background: #fff8e9; }
.pcd-mail-pad { padding: 14px; }

@media (max-width: 1120px) {
	.pcd-mail-workspace { grid-template-columns: 145px minmax(240px, 300px) minmax(320px, 1fr); }
	.pcd-mail-reader { padding: 16px; }
	.pcd-mail-reader__head { display: block; }
	.pcd-mail-reader__actions { justify-content: flex-start; margin-top: 12px; }
}
@media (max-width: 820px) {
	.pcd-mail-toolbar { align-items: stretch; }
	.pcd-mail-toolbar > * { flex: 1 1 auto; }
	.pcd-mail-search { order: 5; flex-basis: 100%; width: 100%; }
	.pcd-mail-workspace { display: block; max-height: none; min-height: 0; overflow: visible; border: 0; background: transparent; box-shadow: none; }
	.pcd-mail-pane { margin-bottom: 10px; overflow: visible; border: 1px solid var(--pcd-line); border-radius: 12px; }
	.pcd-mail-folders nav { display: flex; gap: 5px; overflow-x: auto; }
	.pcd-mail-folder { width: auto; flex: 0 0 auto; padding: 8px 10px; }
	.pcd-mail-messages { max-height: 420px; overflow-y: auto; }
	.pcd-mail-reader { min-height: 300px; }
	.pcd-mail-reader__empty { min-height: 240px; }
}
@media (max-width: 520px) {
	.pcd-mail-account { min-width: 150px; }
	.pcd-mail-reader { padding: 13px; }
	.pcd-mail-reader__actions .pcd-btn { flex: 1 1 45%; }
	.pcd-mail-attachment { align-items: flex-start; }
}

/* Operations calendar */
.pcd-calendar-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 12px; }
.pcd-calendar-head h1 { margin: 0; }
.pcd-calendar-head p { margin: 3px 0 0; color: var(--pcd-grey-400); font-size: .84rem; }
.pcd-calendar-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; padding: 10px; border: 1px solid var(--pcd-line); border-radius: 12px; background: #fff; }
.pcd-calendar-toolbar input[type="date"] { max-width: 155px; }
.pcd-calendar-title { min-width: 190px; }
.pcd-calendar-title strong, .pcd-calendar-title span { display: block; }
.pcd-calendar-title span { margin-top: 2px; color: var(--pcd-grey-400); font-size: .7rem; }
.pcd-cal-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pcd-cal-legend span { padding: 4px 8px; border-radius: 999px; font-size: .7rem; }
.pcd-cal-event--booking { background: #eaf7d8 !important; color: #3e6b17 !important; }
.pcd-cal-event--task { background: #e8f1fc !important; color: #255f9d !important; }
.pcd-cal-event--repair { background: #fff0dc !important; color: #8b5618 !important; }
.pcd-cal-event--invoice { background: #f2eafa !important; color: #67428b !important; }
.pcd-cal-event--invoice.is-overdue { background: #fde8e8 !important; color: #9b2f2f !important; }
.pcd-cal-event--done { background: #edf0ec !important; color: #6a7368 !important; }
.pcd-cal-event--done strong { text-decoration: line-through; }
.pcd-cal-quick { position: relative; margin-left: auto; }
.pcd-cal-quick summary { list-style: none; padding: 6px 9px; border: 1px solid var(--pcd-line); border-radius: 7px; background: #fff; color: var(--pcd-grey-600); cursor: pointer; font-size: .75rem; font-weight: 700; }
.pcd-cal-quick summary::-webkit-details-marker { display: none; }
.pcd-cal-quick[open] > div { position: absolute; right: 0; top: calc(100% + 4px); z-index: 15; min-width: 112px; padding: 5px; border: 1px solid var(--pcd-line); border-radius: 9px; background: #fff; box-shadow: 0 10px 30px rgba(22, 30, 19, .16); }
.pcd-cal-quick div a { display: block; padding: 7px 8px; border-radius: 6px; color: var(--pcd-ink); text-decoration: none; font-size: .78rem; }
.pcd-cal-quick div a:hover { background: #f1f5ed; }
.pcd-cal-quick.is-compact summary { padding: 2px 7px; border: 0; background: transparent; font-size: 1rem; }
.pcd-calendar-month { overflow-x: auto; padding: 5px; border: 1px solid var(--pcd-line); border-radius: 14px; background: #fff; }
.pcd-calendar-dow, .pcd-calendar-grid { min-width: 740px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pcd-calendar-dow { border-bottom: 1px solid var(--pcd-line); }
.pcd-calendar-dow span { padding: 8px; color: var(--pcd-grey-400); text-align: center; text-transform: uppercase; letter-spacing: .05em; font-size: .67rem; font-weight: 800; }
.pcd-calendar-day { min-width: 0; min-height: 128px; padding: 7px; border-right: 1px solid var(--pcd-line); border-bottom: 1px solid var(--pcd-line); background: #fff; }
.pcd-calendar-day:nth-child(7n) { border-right: 0; }
.pcd-calendar-day.is-outside { background: #fafbf9; }
.pcd-calendar-day.is-today { background: #f7fcef; box-shadow: inset 0 0 0 2px var(--pcd-green); }
.pcd-calendar-day > header { display: flex; align-items: center; justify-content: space-between; min-height: 25px; }
.pcd-calendar-day > header > a { width: 25px; height: 25px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--pcd-grey-600); text-decoration: none; font-size: .75rem; font-weight: 800; }
.pcd-calendar-day.is-today > header > a { background: var(--pcd-green); color: #172312; }
.pcd-cal-event { min-width: 0; display: flex; align-items: flex-start; gap: 5px; margin-top: 4px; padding: 5px 6px; border-radius: 6px; color: var(--pcd-ink); text-decoration: none; font-size: .72rem; line-height: 1.25; }
.pcd-cal-event > span:last-child { min-width: 0; }
.pcd-cal-event strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: inherit; }
.pcd-cal-event small { display: block; margin-top: 2px; opacity: .76; font-size: .65rem; }
.pcd-cal-more { display: block; margin: 5px 4px; color: var(--pcd-grey-400); font-size: .68rem; }
.pcd-calendar-week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 8px; overflow-x: auto; }
.pcd-calendar-weekday { min-height: 390px; padding: 9px; border: 1px solid var(--pcd-line); border-radius: 12px; background: #fff; }
.pcd-calendar-weekday.is-today { border-color: var(--pcd-green); box-shadow: inset 0 0 0 1px var(--pcd-green); }
.pcd-calendar-weekday > header { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 8px; border-bottom: 1px solid var(--pcd-line); }
.pcd-calendar-weekday > header span, .pcd-calendar-weekday > header strong { display: block; }
.pcd-calendar-weekday > header span { color: var(--pcd-grey-400); text-transform: uppercase; font-size: .65rem; font-weight: 700; }
.pcd-calendar-weekday > header strong { margin-top: 2px; font-size: 1.25rem; }
.pcd-calendar-weekday__events > p { color: var(--pcd-grey-400); font-size: .75rem; }
.pcd-calendar-agenda { display: grid; gap: 9px; }
.pcd-calendar-agenda-day { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 12px; border: 1px solid var(--pcd-line); border-radius: 12px; background: #fff; }
.pcd-calendar-agenda-day.is-today { border-color: var(--pcd-green); }
.pcd-calendar-agenda-day > header { display: flex; align-items: flex-start; gap: 8px; }
.pcd-calendar-agenda-day time strong, .pcd-calendar-agenda-day time span { display: block; }
.pcd-calendar-agenda-day time span { width: fit-content; margin-top: 4px; padding: 2px 6px; border-radius: 999px; background: var(--pcd-green); font-size: .63rem; font-weight: 800; }
.pcd-calendar-agenda-day > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 5px; }

@media (max-width: 760px) {
	.pcd-calendar-head { display: block; }
	.pcd-calendar-head .pcd-segment { margin-top: 10px; overflow-x: auto; }
	.pcd-calendar-toolbar .pcd-calendar-title { order: -1; flex-basis: 100%; }
	.pcd-calendar-month { margin-inline: -4px; }
	.pcd-calendar-dow, .pcd-calendar-grid { min-width: 0; }
	.pcd-calendar-dow span { padding: 6px 1px; font-size: .58rem; }
	.pcd-calendar-day { min-height: 78px; padding: 3px; }
	.pcd-calendar-day > header { min-height: 21px; }
	.pcd-calendar-day > header > a { width: 21px; height: 21px; font-size: .67rem; }
	.pcd-calendar-day .pcd-cal-quick summary { padding: 1px 4px; font-size: .78rem; }
	.pcd-calendar-day .pcd-cal-event { justify-content: center; margin-top: 2px; padding: 3px 1px; }
	.pcd-calendar-day .pcd-cal-event > span:last-child { display: none; }
	.pcd-calendar-day .pcd-cal-more { margin: 2px 0; text-align: center; font-size: .58rem; }
	.pcd-calendar-day:nth-child(7n+1) .pcd-cal-quick[open] > div,
	.pcd-calendar-day:nth-child(7n+2) .pcd-cal-quick[open] > div { left: 0; right: auto; }
	.pcd-calendar-week { grid-template-columns: repeat(7, minmax(190px, 1fr)); }
	.pcd-calendar-weekday { min-height: 280px; }
	.pcd-calendar-agenda-day { grid-template-columns: 1fr; }
	.pcd-calendar-agenda-day > header { align-items: center; }
}

/* Knowledge Base and Help & Tutorials */
.pcd-help-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 15px; padding: 22px; border-radius: 16px; background: linear-gradient(135deg, #17231a, #2f4a31); color: #fff; }
.pcd-help-hero__eyebrow { color: var(--pcd-green); text-transform: uppercase; letter-spacing: .12em; font-size: .67rem; font-weight: 800; }
.pcd-help-hero h1 { margin: 4px 0; color: #fff; }
.pcd-help-hero p { max-width: 760px; margin: 0; color: rgba(255,255,255,.75); line-height: 1.55; }
.pcd-help-hero p a { color: #c6ee88; }
.pcd-help-hero > .pcd-btn { flex: 0 0 auto; border-color: rgba(255,255,255,.35); color: #fff; }
.pcd-help-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pcd-help-tools label:first-child { flex: 1 1 330px; }
.pcd-help-tools label:nth-child(2) { flex: 0 1 190px; }
.pcd-kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.pcd-kb-card { display: flex; flex-direction: column; min-height: 290px; padding: 17px; border: 1px solid var(--pcd-line); border-radius: 13px; background: #fff; box-shadow: 0 4px 16px rgba(22, 32, 19, .035); }
.pcd-kb-card[hidden] { display: none; }
.pcd-kb-card > header { display: flex; gap: 10px; align-items: flex-start; }
.pcd-kb-card > header > span { font-size: 1.35rem; }
.pcd-kb-card small { color: #57842b; text-transform: uppercase; letter-spacing: .08em; font-size: .63rem; font-weight: 800; }
.pcd-kb-card h2 { margin: 2px 0 0; font-size: 1.03rem; }
.pcd-kb-card > p { color: var(--pcd-grey-500); font-size: .83rem; line-height: 1.55; }
.pcd-kb-card details { margin: 3px 0 12px; }
.pcd-kb-card summary { color: #3e6b17; cursor: pointer; font-size: .8rem; font-weight: 800; }
.pcd-kb-card ol { padding-left: 20px; color: var(--pcd-grey-600); font-size: .8rem; line-height: 1.55; }
.pcd-kb-card li + li { margin-top: 6px; }
.pcd-kb-card__link { margin-top: auto; color: #315c13; font-size: .78rem; font-weight: 800; text-decoration: none; }
.pcd-help-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; align-items: start; }
.pcd-help-tabs { display: grid; gap: 5px; padding: 7px; border: 1px solid var(--pcd-line); border-radius: 13px; background: #fff; }
.pcd-help-tabs button { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--pcd-grey-600); cursor: pointer; text-align: left; font: inherit; font-size: .82rem; }
.pcd-help-tabs button:hover { background: #f3f6ef; }
.pcd-help-tabs button.is-active { background: #eaf5d9; color: #315c13; font-weight: 800; }
.pcd-help-tabs button[hidden] { display: none; }
.pcd-help-panel { padding: 22px; border: 1px solid var(--pcd-line); border-radius: 13px; background: #fff; }
.pcd-help-panel[hidden] { display: none; }
.pcd-help-panel > header { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 15px; border-bottom: 1px solid var(--pcd-line); }
.pcd-help-panel > header > span { font-size: 1.65rem; }
.pcd-help-panel h2 { margin: 0; }
.pcd-help-panel > header p { margin: 4px 0 0; color: var(--pcd-grey-500); }
.pcd-help-steps { margin: 20px 0; padding: 0; list-style: none; counter-reset: helpstep; }
.pcd-help-steps li { position: relative; min-height: 43px; padding: 0 0 18px 48px; counter-increment: helpstep; }
.pcd-help-steps li:not(:last-child)::after { content: ''; position: absolute; top: 30px; bottom: 2px; left: 15px; width: 1px; background: var(--pcd-line); }
.pcd-help-steps li::before { content: counter(helpstep); position: absolute; left: 0; top: 0; width: 31px; height: 31px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #eaf5d9; color: #315c13; font-size: .75rem; font-weight: 900; }
.pcd-help-steps strong, .pcd-help-steps span { display: block; }
.pcd-help-steps span { margin-top: 3px; color: var(--pcd-grey-500); font-size: .83rem; line-height: 1.5; }
.pcd-help-check { margin: 0 0 18px; padding: 14px 16px; border-radius: 11px; background: #f5f8f1; }
.pcd-help-check h3 { margin: 0 0 8px; font-size: .9rem; }
.pcd-help-check ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 0; padding: 0; list-style: none; color: var(--pcd-grey-600); font-size: .78rem; }
.pcd-help-index { margin-top: 16px; padding: 18px; border: 1px solid var(--pcd-line); border-radius: 13px; background: #fff; }
.pcd-help-index h2 { margin: 0; }
.pcd-help-index > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 7px; margin-top: 12px; }
.pcd-help-index a { display: flex; gap: 7px; align-items: center; padding: 8px 10px; border-radius: 8px; background: #f6f8f4; color: var(--pcd-grey-600); text-decoration: none; font-size: .76rem; }

@media (max-width: 760px) {
	.pcd-help-hero { display: block; padding: 18px; }
	.pcd-help-hero > .pcd-btn { margin-top: 14px; }
	.pcd-help-layout { grid-template-columns: 1fr; }
	.pcd-help-tabs { display: flex; overflow-x: auto; }
	.pcd-help-tabs button { flex: 0 0 auto; }
	.pcd-help-panel { padding: 16px; }
	.pcd-help-check ul { grid-template-columns: 1fr; }
	.pcd-kb-grid { grid-template-columns: 1fr; }
}

/* Invoice lifecycle and payment trust cues */
.pcd-invoice-lifecycle { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 8px; }
.pcd-invoice-lifecycle > div { position: relative; min-width: 0; padding: 12px 12px 12px 45px; border: 1px solid var(--pcd-line); border-radius: 11px; background: #fff; }
.pcd-invoice-lifecycle span { position: absolute; left: 11px; top: 11px; width: 25px; height: 25px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #eaf5d9; color: #315c13; font-size: .7rem; font-weight: 900; }
.pcd-invoice-lifecycle strong, .pcd-invoice-lifecycle small { display: block; }
.pcd-invoice-lifecycle strong { font-size: .8rem; }
.pcd-invoice-lifecycle small { margin-top: 3px; color: var(--pcd-grey-400); font-size: .68rem; line-height: 1.35; }
.pcd-invoice-trust { margin: 0 0 14px; padding: 8px 11px; border-left: 3px solid #d49a39; background: #fff8e9; color: #74511b; font-size: .76rem; }
.pcd-invoice-paid { display: block; margin-top: 4px; color: #4d7650; font-size: .65rem; }
.pcd-invoice-void { display: block; max-width: 220px; margin-top: 4px; color: #785050; font-size: .65rem; line-height: 1.35; white-space: normal; }

@media (max-width: 850px) {
	.pcd-invoice-lifecycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 500px) {
	.pcd-invoice-lifecycle { grid-template-columns: 1fr; }
}

/* Native notification review. No hidden auto-retry controls. */
.pcd-notification { min-width: 0; overflow-wrap: anywhere; }
.pcd-notification form button { max-width: 100%; white-space: normal; }
.pcd-notification input[type="checkbox"] { width: 20px; height: 20px; vertical-align: middle; }
.pcd-notification [data-notification-result] { margin-top: 14px; }
.pcd-notification form[aria-busy="true"] { cursor: progress; }
.pcd-notification .pcd-help { color: var(--pcd-grey-600); }
