/* Upstate Client Portal: support tickets (portal page + shared message styles in the dashboard) */

.upcp-portal {
	/* Logo colors (Settings → Colors prints --upcp-brand / --upcp-navy / --upcp-lav on :root). */
	--upcp-accent: var(--upcp-brand, #6b1b9a);
	--upcp-ink: var(--upcp-navy, #26438b);
	--upcp-tint: var(--upcp-lav, #efe3f9);
	--upcp-border: #e4e4e7;
	--upcp-muted: #71717a;
	--upcp-bg: #faf7fc;
	color: #27272a;
	max-width: 880px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.55;
}

.upcp-portal h2 { margin: 0; font-size: 1.5em; line-height: 1.25; }

.upcp-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin: 0 0 16px;
}

.upcp-sub { color: var(--upcp-muted); margin: -8px 0 20px; font-size: .9em; }

.upcp-card {
	background: #fff;
	border: 1px solid var(--upcp-border);
	border-radius: 10px;
	padding: 24px;
	margin: 0 0 20px;
}

.upcp-empty { text-align: center; color: var(--upcp-muted); }

.upcp-btn,
.upcp-portal button.upcp-btn {
	display: inline-block;
	background: var(--upcp-accent);
	color: #fff !important;
	border: 0;
	border-radius: 6px;
	padding: 11px 20px;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none !important;
	cursor: pointer;
	line-height: 1.2;
}
.upcp-btn:hover { filter: brightness(1.1); }

.upcp-link-btn {
	background: none !important;
	border: 0 !important;
	color: var(--upcp-muted) !important;
	text-decoration: underline;
	padding: 0 !important;
	cursor: pointer;
	font-size: .9em;
}

.upcp-notice {
	padding: 12px 16px;
	border-radius: 6px;
	background: var(--upcp-bg);
	border-left: 4px solid var(--upcp-muted);
	margin: 0 0 20px;
}
.upcp-notice-ok { border-left-color: var(--upcp-brand, #6b1b9a); background: var(--upcp-lav, #efe3f9); color: #2e1a47; }
.upcp-notice-err { border-left-color: #d63638; background: #fcf0f1; }

/* List */
.upcp-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--upcp-border); border-radius: 10px; overflow: hidden; }
.upcp-list-item + .upcp-list-item { border-top: 1px solid var(--upcp-border); }
.upcp-list-item a {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: "title pill" "meta pill";
	gap: 2px 16px;
	align-items: center;
	padding: 14px 18px;
	text-decoration: none !important;
	color: inherit !important;
	background: #fff;
}
.upcp-list-item a:hover { background: var(--upcp-bg); }
.upcp-list-title { grid-area: title; font-weight: 600; }
.upcp-list-meta { grid-area: meta; font-size: .85em; color: var(--upcp-muted); }
.upcp-list-item .upcp-pill { grid-area: pill; }
.upcp-unread .upcp-list-title::before { content: "●"; color: var(--upcp-accent); margin-right: 6px; font-size: .8em; }

/* Pills (also used in the dashboard list) */
.upcp-pill {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
	background: #f0f0f1;
	color: #3c434a;
}
.upcp-st-open { background: #e6f0fa; color: #135e96; }
.upcp-st-in_progress { background: #fcf3dc; color: #8a6100; }
.upcp-st-waiting { background: #f3e8fb; color: #6b2fa0; }
.upcp-st-closed { background: #f0f0f1; color: #646970; }
.upcp-pri-high { background: #fcefe1; color: #a64b00; }
.upcp-pri-urgent { background: #d63638; color: #fff; }
.upcp-needs { background: #d63638; color: #fff; }

/* Forms */
.upcp-form label { display: block; font-weight: 600; margin: 16px 0 6px; }
.upcp-form h2 + input,
.upcp-form label:first-of-type { margin-top: 18px; }
.upcp-form input[type="text"],
.upcp-form input[type="url"],
.upcp-form select,
.upcp-form textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 16px;
	font-family: inherit;
	background: #fff;
}
.upcp-form .upcp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.upcp-form button[type="submit"] { margin-top: 20px; }
.upcp-close { text-align: center; margin: -4px 0 20px; }

.upcp-login { max-width: 420px; margin: 0 auto; }
.upcp-login form p { margin: 0 0 12px; }
.upcp-login label { display: block; font-weight: 600; margin-bottom: 4px; }
.upcp-login input[type="text"],
.upcp-login input[type="password"] { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #8c8f94; border-radius: 6px; font-size: 16px; }
.upcp-login .login-remember label { font-weight: 400; display: inline; }
.upcp-login input[type="submit"] { background: var(--upcp-accent); color: #fff; border: 0; border-radius: 6px; padding: 11px 20px; font-weight: 600; cursor: pointer; }

@media (max-width: 600px) {
	.upcp-form .upcp-row { grid-template-columns: 1fr; gap: 0; }
	.upcp-msg { max-width: 100%; }
	.upcp-card { padding: 18px; }
}

/* Public request form (0.2.0) */
.upcp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.upcp-login-link { margin: 6px 0 0; color: var(--upcp-muted); font-size: .92em; }
.upcp-form input[type="email"] {
	width: 100%; box-sizing: border-box; border: 1px solid #8c8f94; border-radius: 6px;
	padding: 10px 12px; font-size: 16px; font-family: inherit; background: #fff;
}
.upcp-center { text-align: center; }
.upcp-request { padding: 24px 0; }

/* ===== Front-end team view (0.3.0) ===== */
.upcp-portal [hidden] { display: none !important; }

.upcp-portal:has(.upcp-staff) { max-width: 1240px; }
.upcp-staff {
	--upcp-ink: var(--upcp-navy, #26438b);
	--upcp-muted: #64748b;
	--upcp-line: #e2e8f0;
	--upcp-soft: #f8fafc;
	color: var(--upcp-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
	font-size: 15px;
}
.upcp-staff .upcp-card { border-color: var(--upcp-line); border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.upcp-staff .upcp-btn { background: var(--upcp-accent); border-radius: 8px; font-size: 14px; padding: 9px 16px; }
.upcp-staff .upcp-btn-ghost { background: transparent; color: var(--upcp-ink) !important; border: 1px solid var(--upcp-line); }
.upcp-staff .upcp-btn-ghost:hover { background: var(--upcp-soft); filter: none; }
.upcp-btn-small { padding: 7px 12px !important; }
.upcp-btn-block { width: 100%; padding: 12px !important; }

.upcp-topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 0 0 18px; }
.upcp-topbar h2 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; margin: 2px 0 0; }
.upcp-topbar-actions { display: flex; gap: 8px; }
.upcp-back { font-size: 13px; color: var(--upcp-muted) !important; text-decoration: none !important; }
.upcp-back:hover { color: var(--upcp-accent) !important; }

/* Tabs + search */
.upcp-tabs-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.upcp-tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--upcp-soft); border: 1px solid var(--upcp-line); border-radius: 10px; padding: 4px; }
.upcp-tabs a {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 7px;
	color: var(--upcp-muted) !important; text-decoration: none !important; font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
.upcp-tabs a:hover { color: var(--upcp-ink) !important; background: #fff; }
.upcp-tabs a.is-active { background: #fff; color: var(--upcp-ink) !important; box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.upcp-count { background: #e2e8f0; color: #334155; border-radius: 999px; font-size: 11.5px; padding: 0 7px; line-height: 18px; font-weight: 600; }
.upcp-tabs a.is-alert .upcp-count { background: #dc2626; color: #fff; }
.upcp-tabs-sep { width: 1px; background: var(--upcp-line); margin: 4px 4px; }
.upcp-search input {
	width: 260px; max-width: 100%; border: 1px solid var(--upcp-line); border-radius: 9px; padding: 8px 12px 8px 34px; font-size: 14px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center;
}

/* Table */
.upcp-table-wrap { background: #fff; border: 1px solid var(--upcp-line); border-radius: 14px; overflow-x: auto; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.upcp-table { width: 100%; border-collapse: collapse; margin: 0; border: 0; font-size: 14px; }
.upcp-table th {
	text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
	color: var(--upcp-muted); background: var(--upcp-soft); padding: 10px 14px; border: 0; border-bottom: 1px solid var(--upcp-line);
}
.upcp-table td { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--upcp-line); vertical-align: middle; }
.upcp-table tbody tr:last-child td { border-bottom: 0; }
.upcp-table tfoot td { background: var(--upcp-soft); border-top: 1px solid var(--upcp-line); border-bottom: 0; }
.upcp-row-link { cursor: pointer; transition: background .12s; }
.upcp-row-link:hover { background: #f1f5f9; }
.upcp-row-link.is-unread .upcp-row-title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #dc2626; margin-right: 8px; vertical-align: 1px; }
.upcp-row-title { color: var(--upcp-ink) !important; font-weight: 600; text-decoration: none !important; }
.upcp-row-title:hover { color: var(--upcp-accent) !important; }
.upcp-row-sub { display: block; color: var(--upcp-muted); font-size: 12.5px; margin-top: 2px; }
.upcp-col-check { width: 36px; }
.upcp-col-num { text-align: right !important; white-space: nowrap; color: var(--upcp-muted); }
.upcp-table td .upcp-pill + .upcp-pill { margin-left: 4px; }

/* Bulk bar */
.upcp-bulkbar {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 10px; z-index: 5;
	background: var(--upcp-ink); color: #fff; border-radius: 12px; padding: 10px 14px; margin: 0 0 12px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, .2);
}
.upcp-bulkbar select, .upcp-bulkbar input[type="text"] { width: auto !important; max-width: 240px; margin: 0; border-radius: 8px; border: 0; padding: 7px 10px; font-size: 14px; color: var(--upcp-ink); background: #fff; }
.upcp-bulkbar .upcp-btn { margin: 0; }
.upcp-bulk-count { font-weight: 600; margin-right: auto; }

/* Ticket page */
.upcp-staff .upcp-sub { margin: -6px 0 18px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.upcp-ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.upcp-staff .upcp-thread { background: #fff; border: 1px solid var(--upcp-line); border-radius: 16px; padding: 18px 18px 22px; }
.upcp-reply { margin-bottom: 0; }
.upcp-reply label:first-of-type { margin-top: 0; }
.upcp-reply-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.upcp-reply-actions input[type="file"] { font-size: 13px; max-width: 220px; }
.upcp-reply-actions .upcp-btn { margin: 0 0 0 auto !important; }
.upcp-staff .upcp-form label.upcp-inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; font-size: 13.5px; }
.upcp-staff .upcp-form label.upcp-inline select { width: auto; padding: 6px 8px; font-size: 14px; }

.upcp-ticket-side { position: sticky; top: 16px; }
.upcp-panel { padding: 16px 18px !important; margin-bottom: 14px !important; }
.upcp-panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--upcp-muted); margin: 0 0 10px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.upcp-private { text-transform: none; letter-spacing: 0; background: #fef3c7; color: #92400e; border-radius: 6px; padding: 1px 7px; font-size: 11px; }
.upcp-panel label { display: block; font-size: 12.5px; font-weight: 600; color: #334155; margin: 0 0 10px; }
.upcp-panel input, .upcp-panel select, .upcp-panel textarea {
	display: block; width: 100%; box-sizing: border-box; margin-top: 4px; border: 1px solid #cbd5e1; border-radius: 8px;
	padding: 7px 9px; font-size: 14px; font-family: inherit; font-weight: 400; background: #fff;
}
.upcp-panel input:focus, .upcp-panel select:focus, .upcp-panel textarea:focus,
.upcp-staff .upcp-form textarea:focus, .upcp-search input:focus { outline: 3px solid color-mix(in srgb, var(--upcp-accent) 22%, transparent); border-color: var(--upcp-accent); }
.upcp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.upcp-client-card { margin: 0; line-height: 1.6; font-size: 14px; }
.upcp-small-link { font-size: 13px; color: var(--upcp-muted) !important; }
.upcp-narrow { max-width: 720px; }
.upcp-check { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; }
.upcp-check input { width: auto !important; }

@media (max-width: 900px) {
	.upcp-ticket-layout { grid-template-columns: 1fr; }
	.upcp-ticket-side { position: static; }
	.upcp-search input { width: 100%; }
	.upcp-search { width: 100%; }
}

/* ===== Clients in the desk (0.4.0) ===== */
.upcp-desk-nav { display: inline-flex; gap: 2px; margin: 0 0 14px; border-bottom: 1px solid var(--upcp-line); width: 100%; }
.upcp-desk-nav a {
	padding: 8px 14px; margin-bottom: -1px; font-weight: 600; font-size: 14px; text-decoration: none !important;
	color: var(--upcp-muted) !important; border-bottom: 2px solid transparent;
}
.upcp-desk-nav a:hover { color: var(--upcp-ink) !important; }
.upcp-desk-nav a.is-active { color: var(--upcp-accent) !important; border-bottom-color: var(--upcp-accent); }

.upcp-cs-active { background: #dcfce7; color: #166534; }
.upcp-cs-prospect { background: #e0e7ff; color: #3730a3; }
.upcp-cs-past { background: #f1f5f9; color: #64748b; }

.upcp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.upcp-stat { background: #fff; border: 1px solid var(--upcp-line); border-radius: 14px; padding: 14px 16px; }
.upcp-stat span { display: block; font-size: 12px; color: var(--upcp-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.upcp-stat strong { display: block; font-size: 22px; margin-top: 4px; letter-spacing: -.01em; }
.upcp-section-title { font-size: 15px; font-weight: 700; margin: 22px 0 10px; }

.upcp-people { padding: 6px 18px 14px !important; }
.upcp-person { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--upcp-line); }
.upcp-person > div { flex: 1; }
.upcp-avatar {
	width: 34px; height: 34px; border-radius: 50%; background: #e0e7ff; color: #3730a3; font-weight: 700;
	display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.upcp-add-person { padding-top: 12px; }
.upcp-add-person summary { cursor: pointer; font-weight: 600; color: var(--upcp-accent); font-size: 14px; }
.upcp-add-person .upcp-form input[type="text"], .upcp-add-person .upcp-form input[type="email"] { padding: 8px 10px; font-size: 14px; }
.upcp-add-person .upcp-btn { margin-top: 10px; }

.upcp-unlinked { margin-top: 22px; }
.upcp-unlinked h3 { margin: 0; font-size: 15px; }
.upcp-unlinked-row { display: grid; grid-template-columns: 1fr 260px auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--upcp-line); }
.upcp-unlinked-row:first-of-type { margin-top: 10px; }
.upcp-unlinked-row select { border: 1px solid #cbd5e1; border-radius: 8px; padding: 7px 9px; font-size: 14px; width: 100%; }
.upcp-small-links { margin-top: 10px; }

@media (max-width: 900px) {
	.upcp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.upcp-unlinked-row { grid-template-columns: 1fr; }
}

/* Priority pills + estimate (desk) */
.upcp-pri-rush { background: #fff1e6; color: #b45309; }
.upcp-pri-critical { background: #dc2626; color: #fff; }
.upcp-pri-planned { background: #eef2f7; color: #475569; }
.upcp-pri-normal { background: #f4f4f5; color: #3f3f46; }
.upcp-estimate { background: #fef3c7; color: #92400e; }
.upcp-alert { background: #fef3c7; color: #78350f; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 14px; margin: -6px 0 18px; font-size: 14px; }
.upcp-suggest { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin: -2px 0 10px !important; }

/* ===================================================================
   Modern look in the logo colors (0.6.0)
   Purple = actions, navy = headings, light purple = team replies + picks.
   =================================================================== */

/* Portal pages: page background, header and footer in the brand colors (Hello Elementor) */
body.upcp-page { background: #fff linear-gradient(180deg, #f7f2fb 0, #fbf9fd 320px, #fff 640px) no-repeat; background-size: 100% 640px; }
body.upcp-page .site-header .site-title a,
body.upcp-page .site-header .site-branding a { color: var(--upcp-navy, #26438b); font-weight: 800; letter-spacing: -.01em; }
body.upcp-page .site-header .site-description { color: #71717a; }
body.upcp-page .site-navigation a,
body.upcp-page .site-header nav a { color: var(--upcp-navy, #26438b); font-weight: 600; text-decoration: none; border-radius: 8px; }
body.upcp-page .site-navigation a:hover,
body.upcp-page .site-header nav a:hover,
body.upcp-page .site-navigation .current-menu-item > a { color: var(--upcp-brand, #6b1b9a); }
body.upcp-page .site-footer, body.upcp-page .site-footer a { color: #71717a; }
body.upcp-page a { color: var(--upcp-brand, #6b1b9a); }

.upcp-portal h2, .upcp-portal h3 { color: var(--upcp-ink); letter-spacing: -.015em; }
.upcp-portal a:not(.upcp-btn):not(.upcp-row-title) { color: var(--upcp-accent); }
.upcp-card { border-color: var(--upcp-border); border-radius: 18px; box-shadow: 0 1px 2px rgba(34, 65, 138, .04), 0 12px 32px -12px rgba(106, 27, 154, .14); }
.upcp-btn, .upcp-portal button.upcp-btn, .upcp-login input[type="submit"] {
	background: var(--upcp-accent); border-radius: 10px; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--upcp-accent) 60%, transparent);
	transition: transform .12s, filter .12s, box-shadow .12s;
}
.upcp-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.upcp-btn:active { transform: none; }
.upcp-staff .upcp-btn-ghost { box-shadow: none; }
.upcp-badge { background: var(--upcp-accent); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; letter-spacing: .02em; }
.upcp-st-waiting { background: var(--upcp-tint); color: var(--upcp-accent); }
.upcp-list { border-radius: 16px; background: #fff; }
.upcp-list-item a:hover { background: var(--upcp-bg); }
.upcp-staff .upcp-tabs a.is-active, .upcp-staff .upcp-row-link:hover { background: #fff; }
.upcp-staff .upcp-row-link:hover { background: var(--upcp-bg); }
.upcp-avatar { background: var(--upcp-tint); color: var(--upcp-accent); }
.upcp-cs-prospect { background: #e8edf7; color: var(--upcp-ink); }
.upcp-bulkbar { background: var(--upcp-ink); }

/* Conversation: text-message thread (same look as the Client Review markup tool) */
.upcp-thread { display: flex; flex-direction: column; gap: 4px; margin: 0 0 24px; }
.upcp-msg { display: flex; flex-direction: column; align-items: flex-start; margin-top: 10px; max-width: 100%; }
.upcp-msg-staff { align-items: flex-end; }
.upcp-msg-head { display: flex; align-items: center; gap: 6px; padding: 0 10px; margin-bottom: 4px; font-size: 12px; color: var(--upcp-muted); }
.upcp-msg-head strong { color: #3f3f46; font-size: 12.5px; }
.upcp-msg-time { color: #a1a1aa; font-size: 11.5px; }
.upcp-bubble {
	max-width: 82%; padding: 10px 15px; border-radius: 20px 20px 20px 6px; background: #f1f1f4; color: #18181b;
	font-size: 15px; line-height: 1.5; overflow-wrap: anywhere;
}
.upcp-msg-staff .upcp-bubble { background: var(--upcp-tint); color: #2e1065; border-radius: 20px 20px 6px 20px; }
.upcp-msg-body p { margin: 0 0 .6em; }
.upcp-msg-body p:last-child { margin-bottom: 0; }
.upcp-msg-body a { color: inherit !important; text-decoration: underline; }
.upcp-attachment { margin-top: 8px; font-size: 13.5px; }
.upcp-attachment a { font-weight: 600; }
.upcp-attachment-img { display: block; max-width: 100%; max-height: 240px; width: auto; height: auto; border-radius: 12px; border: 0; }

/* Reply box under the thread */
.upcp-reply textarea, .upcp-form textarea { border-radius: 14px; }

/* Forms */
.upcp-form label { color: var(--upcp-ink); }
.upcp-form input[type="text"], .upcp-form input[type="url"], .upcp-form input[type="email"], .upcp-form select, .upcp-form textarea,
.upcp-login input[type="text"], .upcp-login input[type="password"] {
	border: 1px solid #d4d4d8; border-radius: 12px; padding: 11px 14px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.upcp-form input:focus, .upcp-form select:focus, .upcp-form textarea:focus, .upcp-login input:focus {
	outline: none; border-color: var(--upcp-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--upcp-accent) 16%, transparent);
}
.upcp-form small { display: block; color: var(--upcp-muted); font-size: 12.5px; margin-top: 5px; }
.upcp-help { color: #52525b; font-size: 13.5px; line-height: 1.55; margin-top: 10px; }
.upcp-help p { margin: 0 0 .6em; }
.upcp-help p:last-child { margin-bottom: 0; }
.upcp-req { color: var(--upcp-accent); font-size: 11.5px; font-weight: 600; font-style: normal; opacity: .75; margin-left: 2px; }
.upcp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Request form */
.upcp-request-form { padding: 36px 40px 40px; }
.upcp-request-form h2 { text-align: center; font-size: 30px; font-weight: 800; margin: 0 0 6px !important; }
.upcp-request-form .upcp-login-link { text-align: center; margin: 0 0 8px; color: var(--upcp-muted); font-size: 14px; }
.upcp-form fieldset.upcp-field { border: 0; padding: 0; margin: 28px 0 0; min-width: 0; }
.upcp-form fieldset.upcp-field legend { font-weight: 700; color: var(--upcp-ink); padding: 0; margin: 0 0 10px; }
.upcp-form-section { margin: 32px 0 6px; font-size: 18px; font-weight: 700; border-top: 1px solid var(--upcp-border); padding-top: 26px; }

/* Notice: soft alert card instead of the old red bar */
.upcp-banner {
	display: flex; gap: 12px; align-items: flex-start; margin: 0 0 18px; padding: 14px 18px; border-radius: 16px;
	background: #fff; border: 1px solid color-mix(in srgb, var(--upcp-accent) 22%, #fff); color: #3f3f46; font-size: 14px; line-height: 1.55;
	box-shadow: 0 8px 24px -16px rgba(106, 27, 154, .35);
}
.upcp-banner strong { color: var(--upcp-ink); }
.upcp-banner-icon {
	flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--upcp-accent); color: #fff;
	display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}

/* Choice cards (policy, priority) and chips (category) */
.upcp-choices { display: grid; gap: 10px; }
.upcp-choices-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.upcp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.upcp-form label.upcp-radio {
	position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 14px 16px; cursor: pointer;
	background: #fff; border: 1.5px solid #e4e4e7; border-radius: 14px; font-weight: 500; color: #27272a; line-height: 1.4;
	transition: border-color .15s, background .15s, box-shadow .15s;
}
.upcp-form label.upcp-radio:hover { border-color: color-mix(in srgb, var(--upcp-accent) 45%, #e4e4e7); background: var(--upcp-bg); }
.upcp-form label.upcp-radio:has(input:checked) {
	border-color: var(--upcp-accent); background: color-mix(in srgb, var(--upcp-tint) 55%, #fff);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--upcp-accent) 12%, transparent);
}
.upcp-form label.upcp-radio:has(input:focus-visible) { outline: 2px solid var(--upcp-accent); outline-offset: 2px; }
.upcp-form label.upcp-radio input {
	appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 2px solid #c4c4cc; border-radius: 50%;
	background: #fff; display: grid; place-content: center; transition: border-color .15s;
}
.upcp-form label.upcp-radio input::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--upcp-accent); transform: scale(0); transition: transform .15s; }
.upcp-form label.upcp-radio input:checked { border-color: var(--upcp-accent); }
.upcp-form label.upcp-radio input:checked::before { transform: scale(1); }
.upcp-choice-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.upcp-choice-text strong { color: var(--upcp-ink); font-weight: 700; }
.upcp-choice-text small { margin: 0 !important; color: var(--upcp-muted) !important; font-size: 13px !important; }
.upcp-pri-choice-rush .upcp-choice-text strong::after,
.upcp-pri-choice-critical .upcp-choice-text strong::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; vertical-align: 2px; }
.upcp-pri-choice-rush .upcp-choice-text strong::after { background: #f59e0b; }
.upcp-pri-choice-critical .upcp-choice-text strong::after { background: #dc2626; }
.upcp-form label.upcp-chip { padding: 9px 16px 9px 12px; border-radius: 999px; gap: 8px; font-size: 14.5px; align-items: center; }
.upcp-form label.upcp-chip input { width: 18px; height: 18px; }
.upcp-form label.upcp-chip input::before { width: 8px; height: 8px; }

/* Drop zone */
.upcp-drop {
	position: relative; margin-top: 12px; padding: 0; text-align: center; border: 2px dashed color-mix(in srgb, var(--upcp-accent) 30%, #e4e4e7);
	border-radius: 18px; background: var(--upcp-bg); transition: border-color .15s, background .15s;
}
.upcp-drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.upcp-drop input[type="file"]:focus-visible + .upcp-drop-label { outline: 2px solid var(--upcp-accent); outline-offset: 4px; border-radius: 14px; }
.upcp-form .upcp-drop-label, .upcp-addfiles-form .upcp-drop-label { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; padding: 28px 20px; cursor: pointer; font-weight: 400; color: #3f3f46; }
.upcp-drop-icon { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 16px; background: #fff; color: var(--upcp-accent); box-shadow: 0 4px 14px -6px rgba(106, 27, 154, .35); margin-bottom: 4px; }
.upcp-drop-label strong { color: var(--upcp-ink); }
.upcp-drop-pick { color: var(--upcp-accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.upcp-drop:hover, .upcp-drop.is-over { border-color: var(--upcp-accent); background: color-mix(in srgb, var(--upcp-tint) 45%, #fff); }
.upcp-drop-files { list-style: none; margin: 0; padding: 0 14px 14px; display: grid; gap: 6px; text-align: left; }
.upcp-drop-files li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; background: #fff; border: 1px solid #e4e4e7; border-radius: 12px; font-size: 14px; }
.upcp-drop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #27272a; }
.upcp-drop-size { color: var(--upcp-muted); font-size: 12.5px; white-space: nowrap; }
.upcp-drop-files li.is-too-big { border-color: #fca5a5; background: #fef2f2; }
.upcp-drop-files li.is-too-big .upcp-drop-size { color: #b91c1c; }
.upcp-portal button.upcp-drop-remove { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: #f4f4f5; color: #52525b; font-size: 18px; line-height: 1; cursor: pointer; }
.upcp-portal button.upcp-drop-remove:hover { background: #fee2e2; color: #b91c1c; }
.upcp-drop-thumb { flex: none; width: 36px; height: 36px; object-fit: cover; border-radius: 6px; border: 1px solid #e4e4e7; margin-left: -6px; }
.upcp-drop-keys { font-weight: 600; white-space: nowrap; }
@media (pointer: coarse) { .upcp-drop-hint { display: none; } }
.upcp-portal button.upcp-drop-paste { display: flex; align-items: center; gap: 7px; margin: -12px auto 18px; padding: 8px 16px; border: 1.5px solid var(--upcp-accent); border-radius: 999px; background: #fff; color: var(--upcp-accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.upcp-portal button.upcp-drop-paste:hover { background: var(--upcp-accent); color: #fff; }
.upcp-portal button.upcp-drop-paste[hidden] { display: none; }
.upcp-drop-note { margin: -6px 14px 12px; font-size: 13.5px; color: #15803d; text-align: center; }
.upcp-drop-note.is-bad { color: #b45309; }

.upcp-btn-submit { margin-top: 30px !important; padding: 15px 40px !important; font-size: 16px !important; border-radius: 14px !important; }

@media (max-width: 640px) {
	.upcp-request-form { padding: 24px 18px 28px; }
	.upcp-request-form h2 { font-size: 24px; }
	.upcp-choices-grid { grid-template-columns: 1fr; }
	.upcp-bubble { max-width: 92%; }
	.upcp-btn-submit { width: 100%; }
}

/* ===== Desk list: one status pill per ticket (0.6.0) ===== */
.upcp-tabs-row { margin-bottom: 8px; }
.upcp-billnav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 16px; font-size: 13px; }
.upcp-billnav-label { color: var(--upcp-muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.upcp-billnav a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; color: var(--upcp-muted) !important; text-decoration: none !important; font-weight: 500; }
.upcp-billnav a:hover { background: var(--upcp-bg); color: var(--upcp-ink) !important; }
.upcp-billnav a.is-active { background: var(--upcp-tint); color: var(--upcp-accent) !important; font-weight: 600; }
.upcp-billnav .upcp-count { background: transparent; color: inherit; padding: 0; opacity: .75; }

.upcp-table td { vertical-align: top; padding-top: 14px; padding-bottom: 14px; }
.upcp-table td.upcp-col-check { vertical-align: top; padding-top: 16px; }
.upcp-col-ticket { min-width: 220px; }
.upcp-col-client strong { font-weight: 600; color: #27272a; }
.upcp-flag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 6px; background: #fef3c7; color: #92400e; font-size: 11.5px; font-weight: 600; }

.upcp-prio { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: #52525b; font-size: 13.5px; }
.upcp-prio::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #d4d4d8; flex: none; }
.upcp-prio-rush { color: #b45309; font-weight: 600; }
.upcp-prio-rush::before { background: #f59e0b; }
.upcp-prio-critical { color: #b91c1c; font-weight: 700; }
.upcp-prio-critical::before { background: #dc2626; }
.upcp-prio-planned::before { background: #94a3b8; }
.upcp-bill-text { font-size: 13.5px; font-weight: 600; color: #52525b; white-space: nowrap; }
.upcp-bill-text.upcp-bill-paid { color: #15803d; }
.upcp-bill-text.upcp-bill-invoiced { color: var(--upcp-ink); }
.upcp-dot-sep { color: #d4d4d8; }
.upcp-staff .upcp-sub { gap: 8px; }

@media (max-width: 860px) {
	.upcp-col-bill, .upcp-col-prio, .upcp-col-date { display: none; }
}

/* Pill choices (Priority, Type) in the desk */
.upcp-pillset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.upcp-pillset legend { display: block; padding: 0; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: #334155; }
.upcp-pillset-row { display: flex; flex-wrap: wrap; gap: 6px; }
.upcp-staff .upcp-panel label.upcp-pillopt, .upcp-staff .upcp-form label.upcp-pillopt { display: inline-flex; margin: 0; font-weight: 500; }
.upcp-pillopt { position: relative; cursor: pointer; }
.upcp-staff .upcp-pillopt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.upcp-pillopt span {
	display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid #e4e4e7;
	background: #fff; color: #52525b; font-size: 13px; font-weight: 500; line-height: 1.3; white-space: nowrap; transition: all .12s;
}
.upcp-pillopt:hover span { border-color: color-mix(in srgb, var(--upcp-brand, #6b1b9a) 40%, #e4e4e7); color: #27272a; }
.upcp-pillopt input:focus-visible + span { outline: 2px solid var(--upcp-brand, #6b1b9a); outline-offset: 2px; }
.upcp-pillopt input:checked + span { background: var(--upcp-lav, #efe3f9); border-color: var(--upcp-brand, #6b1b9a); color: var(--upcp-brand, #6b1b9a); font-weight: 600; }
.upcp-pillset-priority .upcp-pillopt span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d4d4d8; }
.upcp-pillset-priority .upcp-prio-rush span::before { background: #f59e0b; }
.upcp-pillset-priority .upcp-prio-critical span::before { background: #dc2626; }
.upcp-pillset-priority .upcp-prio-planned span::before { background: #94a3b8; }
.upcp-pillset-priority .upcp-prio-rush input:checked + span { background: #fff7ed; border-color: #f59e0b; color: #b45309; }
.upcp-pillset-priority .upcp-prio-critical input:checked + span { background: #dc2626; border-color: #dc2626; color: #fff; }
.upcp-pillset-priority .upcp-prio-critical input:checked + span::before { background: #fff; }
.upcp-pillopt.upcp-prio-rush, .upcp-pillopt.upcp-prio-critical { font-weight: inherit; color: inherit; }
.upcp-pillopt.upcp-prio-normal::before, .upcp-pillopt.upcp-prio-rush::before, .upcp-pillopt.upcp-prio-critical::before, .upcp-pillopt.upcp-prio-planned::before { display: none; }
.upcp-form .upcp-pillset { margin-top: 16px; }

/* Type-to-search picker */
.upcp-picker { position: relative; }
.upcp-picker-input { padding-right: 30px !important; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2371717a' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat right 10px center !important; }
.upcp-picker-list {
	position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; max-height: 260px; overflow: auto;
	background: #fff; border: 1px solid #e4e4e7; border-radius: 12px; box-shadow: 0 12px 32px -8px rgba(34, 65, 138, .25);
}
.upcp-picker-list li { padding: 8px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; color: #27272a; }
.upcp-picker-list li:hover, .upcp-picker-list li.is-active { background: var(--upcp-lav, #efe3f9); color: var(--upcp-brand, #6b1b9a); }
.upcp-picker-list li.is-fixed { color: #71717a; }
.upcp-picker-list li.is-empty { color: #a1a1aa; cursor: default; font-size: 13px; }
.upcp-picker-list li.is-empty:hover { background: none; }
.upcp-unlinked-row .upcp-picker-input { border: 1px solid #cbd5e1; border-radius: 8px; padding: 7px 9px; font-size: 14px; width: 100%; box-sizing: border-box; }

/* The desk can use the full window width (Hello caps .site-main at 800px on mid-size screens). */
body.upcp-page .site-main:has(.upcp-staff) { max-width: min(1240px, calc(100% - 40px)); }

/* Logo in the header (Appearance → Customize → Site Identity → Logo) */
body.upcp-page .site-header .site-branding { display: flex; align-items: center; }
body.upcp-page .site-header .custom-logo-link { display: inline-block; line-height: 0; }
body.upcp-page .site-header .custom-logo { width: auto; max-height: 64px; height: auto; }
@media (max-width: 640px) {
	body.upcp-page .site-header .custom-logo { max-height: 44px; }
}
body.upcp-page .site-footer .custom-logo { width: auto; max-height: 36px; height: auto; opacity: .85; }
body.upcp-page:has(.upcp-staff) .site-header,
body.upcp-page:has(.upcp-staff) .site-footer { max-width: min(1240px, calc(100% - 40px)); }
.upcp-flag-warn { background: #fee2e2; color: #b91c1c; }
.upcp-alert-warn { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* ===== Files in conversations (0.6.0) ===== */
.upcp-files { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.upcp-msg-body:empty + .upcp-files, .upcp-bubble > .upcp-files:first-child { margin-top: 0; }
.upcp-file-tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.upcp-file-tile {
	position: relative; display: block; width: 168px; height: 126px; border-radius: 12px; overflow: hidden; background: #e4e4e7;
	text-decoration: none !important; box-shadow: 0 1px 2px rgba(0,0,0,.08); cursor: zoom-in;
}
.upcp-file-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.upcp-file-tile:hover img { transform: scale(1.04); }
.upcp-file-tile-name {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; font-size: 11.5px; font-weight: 600; color: #fff;
	background: linear-gradient(transparent, rgba(0,0,0,.6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upcp-file { display: flex; align-items: stretch; max-width: 360px; background: #fff; border: 1px solid #e4e4e7; border-radius: 12px; overflow: hidden; }
.upcp-file-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; text-decoration: none !important; color: inherit !important; }
.upcp-file-main:hover { background: #faf7fc; }
.upcp-file-icon {
	flex: none; width: 38px; height: 44px; border-radius: 6px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px;
	box-sizing: border-box; background: #64748b; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .03em;
	clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%);
}
.upcp-file-icon-pdf { background: #dc2626; }
.upcp-file-icon-doc, .upcp-file-icon-docx { background: #2563eb; }
.upcp-file-icon-xls, .upcp-file-icon-xlsx, .upcp-file-icon-csv { background: #16a34a; }
.upcp-file-icon-zip { background: #a16207; }
.upcp-file-icon-heic, .upcp-file-icon-txt { background: #6b1b9a; }
.upcp-file-text { min-width: 0; display: flex; flex-direction: column; }
.upcp-file-text strong { font-size: 13.5px; color: #27272a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcp-file-text small { font-size: 12px; color: #71717a; }
.upcp-file-dl { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; border-left: 1px solid #f0f0f2; color: var(--upcp-brand, #6b1b9a) !important; }
.upcp-file-dl:hover { background: var(--upcp-lav, #efe3f9); }
.upcp-msg-staff .upcp-file-tiles { justify-content: flex-end; }

/* Full-screen viewer */
.upcp-viewer-lock, .upcp-viewer-lock body { overflow: hidden; }
.upcp-viewer { position: fixed; inset: 0; z-index: 100000; display: none; background: rgba(17, 12, 30, .92); }
.upcp-viewer.is-open { display: block; }
.upcp-viewer-bar {
	position: absolute; top: 0; left: 0; right: 0; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 22px;
	color: #fff; background: linear-gradient(rgba(0,0,0,.45), transparent);
}
.upcp-viewer-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcp-viewer-count { color: rgba(255,255,255,.6); font-size: 13px; white-space: nowrap; margin-right: auto; }
.upcp-viewer-btn {
	display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 0; border-radius: 10px; cursor: pointer;
	background: rgba(255,255,255,.14); color: #fff !important; font-size: 14px; font-weight: 600; text-decoration: none !important; white-space: nowrap;
}
.upcp-viewer-btn:hover { background: rgba(255,255,255,.24); }
.upcp-viewer-dl { background: var(--upcp-brand, #6b1b9a); }
.upcp-viewer-dl:hover { background: var(--upcp-brand, #6b1b9a); filter: brightness(1.15); }
.upcp-viewer-close { width: 38px; padding: 0; justify-content: center; font-size: 16px; }
.upcp-viewer-stage { position: absolute; top: 60px; bottom: 20px; left: 70px; right: 70px; display: flex; align-items: center; justify-content: center; }
.upcp-viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #fff; }
.upcp-viewer-stage iframe { width: min(1000px, 100%); height: 100%; border: 0; border-radius: 8px; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.upcp-viewer-nav {
	position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
	background: rgba(255,255,255,.14); color: #fff; font-size: 30px; line-height: 1; padding: 0 0 4px;
}
.upcp-viewer-nav:hover { background: rgba(255,255,255,.26); }
.upcp-viewer-prev { left: 12px; }
.upcp-viewer-next { right: 12px; }
@media (max-width: 640px) {
	.upcp-viewer-stage { left: 8px; right: 8px; bottom: 70px; }
	.upcp-viewer-nav { top: auto; bottom: 12px; transform: none; }
	.upcp-viewer-dl span, .upcp-viewer-count { display: none; }
	.upcp-file-tile { width: 132px; height: 100px; }
}

/* Slim drop box under reply boxes */
.upcp-drop-compact { margin-top: 10px; border-width: 1.5px; border-radius: 12px; text-align: left; }
.upcp-form .upcp-drop-compact .upcp-drop-label { flex-direction: row; gap: 10px; padding: 10px 14px; font-size: 13.5px; color: #71717a; }
.upcp-drop-compact .upcp-drop-icon { width: 30px; height: 30px; border-radius: 9px; margin: 0; flex: none; box-shadow: none; background: var(--upcp-lav, #efe3f9); }
.upcp-drop-compact .upcp-drop-pick { text-decoration: none; }
.upcp-drop-compact .upcp-drop-files { padding: 0 10px 10px; }
.upcp-drop-compact { position: relative; }
.upcp-portal .upcp-drop-compact button.upcp-drop-paste { position: absolute; top: 9px; right: 10px; margin: 0; padding: 4px 11px; font-size: 12.5px; }
.upcp-drop-compact:has(.upcp-drop-paste:not([hidden])) .upcp-drop-label { padding-right: 160px; }
.upcp-drop-compact .upcp-drop-note { margin: 0 14px 8px; text-align: left; }
@media (max-width: 600px) {
	.upcp-portal .upcp-drop-compact button.upcp-drop-paste { display: none; }
	.upcp-drop-compact:has(.upcp-drop-paste) .upcp-drop-label { padding-right: 14px; }
}
.upcp-drop-compact .upcp-drop-files li { padding: 5px 6px 5px 12px; font-size: 13px; }
form.upcp-drop-target { outline: 2px dashed var(--upcp-brand, #6b1b9a); outline-offset: -6px; }
.upcp-reply-actions { margin-top: 12px; }

/* Files summary at the top of a ticket */
.upcp-filesum { padding: 14px 16px !important; margin-bottom: 16px !important; }
.upcp-filesum-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.upcp-filesum-head h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--upcp-muted, #71717a) !important; font-weight: 700; }
.upcp-filesum-all {
	display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
	background: var(--upcp-lav, #efe3f9); color: var(--upcp-brand, #6b1b9a) !important; text-decoration: none !important;
}
.upcp-filesum-all:hover { filter: brightness(.97); }
.upcp-filesum-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.upcp-filesum-list li { display: flex; flex-direction: column; align-items: stretch; min-width: 0; border: 1px solid #ececef; border-radius: 12px; overflow: hidden; background: #fff; }
.upcp-filesum-list li[hidden] { display: none; }
.upcp-filesum-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 7px 10px; text-decoration: none !important; color: inherit !important; }
.upcp-filesum-main:hover { background: #faf7fc; }
.upcp-filesum-thumb { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; flex: none; background: #e4e4e7; }
.upcp-filesum .upcp-file-icon { width: 32px; height: 38px; font-size: 9px; padding-bottom: 4px; }
.upcp-filesum-actions { display: flex; justify-content: flex-end; border-top: 1px solid #f0f0f2; background: #fcfcfd; }
.upcp-filesum-actions > * { height: 30px; }
.upcp-filesum .upcp-file-dl { width: 40px; border-left: 0; }
.upcp-filesum-main { padding: 9px 10px !important; }
.upcp-filesum-main > :last-child { min-width: 0; }
.upcp-filesum-toggle { margin-top: 10px; color: var(--upcp-brand, #6b1b9a) !important; text-decoration: none; font-weight: 600; }

/* File pills in the desk list */
.upcp-fpills { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: 1px; }
.upcp-fpill {
	display: inline-flex; align-items: center; gap: 4px; padding: 0 7px 0 6px; border-radius: 6px; font-size: 11.5px; font-weight: 600; line-height: 18px;
	background: #f4f4f5; color: #52525b; cursor: help; white-space: nowrap;
}
.upcp-fpill::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: currentColor; opacity: .8; }
.upcp-fpill-image { background: #f3e8fb; color: #6b1b9a; }
.upcp-fpill-pdf { background: #fee2e2; color: #b91c1c; }
.upcp-fpill-doc { background: #dbeafe; color: #1d4ed8; }
.upcp-fpill-sheet { background: #dcfce7; color: #15803d; }

/* ===== Calm ticket sidebar (0.6.0): summary rows that open on click ===== */
.upcp-side-card { padding: 18px 18px 10px !important; margin-bottom: 12px !important; }
.upcp-side-client { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.upcp-side-client .upcp-avatar { width: 40px; height: 40px; font-size: 16px; }
.upcp-side-client div { min-width: 0; display: flex; flex-direction: column; }
.upcp-side-client strong { font-size: 15.5px; color: var(--upcp-ink); }
.upcp-side-client a { font-size: 13px; color: var(--upcp-muted) !important; text-decoration: none !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcp-side-client a:hover { color: var(--upcp-brand, #6b1b9a) !important; }
.upcp-side-link { display: inline-block; margin: 4px 0 2px; font-size: 13px; font-weight: 600; color: var(--upcp-brand, #6b1b9a) !important; text-decoration: none !important; }
.upcp-side-h { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 2px !important; padding-top: 14px; border-top: 1px solid #f0f0f2; font-size: 11.5px !important; text-transform: uppercase; letter-spacing: .07em; color: #a1a1aa !important; font-weight: 700; }

.upcp-prop { border-radius: 10px; margin: 0 -8px; }
.upcp-prop > summary {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px; border-radius: 10px;
	list-style: none; cursor: pointer; font-size: 14px;
}
.upcp-prop > summary::-webkit-details-marker { display: none; }
.upcp-prop > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin: 0 2px 0 -4px; border-right: 1.5px solid #c4c4cc; border-bottom: 1.5px solid #c4c4cc; transform: rotate(-45deg); transition: transform .15s; }
.upcp-prop[open] > summary::after { transform: rotate(45deg); }
.upcp-prop > summary:hover { background: #faf7fc; }
.upcp-prop[open] { background: #faf7fc; }
.upcp-prop-label { color: #71717a; flex: none; }
.upcp-prop-value { margin-left: auto; min-width: 0; text-align: right; font-weight: 600; color: #27272a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcp-prop.is-changed > summary .upcp-prop-label::after { content: "edited"; margin-left: 7px; padding: 0 6px; border-radius: 5px; background: var(--upcp-lav, #efe3f9); color: var(--upcp-brand, #6b1b9a); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; vertical-align: 1px; }
.upcp-prop-edit { padding: 2px 8px 12px; }
.upcp-prop-edit .upcp-pillset { margin: 0; }
.upcp-prop-edit .upcp-pillset legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.upcp-prop-edit .upcp-small-link { display: inline-block; margin-top: 8px; }
.upcp-prop-edit > input[type="text"] { display: block; width: 100%; box-sizing: border-box; border: 1px solid #d4d4d8; border-radius: 8px; padding: 7px 9px; font-size: 14px; }
.upcp-prop-billing .upcp-prop-label { color: #27272a; font-weight: 600; }
.upcp-prop-billing .upcp-prop-value { font-weight: 500; color: #71717a; }
.upcp-prop-billing .upcp-pillset { margin-bottom: 12px; }

.upcp-side-save {
	position: sticky; bottom: 12px; display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 10px 10px 16px;
	border-radius: 14px; background: var(--upcp-navy, #26438b); color: #fff; font-size: 13.5px; font-weight: 600;
	box-shadow: 0 10px 30px -10px rgba(38, 67, 139, .6);
}
.upcp-side-save[hidden] { display: none; }
.upcp-side-save span { margin-right: auto; }
.upcp-side-save .upcp-side-undo { color: rgba(255,255,255,.75) !important; text-decoration: none; font-weight: 600; }
.upcp-portal .upcp-side-save button.upcp-btn { background: #fff !important; color: var(--upcp-brand, #6b1b9a) !important; box-shadow: none; padding: 7px 18px !important; }
.upcp-side-foot { margin: 4px 0 0; }
.upcp-side-foot a { color: #a1a1aa !important; font-size: 12px !important; }

/* File pills: neutral, so only status, priority and flags carry color */
.upcp-fpill, .upcp-fpill-image, .upcp-fpill-pdf, .upcp-fpill-doc, .upcp-fpill-sheet, .upcp-fpill-other {
	background: transparent; color: #71717a; border: 1px solid #e4e4e7; font-weight: 500; padding: 0 7px 0 5px;
}
.upcp-fpill::before {
	width: 13px; height: 13px; border-radius: 0; opacity: .7; background: currentColor;
	-webkit-mask: var(--upcp-fico) center / contain no-repeat; mask: var(--upcp-fico) center / contain no-repeat;
}
.upcp-fpill-image { --upcp-fico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='m21 16-5-5-9 9'/%3E%3C/svg%3E"); }
.upcp-fpill-pdf { --upcp-fico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M8.5 17v-4h1.3a1.2 1.2 0 0 1 0 2.4H8.5'/%3E%3Cpath d='M13 13v4h.8a1.6 1.6 0 0 0 1.6-1.6v-.8A1.6 1.6 0 0 0 13.8 13z'/%3E%3C/svg%3E"); }
.upcp-fpill-doc { --upcp-fico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M9 13h6M9 17h6M9 9h2'/%3E%3C/svg%3E"); }
.upcp-fpill-sheet { --upcp-fico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M3 15h18M9 4v16'/%3E%3C/svg%3E"); }
.upcp-fpill-other { --upcp-fico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 11-8.5 8.5a5 5 0 0 1-7-7L14 4a3.3 3.3 0 0 1 4.7 4.7L10 17.4a1.7 1.7 0 0 1-2.4-2.4l8-8'/%3E%3C/svg%3E"); }
.upcp-row-link:hover .upcp-fpill { border-color: #d4d4d8; color: #52525b; }

/* File pills: same text size as the "#40 · SEO" line beside them */
.upcp-row-sub .upcp-fpills { vertical-align: middle; margin-left: 8px; gap: 5px; }
.upcp-fpill { font-size: 12.5px; line-height: 22px; padding: 0 9px 0 7px; gap: 5px; border-radius: 7px; }
.upcp-fpill::before { width: 14px; height: 14px; }
.upcp-row-sub .upcp-flag { font-size: 12.5px; line-height: 22px; padding: 0 9px; border-radius: 7px; vertical-align: middle; }

/* Hover card for file pills on the desk list */
.upcp-fpills .upcp-fpill[data-group]:hover, .upcp-fpills .upcp-fpill[data-group]:focus-visible { border-color: color-mix(in srgb, var(--upcp-brand, #6b1b9a) 40%, #e4e4e7); color: var(--upcp-brand, #6b1b9a); }
.upcp-fpills .upcp-fpill[data-group]:focus-visible { outline: 2px solid var(--upcp-brand, #6b1b9a); outline-offset: 2px; }
.upcp-fpill { cursor: pointer; }
.upcp-fcard {
	position: fixed; z-index: 9999; width: 300px; padding: 10px; border-radius: 14px; background: #fff; border: 1px solid #ececef;
	box-shadow: 0 18px 40px -12px rgba(38, 67, 139, .35), 0 2px 6px rgba(0,0,0,.05);
	opacity: 0; transform: translateY(-4px); transition: opacity .12s, transform .12s;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}
.upcp-fcard.is-open { opacity: 1; transform: none; }
.upcp-fcard button { all: unset; box-sizing: border-box; cursor: pointer; }
.upcp-fcard-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.upcp-fcard-thumbs button { position: relative; display: block; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: #f4f4f5; }
.upcp-fcard-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .15s; }
.upcp-fcard-thumbs button:hover img { transform: scale(1.06); }
.upcp-fcard-thumbs button:focus-visible { outline: 2px solid var(--upcp-brand, #6b1b9a); outline-offset: 2px; }
.upcp-fcard-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(17, 12, 30, .55); color: #fff; font-weight: 700; font-size: 18px; }
.upcp-fcard-thumbs + .upcp-fcard-list { margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0f0f2; }
.upcp-fcard-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.upcp-fcard-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border-radius: 9px; }
.upcp-fcard-list button:hover, .upcp-fcard-list button:focus-visible { background: #faf7fc; }
.upcp-fcard .upcp-file-icon { width: 28px; height: 34px; font-size: 8.5px; padding-bottom: 4px; }
.upcp-fcard-name { min-width: 0; display: flex; flex-direction: column; }
.upcp-fcard-name strong { font-size: 13px; font-weight: 600; color: #27272a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcp-fcard-name small { font-size: 11.5px; color: #71717a; }
.upcp-fcard-extra { padding: 4px 6px 0; font-size: 12px; color: #71717a; }

/* PDF first-page pictures */
.upcp-file-badge {
	position: absolute; left: 4px; bottom: 4px; padding: 1px 5px; border-radius: 4px; background: #64748b; color: #fff;
	font-size: 9px; font-weight: 800; letter-spacing: .03em; line-height: 1.4;
}
.upcp-file-badge.upcp-file-icon-pdf { background: #dc2626; }
.upcp-file-page { position: relative; flex: none; width: 38px; height: 48px; border-radius: 5px; overflow: hidden; background: #fff; border: 1px solid #e4e4e7; }
.upcp-file-page img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.upcp-file-page .upcp-file-badge { left: 2px; bottom: 2px; font-size: 7.5px; padding: 0 3px; }
.upcp-filesum-thumb.is-page { object-position: top; border: 1px solid #e4e4e7; background: #fff; }
.upcp-fcard-thumbs button.is-page { background: #fff; box-shadow: inset 0 0 0 1px #e4e4e7; }
.upcp-fcard-thumbs button.is-page img { object-position: top; }

/* Hover card sizes: bigger pictures; one file gets one large tile, two get two, three or more get three across */
.upcp-fcard { width: 340px; }
.upcp-fcard-n1 { width: 280px; }
.upcp-fcard-n1 .upcp-fcard-thumbs { grid-template-columns: 1fr; }
.upcp-fcard-n2 { width: 400px; }
.upcp-fcard-n2 .upcp-fcard-thumbs { grid-template-columns: repeat(2, 1fr); }
.upcp-fcard-n3 { width: 480px; }
.upcp-fcard-thumbs { gap: 8px; }
.upcp-fcard-thumbs button { aspect-ratio: 4 / 3; }
.upcp-fcard-thumbs button.is-page { aspect-ratio: 3 / 4; }
.upcp-fcard-thumbs button.is-page img { object-fit: contain; }
.upcp-fcard-n1 .upcp-fcard-thumbs button.is-page { max-height: 340px; }
.upcp-bill-text.upcp-bill-draft { color: #b45309; }
.upcp-pill.upcp-bill-draft { background: #fef3c7; color: #92400e; }

/* Header and footer line up with the page content (Hello Elementor): 880px on client pages, 1240px on the team desk */
body.upcp-page { --upcp-wrap: 880px; }
body.upcp-page:has(.upcp-staff) { --upcp-wrap: 1240px; }
body.upcp-page .site-header,
body.upcp-page .site-footer,
body.upcp-page:has(.upcp-staff) .site-header,
body.upcp-page:has(.upcp-staff) .site-footer { max-width: none; width: 100%; margin: 0; padding-inline: 20px; box-sizing: border-box; }
body.upcp-page .site-header .header-inner,
body.upcp-page .site-footer .footer-inner { max-width: var(--upcp-wrap); width: 100%; margin-inline: auto; padding: 0; align-items: center; }
body.upcp-page .site-header { padding-top: 18px; padding-bottom: 10px; }
body.upcp-page .site-header .site-navigation ul.menu { gap: 4px; }
body.upcp-page .site-header .site-navigation a { padding: 8px 12px; }
body.upcp-page .site-header .site-navigation a:hover { background: color-mix(in srgb, var(--upcp-brand, #6b1b9a) 7%, transparent); }
body.upcp-page .site-footer { margin-top: 48px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid #ececf1; }
body.upcp-page .site-footer .footer-inner { display: flex; justify-content: space-between; gap: 16px; }
body.upcp-page .site-footer .custom-logo { max-height: 28px; opacity: .7; }
body.upcp-page .site-footer .copyright, body.upcp-page .site-footer .copyright p { margin: 0; font-size: 13px; color: #a1a1aa; }

/* Desk list Billing column: an icon per stage (distinct shapes, not just colors) + amount; hover for the name */
.upcp-bill-cell { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; cursor: default; }
.upcp-bill-ico { flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--upcp-bico) center / contain no-repeat; mask: var(--upcp-bico) center / contain no-repeat; }
.upcp-bill-val { font-size: 13.5px; font-weight: 600; color: #3f3f46; font-variant-numeric: tabular-nums; }
.upcp-bill-none .upcp-bill-val { font-weight: 500; color: #71717a; }
.upcp-bill-cell.upcp-bill-no_charge { color: #a1a1aa; }
.upcp-bill-cell.upcp-bill-no_charge .upcp-bill-val { color: #a1a1aa; font-weight: 500; }
.upcp-bill-cell.upcp-bill-to_invoice, .upcp-bill-cell.upcp-bill-draft { color: #d97706; }
.upcp-bill-cell.upcp-bill-invoiced { color: var(--upcp-navy, #26438b); }
.upcp-bill-cell.upcp-bill-paid { color: #16a34a; }
.upcp-bill-no_charge { --upcp-bico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E"); }
.upcp-bill-to_invoice { --upcp-bico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M14.8 9.2A2.6 2.6 0 0 0 12.4 8h-1a2.2 2.2 0 0 0 0 4.4h1.2a2.2 2.2 0 0 1 0 4.4h-1.1a2.6 2.6 0 0 1-2.4-1.2M12 6.5V8m0 8.8v1.5'/%3E%3C/svg%3E"); }
.upcp-bill-draft { --upcp-bico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v3'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M19.5 13.5a1.6 1.6 0 0 1 2.3 2.3L16.5 21H14v-2.5z'/%3E%3C/svg%3E"); }
.upcp-bill-invoiced { --upcp-bico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 3 10 14'/%3E%3Cpath d='m21 3-7 18-4-7-7-4z'/%3E%3C/svg%3E"); }
.upcp-bill-paid { --upcp-bico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12.5 2.8 2.8L16.5 9.5'/%3E%3C/svg%3E"); }
.upcp-client-name { font-weight: 600; color: #27272a; }

/* Desk list Submitted column: "Fri, Dec 5" over "2:14 pm" */
.upcp-col-date { white-space: nowrap; }
.upcp-date-day { display: block; font-size: 13.5px; font-weight: 500; color: #3f3f46; }

/* Home screen: Active grouped by whose move it is */
.upcp-table tr.upcp-group-head td { padding: 18px 16px 8px; background: transparent; border-bottom: 1px solid #ececf1; cursor: default; }
.upcp-table tbody.upcp-group:first-of-type tr.upcp-group-head td { padding-top: 12px; }
.upcp-group-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--upcp-navy, #26438b); }
.upcp-group-count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #eef0f6; color: #475569; font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center; }
.upcp-group-hint { margin-left: 8px; font-size: 12.5px; color: #a1a1aa; }
.upcp-group-needs .upcp-group-title { color: #dc2626; }
.upcp-group-needs .upcp-group-count { background: #dc2626; color: #fff; }
.upcp-group-waiting tr.upcp-row-link { opacity: .6; }
.upcp-group-waiting tr.upcp-row-link:hover { opacity: 1; }
.upcp-group-waiting tr.upcp-row-link td { padding-top: 10px; padding-bottom: 10px; }

/* Billing reminder above the home screen */
.upcp-bill-reminder { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; font-size: 13.5px; color: #92400e; }
.upcp-bill-reminder a { color: #92400e; font-weight: 600; text-decoration: none; }
.upcp-bill-reminder a:hover { text-decoration: underline; }
.upcp-bill-reminder .upcp-dot-sep { color: #f59e0b; }
.upcp-bill-reminder-ico { width: 18px; height: 18px; background: #d97706; -webkit-mask: var(--upcp-bico) center / contain no-repeat; mask: var(--upcp-bico) center / contain no-repeat; }
.upcp-bill-reminder { --upcp-bico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M14.8 9.2A2.6 2.6 0 0 0 12.4 8h-1a2.2 2.2 0 0 0 0 4.4h1.2a2.2 2.2 0 0 1 0 4.4h-1.1a2.6 2.6 0 0 1-2.4-1.2M12 6.5V8m0 8.8v1.5'/%3E%3C/svg%3E"); }

/* Desk list Activity column: Rush / Critical pill + deadline above the update time (no Priority column) */
.upcp-col-num .upcp-act-prio { display: inline-block; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; line-height: 20px; letter-spacing: .02em; }
.upcp-act-rush { background: #fff7ed; color: #c2410c; box-shadow: inset 0 0 0 1px #fed7aa; }
.upcp-act-critical { background: #dc2626; color: #fff; }
.upcp-act-due { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 600; color: #c2410c; }
.upcp-act-due.is-now, .upcp-act-due.is-late { color: #dc2626; }
.upcp-act-prio + .upcp-act-time, .upcp-act-due + .upcp-act-time { display: block; margin-top: 2px; font-size: 12px; color: #a1a1aa; }
/* Billing is the last column (bookkeeping, not the ticket's work): set apart a little */
.upcp-table th.upcp-col-bill, .upcp-table td.upcp-col-bill { padding-left: 28px; }

/* ===== Calm inbox (0.7): one line per ticket, color only when something needs you ===== */
.upcp-views { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 4px 0 18px; padding-bottom: 10px; border-bottom: 1px solid #ececf1; }
.upcp-views-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.upcp-views-nav a, .upcp-views-bill { position: relative; font-size: 14px; color: #71717a !important; text-decoration: none !important; padding: 4px 0; }
.upcp-views-nav a:hover, .upcp-views-bill:hover { color: #27272a !important; }
.upcp-views-nav a.is-active, .upcp-views-bill.is-active { color: #18181b !important; font-weight: 600; }
.upcp-views-nav a.is-active::after, .upcp-views-bill.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 2px; border-radius: 2px; background: var(--upcp-brand, #6b1b9a); }
.upcp-views-n { margin-left: 3px; color: #a1a1aa; font-weight: 500; }
.upcp-views .upcp-search { margin-left: auto; }
.upcp-views .upcp-search input { width: 200px; padding: 6px 12px 6px 32px; font-size: 13.5px; border-radius: 8px; border: 1px solid #e4e4e7; background-color: #fff; }
.upcp-views-bill.has-note span { color: #b45309; }
.upcp-billnav { margin: -6px 0 16px; }

.upcp-inbox { display: flex; flex-direction: column; gap: 22px; }
.upcp-inbox-head, .upcp-inbox-group > summary { margin: 0 0 4px; padding: 0 10px; font-size: 12.5px; font-weight: 500; color: #a1a1aa; letter-spacing: 0; text-transform: none; font-family: inherit; }
.upcp-inbox-group > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; }
.upcp-inbox-group > summary::-webkit-details-marker { display: none; }
.upcp-inbox-group > summary::before { content: "›"; font-size: 15px; line-height: 1; transition: transform .15s; }
.upcp-inbox-group[open] > summary::before { transform: rotate(90deg); }
.upcp-inbox-group > summary:hover { color: #52525b; background: #f4f4f5; }
.upcp-inbox-group.is-folded .upcp-inbox-row { color: #71717a; }

.upcp-inbox-row { display: grid; grid-template-columns: 18px 8px minmax(0, 1fr) 170px auto 96px; align-items: center; gap: 12px; padding: 12px 10px; border-bottom: 1px solid #f0f0f3; cursor: pointer; border-radius: 0; }
.upcp-inbox-row:hover { background: #faf9fc; }
.upcp-inbox-check { margin: 0; opacity: 0; transition: opacity .1s; }
.upcp-inbox-row:hover .upcp-inbox-check, .upcp-inbox-check:checked, .upcp-inbox-check:focus-visible, .is-selecting .upcp-inbox-check { opacity: 1; }
.upcp-inbox-dot { width: 8px; height: 8px; border-radius: 50%; }
.upcp-inbox-dot.is-needs { background: #dc2626; }
.upcp-inbox-dot.is-estimate { background: transparent; box-shadow: inset 0 0 0 2px #f59e0b; }
.upcp-inbox-title { min-width: 0; display: flex; align-items: center; gap: 8px; }
.upcp-inbox-title a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 500; color: #27272a !important; text-decoration: none !important; }
.upcp-inbox-row.is-needs .upcp-inbox-title a { font-weight: 650; color: #18181b !important; }
.upcp-inbox-group.is-folded .upcp-inbox-title a { color: #71717a !important; }
.upcp-inbox-who { font-size: 14px; color: #71717a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcp-inbox-status { font-size: 13px; color: #a1a1aa; white-space: nowrap; }
.upcp-when { justify-self: end; font-size: 13px; color: #a1a1aa; white-space: nowrap; font-variant-numeric: tabular-nums; }
.upcp-when.is-rush { color: #c2410c; font-weight: 500; }
.upcp-when.is-urgent { color: #dc2626; font-weight: 600; }
.upcp-inbox-empty { padding: 48px 0; text-align: center; color: #a1a1aa; font-size: 15px; }

/* Paperclip: one quiet icon (with a count when more than one file); hover shows the files */
.upcp-inbox .upcp-fpills { margin: 0; flex: none; }
.upcp-fpill.upcp-fclip { all: unset; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: #a1a1aa; cursor: pointer; border-radius: 5px; padding: 1px 3px; }
.upcp-fpill.upcp-fclip::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--upcp-clip) center / contain no-repeat; mask: var(--upcp-clip) center / contain no-repeat; }
.upcp-fpill.upcp-fclip:hover, .upcp-fpill.upcp-fclip:focus-visible { color: var(--upcp-brand, #6b1b9a); background: #f3e8fb; outline: none; }
.upcp-fclip { --upcp-clip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 11-8.5 8.5a5 5 0 0 1-7-7L14 4a3.3 3.3 0 0 1 4.7 4.7L10 17.4a1.7 1.7 0 0 1-2.4-2.4l8-8'/%3E%3C/svg%3E"); }

@media (max-width: 760px) {
	.upcp-inbox-row { grid-template-columns: 8px minmax(0, 1fr) auto; row-gap: 2px; }
	.upcp-inbox-check, .upcp-inbox-status { display: none; }
	.upcp-inbox-who { grid-column: 2; grid-row: 2; font-size: 13px; }
	.upcp-when { grid-column: 3; grid-row: 1; }
	.upcp-views .upcp-search { margin-left: 0; width: 100%; }
	.upcp-views .upcp-search input { width: 100%; }
}
.upcp-inbox-row { grid-template-columns: 18px 8px minmax(0, 1fr) 170px 110px 110px; }
.upcp-inbox:not(:has(.upcp-inbox-status:not(:empty))) .upcp-inbox-row { grid-template-columns: 18px 8px minmax(0, 1fr) 170px 0 110px; column-gap: 12px; }
.upcp-portal .upcp-inbox h3.upcp-inbox-head, .upcp-inbox-group > summary { color: #a1a1aa !important; font-size: 12.5px !important; font-weight: 500 !important; }
@media (max-width: 760px) {
	.upcp-inbox .upcp-inbox-row, .upcp-inbox:not(:has(.upcp-inbox-status:not(:empty))) .upcp-inbox-row { grid-template-columns: 8px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; padding: 10px 4px; }
	.upcp-inbox-row .upcp-inbox-check, .upcp-inbox-row .upcp-inbox-status { display: none; }
	.upcp-inbox-row .upcp-inbox-dot { grid-column: 1; grid-row: 1; }
	.upcp-inbox-row .upcp-inbox-title { grid-column: 2; grid-row: 1; }
	.upcp-inbox-row .upcp-when { grid-column: 3; grid-row: 1; }
	.upcp-inbox-row .upcp-inbox-who { grid-column: 2; grid-row: 2; font-size: 13px; }
	.upcp-views { gap: 12px; }
}

/* ===== Warm inbox (0.7.1): greeting, brand pills, cards with faces and what was said ===== */
.upcp-greet-sub { margin: 4px 0 0; font-size: 15px; color: #71717a; }

/* View switch as brand pills */
.upcp-views { border-bottom: 0; padding-bottom: 0; margin: 6px 0 22px; gap: 14px; }
.upcp-views-nav { gap: 6px; }
.upcp-views-nav a { padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: #52525b !important; }
.upcp-views-nav a:hover { background: #f4f0f8; }
.upcp-views-nav a.is-active { background: var(--upcp-brand, #6b1b9a); color: #fff !important; font-weight: 500; }
.upcp-views-nav a.is-active::after, .upcp-views-bill.is-active::after { display: none; }
.upcp-views-nav a.is-active .upcp-views-n { color: rgba(255,255,255,.75); }
.upcp-views-nav a[href*="view=waiting"]:not(.is-active) { background: var(--upcp-lav, #efe3f9); color: #4a1270 !important; }
.upcp-views-bill { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; }
.upcp-views-bill:hover { background: #f4f0f8; }
.upcp-views-bill.is-active { background: var(--upcp-brand, #6b1b9a); color: #fff !important; }
.upcp-views-bill.is-active span { color: #fde68a; }

/* Groups: every section is a plain label over full-width cards (0.8.2: no panel around "Needs your reply") */
.upcp-inbox { gap: 26px; }
.upcp-inbox-group { display: flex; flex-direction: column; gap: 8px; }
.upcp-portal .upcp-inbox h3.upcp-inbox-head { margin: 0 0 2px !important; padding: 0 4px; }
.upcp-portal .upcp-inbox-group:has(.upcp-inbox-row.is-needs) h3.upcp-inbox-head { color: var(--upcp-brand, #6b1b9a) !important; font-weight: 600 !important; }
.upcp-portal .upcp-inbox-group:not(:has(.upcp-inbox-row.is-needs)) h3.upcp-inbox-head { color: var(--upcp-navy, #26438b) !important; font-weight: 600 !important; }

/* Cards */
.upcp-inbox .upcp-inbox-row, .upcp-inbox:not(:has(.upcp-inbox-status:not(:empty))) .upcp-inbox-row {
	display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid #ececf1; border-radius: 14px;
	box-shadow: 0 1px 2px rgba(38, 67, 139, .04); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.upcp-inbox .upcp-inbox-row:hover { background: #fff; border-color: color-mix(in srgb, var(--upcp-navy, #26438b) 30%, #ececf1); box-shadow: 0 6px 18px -10px rgba(38, 67, 139, .35); }
/* Needs your reply: purple bar down the left edge and a slightly stronger border */
.upcp-inbox .upcp-inbox-row.is-needs.is-needs { border-color: color-mix(in srgb, var(--upcp-brand, #6b1b9a) 22%, #ececf1); box-shadow: inset 4px 0 0 var(--upcp-brand, #6b1b9a), 0 1px 3px rgba(107, 27, 154, .08); }
.upcp-inbox .upcp-inbox-row.is-needs.is-needs:hover { box-shadow: inset 4px 0 0 var(--upcp-brand, #6b1b9a), 0 6px 18px -10px rgba(107, 27, 154, .35); }
/* Age tab (0.8.4): rounded tab on the top edge of a needs-reply card; replaces "Sent …" there */
.upcp-inbox .upcp-inbox-row.is-needs { position: relative; margin-top: 18px; }
.upcp-age-tab { position: absolute; top: 0; left: 14px; transform: translateY(-55%); padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.35; white-space: nowrap; box-shadow: 0 0 0 3px #fff; cursor: default; }
.upcp-age-tab.is-fresh { background: var(--upcp-lav, #efe3f9); color: var(--upcp-brand, #6b1b9a); }
.upcp-age-tab.is-aging { background: #fef3c7; color: #92400e; }
.upcp-age-tab.is-late { background: #fee2e2; color: #b91c1c; }
.upcp-inbox-row:is(.is-needs, .is-work, .is-wait) .upcp-sent-at { display: none; }
.upcp-age-tab.is-gray { background: #f1f1f4; color: #52525b; }
/* Waiting on client (0.8.8): no bar, just the gray/amber tab */
.upcp-inbox .upcp-inbox-row.is-wait { position: relative; margin-top: 18px; }
.upcp-age-tab.is-blue { background: #e3e9f6; color: var(--upcp-navy, #26438b); }

/* In progress cards (0.8.7): blue bar, work tab, the original request as a blue quote */
.upcp-inbox .upcp-inbox-row.is-work { position: relative; margin-top: 18px; }
.upcp-inbox .upcp-inbox-row.is-work.is-work { border-color: color-mix(in srgb, var(--upcp-navy, #26438b) 20%, #ececf1); box-shadow: inset 4px 0 0 var(--upcp-navy, #26438b), 0 1px 3px rgba(38, 67, 139, .07); }
.upcp-inbox .upcp-inbox-row.is-work.is-work:hover { box-shadow: inset 4px 0 0 var(--upcp-navy, #26438b), 0 6px 18px -10px rgba(38, 67, 139, .35); }
.upcp-inbox .upcp-avatar.is-work { background: var(--upcp-navy, #26438b); color: #fff; }
.upcp-inbox-bubble.is-work { border-left-color: color-mix(in srgb, var(--upcp-navy, #26438b) 45%, #fff); }
.upcp-inbox .upcp-inbox-check { align-self: center; margin: 0 -4px 0 -6px; }
.upcp-inbox .upcp-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; background: #e3e9f6; color: var(--upcp-navy, #26438b); }
.upcp-inbox .upcp-avatar.is-needs { background: var(--upcp-brand, #6b1b9a); color: #fff; }
.upcp-inbox-body { flex: 1; min-width: 0; }
.upcp-inbox-line { display: flex; align-items: center; gap: 10px; }
.upcp-inbox-line .upcp-inbox-title { flex: 1; }
/* 0.8.3: blue = information (titles, labels, hover); purple = act on this (buttons, status, needs-reply bar) */
.upcp-inbox-title a { font-size: 15.5px; font-weight: 600; color: var(--upcp-navy, #26438b) !important; }
.upcp-inbox-row.is-needs .upcp-inbox-title a { font-weight: 650; color: var(--upcp-navy, #26438b) !important; }
.upcp-inbox .upcp-inbox-who { margin-top: 2px; font-size: 13.5px; color: #71717a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcp-inbox-snip { color: #a1a1aa; }
.upcp-inbox-bubble { display: block; max-width: 100%; margin-top: 10px; padding: 2px 0 2px 12px; border-left: 2px solid color-mix(in srgb, var(--upcp-brand, #6b1b9a) 45%, #fff); color: #3f3f46; font-size: 14.5px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcp-inbox-tag { flex: none; font-size: 11.5px; font-weight: 600; color: #92400e; background: #fef3c7; border-radius: 999px; padding: 1px 8px; }
.upcp-inbox-status { font-size: 12.5px; color: #a1a1aa; }
.upcp-when { font-size: 12.5px; }
.upcp-when.is-rush, .upcp-when.is-urgent { padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.upcp-when.is-rush { background: #fff7ed; color: #c2410c; }
.upcp-when.is-urgent { background: #fef2f2; color: #dc2626; }

/* Waiting on client: folded, and quieter when open */
.upcp-inbox-group.is-folded { gap: 8px; }
.upcp-inbox-group.is-folded .upcp-inbox-row { background: transparent; box-shadow: none; }
.upcp-inbox-group.is-folded .upcp-avatar { background: #f1f1f4; color: #a1a1aa; }
.upcp-inbox-group.is-folded .upcp-inbox-title a { color: #71717a !important; font-weight: 500; }

@media (max-width: 760px) {
	.upcp-inbox .upcp-inbox-row { padding: 12px; gap: 10px; }
	.upcp-inbox .upcp-avatar { width: 34px; height: 34px; font-size: 12px; }
	.upcp-inbox-row .upcp-inbox-check { display: none; }
	.upcp-inbox-line { flex-wrap: wrap; row-gap: 4px; }
	.upcp-inbox-bubble { white-space: normal; }
	.upcp-greet-sub { font-size: 14px; }
}

/* Sort menu beside search */
.upcp-views .upcp-sort { margin: 0; }
.upcp-views .upcp-search { margin-left: auto; }
.upcp-sort select { width: auto !important; margin: 0; padding: 6px 30px 6px 12px; font-size: 13.5px; color: #3f3f46; border: 1px solid #e4e4e7; border-radius: 8px; background-color: #fff; cursor: pointer; }
.upcp-sort select:focus { outline: 3px solid color-mix(in srgb, var(--upcp-brand, #6b1b9a) 22%, transparent); border-color: var(--upcp-brand, #6b1b9a); }
@media (max-width: 760px) { .upcp-views .upcp-sort, .upcp-sort select { width: 100% !important; } }

/* Card details on the right: type · website, then Sent … and billing */
.upcp-inbox-line .upcp-inbox-meta { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: #a1a1aa; }
.upcp-inbox-sub { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.upcp-inbox .upcp-inbox-sub .upcp-inbox-who { flex: 1; min-width: 0; margin: 0; }
.upcp-inbox-sub .upcp-inbox-meta { flex: none; display: inline-flex; align-items: center; gap: 12px; font-size: 12.5px; color: #a1a1aa; white-space: nowrap; }
.upcp-inbox-sub .upcp-bill-cell { gap: 5px; }
.upcp-inbox-sub .upcp-bill-ico { width: 15px; height: 15px; }
.upcp-inbox-sub .upcp-bill-val { font-size: 12.5px; font-weight: 600; color: #52525b; }
.upcp-inbox-sub .upcp-bill-none .upcp-bill-val { font-weight: 500; color: #a1a1aa; }
.upcp-inbox-group.is-folded .upcp-inbox-sub .upcp-bill-val { color: #a1a1aa; }
@media (max-width: 760px) {
	.upcp-inbox-line .upcp-inbox-meta { display: none; }
	.upcp-inbox-sub { flex-wrap: wrap; row-gap: 2px; }
	.upcp-inbox-sub .upcp-inbox-meta { width: 100%; }
}

/* Emoji button + row under message boxes (like the Client Review markup tool) */
.upcp-emo { margin: 6px 0 2px; }
.upcp-emo .upcp-emo-btn { all: unset; box-sizing: border-box; display: inline-block; border: 1px dashed #a1a1aa; border-radius: 8px; padding: 3px 9px; background: #fff; font-size: 16px; line-height: 1.3; cursor: pointer; }
.upcp-emo .upcp-emo-btn:hover, .upcp-emo .upcp-emo-btn[aria-expanded="true"] { border-style: solid; border-color: var(--upcp-brand, #6b1b9a); }
.upcp-emo .upcp-emo-btn:focus-visible { outline: 2px solid var(--upcp-brand, #6b1b9a); outline-offset: 2px; }
.upcp-emo-row { display: grid; grid-template-columns: repeat(7, 40px); gap: 2px; width: max-content; max-width: 100%; margin-top: 6px; padding: 5px; border-radius: 10px; background: #f4f4f5; }
.upcp-emo-row[hidden] { display: none; }
.upcp-emo-row button { all: unset; box-sizing: border-box; text-align: center; font-size: 20px; line-height: 1; padding: 5px; border-radius: 7px; cursor: pointer; }
.upcp-emo-row button:hover, .upcp-emo-row button:focus-visible { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* Sidebar: name opens all their tickets; Ticket info card */
.upcp-portal a.upcp-side-name { display: block; font-weight: 600; color: var(--upcp-navy, #26438b) !important; text-decoration: none !important; }
.upcp-portal a.upcp-side-name:hover { color: var(--upcp-brand, #6b1b9a) !important; text-decoration: underline !important; }
.upcp-side-info { margin-top: 14px; padding: 0; overflow: hidden; }
.upcp-side-info > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #71717a; }
.upcp-side-info > summary::-webkit-details-marker { display: none; }
.upcp-side-info > summary::after { content: "›"; font-size: 16px; transition: transform .15s; }
.upcp-side-info[open] > summary::after { transform: rotate(90deg); }
.upcp-side-info dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; padding: 0 16px 14px; font-size: 13.5px; }
.upcp-side-info dt { color: #a1a1aa; }
.upcp-side-info dd { margin: 0; color: #3f3f46; text-align: right; overflow-wrap: anywhere; }
.upcp-side-info dd a { color: var(--upcp-navy, #26438b) !important; }
.upcp-side-info > p { margin: 0; padding: 0 16px 14px; }
.upcp-side-info dd.upcp-age { font-weight: 600; color: #18181b; }

/* Card footer: who replied when · overdue · status menu */
.upcp-inbox-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f2f2f5; }
.upcp-replied { font-size: 13px; color: #71717a; }
.upcp-replied::before { content: ""; display: inline-block; width: 14px; height: 14px; margin: 0 6px -2px 0; background: currentColor; opacity: .7; -webkit-mask: var(--upcp-hist) center / contain no-repeat; mask: var(--upcp-hist) center / contain no-repeat; }
.upcp-replied { --upcp-hist: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8'/%3E%3Cpath d='M3 3v5h5M12 7v5l3 2'/%3E%3C/svg%3E"); }
.upcp-overdue { font-size: 12px; font-weight: 600; color: #dc2626; background: #fef2f2; border: 1px solid #fecaca; border-radius: 999px; padding: 1px 9px; }
.upcp-qs { position: relative; margin-left: auto; }
.upcp-qs > summary { list-style: none; }
.upcp-qs > summary::-webkit-details-marker { display: none; }
.upcp-qs-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid #ddd6fe; background: #f5f0fc; color: #5b1785; user-select: none; }
.upcp-qs-btn::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); opacity: .7; }
.upcp-qs-btn:hover, .upcp-qs[open] .upcp-qs-btn { border-color: var(--upcp-brand, #6b1b9a); }
.upcp-qs-btn.upcp-qs-in_progress { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.upcp-qs-btn.upcp-qs-waiting { background: #f4f4f5; border-color: #e4e4e7; color: #52525b; }
.upcp-qs-btn.upcp-qs-closed { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.upcp-qs-btn.is-saving { opacity: .55; pointer-events: none; }
.upcp-qs-menu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 50; min-width: 180px; padding: 5px; background: #fff; border: 1px solid #ececf1; border-radius: 12px; box-shadow: 0 14px 34px -12px rgba(38, 67, 139, .35); }
.upcp-qs-menu button { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: #27272a; cursor: pointer; }
.upcp-qs-menu button:hover, .upcp-qs-menu button:focus-visible { background: #f5f0fc; }
.upcp-qs-menu button[aria-checked="true"] { font-weight: 600; color: var(--upcp-brand, #6b1b9a); }
.upcp-qs-menu button[aria-checked="true"]::after { content: "✓"; }
.upcp-inbox-row.is-changed { opacity: .5; transition: opacity .3s; }
.upcp-inbox-group.is-folded .upcp-inbox-foot { border-top-color: #ececf1; }
@media (max-width: 600px) {
	.upcp-inbox-foot { flex-wrap: wrap; row-gap: 8px; }
	.upcp-inbox-foot .upcp-replied { flex: 1 0 100%; }
	.upcp-overdue, .upcp-qs-btn { white-space: nowrap; }
}

/* Reply boxes: emoji button + "Attach files" on one line */
.upcp-compose-tools { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; }
.upcp-compose-tools .upcp-drop-compact { flex: 1; min-width: 0; margin-top: 0; }
.upcp-emo.upcp-emo-inline { margin: 0; flex: none; }
.upcp-emo.upcp-emo-inline .upcp-emo-btn { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; padding: 0; border: 1.5px dashed #d4d4d8; border-radius: 12px; font-size: 22px; }
.upcp-compose-tools + .upcp-emo-row { margin-top: 8px; }

/* Request form extras (sites, due date, timeframe) */
.upcp-extras[hidden], .upcp-site-field[hidden], .upcp-due-field[hidden] { display: none !important; }
.upcp-extras { margin: 4px 0 8px; padding: 16px 18px 4px; border-radius: 14px; background: #faf7fd; border: 1px solid #ece3f6; }
.upcp-extras input[type="date"] { max-width: 220px; }
.upcp-timeframe { margin: 4px 0 2px; }
.upcp-extras-admin textarea { font-family: inherit; }
.upcp-due-tag { flex: none; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #eef2ff; color: #3730a3; white-space: nowrap; }
.upcp-due-tag.is-soon { background: #fef2f2; color: #dc2626; }
.upcp-prop-static { display: flex; justify-content: space-between; gap: 12px; padding: 8px 21px 8px 8px; font-size: 14px; }
.upcp-prop-static .upcp-prop-value { white-space: normal; }
.upcp-prop-static .upcp-prop-value { text-align: right; }
/* Site choices are multi-select: square boxes with a check, not radio dots */
.upcp-form .upcp-site-choices label.upcp-chip input { border-radius: 5px; }
.upcp-form .upcp-site-choices label.upcp-chip input::before { width: 10px; height: 10px; border-radius: 0; background: var(--upcp-accent); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
.upcp-form .upcp-site-choices label.upcp-chip input:checked { background: var(--upcp-accent); }
.upcp-form .upcp-site-choices label.upcp-chip input:checked::before { background: #fff; }
/* Site choices in even columns (3 on wide screens, 2 on tablets, 1 on phones) */
.upcp-form .upcp-choices.upcp-site-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.upcp-form .upcp-site-choices label.upcp-chip { width: auto; margin: 0; justify-content: flex-start; border-radius: 10px; }
/* As many columns as fit with the longest names on one line ("Givens Aldersgate at Home"): 3 on computers, 2 on tablets, 1 on phones. */
.upcp-form .upcp-choices.upcp-site-choices { grid-template-columns: repeat(auto-fill, minmax(min(100%, 236px), 1fr)); gap: 7px; }
.upcp-form .upcp-site-choices label.upcp-chip { padding: 9px 12px 9px 10px; }
.upcp-extras { padding: 16px 14px 4px; }
.upcp-extras > .upcp-field:first-child, .upcp-extras > fieldset:first-child { margin-top: 0; }

/* Request form opened from a "Finish your request" email */
.upcp-draft-note { margin: 0 0 16px; padding: 14px 18px; border-radius: 14px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; font-size: 15px; line-height: 1.5; }
.upcp-draft-files { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; font-size: 13.5px; color: #52525b; }
.upcp-draft-files-h { margin-right: 4px; }
.upcp-draft-file { padding: 3px 10px; border-radius: 999px; background: var(--upcp-lav, #efe3f9); color: var(--upcp-brand, #6b1b9a); font-weight: 600; }
.upcp-form input[readonly] { background: #f4f4f5; color: #52525b; }

/* "Close without replying" page (from a ticket email) */
.upcp-close-page { max-width: 520px; margin: 40px auto; text-align: center; padding: 32px 28px; }
.upcp-close-page h2 { margin: 0 0 6px; }
.upcp-close-title { font-weight: 600; color: var(--upcp-navy, #26438b); margin: 0 0 14px; }
.upcp-close-page form { margin-top: 18px; }
.upcp-close-done { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 700; color: #15803d; background: #dcfce7; }

/* Feedback survey page and rating badges */
.upcp-faces { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.upcp-form label.upcp-face { display: flex !important; flex-direction: column; align-items: center; gap: 2px; width: 76px; padding: 10px 4px 8px; border-radius: 14px; border: 1.5px solid transparent; cursor: pointer; font-weight: 500 !important; margin: 0 !important; }
.upcp-face input { position: absolute; opacity: 0; pointer-events: none; }
.upcp-face-emoji { font-size: 34px; line-height: 1.1; filter: grayscale(.85); opacity: .65; transition: transform .12s, filter .12s, opacity .12s; }
.upcp-face-label { font-size: 12px; color: #71717a; }
.upcp-face:hover .upcp-face-emoji { filter: none; opacity: 1; transform: scale(1.12); }
.upcp-form label.upcp-face:has(input:checked) { border-color: var(--upcp-brand, #6b1b9a); background: var(--upcp-lav, #efe3f9); }
.upcp-face:has(input:checked) .upcp-face-emoji { filter: none; opacity: 1; transform: scale(1.12); }
.upcp-face:has(input:focus-visible) { outline: 2px solid var(--upcp-brand, #6b1b9a); outline-offset: 2px; }
.upcp-survey-saved { color: #15803d; font-weight: 600; margin: 0 0 10px; }
.upcp-survey-page textarea { width: 100%; margin-bottom: 14px; }
.upcp-survey-page .upcp-close-done { background: var(--upcp-lav, #efe3f9); font-size: 32px; }
.upcp-rating-badge { position: relative; font-size: 17px; line-height: 1; }
.upcp-rating-has-comment { position: absolute; right: -9px; top: -7px; font-size: 10px; }
.upcp-rating-badge.is-low { padding: 2px 4px; border-radius: 8px; background: #fef2f2; }
.upcp-side-info .upcp-rating-comment { grid-column: 1 / -1; font-style: italic; color: #52525b; text-align: left; margin-top: -2px; }

/* Desk → Settings */
.upcp-desk-nav a.upcp-desk-nav-end { margin-left: auto; }
.upcp-settings { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.upcp-settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 50px; }
.upcp-settings-nav a { display: block; padding: 10px 14px; border-radius: 12px; text-decoration: none !important; color: var(--upcp-ink, #27272a) !important; }
.upcp-settings-nav a strong { display: block; font-size: 14.5px; font-weight: 600; }
.upcp-settings-nav a span { display: block; font-size: 12.5px; color: #71717a; }
.upcp-settings-nav a:hover { background: #faf7fc; }
.upcp-settings-nav a.is-active { background: var(--upcp-lav, #efe3f9); }
.upcp-settings-nav a.is-active strong { color: var(--upcp-brand, #6b1b9a); }
.upcp-settings-card { padding: 22px 26px 10px !important; }
.upcp-settings-h { margin: 0 0 6px !important; font-size: 20px !important; color: var(--upcp-navy, #26438b); }
.upcp-settings-intro { color: #52525b; font-size: 14px; margin: 0 0 8px; }
.upcp-setting { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 8px 24px; padding: 16px 0; border-top: 1px solid #f0f0f2; }
.upcp-setting:first-of-type { border-top: 0; }
.upcp-setting-label label, .upcp-setting-label > span { display: block; font-weight: 600; font-size: 14px; color: #27272a; margin: 0 !important; }
.upcp-setting-label p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: #71717a; }
.upcp-setting-control input[type="email"], .upcp-setting-control input[type="text"], .upcp-setting-control textarea, .upcp-setting-control select { width: 100%; max-width: 520px; }
.upcp-setting-control textarea { font-size: 14px; }
.upcp-setting-control .upcp-choices { max-width: 560px; }
.upcp-affix { display: inline-flex; align-items: center; border: 1px solid #d4d4d8; border-radius: 10px; overflow: hidden; background: #fff; }
.upcp-affix input { border: 0 !important; width: 110px !important; box-shadow: none !important; border-radius: 0 !important; margin: 0 !important; }
.upcp-affix span { padding: 0 12px; color: #71717a; background: #fafafa; align-self: stretch; display: flex; align-items: center; font-size: 13.5px; }
.upcp-copy { display: flex; gap: 8px; max-width: 620px; }
.upcp-copy input { flex: 1; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px !important; color: #52525b; background: #fafafa; }
.upcp-color { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upcp-color input[type="color"] { width: 52px; height: 38px; padding: 3px; border-radius: 10px; border: 1px solid #d4d4d8; background: #fff; cursor: pointer; }
.upcp-setting-warn { color: #b91c1c; font-size: 13px; margin: 6px 0 0; }
.upcp-settings-save { position: sticky; bottom: 0; margin: 4px -26px 0; padding: 12px 26px; background: rgba(255,255,255,.94); border-top: 1px solid #f0f0f2; display: flex; justify-content: flex-end; border-radius: 0 0 16px 16px; }
.upcp-mini-log { list-style: none; margin: 0; padding: 0; max-width: 620px; }
.upcp-mini-log li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid #f4f4f5; font-size: 13px; color: #52525b; }
.upcp-mini-log li:first-child { border-top: 0; }
.upcp-mini-log-when { color: #a1a1aa; white-space: nowrap; }
.upcp-muted { color: #71717a; margin: 0; }
.upcp-rating-sum { max-width: 360px; margin-bottom: 10px; }
.upcp-rating-avg { font-size: 22px; margin-bottom: 6px; }
.upcp-rating-avg span { font-size: 13px; color: #71717a; margin-left: 6px; }
.upcp-rating-bar { display: grid; grid-template-columns: 26px 1fr 28px; align-items: center; gap: 8px; font-size: 15px; }
.upcp-rating-bar i { height: 8px; border-radius: 99px; background: #f4f4f5; position: relative; overflow: hidden; }
.upcp-rating-bar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--upcp-brand, #6b1b9a); border-radius: 99px; }
.upcp-rating-bar em { font-style: normal; font-size: 12.5px; color: #71717a; text-align: right; }
@media (max-width: 820px) {
	.upcp-settings { grid-template-columns: 1fr; }
	.upcp-settings-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
	.upcp-settings-nav a { flex: none; padding: 8px 12px; border: 1px solid #ececf1; }
	.upcp-settings-nav a span { display: none; }
	.upcp-setting { grid-template-columns: 1fr; }
	.upcp-settings-card { padding: 18px 16px 8px !important; }
	.upcp-settings-save { margin: 4px -16px 0; padding: 12px 16px; }
}

/* ---------- Approval (approval.php) ---------- */
.upcp-pill.upcp-st-approval, .upcp-qs-btn.upcp-qs-approval { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.upcp-approval-tag { flex: none; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; white-space: nowrap; }
.upcp-approval-box.is-waiting { border-color: #fed7aa; background: #fffbf5; }
.upcp-approval-box h3 { margin: 0 0 2px; font-size: 15px; }
.upcp-approval-box.is-waiting h3 { color: #c2410c; }
.upcp-approval-log { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; }
.upcp-approval-log li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; padding: 6px 0; border-top: 1px solid var(--upcp-line, #e4e4e7); }
.upcp-approval-log time { color: #71717a; white-space: nowrap; }
.upcp-approval-log li.is-approved span { color: #15803d; font-weight: 600; }
.upcp-approval-log li.is-declined span { color: #b91c1c; font-weight: 600; }
.upcp-approval-log q { flex-basis: 100%; color: #52525b; font-style: italic; }
.upcp-approval-team { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.upcp-approval-admin { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--upcp-line, #e4e4e7); }
.upcp-approval-page { max-width: 620px; margin: 40px auto; padding: 28px; }
.upcp-approval-page h2 { margin: 0 0 14px; }
.upcp-approval-page .upcp-close-done { margin: 0 auto 14px; }
.upcp-approval-kicker { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: #c2410c; text-transform: uppercase; letter-spacing: .04em; }
.upcp-approval-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0 0 14px; font-size: 14px; }
.upcp-approval-facts dt { color: #71717a; }
.upcp-approval-facts dd { margin: 0; }
.upcp-approval-msg { padding: 12px 16px; border-radius: 10px; background: var(--upcp-soft, #f4f4f5); font-size: 15px; }
.upcp-approval-msg > :last-child { margin-bottom: 0; }
.upcp-approval-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 18px; margin-top: 22px; }
.upcp-portal button.upcp-btn.upcp-btn-approve { background: #15803d; border-color: #15803d; }
.upcp-portal button.upcp-btn.upcp-btn-decline { background: #b91c1c; border-color: #b91c1c; margin-top: 8px; }
.upcp-approval-yes.is-dim { opacity: .6; }
.upcp-approval-no { flex: 1 1 260px; }
.upcp-approval-no summary { cursor: pointer; padding: 10px 0; color: #b91c1c; font-weight: 600; }
.upcp-approval-no label { display: block; font-size: 14px; margin: 4px 0; }
.upcp-approval-no textarea { width: 100%; }

/* ---------- Email-link view (view-links.php) ---------- */
.upcp-view-banner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; margin: 0 0 18px; padding: 10px 14px; border-radius: 10px; background: var(--upcp-tint, #f3e8fb); font-size: 14px; }
.upcp-view-banner-links { display: flex; gap: 14px; font-weight: 600; }
.upcp-view-reply { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; }
.upcp-view-reply p { flex-basis: 100%; margin: 0; }
.upcp-side-client .upcp-view-off { display: block; margin-top: 2px; font-size: 12px; color: #71717a; }

/* ---------- 0.x UX pass: shared bits ---------- */
.upcp-portal .upcp-muted { color: var(--upcp-muted); }
.upcp-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.upcp-portal .upcp-btn.upcp-btn-ghost,
.upcp-portal button.upcp-btn.upcp-btn-ghost { background: #fff; color: var(--upcp-accent) !important; border: 1.5px solid var(--upcp-accent); box-shadow: none; }
.upcp-portal .upcp-btn.upcp-btn-ghost:hover,
.upcp-portal button.upcp-btn.upcp-btn-ghost:hover { background: var(--upcp-tint); filter: none; }
.upcp-portal .upcp-btn-block,
.upcp-portal button.upcp-btn-block { display: block; width: 100%; text-align: center; box-sizing: border-box; }

/* Request form: name labels above the boxes; the priority tip under the choices. */
.upcp-portal .upcp-form .upcp-sublabel { font-size: .85em; font-weight: 600; color: var(--upcp-muted); margin: 0 0 4px; }
.upcp-pri-tip { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--upcp-tint); color: #3f3f46; font-size: .9em; line-height: 1.5; }
.upcp-pri-tip strong { color: var(--upcp-ink); }

/* Client ticket page: one main button; closing is the quiet option beside it. */
.upcp-actions.upcp-actions-split { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.upcp-portal button.upcp-btn-quiet { all: unset; box-sizing: border-box; cursor: pointer; color: var(--upcp-muted); font-size: .92em; font-weight: 500; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; }
.upcp-portal button.upcp-btn-quiet:hover { color: var(--upcp-ink); }
.upcp-portal button.upcp-btn-quiet:focus-visible { outline: 2px solid var(--upcp-accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Sign in / password pages ---------- */
.upcp-auth { max-width: 420px; margin: 8px auto 20px; padding: 32px 28px; border-radius: 18px; box-shadow: 0 10px 30px rgba(38, 67, 139, .08); }
.upcp-auth h2 { color: var(--upcp-ink); text-align: center; }
.upcp-auth-sub { text-align: center; color: var(--upcp-muted); margin: 6px 0 22px; }
.upcp-portal .upcp-auth-form label { display: block; font-weight: 600; margin: 14px 0 6px; color: var(--upcp-ink); }
.upcp-portal .upcp-auth-form input[type="email"],
.upcp-portal .upcp-auth-form input[type="password"],
.upcp-portal .upcp-auth-form input[type="text"] { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid #d4d4d8; border-radius: 10px; font-size: 16px; background: #fff; }
.upcp-portal .upcp-auth-form input:focus { outline: none; border-color: var(--upcp-accent); box-shadow: 0 0 0 3px var(--upcp-tint); }
.upcp-auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.upcp-auth-label-row a { font-size: .88em; color: var(--upcp-accent); }
.upcp-pass-wrap { position: relative; }
.upcp-pass-wrap input { padding-right: 64px !important; }
.upcp-portal button.upcp-pass-toggle { all: unset; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: .85em; font-weight: 600; color: var(--upcp-accent); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.upcp-portal button.upcp-pass-toggle:focus-visible { outline: 2px solid var(--upcp-accent); }
.upcp-portal .upcp-auth-form .upcp-check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: #3f3f46; margin: 14px 0 18px; }
.upcp-auth-form .upcp-check input { width: 18px; height: 18px; accent-color: var(--upcp-accent); margin: 0; }
.upcp-auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--upcp-muted); font-size: .85em; }
.upcp-auth-or::before, .upcp-auth-or::after { content: ""; flex: 1; height: 1px; background: var(--upcp-border); }
.upcp-auth-hint { display: block; text-align: center; color: var(--upcp-muted); font-size: .85em; margin: 8px 0 0; }
.upcp-auth-form small.upcp-auth-hint { text-align: left; }
.upcp-auth-foot { text-align: center; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--upcp-border); color: var(--upcp-muted); font-size: .92em; }
.upcp-auth-foot a { color: var(--upcp-accent); font-weight: 600; }
.upcp-auth-notice { max-width: 420px; margin: 0 auto 14px; box-sizing: border-box; }
.upcp-auth-center form { margin-top: 8px; }

/* ---------- Team reply box: Reply / Private note tabs, saved replies ---------- */
.upcp-compose-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.upcp-compose-tabs { display: inline-flex; background: #f4f4f5; border-radius: 10px; padding: 3px; gap: 2px; }
.upcp-portal .upcp-compose-tabs button { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--upcp-muted); }
.upcp-portal .upcp-compose-tabs button[aria-selected="true"] { background: #fff; color: var(--upcp-ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.upcp-portal .upcp-compose-tabs button[data-mode="note"][aria-selected="true"] { color: #8a5a00; }
.upcp-portal .upcp-compose-tabs button:focus-visible { outline: 2px solid var(--upcp-accent); }
.upcp-reply.is-note textarea { background: #fffbea; border-color: #f0d68a; }
.upcp-reply.is-note .upcp-send-btn { background: #b7791f !important; }

.upcp-sr { position: relative; }
.upcp-portal button.upcp-sr-open { all: unset; cursor: pointer; padding: 6px 12px; border: 1px solid var(--upcp-border); border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--upcp-ink); background: #fff; }
.upcp-portal button.upcp-sr-open:hover, .upcp-portal button.upcp-sr-open[aria-expanded="true"] { border-color: var(--upcp-accent); }
.upcp-portal button.upcp-sr-open:focus-visible { outline: 2px solid var(--upcp-accent); outline-offset: 2px; }
.upcp-sr-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: 360px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--upcp-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 8px; }
.upcp-sr-pop[hidden] { display: none; }
.upcp-portal .upcp-sr-pop input.upcp-sr-search { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--upcp-border); border-radius: 8px; font-size: 14px; margin: 0 0 6px; }
.upcp-sr-items { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; }
.upcp-portal .upcp-sr-items button { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; padding: 8px 10px; border-radius: 8px; }
.upcp-portal .upcp-sr-items button:hover, .upcp-portal .upcp-sr-items button:focus { background: var(--upcp-tint); outline: none; }
.upcp-sr-items strong { display: block; font-size: 14px; color: var(--upcp-ink); }
.upcp-sr-items span { display: block; font-size: 12.5px; color: var(--upcp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcp-sr-none { padding: 10px; font-size: 13px; color: var(--upcp-muted); }
.upcp-sr-foot { border-top: 1px solid var(--upcp-border); margin-top: 6px; padding: 8px 10px 2px; font-size: 13px; }
.upcp-sr-foot:empty { display: none; }
.upcp-sr-foot a { color: var(--upcp-accent); }
.upcp-portal .upcp-reply .upcp-sr-save { display: inline-block; margin: 6px 0 4px; font-size: 13px; }
.upcp-reply.is-note .upcp-sr-save { display: none; }
.upcp-reply select.upcp-flash { box-shadow: 0 0 0 3px var(--upcp-tint); border-color: var(--upcp-accent); transition: box-shadow .2s; }

/* Private notes in the thread. */
.upcp-msg-note .upcp-bubble { background: #fffbea !important; border: 1px dashed #e0b84a; color: #3f3f46; }
.upcp-badge.upcp-badge-note { background: #b7791f; }

/* Settings → Saved replies. */
.upcp-sr-list { display: grid; gap: 14px; margin: 0 0 14px; }
.upcp-sr-row { border: 1px solid var(--upcp-border); border-radius: 12px; padding: 12px; background: #fff; }
.upcp-sr-row.is-removed { opacity: .45; }
.upcp-sr-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }
.upcp-portal .upcp-sr-top input[type="text"] { flex: 1 1 220px; font-weight: 600; }
.upcp-portal .upcp-sr-top label { margin: 0; font-weight: 400; font-size: 13px; color: var(--upcp-muted); display: inline-flex; align-items: center; gap: 6px; }
.upcp-portal .upcp-sr-row textarea { width: 100%; box-sizing: border-box; font-size: 14px; }
.upcp-settings-intro code { font-size: 12px; }

/* Footer line under every portal page */
.upcp-portal-footer { margin: 28px 0 0; text-align: center; font-size: 12.5px; color: var(--upcp-muted, #71717a); }
.upcp-portal-footer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.upcp-portal-footer a:hover { color: var(--upcp-accent); }

/* Header menu: "New Request" is the main button, "Client Login" an outlined one (desktop menu only). */
body.upcp-page .site-header .site-navigation ul.menu { align-items: center; gap: 10px; }
body.upcp-page .site-header .site-navigation .upcp-menu-new > a,
body.upcp-page .site-header .site-navigation .upcp-menu-login > a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 999px; font-weight: 700; line-height: 1.2; transition: background .15s, color .15s, box-shadow .15s, transform .15s; }
body.upcp-page .site-header .site-navigation .upcp-menu-new > a { background: var(--upcp-brand, #6b1b9a); color: #fff; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--upcp-brand, #6b1b9a) 70%, transparent); }
body.upcp-page .site-header .site-navigation .upcp-menu-new > a::before { content: "+"; font-size: 1.15em; line-height: 1; margin-top: -1px; }
body.upcp-page .site-header .site-navigation .upcp-menu-new > a:hover { background: color-mix(in srgb, var(--upcp-brand, #6b1b9a) 85%, #000); color: #fff; transform: translateY(-1px); }
body.upcp-page .site-header .site-navigation .upcp-menu-login > a { background: #fff; color: var(--upcp-brand, #6b1b9a); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--upcp-brand, #6b1b9a) 45%, transparent); }
body.upcp-page .site-header .site-navigation .upcp-menu-login > a:hover { background: color-mix(in srgb, var(--upcp-brand, #6b1b9a) 8%, #fff); color: var(--upcp-brand, #6b1b9a); box-shadow: inset 0 0 0 1.5px var(--upcp-brand, #6b1b9a); }

/* Givens-style site choices: "Other" box and its text field */
.upcp-form .upcp-site-choices label.upcp-chip-other .upcp-choice-text { font-style: italic; }
.upcp-site-other { margin: 12px 0 4px; }
.upcp-site-other[hidden] { display: none; }
.upcp-site-other input { max-width: 520px; }

/* "Request sent" page */
.upcp-sent { max-width: 600px; margin: 8px auto 0; padding: 44px 40px 36px; text-align: center; }
.upcp-sent-icon { width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--upcp-brand, #6b1b9a); box-shadow: 0 0 0 10px var(--upcp-lav, #efe3f9), 0 14px 30px -12px var(--upcp-brand, #6b1b9a); animation: upcp-pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes upcp-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .upcp-sent-icon { animation: none; } }
.upcp-portal .upcp-sent h2 { font-size: 28px; font-weight: 800; margin: 0 0 6px !important; color: var(--upcp-navy, #26438b); }
.upcp-sent-num { display: inline-block; margin: 2px 0 0; padding: 4px 12px; border-radius: 999px; background: var(--upcp-lav, #efe3f9); color: var(--upcp-brand, #6b1b9a); font-weight: 700; font-size: 14px; }
.upcp-sent-steps { list-style: none; margin: 28px 0 30px; padding: 0; text-align: left; display: grid; gap: 14px; }
.upcp-sent-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--upcp-border, #e4e4e7); border-radius: 14px; background: #fff; }
.upcp-sent-step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--upcp-lav, #efe3f9); color: var(--upcp-brand, #6b1b9a); font-weight: 800; font-size: 14px; }
.upcp-sent-steps strong { display: block; color: var(--upcp-ink, #18181b); font-size: 15.5px; margin-bottom: 2px; }
.upcp-sent-steps span { color: var(--upcp-muted, #71717a); font-size: 14.5px; line-height: 1.5; }
.upcp-sent-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 600px) { .upcp-sent { padding: 32px 20px 26px; } .upcp-sent-actions .upcp-btn { flex: 1 1 100%; justify-content: center; } }

/* Email delivery status (delivery.php) */
.upcp-bounce-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: #fee2e2; color: #b91c1c; font-size: 12px; font-weight: 700; white-space: nowrap; }
.upcp-mail-log ul { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 10px; }
.upcp-mail-log li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.4; }
.upcp-mail-dot { flex: none; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: #a1a1aa; }
.upcp-mail-log li.is-ok .upcp-mail-dot { background: #16a34a; }
.upcp-mail-log li.is-warn .upcp-mail-dot { background: #f59e0b; }
.upcp-mail-log li.is-bad .upcp-mail-dot { background: #dc2626; }
.upcp-mail-what { min-width: 0; display: flex; flex-wrap: wrap; column-gap: 6px; }
.upcp-mail-what strong { color: var(--upcp-ink, #18181b); }
.upcp-mail-log li.is-bad strong { color: #b91c1c; }
.upcp-mail-when { color: var(--upcp-muted, #71717a); }
.upcp-mail-subj, .upcp-mail-to, .upcp-mail-detail { flex-basis: 100%; color: var(--upcp-muted, #71717a); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcp-mail-subj { color: #3f3f46; }
.upcp-mail-detail { white-space: normal; color: #b91c1c; }
.upcp-mail-bounce { margin: 8px 0 4px; padding: 10px 12px; border-radius: 10px; background: #fef2f2; color: #7f1d1d; font-size: 13px; line-height: 1.45; }
.upcp-mail-bounce strong { display: block; color: #b91c1c; }

/* Desk cards: "Status: Open ▾" (quiet) + a clear Reply / View Ticket button */
.upcp-qs-pre { font-weight: 500; opacity: .7; }
.upcp-qs-btn { gap: 4px; }
.upcp-qs-btn::after { margin-left: 4px; }
.upcp-inbox-foot .upcp-qs { margin-left: auto; }
.upcp-inbox-foot .upcp-card-go { margin-left: 8px; padding: 6px 12px; font-size: 13.5px; min-width: 112px; justify-content: center; text-align: center; box-sizing: border-box; }
@media (max-width: 760px) { .upcp-inbox-foot .upcp-card-go { min-width: 0; margin-left: 0; } }

/* Headings in Poppins (0.8.6): matches the logo; text, forms and buttons stay in the system font.
   Self-hosted, Latin only, 600 + 700 (~8 KB each). License: assets/fonts/OFL.txt */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/poppins-700.woff2") format("woff2"); }
.upcp-portal :is(h1, h2, h3, h4, legend, .upcp-form-section, .upcp-inbox-title a) {
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	letter-spacing: 0;
}

/* 0.8.9: "Waiting on client" label as readable as the other section labels; the count in a small pill */
.upcp-portal .upcp-inbox .upcp-inbox-group > summary { color: #3f3f46 !important; font-size: 13px !important; font-weight: 600 !important; font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 5px 10px 5px 6px; margin-left: -2px; }
.upcp-portal .upcp-inbox .upcp-inbox-group > summary::before { font-size: 17px; color: #71717a; }
.upcp-portal .upcp-inbox .upcp-inbox-group > summary:hover { background: #f1f1f4; color: #18181b !important; }
.upcp-inbox-group > summary .upcp-sum-count { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 12px; font-weight: 600; color: #52525b; background: #f1f1f4; border-radius: 999px; padding: 1px 8px; }
.upcp-inbox-group > summary:hover .upcp-sum-count { background: #e4e4e7; }
.upcp-inbox-group[open] > summary { margin-bottom: 4px; }

/* Dropbox archive (0.9.0) */
.upcp-dbx { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f3; }
.upcp-dbx form { margin: 0; }
.upcp-dbx-note { flex: 1 1 260px; margin: 0; font-size: 13px; color: #71717a; }
.upcp-dbx-tag { display: inline-block; padding: 0 7px; border-radius: 999px; background: #e3e9f6; color: var(--upcp-navy, #26438b); font-size: 11.5px; font-weight: 600; line-height: 1.6; vertical-align: 1px; }
.upcp-dbx-ok { margin: 0 0 8px; font-weight: 600; color: var(--upcp-navy, #26438b); }
.upcp-dbx-steps { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.55; color: #3f3f46; }
.upcp-dbx-steps li { margin-bottom: 6px; }

/* Fix files after sending (0.9.1): rename / remove / add */
.upcp-fedit { display: flex; align-items: stretch; }
.upcp-fedit form { display: flex; margin: 0; }
.upcp-portal .upcp-fedit-btn { display: flex; align-items: center; justify-content: center; width: 34px; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; color: #71717a; cursor: pointer; box-shadow: none; }
.upcp-portal .upcp-fedit-btn:hover { background: #f4f4f5; color: #27272a; }
.upcp-portal .upcp-fedit-btn.is-remove:hover { background: #fef2f2; color: #b91c1c; }
.upcp-filesum-list li.upcp-frename { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--upcp-brand, #6b1b9a) 30%, #ececef); background: #faf7fc; overflow: visible; }
.upcp-frename form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; width: 100%; margin: 0; padding: 8px 10px; }
.upcp-frename label { font-size: 13px; font-weight: 600; color: #52525b; }
.upcp-fedit-name, .upcp-drop-rename { flex: 1 1 220px; display: flex; align-items: center; min-width: 0; border: 1px solid #d4d4d8; border-radius: 8px; background: #fff; overflow: hidden; }
.upcp-fedit-name:focus-within, .upcp-drop-rename:focus-within { border-color: var(--upcp-brand, #6b1b9a); outline: 3px solid color-mix(in srgb, var(--upcp-brand, #6b1b9a) 20%, transparent); }
.upcp-portal .upcp-fedit-name input, .upcp-portal .upcp-drop-rename input { flex: 1; min-width: 0; margin: 0 !important; padding: 6px 4px 6px 10px !important; border: 0 !important; outline: 0; box-shadow: none !important; font-size: 14px !important; background: transparent; }
.upcp-fedit-ext, .upcp-drop-ext { flex: none; padding: 0 10px 0 2px; color: #71717a; font-size: 14px; }
.upcp-addfiles { margin-top: 12px; }
.upcp-addfiles > summary { list-style: none; cursor: pointer; display: inline-flex; gap: 6px; }
.upcp-addfiles > summary::-webkit-details-marker { display: none; }
.upcp-addfiles[open] > summary { display: none; }
.upcp-addfiles-form { margin: 0; }
.upcp-addfiles-go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.upcp-addfiles-go small { color: #71717a; font-size: 13px; }
.upcp-filesum-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.upcp-filesum-empty .upcp-filesum-head { margin: 0; }
.upcp-filesum-empty .upcp-addfiles { margin: 0; }
.upcp-filesum-empty .upcp-addfiles[open] { flex-basis: 100%; }
/* Rename before sending: the name in the attach list is a button */
.upcp-portal button.upcp-drop-name { padding: 0; margin: 0; border: 0; background: none; text-align: left; font: inherit; font-weight: 600; color: #27272a; cursor: text; box-shadow: none; text-decoration: underline dotted #a1a1aa; text-underline-offset: 3px; }
.upcp-portal button.upcp-drop-name:hover { color: var(--upcp-brand, #6b1b9a); }
.upcp-drop-rename { flex: 1 1 auto; }
.upcp-drop-files li.upcp-drop-tip { padding: 0 4px; border: 0; background: none; font-size: 12.5px; color: #71717a; }
/* Files added / removed: a quiet line in the conversation */
.upcp-msg-event { margin: 4px auto; max-width: 620px; text-align: center; }
.upcp-msg-event > p { margin: 0; font-size: 13px; color: #71717a; }
.upcp-msg-event > p strong { color: #52525b; font-weight: 600; }
.upcp-msg-event .upcp-msg-time { margin-left: 6px; color: #a1a1aa; }
.upcp-msg-event .upcp-files { margin-top: 8px; text-align: left; }
.upcp-msg-event.is-note > p { color: #92400e; }
.upcp-filesum .upcp-file-text strong { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
/* Gentle "give it a clearer name" nudge (clients only) */
.upcp-portal .upcp-name-hint { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; color: #92400e; font: inherit; font-size: 12.5px; font-weight: 600; text-align: left; cursor: pointer; }
.upcp-portal .upcp-name-hint::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }
.upcp-portal .upcp-name-hint:hover { text-decoration: underline; background: none; color: #78350f; }
.upcp-drop-files li.has-hint { flex-wrap: wrap; }
.upcp-drop-files li .upcp-name-hint { flex-basis: 100%; order: 10; padding: 2px 0 2px 2px; }
.upcp-filesum-actions .upcp-name-hint.is-card { margin-right: auto; padding: 0 10px; }
