/* portal/public/css/portal.css */

:root{
	/* Brand palette — Tim's brand system (regio.business/strategy/brand-guidelines) */
	--brand-navy:#0A2540;     /* Deep Navy — reserved for opened deal headers, not the base bg */
	--brand-blue:#1B4F8A;     /* Regio Blue — primary CTA / emphasis */
	--brand-horizon:#3A80D2;  /* Horizon Blue — interactive, hover, focus, links */
	--brand-red:#C8102E;      /* accent only, max 1 per page; never an error color */

	/* Dark mode (portal default) semantic tokens, mapped to the brand palette */
	--bg:#1C2330;             /* Surface Dark */
	--panel:#243040;          /* Deal Card Dark */
	--panel2:rgba(0,0,0,.18); /* card-header darken over --panel */
	--border:#2D3748;         /* Slate */
	--text:#FFFFFF;
	--muted:#94A3B8;          /* secondary text */
	--muted2:#64748B;         /* Steel Gray — meta */
	--accent:rgba(58,128,210,.30);  /* Horizon Blue tint */
	--accent2:#1B4F8A;              /* Regio Blue — primary button fill */
	--shadow:0 10px 30px rgba(10,37,64,.28);

	/* Corner-radius scale (brand) */
	--radius-card:8px;
	--radius-btn:8px;
	--radius-input:6px;
	--radius-badge:4px;
	--radius-modal:12px;

	/* Motion scale (brand 09-motion-animation.md) — smooth, controlled, <600ms */
	--ease-standard:cubic-bezier(.4,0,.2,1);
	--ease-out:cubic-bezier(0,0,.2,1);
	--ease-gauge:cubic-bezier(.25,.46,.45,.94);
	--dur-hover:120ms;
	--dur-ui:200ms;

	/* Floor keeps the content column from shrinking narrower than the top menu
	   on small screens — below this the whole page scrolls horizontally as one
	   unit (menu + content stay aligned) instead of the layout squishing.
	   Tuned per Text Size preset (see html[data-font] below); base = Medium. */
	--portal_w_min: 1120px;
	--portal_w: clamp(var(--portal_w_min), 85vw, 1760px);
	--footer_h: 48px;
	--content_pad_y: 22px;
	--content_pad_x: 18px;
}

*{ box-sizing:border-box; }

/* Keyboard focus ring — brand non-negotiable (09-motion-animation.md) */
:focus-visible{ outline:2px solid var(--brand-horizon); outline-offset:2px; }

/* ============================================================
   Light mode (opt-in via <html data-theme="light">)
   Dark is the default; everything below is additive and only
   applies when the theme toggle is set to light. Palette per
   regio.business .../brand-guidelines/04-portal-color-logic.md.
   Remove this block + the nav toggle markup + the portal.js
   theme IIFE to fully revert the feature.
   ============================================================ */
:root[data-theme="light"]{
	--bg:#F5F6F8;            /* Off White */
	--panel:#FFFFFF;         /* card surfaces */
	--panel2:#F1F5F9;        /* card-header subtle */
	--border:#E2E8F0;        /* Cool Gray */
	--text:#0A2540;          /* Deep Navy */
	--muted:#64748B;         /* Steel Gray */
	--muted2:#94A3B8;
	--accent:rgba(58,128,210,.14);
	--accent2:#1B4F8A;       /* Regio Blue — primary fill unchanged */
	--shadow:0 2px 8px rgba(10,37,64,.08);
}

/* Chrome surfaces that hardcode dark values need explicit light overrides */
:root[data-theme="light"] .p-topbar{ background:rgba(255,255,255,.85); }
:root[data-theme="light"] .p-footer{ background:rgba(255,255,255,.85); }

:root[data-theme="light"] .p-nav a:hover,
:root[data-theme="light"] .p-nav-dd-btn:hover,
:root[data-theme="light"] .p-nav-dd.is-open .p-nav-dd-btn{
	background:rgba(10,37,64,.05);
	border-color:#E2E8F0;
	color:#1B4F8A;                 /* active/hover nav = Regio Blue */
}

:root[data-theme="light"] .p-nav-dd-menu{
	background:#FFFFFF;
	border-color:#E2E8F0;
	box-shadow:0 16px 40px rgba(10,37,64,.18);
}
:root[data-theme="light"] .p-nav-dd-menu .p-font-btn,
:root[data-theme="light"] .p-nav-dd-menu .p-theme-btn{
	background:#F5F6F8;
	border-color:#E2E8F0;
	color:#0A2540;
}
:root[data-theme="light"] .p-nav-dd-menu .p-font-btn:hover,
:root[data-theme="light"] .p-nav-dd-menu .p-theme-btn:hover{
	background:#F1F5F9;
	border-color:#CBD5E1;
}
:root[data-theme="light"] .p-nav-dd-menu .p-font-btn.is-active,
:root[data-theme="light"] .p-nav-dd-menu .p-theme-btn.is-active{
	background:rgba(58,128,210,.16);
	border-color:#3A80D2;
	color:#1B4F8A;
}

:root[data-theme="light"] input,
:root[data-theme="light"] .p-field select,
:root[data-theme="light"] .p-field textarea{
	background:#FFFFFF;
	border-color:#E2E8F0;
}
:root[data-theme="light"] .p-field select option{ background:#FFFFFF; color:#0A2540; }

:root[data-theme="light"] .p-btn{
	background:#FFFFFF;
	border-color:#E2E8F0;
}
:root[data-theme="light"] .p-btn:hover{ background:#F1F5F9; }
/* Re-assert primary AFTER the light .p-btn override above — that override
   (specificity 0,3,0) otherwise beats base .p-btn.primary (0,2,0) and forces
   the primary button white-on-white in light mode. Keep it Regio Blue. */
:root[data-theme="light"] .p-btn.primary{
	background:var(--accent2);            /* Regio Blue */
	border-color:var(--brand-horizon);   /* Horizon Blue */
	color:#fff;
}
:root[data-theme="light"] .p-btn.primary:hover{ background:#2563A8; border-color:#5B9FE8; }
/* Light-mode re-assert for the .p-btn-primary alias (beats the light .p-btn override). */
:root[data-theme="light"] .p-btn-primary{ background:var(--accent2); border-color:var(--brand-horizon); color:#fff; }
:root[data-theme="light"] .p-btn-primary:hover{ background:#2563A8; border-color:#5B9FE8; }

/* Status text: dark uses light tints; light mode needs solid brand functional colors */
:root[data-theme="light"] .p-msg.ok{ color:#16A34A; }
:root[data-theme="light"] .p-msg.err{ color:#DC2626; }
:root[data-theme="light"] .p-msg.warn{ color:#EA580C; }

/* Theme toggle buttons (text labels, wider than the A size buttons). Base
   styling mirrors .p-font-btn so the control matches the text-size dropdown. */
.p-nav-dd-menu .p-theme-btn{
	min-width:54px;
	height:32px;
	padding:0 12px;
	border-radius:10px;
	border:1px solid rgba(255,255,255,.10);
	background:rgba(255,255,255,.03);
	color:rgba(234,240,255,.85);
	cursor:pointer;
	font-weight:700;
	font-size:0.8125rem;
	line-height:1;
	display:flex;
	align-items:center;
	justify-content:center;
}
.p-nav-dd-menu .p-theme-btn:hover{
	background:rgba(255,255,255,.06);
	border-color:rgba(255,255,255,.16);
}
.p-nav-dd-menu .p-theme-btn.is-active{
	background:rgba(58,128,210,.22);
	border-color:#3A80D2;
	color:#fff;
}

/* ------------------------------------------------------------------
   Light-mode polish — deeper components that hardcode dark-only
   surfaces or light text. Colored status tints are kept (they read
   fine on white); only neutral surfaces and low-contrast text are
   overridden. All scoped under [data-theme="light"] so dark is
   untouched. Grouped to mirror source order above.
   ------------------------------------------------------------------ */

/* Dashboard tiles */
:root[data-theme="light"] .p-tile{ background:#FFFFFF; border-color:#E2E8F0; }
:root[data-theme="light"] .p-tile:hover{ background:#F1F5F9; border-color:#CBD5E1; }
:root[data-theme="light"] .p-tile-icon{ background:#EFF4FB; border-color:#E2E8F0; }
:root[data-theme="light"] .p-tile-icon svg{ color:#1B4F8A; }
:root[data-theme="light"] .p-tile-sub{ color:#64748B; }

/* Quotes / Deals grid + list states */
:root[data-theme="light"] .p-grid-header{ color:#64748B; border-bottom-color:#E2E8F0; }
:root[data-theme="light"] .p-grid-row{ border-bottom-color:#E2E8F0; }
:root[data-theme="light"] .p-grid-row:hover,
:root[data-theme="light"] .p-grid-row.is-open{ background:#F1F5F9; border-color:#CBD5E1; }
:root[data-theme="light"] .p-grid-loading,
:root[data-theme="light"] .p-grid-empty,
:root[data-theme="light"] .p-detail-loading,
:root[data-theme="light"] .p-detail-note{ color:#64748B; }

/* Row action buttons — the deal plate keeps its own light face in both themes */
:root[data-theme="light"] .p-deal-action-btn{ background:#FFFFFF; border-color:#E2E8F0; color:#475569; }
:root[data-theme="light"] .p-deal-action-btn:hover{ background:#F1F5F9; color:#1B4F8A; }

/* Post-submission status bar (progress track, dots, step labels) */
:root[data-theme="light"] .p-status-bar::before{ background:#E2E8F0; }
:root[data-theme="light"] .p-status-dot{ background:#CBD5E1; }
:root[data-theme="light"] .p-status-step{ color:#64748B; }
:root[data-theme="light"] .p-status-step.done{ color:#475569; }
:root[data-theme="light"] .p-status-step.active{ color:#0A2540; }
:root[data-theme="light"] .p-status-step:not(.done):not(.active){ color:#94A3B8; }
:root[data-theme="light"] .p-status-step:not(.done):not(.active) .p-status-dot{ background:#CBD5E1; }

/* Pre-submission status chips — keep tints, darken text for contrast */
:root[data-theme="light"] .p-status-chip--neutral{ color:#475569; }
:root[data-theme="light"] .p-status-chip--pending{ color:#EA580C; }
:root[data-theme="light"] .p-status-chip--corrections{ color:#B91C1C; }
:root[data-theme="light"] .p-status-chip--approved{ color:#15803D; }
:root[data-theme="light"] .p-status-chip--ach{ color:#1D4ED8; }

/* Authorization / agreement callout boxes (bank link, banking, DSA sign).
   Shared dark surface, formerly inlined as background:#0b1220 in 5 views.
   Layout props (padding/max-height/overflow) stay inline per instance. */
.p-callout{ background:#0b1220; border:1px solid rgba(255,255,255,.08); border-radius:8px; }
:root[data-theme="light"] .p-callout{ background:#F8FAFC; border-color:#E2E8F0; }

/* Modal confirm/alert bodies (regioConfirm / regioAlert in portal.js). The
   dealer portal never uses native alert()/confirm(); these style their bodies. */
.p-dialog-msg{ font-size:0.875rem; line-height:1.55; }
.p-dialog-warn{
	display:flex; gap:10px; align-items:flex-start;
	border:1px solid rgba(200,16,46,.35);
	background:rgba(200,16,46,.08);
	border-radius:8px; padding:12px 14px;
}
.p-dialog-warn-ico{ font-size:1.25rem; line-height:1.25; }

/* ── Accordion (Manage Dealerships: dealers + per-dealer sections) ────────── */
.p-acc-dealer{
	background:var(--panel); border:1px solid var(--border); border-radius:var(--radius-card);
	box-shadow:var(--shadow); margin-bottom:12px; overflow:hidden;
}
.p-acc-dealer-head{
	display:flex; align-items:center; gap:12px; width:100%;
	padding:16px 18px; background:transparent; border:0; cursor:pointer;
	text-align:left; color:var(--text); font:inherit;
}
.p-acc-dealer-head:hover{ background:var(--accent); }
.p-acc-dealer-titles{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.p-acc-dealer-title{ font-weight:800; font-size:1.05rem; }
.p-acc-dealer-sub{ color:var(--muted); font-size:0.8125rem; }
.p-acc-dealer-body{ display:none; padding:0 18px 8px; border-top:1px solid var(--border); }
.p-acc-dealer.is-open > .p-acc-dealer-body{ display:block; }

.p-acc-sec{ border-top:1px solid var(--border); }
.p-acc-sec:first-child{ border-top:0; }
.p-acc-sec-head{
	display:flex; align-items:center; gap:10px; width:100%;
	padding:14px 2px; background:transparent; border:0; cursor:pointer;
	text-align:left; color:var(--text); font:inherit; font-weight:700; font-size:.95rem;
}
.p-acc-sec-head:hover .p-acc-sec-label{ color:var(--brand-horizon); }
.p-acc-sec-right{ margin-left:auto; display:flex; align-items:center; gap:10px; }
.p-acc-sec-body{ display:none; padding:0 2px 16px; }
.p-acc-sec.is-open > .p-acc-sec-body{ display:block; }

.p-acc-chev{
	color:var(--muted); font-size:1.125rem; line-height:1; display:inline-block;
	transition:transform var(--dur-ui) var(--ease-standard);
}
.p-acc-dealer.is-open > .p-acc-dealer-head .p-acc-chev,
.p-acc-sec.is-open > .p-acc-sec-head .p-acc-chev{ transform:rotate(90deg); }
@media (prefers-reduced-motion: reduce){ .p-acc-chev{ transition:none; } }

/* Activity log: bounded, vertically-scrollable region when expanded so a long
   history doesn't stretch the section. */
.md-activity, .md-billing{ max-height:320px; overflow-y:auto; overscroll-behavior:contain; }
.md-activity .md-activity-row:first-child{ border-top:0 !important; }

/* Billing / ACH activity rows */
.md-bill-table{ display:flex; flex-direction:column; }
.md-bill-row{
	display:grid; grid-template-columns:9.375rem 3.75rem 1fr auto auto; gap:10px;
	align-items:center; padding:8px 0; border-top:1px solid var(--border); font-size:0.8125rem;
}
.md-bill-row:first-child{ border-top:0; }
.md-bill-amt{ font-weight:700; text-align:right; white-space:nowrap; }

/* Detail panels / doc rows / trusted devices */
:root[data-theme="light"] .p-row-detail,
:root[data-theme="light"] .p-doc-row,
:root[data-theme="light"] .p-trusted-device{ background:#F8FAFC; border-color:#E2E8F0; }
:root[data-theme="light"] .p-detail-section,
:root[data-theme="light"] .p-review-request-section,
:root[data-theme="light"] .msg-section{ border-top-color:#E2E8F0; }
:root[data-theme="light"] .p-doc-progress,
:root[data-theme="light"] .p-doc-sub{ color:#64748B; }
:root[data-theme="light"] .p-doc-clerk-request{ color:#334155; }
:root[data-theme="light"] .p-doc-clerk-request strong{ color:#0A2540; }
:root[data-theme="light"] .p-doc-clerk-note{ color:#DC2626; }
:root[data-theme="light"] .p-doc-badge.orig{ color:#DC2626; }
:root[data-theme="light"] .p-doc-badge.copy{ color:#1B4F8A; }
:root[data-theme="light"] .p-doc-badge.p-doc-badge-supplemental{ color:#1D4ED8; }
:root[data-theme="light"] .p-doc-finding-msg{ color:#0A2540; }
:root[data-theme="light"] .p-doc-dropzone{ background:#F8FAFC; border-color:#CBD5E1; }
:root[data-theme="light"] .p-doc-dropzone:hover{ background:#F1F5F9; border-color:#94A3B8; }

/* Secondary buttons */
:root[data-theme="light"] .btn-outline{ color:#1B4F8A; border-color:#CBD5E1; }
:root[data-theme="light"] .p-btn-danger{ color:#B91C1C; }
:root[data-theme="light"] .p-btn-danger:hover{ color:#991B1B; }

/* Quote-complete dividers / notes */
:root[data-theme="light"] #quote-complete .qc-line{ border-bottom-color:#E2E8F0; }
:root[data-theme="light"] #quote-complete .qc-totals{ border-top-color:#E2E8F0; }
:root[data-theme="light"] #quote-complete .qc-head{ border-bottom-color:#E2E8F0; }
:root[data-theme="light"] #quote-complete .qc-note{ background:#F1F5F9; }

/* Pre-submission review banners — keep tints, darken titles/text */
:root[data-theme="light"] .p-review-banner--approved,
:root[data-theme="light"] .p-review-banner--approved .p-review-banner-title{ color:#15803D; }
:root[data-theme="light"] .p-review-banner--corrections,
:root[data-theme="light"] .p-review-banner--corrections .p-review-banner-title{ color:#B91C1C; }
:root[data-theme="light"] .p-review-banner--pending,
:root[data-theme="light"] .p-review-banner--pending .p-review-banner-title{ color:#EA580C; }
:root[data-theme="light"] .p-review-banner--ach,
:root[data-theme="light"] .p-review-banner--ach .p-review-banner-title{ color:#1D4ED8; }
:root[data-theme="light"] .p-review-banner-note{ background:rgba(10,37,64,.05); }

/* Findings summary card */
:root[data-theme="light"] .p-findings-section{ background:#F8FAFC; border-color:#E2E8F0; }
:root[data-theme="light"] .p-findings-title{ color:#0A2540; }
:root[data-theme="light"] .p-findings-meta{ color:#64748B; }
:root[data-theme="light"] .p-finding-card{ background:#FFFFFF; }
:root[data-theme="light"] .p-finding-card-num{ color:#94A3B8; }
:root[data-theme="light"] .p-finding-card-msg{ color:#0A2540; }
:root[data-theme="light"] .p-finding-card-affects{ color:#64748B; }
:root[data-theme="light"] .p-finding-card-affects strong{ color:#334155; }

/* Processing details form */
:root[data-theme="light"] .p-proc-label{ color:#0A2540; }
:root[data-theme="light"] .p-proc-input{ background:#FFFFFF; border-color:#E2E8F0; color:#0A2540; }
:root[data-theme="light"] .p-proc-input:focus{ background:#FFFFFF; border-color:#3A80D2; }
:root[data-theme="light"] .p-proc-input option{ background:#FFFFFF; color:#0A2540; }

/* Unread message badge */
:root[data-theme="light"] .p-deal-unread-badge{ color:#0284C7; }

/* Contact Regio dialog */
:root[data-theme="light"] .p-contact-dialog.ui-dialog{ background:#FFFFFF; color:#0A2540; border-color:#E2E8F0; }
:root[data-theme="light"] .p-contact-dialog .ui-dialog-titlebar{ background:#F1F5F9; color:#0A2540; }
:root[data-theme="light"] .p-contact-dialog .ui-dialog-titlebar-close:hover{ color:#0A2540; }
:root[data-theme="light"] .p-contact-dialog .ui-dialog-content{ background:#FFFFFF; color:#0A2540; }
:root[data-theme="light"] .p-contact-meta tr + tr td{ border-top-color:#E2E8F0; }
:root[data-theme="light"] .p-contact-editor{ background:#FFFFFF; border-color:#CBD5E1; color:#0A2540; }
:root[data-theme="light"] .p-contact-dropzone{ border-color:#CBD5E1; }
:root[data-theme="light"] .p-contact-file-label{ color:#1B4F8A; }
:root[data-theme="light"] .p-contact-file-label:hover{ color:#0A2540; }
:root[data-theme="light"] .p-contact-file-item{ background:#F1F5F9; color:#475569; }

/* Deal-detail dialog */
:root[data-theme="light"] .rg-deal-dlg.ui-dialog{ background:#FFFFFF; color:#0A2540; border-color:#E2E8F0; }
:root[data-theme="light"] .rg-deal-dlg .ui-dialog-titlebar{ background:#F1F5F9; color:#0A2540; border-bottom-color:#E2E8F0; }
:root[data-theme="light"] .rg-deal-dlg .ui-dialog-titlebar-close{ color:#0A2540; }
:root[data-theme="light"] .rg-deal-dlg .ui-dialog-content{ background:#FFFFFF; color:#0A2540; }
:root[data-theme="light"] .rg-deal-dlg .p-detail-title{ color:#0A2540; }

/* Messages dialog + thread */
:root[data-theme="light"] .p-msg-dialog.ui-dialog,
:root[data-theme="light"] .p-msg-dialog .ui-dialog-titlebar,
:root[data-theme="light"] .p-msg-dialog .ui-dialog-content{ background:#FFFFFF; color:#0A2540; border-color:#E2E8F0; }
:root[data-theme="light"] .msg-bubble--admin{ background:#F1F5F9; color:#0A2540; }
:root[data-theme="light"] .msg-input{ background:#FFFFFF; border-color:#E2E8F0; color:#0A2540; }

/* Form dialog (Manage Users invite/edit) */
:root[data-theme="light"] .p-form-dialog.ui-dialog{ background:#FFFFFF; color:#0A2540; border-color:#E2E8F0; }
:root[data-theme="light"] .p-form-dialog .ui-dialog-titlebar{ background:#F1F5F9; color:#0A2540; }
:root[data-theme="light"] .p-form-dialog .ui-dialog-titlebar-close:hover{ color:#0A2540; }
:root[data-theme="light"] .p-form-dialog .ui-dialog-content{ background:#FFFFFF; color:#0A2540; }
:root[data-theme="light"] .p-form-dialog .ui-dialog-content label{ color:#334155; }
:root[data-theme="light"] .p-form-dialog .ui-dialog-buttonpane{ background:#FFFFFF; border-top-color:#E2E8F0; }
:root[data-theme="light"] .p-form-dialog .ui-dialog-buttonpane button{ background:#FFFFFF; border-color:#CBD5E1; color:#0A2540; }
:root[data-theme="light"] .p-form-dialog .ui-dialog-buttonpane button:hover{ background:#F1F5F9; }
/* Primary action (Send invite / Save) — the rule above forces navy text on
   every button; re-assert white-on-blue for the primary so it stays legible. */
:root[data-theme="light"] .p-form-dialog .ui-dialog-buttonpane button.ui-button:first-child{
	background:var(--accent2); border-color:var(--brand-horizon); color:#fff;
}
:root[data-theme="light"] .p-form-dialog .ui-dialog-buttonpane button.ui-button:first-child:hover{ background:#2563A8; border-color:#5B9FE8; }

/* Yes/No segmented control */
:root[data-theme="light"] .p-yesno{ background:#FFFFFF; border-color:#CBD5E1; }
:root[data-theme="light"] .p-yesno-btn{ color:#475569; }
:root[data-theme="light"] .p-yesno-btn + .p-yesno-btn{ border-left-color:#E2E8F0; }
:root[data-theme="light"] .p-yesno-btn:hover{ background:#F1F5F9; color:#0A2540; }
/* Active selection — without this the base .is-on blue keeps the light-mode
   muted text color (#475569), leaving gray-on-blue. Force white-on-blue. */
:root[data-theme="light"] .p-yesno-btn.is-on{ background:var(--accent2); color:#fff; }
:root[data-theme="light"] .p-yesno-btn.is-on:hover{ background:#2563A8; }

/* Onboarding checklist */
:root[data-theme="light"] .p-ck-item{ border-bottom-color:#E2E8F0; }
:root[data-theme="light"] .p-ck-done{ background:#DCFCE7; color:#15803D; }
:root[data-theme="light"] .p-ck-todo{ border-color:#CBD5E1; }
:root[data-theme="light"] .p-ck-action{ color:#1B4F8A; }
:root[data-theme="light"] .p-ck-waiting{ color:#EA580C; }

/* Onboarding drawer (right-edge slide-out) */
:root[data-theme="light"] .p-ob-panel,
:root[data-theme="light"] .p-ob-tab{ background:#FFFFFF; }
:root[data-theme="light"] .p-ob-premium{ background:#ECFDF3; border-color:#A7F3D0; color:#15803D; }
:root[data-theme="light"] .p-ob-gauge-track{ stroke:#E2E8F0; }

html, body{
	margin:0;
	padding:0;
	background:var(--bg);
	color:var(--text);
	font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

/* ---------- Font size ---------- */
/* Uses font-size (not zoom) so third-party dropdowns (Google Places) stay
   in the normal coordinate system and position correctly. */

html{
	--ui_scale: 1;
	font-size: calc(100% * var(--ui_scale));
}

/* Global font-size presets — bumped up across all three for readability
   (was .85 / 1.07 / 1.32). --ui_scale drives the root font-size above.
   --portal_w_min is hand-tuned per tier (not derived from --ui_scale) so the
   layout floor can be dialed independently of the text scale. */
html[data-font="sm"]{ --ui_scale: .92;  --portal_w_min: 960px;  }
html[data-font="md"]{ --ui_scale: 1.15; --portal_w_min: 1120px; }
html[data-font="lg"]{ --ui_scale: 1.45; --portal_w_min: 1360px; }

/* ---------- Nav dropdown ---------- */

.p-nav-dd{
	position:relative;
	display:inline-flex;
	align-items:center;
}

.p-nav-dd-btn{
	font-size:0.8125rem;
	color:var(--muted);
	padding:8px 10px;
	border-radius:10px;
	border:1px solid transparent;
	display:inline-flex;
	align-items:center;
	gap:8px;
}
.p-nav-dd.is-open .p-nav-dd-menu{
	display:flex;
	align-items:center;
}
.p-nav-dd-btn:hover{
	background:rgba(255,255,255,.04);
	border-color:rgba(255,255,255,.10);
	text-decoration:none;
}

.p-nav-dd-btn:after{
	content:"▾";
	font-size:0.6875rem;
	opacity:.75;
}

.p-nav-dd.is-open .p-nav-dd-btn{
	background:rgba(255,255,255,.04);
	border-color:rgba(255,255,255,.10);
}

.p-nav-dd-menu{
	position:absolute;
	right:0;
	top:calc(100% + 8px);
	min-width:160px;
	padding:10px;
	border-radius:var(--radius-card);
	border:1px solid rgba(255,255,255,.10);
	background:rgba(15,22,38,.98);
	box-shadow:0 16px 40px rgba(0,0,0,.35);
	display:none;
	z-index:60;
}

.p-nav-dd.is-open .p-nav-dd-menu{ display:flex; }

.p-nav-dd-menu{
	gap:8px;
	justify-content:flex-end;
}

/* Reuse your A buttons, but make them look great in a menu */
.p-nav-dd-menu .p-font-btn{
	width:36px;
	height:32px;
	border-radius:10px;
	border:1px solid rgba(255,255,255,.10);
	background:rgba(255,255,255,.03);
	color:rgba(234,240,255,.85);
	cursor:pointer;
	font-weight:900;
	line-height:1;
	display:flex;
	align-items:center;
	justify-content:center;
}

.p-nav-dd-menu .p-font-btn[data-font="sm"]{ font-size:0.75rem; }
.p-nav-dd-menu .p-font-btn[data-font="md"]{ font-size:1.125rem; }
.p-nav-dd-menu .p-font-btn[data-font="lg"]{ font-size:1.625rem; }

.p-nav-dd-menu .p-font-btn:hover{
	background:rgba(255,255,255,.06);
	border-color:rgba(255,255,255,.16);
}

.p-nav-dd-menu .p-font-btn.is-active{
	background:rgba(120,170,255,.18);
	border-color:rgba(120,170,255,.35);
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

/* Logo is a link — keep it clean on hover (no underline rollover). */
.p-brand:hover{ text-decoration:none; }

/* Checkboxes: larger hit target + brand color, aligned with their label text.
   width !important overrides the inline width:auto sprinkled on checkboxes to
   escape the generic form-input width:100%. */
input[type="checkbox"]{
	width:18px !important;
	height:18px;
	accent-color:var(--brand-blue);
	cursor:pointer;
	flex:0 0 auto;
	vertical-align:middle;
}

.p-wrap{
	width:var(--portal_w) !important;
	margin:0 auto;
	padding:var(--content_pad_y) var(--content_pad_x) calc(var(--footer_h) + 30px);
}

/* ---------- Topbar ---------- */

.p-topbar{
	border-bottom:1px solid var(--border);
	background:rgba(0,0,0,.14);
	backdrop-filter:saturate(140%) blur(8px);
	position:sticky;
	top:0;
	z-index:50;
}

.p-topbar-inner{
	width:var(--portal_w) !important;
	max-width:none;
	margin:0 auto;
	padding:14px 18px;
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:14px;
}

/* hide the font toggle on very small screens if you want */
@media (max-width: 520px){
	.p-font{ display:none; }
}

.p-brand{
	display:flex;
	align-items:center;
	gap:12px;
	min-width:0;
}

/* regiotitle lockup styles (p-lockup / p-logo-*) live in brand.css —
   shared with the admin portal so both stay visually in sync. */

.p-brand-text{
	display:flex;
	flex-direction:column;
	line-height:1.1;
	min-width:0;
}

.p-brand-title{
	font-weight:800;
	letter-spacing:.2px;
	font-size:0.9375rem;
	margin:0;
	white-space:nowrap;
}

.p-brand-sub{
	font-size:0.75rem;
	color:var(--muted);
	margin:2px 0 0;
	white-space:nowrap;
}

.p-nav{
	display:flex;
	gap:12px;
	align-items:center;
	flex-wrap:wrap;
}

.p-nav a{
	font-size:0.8125rem;
	color:var(--muted);
	padding:8px 10px;
	border-radius:10px;
	border:1px solid transparent;
}

.p-nav a:hover{
	background:rgba(255,255,255,.04);
	border-color:rgba(255,255,255,.10);
	text-decoration:none;
}

/* ---------- Hero ---------- */

.p-hero{
	padding:34px 0 18px;
}

.p-h1{
	margin:0 0 8px;
	font-size:1.875rem;
	letter-spacing:.2px;
}

/* Dashboard hero heading — quieter than the full-size .p-h1 used on the
   flow pages (login, onboarding, banking), but still above body/sub text.
   Double class so the ≤640px .p-h1 override can't bump it back up. */
.p-h1.p-h1--quiet{
	font-size:1.375rem;
}

.p-sub{
	margin:0;
	max-width:70ch;
	color:var(--muted);
	line-height:1.5;
}

/* ---------- Card ---------- */

.p-card{
	border:1px solid var(--border);
	background:var(--panel);
	border-radius:var(--radius-card);
	overflow:hidden;
	box-shadow:var(--shadow);
}

.p-card-h{
	padding:14px 16px;
	border-bottom:1px solid var(--border);
	background:var(--panel2);
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:10px;
}

.p-card-title{
	margin:0;
	font-size:0.875rem;
	letter-spacing:.15px;
}

.p-card-b{
	padding:16px;
}

.card{
	border:1px solid var(--border);
	background:var(--panel);
	border-radius:var(--radius-card);
	box-shadow:var(--shadow);
	padding:16px;
	overflow:hidden;
}

/* ---------- Form ---------- */

.p-row{
	display:flex;
	gap:12px;
	flex-wrap:wrap;
	align-items:flex-end;
}

.p-field{
	min-width:260px;
	flex:1;
	max-width:420px;
}

label{
	display:block;
	font-size:0.8125rem;
	color:var(--muted);
	margin:0 0 6px;
}

input, .p-field select, .p-field textarea{
	width:100%;
	padding:12px 12px;
	border-radius:var(--radius-input);
	border:1px solid rgba(255,255,255,.14);
	background:rgba(0,0,0,.25);
	color:var(--text);
	outline:none;
	font:inherit;
}

/* Native select: hide system chrome, draw a chevron via background-image so
   the field matches the input motif on the dark portal background. */
.p-field select{
	appearance:none;
	-webkit-appearance:none;
	-moz-appearance:none;
	padding-right:36px;
	background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23aab3c5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/></svg>");
	background-repeat:no-repeat;
	background-position:right 12px center;
	background-size:12px 8px;
	cursor:pointer;
}

.p-field select::-ms-expand{ display:none; }

/* Match the dark portal palette for the dropdown panel where supported. */
.p-field select option{
	background:#0f1623;
	color:var(--text);
}

input:focus, .p-field select:focus, .p-field textarea:focus{
	border-color:var(--brand-horizon);
	box-shadow:0 0 0 3px rgba(58,128,210,.18);
}

/* Styled <select> outside .p-field (e.g. Manage Dealerships mailing form). The
   generic input rule doesn't cover selects, so mirror .p-field select here so
   .p-input selects match the .p-input text fields beside them. */
select.p-input{
	width:100%;
	padding:12px 36px 12px 12px;
	border-radius:var(--radius-input);
	border:1px solid rgba(255,255,255,.14);
	background-color:rgba(0,0,0,.25);
	color:var(--text);
	outline:none; font:inherit; cursor:pointer;
	appearance:none; -webkit-appearance:none; -moz-appearance:none;
	background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23aab3c5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/></svg>");
	background-repeat:no-repeat; background-position:right 12px center; background-size:12px 8px;
}
select.p-input:focus{ border-color:var(--brand-horizon); box-shadow:0 0 0 3px rgba(58,128,210,.18); }
select.p-input option{ background:#0f1623; color:var(--text); }
:root[data-theme="light"] select.p-input{ background-color:#FFFFFF; border-color:#E2E8F0; color:#0A2540; }
:root[data-theme="light"] select.p-input option{ background:#FFFFFF; color:#0A2540; }

/* Text inputs marked .p-input (only select.p-input was styled before, so text
   fields rendered invisible on the dark modal). Match the select styling. */
input.p-input{
	box-sizing:border-box;
	width:100%;
	padding:12px;
	border-radius:var(--radius-input);
	border:1px solid rgba(255,255,255,.14);
	background-color:rgba(0,0,0,.25);
	color:var(--text);
	outline:none; font:inherit;
}
input.p-input::placeholder{ color:rgba(234,240,255,.45); }
input.p-input:focus{ border-color:var(--brand-horizon); box-shadow:0 0 0 3px rgba(58,128,210,.18); }
:root[data-theme="light"] input.p-input{ background-color:#FFFFFF; border-color:#E2E8F0; color:#0A2540; }
:root[data-theme="light"] input.p-input::placeholder{ color:#94A3B8; }

.p-btn{
	padding:12px 14px;
	border-radius:var(--radius-btn);
	border:1px solid rgba(255,255,255,.14);
	background:rgba(255,255,255,.08);
	color:var(--text);
	cursor:pointer;
	/* <button> controls don't inherit the page font by default — force it so
	   <button class="p-btn"> and <a class="p-btn"> render at the same size. */
	font-family:inherit;
	font-size:inherit;
	line-height:1.2;
	font-weight:700;
}

.p-btn:hover{ background:rgba(255,255,255,.12); }

.p-btn.primary{
	background:var(--accent2);            /* Regio Blue */
	border-color:var(--brand-horizon);   /* Horizon Blue */
	color:#fff;
}

.p-btn.primary:hover{ background:#2563A8; border-color:#5B9FE8; }

/* Hyphenated modifier alias (.p-btn-primary) is used across the portal — account
   page, deal/quote detail, and buttons built in portal.js. Define it so those
   don't fall back to base .p-btn (which is white in light mode → invisible).
   Mirrors .p-btn.primary; consistent with the already-defined .p-btn-danger. */
.p-btn-primary{ background:var(--accent2); border-color:var(--brand-horizon); color:#fff; }
.p-btn-primary:hover{ background:#2563A8; border-color:#5B9FE8; }

.p-help{
	font-size:0.8125rem;
	color:var(--muted);
	line-height:1.45;
	margin-top:10px;
}

.p-msg{
	margin-top:12px;
	font-size:0.8125rem;
}

.p-msg.ok{ color:#c9ffd1; }
.p-msg.err{ color:#ffd1d1; }
.p-msg.warn{ color:#FB923C; }   /* brand warn — dark; light override above (#EA580C) */

.p-split{
	height:1px;
	background:var(--border);
	margin:16px 0;
}

.p-code input{
	letter-spacing:6px;
	text-transform:uppercase;
	text-align:center;
	font-weight:900;
}

/* ---------- Footer ---------- */

.p-footer{
	position:fixed;
	left:0;
	right:0;
	bottom:0;
	height:var(--footer_h);
	display:flex;
	align-items:center;
	justify-content:space-between;
	padding:0 18px;
	font-size:.78rem;
	color:var(--muted);
	background:rgba(0,0,0,.22);
	backdrop-filter:saturate(140%) blur(8px);
	border-top:1px solid var(--border);
}


.is-hidden{ display:none !important; }

/* ---------- Dashboard grid + tiles ---------- */

.p-grid{
	display:grid;
	grid-template-columns:repeat(3, minmax(0, 1fr));
	gap:14px;
}
@media (max-width: 900px){
	.p-grid{ grid-template-columns:1fr; }
}

/* Icon tile layout */
.p-tile{
	display:flex;
	align-items:center;
	gap:14px;
	padding:18px 18px;
	border:1px solid rgba(255,255,255,.10);
	border-radius:var(--radius-card);
	background:rgba(255,255,255,.04);
	text-decoration:none;
	color:inherit;
	transition:transform var(--dur-hover) var(--ease-standard), background var(--dur-hover) var(--ease-standard), border-color var(--dur-hover) var(--ease-standard);
}
.p-tile:hover{
	transform:translateY(-2px);
	background:rgba(255,255,255,.06);
	border-color:rgba(255,255,255,.18);
	text-decoration:none;
}

.p-tile-icon{
	width:40px;
	height:40px;
	border-radius:var(--radius-card);
	background:rgba(255,255,255,.06);
	display:flex;
	align-items:center;
	justify-content:center;
	flex-shrink:0;
	border:1px solid rgba(255,255,255,.10);
}

.p-tile-icon svg{
	width:20px;
	height:20px;
	color:#7aa7ff;
	display:block;
}

.p-tile-title{
	font-weight:700;
	font-size:1rem;
	margin:0 0 4px;
}

.p-tile-sub{
	color:rgba(234,240,255,.72);
	font-size:0.8125rem;
	margin:0;
	line-height:1.4;
}

/* ---------- portal GRID (Quotes / Deals) ---------- */

.p-grid-list {
	display: flex;
	flex-direction: column;
}

.p-grid-header,
.p-grid-row {
	display: grid;
	grid-template-columns: 6.25rem 1fr 1fr 1.5fr;
	padding: 12px 10px;
	align-items: center;
}

/* Deals list overrides — 5 columns with actions */
.p-deals-header,
.p-deals-row {
	grid-template-columns: 8.125rem 1fr 1fr 1.5fr 5.625rem;
}

/* Quotes list overrides — Deal # / Buyer / VIN / Actions (T12; no date column).
   Actions is a FIXED width so the unread "N new" badge appearing never resizes
   the column and shoves the VIN over — the badge fills reserved space to the
   left of the right-aligned buttons. */
.p-quotes-header,
.p-quotes-row {
	grid-template-columns: 8.125rem 1.3fr 1fr 20rem;
}

/* Header labels sit over their column CONTENT, not the column box: the plate
   is a fixed 120px graphic at the left of a wider column, the VIN is a fixed
   17-char string, and the quote action buttons are right-aligned. Left-aligned
   labels drifted away from all three. */
.p-quotes-header > div:nth-child(1),
.p-deals-header > div:nth-child(1) {
	width: 120px;          /* .p-deal-plate min-width (fixed-px graphic) */
	text-align: center;
}
.p-quotes-header > div:nth-child(3),
.p-deals-header > div:nth-child(3) {
	width: 17ch;           /* VIN length; header shares the cells' 0.75rem font */
	text-align: center;
}
.p-quotes-header > div:nth-child(4) {
	text-align: right;
	padding-right: 5rem;   /* ~centers "Actions" over Messages/View/Edit/Submit */
}

.p-cell-vin {
	font-family: inherit;   /* Inter — type system has no monospace (Typography §3) */
	font-size: 0.75rem;
}
.p-cell-vehicle {
	font-family: inherit;
	font-size: 0.6875rem;
	color: var(--muted);   /* #94A3B8 dark (AA), #64748B light — was hardcoded Steel Gray (low contrast on dark) */
	margin-top: 2px;
	letter-spacing: normal;
}

.p-deal-actions {
	display: flex;
	gap: 6px;
	justify-content: flex-end;
	position: relative;
	z-index: 2;
}

/* Quotes-list per-row action buttons (Messages / View / Edit / Submit) — T12.
   Right-aligned + nowrap so the buttons stay put; the unread badge occupies the
   reserved space to their left instead of pushing anything. */
.p-quote-actions {
	display: flex;
	gap: 6px;
	flex-wrap: nowrap;
	justify-content: flex-end;
	align-items: center;
}
/* Submit uses the quote-flow blue accent (same tokens as the quote Next button) */
.p-deal-action-btn--primary {
	border-color: rgba(78,161,255,.55);
	background: rgba(78,161,255,.16);
	color: #eaf0ff;
}
.p-deal-action-btn--primary:hover {
	background: rgba(78,161,255,.26);
	color: #ffffff;
}
:root[data-theme="light"] .p-deal-action-btn--primary {
	border-color: #3A80D2;
	background: rgba(58,128,210,.12);
	color: #1B4F8A;
}
:root[data-theme="light"] .p-deal-action-btn--primary:hover {
	background: rgba(58,128,210,.20);
	color: #1B4F8A;
}

/* Deal identifier styled as a US license plate.
   Always a light embossed face (real plates are light) so it reads as a
   plate in both dark and light themes; ~2:1 ratio of a standard 12"×6" plate. */
.p-deal-plate {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	/* Top-align the content so the state legend sits just *below* the mounting
	   bolts rather than colliding with them (2026-07-01 walkthrough, T13). */
	justify-content: flex-start;
	gap: 2px;
	/* Larger, more uniform footprint; long state names still grow to fit
	   without truncating, keeping ~2:1 plate proportions. */
	width: auto;
	min-width: 120px;
	height: 58px;
	padding: 14px 12px 6px;
	overflow: visible;
	text-decoration: none;
	border-radius: 6px;
	/* two top mounting bolts (the pair real plates are hung from),
	   inset from the top edge and spread ~7" apart, not in the corners */
	background:
		radial-gradient(circle at 25% 7px, rgba(70,80,95,.55) 0 1.3px, rgba(0,0,0,.13) 1.3px 2.2px, transparent 2.4px),
		radial-gradient(circle at 75% 7px, rgba(70,80,95,.55) 0 1.3px, rgba(0,0,0,.13) 1.3px 2.2px, transparent 2.4px),
		linear-gradient(#fdfdfb, #e9ebee);
	border: 1px solid #c2c7ce;
	box-shadow: inset 0 0 0 2px #ffffff, 0 1px 2px rgba(0,0,0,.28);
	transition: transform var(--dur-hover) var(--ease-standard),
	            box-shadow var(--dur-hover) var(--ease-standard);
}
.p-deal-plate:hover {
	transform: translateY(-1px);
	box-shadow: inset 0 0 0 2px #ffffff, 0 3px 8px rgba(0,0,0,.32);
}
/* Plate text is FIXED px (locked to the Medium-preset rendering, 2026-07-02
   call) — the plate is treated like a graphic and must not scale with the
   user's text-size setting; sm bunched the columns, lg overflowed the plate. */
.p-deal-plate-state {
	max-width: none;
	font-size: 9.2px;          /* 0.5rem at the md preset (16px × 1.15) */
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	line-height: 1;
	white-space: nowrap;
	overflow: visible;
	color: #1B4F8A;            /* Regio Blue plate legend */
}
.p-deal-plate-num {
	font-family: 'Oswald', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
	font-weight: 700;
	font-size: 19.6px;         /* 1.0625rem at the md preset */
	letter-spacing: .06em;
	line-height: 1.05;
	color: #0A2540;           /* embossed Deep Navy */
	text-shadow: 0 1px 0 rgba(255,255,255,.7);
}

.p-deal-action-btn {
	display: inline-block;
	padding: 4px 9px;
	font-size: 0.6875rem;
	font-weight: 600;
	border-radius: var(--radius-input);
	border: 1px solid rgba(255,255,255,0.15);
	background: rgba(255,255,255,0.05);
	color: #94a3b8;
	cursor: pointer;
	text-decoration: none;
	transition: background var(--dur-hover) var(--ease-standard), color var(--dur-hover) var(--ease-standard);
	white-space: nowrap;
	font-family: inherit;
}
.p-deal-action-btn:hover {
	background: rgba(255,255,255,0.12);
	color: #e2e8f0;
}

/* ── Contact Regio dialog — dark theme override ── */
.p-contact-dialog.ui-dialog {
	background: #0d1826;
	color: #eaf0ff;
	border: 1px solid #1e3a5f;
	border-radius: 10px;
	box-shadow: 0 8px 40px rgba(0,0,0,0.6);
	padding: 0;
}
.p-contact-dialog .ui-dialog-titlebar {
	background: #1a2540;
	color: #eaf0ff;
	border: none;
	border-radius: 10px 10px 0 0;
	padding: 14px 18px;
	font-size: 0.875rem;
	font-weight: 700;
}
.p-contact-dialog .ui-dialog-titlebar-close {
	color: #94a3b8;
	background: none;
	border: none;
	opacity: 0.7;
	cursor: pointer;
}
.p-contact-dialog .ui-dialog-titlebar-close:hover { opacity: 1; color: #fff; }
.p-contact-dialog .ui-dialog-content {
	background: #0d1826;
	color: #eaf0ff;
	padding: 18px 20px 20px;
	border-radius: 0 0 10px 10px;
}
.p-contact-dialog .ui-dialog-buttonpane { display: none; }

/* Contact Regio modal */
.p-contact-meta {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 12px;
	font-size: 0.8125rem;
}
.p-contact-meta tr + tr td {
	border-top: 1px solid rgba(255,255,255,0.06);
}
.p-contact-meta-label {
	color: var(--muted);
	padding: 6px 14px 6px 0;
	white-space: nowrap;
	vertical-align: top;
	width: 56px;
}
.p-contact-meta-value {
	color: #94a3b8;
	padding: 6px 0;
	word-break: break-all;
}
.p-contact-editor {
	width: 100%;
	min-height: 110px;
	max-height: 260px;
	overflow-y: auto;
	box-sizing: border-box;
	background: #0f172a;
	border: 1px solid #334155;
	border-radius: 6px;
	color: #e2e8f0;
	font-size: 0.8125rem;
	line-height: 1.5;
	padding: 10px 12px;
	font-family: inherit;
	outline: none;
	cursor: text;
	margin-bottom: 10px;
}
.p-contact-editor:focus { border-color: #3b82f6; }
.p-contact-editor:empty::before {
	content: attr(data-placeholder);
	color: #475569;
	pointer-events: none;
}

.p-contact-dropzone {
	display: flex;
	align-items: center;
	gap: 8px;
	border: 1px dashed #334155;
	border-radius: 6px;
	padding: 9px 12px;
	font-size: 0.75rem;
	color: var(--muted);
	cursor: default;
	transition: border-color var(--dur-hover) var(--ease-standard), background var(--dur-hover) var(--ease-standard);
	margin-bottom: 6px;
}
.p-contact-dropzone.is-dragover {
	border-color: #3b82f6;
	background: rgba(37,99,235,0.08);
	color: #93c5fd;
}
.p-contact-drop-icon { font-size: 0.9375rem; }
.p-contact-file-label {
	color: #93c5fd;
	cursor: pointer;
	text-decoration: underline;
}
.p-contact-file-label:hover { color: #bfdbfe; }

.p-contact-file-list { margin-bottom: 10px; }
.p-contact-file-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #1e293b;
	border-radius: var(--radius-badge);
	padding: 5px 10px;
	font-size: 0.75rem;
	color: #94a3b8;
	margin-bottom: 4px;
}
.p-contact-file-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}
.p-contact-file-remove {
	background: none;
	border: none;
	color: var(--muted);
	cursor: pointer;
	font-size: 0.75rem;
	padding: 0 0 0 10px;
	flex-shrink: 0;
}
.p-contact-file-remove:hover { color: #f87171; }

.p-contact-footer {
	display: flex;
	align-items: center;
	gap: 12px;
}
.p-contact-status { font-size: 0.8125rem; }

.p-grid-header {
	font-size: 0.75rem;
	color: #999;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

.p-grid-row {
	border-bottom: 1px solid rgba(255,255,255,0.05);
	transition: all var(--dur-hover) var(--ease-standard);
}

/* Hover tint on every row, but the pointer cursor ONLY where the row itself
   is clickable (deals rows open the deal dialog; quotes rows lost their
   click-to-expand in T12 — buttons are the only actions). 2026-07-02 call. */
.p-grid-row:hover {
	background: rgba(255,255,255,0.06);
}
.p-row-click:hover {
	cursor: pointer;
}

.p-cell {
	font-size: 0.875rem;
}

.p-grid-loading,
.p-grid-empty {
	padding: 14px 10px;
	font-size: 0.8125rem;
	color: #aaa;
}

.p-card-h{
	display:flex;
	align-items:center;
	justify-content:space-between;
}

.p-card-h-left{
	display:flex;
	flex-direction:column;
}

.p-btn-tile{
	display:flex;
	align-items:center;
	gap:8px;
	padding:8px 12px;
	border-radius:8px;
	background:#f5f7fa;
	border:1px solid #e2e6ea;
	text-decoration:none;
	color:#222;
	font-size:0.875rem;
	font-weight:500;
	transition:all var(--dur-hover) var(--ease-standard);
}

.p-btn-tile svg{
	width:16px;
	height:16px;
}

.p-btn-tile:hover{
	background:#e9eef5;
	border-color:#d6dde6;
}
.p-tile-inline{
	padding:10px 12px;
	gap:10px;
	border-radius:var(--radius-card);
}

.p-tile-inline .p-tile-icon{
	width:32px;
	height:32px;
	border-radius:var(--radius-card);
}

.p-tile-inline .p-tile-icon svg{
	width:16px;
	height:16px;
}

.p-tile-inline .p-tile-title{
	font-size:0.8125rem;
	margin:0;
}

.p-tile-inline .p-tile-sub{
	font-size:0.6875rem;
}

.p-status-bar{
	--dot-size:10px; /* 🔥 MOVE IT HERE */

	display:flex;
	align-items:flex-start;
	width:100%;
	position:relative;
}

/* BASE LINE — spans first dot centre (10%) to last dot centre (90%) */
.p-status-bar::before{
	content:'';
	position:absolute;
	top:calc(var(--dot-size) / 2);
	left:10%;
	right:10%;
	height:2px;
	background:rgba(255,255,255,0.15);
	z-index:0;
}

/* PROGRESS LINE — same inset, width scaled to 80% of --progress */
.p-status-bar::after{
	content:'';
	position:absolute;
	top:calc(var(--dot-size) / 2);
	left:10%;
	height:2px;
	background:#4fc3f7;
	z-index:1;
	transition:width 400ms var(--ease-gauge);
	width:calc(var(--progress) * 0.8);
}

.p-status-step{
	flex:1;
	text-align:center;
	position:relative;
	z-index:2;
	font-size:0.6875rem;
	color:rgba(255,255,255,0.55);

	display:flex;
	flex-direction:column;
	align-items:center;
}

/* DOT */
.p-status-dot{
	width:var(--dot-size);
	height:var(--dot-size);
	border-radius:50%;
	margin:0 auto 4px;
	background:rgba(255,255,255,0.25);
}

/* LABEL */
.p-status-label{
	line-height:1.2;
	max-width:100px;
	word-wrap:break-word;
}

/* COMPLETED */
.p-status-step.done{
	color:rgba(255,255,255,0.75);
}

.p-status-step.done .p-status-dot{
	background:#66bb6a;
	box-shadow:0 0 4px rgba(102,187,106,0.6);
}

/* ACTIVE */
.p-status-step.active{
	color:#fff;
	font-weight:600;
}

.p-status-step.active .p-status-dot{
	background:#4fc3f7;
	box-shadow:0 0 6px rgba(79,195,247,0.9);
	transform:scale(1.2);
}

/* FUTURE */
.p-status-step:not(.done):not(.active){
	color:rgba(255,255,255,0.4);
}

.p-status-step:not(.done):not(.active) .p-status-dot{
	background:rgba(255,255,255,0.15);
}

/* Pre-submission status chip — shown on deals-list rows when the deal
   hasn't yet entered the 5-step post-submission pipeline. */
.p-status-chip{
	display:inline-block;
	padding:6px 12px;
	border-radius:999px;
	font-size:0.75rem;
	font-weight:600;
	line-height:1.2;
	border:1px solid;
	letter-spacing:0.01em;
}

.p-status-chip--neutral{
	background:rgba(148,163,184,0.10);
	border-color:rgba(148,163,184,0.35);
	color:#cbd5e1;
}

.p-status-chip--pending{
	background:rgba(251,146,60,0.12);
	border-color:rgba(251,146,60,0.40);
	color:#FB923C;
}

.p-status-chip--corrections{
	background:rgba(220,38,38,0.12);
	border-color:rgba(220,38,38,0.40);
	color:#fca5a5;
}

.p-status-chip--approved{
	background:rgba(22,163,74,0.12);
	border-color:rgba(22,163,74,0.40);
	color:#86efac;
}

.p-status-chip--ach{
	background:rgba(37,99,235,0.14);
	border-color:rgba(37,99,235,0.45);
	color:#bfdbfe;
}

.p-status-exception{
	display:block;
	width:fit-content;
	margin:0 auto 8px;
	padding:4px 10px;
	font-size:0.7rem;
}


/********* details row ********/
.p-grid-row.is-open {
	background: rgba(255,255,255,0.08);
	border-color: rgba(255,255,255,0.2);
}

.p-row-detail{
	margin: 8px 0 16px;
	padding: 12px;
	border-radius: var(--radius-card);
	background: rgba(255,255,255,0.03);
	border: 1px solid rgba(255,255,255,0.08);
}

/* loading state */
.p-detail-loading {
	padding: 14px;
	font-size: 0.8125rem;
	color: #aaa;
}

.p-row-click.is-highlight {
	outline: 2px solid #f6c23e;
	outline-offset: -2px;
	transition: outline 600ms var(--ease-out);
}

.p-row-click {
	transition: background 500ms var(--ease-out);
}

/* ---------- Document Section ---------- */

.p-detail-section {
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid rgba(255,255,255,0.08);
}

.p-flex-between {
	display:flex;
	justify-content:space-between;
	align-items:center;
}

.p-doc-header {
	display:flex;
	justify-content:space-between;
	align-items:center;
	margin-bottom:8px;
}

.p-doc-progress {
	font-size:0.8125rem;
	font-weight:600;
	color:rgba(234,240,255,.7);
}
.p-detail-section-title {
	font-weight: 700;
	margin-bottom: 6px;
}

.p-detail-note {
	font-size: 0.8125rem;
	color: #aaa;
	margin-bottom: 10px;
}

.p-doc-badge {
	font-size:0.6875rem;
	padding:2px 6px;
	border-radius:4px;
	margin-left:6px;
	font-weight:600;
}

.p-doc-badge.orig {
	background:rgba(255,100,100,.15);
	color:#ff8a8a;
}

.p-doc-badge.copy {
	background:rgba(120,170,255,.18);
	color:#7aa7ff;
}

.p-doc-badge-mark { margin-left:1px; font-weight:700; }

/* One-time note explaining the "Original required *" badge. */
.p-doc-footnote {
	display:flex;
	gap:6px;
	margin-top:14px;
	font-size:0.75rem;
	line-height:1.45;
	color:var(--muted,#94A3B8);
}
.p-doc-footnote-mark { color:#ff8a8a; font-weight:700; flex-shrink:0; }

.p-doc-badge.p-doc-badge-supplemental {
	background: rgba(59, 130, 246, 0.25);
	color: #bfdbfe;
}

.p-doc-row-supplemental {
	background: rgba(59, 130, 246, 0.06) !important;
	border-left: 3px solid rgba(59, 130, 246, 0.55) !important;
}

.p-doc-clerk-request {
	font-size: 0.8125rem;
	color: #cbd5e1;
	background: rgba(59, 130, 246, 0.10);
	border-radius: 6px;
	padding: 8px 12px;
	margin-top: 8px;
	line-height: 1.5;
}
.p-doc-clerk-request strong {
	color: #eaf0ff;
}

/* ---------- Document List ---------- */

.p-doc-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.p-doc-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	padding: 8px 12px;
	margin-bottom: 8px;
	border-radius: var(--radius-card);
	background: rgba(255,255,255,0.03);
	border: 1px solid rgba(255,255,255,0.05);
}
.p-doc-row:last-child { margin-bottom: 0; }

.p-doc-left {
	display: flex;
	flex-direction: column;
}

.p-doc-name {
	font-size: 0.875rem;
	font-weight: 600;
}

.p-doc-sub {
	font-size: 0.75rem;
	margin-top: 2px;
	color: rgba(234,240,255,.65);
}

.p-doc-actions {
	display: flex;
	gap: 8px;
}

.p-doc-file{
	display:flex;
	flex-direction:column;
	gap:4px;
}

.p-doc-file-name{
	font-size:0.8125rem;
	font-weight:600;
	word-break:break-all;
}

.p-doc-file-actions{
	font-size:0.75rem;
	display:flex;
	gap:10px;
}

.p-link{
	color:#3182ce;
	cursor:pointer;
	text-decoration:none;
}

.p-link:hover{
	text-decoration:underline;
}

.p-doc-file-row{
	display:flex;
	align-items:center;
	gap:8px;
	justify-content:space-between;
}

.p-doc-file-icon{
	font-size:1.125rem;
	line-height:1;
}

.p-doc-file-name{
	font-size:0.8125rem;
	font-weight:600;
	word-break:break-all;
}

/* ---------- Trusted devices (Account page) ---------- */

.p-trusted-device-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.p-trusted-device {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	border-radius: var(--radius-card);
	background: rgba(255,255,255,0.03);
	border: 1px solid rgba(255,255,255,0.06);
	gap: 12px;
}

/* ---------- Manage users grid ---------- */

.p-user-admin-header,
.p-user-admin-row {
	grid-template-columns: 1.2fr 1.6fr 5rem 6.875rem 8.125rem 10rem;
}

/* ---------- Lucide icon utilities (Brand Guidelines §7) ----------
   All UI icons are inline Lucide SVGs (see inc/lucide.php / window.regioIcon).
   `.ic` is the shared base; color is normally set per-context via inline
   style or currentColor. `.ic-warn` is the ONE mode-specific status color
   (warning/pending): #EA580C light, #FB923C dark — never a single hex. */
.ic {
	display: inline-block;
	vertical-align: middle;
	flex: 0 0 auto;
}
.ic-warn { color: #FB923C; }                         /* dark mode (portal default) */
:root[data-theme="light"] .ic-warn { color: #EA580C; }

/* Warning/pending left-accent for callout cards — mode-aware brand warn. */
.p-card-warn { border-left: 4px solid #FB923C; }
:root[data-theme="light"] .p-card-warn { border-left-color: #EA580C; }

/* ---------- Inline document findings ---------- */

.p-doc-status-icon {
	display: inline-flex;
	align-items: center;
	margin-right: 6px;
	line-height: 1;
}
.p-doc-status-icon--ok    { color: #16A34A; }        /* Success green */
.p-doc-status-icon--needs { color: #DC2626; }        /* Error red */

.p-doc-findings {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 10px;
}

.p-doc-finding {
	display: flex;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 6px;
	background: rgba(220, 38, 38, 0.10);
	border-left: 3px solid rgba(220, 38, 38, 0.55);
	font-size: 0.8125rem;
	line-height: 1.5;
}
.p-doc-finding--warning {
	background: rgba(251, 146, 60, 0.10);
	border-left-color: rgba(251, 146, 60, 0.55);
}
.p-doc-finding--info {
	background: rgba(56, 189, 248, 0.10);
	border-left-color: rgba(56, 189, 248, 0.55);
}

.p-doc-finding-icon {
	font-size: 0.875rem;
	line-height: 1.4;
	flex-shrink: 0;
}

.p-doc-finding-msg {
	flex: 1;
	color: #eaf0ff;
}

/* ---------- Dropzone ---------- */

.p-doc-dropzone {
	padding: 7px 12px;
	border-radius: var(--radius-card);
	border: 1px dashed rgba(255,255,255,0.2);
	background: rgba(255,255,255,0.02);
	text-align: center;
	cursor: pointer;
	transition: all var(--dur-hover) var(--ease-standard);
	min-width: 180px;
}

.p-doc-dropzone:hover {
	background: rgba(255,255,255,0.06);
	border-color: rgba(255,255,255,0.4);
}

.p-doc-dropzone.is-dragover {
	background: rgba(49,130,206,0.15);
	border-color: #3182ce;
}

.p-doc-drop-text {
	font-size: 0.75rem;
	line-height: 1.4;
}

.p-doc-dropzone.is-uploading {
	opacity: 0.6;
	pointer-events: none;
}

.p-doc-success {
	color: #38a169; /* matches your green palette better */
	font-weight: 600;
}

.p-doc-dropzone.is-uploaded {
	background: rgba(56,161,105,0.15);
	border-color: #38a169;
}



.btn{
	display:inline-flex;
	align-items:center;
	gap:6px;
	padding:10px 16px;
	border-radius:8px;
	font-weight:600;
	cursor:pointer;
}

.btn-primary{
	background:#4f7cff;
	color:#fff;
	border:none;
}

.btn-outline{
	background:transparent;
	border:1px solid rgba(255,255,255,.25);
	color:#fff;
}


/* ---------- Dashboard alerts ---------- */
.p-announcement {
	padding: 14px 16px;
	border-radius: var(--radius-card);
	font-size: 0.875rem;
	line-height: 1.5;

	/* Unified with .p-status-chip--pending (warn tint). */
	background: rgba(251, 146, 60, 0.12);
	border: 1px solid rgba(251, 146, 60, 0.40);
	color: #FB923C;
}
:root[data-theme="light"] .p-announcement { color: #EA580C; }

/* ---------- Login page layout overrides ---------- */

#card-login #step-creds > .p-row:first-child{
	display:flex;
	flex-direction:column;
	align-items:center;
	gap:14px;
}

#card-login #step-creds > .p-row:first-child .p-field{
	width:100%;
	max-width:360px;
}

#card-login #step-creds > .p-row:first-child .p-field input{
	width:100%;
}

#card-login #step-creds > .p-row:first-child .p-field label{
	display:block;
	text-align:left;
}

#card-login #step-creds > .p-row:nth-child(2){
	display:flex;
	flex-direction:column;
	align-items:center;
	gap:12px;
}

#card-login #step-creds > .p-row:nth-child(2) > div{
	margin-left:0 !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px){
	:root{
		--content_pad_y: 18px;
		--content_pad_x: 14px;
	}

	.p-h1{ font-size:1.625rem; }
	.p-topbar-inner{ padding:12px 14px; }
}







/* --------------  Quote Complete ------------- */
#quote-complete .qc-grid{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px; }
#quote-complete .qc-kv{ display:grid; gap:6px; line-height:1.55; }
#quote-complete .qc-kv strong{ font-weight:700; }
#quote-complete .qc-line{ display:flex; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px solid rgba(255,255,255,.08); }
#quote-complete .qc-line:last-child{ border-bottom:0; }
#quote-complete .qc-line--signed{ display:flex; gap:10px; align-items:flex-start; }
#quote-complete .qc-sign{ width:18px; flex:0 0 18px; text-align:center; font-weight:800; }
#quote-complete .qc-left{ flex:1; }
#quote-complete .qc-totals{ border-top:1px solid rgba(255,255,255,.10); margin-top:10px; padding-top:10px; }
#quote-complete .qc-totalRow{ display:flex; justify-content:space-between; padding:6px 0; }
#quote-complete .qc-taxBox{ display:grid; gap:10px; }
#quote-complete .qc-taxRow{ display:flex; gap:16px; align-items:flex-start; }
#quote-complete .qc-taxK{ width:220px; color:var(--muted); }
#quote-complete .qc-taxV{ flex:1; }
#quote-complete .qc-note{ padding:10px 12px; border-radius:12px; background:rgba(255,255,255,.04); color:var(--muted); }
@media (max-width: 980px){
	#quote-complete .qc-grid{ grid-template-columns:1fr; }
	#quote-complete .qc-taxK{ width:160px; }
}

#quote-complete .qc-head{
	display:flex;
	align-items:flex-start;
	justify-content:space-between;
	gap:16px;
	padding:0 0 6px;
	border-bottom:1px solid rgba(255,255,255,.08);
	margin-bottom:6px;
}

#quote-complete .qc-head-left h2{
	margin:0 0 6px;
	font-size:1.75rem;
	letter-spacing:.2px;
}

#quote-complete .qc-head-left .muted{
	line-height:1.45;
}

#quote-complete .qc-head-right{
	display:flex;
	gap:10px;
	align-items:center;
	flex-wrap:wrap;
	justify-content:flex-end;
	margin-top:2px;
}

#quote-complete .qc-head-right .p-btn{
	min-height:42px;
	padding:10px 14px;
	font-weight:800;
}

#quote-complete #btn-email-quote{ position:relative; }
#quote-complete #btn-email-quote .btn-spinner{
	display:none;
	width:14px;
	height:14px;
	margin-left:10px;
	border-radius:50%;
	border:2px solid rgba(255,255,255,.35);
	border-top-color:rgba(255,255,255,.95);
	vertical-align:middle;
}

#quote-complete #btn-email-quote.is-busy .btn-spinner{
	display:inline-block;
	animation: qcBtnSpin .8s linear infinite;
}

#quote-complete #btn-email-quote.is-busy{
	opacity:.85;
	pointer-events:none;
}

@keyframes qcBtnSpin{ to{ transform: rotate(360deg); } }

@media (max-width: 720px){
	#quote-complete .qc-head{
		flex-direction:column;
		align-items:stretch;
	}
	#quote-complete .qc-head-right{
		justify-content:flex-start;
	}
}



/* -------------- END Quote Complete Section --------------- */


/* -------------- Deal Details Dialog --------------- */

.rg-deal-dlg.ui-dialog {
	background: #0d1826;
	color: #eaf0ff;
	border: 1px solid rgba(255,255,255,0.12);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 24px 80px rgba(0,0,0,0.55);
	padding: 0;
}
.rg-deal-dlg .ui-dialog-titlebar {
	background: #1a2540;
	color: #eaf0ff;
	border: none;
	border-bottom: 1px solid rgba(255,255,255,0.10);
	border-radius: 0;
	padding: 14px 18px;
	font-size: 0.9375rem;
	font-weight: 700;
}
.rg-deal-dlg .ui-dialog-titlebar-close {
	color: #eaf0ff;
	opacity: 0.6;
	background: none;
	border: none;
}
.rg-deal-dlg .ui-dialog-titlebar-close:hover { opacity: 1; }
.rg-deal-dlg .ui-dialog-content {
	background: #0d1826;
	color: #eaf0ff;
	padding: 0;
	overflow-y: auto;
}
.rg-deal-dlg .ui-dialog-buttonpane { display: none; }

/* inner deal-detail wrapper gets padding */
.rg-deal-dlg .deal-detail {
	padding: 20px 24px;
}

/* detail title inside dialog */
.rg-deal-dlg .p-detail-title {
	color: #eaf0ff;
	font-weight: 700;
	font-size: 0.9375rem;
	margin-bottom: 10px;
}


/* -------------- Deal Submit Dialog --------------- */

/* Outer frame (T27): kill the jQuery UI default padding so the dark titlebar
   runs edge-to-edge instead of floating inset inside a light border. */
.rg-submit-dialog.ui-dialog {
	padding: 0;
	background: #fff;
	border: 1px solid rgba(0,0,0,0.25);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 24px 80px rgba(0,0,0,0.55);
}
.rg-submit-dialog .ui-dialog-titlebar {
	background: #1a202c;
	color: #fff;
	border: none;
	border-radius: 0;
	padding: 14px 18px;
	font-size: 0.9375rem;
	font-weight: 700;
}
.rg-submit-dialog .ui-dialog-titlebar-close {
	color: #aaa;
	background: none;
	border: none;
	cursor: pointer;
}
.rg-submit-dialog .ui-dialog-titlebar-close:hover { color: #fff; }

.rg-submit-dialog .ui-dialog-content {
	padding: 20px 22px 4px;
	background: #fff;
	color: #1a202c;
}

/* hide the jQuery UI button pane — we render our own buttons inside the content */
.rg-submit-dialog .ui-dialog-buttonpane { display: none; }

/* summary line */
.rg-dlg-summary {
	font-size: 0.8125rem;
	color: #718096;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e2e8f0;
}

/* section label above pills */
.rg-dlg-section-label {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #718096;
	margin-bottom: 8px;
}

/* Return-shipping choice (Premium only) — bordered selectable pills; the
   border/tint is the selection signal (radio dots removed 2026-07-02). */
.rg-dlg-return-ship {
	margin-bottom: 20px;
}
.rg-dlg-opt {
	display: flex;
	align-items: center;
	gap: 10px;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px 12px;
	margin-bottom: 8px;
	background: #f7f8fa;
	cursor: pointer;
	user-select: none;
	transition: border-color var(--dur-hover) var(--ease-standard), background var(--dur-hover) var(--ease-standard);
}
.rg-dlg-opt:last-child { margin-bottom: 0; }
.rg-dlg-opt:hover { border-color: #a0aec0; }
.rg-dlg-opt.is-active { border-color: #4299e1; background: #ebf8ff; }
.rg-dlg-opt-text { font-size: 0.875rem; color: #2d3748; }

/* T18 — destination + shipping-speed chooser inside the submit modal.
   Everything sits in GRIDS (label 2-across, destination 3-across, rates 2×2)
   so the dialog stays compact instead of stacking 7+ full-width rows. */
.rg-dlg-label-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rg-dlg-dest-opts    { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rg-dlg-label-choice .rg-dlg-opt,
.rg-dlg-dest-opts .rg-dlg-opt { margin-bottom: 0; }

/* Card variant: column layout, no radio dot — the border/tint is the signal,
   matching the service-level pills. */
.rg-dlg-opt--card {
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	padding: 10px;
	margin-bottom: 0;
}
.rg-dlg-opt-sub {
	display: block;
	font-size: 0.75rem;
	color: #718096;
	white-space: pre-line;   /* address previews arrive as newline-joined lines */
	margin-top: 2px;
}
.rg-dlg-opt--card .rg-dlg-opt-sub {
	display: -webkit-box;
	-webkit-line-clamp: 3;   /* keep long addresses from re-inflating the card */
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.rg-dlg-opt.is-disabled { opacity: .5; pointer-events: none; }
/* Rate card: service name left, price right on one line; tier sub below. */
.rg-dlg-opt-line {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	width: 100%;
}
.rg-dlg-opt-line .rg-dlg-opt-text { min-width: 0; }
.rg-dlg-rate-amt {
	font-weight: 700;
	font-size: 0.9375rem;
	color: #2d3748;
	flex: 0 0 auto;
	white-space: nowrap;
}
.rg-dlg-rate .rg-dlg-opt-sub { margin-top: 0; }
.rg-dlg-ship-custom { margin-top: 10px; }
.rg-dlg-ship-custom-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.rg-dlg-ship-custom-grid .js-ms-line1,
.rg-dlg-ship-custom-grid .js-ms-line2 { grid-column: 1 / -1; }
/* The submit dialog is light in both themes, so these inputs are styled
   explicitly light (input.p-input follows the page theme and would go dark). */
.rg-dlg-input {
	box-sizing: border-box;
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #ffffff;
	color: #2d3748;
	font: inherit;
	font-size: 0.875rem;
	outline: none;
}
.rg-dlg-input:focus { border-color: #4299e1; box-shadow: 0 0 0 3px rgba(66,153,225,.18); }
.rg-dlg-check {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 10px 0;
	font-size: 0.8125rem;
	color: #4a5568;
	cursor: pointer;
}
.rg-dlg-check input { margin: 0; }
.rg-dlg-ship-status { font-size: 0.8125rem; color: #718096; }
.rg-dlg-ship-status:empty { display: none; }
.rg-dlg-rate-opts { margin-top: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rg-dlg-ship-note {
	margin-top: 10px;
	font-size: 0.75rem;
	line-height: 1.45;
	color: #718096;
}

/* pill radio group */
.rg-dlg-pills {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
}
.rg-dlg-pill {
	flex: 1;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	padding: 12px 14px;
	cursor: pointer;
	user-select: none;
	transition: border-color var(--dur-hover) var(--ease-standard), background var(--dur-hover) var(--ease-standard);
	background: #f7f8fa;
}
.rg-dlg-pill:hover {
	border-color: #a0aec0;
	background: #edf2f7;
}
.rg-dlg-pill.is-active {
	border-color: #4299e1;
	background: #ebf8ff;
}
/* Name left, price right on one line (saves a row per pill). */
.rg-dlg-pill-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 2px;
}
.rg-dlg-pill-name {
	font-size: 0.8125rem;
	font-weight: 700;
	color: #2d3748;
}
.rg-dlg-pill-price {
	font-size: 1rem;
	font-weight: 900;
	color: #1a202c;
	white-space: nowrap;
}
.rg-dlg-pill.is-active .rg-dlg-pill-price { color: #2b6cb0; }
.rg-dlg-pill-desc {
	font-size: 0.6875rem;
	color: #718096;
	line-height: 1.4;
}

/* fee breakdown table */
.rg-dlg-fee-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 16px;
	font-size: 0.875rem;
}
.rg-dlg-fee-table td {
	padding: 6px 4px;
	vertical-align: middle;
	color: #4a5568;
}
.rg-dlg-fee-table tr + tr td { border-top: 1px solid #f0f4f8; }
.rg-dlg-amt {
	text-align: right;
	white-space: nowrap;
	font-weight: 600;
	width: 90px;
	color: #2d3748;
}
.rg-dlg-total-row td {
	padding-top: 10px;
	font-size: 0.9375rem;
	color: #1a202c;
	border-top: 2px solid #cbd5e0 !important;
}

/* auth notice */
.rg-dlg-auth-note {
	font-size: 0.75rem;
	color: #718096;
	background: #f7f8fa;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	padding: 10px 12px;
	line-height: 1.6;
	margin-bottom: 18px;
}

/* buttons row */
.rg-dlg-btn-row {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	padding: 14px 0 6px;
	border-top: 1px solid #e2e8f0;
}
.rg-dlg-btn {
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	border: none;
	transition: background var(--dur-hover) var(--ease-standard), opacity var(--dur-hover) var(--ease-standard);
}
.rg-dlg-btn-cancel {
	background: #edf2f7;
	color: #4a5568;
}
.rg-dlg-btn-cancel:hover { background: #e2e8f0; }
.rg-dlg-btn-confirm {
	background: #3182ce;
	color: #fff;
}
.rg-dlg-btn-confirm:hover { background: #2b6cb0; }
.rg-dlg-btn-confirm:disabled {
	opacity: .6;
	cursor: not-allowed;
}

/* -------------- END Deal Submit Dialog --------------- */


/* -------------- Processing Details Form --------------- */

.p-proc-field {
	margin-bottom: 16px;
}
.p-proc-label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 700;
	margin-bottom: 5px;
	color: #e2e8f0;
}
.p-proc-input {
	width: 100%;
	max-width: 340px;
	padding: 8px 10px;
	border-radius: var(--radius-input);
	border: 1px solid rgba(255,255,255,.14);
	background: rgba(255,255,255,.06);
	color: #f0f4f8;
	font-size: 0.875rem;
}
.p-proc-input:focus {
	outline: none;
	border-color: rgba(78,161,255,.55);
	background: rgba(255,255,255,.09);
}
.p-proc-input option {
	background: #1a202c;
	color: #f0f4f8;
}
.p-proc-help {
	font-size: 0.75rem;
	color: #718096;
	margin-top: 4px;
	max-width: 400px;
	line-height: 1.5;
}
.p-proc-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
}
.p-proc-status {
	font-size: 0.8125rem;
}

/* -------------- END Processing Details Form --------------- */

/* -------------- Pre-Submission Review Banners --------------- */

.p-review-banner {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 14px 18px;
	border-radius: 8px;
	margin-bottom: 16px;
	border: 1px solid;
}

.p-review-banner-icon {
	font-size: 1.375rem;
	line-height: 1;
	flex-shrink: 0;
	margin-top: 1px;
}

.p-review-banner-title {
	font-weight: 700;
	font-size: 0.875rem;
	margin-bottom: 4px;
}

.p-review-banner-sub {
	font-size: 0.8125rem;
	opacity: 0.8;
}

.p-review-banner-note {
	font-size: 0.8125rem;
	margin-top: 8px;
	padding: 8px 12px;
	border-radius: var(--radius-input);
	background: rgba(0,0,0,0.2);
	white-space: pre-wrap;
}

.p-review-banner-actions {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.p-review-banner--approved {
	background: rgba(22,163,74,0.10);
	border-color: rgba(22,163,74,0.35);
	color: #86efac;
}
.p-review-banner--approved .p-review-banner-title { color: #4ade80; }

.p-review-banner--corrections {
	background: rgba(220,38,38,0.10);
	border-color: rgba(220,38,38,0.35);
	color: #fca5a5;
}
.p-review-banner--corrections .p-review-banner-title { color: #f87171; }

.p-review-banner--pending {
	background: rgba(251,146,60,0.10);
	border-color: rgba(251,146,60,0.30);
	color: #FB923C;
}
.p-review-banner--pending .p-review-banner-title { color: #FB923C; }

.p-review-banner--ach {
	background: rgba(37,99,235,0.12);
	border-color: rgba(37,99,235,0.40);
	color: #bfdbfe;
}
.p-review-banner--ach .p-review-banner-title { color: #93c5fd; }

/* ── FINDINGS SUMMARY CARD ─────────────────────────────────────────
   Shown on a deal-detail page when the title clerk has sent curated
   review findings to the dealer. One row per finding. */
.p-findings-section {
	background: rgba(15,23,42,0.30);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 8px;
	padding: 16px 18px;
	margin: 0 0 18px 0;
}

.p-findings-header {
	margin-bottom: 12px;
}

.p-findings-title {
	font-size: 0.875rem;
	font-weight: 700;
	color: #f1f5f9;
}

.p-findings-meta {
	font-size: 0.75rem;
	color: rgba(255,255,255,0.55);
	margin-top: 4px;
}

.p-findings-sep {
	margin: 0 6px;
	opacity: 0.6;
}

.p-findings-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.p-finding-card {
	display: flex;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 6px;
	border: 1px solid;
	background: rgba(0,0,0,0.22);
}

.p-finding-card--error   { border-color: rgba(220,38,38,0.40); }
.p-finding-card--warning { border-color: rgba(251,146,60,0.40); }
.p-finding-card--info    { border-color: rgba(56,189,248,0.40); }

.p-finding-card-icon {
	font-size: 1.125rem;
	line-height: 1;
	flex-shrink: 0;
	margin-top: 2px;
}

.p-finding-card-body {
	flex: 1;
	min-width: 0;
}

.p-finding-card-num {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: rgba(255,255,255,0.45);
	text-transform: uppercase;
	margin-bottom: 4px;
}

.p-finding-card-msg {
	font-size: 0.875rem;
	line-height: 1.45;
	color: rgba(255,255,255,0.92);
}

.p-finding-card-affects {
	font-size: 0.75rem;
	margin-top: 8px;
	color: rgba(255,255,255,0.55);
}

.p-finding-card-affects strong {
	color: rgba(255,255,255,0.78);
	font-weight: 600;
}

.p-btn-danger {
	background: rgba(220,38,38,0.15);
	color: #fca5a5;
	border: 1px solid rgba(220,38,38,0.35);
}
.p-btn-danger:hover {
	background: rgba(220,38,38,0.28);
	color: #fecaca;
}

/* clerk rejection note on individual doc files */
.p-doc-clerk-note {
	font-size: 0.75rem;
	color: #f87171;
	margin-top: 3px;
	font-style: italic;
}

/* review request section */
.p-review-request-section {
	border-top: 1px solid rgba(255,255,255,0.08);
	padding-top: 16px;
}

/* ── Dealer unread message badge ── */
.p-deal-unread-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.6875rem;
	font-weight: 600;
	color: #0EA5E9;                          /* brand Info — "new messages" (dark) */
	background: rgba(14,165,233,0.12);
	border: 1px solid rgba(14,165,233,0.3);
	border-radius: 20px;
	padding: 2px 8px;
	white-space: nowrap;
	margin-bottom: 4px;
	cursor: pointer;
}

/* ── Messages dialog (standalone) ── */
.p-msg-dialog.ui-dialog {
	background: #1e2533;
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.6);
	color: #e2e8f0;
}
.p-msg-dialog .ui-dialog-titlebar {
	background: #1e2533;
	border-bottom: 1px solid rgba(255,255,255,0.08);
	color: #e2e8f0;
	border-radius: 10px 10px 0 0;
	padding: 12px 16px;
	font-size: 0.875rem;
	font-weight: 600;
}
.p-msg-dialog .ui-dialog-titlebar-close {
	color: #94a3b8;
	background: none;
	border: none;
}
.p-msg-dialog .ui-dialog-titlebar-close:hover { color: #e2e8f0; }
.p-msg-dialog .ui-dialog-content {
	background: #1e2533;
	color: #e2e8f0;
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow: hidden;
}
.p-msg-dialog .ui-dialog-buttonpane { display: none; }
.p-msg-thread {
	flex: 1;
	min-height: 0;
	max-height: 320px;
}

/* ── Message thread ── */
.msg-section {
	border-top: 1px solid rgba(255,255,255,0.08);
	padding-top: 16px;
}
.msg-thread {
	max-height: 320px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 4px 0 10px;
}
.msg-empty { font-size: 0.8125rem; padding: 8px 0; }
.msg-bubble {
	max-width: 75%;
	padding: 9px 13px;
	border-radius: 12px;
	font-size: 0.8125rem;
	line-height: 1.5;
}
.msg-bubble--admin {
	align-self: flex-start;
	background: rgba(255,255,255,0.08);
	border-bottom-left-radius: 3px;
}
.msg-bubble--dealer {
	align-self: flex-end;
	background: #3A80D2;   /* Horizon Blue (2026-07-02 call) — was an off-brand royal blue */
	/* Blue bubble in both themes, so force white text — without this it inherited
	   the theme's default color and read as dark-on-blue in light mode. */
	color: #ffffff;
	border-bottom-right-radius: 3px;
}
/* iPhone-style day separator between message groups (decided 2026-07-01). */
.msg-day-sep {
	align-self: center;
	font-size: 0.6875rem;
	font-weight: 600;
	color: #94a3b8;
	margin: 6px 0 2px;
}
.msg-bubble-meta {
	font-size: 0.6875rem;
	opacity: 0.6;
	margin-bottom: 4px;
}
.msg-bubble-name { font-weight: 600; }
.msg-bubble-time { margin-left: 6px; }
.msg-bubble-body { word-break: break-word; }
.msg-compose { margin-top: 10px; }
.msg-input {
	width: 100%;
	box-sizing: border-box;
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.14);
	border-radius: 6px;
	color: #e2e8f0;
	font-size: 0.8125rem;
	padding: 8px 10px;
	resize: vertical;
}
.msg-input:focus {
	outline: none;
	border-color: #3b82f6;
}
.msg-compose-actions {
	display: flex;
	align-items: center;
	margin-top: 8px;
	gap: 10px;
}

/* ── Form-style dialog (Manage Users invite/edit) — dark theme, visible button pane ── */
.p-form-dialog.ui-dialog {
	background: #0d1826;
	color: #eaf0ff;
	border: 1px solid #1e3a5f;
	border-radius: 10px;
	box-shadow: 0 8px 40px rgba(0,0,0,0.6);
	padding: 0;
}
.p-form-dialog .ui-dialog-titlebar {
	background: #1a2540;
	color: #eaf0ff;
	border: none;
	border-radius: 10px 10px 0 0;
	padding: 14px 18px;
	font-size: 0.875rem;
	font-weight: 700;
}
.p-form-dialog .ui-dialog-titlebar-close {
	color: #94a3b8;
	background: none;
	border: none;
	opacity: 0.7;
	cursor: pointer;
}
.p-form-dialog .ui-dialog-titlebar-close:hover { opacity: 1; color: #fff; }
.p-form-dialog .ui-dialog-content {
	background: #0d1826;
	color: #eaf0ff;
	padding: 18px 20px 16px;
	box-sizing: border-box;
	overflow-x: hidden;
}
.p-form-dialog .ui-dialog-content,
.p-form-dialog .ui-dialog-content * { box-sizing: border-box; }
.p-form-dialog .ui-dialog-content .p-field {
	margin-bottom: 12px;
	min-width: 0;
	max-width: none;
	width: 100%;
}
.p-form-dialog .ui-dialog-content input,
.p-form-dialog .ui-dialog-content select,
.p-form-dialog .ui-dialog-content textarea { width: 100%; max-width: 100%; }
.p-form-dialog .ui-dialog-content .p-field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.p-form-dialog .ui-dialog-content .p-field-row .p-field { flex: 1 1 140px; }
.p-form-dialog .ui-dialog-content label { color: #cbd5e1; }
.p-form-dialog .ui-dialog-buttonpane {
	background: #0d1826;
	border-top: 1px solid rgba(255,255,255,0.08);
	border-radius: 0 0 10px 10px;
	padding: 10px 16px;
	margin-top: 0;
}
.p-form-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
.p-form-dialog .ui-dialog-buttonpane button {
	padding: 8px 14px;
	margin-left: 8px;
	border-radius: 8px;
	border: 1px solid rgba(255,255,255,0.18);
	background: rgba(255,255,255,0.04);
	color: #eaf0ff;
	cursor: pointer;
	font: inherit;
}
.p-form-dialog .ui-dialog-buttonpane button:hover {
	background: rgba(255,255,255,0.08);
}
.p-form-dialog .ui-dialog-buttonpane button.ui-button:first-child {
	background: #1d4ed8;
	border-color: #1d4ed8;
}
.p-form-dialog .ui-dialog-buttonpane button.ui-button:first-child:hover {
	background: #2563eb;
}

/* Yes/No segmented pill control (Manage Users dialogs) */
.p-yesno {
	display: inline-flex;
	border: 1px solid rgba(255,255,255,0.18);
	border-radius: 8px;
	overflow: hidden;
	background: rgba(255,255,255,0.04);
}
.p-yesno-btn {
	padding: 7px 20px;
	border: 0;
	background: transparent;
	color: #cbd5e1;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	min-width: 64px;
}
.p-yesno-btn + .p-yesno-btn {
	border-left: 1px solid rgba(255,255,255,0.18);
}
.p-yesno-btn:hover {
	background: rgba(255,255,255,0.06);
	color: #eaf0ff;
}
.p-yesno-btn.is-on {
	background: #1d4ed8;
	color: #fff;
}
.p-yesno-btn.is-on:hover {
	background: #2563eb;
}

/* ---------- §7 Onboarding checklist ---------- */
.p-ck-list { display:flex; flex-direction:column; gap:2px; }
.p-ck-item { display:flex; align-items:flex-start; gap:12px; padding:10px 4px; border-bottom:1px solid #1e293b; }
.p-ck-item:last-child { border-bottom:0; }
.p-ck-mark { flex:0 0 22px; width:22px; height:22px; border-radius:50%; display:inline-flex;
	align-items:center; justify-content:center; font-size:0.8125rem; font-weight:700; margin-top:1px; }
.p-ck-done { background:#14532d; color:#bbf7d0; }
.p-ck-todo { background:transparent; border:2px solid #334155; }
.p-ck-body { flex:1; min-width:0; }
.p-ck-label { font-weight:600; font-size:0.875rem; }
.p-ck-action { display:inline-block; margin-top:3px; font-size:0.8125rem; color:#60a5fa; text-decoration:none; }
.p-ck-action:hover { text-decoration:underline; }
.p-ck-note { display:inline-block; margin-top:3px; font-size:0.8125rem; }
.p-ck-note + .p-ck-action { margin-left:10px; }
.p-ck-waiting { display:flex; align-items:baseline; gap:6px; margin-top:3px; font-size:0.78125rem;
	flex-wrap:wrap; color:#FB923C; } /* warn (brand): forwarded, awaiting someone else */
.p-ck-waiting + .p-ck-action { margin-top:2px; font-size:0.78125rem; }

/* ── Group D: onboarding drawer (right-edge slide-out) ─────────────────────── */
/* Brand motif: precise/controlled, dense, 8px radius, signature arc gauge.    */
/* Anchored to the lower-right corner with its bottom resting on top of the
   footer (bottom = footer height). The drawer is only as tall as its content;
   max-height keeps it clear of the sticky topbar (~66px) so it never underlaps
   the nav, and the body scrolls if the checklist is taller than that.
   Shrink-wraps to the panel so the collapsed tab can pin flush to the right. */
.p-ob-drawer{ position:fixed; right:0; bottom:var(--footer_h); z-index:60; pointer-events:none; }
.p-ob-drawer > *{ pointer-events:auto; }

/* Panel — sits above the tab (z-index) so the tab is hidden behind it while
   open and revealed as the panel slides away. */
.p-ob-panel{ position:relative; z-index:2;
	width:340px; max-width:88vw; max-height:calc(100vh - var(--footer_h) - 82px);
	box-sizing:border-box;
	background:#101a2e; border:1px solid var(--border); border-right:0;
	border-radius:8px 0 0 8px;
	box-shadow:-10px 0 30px rgba(0,0,0,.28);
	display:flex; flex-direction:column;
	transform:translateX(0); transition:transform 240ms cubic-bezier(.4,0,.2,1); }
/* Collapse: slide the whole panel off the right edge (horizontal only, so it
   keeps its height and bottom position), uncovering the full-height tab. */
.p-ob-drawer[data-state="collapsed"] .p-ob-panel{ transform:translateX(100%); }

.p-ob-head{ display:flex; align-items:center; gap:12px; padding:20px 24px;
	border-bottom:1px solid var(--border); }
.p-ob-head-text{ flex:1; min-width:0; }
.p-ob-title{ font-weight:700; font-size:0.9375rem; color:var(--text); }
.p-ob-sub{ font-size:0.78125rem; color:var(--muted); margin-top:2px; }
.p-ob-collapse{ flex:0 0 auto; width:30px; height:30px; border-radius:6px;
	background:transparent; border:1px solid var(--border); color:var(--muted);
	cursor:pointer; display:inline-flex; align-items:center; justify-content:center;
	transition:color 120ms ease-in-out, border-color 120ms ease-in-out; }
.p-ob-collapse:hover{ color:#3A80D2; border-color:#3A80D2; }
.p-ob-collapse svg{ width:18px; height:18px; }

/* Signature arc gauge */
.p-ob-gauge{ position:relative; flex:0 0 auto; width:48px; height:48px; }
.p-ob-gauge svg{ width:48px; height:48px; display:block; }
.p-ob-gauge-track{ stroke:#243049; }
.p-ob-gauge-arc{ stroke:#3A80D2;
	transition:stroke-dashoffset 500ms cubic-bezier(.25,.46,.45,.94); }
.p-ob-gauge-num{ position:absolute; inset:0; display:flex; align-items:center;
	justify-content:center; font-size:0.75rem; font-weight:700; color:var(--text); }

.p-ob-body{ flex:1; overflow-y:auto; padding:10px 24px 24px; }
.p-ob-premium{ margin:14px 0; padding:10px 12px; background:#0f231a;
	border:1px solid #14532d; border-radius:8px; color:#bbf7d0; font-size:0.8125rem; }

/* Collapsed handle: full-height vertical tab pinned flush to the right edge,
   spanning the same height as the open drawer so the re-open target sits right
   where the collapse arrow was. Always present behind the panel (z-index:1) and
   revealed when the panel slides off. */
.p-ob-tab{ position:absolute; top:0; right:0; bottom:0; z-index:1;
	display:inline-flex; flex-direction:column; align-items:center; gap:14px;
	background:#101a2e; color:var(--text); cursor:pointer;
	border:1px solid var(--border); border-right:0;
	border-radius:8px 0 0 8px; padding:20px 9px;
	box-shadow:-6px 0 18px rgba(0,0,0,.22);
	visibility:hidden; transition:color 120ms ease-in-out; }
/* Visible (and focusable) only when collapsed; while open it's hidden behind
   the panel and kept out of the tab order. */
.p-ob-drawer[data-state="collapsed"] .p-ob-tab{ visibility:visible; }
.p-ob-tab:hover{ color:#3A80D2; }

/* Expand chevron — mirrors the > collapse button, pinned to the top of the
   handle so it lands in the same place the collapse arrow occupied. */
.p-ob-tab-arrow{ flex:0 0 auto; width:30px; height:30px; border-radius:6px;
	border:1px solid var(--border); color:var(--muted);
	display:inline-flex; align-items:center; justify-content:center;
	transition:color 120ms ease-in-out, border-color 120ms ease-in-out; }
.p-ob-tab:hover .p-ob-tab-arrow{ color:#3A80D2; border-color:#3A80D2; }
.p-ob-tab-arrow svg{ width:18px; height:18px; }

/* Progress gauge + count, stacked vertically below the chevron */
.p-ob-tab-stack{ flex:1 1 auto; display:inline-flex; flex-direction:column;
	align-items:center; justify-content:center; gap:8px;
	writing-mode:vertical-rl; transform:rotate(180deg); }
.p-ob-tab-stack svg{ width:18px; height:18px; }
.p-ob-tab-label{ font-size:0.78125rem; font-weight:600; letter-spacing:.02em; }
.p-ob-tab-label em{ font-style:normal; color:var(--muted); }

@media (max-width:768px){
	.p-ob-panel{ width:100vw; max-width:100vw; }
}
@media (prefers-reduced-motion: reduce){
	/* The collapse/expand slide is intentionally kept even under reduced motion
	   (it's the drawer's core affordance); only the decorative gauge fill is
	   stilled. */
	.p-ob-gauge-arc{ transition:none; }
}

/* ── Onboarding completion celebration (all 6 steps done) ─────────────────── */
/* The finished panel spins down into a vanishing point (whirlpool). */
@keyframes p-ob-whirl{
	0%   { transform:rotate(0deg)   scale(1);   opacity:1; }
	55%  { transform:rotate(380deg) scale(.5)  translateY(46px);  opacity:1; }
	100% { transform:rotate(840deg) scale(0)   translateY(140px); opacity:0; }
}
.p-ob-panel.is-whirl{
	transform-origin:50% 62%;
	animation:p-ob-whirl 840ms cubic-bezier(.6,.04,.98,.34) forwards;
	pointer-events:none;
}

/* Burst overlay — fixed, anchored on the panel's centre (JS sets left/top). */
.p-ob-burst{ position:fixed; z-index:9999; width:0; height:0; pointer-events:none; }

/* Check badge that pops out of the explosion, then fades. */
@keyframes p-ob-pop{
	0%   { transform:translate(-50%,-50%) scale(0)    rotate(-25deg); opacity:0; }
	40%  { transform:translate(-50%,-50%) scale(1.25) rotate(8deg);   opacity:1; }
	60%  { transform:translate(-50%,-50%) scale(.92)  rotate(-3deg); }
	78%  { transform:translate(-50%,-50%) scale(1.05) rotate(0deg); }
	100% { transform:translate(-50%,-50%) scale(1)    rotate(0deg);   opacity:1; }
}
@keyframes p-ob-badge-fade{ to{ opacity:0; transform:translate(-50%,-50%) scale(.85); } }
.p-ob-badge{
	position:absolute; left:0; top:0; width:84px; height:84px; border-radius:50%;
	display:flex; align-items:center; justify-content:center; color:#fff;
	background:radial-gradient(circle at 50% 38%, #34d399, #10b981 62%, #059669);
	box-shadow:0 10px 28px rgba(16,185,129,.45);
	animation:p-ob-pop 520ms cubic-bezier(.18,1.5,.5,1) forwards,
	          p-ob-badge-fade 460ms ease-in 1150ms forwards;
}
.p-ob-badge svg{ width:46px; height:46px; }

/* Shockwave ring at the moment of the pop. */
@keyframes p-ob-ring{
	0%   { transform:translate(-50%,-50%) scale(.2); opacity:.85; }
	100% { transform:translate(-50%,-50%) scale(2.7); opacity:0; }
}
.p-ob-ring{
	position:absolute; left:0; top:0; width:120px; height:120px; border-radius:50%;
	border:3px solid rgba(52,211,153,.9);
	animation:p-ob-ring 600ms ease-out forwards;
}

/* Confetti particles — JS sets --dx/--dy (travel), --rot, --hue, --dur. */
@keyframes p-ob-confetti{
	0%   { transform:translate(-50%,-50%) rotate(0deg); opacity:1; }
	100% { transform:translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)); opacity:0; }
}
.p-ob-confetti{
	position:absolute; left:0; top:0; width:9px; height:14px; border-radius:2px;
	background:var(--c,#3A80D2);   /* brand blues/whites/grays — JS sets --c */
	animation:p-ob-confetti var(--dur,900ms) cubic-bezier(.15,.6,.4,1) forwards;
}
/* The completion celebration intentionally plays even under reduced motion —
   it's a one-time, user-initiated reward moment, not ambient animation. */

/* ============================================================
   Deal detail dialog — aesthetic rework + per-deal accounting
   Scoped to .rg-deal-dlg so inline quote views are untouched.
   Each section becomes a self-contained card; titles get a
   brand accent bar; the Accounting section gets a ledger UI.
   ============================================================ */

.rg-deal-dlg .deal-detail{
	padding:18px;
	display:flex;
	flex-direction:column;
	gap:14px;
}

/* card-ify every detail section uniformly (overrides the old
   top-border divider + scattered inline margins) */
.rg-deal-dlg .deal-detail .p-detail-section{
	margin:0 !important;
	padding:16px;
	border:1px solid rgba(255,255,255,.07);
	border-radius:12px;
	background:rgba(255,255,255,.02);
}

/* section title gets a brand accent bar */
.rg-deal-dlg .deal-detail .p-detail-title{
	font-size:.95rem;
	font-weight:700;
	display:flex;
	align-items:center;
	gap:9px;
	margin-bottom:12px;
}
.rg-deal-dlg .deal-detail .p-detail-title::before{
	content:"";
	flex:0 0 auto;
	width:3px;
	height:15px;
	border-radius:2px;
	background:var(--brand-horizon);
}
/* keep the title in the doc/accounting header rows on one line w/ the meta */
.rg-deal-dlg .p-doc-header .p-detail-title{ margin-bottom:0; }

/* ---------- Accounting ledger ---------- */

/* current-balance pill in the section header */
.p-acct-balance{
	font-size:.8rem;
	font-weight:700;
	padding:4px 11px;
	border-radius:999px;
	white-space:nowrap;
	font-variant-numeric:tabular-nums;
}
.p-acct-balance--cleared{ background:rgba(34,197,94,.15);  color:#4ade80; }
.p-acct-balance--pending{ background:rgba(251,146,60,.16); color:#FB923C; }
.p-acct-balance--refund{  background:rgba(58,128,210,.18); color:#7aa7ff; }

/* Chronological ledger (Jun 26 redesign) — an invoice-style statement:
   one date-ordered row per transaction, amounts right-aligned, totals below. */
.p-ledger{ display:flex; flex-direction:column; }
.p-ledger-head,
.p-ledger-row{
	display:grid;
	grid-template-columns:5.5rem 1fr 4rem 5.5rem 6.875rem;
	align-items:center;
	gap:10px;
	padding:8px 10px;
}
.p-ledger-head{
	font-size:.64rem;
	text-transform:uppercase;
	letter-spacing:.06em;
	font-weight:700;
	color:var(--muted,#94A3B8);
	border-bottom:1px solid rgba(255,255,255,.1);
}
.p-ledger-row{ border-bottom:1px solid rgba(255,255,255,.05); }
.p-ledger-row:last-child{ border-bottom:none; }
.p-ledger-row.is-voided{ opacity:.5; }
.p-ledger-row.is-voided .p-ledger-amt{ text-decoration:line-through; }

.p-ledger-date{ font-size:.78rem; color:var(--muted,#94A3B8); font-variant-numeric:tabular-nums; white-space:nowrap; }
.p-ledger-desc{ font-size:.86rem; font-weight:600; }
.p-ledger-method{ font-size:.76rem; color:var(--muted,#94A3B8); }
.p-ledger-status{ white-space:nowrap; }
.p-ledger-amt{ text-align:right; font-size:.88rem; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
.p-ledger-amt.is-neg{ color:#cbd5e1; font-weight:700; }

/* Totals / balance footer */
.p-ledger-totals{
	margin-top:14px;
	padding-top:12px;
	border-top:1px solid rgba(255,255,255,.12);
	display:flex;
	flex-direction:column;
	gap:7px;
}
.p-ledger-total{
	display:flex;
	justify-content:space-between;
	align-items:center;
	font-size:.85rem;
}
.p-ledger-total > span:first-child{ color:var(--muted,#94A3B8); }
.p-ledger-total > span:last-child{ font-weight:800; font-variant-numeric:tabular-nums; }
.p-ledger-balance{
	margin-top:5px;
	padding-top:10px;
	border-top:1px dashed rgba(255,255,255,.14);
	font-size:.98rem;
}
.p-ledger-balance > span:first-child{ color:var(--text,#eaf0ff); font-weight:700; }

.p-acct-status{
	font-size:.64rem;
	font-weight:700;
	text-transform:uppercase;
	letter-spacing:.04em;
	padding:2px 8px;
	border-radius:999px;
}
.p-acct-status--cleared{ background:rgba(34,197,94,.15);  color:#4ade80; }
.p-acct-status--pending{ background:rgba(251,146,60,.16); color:#FB923C; }
.p-acct-status--failed{  background:rgba(239,68,68,.16);  color:#f87171; }
.p-acct-status--voided{  background:rgba(148,163,184,.16);color:#94a3b8; }

.p-acct-note{ font-size:.72rem; margin-top:12px; line-height:1.5; }

/* ---------- Light theme ---------- */
:root[data-theme="light"] .rg-deal-dlg .deal-detail .p-detail-section{
	background:#F8FAFC;
	border-color:#E2E8F0;
}
:root[data-theme="light"] .p-ledger-head{ border-bottom-color:#E2E8F0; }
:root[data-theme="light"] .p-ledger-row{ border-bottom-color:#EDF1F6; }
:root[data-theme="light"] .p-ledger-desc{ color:#0A2540; }
:root[data-theme="light"] .p-ledger-method{ color:#64748B; }
:root[data-theme="light"] .p-ledger-amt.is-neg{ color:#475569; }
:root[data-theme="light"] .p-ledger-totals{ border-top-color:#E2E8F0; }
:root[data-theme="light"] .p-ledger-balance{ border-top-color:#E2E8F0; }
:root[data-theme="light"] .p-ledger-total > span:last-child{ color:#0A2540; }
:root[data-theme="light"] .p-acct-status--cleared{ background:#DCFCE7; color:#15803D; }
:root[data-theme="light"] .p-acct-status--pending{ background:#FFEDD5; color:#EA580C; }
:root[data-theme="light"] .p-acct-status--failed{  background:#FEE2E2; color:#B91C1C; }
:root[data-theme="light"] .p-acct-status--voided{  background:#F1F5F9; color:#64748B; }
:root[data-theme="light"] .p-acct-balance--cleared{ background:#DCFCE7; color:#15803D; }
:root[data-theme="light"] .p-acct-balance--pending{ background:#FFEDD5; color:#EA580C; }
:root[data-theme="light"] .p-acct-balance--refund{  background:#E0ECFB; color:#1B4F8A; }

/* When any modal dialog is open, freeze the page behind it so the
   background doesn't scroll under the overlay (2026-07-01 walkthrough). */
body.rg-modal-open{ overflow:hidden; }

/* ============================================================
   Deal modal — near-full-viewport tabbed shell
   The dialog content becomes a flex column: a fixed tab bar on
   top and a single scrolling body that swaps tab panels. Only
   the body scrolls, so the tab bar stays put on small laptops.
   ============================================================ */
.rg-deal-dlg .ui-dialog-content{
	padding:0 !important;
	overflow:hidden !important;
	display:flex;
	flex-direction:column;
}
.rg-deal-dlg .deal-detail.rg-deal-tabbed{
	flex:1 1 auto;
	min-height:0;
	padding:0;
	gap:0;
	display:flex;
	flex-direction:column;
}

.p-deal-tabs{
	flex:0 0 auto;
	display:flex;
	gap:2px;
	padding:0 14px;
	background:rgba(255,255,255,.02);
	border-bottom:1px solid rgba(255,255,255,.08);
}
.p-deal-tab{
	appearance:none;
	background:none;
	border:0;
	border-bottom:2px solid transparent;
	margin-bottom:-1px;
	cursor:pointer;
	font:inherit;
	font-weight:600;
	font-size:.9rem;
	color:var(--muted,#94A3B8);
	padding:12px 16px;
	display:inline-flex;
	align-items:center;
	gap:8px;
	transition:color var(--dur-hover) var(--ease-standard);
}
.p-deal-tab:hover{ color:#eaf0ff; }
.p-deal-tab.is-active{ color:#eaf0ff; border-bottom-color:var(--brand-horizon,#3A80D2); }
.p-deal-tab-pill{
	font-size:.6rem;
	font-weight:700;
	text-transform:uppercase;
	letter-spacing:.04em;
	padding:2px 7px;
	border-radius:999px;
}

.p-deal-tabbody{
	flex:1 1 auto;
	min-height:0;
	overflow-y:auto;
	padding:18px;
	display:flex;
	flex-direction:column;
	gap:14px;
}
.p-deal-tabpanel{ display:none; flex-direction:column; gap:14px; }
.p-deal-tabpanel.is-active{ display:flex; }

/* Return Shipping tab, Standard deal — de-emphasized (grayed) tab + panel text,
   but still openable to reach the Upgrade-to-Premium prompt (T16/T17). */
.p-deal-tab--muted{ opacity:.55; }
.p-deal-tabpanel.is-muted .p-detail-title,
.p-deal-tabpanel.is-muted .p-detail-note{ opacity:.7; }

/* Return-label choice cards (Premium Return Shipping tab) — matches .q-choice */
.p-return-choices{ display:flex; gap:10px; flex-wrap:wrap; }
.p-return-choice{
	flex:1 1 200px;
	display:flex;
	flex-direction:column;
	gap:3px;
	border:1px solid rgba(255,255,255,.12);
	background:rgba(255,255,255,.03);
	border-radius:12px;
	padding:12px 14px;
	cursor:pointer;
	user-select:none;
	transition:border-color var(--dur-hover) var(--ease-standard), background var(--dur-hover) var(--ease-standard);
}
.p-return-choice:hover{ border-color:rgba(255,255,255,.22); }
/* Hide only the radio (not the custom-address text inputs inside the card). */
.p-return-choice input[type=radio]{ position:absolute; opacity:0; pointer-events:none; }
.p-return-choice.is-selected,
.p-return-choice:has(input:checked){
	border-color:rgba(78,161,255,.55);
	background:rgba(78,161,255,.10);
}
.p-return-choice-title{ font-weight:600; font-size:0.9375rem; }
.p-return-choice-desc{ font-size:0.8125rem; color:var(--muted,#9aa4b2); line-height:1.4; }
/* Unavailable choice (e.g. switching back to a dealer-provided label once the
   Regio shipping estimate has been charged). */
.p-return-choice.is-disabled{ opacity:.55; cursor:not-allowed; }
.p-return-choice.is-disabled:hover{ border-color:rgba(255,255,255,.12); }
:root[data-theme="light"] .p-return-choice.is-disabled:hover{ border-color:#E2E8F0; }
:root[data-theme="light"] .p-return-choice{ background:#FFFFFF; border-color:#E2E8F0; }
:root[data-theme="light"] .p-return-choice.is-selected,
:root[data-theme="light"] .p-return-choice:has(input:checked){ border-color:#3A80D2; background:rgba(58,128,210,.12); }

/* Return shipping address chooser (Regio-handled) */
.rg-return-addr-label{
	font-size:0.75rem; font-weight:700; text-transform:uppercase;
	letter-spacing:.04em; color:var(--muted,#9aa4b2); margin-bottom:8px;
}
/* T26 (2026-07-02): the deal modal is near-viewport width, so side-by-side
   cards sprawled across the page with huge gaps — stack them in a compact
   column instead. (The submit modal's grid layout is separate: rg-dlg-*.) */
.rg-return-label-choice .p-return-choices,
.rg-return-addr .p-return-choices{
	flex-direction:column;
	align-items:stretch;
	max-width:560px;
	gap:8px;
}
.rg-return-label-choice .p-return-choice,
.rg-return-addr .p-return-choice{ flex:0 0 auto; }
.p-return-choice--custom{ cursor:default; }
.p-return-choice-head{ display:flex; flex-direction:column; gap:3px; cursor:pointer; }
.rg-return-custom{ margin-top:10px; padding-top:10px; border-top:1px solid rgba(255,255,255,.12); }
.rg-return-custom-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.rg-return-custom-grid .js-rs-line1,
.rg-return-custom-grid .js-rs-line2,
.rg-return-custom-grid .js-rs-city{ grid-column:1 / -1; }
:root[data-theme="light"] .rg-return-custom{ border-top-color:#E2E8F0; }

/* ---------- Activity timeline ---------- */
.p-activity{ position:relative; }
.p-activity-item{ position:relative; display:flex; gap:12px; padding-bottom:16px; }
.p-activity-item:last-child{ padding-bottom:0; }
.p-activity-item:not(:last-child)::before{
	content:"";
	position:absolute;
	left:13px;
	top:28px;
	bottom:0;
	width:2px;
	background:rgba(255,255,255,.09);
}
.p-activity-icon{
	position:relative;
	z-index:1;
	flex:0 0 auto;
	width:28px;
	height:28px;
	border-radius:50%;
	display:flex;
	align-items:center;
	justify-content:center;
	font-size:0.875rem;
	line-height:1;
	background:rgba(255,255,255,.06);
	border:1px solid rgba(255,255,255,.12);
}
.p-activity-item--good .p-activity-icon{  background:rgba(22,163,74,.16); border-color:rgba(22,163,74,.34); }
.p-activity-item--warn .p-activity-icon{  background:rgba(234,88,12,.15); border-color:rgba(234,88,12,.34); }
.p-activity-item--error .p-activity-icon{ background:rgba(220,38,38,.15); border-color:rgba(220,38,38,.34); }
.p-activity-item--info .p-activity-icon{  background:rgba(14,165,233,.16); border-color:rgba(14,165,233,.34); }
.p-activity-body{ padding-top:4px; }
.p-activity-label{ font-size:.9rem; font-weight:600; }
.p-activity-time{ font-size:.74rem; color:var(--muted,#94A3B8); margin-top:2px; }

/* ---------- Light theme ---------- */
:root[data-theme="light"] .p-deal-tabs{ background:#F8FAFC; border-bottom-color:#E2E8F0; }
:root[data-theme="light"] .p-deal-tab{ color:#64748B; }
:root[data-theme="light"] .p-deal-tab:hover,
:root[data-theme="light"] .p-deal-tab.is-active{ color:#0A2540; }
:root[data-theme="light"] .p-activity-item:not(:last-child)::before{ background:#E2E8F0; }
:root[data-theme="light"] .p-activity-icon{ background:#F1F5F9; border-color:#E2E8F0; }
