/**
 * Purple Triangle CRM client portal styles.
 * Developed by Christian Egwuibe. Purple Triangle Communications and Web Services LLC.
 */

.ptp {
	--ptp-acc: #996699;
	width: 100%;
	margin: 0 auto;
	color: #2d2a3e;
	font-family: inherit;
	box-sizing: border-box;
}
.ptp *, .ptp *::before, .ptp *::after { box-sizing: border-box; }

.ptp-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}
.ptp-head h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.ptp-sub { margin: 4px 0 0; font-size: 13px; color: #8a86a0; }

.ptp-nav {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	border-bottom: 2px solid #ececf3;
	margin-bottom: 20px;
}
.ptp-tab {
	padding: 11px 16px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	color: #6b6680;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
}
.ptp-tab:hover { color: var(--ptp-acc); }
.ptp-tab.ptp-active { color: var(--ptp-acc); border-bottom-color: var(--ptp-acc); }

.ptp-card {
	background: #fff;
	border: 1px solid #ececf3;
	border-radius: 14px;
	padding: 22px 24px;
	box-shadow: 0 8px 24px rgba(40,24,80,0.05);
	margin-bottom: 18px;
}

.ptp-notice {
	background: #e3f7ef;
	color: #0a8a5c;
	border-radius: 10px;
	padding: 12px 16px;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 16px;
}

.ptp-preview {
	background: #2c2c2c;
	color: #fff;
	border-radius: 10px;
	padding: 12px 16px;
	font-size: 13.5px;
	font-weight: 600;
	margin-bottom: 16px;
}

.ptp-empty { text-align: center; padding: 30px 10px; color: #8a86a0; font-size: 14px; }

.ptp-table { width: 100%; border-collapse: collapse; }
.ptp-table thead th {
	text-align: left;
	font-size: 11px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #9a96ac;
	padding: 10px 12px;
	border-bottom: 2px solid #ececf3;
}
.ptp-table thead th.r, .ptp-table tbody td.r { text-align: right; }
.ptp-table tbody td {
	padding: 13px 12px;
	border-bottom: 1px solid #f3f1f9;
	font-size: 14px;
	vertical-align: middle;
}
.ptp-table tbody tr:last-child td { border-bottom: none; }

.ptp-pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.ptp-success { background: #e3f7ef; color: #0a8a5c; }
.ptp-warning { background: #fdf2e1; color: #b9770b; }
.ptp-danger { background: #fdeaea; color: #c93338; }
.ptp-muted { background: #f0eef6; color: #6b6680; }

.ptp-btn {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 9px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	background: #f0eef6;
	color: #2d2a3e;
}
.ptp-btn-sm { padding: 6px 14px; font-size: 13px; }
.ptp-btn-primary { background: var(--ptp-acc); color: #fff; }
.ptp-btn-ghost { background: transparent; border-color: #d9d5e6; color: #4a4660; }

/* Client portal sign-in: centered, self-contained card that resists theme interference. */
.ptp-login {
	text-align: center;
	padding: 44px 28px 40px;
	max-width: 440px;
	margin: 40px auto;
}
.ptp-login h3 {
	margin: 0 0 8px !important;
	font-size: 24px !important;
	font-weight: 700 !important;
	color: var(--ptp-acc) !important;
	line-height: 1.25 !important;
}
.ptp-login p { margin: 0 0 26px !important; color: #6b6680 !important; font-size: 14.5px !important; }
.ptp-login-form { max-width: 340px; margin: 0 auto; text-align: left; }
.ptp-login-form label { margin-bottom: 18px; }
.ptp-login-form .ptp-form-actions { margin-top: 22px; text-align: center; }
.ptp-login-form .ptp-btn-primary {
	width: 100%;
	padding: 13px 24px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	border-radius: 10px !important;
	letter-spacing: 0.01em;
	box-shadow: 0 6px 16px rgba(153,102,153,0.28);
}
.ptp-login-form .ptp-btn-primary:hover { filter: brightness(0.94); }

.ptp-error {
	background: #fdeaea;
	color: #c93338;
	border-radius: 10px;
	padding: 12px 16px;
	font-size: 13.5px;
	font-weight: 600;
	margin: 0 auto 18px;
	max-width: 360px;
}

.ptp-card-title { margin: 0 0 14px; font-size: 16px; }

.ptp-foot-note { margin: 14px 2px 0; font-size: 12.5px; color: #9a96ac; }

.ptp-form label { display: block; font-size: 13px; font-weight: 600; color: #4a4660; margin-bottom: 14px; }
.ptp-form input {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 11px 13px !important;
	border: 1px solid #d9d5e6 !important;
	border-radius: 9px !important;
	font-size: 14px;
	font-weight: 400;
	background: #fff !important;
	color: #2d2a3e;
	box-shadow: none !important;
}
.ptp-form input:focus {
	outline: none;
	border-color: var(--ptp-acc) !important;
	box-shadow: 0 0 0 3px rgba(153,102,153,0.12) !important;
}
.ptp-form input:disabled { background: #f5f3fa; color: #8a86a0; }
.ptp-hint { display: block; margin-top: 5px; font-size: 12px; font-weight: 400; color: #9a96ac; }
.ptp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.ptp-form-actions { margin-top: 8px; }

@media (max-width: 640px) {
	.ptp-grid { grid-template-columns: 1fr; }
	.ptp-table thead { display: none; }
	.ptp-table tbody td { display: flex; justify-content: space-between; gap: 16px; text-align: right; padding: 10px 4px; border-bottom: 1px solid #f3f1f9; }
	.ptp-table tbody td.r { text-align: right; }
	.ptp-table tbody td::before { content: attr(data-label); font-size: 12px; font-weight: 600; color: #9a96ac; text-align: left; }
	.ptp-table tbody td:empty { display: none; }
	.ptp-table tbody tr { display: block; padding: 8px 0; border-bottom: 2px solid #ececf3; }
	.ptp-table tbody tr:last-child { border-bottom: none; }
}

/* Dashboard shell with sidebar */
.ptp-shell { display: flex; gap: 24px; align-items: flex-start; }
.ptp-side {
	flex: 0 0 240px; position: sticky; top: 20px;
	background: #fff; border: 1px solid #ececf3; border-radius: 14px; padding: 18px;
	box-shadow: 0 8px 24px rgba(40,24,80,0.05);
}
.ptp-main { flex: 1 1 auto; min-width: 0; }

.ptp-photo-card {
	text-align: center;
	padding-bottom: 20px;
	border-bottom: 1px solid #f0eef8;
	margin-bottom: 16px;
	margin-left: -18px;
	margin-right: -18px;
	padding-left: 0;
	padding-right: 0;
}
.ptp-photo-wrap {
	width: calc(100% - 12px);
	margin: 0 6px 14px;
	aspect-ratio: 4 / 5;
	border-radius: 10px 10px 0 0;
	overflow: hidden;
	border: none;
	border-bottom: 3px solid #ece9f5;
	box-shadow: none;
}
.ptp-photo-wrap svg { display: block; width: 100%; height: 100%; }
.ptp-photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}
.ptp-photo-name {
	font-size: 16px;
	font-weight: 700;
	color: #2d2a3e;
	line-height: 1.3;
	margin-bottom: 5px;
	padding: 0 18px;
}
.ptp-photo-position {
	font-size: 12px;
	color: var(--ptp-acc);
	line-height: 1.4;
	font-style: italic;
	padding: 0 18px;
	margin-bottom: 2px;
}
.ptp-photo-co {
	font-size: 13px;
	color: #8a86a0;
	line-height: 1.3;
	padding: 0 18px;
}


.ptp-side-nav { display: flex; flex-direction: column; gap: 2px; }
.ptp-side-link {
	display: flex; align-items: center; gap: 10px;
	padding: 11px 12px; border-radius: 9px;
	font-size: 14px; font-weight: 600; color: #5a5670; text-decoration: none;
}
.ptp-side-link .dashicons { font-size: 18px; width: 18px; height: 18px; }
.ptp-side-link:hover { background: #f5f3fa; color: var(--ptp-acc); }
.ptp-side-link.ptp-active { background: #f3effc; color: var(--ptp-acc); }
.ptp-side-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid #f0eef8; }
.ptp-side-foot .ptp-btn { width: 100%; text-align: center; }


/* -----------------------------------------------------------------------
   Dashboard redesign — matches CLIENT_DASHBOARD_MOCK_UP_DESIGN_IN_HTML
   ----------------------------------------------------------------------- */

/* CSS variables for dashboard */
.ptp { --ptp-green: #2f765a; --ptp-green-soft: #e7f3ed; --ptp-red: #b2474d; --ptp-red-soft: #fcebed; --ptp-blue: #426a88; --ptp-blue-soft: #eaf1f6; }

/* Welcome banner */
.ptp-welcome {
	position: relative; overflow: hidden;
	background: linear-gradient(120deg, #2c1e30, #5c3b62 62%, #7e5484);
	color: #fff; border-radius: 20px; padding: 26px 28px;
	box-shadow: 0 18px 55px rgba(42,27,46,.1);
	display: grid; grid-template-columns: minmax(0,1fr) auto;
	align-items: center; gap: 22px; margin-bottom: 16px;
}
.ptp-welcome::before { content: ''; position: absolute; width: 280px; height: 280px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; right: -80px; top: -160px; }
.ptp-welcome::after  { content: ''; position: absolute; width: 150px; height: 150px; border: 1px solid rgba(199,167,106,.22); border-radius: 50%; right: 100px; bottom: -115px; }
.ptp-welcome > * { position: relative; z-index: 1; }
.ptp-welcome-eyebrow { color: #d9c79f; font-size: 14px; text-transform: uppercase; letter-spacing: 1.8px; font-weight: 800; margin-bottom: 7px; }
.ptp-welcome h2 { font-size: clamp(24px,2.5vw,30px); font-weight: 800; margin: 0 0 9px; line-height: 1.15; color: #fff !important; }
.ptp-welcome p { margin: 0; color: #d3cbd5; font-size: 16px; }
.ptp-welcome-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.ptp-welcome-btn {
	border: none; border-radius: 11px; padding: 11px 16px;
	display: inline-flex; align-items: center; gap: 7px;
	font-size: 15px; font-weight: 800; cursor: pointer;
	text-decoration: none; transition: transform .15s, background .15s;
}
.ptp-welcome-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.ptp-welcome-btn:hover { transform: translateY(-1px); }
.ptp-welcome-btn-primary { background: #fff; color: #2c1e30; box-shadow: 0 7px 20px rgba(0,0,0,.12); }
.ptp-welcome-btn-primary:hover { background: #fffaf0; }
.ptp-welcome-btn-outline { border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.07); color: #fff; }
.ptp-welcome-btn-outline:hover { background: rgba(255,255,255,.12); }

/* 4 stat cards */
.ptp-db-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.ptp-db-stat {
	background: #fff; border: 1px solid #e8e2e9; border-radius: 18px;
	padding: 17px; box-shadow: 0 4px 16px rgba(42,27,46,.035);
}
.ptp-db-stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ptp-db-stat-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #f1e9f2; color: var(--ptp-acc); }
.ptp-db-stat-icon svg { width: 17px; height: 17px; }
.ptp-db-si-green { background: var(--ptp-green-soft); color: var(--ptp-green); }
.ptp-db-si-red   { background: var(--ptp-red-soft);   color: var(--ptp-red);   }
.ptp-db-si-blue  { background: var(--ptp-blue-soft);  color: var(--ptp-blue);  }
.ptp-db-stat-badge { font-size: 13px; border-radius: 99px; padding: 6px 9px; background: var(--ptp-green-soft); color: var(--ptp-green); font-weight: 800; }
.ptp-db-badge-green { background: var(--ptp-green-soft); color: var(--ptp-green); }
.ptp-db-badge-red   { background: var(--ptp-red-soft);   color: var(--ptp-red);   }
.ptp-db-badge-blue  { background: var(--ptp-blue-soft);  color: var(--ptp-blue);  }
.ptp-db-stat-value { font-size: 22px; font-weight: 800; color: #211d26; letter-spacing: -.6px; line-height: 1.1; }
.ptp-db-stat-red .ptp-db-stat-value { color: var(--ptp-red); }
.ptp-db-stat-label { font-size: 14px; color: #746d78; margin-top: 6px; }
.ptp-db-stat-bar { height: 4px; background: #eee9ef; border-radius: 99px; margin-top: 12px; overflow: hidden; }
.ptp-db-stat-bar span { display: block; height: 100%; background: var(--ptp-acc); border-radius: 99px; }
.ptp-db-bar-red span { background: var(--ptp-red); }
.ptp-db-bar-blue span { background: var(--ptp-blue); }

/* Two-column grid */
.ptp-db-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(280px,.7fr); gap: 14px; }
.ptp-db-left, .ptp-db-right { display: grid; gap: 14px; align-content: start; }

/* Card base */
.ptp-db-card {
	background: #fff; border: 1px solid #e8e2e9;
	border-radius: 18px; box-shadow: 0 8px 25px rgba(42,27,46,.05);
	overflow: hidden; padding: 20px;
}
.ptp-db-card-help { background: linear-gradient(145deg,#f8f4f8,#fffaf1); }
.ptp-db-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.ptp-db-card-head h3 { font-size: 18px; font-weight: 800; margin: 0; color: #211d26; }
.ptp-db-card-head p { margin: 6px 0 0; color: #746d78; font-size: 14px; }
.ptp-db-link-btn { border: none; background: transparent; color: var(--ptp-acc); font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 7px; white-space: nowrap; cursor: pointer; text-decoration: none; }
.ptp-db-link-btn svg { width: 13px; height: 13px; }

/* Invoice spotlight */
.ptp-db-invoice {
	border: 1px solid #e8e2e9; border-radius: 14px; padding: 14px;
	display: grid; grid-template-columns: auto minmax(0,1fr) auto;
	align-items: center; gap: 12px;
}
.ptp-db-inv-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--ptp-red-soft); color: var(--ptp-red); flex-shrink: 0; }
.ptp-db-inv-icon svg { width: 19px; height: 19px; }
.ptp-db-invoice strong { display: block; color: #211d26; font-size: 16px; font-weight: 700; }
.ptp-db-inv-meta { display: flex; gap: 14px; flex-wrap: wrap; color: #746d78; font-size: 14px; margin-top: 6px; }
.ptp-db-inv-amount { text-align: right; }
.ptp-db-inv-amount strong { font-size: 20px; font-weight: 800; color: #211d26; display: block; }
.ptp-db-due-pill { display: inline-flex; margin-top: 6px; padding: 6px 9px; border-radius: 99px; background: var(--ptp-red-soft); color: var(--ptp-red); font-size: 13px; font-weight: 800; }
.ptp-db-inv-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e8e2e9; flex-wrap: wrap; }

/* Shared button styles */
.ptp-db-btn { border: none; border-radius: 13px; padding: 12px 18px; font-size: 15px; font-weight: 800; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: .15s; }
.ptp-db-btn svg { width: 14px; height: 14px; }
.ptp-db-btn-purple { background: var(--ptp-acc); color: #fff; }
.ptp-db-btn-purple:hover { filter: brightness(1.1); }
.ptp-db-btn-light { background: #fff; border: 1px solid #e8e2e9; color: #2c1e30; }
.ptp-db-btn-light:hover { border-color: #cdbace; }
.ptp-db-btn-full { width: 100%; justify-content: center; }

/* Project spotlight */
.ptp-db-proj-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.ptp-db-proj strong { font-size: 16px; font-weight: 700; color: #211d26; display: block; }
.ptp-db-proj small { display: block; font-size: 14px; color: #746d78; margin-top: 5px; }
.ptp-db-proj-status { display: inline-flex; height: max-content; padding: 7px 10px; border-radius: 99px; background: var(--ptp-blue-soft); color: var(--ptp-blue); font-size: 13px; font-weight: 800; white-space: nowrap; }
.ptp-db-proj-bar { height: 6px; border-radius: 99px; background: #eee9ef; margin: 14px 0 7px; overflow: hidden; }
.ptp-db-proj-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--ptp-acc), #c7a76a); border-radius: 99px; }
.ptp-db-proj-foot { display: flex; justify-content: space-between; color: #746d78; font-size: 14px; }
.ptp-db-proj-foot strong { color: #211d26; font-weight: 800; }

/* Quick access grid */
.ptp-db-quick-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.ptp-db-quick {
	border: 1px solid #e8e2e9; background: #fff; border-radius: 13px;
	padding: 13px; text-align: left; color: #211d26; text-decoration: none;
	transition: .15s; display: block;
}
.ptp-db-quick:hover { border-color: #cdb9ce; box-shadow: 0 8px 18px rgba(42,27,46,.06); transform: translateY(-2px); }
.ptp-db-quick-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #f1e9f2; color: var(--ptp-acc); margin-bottom: 12px; }
.ptp-db-quick-icon svg { width: 15px; height: 15px; }
.ptp-db-quick strong { display: block; font-size: 15px; font-weight: 800; color: #211d26; }
.ptp-db-quick span { display: block; font-size: 13px; color: #746d78; margin-top: 5px; }

/* Workspace summary */
.ptp-db-summary { display: grid; gap: 0; }
.ptp-db-sum-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid #e8e2e9; }
.ptp-db-sum-row:first-child { border-top: none; padding-top: 0; }
.ptp-db-sum-icon { width: 33px; height: 33px; border-radius: 10px; background: #f8f4f8; color: var(--ptp-acc); display: grid; place-items: center; flex-shrink: 0; }
.ptp-db-sum-icon svg { width: 15px; height: 15px; }
.ptp-db-sum-row > span:nth-child(2) { flex: 1; min-width: 0; }
.ptp-db-sum-row > span:nth-child(2) strong { display: block; font-size: 15px; font-weight: 700; color: #211d26; }
.ptp-db-sum-row > span:nth-child(2) span { display: block; font-size: 13px; color: #746d78; margin-top: 4px; }
.ptp-db-sum-num { font-size: 20px; font-weight: 800; color: #2c1e30; margin-left: auto; flex-shrink: 0; }

/* Recent activity */
.ptp-db-activity { list-style: none; padding: 0; margin: 0; }
.ptp-db-activity li { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 9px; align-items: start; padding: 10px 0; border-top: 1px solid #e8e2e9; }
.ptp-db-activity li:first-child { border-top: none; padding-top: 0; }
.ptp-db-act-dot { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; background: #f1e9f2; color: var(--ptp-acc); }
.ptp-db-act-dot svg { width: 13px; height: 13px; }
.ptp-db-activity strong { display: block; font-size: 14px; font-weight: 700; color: #211d26; }
.ptp-db-activity span { display: block; color: #746d78; font-size: 13px; margin-top: 4px; }
.ptp-db-activity time { color: #9a929e; font-size: 13px; white-space: nowrap; }

/* Need help card */
.ptp-db-help-row { display: flex; gap: 11px; margin-bottom: 13px; }
.ptp-db-help-icon { width: 40px; height: 40px; border-radius: 12px; background: #2c1e30; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.ptp-db-help-icon svg { width: 18px; height: 18px; }
.ptp-db-card-help h3 { margin: 0; font-size: 18px; font-weight: 800; color: #211d26; }
.ptp-db-card-help p { color: #746d78; font-size: 14px; margin: 6px 0 0; line-height: 1.5; }

/* Responsive */
@media ( max-width: 1100px ) {
	.ptp-db-stats { grid-template-columns: repeat(2,1fr); }
	.ptp-db-grid { grid-template-columns: 1fr; }
	.ptp-db-right { grid-template-columns: repeat(2,1fr); }
	.ptp-db-card-help { grid-column: 1/-1; }
}
@media ( max-width: 680px ) {
	.ptp-welcome { grid-template-columns: 1fr; }
	.ptp-welcome-actions { justify-content: flex-start; }
	.ptp-db-stats { grid-template-columns: repeat(2,1fr); gap: 8px; }
	.ptp-db-quick-grid { grid-template-columns: repeat(2,1fr); }
	.ptp-db-right { grid-template-columns: 1fr; }
	.ptp-db-card-help { grid-column: auto; }
}

.ptp-promo {
	display: flex; overflow: hidden;
	border-radius: 14px; border: 1px solid #ececf3; background: #fff;
	box-shadow: 0 8px 24px rgba(40,24,80,0.05);
}
.ptp-promo-img { flex: 0 0 40%; }
.ptp-promo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ptp-promo-body { padding: 22px 24px; }
.ptp-promo-body h3 { margin: 0 0 8px; font-size: 18px; }
.ptp-promo-body p { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #5a5670; }

@media (max-width: 860px) {
	.ptp-shell { flex-direction: column; }
	.ptp-side { position: static; width: 100%; flex: none; }
	.ptp-side-nav { flex-direction: row; flex-wrap: wrap; }
	.ptp-side-link { flex: 1 1 auto; justify-content: center; }
	.ptp-promo { flex-direction: column; }
	.ptp-promo-img { flex: none; max-height: 200px; }
}

/* Promo carousel */
.ptp-promo-slide { display: none; }
.ptp-promo-slide.is-active { display: block; }
.ptp-promo-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.ptp-promo-dot { width: 9px; height: 9px; border-radius: 50%; border: none; background: #d6d1e6; cursor: pointer; padding: 0; }
.ptp-promo-dot.is-active { background: var(--ptp-acc); }

/* Phase 8: Support tickets and file sharing */
.ptp-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d9d5e6;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	box-sizing: border-box;
	background: #fff;
	resize: vertical;
}
.ptp-form textarea:focus { outline: none; border-color: var(--ptp-acc); }
.ptp-form input[type="file"] { padding: 8px 0; border: none; }
.ptp-form-row { margin-bottom: 14px; }

.ptp-thread-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.ptp-thread-head h3 { margin: 0; }

.ptp-thread { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 18px; }
.ptp-msg { border-radius: 10px; padding: 12px 14px; border: 1px solid #eceaf4; }
.ptp-msg-staff { background: #f3effc; border-color: #e6def9; }
.ptp-msg-client { background: #fafafe; }
.ptp-msg-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #8a86a0; margin-bottom: 6px; }
.ptp-msg-meta strong { color: #1e1b2e; font-size: 13px; }
.ptp-msg-body { font-size: 14px; color: #3a3650; line-height: 1.55; }

.ptp-thread-files { margin: 4px 0 14px; padding-top: 12px; border-top: 1px solid #f0eef8; }
.ptp-thread-files strong { display: block; font-size: 13px; margin-bottom: 8px; color: #1e1b2e; }
.ptp-filelist { list-style: none; margin: 0; padding: 0; }
.ptp-filelist li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.ptp-filelist li .dashicons { color: var(--ptp-acc); }
.ptp-filelist li a { color: var(--ptp-acc); text-decoration: none; word-break: break-all; }
.ptp-filelist li a:hover { text-decoration: underline; }
.ptp-file-size { color: #9a96ac; font-size: 12px; }
.ptp-table td .dashicons { color: var(--ptp-acc); vertical-align: middle; }

/* Portal proposals respond row */
.ptp-prop-actions-row td { padding-top: 0; border-top: none; }
.ptp-prop-respond { display: flex; gap: 8px; flex-wrap: wrap; }

/* Profile page photo upload row */
.ptp-profile-photo-row { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.ptp-photo-wrap-sm { width: 180px; height: 225px; flex: 0 0 180px; border-radius: 10px; overflow: hidden; border: 2px solid #ece9f5; box-shadow: 0 4px 12px rgba(153,102,153,0.15); }
.ptp-photo-wrap-sm img, .ptp-photo-wrap-sm div, .ptp-photo-wrap-sm svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.ptp-profile-photo-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.ptp-profile-photo-actions .ptp-btn { width: 160px; text-align: center; }

/* Company info read-only display */
.ptp-company-info { display: flex; flex-direction: column; gap: 10px; }
.ptp-ci-row { display: flex; gap: 12px; font-size: 13.5px; }
.ptp-ci-row span { min-width: 70px; color: #8a86a0; font-weight: 500; flex-shrink: 0; }
.ptp-ci-row strong, .ptp-ci-row a { color: #2d2a3e; font-weight: 600; text-decoration: none; }
.ptp-ci-row a:hover { color: var(--ptp-acc); }

/* Portal developer credit footer */
.ptp-portal-credit {
	display: block;
	margin-top: 20px;
	padding: 12px 12px 6px;
	border-top: 1px solid #ece9f5;
	text-align: center;
	line-height: 0.9;
}
.ptp-credit-label {
	display: block;
	font-size: 11px;
	color: #b0aac0;
	margin: 0 0 5px !important;
	padding: 0 !important;
}
.ptp-credit-name {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: var(--ptp-acc);
	letter-spacing: 0.01em;
	margin: 0 !important;
	padding: 2px 0 !important;
}
.ptp-credit-title {
	display: block;
	font-size: 10.5px;
	color: #c4bdd4;
	font-style: italic;
	margin: 0 !important;
	padding: 1px 0 !important;
}
.ptp-credit-company {
	display: block;
	font-size: 10.5px;
	color: #b0aac0;
	margin: 0 !important;
	padding: 1px 0 !important;
}

/* Portal messages */
.ptp-msg { border: 1px solid #ece9f5; border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.ptp-msg-out { background: #f8f6ff; border-color: #d9d0f0; }
.ptp-msg-in { background: #fff; }
.ptp-msg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.ptp-msg-head strong { font-size: 14px; color: #2d2a3e; }
.ptp-msg-head span { font-size: 12px; color: #9a96ac; }
.ptp-msg-body { font-size: 13.5px; color: #4a4660; line-height: 1.6; }

/* Portal domains & hosting */
.ptp-hosting-table { display: flex; flex-direction: column; gap: 8px; }
.ptp-hosting-row { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid #ece9f5; border-radius: 8px; background: #faf9fc; }
.ptp-hosting-name strong { font-size: 14px; color: #2d2a3e; }
.ptp-hosting-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12px; color: #8a86a0; margin-top: 4px; }

/* Portal certificate cards */
.ptp-cert-card { display: flex; gap: 16px; align-items: flex-start; padding: 16px; border: 1px solid #ece9f5; border-radius: 10px; margin-bottom: 12px; flex-wrap: wrap; background: #faf9fc; }
.ptp-cert-info { flex: 1; min-width: 160px; }
.ptp-cert-title { font-size: 14px; font-weight: 700; color: #2d2a3e; margin-bottom: 4px; }
.ptp-cert-domain { font-size: 13px; color: var(--ptp-acc); margin-bottom: 2px; }
.ptp-cert-number { font-size: 12px; color: #8a86a0; margin-bottom: 2px; }
.ptp-cert-expiry { font-size: 12px; color: #8a86a0; }
.ptp-cert-qr img { border: 1px solid #ece9f5; border-radius: 6px; display: block; }
.ptp-cert-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* Mobile: scroll-to-section fix. Each main section gets a scroll-margin so
   the nav link anchor lands below the sticky sidebar nav bar. */
.ptp-main > .ptp-card,
.ptp-main > .ptp-overview,
.ptp-main > .ptp-stats,
.ptp-main > .ptp-quick,
.ptp-main > form {
	scroll-margin-top: 20px;
}
@media (max-width: 860px) {
	.ptp-main > .ptp-card,
	.ptp-main > .ptp-overview,
	.ptp-main > .ptp-stats,
	.ptp-main > .ptp-quick {
		scroll-margin-top: 80px;
	}
}

/* Files section: make table horizontally scrollable on small screens */
.ptp-file-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ptp-file-table-wrap .ptp-table { min-width: 480px; }

/* Documents & Approvals */
.ptp-document-card .ptp-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid #ece8f0; }
.ptp-document-card details { margin: 12px 0; }
.ptp-document-card summary { cursor: pointer; color: var(--ptp-acc); font-weight: 700; margin-bottom: 10px; }
.ptp-completion ol { padding-left: 22px; }
.ptp-completion li { margin: 10px 0; }
@media print { .ptp-side,.ptp-welcome,.ptp-completion button,.ptp-portal-credit { display:none!important; } .ptp-shell,.ptp-main { display:block!important; width:100%!important; } .ptp-completion { box-shadow:none!important; border:0!important; } }

/* Hosting table responsive */
@media (max-width: 640px) {
	.ptp-hosting-row { gap: 6px; }
	.ptp-hosting-meta { flex-direction: column; gap: 4px; }
	.ptp-cert-card { flex-direction: column; }
	.ptp-cert-actions { flex-direction: row; flex-wrap: wrap; }
}

/* Exit Preview / Sign Out clarity */
.ptp-side-foot { display: flex; flex-direction: column; gap: 8px; }
.ptp-side-foot .ptp-btn { width: 100%; text-align: center; justify-content: center; }

/* Proposal signature pad — typed + optional draw */

/* Step labels */
.ptp-sign-step { margin-bottom: 20px; }
.ptp-sign-step-label {
	font-size: 13px; font-weight: 700; color: #6b6680;
	text-transform: uppercase; letter-spacing: 0.5px;
	margin-bottom: 10px;
}

/* Name input */
.ptp-sign-name-input {
	width: 100%; padding: 12px 14px;
	border: 2px solid #d9d5e6; border-radius: 10px;
	font-size: 16px; color: #2d2a3e;
	background: #faf9fc; box-sizing: border-box;
}
.ptp-sign-name-input:focus { outline: none; border-color: var(--ptp-acc); background: #fff; }

/* Font style buttons */
.ptp-sig-font-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.ptp-sig-font-btn {
	padding: 10px 22px; border: 2px solid #d9d5e6;
	border-radius: 10px; background: #fff; cursor: pointer;
	font-size: 22px; color: #2d2a3e; transition: .15s;
	line-height: 1.3;
}
.ptp-sig-font-btn:hover { border-color: var(--ptp-acc); }
.ptp-sig-font-active { border-color: var(--ptp-acc); background: #f3eef3; color: var(--ptp-acc); }

/* Size controls */
.ptp-sig-size-row { display: flex; align-items: center; gap: 14px; }
.ptp-sig-size-btn {
	width: 38px; height: 38px; border-radius: 8px;
	border: 2px solid #d9d5e6; background: #fff; cursor: pointer;
	font-size: 14px; font-weight: 800; color: #2d2a3e; transition: .15s;
}
.ptp-sig-size-btn:hover { border-color: var(--ptp-acc); color: var(--ptp-acc); }
#ptp-sig-size-display { font-size: 13px; color: #8a86a0; min-width: 40px; text-align: center; }

/* Live typed signature preview */
.ptp-sig-preview {
	min-height: 90px; display: flex; align-items: center;
	padding: 14px 20px;
	border: 2px dashed #d9d5e6; border-radius: 10px;
	background: #faf9fc;
	position: relative;
}
.ptp-sig-preview::after {
	content: 'Signature preview'; position: absolute;
	top: 8px; right: 12px;
	font-size: 10px; color: #c4bdd4; font-weight: 600;
	text-transform: uppercase; letter-spacing: 0.5px;
}
.ptp-sig-preview span { word-break: break-word; }

/* Draw toggle */
.ptp-sign-draw-toggle {
	display: flex; align-items: center; gap: 10px;
	font-size: 14px; color: #4a4660; cursor: pointer; font-weight: 600;
}
.ptp-sign-draw-toggle input { width: 18px; height: 18px; accent-color: var(--ptp-acc); cursor: pointer; }

/* Drawing canvas */
.ptp-sig-wrap {
	margin: 8px 0 10px;
	border: 2px solid #d9d5e6; border-radius: 10px;
	background: #faf9fc; overflow: hidden; cursor: crosshair; max-width: 100%;
}
.ptp-sig-canvas { display: block; width: 100%; height: auto; touch-action: none; }
.ptp-sig-clear { margin-bottom: 10px; font-size: 13px; }

/* Project pipeline portal view */
.ptp-proj-card { border: 1px solid #ece9f5; border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.ptp-proj-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.ptp-proj-title { font-size: 15px; color: #2d2a3e; }
.ptp-proj-progress { display: flex; align-items: center; gap: 12px; }
.ptp-proj-pct { font-size: 12px; color: #6b6680; white-space: nowrap; }
.ptp-progress-bar-wrap { flex: 1; background: #f0eef6; border-radius: 6px; height: 10px; overflow: hidden; min-width: 80px; }
.ptp-progress-bar { height: 100%; background: var(--ptp-acc); border-radius: 6px; transition: width 0.4s; }

/* Stage pipeline */
.ptp-pipeline { display: flex; flex-direction: column; gap: 0; }
.ptp-stage-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #f0eef8; }
.ptp-stage-item:last-child { border-bottom: none; }
.ptp-stage-dot { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: #f0eef6; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-top: 2px; }
.ptp-stage-complete .ptp-stage-dot { background: #dcfce7; }
.ptp-stage-in_progress .ptp-stage-dot { background: #fef3c7; }
.ptp-stage-in_review .ptp-stage-dot { background: #dbeafe; }
.ptp-stage-testing .ptp-stage-dot { background: #ede9fe; }
.ptp-stage-on_hold .ptp-stage-dot { background: #f3f4f6; }
.ptp-stage-info { flex: 1; min-width: 0; }
.ptp-stage-info strong { display: block; font-size: 14px; color: #2d2a3e; margin-bottom: 2px; }
.ptp-stage-status-lbl { font-size: 11.5px; color: #8a86a0; display: block; margin-bottom: 4px; }
.ptp-stage-client-note { font-size: 13px; color: #4a4660; margin: 6px 0; line-height: 1.55; }
.ptp-stage-file-link { font-size: 12.5px; color: var(--ptp-acc); text-decoration: none; display: inline-block; margin: 4px 0; }
.ptp-stage-comment-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.ptp-stage-comment { padding: 8px 10px; border-radius: 8px; font-size: 12.5px; }
.ptp-comment-admin { background: #f3eef3; }
.ptp-comment-client { background: #eff6ff; }
.ptp-comment-author { font-weight: 700; color: #2d2a3e; margin-right: 6px; }
.ptp-comment-time { color: #9a96ac; font-size: 11px; }
.ptp-stage-comment p { margin: 4px 0 0; color: #4a4660; }
.ptp-comment-form { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ptp-comment-form textarea { width: 100%; padding: 8px 10px; border: 1px solid #d9d5e6; border-radius: 8px; font-size: 13px; resize: vertical; }

/* Progress updates feed portal */
.ptp-update-row { padding: 12px 0; border-bottom: 1px solid #f0eef8; }
.ptp-update-row:last-child { border-bottom: none; }
.ptp-update-meta { font-size: 11.5px; color: #9a96ac; margin-bottom: 4px; }
.ptp-update-row p { margin: 0; font-size: 13.5px; color: #2d2a3e; line-height: 1.55; }
.ptp-stage-num-label {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	color: #b0aac0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 2px;
}
.ptp-preview {
	background: #1e1b2e; color: #fff; padding: 11px 16px;
	border-radius: 10px; font-size: 13px; margin-bottom: 14px;
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px; flex-wrap: wrap;
}
.ptp-preview-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.ptp-preview-btn {
	padding: 7px 13px; border-radius: 8px; font-size: 12px; font-weight: 700;
	border: 1px solid rgba(255,255,255,.25); color: #fff; background: transparent;
	text-decoration: none; white-space: nowrap; transition: background .15s;
}
.ptp-preview-btn:hover { background: rgba(255,255,255,.1); }
.ptp-preview-btn-primary { background: var(--ptp-acc); border-color: var(--ptp-acc); }
.ptp-preview-btn-primary:hover { filter: brightness(1.12); }
.ptp-regen-notice {
	background: #f0fdf4; border: 1px solid #86efac; border-radius: 10px;
	padding: 14px 16px; margin-bottom: 14px; font-size: 13px; color: #166534;
}
.ptp-regen-notice strong { display: block; margin-bottom: 8px; font-size: 14px; }
.ptp-regen-msg {
	width: 100%; margin-top: 10px; padding: 10px; font-size: 12.5px;
	border: 1px solid #86efac; border-radius: 8px; background: #fff;
	color: #1e1b2e; resize: vertical; box-sizing: border-box;
}
.ptp-preview-btn-danger  { background: #b2474d !important; border-color: #b2474d !important; }
.ptp-preview-btn-danger:hover  { filter: brightness(1.1); }
.ptp-preview-btn-success { background: #2f765a !important; border-color: #2f765a !important; }
.ptp-preview-btn-success:hover { filter: brightness(1.1); }
.ptp-preview-disabled { background: #3d1f1f; }

/* Secure in-portal PDF review for document packages. */
.ptp-document-viewer {
	margin: 18px 0;
	overflow: hidden;
	border: 1px solid #e3dfeb;
	border-radius: 12px;
	background: #f6f4f8;
}
.ptp-document-viewer iframe {
	display: block;
	width: 100%;
	height: 72vh;
	min-height: 620px;
	border: 0;
	background: #fff;
}
.ptp-document-viewer-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 14px;
	color: #6b6680;
	font-size: 13px;
}
.ptp-pdf-questionnaire { margin: 18px 0; border: 1px solid #e3dfeb; border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 12px 32px rgba(40, 25, 50, .07); }
.ptp-fillable-pdf-viewer { margin: 0; border-radius: 0; border: 0; border-top: 1px solid #ebe7f0; }
.ptp-fillable-pdf-viewer iframe { height: min(82vh, 1100px); min-height: 620px; }
.ptp-pdf-form-notice { padding: 0 20px 10px; color: #625d70; font-size: 13px; line-height: 1.5; }
.ptp-pdf-questionnaire-submit { padding: 0 20px 16px; }
.ptp-pdf-questionnaire-submit .ptp-form-actions { margin: 0; }
@media (max-width: 782px) {
	.ptp-fillable-pdf-viewer iframe { height: 72vh; min-height: 520px; }
	.ptp-pdf-questionnaire-submit { padding-inline: 14px; }
	.ptp-pdf-questionnaire-submit .ptp-form-actions { align-items: stretch; flex-direction: column; }
	.ptp-pdf-questionnaire-submit .ptp-form-actions .ptp-btn { width: 100%; justify-content: center; }
}
.ptp-questionnaire-workspace {
	margin: 18px 0;
	border: 1px solid #e3dfeb;
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 12px 32px rgba(40, 25, 50, .07);
}
.ptp-questionnaire-heading,
.ptp-questionnaire-pdf {
	padding: 18px 20px;
	background: #f3eff8;
}
.ptp-questionnaire-heading {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 18px;
	border-top: 4px solid #9b6aa0;
}
.ptp-questionnaire-eyebrow { display: block; margin-bottom: 8px; color: #8a5b92; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.ptp-questionnaire-heading h4,
.ptp-questionnaire-section h4 { margin: 0 0 7px; color: #241728; }
.ptp-questionnaire-heading p,
.ptp-questionnaire-section > p,
.ptp-questionnaire-pdf p { margin: 0; color: #625d70; line-height: 1.6; }
.ptp-questionnaire-guided .ptp-questionnaire-progress { padding: 18px 22px 16px; background: #fff; border-bottom: 1px solid #ebe7f0; }
.ptp-questionnaire-progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.ptp-questionnaire-progress-title { color: #34263d; font-size: 14px; }
.ptp-questionnaire-progress-label { color: #716b7b; font-size: 12px; }
.ptp-questionnaire-progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #eeeaf2; }
.ptp-questionnaire-progress-track span { display: block; width: 16.666%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#8c5c94,#b579aa); transition: width .2s ease; }
.ptp-questionnaire-form > fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.ptp-questionnaire-checklist { min-width: 0; margin: 18px 0 8px; padding: 0; border: 0; }
.ptp-questionnaire-checklist legend { width: 100%; margin: 0 0 9px; color: #2d2736; font-weight: 700; line-height: 1.5; }
.ptp-questionnaire-section { padding: 24px 22px; border-top: 1px solid #e9e5ef; background: #fff; }
.ptp-questionnaire-section-number { display: block; margin-bottom: 7px; color: #8c5c94; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.ptp-questionnaire-section h4 { font-size: 19px; line-height: 1.35; }
.ptp-questionnaire-section[hidden],.ptp-questionnaire-actions [hidden],.ptp-questionnaire-navigation [hidden] { display: none !important; }
.ptp-questionnaire-options,
.ptp-questionnaire-radio { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 14px; margin: 16px 0; border: 0; padding: 0; }
.ptp-questionnaire-radio legend { width: 100%; margin-bottom: 9px; font-weight: 700; color: #2d2736; }
.ptp-questionnaire-choice { display: flex; align-items: flex-start; gap: 9px; padding: 12px 13px; border: 1px solid #e2ddea; border-radius: 10px; background: #fff; color: #3f3948; line-height: 1.45; transition: border-color .15s ease,background .15s ease; }
.ptp-questionnaire-choice:has(input:checked) { border-color: #a978a8; background: #faf6fb; }
.ptp-questionnaire-choice input { width: auto; margin: 3px 0 0; flex: 0 0 auto; }
.ptp-questionnaire-field { display: block; margin-top: 15px; font-weight: 700; color: #2d2736; }
.ptp-questionnaire-field > span { display: block; margin-bottom: 6px; }
.ptp-questionnaire-field input,
.ptp-questionnaire-field textarea { box-sizing: border-box; width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid #d8d2e2; border-radius: 9px; background: #fff; color: #2d2736; font-family: inherit; font-size: 16px; line-height: 1.45; }
.ptp-questionnaire-field textarea { resize: vertical; min-height: 104px; }
.ptp-questionnaire-navigation,.ptp-questionnaire-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 22px; border-top: 1px solid #e9e5ef; background: #faf9fc; }
.ptp-questionnaire-navigation { border-top: 0; padding-top: 0; }
.ptp-questionnaire-actions { position: sticky; bottom: 0; z-index: 2; justify-content: flex-end; background: rgba(255,255,255,.97); box-shadow: 0 -6px 18px rgba(45,30,55,.06); }
.ptp-questionnaire-pdf { border-top: 1px solid #ddd6e7; }
.ptp-questionnaire-pdf summary { color: #493b52; font-weight: 700; cursor: pointer; }
.ptp-questionnaire-pdf .ptp-btn { margin-top: 12px; }
.ptp-questionnaire-pdf ol { margin: 12px 0 12px 22px; color: #3f3948; line-height: 1.55; }
.ptp-questionnaire-pdf-upload { display: grid; gap: 12px; margin-top: 18px; padding-top: 17px; border-top: 1px solid #e2ddea; }
.ptp-questionnaire-pdf-upload label > span { display: block; margin-bottom: 7px; font-weight: 700; color: #2d2736; }
.ptp-questionnaire-pdf-upload input[type="file"] { box-sizing: border-box; width: 100%; padding: 10px; border: 1px solid #d8d2e2; border-radius: 9px; background: #fff; font-size: 16px; }
.ptp-questionnaire-pdf-upload .ptp-btn { justify-self: start; }
@media (max-width: 720px) {
	.ptp-preview { align-items: flex-start; }
	.ptp-preview-actions { width: 100%; min-width: 0; flex: 1 1 100%; }
	.ptp-preview-btn { min-width: 0; flex: 1 1 145px; white-space: normal; text-align: center; }
	.ptp-document-viewer iframe { height: 65vh; min-height: 480px; }
	.ptp-document-viewer-actions { align-items: flex-start; flex-direction: column; }
	.ptp-questionnaire-heading { flex-direction: column; }
	.ptp-questionnaire-progress-top { align-items: flex-start; flex-direction: column; gap: 4px; }
	.ptp-questionnaire-options,
	.ptp-questionnaire-radio { grid-template-columns: 1fr; }
	.ptp-questionnaire-actions { flex-direction: column; }
	.ptp-questionnaire-actions .ptp-btn { width: 100%; justify-content: center; }
	.ptp-questionnaire-navigation { padding-right: 14px; padding-left: 14px; }
	.ptp-questionnaire-navigation .ptp-btn { flex: 1 1 0; justify-content: center; white-space: normal; }
	.ptp-questionnaire-section { padding: 20px 16px; }
	.ptp-questionnaire-pdf-upload .ptp-btn { width: 100%; justify-content: center; }
}
.ptp-access-badge {
	display: inline-block; margin-left: 8px;
	background: rgba(178,71,77,.3); color: #ffb3b6;
	padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700;
}

/* ==========================================================================
   Portal rich-text editor — ptp-rich-*
   ========================================================================== */
.ptp-rich-wrap {
	border: 1px solid #d9d5e6;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	margin-top: 6px;
}
.ptp-rich-toolbar {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 6px 10px;
	background: #f8f6fc;
	border-bottom: 1px solid #e8e2f0;
	flex-wrap: wrap;
}
.ptp-rt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 30px;
	padding: 0 10px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: transparent;
	color: #4a4560;
	font-size: 13px;
	font-family: inherit;
	cursor: pointer;
	transition: background .12s, border-color .12s;
	white-space: nowrap;
}
.ptp-rt-btn:hover {
	background: #ede9f6;
	border-color: #d0c8e8;
}
.ptp-rt-btn.active {
	background: #e8e2f6;
	border-color: var(--ptp-acc, #996699);
	color: var(--ptp-acc, #996699);
}
.ptp-rt-sep {
	width: 1px;
	height: 20px;
	background: #ddd8ea;
	margin: 0 4px;
	flex-shrink: 0;
}
.ptp-rich-editor {
	min-height: 140px;
	max-height: 400px;
	overflow-y: auto;
	padding: 14px 16px;
	font-size: 15px;
	line-height: 1.7;
	color: #2d2a3e;
	outline: none;
	word-wrap: break-word;
}
.ptp-rich-editor:empty::before {
	content: attr(placeholder);
	color: #b0aabc;
	pointer-events: none;
}
.ptp-rich-editor:focus {
	box-shadow: inset 0 0 0 2px rgba(153,102,153,.18);
}
.ptp-rich-editor a { color: var(--ptp-acc, #996699); text-decoration: underline; }
.ptp-rich-editor ul, .ptp-rich-editor ol { padding-left: 22px; margin: 8px 0; }
.ptp-rich-editor li { margin-bottom: 3px; }
.ptp-rich-editor strong, .ptp-rich-editor b { color: #1e1b2e; }

/* ==========================================================================
   Portal message history — accordion with collapse and delete  v3.3.0
   ========================================================================== */
.ptp-msg-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ptp-msg-item {
	border: 1px solid #e8e2f0;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow .15s;
}
.ptp-msg-item:hover { box-shadow: 0 3px 12px rgba(80,40,82,.08); }
.ptp-msg-item-out { border-left: 3px solid var(--ptp-acc, #996699); }
.ptp-msg-item-in  { border-left: 3px solid #3a8fd8; }

.ptp-msg-item-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	background: #faf8ff;
	flex-wrap: wrap;
}
.ptp-msg-item-meta {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1;
	min-width: 0;
}
.ptp-msg-item-from {
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: #9490a0;
}
.ptp-msg-item-subject {
	font-size: 15px;
	font-weight: 700;
	color: #1e1b2e;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ptp-msg-item-date {
	font-size: 11px;
	color: #a09aaa;
}
.ptp-msg-item-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}
.ptp-msg-expand-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: var(--ptp-acc, #996699);
	color: #fff;
	border: none;
	border-radius: 7px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	transition: filter .13s;
	white-space: nowrap;
}
.ptp-msg-expand-btn:hover { filter: brightness(1.1); }
.ptp-msg-delete-btn {
	font-size: 12px;
	font-weight: 700;
	color: #c03048;
	text-decoration: none;
	padding: 5px 10px;
	border: 1px solid #f4c0c8;
	border-radius: 7px;
	background: #fff;
	transition: background .13s;
	white-space: nowrap;
}
.ptp-msg-delete-btn:hover { background: #fdedf0; }

.ptp-msg-item-body {
	padding: 18px 20px;
	border-top: 1px solid #e8e2f0;
	font-size: 15px;
	color: #2d2a3e;
	line-height: 1.75;
	background: #fff;
}
.ptp-msg-item-body p {
	margin: 0 0 14px !important;
	font-size: 15px !important;
	line-height: 1.75 !important;
	color: #2d2a3e !important;
}
.ptp-msg-item-body p:last-of-type { margin-bottom: 0 !important; }
.ptp-msg-item-body ul,
.ptp-msg-item-body ol { margin: 0 0 14px 20px !important; }
.ptp-msg-item-body li { margin-bottom: 4px; }
.ptp-msg-item-body a { color: var(--ptp-acc, #996699); }
.ptp-msg-item-body strong { font-weight: 700; }

.ptp-msg-collapse-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 14px;
	background: none;
	border: 1px solid #ddd8ea;
	border-radius: 7px;
	padding: 5px 14px;
	font-size: 12px;
	font-weight: 700;
	color: #7b7790;
	cursor: pointer;
	font-family: inherit;
	transition: background .13s;
}
.ptp-msg-collapse-btn:hover { background: #f4ebf3; color: var(--ptp-acc, #996699); }

@media (max-width: 540px) {
	.ptp-msg-item-head { flex-direction: column; align-items: flex-start; }
	.ptp-msg-item-actions { width: 100%; }
	.ptp-msg-expand-btn { flex: 1; justify-content: center; }
}

/* ==========================================================================
   Portal message body — list and paragraph rendering fix  v3.3.1
   ========================================================================== */
.ptp-msg-item-body ul,
.ptp-msg-item-body ol {
	margin: 0 0 14px 0 !important;
	padding: 0 0 0 24px !important;
}
.ptp-msg-item-body ul { list-style: disc !important; }
.ptp-msg-item-body ol { list-style: decimal !important; }
.ptp-msg-item-body li {
	display: list-item !important;
	list-style: inherit !important;
	margin-bottom: 6px !important;
	padding-left: 4px;
	font-size: 15px !important;
	line-height: 1.75 !important;
}
.ptp-msg-item-body p {
	margin: 0 0 14px !important;
	font-size: 15px !important;
	line-height: 1.75 !important;
}
.ptp-msg-item-body p:last-child { margin-bottom: 0 !important; }
.ptp-portal-house {
	margin: 0;
	min-width: 320px;
	background: #f5f2f7;
	color: #2d2431;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ptp-portal-house *,
.ptp-portal-house *::before,
.ptp-portal-house *::after {
	box-sizing: border-box;
}

.ptp-portal-house-main {
	min-height: 100vh;
	padding: 24px;
}

.ptp-skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 99999;
	padding: 10px 14px;
	border-radius: 8px;
	background: #2d1833;
	color: #fff;
	transform: translateY(-160%);
}

.ptp-skip-link:focus {
	transform: translateY(0);
}

@media (max-width: 700px) {
	.ptp-portal-house-main {
		padding: 0;
	}
}

/* 3.12.15: questionnaire autosave status */
.ptp-pdf-questionnaire .ptp-pdf-submit-status { font-size: 13px; line-height: 1.45; color: #625d70; }
.ptp-pdf-questionnaire .ptp-pdf-submit-status.ptp-status-ok { color: #1e7b45; }
.ptp-pdf-questionnaire .ptp-pdf-submit-status.ptp-status-warn { color: #9a6200; font-weight: 600; }
.ptp-pdf-questionnaire .ptp-pdf-submit-status.ptp-status-error { color: #b32d2e; font-weight: 600; }
.ptp-pdf-questionnaire .ptp-pdf-form-notice.ptp-notice { margin: 0 20px 12px; padding: 12px 14px; }
.ptp-pdf-questionnaire .ptp-form-actions button[disabled] { opacity: .55; cursor: not-allowed; }

/* PT CRM 3.13.0: sign-in activity notice */
.ptp .ptp-activity-notice{margin-top:14px;font-size:12px;line-height:1.45;color:#776b7c}

/* 3.23.2 sign-in page: logo, show password, forgot password, business footer. */
.ptp-login { border-top: 4px solid var(--ptp-acc); }
.ptp-login-logo { display: block; max-width: 200px; max-height: 70px; width: auto; height: auto; margin: 0 auto 18px; }
.ptp-login-brand { font-size: 18px; font-weight: 800; color: #2d2a3e; margin-bottom: 14px; }
.ptp-login-form label { font-size: 14.5px; font-weight: 600; color: #2d2a3e; }
.ptp-login-form input[type="text"],
.ptp-login-form input[type="password"] { font-size: 16px !important; min-height: 46px; }
.ptp-pass-wrap { position: relative; display: block; margin-top: 6px; }
.ptp-pass-wrap input { width: 100%; padding-right: 72px !important; margin-top: 0 !important; }
.ptp-pass-toggle {
	position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
	background: #f3eef6; color: var(--ptp-acc); border: 0; border-radius: 8px;
	font-size: 13.5px; font-weight: 700; padding: 8px 12px; cursor: pointer; min-height: 34px;
}
.ptp-pass-toggle:hover { filter: brightness(0.95); }
.ptp-login .ptp-error { text-align: left; margin: 0 0 18px; line-height: 1.5; }
.ptp-login-sent { text-align: left; margin: 0 0 18px; }
.ptp-login p.ptp-login-secure { margin: 16px 0 0 !important; font-size: 13.5px !important; color: #6b6680 !important; }
.ptp-forgot { max-width: 340px; margin: 18px auto 0; text-align: left; }
.ptp-forgot summary { cursor: pointer; text-align: center; color: var(--ptp-acc); font-weight: 700; font-size: 14.5px; list-style: none; padding: 6px 0; }
.ptp-forgot summary::-webkit-details-marker { display: none; }
.ptp-forgot[open] summary { margin-bottom: 8px; }
.ptp-forgot .ptp-hint { margin: 0 0 12px !important; font-size: 14px !important; }
.ptp-forgot .ptp-btn-ghost { width: 100%; min-height: 44px; }
.ptp-portal-footer { margin: 24px auto 10px; padding: 14px 16px 0; border-top: 1px solid #ece9f5; text-align: center; font-size: 13px; color: #8a8499; line-height: 1.7; }
.ptp-portal-footer a { color: #6b6680; text-decoration: none; }
.ptp-portal-footer a:hover { color: var(--ptp-acc); }
@media (max-width: 520px) { .ptp-login { margin: 16px auto; padding: 32px 18px 28px; } }

/* 4.1.1: no coloured edge stripes on rounded cards. */
.ptp .ptp-msg-item-out, .ptp .ptp-msg-item-in { border-left: 1px solid #e7e1ee; }
.ptp .ptp-msg-item-in { background: #f5f9fe; }
.ptp .ptp-questionnaire-heading { border-top: 0; }
.ptp .ptp-login { border-top: 1px solid #e7e1ee; }

/* 4.5.0: seven tabs, Home "What you need to do", page headings. */
.ptp .ptp-page-head { margin: 0 0 18px; }
.ptp .ptp-page-title { margin: 0 0 4px; font-size: 26px; line-height: 1.2; }
.ptp .ptp-page-head p { margin: 0 0 10px; color: #6b6680; }
.ptp .ptp-page-jumps { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ptp .ptp-page-jumps a { color: var(--ptp-acc); text-decoration: underline; font-weight: 500; }
.ptp .ptp-sec-head { margin: 28px 0 10px; font-size: 19px; scroll-margin-top: 16px; }
.ptp .ptp-home-head { margin-bottom: 16px; }
.ptp .ptp-todo-list { list-style: none; margin: 0; padding: 0; }
.ptp .ptp-todo-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid #e7e1ee; }
.ptp .ptp-todo-item:first-child { border-top: 0; }
.ptp .ptp-todo-kind { flex: 0 0 84px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6b6680; }
.ptp .ptp-todo-bad .ptp-todo-kind { color: #b42318; }
.ptp .ptp-todo-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ptp .ptp-todo-text strong { font-size: 16px; }
.ptp .ptp-todo-text small { color: #6b6680; font-size: 14px; }
.ptp .ptp-todo-clear { margin: 0; font-size: 16px; }
@media (max-width: 600px) {
	.ptp .ptp-todo-item { flex-wrap: wrap; }
	.ptp .ptp-todo-kind { flex-basis: 100%; }
	.ptp .ptp-todo-item .ptp-btn { margin-left: auto; }
}

/* 4.6.0: List/Grid on portal lists. */
.ptp .ptp-viewswitch { display: inline-flex; margin: 0 0 10px; border: 1px solid #d9d0e3; border-radius: 8px; overflow: hidden; }
.ptp .ptp-viewswitch button { background: #fff; border: 0; padding: 7px 16px; font-size: 14px; cursor: pointer; color: #4a3c5c; }
.ptp .ptp-viewswitch button.is-active { background: var(--ptp-acc); color: #fff; }
.ptp .ptp-table-cards, .ptp .ptp-table-cards tbody { display: block; width: 100%; }
.ptp .ptp-table-cards thead { display: none; }
.ptp .ptp-table-cards tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ptp .ptp-table-cards tr { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid #e7e1ee; border-radius: 10px; background: #fff; }
.ptp .ptp-table-cards td { display: block; padding: 0 !important; border: 0 !important; text-align: left !important; }
.ptp .ptp-table-cards td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #6b6680; }
.ptp .ptp-table-cards td.r { margin-top: auto; }

/* 4.7.0: Grid for Domains & hosting rows. */
.ptp-hosting-table.ptp-hosting-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

/* ==========================================================================
   4.8.0 Portal redesign. One calm design system that matches the CRM:
   ink menu, white cards with hairline borders, deep purple buttons,
   a centred column with a sensible maximum width, and a compact phone layout.
   ========================================================================== */
.ptp {
	--ptp-line: #e6e1ea;
	--ptp-line-2: #f0ecf3;
	--ptp-text: #2b2330;
	--ptp-muted: #625a6b;
	--ptp-field: #d8d0de;
	--ptp-bg: #f6f3f7;
	color: var(--ptp-text);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}
.ptp-portal-house { background: #f6f3f7; }
.ptp-portal-house-main { padding: 28px 28px 8px; }

/* Shell: centred, menu + content */
.ptp .ptp-shell {
	display: grid;
	grid-template-columns: 252px minmax(0, 1fr);
	gap: 36px;
	align-items: start;
	max-width: 1240px;
	margin: 0 auto;
}
.ptp .ptp-main { min-width: 0; max-width: 952px; width: 100%; }
.ptp .ptp-portal-footer { max-width: 1240px; margin: 40px auto 8px; border-top-color: var(--ptp-line); color: var(--ptp-muted); }
.ptp .ptp-portal-footer a { color: var(--ptp-deep); }

/* Menu (same look as the CRM sidebar) */
.ptp .ptp-side {
	position: sticky; top: 28px;
	display: flex; flex-direction: column;
	min-height: calc(100vh - 56px);
	padding: 22px 14px 16px;
	background: var(--ptp-ink, #342334);
	border: 0; border-radius: 14px; box-shadow: none;
	color: #fff;
}
.ptp .ptp-brand { display: flex; flex-direction: column; gap: 2px; padding: 0 10px 18px; }
.ptp .ptp-brand-name { font-size: 16px; font-weight: 600; letter-spacing: -.005em; color: #fff; line-height: 1.3; }
.ptp .ptp-brand-sub { font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.ptp .ptp-me {
	display: flex; align-items: center; gap: 12px; text-align: left;
	margin: 0 0 18px; padding: 12px 10px;
	border: 0; border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12);
}
.ptp .ptp-me-av {
	flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
	display: grid; place-items: center;
	background: rgba(255,255,255,.14); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .02em;
}
.ptp .ptp-me-av img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.ptp .ptp-me-txt { display: flex; flex-direction: column; min-width: 0; }
.ptp .ptp-me .ptp-photo-name { padding: 0; margin: 0; font-size: 14.5px; font-weight: 600; color: #fff; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptp .ptp-me .ptp-photo-co { padding: 0; font-size: 13px; color: rgba(255,255,255,.66); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptp .ptp-side-nav { display: flex; flex-direction: column; gap: 2px; }
.ptp .ptp-side-link {
	display: flex; align-items: center; gap: 12px;
	min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid transparent;
	font-size: 15px; font-weight: 400; color: rgba(255,255,255,.88); text-decoration: none;
	transition: background .15s, color .15s;
}
.ptp .ptp-side-link .ptp-ico { flex: 0 0 20px; color: rgba(255,255,255,.72); }
.ptp .ptp-side-link:hover { background: rgba(255,255,255,.14); color: #fff; }
.ptp .ptp-side-link:hover .ptp-ico { color: #fff; }
.ptp .ptp-side-link.ptp-active, .ptp .ptp-side-link.ptp-active:hover { background: #fff; color: var(--ptp-ink); font-weight: 600; }
.ptp .ptp-side-link.ptp-active .ptp-ico { color: var(--ptp-deep); }
.ptp .ptp-side-foot { margin-top: auto; padding-top: 18px; border-top: 0; display: flex; flex-direction: column; gap: 8px; }
.ptp .ptp-side-foot .ptp-btn { width: 100%; background: transparent; color: rgba(255,255,255,.9); border-color: rgba(255,255,255,.22); font-weight: 500; }
.ptp .ptp-side-foot .ptp-btn:hover { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
.ptp .ptp-side a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Type */
.ptp h1, .ptp h2, .ptp h3, .ptp h4 { color: var(--ptp-ink); letter-spacing: -.01em; }
.ptp .ptp-page-head { margin: 4px 0 24px; }
.ptp .ptp-page-title { margin: 0 0 6px; font-size: 28px; font-weight: 600; line-height: 1.2; color: var(--ptp-ink); }
.ptp .ptp-page-head p { margin: 0 0 14px; color: var(--ptp-muted); font-size: 15.5px; }
.ptp .ptp-page-jumps { display: flex; flex-wrap: wrap; gap: 8px; }
.ptp .ptp-page-jumps a {
	display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px;
	border: 1px solid var(--ptp-line); border-radius: 8px; background: #fff;
	color: var(--ptp-ink); text-decoration: none; font-size: 14px; font-weight: 500;
}
.ptp .ptp-page-jumps a:hover { border-color: var(--ptp-deep); background: var(--ptp-tint); }
.ptp .ptp-sec-head { margin: 34px 0 12px; font-size: 18px; font-weight: 600; color: var(--ptp-ink); scroll-margin-top: 24px; }
.ptp .ptp-page-head + .ptp-sec-head { margin-top: 8px; }
.ptp .ptp-card-title { margin: 0 0 14px; font-size: 17px; font-weight: 600; color: var(--ptp-ink); }
.ptp .ptp-main a:not([class]) { color: var(--ptp-deep); }
.ptp .ptp-hint, .ptp .ptp-file-size { color: var(--ptp-muted); }
.ptp .ptp-file-size { display: block; font-size: 13px; }

/* Home greeting: calm, no dark banner */
.ptp .ptp-welcome {
	display: block; background: none; box-shadow: none; border-radius: 0;
	padding: 0; margin: 4px 0 22px; color: var(--ptp-text); overflow: visible;
}
.ptp .ptp-welcome::before, .ptp .ptp-welcome::after { display: none; }
.ptp .ptp-welcome h2 { margin: 0 0 6px; font-size: 28px; font-weight: 600; line-height: 1.2; color: var(--ptp-ink) !important; }
.ptp .ptp-welcome p { margin: 0; font-size: 15.5px; color: var(--ptp-muted); }

/* Cards */
.ptp .ptp-card, .ptp .ptp-db-card, .ptp .ptp-promo {
	background: #fff; border: 1px solid var(--ptp-line); border-radius: 12px;
	box-shadow: 0 1px 2px rgba(52,35,52,.04);
}
.ptp .ptp-card { padding: 22px 24px; margin-bottom: 16px; }
.ptp .ptp-db-card { padding: 22px 24px; margin-bottom: 16px; }
.ptp .ptp-db-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ptp .ptp-db-card-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.ptp .ptp-db-card-head p { margin: 2px 0 0; color: var(--ptp-muted); font-size: 14px; }
.ptp .ptp-db-link-btn { color: var(--ptp-deep); font-weight: 600; font-size: 14.5px; }
.ptp .ptp-db-link-btn svg { width: 16px; height: 16px; }
.ptp .ptp-db-proj-top { display: flex; justify-content: space-between; gap: 12px; }
.ptp .ptp-db-proj-top small { display: block; color: var(--ptp-muted); }
.ptp .ptp-db-proj-status { border-radius: 6px; background: var(--ptp-tint); color: var(--ptp-ink); font-weight: 600; font-size: 12.5px; padding: 4px 9px; }
.ptp .ptp-db-proj-bar { height: 8px; border-radius: 6px; background: var(--ptp-line-2); overflow: hidden; margin: 14px 0 10px; }
.ptp .ptp-db-proj-bar span { background: var(--ptp-deep); border-radius: 6px; }
.ptp .ptp-db-proj-foot { display: flex; justify-content: space-between; gap: 12px; color: var(--ptp-muted); font-size: 14px; }
.ptp .ptp-promo { margin-top: 8px; overflow: hidden; }
.ptp .ptp-promo-body h3 { font-weight: 600; }
.ptp .ptp-promo-body p { color: var(--ptp-muted); }

/* Empty states: one quiet line, not a giant box */
.ptp .ptp-empty { text-align: left; padding: 2px 0; color: var(--ptp-muted); font-size: 15px; }
.ptp .ptp-empty p { margin: 0; }
.ptp .ptp-card:has(> .ptp-empty:only-child) { padding: 16px 20px; }

/* "What you need to do" */
.ptp .ptp-todo { padding: 8px 24px 8px; }
.ptp .ptp-todo > .ptp-card-title { margin: 14px 0 4px; }
.ptp .ptp-todo-item { gap: 16px; padding: 16px 0; border-top: 1px solid var(--ptp-line-2); }
.ptp .ptp-todo-kind {
	flex: 0 0 96px; display: inline-flex; justify-content: center; align-items: center;
	min-height: 26px; padding: 0 8px; border-radius: 6px;
	background: var(--ptp-tint); color: var(--ptp-ink);
	font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.ptp .ptp-todo-bad .ptp-todo-kind { background: #fdecec; color: #a5262c; }
.ptp .ptp-todo-text strong { font-size: 15.5px; font-weight: 600; color: var(--ptp-text); }
.ptp .ptp-todo-text small { font-size: 14px; color: var(--ptp-muted); }
.ptp .ptp-todo-item .ptp-btn { flex: 0 0 auto; min-width: 96px; background: #fff; border-color: var(--ptp-field); color: var(--ptp-ink); }
.ptp .ptp-todo-item .ptp-btn:hover { background: var(--ptp-deep); border-color: var(--ptp-deep); color: #fff; }
.ptp .ptp-todo-item:first-child .ptp-btn { background: var(--ptp-deep); border-color: var(--ptp-deep); color: #fff; }
.ptp .ptp-todo-item:first-child .ptp-btn:hover { background: var(--ptp-ink); border-color: var(--ptp-ink); }
.ptp .ptp-todo-clear { padding: 6px 0 16px; color: var(--ptp-muted); }

/* Buttons: one style, one size */
.ptp .ptp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 40px; padding: 0 16px; border-radius: 8px;
	border: 1px solid var(--ptp-field); background: #fff; color: var(--ptp-ink);
	font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.2; text-decoration: none;
	cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.ptp .ptp-btn:hover { background: var(--ptp-tint2); border-color: var(--ptp-tint2); color: var(--ptp-ink); }
.ptp .ptp-btn-primary, .ptp button.ptp-btn-primary { background: var(--ptp-deep); border-color: var(--ptp-deep); color: #fff; }
.ptp .ptp-btn-primary:hover, .ptp button.ptp-btn-primary:hover { background: var(--ptp-ink); border-color: var(--ptp-ink); color: #fff; }
.ptp .ptp-btn-ghost { background: #fff; border-color: var(--ptp-field); color: var(--ptp-ink); }
.ptp .ptp-btn-sm { min-height: 36px; padding: 0 13px; font-size: 14px; }
.ptp .ptp-btn[disabled], .ptp button[disabled] { opacity: .55; cursor: not-allowed; }
.ptp .ptp-form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Focus you can see (keyboard) */
.ptp a:focus-visible, .ptp button:focus-visible, .ptp summary:focus-visible,
.ptp input:focus-visible, .ptp select:focus-visible, .ptp textarea:focus-visible {
	outline: 2px solid var(--ptp-deep); outline-offset: 2px;
}

/* Status chips (no pill shapes, readable contrast) */
.ptp .ptp-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.ptp .ptp-success { background: #e7f4ec; color: #1d6b42; }
.ptp .ptp-warning { background: #fdf1de; color: #845000; }
.ptp .ptp-danger  { background: #fdecec; color: #a5262c; }
.ptp .ptp-muted   { background: #f0edf3; color: #574f61; }
.ptp .ptp-notice.ptp-success, .ptp .ptp-notice { background: #edf7f1; color: #1d6b42; border: 1px solid #cfe8d9; border-radius: 10px; font-weight: 500; }
.ptp .ptp-error { background: #fdf0f0; color: #a5262c; border: 1px solid #f3d0d0; border-radius: 10px; font-weight: 500; max-width: none; }

/* Tables */
.ptp .ptp-table thead th {
	padding: 10px 12px; font-size: 12px; font-weight: 600; letter-spacing: .05em;
	color: var(--ptp-muted); border-bottom: 1px solid var(--ptp-line);
}
.ptp .ptp-table tbody td { padding: 14px 12px; font-size: 15px; border-bottom: 1px solid var(--ptp-line-2); }
.ptp .ptp-table tbody tr:hover td { background: #faf8fb; }
.ptp .ptp-table td.r { white-space: nowrap; }
.ptp .ptp-table td.r .ptp-btn + .ptp-btn { margin-left: 6px; }
.ptp .ptp-card > .ptp-table:first-child, .ptp .ptp-card > .ptp-file-table-wrap:first-child { margin-top: -6px; }

/* List / Grid switch */
.ptp .ptp-viewswitch { border-color: var(--ptp-field); border-radius: 8px; margin: 0 0 12px; }
.ptp .ptp-viewswitch button { min-height: 34px; padding: 0 14px; font: inherit; font-size: 14px; color: var(--ptp-ink); }
.ptp .ptp-viewswitch button + button { border-left: 1px solid var(--ptp-field); }
.ptp .ptp-viewswitch button.is-active { background: var(--ptp-deep); color: #fff; }
.ptp .ptp-table-cards tbody { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ptp .ptp-table-cards tr { border-color: var(--ptp-line); border-radius: 10px; padding: 16px; }
.ptp .ptp-table-cards tr:hover td { background: transparent; }
.ptp .ptp-table-cards td[data-label]::before { color: var(--ptp-muted); font-size: 11.5px; letter-spacing: .05em; margin-bottom: 2px; }

/* Forms */
.ptp .ptp-form label { font-size: 14px; font-weight: 600; color: var(--ptp-text); }
.ptp .ptp-form input:not([type=checkbox]):not([type=radio]):not([type=file]),
.ptp .ptp-form select, .ptp .ptp-form textarea {
	min-height: 44px; border: 1px solid var(--ptp-field) !important; border-radius: 8px !important;
	font-size: 15px; color: var(--ptp-text);
}
.ptp .ptp-form textarea { padding: 11px 13px; width: 100%; }
.ptp .ptp-form input:focus, .ptp .ptp-form select:focus, .ptp .ptp-form textarea:focus {
	border-color: var(--ptp-deep) !important; box-shadow: 0 0 0 3px var(--ptp-tint2) !important; outline: none;
}
.ptp .ptp-rich-wrap { border-color: var(--ptp-field); border-radius: 8px; }
.ptp .ptp-rich-toolbar { background: #faf8fb; border-bottom-color: var(--ptp-line); }

/* Messages, documents, records */
.ptp .ptp-msg-item { border-color: var(--ptp-line); border-radius: 10px; }
.ptp .ptp-msg-item:hover { box-shadow: 0 2px 8px rgba(52,35,52,.06); }
.ptp .ptp-msg-item-in { background: #fbf9fc; }
.ptp .ptp-document-card summary, .ptp .ptp-forgot summary { color: var(--ptp-deep); }
.ptp .ptp-hosting-row, .ptp .ptp-cert-card { border-color: var(--ptp-line); }

/* Admin preview strip */
.ptp .ptp-preview {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
	background: #1c1220; color: rgba(255,255,255,.9); border-radius: 10px;
	padding: 10px 14px; font-size: 13.5px; font-weight: 400; margin-bottom: 22px;
}
.ptp .ptp-preview strong { color: #fff; }
.ptp .ptp-preview-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ptp .ptp-preview-btn { border-radius: 7px; }

/* Sign-in, forgot password, set password */
.ptp-portal-house .ptp > .ptp-card { max-width: 440px; margin: 7vh auto 0; padding: 40px 32px 32px; }
.ptp .ptp-login h3 { color: var(--ptp-ink) !important; font-weight: 600 !important; }
.ptp .ptp-login-brand { font-weight: 600; color: var(--ptp-ink); letter-spacing: -.005em; }
.ptp .ptp-login-form .ptp-btn-primary { width: 100%; min-height: 48px; background: var(--ptp-deep) !important; border-color: var(--ptp-deep) !important; box-shadow: none; border-radius: 8px !important; font-weight: 600 !important; }
.ptp .ptp-login-form .ptp-btn-primary:hover { background: var(--ptp-ink) !important; filter: none; }
.ptp .ptp-pass-toggle { background: var(--ptp-tint); color: var(--ptp-ink); font-weight: 600; }
.ptp .ptp-forgot summary { font-weight: 600; }

/* Laptop / small desktop */
@media (max-width: 1180px) {
	.ptp .ptp-shell { grid-template-columns: 224px minmax(0, 1fr); gap: 28px; }
}

/* Tablet and phone: the menu becomes a compact bar with the 7 tabs underneath */
@media (max-width: 900px) {
	.ptp-portal-house-main { padding: 0 0 8px; }
	.ptp .ptp-shell { display: block; }
	.ptp .ptp-side {
		position: static; min-height: 0; border-radius: 0; padding: 12px 16px 0;
		display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "brand me foot" "nav nav nav";
		align-items: center; column-gap: 10px;
	}
	.ptp .ptp-brand { grid-area: brand; padding: 0; min-width: 0; }
	.ptp .ptp-brand-name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.ptp .ptp-brand-sub { font-size: 10.5px; }
	.ptp .ptp-me { grid-area: me; margin: 0; padding: 0; border: 0; }
	.ptp .ptp-me-txt { display: none; }
	.ptp .ptp-me-av { width: 36px; height: 36px; flex-basis: 36px; font-size: 13px; }
	.ptp .ptp-side-foot { grid-area: foot; margin: 0; padding: 0; flex-direction: row; gap: 6px; }
	.ptp .ptp-side-foot .ptp-btn { width: auto; min-height: 36px; padding: 0 12px; font-size: 13.5px; }
	.ptp .ptp-side-nav {
		grid-area: nav; flex-direction: row; flex-wrap: nowrap; gap: 4px; margin: 12px -16px 0; padding: 0 12px 10px;
		overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-snap-type: x proximity;
	}
	.ptp .ptp-side-nav::-webkit-scrollbar { display: none; }
	.ptp .ptp-side-link { flex: 0 0 auto; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; font-size: 14.5px; scroll-snap-align: start; }
	.ptp .ptp-side-link .ptp-ico { width: 18px; height: 18px; flex-basis: 18px; }
	.ptp .ptp-main { max-width: none; padding: 22px 16px 0; }
	.ptp .ptp-portal-footer { margin: 28px 16px 8px; }
	.ptp-portal-house .ptp > .ptp-card { margin: 24px 16px 0; }
	/* 4.8.1: lists stack into labelled rows on tablets and phones, so columns never squeeze. */
	.ptp .ptp-table:not(.ptp-table-cards), .ptp .ptp-table:not(.ptp-table-cards) tbody { display: block; width: 100%; }
	.ptp .ptp-table:not(.ptp-table-cards) thead { display: none; }
	.ptp .ptp-table:not(.ptp-table-cards) tbody tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--ptp-line); }
	.ptp .ptp-table:not(.ptp-table-cards) tbody tr:last-child { border-bottom: 0; }
	.ptp .ptp-table:not(.ptp-table-cards) tbody td { display: flex; justify-content: space-between; align-items: center; gap: 16px; text-align: right; padding: 6px 0; border-bottom: 0; font-size: 15px; }
	.ptp .ptp-table:not(.ptp-table-cards) tbody td::before { content: attr(data-label); flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: var(--ptp-muted); text-align: left; }
	.ptp .ptp-table:not(.ptp-table-cards) tbody td:empty { display: none; }
	.ptp .ptp-table:not(.ptp-table-cards) tbody td.r:last-child { justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 10px; white-space: normal; }
	.ptp .ptp-table:not(.ptp-table-cards) tbody td.r:last-child::before { display: none; }
	.ptp .ptp-table tbody tr:hover td { background: transparent; }
	.ptp .ptp-file-table-wrap .ptp-table { min-width: 0; }
}

/* Phone */
@media (max-width: 600px) {
	.ptp { font-size: 15.5px; }
	.ptp .ptp-page-title, .ptp .ptp-welcome h2 { font-size: 24px; }
	.ptp .ptp-card, .ptp .ptp-db-card { padding: 18px 16px; border-radius: 12px; }
	.ptp .ptp-todo { padding: 4px 16px; }
	.ptp .ptp-todo-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kind btn" "text text"; align-items: center; gap: 8px 12px; }
	.ptp .ptp-todo-kind { grid-area: kind; justify-self: start; flex: none; min-width: 84px; }
	.ptp .ptp-todo-text { grid-area: text; }
	.ptp .ptp-todo-item .ptp-btn { grid-area: btn; margin-left: 0; min-width: 88px; }
	.ptp .ptp-btn { min-height: 44px; }
	.ptp .ptp-btn-sm { min-height: 40px; }
	.ptp .ptp-form input:not([type=checkbox]):not([type=radio]):not([type=file]),
	.ptp .ptp-form select, .ptp .ptp-form textarea { font-size: 16px; }
	.ptp .ptp-preview { font-size: 13px; }
	.ptp .ptp-db-proj-top, .ptp .ptp-db-proj-foot { flex-direction: column; gap: 6px; }
	.ptp-portal-house .ptp > .ptp-card { padding: 32px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) { .ptp * { transition: none !important; } }
@media print { .ptp .ptp-shell { display: block; } .ptp .ptp-side { display: none !important; } }

/* ==========================================================================
   4.9.0 Header with logo, Home overview, email-style Messages, Support form first.
   ========================================================================== */
.ptp-portal-house-main { padding: 0 28px 8px; }

/* Header */
.ptp .ptp-topbar { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--ptp-line); margin: 0 0 28px; }
.ptp-portal-house .ptp .ptp-topbar { margin: 0 -28px 28px; }
.ptp .ptp-topbar-in { max-width: 1240px; margin: 0 auto; min-height: 78px; padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.ptp-portal-house .ptp .ptp-topbar-in { padding-left: 28px; padding-right: 28px; max-width: 1296px; }
.ptp .ptp-topbar-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ptp .ptp-topbar-home { display: inline-flex; align-items: center; }
.ptp .ptp-topbar-logo { display: block; max-height: 48px; max-width: 230px; width: auto; height: auto; }
.ptp .ptp-topbar-name { font-size: 19px; font-weight: 600; color: var(--ptp-ink); letter-spacing: -.01em; }
.ptp .ptp-topbar-label { padding-left: 16px; border-left: 1px solid var(--ptp-line); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ptp-muted); white-space: nowrap; }
.ptp .ptp-topbar-user { display: flex; align-items: center; gap: 12px; }
.ptp .ptp-topbar-av { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--ptp-ink); color: #fff; font-size: 15px; font-weight: 600; }
.ptp .ptp-topbar-av img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.ptp .ptp-topbar-who { display: flex; flex-direction: column; line-height: 1.3; margin-right: 6px; }
.ptp .ptp-topbar-who strong { font-size: 15px; font-weight: 600; color: var(--ptp-ink); }
.ptp .ptp-topbar-who small { font-size: 13px; color: var(--ptp-muted); }

/* Menu: tabs + help box (no photo, brand or sign out any more) */
.ptp .ptp-side { top: 102px; min-height: 0; padding: 14px 12px; }
.ptp .ptp-side-help { margin-top: 18px; padding: 16px 14px; border-radius: 10px; background: rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 6px; }
.ptp .ptp-side-help strong { color: #fff; font-size: 15px; font-weight: 600; }
.ptp .ptp-side-help span { color: rgba(255,255,255,.78); font-size: 13.5px; line-height: 1.45; }
.ptp .ptp-side-help .ptp-btn { margin-top: 6px; background: #fff; border-color: #fff; color: var(--ptp-ink); }
.ptp .ptp-side-help .ptp-btn:hover { background: var(--ptp-tint2); border-color: var(--ptp-tint2); }

/* Home: welcome card with photo */
.ptp .ptp-welcome.ptp-hero {
	display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 28px; align-items: center;
	padding: 24px; margin: 0 0 18px; border: 1px solid var(--ptp-line); border-radius: 14px;
	background: linear-gradient(120deg, #fff 0%, #fff 55%, var(--ptp-tint) 100%);
	box-shadow: 0 1px 2px rgba(52,35,52,.04);
}
.ptp .ptp-hero-photo { width: 128px; height: 160px; border-radius: 10px; overflow: hidden; background: var(--ptp-ink); display: grid; place-items: center; }
.ptp .ptp-hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.ptp .ptp-hero-photo span { color: #fff; font-size: 40px; font-weight: 600; letter-spacing: .02em; }
.ptp .ptp-hero-date { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ptp-muted); }
.ptp .ptp-hero h2 { font-size: 30px; }
.ptp .ptp-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Home: one tile per part of the portal */
.ptp .ptp-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.ptp .ptp-tile {
	display: flex; flex-direction: column; gap: 4px; padding: 16px; min-height: 118px;
	background: #fff; border: 1px solid var(--ptp-line); border-radius: 12px; text-decoration: none; color: var(--ptp-text);
	transition: border-color .15s, box-shadow .15s;
}
.ptp .ptp-tile:hover { border-color: var(--ptp-deep); box-shadow: 0 4px 14px rgba(52,35,52,.08); }
.ptp .ptp-tile-top { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ptp-ink); }
.ptp .ptp-tile-top .ptp-ico { color: var(--ptp-deep); }
.ptp .ptp-tile-num { margin-top: auto; font-size: 26px; font-weight: 600; line-height: 1.15; color: var(--ptp-ink); overflow-wrap: anywhere; }
.ptp .ptp-tile small { font-size: 13.5px; color: var(--ptp-muted); }

/* Home: recent activity */
.ptp .ptp-activity-list { list-style: none; margin: 0; padding: 0; }
.ptp .ptp-activity-list li + li { border-top: 1px solid var(--ptp-line-2); }
.ptp .ptp-activity-list a { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 0; text-decoration: none; color: var(--ptp-text); }
.ptp .ptp-activity-list a:hover .ptp-activity-text { color: var(--ptp-deep); text-decoration: underline; }
.ptp .ptp-activity-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ptp-tint); color: var(--ptp-deep); }
.ptp .ptp-activity-ic .ptp-ico { width: 17px; height: 17px; }
.ptp .ptp-activity-text { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptp .ptp-activity-list time { font-size: 13.5px; color: var(--ptp-muted); white-space: nowrap; }

/* Messages: inbox like an email program */
.ptp .ptp-inbox { display: grid; grid-template-columns: 330px minmax(0, 1fr); min-height: 560px; background: #fff; border: 1px solid var(--ptp-line); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(52,35,52,.04); }
.ptp .ptp-inbox-list { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--ptp-line); max-height: 760px; }
.ptp .ptp-inbox-bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--ptp-line); }
.ptp .ptp-inbox-bar strong { font-size: 16px; font-weight: 600; color: var(--ptp-ink); }
.ptp .ptp-inbox-count { min-width: 24px; padding: 1px 7px; border-radius: 6px; background: var(--ptp-tint); color: var(--ptp-ink); font-size: 12.5px; font-weight: 600; text-align: center; }
.ptp .ptp-inbox-new { margin-left: auto; }
.ptp .ptp-inbox-none { padding: 16px; }
.ptp .ptp-inbox-items { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1 1 auto; }
.ptp .ptp-inbox-item {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; width: 100%; padding: 13px 16px;
	background: #fff; border: 0; border-bottom: 1px solid var(--ptp-line-2); border-radius: 0;
	font: inherit; color: var(--ptp-text); text-align: left; cursor: pointer;
}
.ptp .ptp-inbox-item:hover { background: #faf8fb; }
.ptp .ptp-inbox-item.is-active { background: var(--ptp-tint2); }
.ptp .ptp-inbox-item:focus-visible { outline: 2px solid var(--ptp-deep); outline-offset: -2px; }
.ptp .ptp-inbox-from { display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 500; color: var(--ptp-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptp .ptp-inbox-date { font-size: 12.5px; color: var(--ptp-muted); white-space: nowrap; }
.ptp .ptp-inbox-subject, .ptp .ptp-inbox-snippet { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptp .ptp-inbox-subject { font-size: 14.5px; color: var(--ptp-text); }
.ptp .ptp-inbox-snippet { font-size: 13.5px; color: var(--ptp-muted); }
.ptp .ptp-inbox-item.is-new .ptp-inbox-from, .ptp .ptp-inbox-item.is-new .ptp-inbox-subject { font-weight: 700; color: var(--ptp-ink); }
.ptp .ptp-inbox-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--ptp-deep); }
.ptp .ptp-inbox-pane { min-width: 0; padding: 24px 28px; overflow-y: auto; max-height: 760px; }
.ptp .ptp-inbox-view[hidden] { display: none !important; }
.ptp .ptp-inbox-back { display: none; }
.ptp .ptp-inbox-title { margin: 0 0 14px; font-size: 21px; font-weight: 600; line-height: 1.3; color: var(--ptp-ink); }
.ptp .ptp-inbox-meta { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--ptp-line); }
.ptp .ptp-inbox-meta > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.ptp .ptp-inbox-meta strong { font-size: 15px; font-weight: 600; color: var(--ptp-ink); }
.ptp .ptp-inbox-meta small { font-size: 13px; color: var(--ptp-muted); }
.ptp .ptp-inbox-av { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ptp-tint); color: var(--ptp-ink); font-weight: 600; }
.ptp .ptp-inbox-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.ptp .ptp-inbox-body { padding: 0; border: 0; background: none; font-size: 15.5px; line-height: 1.7; color: var(--ptp-text); }

/* Support: new-ticket form first */
.ptp .ptp-support-grid { display: block; }

@media (max-width: 1180px) {
	.ptp .ptp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ptp .ptp-inbox { grid-template-columns: 290px minmax(0, 1fr); }
}
@media (max-width: 900px) {
	.ptp-portal-house .ptp .ptp-topbar, .ptp .ptp-topbar { margin: 0; }
	.ptp .ptp-topbar-in, .ptp-portal-house .ptp .ptp-topbar-in { min-height: 62px; padding: 8px 16px; gap: 10px; }
	.ptp .ptp-topbar-logo { max-height: 36px; max-width: 150px; }
	.ptp .ptp-topbar-label, .ptp .ptp-topbar-who { display: none; }
	.ptp .ptp-topbar-av { width: 36px; height: 36px; flex-basis: 36px; font-size: 13px; }
	.ptp .ptp-topbar-user { gap: 8px; }
	.ptp .ptp-side { display: block; padding: 0; border-radius: 0; top: auto; }
	.ptp .ptp-side-nav { margin: 0; padding: 10px 12px; }
	.ptp .ptp-side-help { display: none; }
	.ptp .ptp-inbox { display: block; min-height: 0; }
	.ptp .ptp-inbox-list { border-right: 0; max-height: none; }
	.ptp .ptp-inbox-pane { display: none; max-height: none; padding: 18px 16px; }
	.ptp .ptp-inbox.is-reading .ptp-inbox-list { display: none; }
	.ptp .ptp-inbox.is-reading .ptp-inbox-pane { display: block; }
	.ptp .ptp-inbox-back { display: inline-flex; align-items: center; min-height: 40px; margin: 0 0 8px; padding: 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--ptp-deep); cursor: pointer; }
}
@media (max-width: 600px) {
	.ptp .ptp-welcome.ptp-hero { grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 18px 16px; align-items: start; }
	.ptp .ptp-hero-photo { width: 88px; height: 110px; }
	.ptp .ptp-hero-photo span { font-size: 28px; }
	.ptp .ptp-hero h2 { font-size: 23px; }
	.ptp .ptp-hero-actions { grid-column: 1 / -1; margin-top: 4px; }
	.ptp .ptp-hero-actions .ptp-btn { flex: 1 1 140px; }
	.ptp .ptp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ptp .ptp-tile { min-height: 104px; padding: 14px; }
	.ptp .ptp-tile:last-child { grid-column: 1 / -1; }
	.ptp .ptp-tile-num { font-size: 22px; }
	.ptp .ptp-inbox-meta { flex-wrap: wrap; }
	.ptp .ptp-inbox-actions { margin-left: 52px; }
	.ptp .ptp-topbar-btn { padding: 0 10px; }
}

/* ==========================================================================
   4.10.0 Matches the CRM client page: profile card with big photo, action tiles,
   tab bar, Snapshot; wider page; buttons that look like buttons; threads in Messages.
   ========================================================================== */
.ptp .ptp-shell, .ptp .ptp-shell-body { display: block; max-width: 1300px; margin: 0 auto; }
.ptp .ptp-main { max-width: none; }
.ptp .ptp-portal-footer { max-width: 1300px; }
.ptp-portal-house .ptp .ptp-topbar-in { max-width: 1356px; }

/* Header: bigger logo and photo */
.ptp .ptp-topbar-in { min-height: 100px; padding-top: 16px; padding-bottom: 16px; }
.ptp .ptp-topbar-logo { max-height: 66px; max-width: 320px; }
.ptp .ptp-topbar-label { font-size: 13px; }
.ptp .ptp-topbar-av { width: 64px; height: 64px; flex-basis: 64px; font-size: 20px; box-shadow: 0 2px 8px rgba(52,35,52,.18); }
.ptp .ptp-topbar-who strong { font-size: 16.5px; }
.ptp .ptp-topbar-who small { font-size: 14px; }

/* Buttons that clearly look like buttons */
.ptp .ptp-btn { border-color: #c9bccf; box-shadow: 0 1px 2px rgba(52,35,52,.10); }
.ptp .ptp-btn:hover { border-color: var(--ptp-deep); background: var(--ptp-tint2); }
.ptp .ptp-btn-primary, .ptp button.ptp-btn-primary { border-color: var(--ptp-deep); }
.ptp .ptp-btn .ptp-ico { width: 17px; height: 17px; flex: 0 0 17px; }
.ptp .ptp-page-jumps a { border-color: #c9bccf; font-weight: 600; box-shadow: 0 1px 2px rgba(52,35,52,.10); min-height: 38px; padding: 0 14px; }
.ptp .ptp-db-link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid #c9bccf; border-radius: 8px; background: #fff; text-decoration: none; box-shadow: 0 1px 2px rgba(52,35,52,.10); }
.ptp .ptp-db-link-btn:hover { border-color: var(--ptp-deep); background: var(--ptp-tint2); }

/* Profile card (same layout as the CRM client page) */
.ptp .ptp-profile { background: #fff; border: 1px solid var(--ptp-line); border-radius: 14px; padding: 26px 28px; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(52,35,52,.04); }
.ptp .ptp-profile-top { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 28px; align-items: start; }
.ptp .ptp-profile-photo { display: grid; place-items: center; width: 128px; height: 160px; border-radius: 10px; overflow: hidden; background: var(--ptp-ink); box-shadow: 0 6px 16px rgba(52,35,52,.18); text-decoration: none; }
.ptp .ptp-profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.ptp .ptp-profile-photo span { color: #fff; font-size: 40px; font-weight: 600; }
.ptp .ptp-profile-eyebrow { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ptp-muted); }
.ptp .ptp-profile-name { margin: 4px 0 2px; font-size: 30px; font-weight: 700; line-height: 1.2; color: var(--ptp-ink); }
.ptp .ptp-profile-sub { margin: 0; font-size: 15.5px; color: var(--ptp-muted); }
.ptp .ptp-profile-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.ptp .ptp-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 6px; background: #f0edf3; color: #574f61; font-size: 13.5px; font-weight: 600; }
.ptp .ptp-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ptp .ptp-chip-ok { background: #e7f4ec; color: #1d6b42; }
.ptp .ptp-profile-contact { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; color: var(--ptp-text); }
.ptp .ptp-profile-contact span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.ptp .ptp-profile-contact .ptp-ico { width: 17px; height: 17px; flex: 0 0 17px; color: var(--ptp-muted); }
.ptp .ptp-profile-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Action tiles */
.ptp .ptp-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--ptp-line); }
.ptp .ptp-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 84px; padding: 14px 10px; border: 1px solid #c9bccf; border-radius: 10px; background: #fff; color: var(--ptp-ink); font-size: 14.5px; font-weight: 600; text-align: center; text-decoration: none; box-shadow: 0 1px 2px rgba(52,35,52,.08); transition: background .15s, color .15s, border-color .15s; }
.ptp .ptp-action .ptp-ico { width: 22px; height: 22px; color: var(--ptp-deep); }
.ptp .ptp-action:hover, .ptp .ptp-action.is-main { background: var(--ptp-deep); border-color: var(--ptp-deep); color: #fff; }
.ptp .ptp-action:hover .ptp-ico, .ptp .ptp-action.is-main .ptp-ico { color: #fff; }
.ptp .ptp-action.is-main:hover { background: var(--ptp-ink); }

/* Tab bar */
.ptp .ptp-tabs { display: flex; gap: 4px; margin: 0 0 22px; padding: 6px; background: #fff; border: 1px solid var(--ptp-line); border-radius: 12px; overflow-x: auto; scrollbar-width: thin; }
.ptp .ptp-tab-link { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: 44px; padding: 0 16px; border-radius: 8px; color: var(--ptp-ink); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.ptp .ptp-tab-link .ptp-ico { width: 18px; height: 18px; color: var(--ptp-deep); }
.ptp .ptp-tab-link:hover { background: var(--ptp-tint2); }
.ptp .ptp-tab-link.ptp-active { background: var(--ptp-ink); color: #fff; font-weight: 600; }
.ptp .ptp-tab-link.ptp-active .ptp-ico { color: #fff; }
.ptp .ptp-tab-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--ptp-deep); color: #fff; font-size: 12.5px; font-weight: 600; display: inline-grid; place-items: center; }
.ptp .ptp-tab-link.ptp-active .ptp-tab-badge { background: #fff; color: var(--ptp-ink); }
.ptp .ptp-tab-link:focus-visible, .ptp .ptp-action:focus-visible { outline: 2px solid var(--ptp-deep); outline-offset: 2px; }

/* List / Grid switch (same as the CRM) */
.ptp .ptp-viewswitch { display: inline-flex; overflow: hidden; border: 1px solid #c9bccf; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(52,35,52,.08); margin: 0 0 14px; }
.ptp .ptp-viewswitch button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; background: #fff; color: var(--ptp-ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.ptp .ptp-viewswitch button + button { border-left: 1px solid #c9bccf; }
.ptp .ptp-viewswitch button:hover { background: var(--ptp-tint2); }
.ptp .ptp-viewswitch button.is-active { background: var(--ptp-ink); color: #fff; }

/* Home: two columns like the CRM (to-do and activity left, Snapshot right) */
.ptp .ptp-home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.ptp .ptp-home-side .ptp-card, .ptp .ptp-home-side .ptp-db-card, .ptp .ptp-home-side .ptp-promo { margin-bottom: 16px; }
.ptp .ptp-snapshot .ptp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.ptp .ptp-snapshot .ptp-tile { min-height: 112px; border-color: var(--ptp-line); box-shadow: none; }
.ptp .ptp-snapshot .ptp-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ptp .ptp-tile-ic .ptp-ico { width: 22px; height: 22px; color: var(--ptp-deep); }
.ptp .ptp-snapshot .ptp-tile-num { margin-top: 6px; }

/* Account: Change password and photo at the top */
.ptp .ptp-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.ptp .ptp-account-grid > .ptp-card { margin: 0; }
.ptp .ptp-account-pw .ptp-grid { grid-template-columns: 1fr; }

/* Messages: conversations */
.ptp .ptp-inbox-item.is-active, .ptp .ptp-inbox-item.is-active:hover { background: var(--ptp-ink); }
.ptp .ptp-inbox-item.is-active .ptp-inbox-from, .ptp .ptp-inbox-item.is-active .ptp-inbox-subject { color: #fff; }
.ptp .ptp-inbox-item.is-active .ptp-inbox-date, .ptp .ptp-inbox-item.is-active .ptp-inbox-snippet { color: rgba(255,255,255,.78); }
.ptp .ptp-inbox-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--ptp-tint); color: var(--ptp-ink); font-size: 12px; font-weight: 600; }
.ptp .ptp-thread-msg { border: 1px solid var(--ptp-line); border-radius: 10px; padding: 16px 18px; margin: 0 0 12px; background: #fff; transition: background .2s, box-shadow .2s; }
.ptp .ptp-thread-msg.is-you { background: #fbf9fc; }
.ptp .ptp-thread-msg.is-replying { background: var(--ptp-tint); box-shadow: 0 0 0 2px var(--ptp-deep); }
.ptp .ptp-thread-msg .ptp-inbox-meta { padding-bottom: 12px; margin-bottom: 12px; }
.ptp .ptp-reply-box { margin-top: 18px; padding: 18px; border: 1px solid #c9bccf; border-radius: 10px; background: #faf8fb; }
.ptp .ptp-reply-title { margin: 0 0 10px; font-size: 16px; font-weight: 600; color: var(--ptp-ink); }
.ptp .ptp-inbox-compose .ptp-reply-title { display: none; }
.ptp .ptp-inbox-pane { max-height: 900px; }
.ptp .ptp-inbox-list { max-height: 900px; }

@media (max-width: 1100px) {
	.ptp .ptp-home-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
	.ptp .ptp-shell-body { padding: 16px 16px 0; }
	.ptp .ptp-main { padding: 0; }
	.ptp .ptp-topbar-in, .ptp-portal-house .ptp .ptp-topbar-in { min-height: 72px; padding: 10px 16px; }
	.ptp .ptp-topbar-logo { max-height: 46px; max-width: 180px; }
	.ptp .ptp-topbar-av { width: 44px; height: 44px; flex-basis: 44px; font-size: 15px; }
	.ptp .ptp-profile { padding: 18px 16px; }
	.ptp .ptp-profile-top { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
	.ptp .ptp-profile-photo { width: 96px; height: 120px; }
	.ptp .ptp-profile-photo span { font-size: 30px; }
	.ptp .ptp-profile-name { font-size: 23px; }
	.ptp .ptp-profile-contact { font-size: 14px; gap: 6px 16px; }
	.ptp .ptp-profile-btns { grid-column: 1 / -1; }
	.ptp .ptp-actions { display: flex; overflow-x: auto; gap: 10px; margin-top: 16px; padding-top: 16px; scrollbar-width: none; }
	.ptp .ptp-actions::-webkit-scrollbar { display: none; }
	.ptp .ptp-action { flex: 0 0 124px; min-height: 78px; font-size: 13.5px; }
	.ptp .ptp-tabs { margin-bottom: 16px; }
	.ptp .ptp-tab-link { min-height: 42px; padding: 0 13px; font-size: 14.5px; }
	.ptp .ptp-account-grid { grid-template-columns: 1fr; }
	.ptp .ptp-inbox-pane, .ptp .ptp-inbox-list { max-height: none; }
}
@media (max-width: 600px) {
	.ptp .ptp-profile-top { grid-template-columns: 84px minmax(0, 1fr); }
	.ptp .ptp-profile-photo { width: 84px; height: 105px; }
	.ptp .ptp-profile-btns .ptp-btn { flex: 1 1 auto; }
	.ptp .ptp-topbar-btn { min-height: 40px; }
	.ptp .ptp-thread-msg { padding: 14px; }
	.ptp .ptp-reply-box { padding: 14px; }
}
