/* ==========================================================================================
   ZeroPulp Employee Portal - phone layout (the "Mobile – *" design boards: Home, Tasks, My records,
   Task detail, Record detail, Start form, Departments / Global data Groups, Group detail, Dashboards,
   Reports, Automations, Automation schedule, Your settings, Account management).

   Phones only (max-width 767.98px); nothing here applies at tablet or desktop widths. Pairs with
   neo/js/home/zpPortalMobile.js, which adds the bottom tab bar, its sheets, the header avatar and back
   bar, and the body classes used below:
     zp-m-detail      a list row's detail is open (it takes the full width; the list is hidden)
     zp-m-actionbar   ...and it has completion / process buttons, docked where the tab bar sits
     zp-m-folders-open  Reports' folder tree is showing as a bottom sheet

   HOW THE LAYOUT STAYS INTACT. The portal JS sizes every page in px from .display-container's height
   once, at render (setHeight / zpCardHeight / jScrollPane). Rather than fight those numbers, the app
   container gives up the tab bar's 64px at the bottom (like it gives the sandbox banner its height at
   the top), so every measurement already excludes the bar and the lists keep scrolling inside their
   cards. Only widths and the list/detail split are overridden.

   Loaded last (neo.html). Rules on page content lead with
   "body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3)" - three never-matching ids, one more
   than zpPortalV2.css uses - so they outrank every desktop layer. !important is against the inline
   px sizes the legacy JS writes. Remove the <link> (and the zpPortalMobile.js <script>) to revert.
   ========================================================================================== */

/* the bar and sheets the JS adds are hidden at every width until the phone rules below show them */
.zp-mnav,
.zp-m-back,
.zp-m-avatar,
.zp-m-folder-btn,
.zp-m-view-btn
{
	display: none;
}

.zp-m-loc-back
{
	display: none;
}

@media (max-width: 767.98px)
{

body.zp-portal-theme
{
	--zp-mnav-h: 64px;
	--zp-m-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Shared Data lists (Locations, Groups, ...) and Process Records on a phone: no Advanced Search - the search box fills the row */
body.zp-portal-theme main .zp-shared-data-list .record-search-container .advance-search-link,
body.zp-portal-theme main .zp-shared-data-list .record-search-container #advanceSearch
{
	display: none !important;
}

/* No "Add New View" in the views list on mobile (Tasks page) */
body.zp-portal-theme .prefer-view-dropdown .add-new-view-col
{
	display: none !important;
}

/* ------------------------------------------------------------------------------------------
   1. Sandbox strip - 11px, "SANDBOX · test records", "Go to designer →" on the right
   ------------------------------------------------------------------------------------------ */
body.zp-portal-theme.sandbox-mode
{
	--sandbox-banner-height: 24px;
}

body.zp-portal-theme .sandbox-banner
{
	padding: 0 16px;
	gap: 8px;
	font-size: 11px;
}

body.zp-portal-theme .sandbox-banner .sandbox-banner-tag
{
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
}

body.zp-portal-theme .sandbox-banner .sandbox-banner-tag::after
{
	content: " \00B7  test records";
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}

body.zp-portal-theme .sandbox-banner .sandbox-banner-action,
body.zp-portal-theme .sandbox-banner .sandbox-banner-action:visited,
body.zp-portal-theme .sandbox-banner .sandbox-banner-action:focus
{
	gap: 4px;
	font-size: 11px;
	letter-spacing: 0.06em;
}

body.zp-portal-theme .sandbox-banner .sandbox-banner-action svg
{
	width: 12px;
	height: 12px;
}

/* ------------------------------------------------------------------------------------------
   2. Shell - the app gives up the tab bar's height; no sidebar (the tab bar + More replace it)
   ------------------------------------------------------------------------------------------ */
body.zp-portal-theme:not(.zp-embedded) .home-page-container
{
	height: calc(100dvh - var(--sandbox-banner-height, 0px) - var(--zp-mnav-h) - var(--zp-m-safe-bottom)) !important;
}

body.zp-portal-theme .home-page-container > aside
{
	display: none !important;
}

/* header: 52px - brand left, avatar right. The gear, account chip and burger give way to the tab bar's
   More sheet (hidden, not removed). */
body.zp-portal-theme .display-container > header
{
	height: 52px;
	min-height: 52px;
	padding: 0 8px 0 16px !important;
}

body.zp-portal-theme .display-container > header button:has(> .gear-icons),
body.zp-portal-theme .display-container > header .zp-account-button,
body.zp-portal-theme .display-container > header button.lg\:hidden
{
	display: none !important;
}

body.zp-portal-theme .zp-header-brand
{
	gap: 8px;
	height: auto;
	padding: 0;
}

body.zp-portal-theme .zp-header-brand img
{
	width: 24px;
	height: 24px;
}

body.zp-portal-theme .zp-header-brand .zp-brand-word
{
	font-size: 16px;
}

body.zp-portal-theme .zp-header-brand .zp-brand-pill
{
	font-size: 9px;
	padding: 3px 7px;
}

body.zp-portal-theme .zp-m-avatar
{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

body.zp-portal-theme .zp-m-avatar-initials
{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--zp-ink);
	color: #FFFFFF;
	font-size: 11px;
	font-weight: 600;
}

/* a detail is open: "‹ Tasks" replaces the brand */
body.zp-portal-theme .zp-m-back
{
	align-items: center;
	gap: 2px;
	min-height: 44px;
	margin-left: -12px;
	padding: 0 10px 0 6px;
	border: 0;
	background: none;
	color: var(--zp-accent-strong);
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	max-width: 60vw;
}

body.zp-portal-theme .zp-m-back-label
{
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.zp-portal-theme.zp-m-detail .zp-m-back
{
	display: flex;
}

body.zp-portal-theme.zp-m-detail .zp-header-brand,
body.zp-portal-theme.zp-m-detail .zp-m-avatar
{
	display: none !important;
}

body.zp-portal-theme #supportpoint
{
	bottom: calc(var(--zp-mnav-h) + 12px) !important;
}

/* ------------------------------------------------------------------------------------------
   3. Bottom tab bar + sheets
   ------------------------------------------------------------------------------------------ */
body.zp-portal-theme:has(> .home-page-container:not(.hidden)) .zp-mnav
{
	display: grid;
}

/* the :not(#zpm1) outranks the :has() rule above - without it the tab bar stayed up over the docked bar */
body.zp-portal-theme.zp-m-actionbar .zp-mnav:not(#zpm1)
{
	display: none;
}

.zp-mnav
{
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 45;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	height: calc(var(--zp-mnav-h) + var(--zp-m-safe-bottom));
	padding-bottom: calc(4px + var(--zp-m-safe-bottom));
	background: var(--zp-surface);
	border-top: 1px solid var(--zp-line);
	box-sizing: border-box;
	font-family: var(--zp-font);
}

.zp-mnav-item
{
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--zp-ink-3);
	font-family: inherit;
	font-size: 11px;
	font-weight: 500;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.zp-mnav-item.zp-mnav-off
{
	display: none;
}

.zp-mnav-pill
{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 28px;
	margin: 0 auto;
	border-radius: 999px;
}

.zp-mnav-item.zp-mnav-active
{
	color: var(--zp-accent-strong);
	font-weight: 600;
}

.zp-mnav-item.zp-mnav-active .zp-mnav-pill
{
	background: var(--zp-accent-tint);
}

.zp-msheet-backdrop
{
	position: fixed;
	inset: 0;
	z-index: 1035;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	background: rgba(28,27,34,0);
	transition: background 0.18s ease;
	font-family: var(--zp-font);
}

.zp-msheet-backdrop.zp-msheet-shown
{
	background: rgba(28,27,34,0.4);
}

.zp-msheet
{
	display: flex;
	flex-direction: column;
	max-height: 80dvh;
	padding: 8px 12px calc(20px + var(--zp-m-safe-bottom));
	border-radius: 16px 16px 0 0;
	background: var(--zp-surface);
	box-sizing: border-box;
	transform: translateY(100%);
	transition: transform 0.2s ease;
}

.zp-msheet-shown .zp-msheet
{
	transform: none;
}

.zp-msheet-handle
{
	align-self: center;
	flex: none;
	width: 36px;
	height: 4px;
	margin: 4px 0 10px;
	border-radius: 2px;
	background: #D9D7E1;
}

.zp-msheet-head
{
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0 4px 6px;
}

.zp-msheet-back
{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 10px;
	background: none;
	color: var(--zp-accent-strong);
	cursor: pointer;
}

.zp-msheet-title
{
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--zp-ink);
}

.zp-msheet-list
{
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.zp-msheet-item
{
	display: flex;
	flex: none;
	align-items: center;
	gap: 14px;
	min-height: 48px;
	padding: 0 12px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--zp-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	text-align: left;
	cursor: pointer;
}

.zp-msheet-item:active,
.zp-msheet-item-active
{
	background: var(--zp-accent-tint);
}

.zp-msheet-icon
{
	display: flex;
	color: var(--zp-ink-2);
}

.zp-msheet-label
{
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.zp-msheet-chevron
{
	flex: none;
	color: var(--zp-ink-5);
}

.zp-msheet-divider
{
	flex: none;
	height: 1px;
	margin: 6px 4px;
	background: var(--zp-line-soft);
}

/* ------------------------------------------------------------------------------------------
   4. Page head - title 20px (crumb above it), one primary action right, 32px buttons
   ------------------------------------------------------------------------------------------ */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .object-header-bar,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .buttons-toolbar,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-page-head
{
	flex-wrap: wrap;
	align-items: center !important;
	gap: 8px 12px;
	min-height: 0 !important;
	padding: 12px 16px 4px !important;
	background: var(--zp-surface);
}

/* Home, Tasks and My Records share one title row height - Tasks' 32px New Task button used to be the
   only thing setting it, so the title sat lower (and the content below started lower) on the pages
   without a button. Title size / weight are the one .object-title rule below. */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .object-header-bar
{
	box-sizing: border-box;
	min-height: 48px !important;   /* 12px top + 32px button row + 4px bottom */
	align-content: center;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .object-header-bar > div:first-child,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-page-head-text
{
	flex: 1 1 0;
	flex-direction: column !important;
	flex-wrap: nowrap;
	align-items: flex-start !important;
	gap: 2px !important;
	min-width: 0;
	min-height: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .buttons-toolbar > div:first-child
{
	flex: 1 1 0;
	width: auto !important;
	min-width: 0;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .object-title,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-page-title,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #profileManagement .page-header.account-management h2
{
	max-width: 100%;
	margin: 0;
	overflow: hidden;
	font-size: 20px !important;
	line-height: 1.3 !important;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-page-subtitle
{
	font-size: 12px !important;
	line-height: 1.4;
	color: var(--zp-ink-4);
}

/* the list pages (Home, Tasks, records, global data) carry no subtitle on a phone */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .object-header-bar .zp-page-subtitle
{
	display: none;
}

/* "Global Data ›" sits above the title */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-breadcrumb
{
	align-self: flex-start;
	gap: 4px;
	font-size: 12px;
	color: var(--zp-ink-4);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-breadcrumb svg
{
	width: 10px;
	height: 10px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .object-header-bar .button-container,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-page-head .dashBoard-buttons,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .buttons-toolbar .reportlist-tool-bar
{
	flex: none;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px !important;
	margin: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .object-header-bar .button-container button,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-page-head .dashBoard-buttons > button,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .buttons-toolbar .reportlist-tool-bar button
{
	height: 32px !important;
	min-height: 32px !important;
	padding: 0 10px !important;
	gap: 4px !important;
	border-radius: 8px !important;
	font-size: 13px !important;
	white-space: nowrap;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .object-header-bar .button-container button svg,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-page-head .dashBoard-buttons > button svg
{
	width: 14px;
	height: 14px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-page-head .dashBoard-buttons > button.popup-list
{
	width: 32px;
	padding: 0 !important;
}

/* ------------------------------------------------------------------------------------------
   5. Underline tabs - one row that scrolls sideways (scrollTabs' arrow buttons hidden)
   ------------------------------------------------------------------------------------------ */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #all > .widget-tabs,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs
{
	margin: 0 !important;
	padding: 0 6px !important;
	border: 0 !important;
	border-bottom: 1px solid var(--zp-line) !important;
	border-radius: 0 !important;
	background: var(--zp-surface) !important;
	box-shadow: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs::before,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs::after
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .view-tabs
{
	flex-wrap: wrap;
	width: 100% !important;
	min-width: 0;
	border: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .view-tabs > div:first-child,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .nav.nav-tabs
{
	width: 100% !important;
	min-width: 0;
	max-width: 100%;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .nav.nav-tabs,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .nav.nav-tabs.scroll_tabs_container
{
	position: relative;
	height: auto !important;
	min-height: 44px;
	border: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .scroll_tab_inner
{
	position: static !important;
	display: flex;
	height: auto !important;
	left: auto !important;
	right: auto !important;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	font-size: 14px !important;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .scroll_tab_inner::-webkit-scrollbar
{
	display: none;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .scroll_tab_left_button,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .scroll_tab_right_button,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .scroll_tab_left_finisher,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .scroll_tab_right_finisher,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .nav-tabs .drag-icon
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .scroll_tab_inner > .tab-li-container
{
	display: flex;
	flex: none;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .nav.nav-tabs li
{
	flex: none;
	margin: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .nav.nav-tabs li > a
{
	min-height: 44px !important;
	padding: 0 10px !important;
	font-size: 14px !important;
	white-space: nowrap;
}

/* views: the tab strip is swapped for one "<current view> ▾" button (zpPortalMobile.js syncViews,
   which opens every view in a bottom sheet); the "choose views" list icon stays at its right */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs:has(.zp-m-view-btn)
{
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px !important;
	padding: 10px 16px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-m-view-btn
{
	order: -1;
	display: flex;
	flex: 1 1 0;
	align-items: center;
	gap: 8px;
	min-width: 0;
	min-height: 44px;
	margin: 0;
	padding: 0 12px 0 14px;
	border: 1px solid var(--zp-line);
	border-radius: 10px;
	background: var(--zp-surface);
	color: var(--zp-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	box-sizing: border-box;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-m-view-btn .zp-m-view-name
{
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-m-view-btn > svg
{
	flex: none;
	color: var(--zp-ink-3);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-m-view-btn + .view-tabs
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs:has(.zp-m-view-btn) .preferred-view-container
{
	order: -2;   /* left of the view button (order -1) */
	flex: none;
	margin: 0 !important;
}

/* the views bar: ONE white bar on the page's 16px gutters - [list icon | divider | current view  v].
   The strip itself is the bar (white, hairline, 12px corners); the icon and the selector inside it
   carry no border of their own, so there is no box within a box. Pages whose title lives in the strip
   (Automations, Schedules) keep their own layout below. */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs:has(.zp-m-view-btn):not(:has(> .zp-page-head-text))
{
	box-sizing: border-box;
	align-items: center;
	gap: 0 !important;
	flex-wrap: nowrap;
	width: auto;
	height: 48px;
	margin: 10px 16px 0 !important;
	padding: 0 !important;
	border: 1px solid var(--zp-line) !important;
	border-radius: 12px !important;
	background: var(--zp-surface) !important;
	box-shadow: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs:has(.zp-m-view-btn):not(:has(> .zp-page-head-text)) .preferred-view-container
{
	position: relative;
	display: flex;
	width: 48px;
	height: 100%;
}

/* My Records / Process Records have no views menu (the pin button isn't rendered), so the icon slot is
   empty - drop it and its divider, and the selector fills the whole bar */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs:has(.zp-m-view-btn):not(:has(> .zp-page-head-text)) .preferred-view-container:not(:has(*))
{
	display: none !important;
}

/* the straight divider between the icon and the selector */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs:has(.zp-m-view-btn):not(:has(> .zp-page-head-text)) .preferred-view-container::after
{
	content: "";
	position: absolute;
	top: 12px;
	right: 0;
	bottom: 12px;
	width: 1px;
	background: var(--zp-line);
	pointer-events: none;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs:has(.zp-m-view-btn):not(:has(> .zp-page-head-text)) .preferred-view-container .prefer-view-button
{
	width: 48px !important;
	height: 100% !important;
	justify-content: center;
	border: 0 !important;
	border-radius: 11px 0 0 11px !important;
	background: transparent !important;
	color: var(--zp-ink-3);
	box-sizing: border-box;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs:has(.zp-m-view-btn):not(:has(> .zp-page-head-text)) .preferred-view-container .prefer-view-button .preferred-icons svg
{
	width: 28px;
	height: 28px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs:has(.zp-m-view-btn):not(:has(> .zp-page-head-text)) .zp-m-view-btn
{
	height: 100%;
	min-height: 0;
	border: 0;
	border-radius: 0 11px 11px 0;
	background: transparent;
}

/* the views menu: the list icon is the row's first item on a phone, so the menu opens from its left
   edge - capped to the viewport so a 288px menu can never run off the screen (it was cut to "Due ..."
   when the icon sat at the right end). */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .preferred-view-container .prefer-view-dropdown
{
	left: 0 !important;
	right: auto !important;
	width: min(288px, calc(100vw - 32px)) !important;
	max-width: calc(100vw - 32px);
	z-index: 60;            /* sit above the page's panel edges / hairlines so none draw through the menu */
	background: #fff;
	overflow: hidden;
}

/* the container creates the stacking context the menu lives in - lift it above sibling panels */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs .preferred-view-container
{
	z-index: 60;
}

/* "Unpinned" / "Pinned" heading rows: the rule beside the label was a bordered 0-height box, which
   paints a 2px line with side edges - draw it as a single 1px hairline instead */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .prefer-view-dropdown li > div.border.w-full
{
	border: 0 !important;
	border-top: 1px solid var(--zp-line) !important;
	height: 0;
}

/* pages whose title + subtitle live in the tab row (Automations, Schedules): stay one column -
   title, subtitle, then the view button - instead of wrapping the button up beside the title */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs:has(> .zp-page-head-text):has(.zp-m-view-btn)
{
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	height: auto !important;
	padding: 12px 16px 10px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs:has(> .zp-page-head-text) > .zp-page-head-text
{
	padding: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs:has(> .zp-page-head-text) .zp-m-view-btn
{
	order: 0;
	flex: none;
}

/* Users / Delegations / schedules keep their buttons in the tab row - they drop below the tabs */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget-tabs .list-actions-buttons
{
	flex-wrap: wrap;
	justify-content: flex-start !important;
	width: 100% !important;
	padding: 6px 10px 10px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #reportSchedules > .widget-tabs,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #manageSchedules > .widget-tabs
{
	display: flex !important;
	flex-direction: column;
	padding: 12px 6px 0 !important;
	row-gap: 4px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #reportSchedules > .widget-tabs .zp-schedule-head,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #manageSchedules > .widget-tabs .zp-schedule-head
{
	padding: 0 10px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-tab-bar
{
	padding: 12px 16px 0 !important;
	gap: 10px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-tab-bar .zp-account-head
{
	padding: 0;
}

/* the section tabs (Users, Profiles, Groups, Company info, Portals, Data imports, Audit logs, ...) are
   one row that scrolls sideways - the desktop pill bar wrapped them into a 4-5 row block of pills */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #accountManagementMainTab
{
	width: 100% !important;
	max-width: 100%;
	margin: 0 0 4px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #accountManagementMainTab .scroll_tab_inner,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #accountManagementMainTab:not(.scroll_tabs_container)
{
	display: flex !important;
	flex-wrap: nowrap !important;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #accountManagementMainTab .scroll_tab_inner::-webkit-scrollbar
{
	display: none;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #accountManagementMainTab li
{
	flex: none;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #accountManagementMainTab li > a
{
	white-space: nowrap;
}

/* the page head: ".zp-page-head-text" is "flex: 1 1 0" (a row layout rule) - inside this COLUMN tab bar that
   collapsed it to 0 height, so the title vanished under the app header and the subtitle spilled over the
   tab row. Natural height, full width. */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-tab-bar > .zp-account-head
{
	flex: none !important;
	width: 100%;
	box-sizing: border-box;
}

/* the section under the tabs sits on the same 16px gutters as the head and tabs (desktop: 24px, plus
   the list's own 16px inside it - the card ended up 40px in while the tabs were 16px) */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail
{
	box-sizing: border-box;
	width: 100%;
	padding: 0 16px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail .main-container
{
	padding: 0 !important;
}

/* every section's header row (view label + Add New View + New User ...) is ONE row: the card's top, on the
   card's width, joined to the list under it - not a wrapped, centred stack of buttons */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail > div > .widget-tabs
{
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	gap: 8px !important;
	height: auto !important;
	min-height: 48px !important;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 6px 8px 6px 4px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail > div > .widget-tabs > .view-tabs
{
	flex: 1 1 0 !important;
	flex-wrap: nowrap !important;
	min-width: 0;
	width: auto !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail > div > .widget-tabs .nav.nav-tabs
{
	min-height: 0;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail > div > .widget-tabs .list-actions-buttons
{
	flex: none;
	flex-wrap: nowrap !important;
	align-items: center;
	justify-content: flex-end;
	gap: 6px !important;
	width: auto !important;
	padding: 0 !important;
	margin: 0 !important;
	white-space: nowrap;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail > div > .widget-tabs .list-actions-buttons :is(button, a, .add-new-view)
{
	font-size: 13px !important;
	white-space: nowrap;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail > div > .widget-tabs .list-actions-buttons button
{
	height: 32px !important;
	min-height: 32px !important;
	padding: 0 10px !important;
	border-radius: 8px !important;
}

/* a phone keeps these lists minimal: no "Add New View" (header row) and no "Advanced Search" (beside the
   search box) - the search box takes the whole row */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail .add-new-view,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail .advance-search-link
{
	display: none !important;
}

/* Account Management, every tab: the detail panel (Locations' form, Company info's form, a user / role /
   portal record) was built for the right 70% of a desktop screen - groups.js and friends pin it to the
   full screen height as a min-height and offset it 16px from the list. On a phone it is full width at its
   natural height, with phone padding, and its head (name + Edit + cog) is one tight row. */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail #recordDetail
{
	min-height: 0 !important;
	margin-left: 0 !important;
	box-sizing: border-box;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail #recordDetail .content-right-medium
{
	padding: 16px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail #recordDetail #col-sm-710
{
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail #recordDetail #col-sm-710 > div
{
	width: auto !important;
	min-width: 0;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail #recordDetail #col-sm-710 > div:first-child
{
	flex: 1 1 0;
}

/* Locations and Company info are two-pane pages that stack here: every pane full width, natural height
   (the list tabs keep their fixed-height scrolling cards - those are sized for the screen on purpose) */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) :is(#org-hierarchy, #company-information) :is(.object-row, .object-column, .object-detail, .tab-content-outer, .right-content-area-scroll, #recordDetail)
{
	width: 100% !important;
	min-width: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	margin-left: 0 !important;
	box-sizing: border-box;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) :is(#org-hierarchy, #company-information) #recordDetail
{
	overflow: visible !important;
}

/* Locations: the tree is a short scrolling card above the form */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy #recordListContainer .right-content-area-scroll
{
	max-height: none;
	overflow: visible !important;
	padding: 4px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .object-detail
{
	margin-top: 12px;
}

/* Users and Roles lists: the same treatment as the Records page - the scroll area is the one framed card
   (search box on top, a hairline under it), the rows inside are flat: no rounded box around the list or
   around each row, just a thin line under each record (none under the last), and the scroll pane pinned
   to the card's width so the rows and chevrons never run past its right edge. */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail :is(#users, #profiles) :is(table.smart-object-reocrd-list, table.stream-version-details) > tbody
{
	border: 0;
	border-radius: 0;
	background: transparent;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail :is(#users, #profiles) :is(table.smart-object-reocrd-list, table.stream-version-details) > tbody > tr
{
	border: 0 !important;
	border-bottom: 1px solid var(--zp-line-row) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail :is(#users, #profiles) :is(table.smart-object-reocrd-list, table.stream-version-details) > tbody > tr:last-child
{
	border-bottom: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail :is(#users, #profiles) :is(.jspContainer, .jspPane)
{
	width: 100% !important;
	max-width: 100% !important;
	left: 0 !important;
}

/* Users: a row is the name with the email under it - the date columns and the rest (profile count,
   active flag...) stay on desktop and in the user's detail view */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail #users table.smart-object-reocrd-list > tbody > tr > td:nth-child(n+3)
{
	display: none !important;
}

/* Locations on a phone is a two-step flow: the list of places (the tree - expand arrow opens a place's
   children, tapping a name opens its details) and then the details full screen with "All locations" back.
   groups.js toggles .zp-m-loc-open on the page when a place is tapped. */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy:not(.zp-m-loc-open) .object-detail
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy:not(.zp-m-loc-open) .object-row
{
	display: block !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy.zp-m-loc-open .object-row
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-m-loc-back
{
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 44px;
	margin: 0 0 4px -6px;
	padding: 0 8px;
	border: 0;
	background: transparent;
	color: var(--zp-accent-strong);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

/* the places: roomy, tappable rows */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .jstree-container-ul,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .jstree-children
{
	margin: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .jstree-anchor
{
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 10px !important;
	font-size: 15px !important;
	font-weight: 500;
	white-space: normal;
}

/* the desktop tree stays in the page (printOrgHierarchy fills it) but the phone uses the drill-down list */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .content-left-medium
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-m-loc-phone
{
	display: block;
	padding: 12px 0 0;
}

/* where you are in the hierarchy: Top › Region › Office */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-crumbs
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 4px;
	margin-bottom: 12px;
	font-size: 13px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-crumb
{
	min-height: 32px;
	padding: 0 6px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--zp-accent-strong);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-crumb.is-current
{
	color: var(--zp-ink);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-sep
{
	color: var(--zp-ink-5);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-current
{
	padding: 14px 16px;
	border: 1px solid var(--zp-line);
	border-radius: 12px;
	background: var(--zp-surface);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-current-name
{
	color: var(--zp-ink);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-current-sub
{
	margin-top: 2px;
	color: var(--zp-ink-4);
	font-size: 13px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-view
{
	min-height: 40px;
	margin-top: 12px;
	padding: 0 14px;
	border: 1px solid var(--zp-line);
	border-radius: 8px;
	background: var(--zp-surface);
	color: var(--zp-accent-strong);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-label
{
	margin: 16px 2px 8px;
	color: var(--zp-ink-4);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-list
{
	overflow: hidden;
	border: 1px solid var(--zp-line);
	border-radius: 12px;
	background: var(--zp-surface);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-row
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	min-height: 52px;
	padding: 0 16px;
	border: 0;
	border-bottom: 1px solid var(--zp-line-row);
	background: transparent;
	color: var(--zp-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	text-align: left;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-row:last-child
{
	border-bottom: 0;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-row-chev
{
	flex: none;
	color: var(--zp-ink-5);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #org-hierarchy .zp-loc-empty
{
	padding: 24px 16px;
	color: var(--zp-ink-4);
	font-size: 14px;
	text-align: center;
}

/* Account Management sections that are not built for a phone say so (accountManagement.js) */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .account-management-item-detail .zp-am-desktop-note
{
	margin: 12px 0 0;
	border: 1px solid var(--zp-line);
	border-radius: 12px;
	background: var(--zp-surface);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-am-desktop-note .zp-empty
{
	padding: 48px 24px;
}

/* ------------------------------------------------------------------------------------------
   6. List area - 16px gutters; the card's scroll area stays (jScrollPane), table rows become
      stacked rows: bold first column, the rest as one grey "a · b · c" line, status pill below
   ------------------------------------------------------------------------------------------ */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .main-container
{
	padding: 12px 16px 0 !important;
	margin: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .object-row
{
	width: 100% !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .data-list-container
{
	width: 100% !important;
	min-width: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .record-search-container,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .user-search-container
{
	width: 100% !important;
	background: transparent !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .search-bar input
{
	font-size: 16px !important;   /* below 16px iOS zooms the page on focus */
	height: 42px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .jspHorizontalBar,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .jspCorner
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details
{
	display: block;
	width: 100% !important;
	min-width: 0 !important;
	border: 0 !important;
	background: transparent !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list > thead,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > thead
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list > tbody,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > tbody
{
	display: block;
	overflow: hidden;
	border: 1px solid var(--zp-line);
	border-radius: 12px;
	background: var(--zp-surface);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list > tbody > tr,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > tbody > tr
{
	display: block;
	position: relative;
	padding: 14px 40px 14px 14px;
	border: 0 !important;
	border-bottom: 1px solid var(--zp-line-row) !important;
	background: var(--zp-surface) !important;
	color: var(--zp-ink);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list > tbody > tr:last-child,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > tbody > tr:last-child
{
	border-bottom: 0 !important;
}

/* the row chevron */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list > tbody > tr::after,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > tbody > tr::after
{
	content: "";
	position: absolute;
	top: 50%;
	right: 18px;
	width: 7px;
	height: 7px;
	border-right: 2px solid var(--zp-ink-5);
	border-bottom: 2px solid var(--zp-ink-5);
	transform: translateY(-50%) rotate(-45deg);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list > tbody > tr > td,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > tbody > tr > td
{
	display: inline;
	width: auto !important;
	max-width: none !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	color: var(--zp-ink-3) !important;
	font-size: 12px !important;
	line-height: 1.5;
	white-space: normal !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list > tbody > tr > td:first-child,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > tbody > tr > td:first-child
{
	display: block;
	margin-bottom: 4px;
	overflow: hidden;
	color: var(--zp-ink) !important;
	font-size: 15px !important;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list > tbody > tr > td:not(:first-child) + td:not(.status-cell):not(.priority-col):not(.action):not(.action-col)::before,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > tbody > tr > td:not(:first-child) + td:not(.status-cell):not(.priority-col):not(.action):not(.action-col)::before
{
	content: " \00B7  ";
	color: var(--zp-ink-5);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list td:empty,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details td:empty
{
	display: none !important;
}

/* status / priority pill on its own line */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list td.status-cell,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details td.priority-col
{
	display: block;
	margin-top: 6px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list td.action-col
{
	display: block;
	margin-top: 8px;
}

/* Tasks: the flag + row menu sit top-right instead of the chevron */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > tbody > tr:has(> td.action)
{
	padding-right: 72px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > tbody > tr:has(> td.action)::after
{
	display: none;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details td.action
{
	position: absolute;
	top: 12px;
	right: 10px;
	display: block;
}

/* list cards: one tight block per row - the desktop row / cell heights (set for the table) left a
   blank line under the title once the cells stack */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > tbody > tr,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > tbody > tr > td,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list > tbody > tr,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list > tbody > tr > td
{
	height: auto !important;
	min-height: 0 !important;
}

/* record lists (My Records / Process Records / Global Data): the scroll area is already the framed card
   (zpPortal.css .smart-object-list-view) - drop the tbody's own card, or the rows draw a second rounded
   border inside it. jScrollPane also sizes its pane to the desktop table's width, which ran the rows
   (and their chevrons) past the card's right edge; the horizontal bar is hidden here, so pin it. */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .smart-object-list-view table.smart-object-reocrd-list > tbody
{
	border: 0;
	border-radius: 0;
}

/* and no line around / between the record rows */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .smart-object-list-view table.smart-object-reocrd-list > tbody > tr
{
	border: 0 !important;
	border-bottom: 1px solid var(--zp-line-row) !important;
	box-shadow: none !important;
	outline: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .smart-object-list-view table.smart-object-reocrd-list > tbody > tr:last-child
{
	border-bottom: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .smart-object-list-view :is(.jspContainer, .jspPane)
{
	width: 100% !important;
	max-width: 100% !important;
	left: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #manageSchedules .right-content-area-scroll table.stream-version-details > tbody > tr:not(.zp-empty-row)
{
	padding-top: 10px;
	padding-bottom: 10px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #manageSchedules .right-content-area-scroll table.stream-version-details > tbody > tr > td:first-child
{
	margin-bottom: 2px;
	font-size: 14px !important;
}

/* Automations: the hidden Active cell still counted as "a cell before", so the source got a leading
   dot; and the lone Yes / No is the Recurring column - say so */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #manageSchedules .right-content-area-scroll table.stream-version-details td.record_source::before
{
	content: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #manageSchedules .right-content-area-scroll table.stream-version-details td.recurring::before
{
	content: " \00B7  Recurring: " !important;
}

/* Automations: title, source, start, recurrence - the run / audit columns stay on desktop */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #manageSchedules table.stream-version-details td:is(.active, .last_start_date, .last_end_date, .date_modified, .modified_by)
{
	display: none !important;
}

/* empty states fill the card without the row chrome */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list > tbody > tr:has(> td.no-record-present),
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > tbody > tr.zp-empty-row
{
	padding: 0;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list > tbody > tr:has(> td.no-record-present)::after,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details > tbody > tr.zp-empty-row::after
{
	display: none;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) table.smart-object-reocrd-list td.no-record-present,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .right-content-area-scroll table.stream-version-details tr.zp-empty-row > td
{
	display: block !important;
	margin: 0 !important;
	white-space: normal !important;
	font-size: 13px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .no-record-div
{
	width: 100% !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-empty
{
	padding: 48px 20px;
}

/* ------------------------------------------------------------------------------------------
   7. Home - catalog cards one per row; task cards keep their own design
   ------------------------------------------------------------------------------------------ */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-catalog-grid
{
	grid-template-columns: minmax(0, 1fr) !important;
	gap: 12px !important;
	padding: 12px 16px 20px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-catalog-grid .catalog-section-header h5
{
	font-size: 13px;
	font-weight: 600;
	color: var(--zp-ink-3);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-form-card
{
	border-radius: 12px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-form-card-body
{
	padding: 12px 14px 14px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-form-card .form-title
{
	font-size: 15px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-form-card .form-description
{
	font-size: 13px;
	line-height: 1.5;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-form-card-foot,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-form-card-actions
{
	display: flex;
	flex-wrap: wrap;	/* phones keep the full-width Start on its own line (desktop is one row) */
	width: 100%;
	gap: 8px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-form-card-start
{
	flex: 1;
	justify-content: center;
	min-height: 44px;
	margin-top: 6px;
	border-radius: 10px;
	font-size: 14px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget .search-bar
{
	grid-template-columns: minmax(0, 1fr) 40% !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget[widget-id]
{
	padding-right: 0 !important;
}

/* task list (Home's task widget and the Tasks page share it): the widget is already the one white card,
   so the list area / empty state inside it must not draw a second rounded box, and the empty state
   sits centred in the space it has instead of hugging the top */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget[widget-id] .task-table-container,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget[widget-id] .task-table-container > .zp-empty
{
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget[widget-id] .task-table-container > .zp-empty
{
	justify-content: center;
	min-height: 320px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .widget[widget-id] .task-table-container > .zp-empty .zp-empty-body
{
	max-width: 260px;
	font-size: 13px;
	color: var(--zp-ink-4);
}

/* ------------------------------------------------------------------------------------------
   8. Detail views - the detail takes the whole width; the list behind it is hidden. The JS turns
      the header into "‹ <list>" (the detail's own X stays, hidden, and is what Back clicks).
   ------------------------------------------------------------------------------------------ */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .flex:has(> .object-detail:not(.hidden)) > .object-row
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .object-detail:not(.hidden)
{
	width: 100% !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail
{
	padding: 0 0 16px !important;
}

body.zp-portal-theme.zp-m-detail main:not(#zpm1):not(#zpm2):not(#zpm3) #closeDetail,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #maximizeIcon,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #minimizeIcon
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail :is(.col-sm-710, .col-sm-12, .content-right-medium, .container, .row)
{
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	float: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .col-sm-294
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .content-right-medium
{
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

/* the desktop detail card (zpPortal.css .main-tab-wrapper.eu-records: purple top rule, rounded,
   22-28px padding) would nest a second gutter inside the full-screen detail - flatten it so the
   header's own 16px is the only inset */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .main-tab-wrapper.eu-records
{
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .form-header.summary-text
{
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 !important;
	padding: 12px 16px 4px !important;
	background: var(--zp-surface);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .record-subtext
{
	margin-top: 6px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail :is(.process-action-button, .object-action-buttons):not(.zp-m-actionbar-host)
{
	margin-top: 4px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .nested-tabs-block
{
	margin-top: 4px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .form-header-text h3,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .task-subject
{
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	letter-spacing: -0.01em;
	white-space: normal !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .record-subtext
{
	gap: 8px !important;
	font-size: 12px;
	color: var(--zp-ink-3);
}

/* the detail's ⋯ menu / Edit button move up into the header's right end */
body.zp-portal-theme.zp-m-detail main:not(#zpm1):not(#zpm2):not(#zpm3) .task-detail-view .tab-toolbar-block .stream-record-dropdown,
body.zp-portal-theme.zp-m-detail main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .close-button-col:not(:has(.form-header-text))
{
	position: fixed !important;
	top: calc(var(--sandbox-banner-height, 0px) + 4px);
	right: 8px;
	left: auto !important;
	z-index: 30;
	display: flex;
	align-items: center;
	gap: 4px;
	width: auto !important;
	margin: 0 !important;
}

body.zp-portal-theme.zp-m-detail main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .close-button-col:not(:has(.form-header-text)) .dropdown-menu,
body.zp-portal-theme.zp-m-detail main:not(#zpm1):not(#zpm2):not(#zpm3) .task-detail-view .tab-toolbar-block .stream-record-dropdown .dropdown-menu
{
	right: 0 !important;
	left: auto !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .task-detail-view .tab-toolbar-block
{
	min-height: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

/* task title row: the title on the left; on the right a block of the priority + status chips side by
   side, with the task's own buttons ("Start this Task") under them. The buttons stay in the toolbar markup
   (pulpstream.js finds and replaces them there); zpPortalMobile.js#syncTaskTitleActions positions them
   and sets --zp-m-title-actions-w / -h (their size) and --zp-m-title-chips-w (the chips' width), so the
   grid keeps that room free. :not(#zpm4) outranks #recordDetail's .col-sm-710 width:100% */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .task-detail-view .form-header .mt-2 > .flex:first-child
{
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto auto;
	grid-template-rows: auto auto;
	align-items: start;
	column-gap: 6px;
	row-gap: 6px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .task-detail-view .form-header .mt-2 > .flex:first-child > .w-full
{
	display: contents;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .task-detail-view .form-header .mt-2 > .flex:first-child .task-subject
{
	grid-column: 1;
	grid-row: 1 / span 2;
	margin: 0;
	padding-right: max(0px, calc(var(--zp-m-title-actions-w, 0px) - var(--zp-m-title-chips-w, 0px)));
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .task-detail-view .form-header .mt-2 > .flex:first-child .task-priority
{
	grid-column: 2;
	grid-row: 1;
	margin-top: 2px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .task-detail-view .form-header .mt-2 > .flex:first-child > .flex-col
{
	grid-column: 3;
	grid-row: 1;
	padding: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .task-detail-view.zp-m-has-title-actions .form-header .mt-2 > .flex:first-child
{
	grid-template-rows: auto var(--zp-m-title-actions-h, 0px);
	margin-bottom: 8px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .task-detail-view.zp-m-has-title-actions
{
	position: relative;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .task-detail-view .tab-toolbar-block .buttons-col.zp-m-title-actions:not(#zpm4)
{
	position: absolute !important;
	right: 16px;
	left: auto !important;
	z-index: 2;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .task-detail-view .zp-m-title-actions :is(.task-btn-group, .dropdown)
{
	display: flex;
	gap: 6px;
	margin: 0 !important;
	float: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .task-detail-view .zp-m-title-actions :is(button, a.btn)
{
	min-height: 32px !important;
	height: 32px !important;
	margin: 0 !important;
	padding: 0 12px !important;
	border-radius: 8px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	float: none !important;
	white-space: nowrap;
}

/* detail tab bars (Activity / Details / Tasks / Child Records / Attachments) */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .nested-tabs-block > ul.nav-tabs,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .nested-tabs-block > .main-nested-tab-block
{
	gap: 0 !important;
	padding: 0 6px !important;
	background: var(--zp-surface);
	border-bottom: 1px solid var(--zp-line) !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .nested-tabs-block > ul.nav-tabs:not(.scroll_tabs_container)
{
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .tab-content
{
	padding: 14px 16px 0;
}

/* two-column panes stack: activity full width, the milestone panel first */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail :is(.record-content-left, .record-content-right)
{
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #summary-record.active
{
	display: flex !important;
	flex-direction: column;
	gap: 12px;
}

/* milestones (Milestone Progress, the stage list, View process flow) are hidden on phones (2026-11-06);
   delete this rule to bring the panel back - the one below still lays it out first */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .record-content-right
{
	display: none !important;
}

/* ...which leaves the Activity pane (#summary-record) without the panel that spaced it: the tab bar
   overlaps the tab content's top padding, so the Add Note / Send Email bar sat on the tab rule, and the
   activity header's 15px margin stacked on the pane's 12px gap above the filters */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #summary-record.active
{
	padding-top: 14px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #summary-record .activity-header
{
	margin-top: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #summary-record .record-content-right
{
	order: -1;
	padding: 14px !important;
	border: 1px solid var(--zp-line) !important;
	border-radius: 12px;
	background: var(--zp-surface);
	box-sizing: border-box;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .stages-list .status-text
{
	max-width: none !important;
}

/* sub-processes card */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .expense-management-outer
{
	margin: 12px 16px 0 !important;
	width: auto !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #recordRelatedProcessList li.process-item
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	min-height: 56px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #recordRelatedProcessList li.process-item > *
{
	float: none !important;
}

/* Add note / Send email: two equal 44px buttons */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .post-note.post-note-inner
{
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 0 0 12px !important;
	padding: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .post-note.post-note-inner > button
{
	width: 100% !important;
	min-height: 44px;
	margin: 0 !important;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #feeds-activity
{
	margin-top: 0 !important;
}

/* task header: chips wrap */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .task-detail-view .mt-4.flex,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .task-detail-view .mt-4.flex > div
{
	flex-wrap: wrap;
	gap: 8px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .unclaimed-task-button
{
	width: auto !important;
	justify-content: flex-start !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .task-detail-view .mt-4.flex
{
	margin-top: 10px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .task-detail-view .task-due-date
{
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0 12px;
	border: 1px solid var(--zp-line);
	border-radius: 999px;
	font-size: 13px;
}

/* attachments / related tasks: the inline 82/18 + 80/20 grids get room for their actions */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .receipt-table [style*="grid-template-columns"]
{
	grid-template-columns: minmax(0, 1fr) auto !important;
}

/* an attachment row's left half: checkbox | file-type icon | name + size. Its inline 5% 8% 87% columns
   leave the ~32px icon a ~25px slot on a phone, so it spilled up and over and the name slid under the
   checkbox; size the first two columns to their content and centre everything on one line */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .document-explorer [style*="grid-template-columns:5% 8% 87%"]
{
	grid-template-columns: auto auto minmax(0, 1fr) !important;
	column-gap: 10px;
	align-items: center;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .document-explorer .type-icon
{
	float: none !important;
	margin: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .document-explorer .attachments-row.flex-col
{
	width: 100% !important;
	min-width: 0;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .document-explorer .select-checkbox
{
	margin: 0 !important;
	vertical-align: middle;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .document-explorer .action-col
{
	gap: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .task-block > header,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .document-block > header
{
	flex-wrap: wrap;
	gap: 8px;
}

/* child records: the 5-column table becomes one card per row - record no. + status pill on top,
   the summaries under it, the created date last. No header row (each line says what it is). */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #childRecords .record-content-left
{
	max-height: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #childRecords .related-table-div
{
	margin: 0 !important;
	overflow: visible !important;
	border: 0 !important;
	box-shadow: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #childRecords :is(.report-data-table, .report-data-table > tbody)
{
	display: block !important;
	width: 100% !important;
	border: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #childRecords .report-data-table > thead
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #childRecords tr.report-data-row
{
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 4px 10px;
	margin: 0 0 10px;
	padding: 12px 14px;
	border: 1px solid var(--zp-line);
	border-radius: 12px;
	background: var(--zp-surface);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #childRecords tr.report-data-row > td
{
	display: block !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	padding: 0 !important;
	border: 0 !important;
	text-align: left !important;
	font-size: 14px;
	line-height: 1.4;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #childRecords tr.report-data-row > td.record-no-column
{
	grid-column: 1;
	grid-row: 1;
	font-size: 12px;
	font-weight: 600;
	color: var(--zp-ink-3);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #childRecords tr.report-data-row > td.status-cell
{
	grid-column: 2;
	grid-row: 1;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #childRecords tr.report-data-row > td.summary-cell
{
	grid-column: 1 / -1;
	color: var(--zp-ink-2, var(--zp-ink));
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #childRecords tr.report-data-row > td.summary-cell:nth-child(2)
{
	font-weight: 600;
	color: var(--zp-ink);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #childRecords tr.report-data-row > td.summary-cell:empty
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #childRecords tr.report-data-row > td.date-created-column
{
	grid-column: 1 / -1;
	font-size: 12px;
	color: var(--zp-ink-3);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail #childRecords .zp-child-empty
{
	padding: 40px 16px;
}

/* Details tab / smart-object detail forms: one column (see section 10) */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .record-detail-tab-navigation ul.nav-tabs,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .form-content-tab .tab-pane
{
	width: 100% !important;
	min-width: 0 !important;
}

/* the composer's "Insert template" button (messageTemplates.js) is pinned over the right end of the editor
   toolbar (absolute, right: 8px). The phone's toolbar already runs most of the row (B I U, two lists,
   indent), so the 110px "Insert template" label sat on top of the last icons. Keep it in place but as
   the book icon alone - it clears the toolbar and keeps its glow / tap target. */
body.zp-portal-theme .mtp-insert-template-btn
{
	right: 4px !important;
	gap: 0 !important;
	padding: 8px !important;
	min-width: 36px;
	min-height: 36px;
	justify-content: center;
}

body.zp-portal-theme .mtp-insert-template-btn > span
{
	display: none !important;
}

body.zp-portal-theme .mtp-insert-template-btn > svg
{
	width: 18px;
	height: 18px;
}

/* ------------------------------------------------------------------------------------------
   9. Docked action bar - a task's Approve / Reject / Complete (or its Actions menu) and a record's
      process buttons sit where the tab bar is (the JS marks the container .zp-m-actionbar-host and
      hides the tab bar). The Actions dropdown opens upward as a sheet.
   ------------------------------------------------------------------------------------------ */
body.zp-portal-theme.zp-m-actionbar main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-m-actionbar-host
{
	position: fixed !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	z-index: 44;
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center;
	justify-content: stretch !important;
	gap: 8px !important;
	width: auto !important;
	height: calc(var(--zp-mnav-h) + var(--zp-m-safe-bottom));
	margin: 0 !important;
	padding: 10px 16px calc(10px + var(--zp-m-safe-bottom)) !important;
	overflow-x: auto;
	background: var(--zp-surface);
	border-top: 1px solid var(--zp-line);
	box-sizing: border-box;
}

body.zp-portal-theme.zp-m-actionbar main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-m-actionbar-host > *
{
	flex: 1 1 0;
	min-width: max-content;
	margin: 0 !important;
	float: none !important;
	width: auto !important;
}

body.zp-portal-theme.zp-m-actionbar main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-m-actionbar-host .task-btn-group,
body.zp-portal-theme.zp-m-actionbar main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-m-actionbar-host .dropdown
{
	display: flex;
	gap: 8px;
}

body.zp-portal-theme.zp-m-actionbar main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-m-actionbar-host :is(button, a.btn)
{
	flex: 1 1 0;
	width: 100%;
	min-height: 44px !important;
	height: 44px !important;
	margin: 0 !important;
	padding: 0 14px !important;
	border-radius: 10px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	float: none !important;
	white-space: nowrap;
}

body.zp-portal-theme.zp-m-actionbar main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-m-actionbar-host .dropdown-menu
{
	position: fixed !important;
	top: auto !important;
	right: 0 !important;
	bottom: calc(var(--zp-mnav-h) + var(--zp-m-safe-bottom)) !important;
	left: 0 !important;
	min-width: 0 !important;
	max-height: 60dvh;
	margin: 0 !important;
	padding: 8px 16px 12px !important;
	overflow-y: auto;
	border: 0 !important;
	border-top: 1px solid var(--zp-line) !important;
	border-radius: 16px 16px 0 0 !important;
	box-shadow: 0 -8px 24px rgba(28,27,34,0.12) !important;
}

body.zp-portal-theme.zp-m-actionbar main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-m-actionbar-host .dropdown-menu > li > a
{
	display: flex !important;
	align-items: center;
	min-height: 48px;
	margin: 4px 0;
	padding: 0 14px !important;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
}

/* ------------------------------------------------------------------------------------------
   10. Forms - start form / task completion form / edit popup goes full screen: sticky header with
       the close X on the left, one column of fields, sticky Save draft + Submit at the bottom
   ------------------------------------------------------------------------------------------ */
body.zp-portal-theme .k2-sec-popup
{
	position: fixed !important;
	inset: 0 !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	overflow-y: auto !important;
	background: var(--zp-surface);
	-webkit-overflow-scrolling: touch;
}

body.zp-portal-theme .k2-sec-popup > .wrapper,
body.zp-portal-theme .k2-sec-popup #addNewRecordPopup
{
	width: 100% !important;
	max-width: none !important;
	min-height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

body.zp-portal-theme .k2-sec-popup #addNewRecordPopup > .row,
body.zp-portal-theme .k2-sec-popup #addNewRecordPopup .col-sm-12
{
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 0 !important;
}

body.zp-portal-theme .k2-sec-popup header.popup-header
{
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 4px;
	min-height: 56px;
	padding: 0 8px !important;
	border-top: 3px solid var(--zp-accent);
	border-bottom: 1px solid var(--zp-line);
	background: var(--zp-surface);
	box-sizing: border-box;
}

body.zp-portal-theme .k2-sec-popup header.popup-header h2
{
	flex: 1;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	font-size: 16px !important;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.zp-portal-theme .k2-sec-popup header.popup-header .popup-close
{
	order: -1;
	position: static !important;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0 !important;
}

body.zp-portal-theme .k2-sec-popup .financial-nav ul.nav-tabs
{
	width: 100% !important;
	overflow-x: auto;
}

body.zp-portal-theme .k2-sec-popup .tab-content.record-form-tab-content,
body.zp-portal-theme .k2-sec-popup .form-layout-container
{
	padding-left: 16px !important;
	padding-right: 16px !important;
}

/* one column: the designer's absolute / px-sized field boxes and layout columns flow full width */
body.zp-portal-theme .k2-sec-popup .form-layout-container,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .form-content-tab .form-layout-container
{
	height: auto !important;
	min-height: 0 !important;
	width: 100% !important;
}

body.zp-portal-theme .k2-sec-popup .form-layout-container .form-group,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .form-content-tab .form-group
{
	position: relative !important;
	top: auto !important;
	left: auto !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	box-sizing: border-box;
}

body.zp-portal-theme .k2-sec-popup .form-layout-container :is(.layout_container, .layoutBody, .cbox_panel, .resizable_columnDiv, .mainPanel, .hPanel_body, .section-field-area),
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .form-content-tab :is(.layout_container, .layoutBody, .cbox_panel, .resizable_columnDiv, .mainPanel, .hPanel_body, .section-field-area)
{
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	float: none !important;
	box-sizing: border-box;
}

body.zp-portal-theme .k2-sec-popup .form-layout-container :is(.column-layout-table, .hbox-layout-table, .hbox-layout-table > tbody, .hbox-layout-table tr, .hbox-layout-table td),
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #recordDetail .form-content-tab :is(.column-layout-table, .hbox-layout-table, .hbox-layout-table > tbody, .hbox-layout-table tr, .hbox-layout-table td)
{
	display: block !important;
	width: 100% !important;
}

body.zp-portal-theme .k2-sec-popup .form-group label.form-label-pos
{
	position: static !important;
	display: block;
	width: auto !important;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
}

body.zp-portal-theme .k2-sec-popup .form-group :is(input.form-control, select, textarea):not([type="checkbox"]):not([type="radio"])
{
	width: 100% !important;
	min-height: 46px;
	font-size: 16px !important;   /* no iOS zoom on focus */
	box-sizing: border-box;
}

body.zp-portal-theme .k2-sec-popup .form-group textarea
{
	min-height: 84px;
}

body.zp-portal-theme .k2-sec-popup .chosen-container
{
	width: 100% !important;
}

body.zp-portal-theme .k2-sec-popup .k2-inner-head
{
	font-size: 14px;
	font-weight: 600;
	color: var(--zp-accent-strong);
}

body.zp-portal-theme .k2-sec-popup table.documentListGridtable
{
	display: block;
	overflow-x: auto;
}

body.zp-portal-theme .k2-sec-popup #addNewRecord.blue-border-button
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 16px;
}

body.zp-portal-theme .k2-sec-popup footer.popup-footer
{
	position: sticky;
	bottom: 0;
	z-index: 5;
	background: var(--zp-surface);
}

body.zp-portal-theme .k2-sec-popup .form-footer-buttons
{
	gap: 8px !important;
	padding: 10px 16px calc(14px + var(--zp-m-safe-bottom)) !important;
}

body.zp-portal-theme .k2-sec-popup .form-footer-buttons .tab-buttons
{
	gap: 8px !important;
}

/* closing is the header X; the footer keeps Save draft + Submit side by side */
body.zp-portal-theme .k2-sec-popup .form-footer-buttons #cancelRecordAdd
{
	display: none !important;
}

body.zp-portal-theme .k2-sec-popup .form-footer-buttons .tab-buttons > :is(button, a)
{
	flex: 1 1 0;
	min-height: 48px;
	margin: 0 !important;
	border-radius: 10px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
}

/* the legacy wrapper keeps a desktop min-width (pulpstream2.css: .form-k2-sec-popup .wrapper
   min-width:1024px), which laid the whole form out 1024px wide and clipped it at the screen edge */
body.zp-portal-theme .k2-sec-popup > .wrapper
{
	min-width: 0 !important;
}

/* zpPortalForms.css styles the same form as a desktop card through #addNewRecordPopup selectors,
   which outrank the id-less phone rules above (40px gutters, 38px controls, right-aligned auto-width
   buttons). Re-assert the phone layout at the id's specificity. */
body.zp-portal-theme .k2-sec-popup #addNewRecordPopup > .row
{
	border: 0 !important;
	box-shadow: none !important;
}

body.zp-portal-theme .k2-sec-popup #addNewRecordPopup header.popup-header
{
	gap: 4px;
	padding: 0 8px !important;
}

body.zp-portal-theme .k2-sec-popup #addNewRecordPopup .financial-nav
{
	padding: 0 16px !important;
}

body.zp-portal-theme .k2-sec-popup #addNewRecordPopup .record-form-tab-content
{
	padding: 20px 16px 24px !important;
}

body.zp-portal-theme .k2-sec-popup #addNewRecordPopup .form-group :is(input.form-control, select, .chosen-container-single .chosen-single):not([type="checkbox"]):not([type="radio"])
{
	height: 46px;
	min-height: 46px;
}

body.zp-portal-theme .k2-sec-popup #addNewRecordPopup .chosen-container-single .chosen-single span
{
	line-height: 44px;
}

body.zp-portal-theme .k2-sec-popup #addNewRecordPopup :is(a.p-choose-lookup, a.dp-choose-date)
{
	margin-top: 13px;
}

body.zp-portal-theme .k2-sec-popup #addNewRecordPopup .popup-footer
{
	border-radius: 0;
}

body.zp-portal-theme .k2-sec-popup #addNewRecordPopup .form-footer-buttons
{
	padding: 10px 16px calc(14px + var(--zp-m-safe-bottom)) !important;
}

body.zp-portal-theme .k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-buttons
{
	justify-content: stretch;
}

body.zp-portal-theme .k2-sec-popup #addNewRecordPopup .form-footer-buttons .tab-buttons > :is(button, a)
{
	flex: 1 1 0;
	min-width: 0;
	height: 48px !important;
	padding: 0 12px !important;
	border-radius: 10px !important;
	font-size: 15px !important;
}

/* Bootstrap dialogs (task completion, new schedule, dashboard settings...) - full width */
body.zp-portal-theme .modal .modal-dialog
{
	width: auto !important;
	max-width: none !important;
	margin: 8px !important;
}

body.zp-portal-theme .modal .modal-body
{
	float: none !important;
	max-width: 100%;
	overflow-x: auto;
}

/* two-column form rows (Your settings, schedule editor, ...) stack */
body.zp-portal-theme :is(main, .modal) .form-input-row .form-input-column
{
	width: 100% !important;
	float: none !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body.zp-portal-theme :is(main, .modal) :is(#startDateTime, #customMethod)
{
	width: 100% !important;
}

/* ------------------------------------------------------------------------------------------
   11. Automation schedule detail, Your settings, Account Management
   ------------------------------------------------------------------------------------------ */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #manageSchedules #col-sm-710,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #reportSchedules #col-sm-710
{
	flex-wrap: wrap;
	gap: 8px;
	padding: 16px 16px 0;
	box-sizing: border-box;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) :is(#manageSchedules, #reportSchedules) #col-sm-710 > div
{
	width: 100% !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) :is(#manageSchedules, #reportSchedules) .process-schedule-div,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) :is(#manageSchedules, #reportSchedules) .smartobject-schedule-content
{
	padding: 0 16px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #profileManagement .wrapper > .container
{
	width: 100% !important;
	padding: 12px 16px 16px !important;
	box-sizing: border-box;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #profileManagement .main-tab-wrapper
{
	padding: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #profileManagement .form-header
{
	flex-wrap: wrap;
	padding-top: 14px;
}

/* Your settings: avatar + name take the first line (the name was squeezed into a word per line
   between the avatar and the buttons), the gear + Edit drop to a second line */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header
{
	align-items: center;
	row-gap: 10px !important;
	padding: 16px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .form-header-text
{
	flex: 1 1 0;
	min-width: 0;
	margin: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .form-header-text h3
{
	margin: 0 !important;
	font-size: 18px !important;
	line-height: 1.3 !important;
	overflow-wrap: anywhere;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header #col-sm-710
{
	flex: 1 0 100%;
	justify-content: flex-end;
	margin: 0 !important;
}

/* Your settings -> Role: the profile card. Header = avatar + name on one line, gear + Edit on the line under
   them; the form runs the card's full width on 16px gutters (desktop's 32px card padding + 15px form padding
   + 12px column padding left it indented ~70px with a wide dead strip on the right). */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header
{
	display: grid !important;
	grid-template-columns: 56px minmax(0, 1fr);
	align-items: center;
	gap: 10px 14px !important;
	padding: 16px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .user-avatar-outer
{
	position: relative;
	grid-column: 1;
	grid-row: 1;
	width: 56px;
	height: 56px;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .user-avatar-outer .img-outercon
{
	width: 56px;
	height: 56px;
	margin: 0;
	overflow: hidden;
	border-radius: 50%;
	background: var(--zp-surface-muted);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .user-avatar-outer .img-outercon img
{
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* the photo is the upload button: the (invisible) file input covers the avatar */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .user-avatar-outer form,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .user-avatar-outer .file-wrapper
{
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .user-avatar-outer .file-wrapper .button
{
	opacity: 0;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .user-avatar-outer input[type=file]
{
	width: 100%;
	height: 100%;
	cursor: pointer;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .form-header-text
{
	grid-column: 2;
	grid-row: 1;
	flex: none;
	padding: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header #col-sm-710
{
	grid-column: 1 / -1;
	grid-row: 2;
	justify-content: flex-end;
	gap: 10px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .nested-tabs-block
{
	padding: 4px 16px 24px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-content,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .nested-tab-content
{
	float: none !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	box-sizing: border-box;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .nested-tab-content
{
	padding-top: 12px !important;
	padding-bottom: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-group.form-input-row
{
	margin: 0 0 14px !important;
	padding: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-input-column
{
	float: none !important;
	width: 100% !important;
	margin: 0 0 14px !important;
	padding: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-input-row > .form-input-column:last-child
{
	margin-bottom: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile label
{
	display: block;
	margin: 0 0 6px !important;
	font-size: 14px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile :is(.form-control, .chosen-container .chosen-single)
{
	width: 100% !important;
	min-height: 44px;
	box-sizing: border-box;
}

/* the Time Zone / Date Format dropdowns (chosen) read as the same field as the inputs */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .chosen-container-single .chosen-single
{
	display: flex;
	align-items: center;
	height: 44px !important;
	padding: 0 40px 0 14px !important;
	line-height: 1.2 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .chosen-container-single .chosen-single > span
{
	margin: 0 !important;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .chosen-container-single .chosen-single div
{
	right: 8px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #profileManagement #col-sm-710
{
	width: auto !important;
	margin-left: auto;
	padding-bottom: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #profileManagement :is(.col-sm-710, .container, .row, .content-right-medium)
{
	float: none !important;
	max-width: 100%;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #profileManagement .form-control
{
	min-height: 44px;
	font-size: 16px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #profileManagement .chosen-container
{
	width: 100% !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #profileManagement .delegation-help-text
{
	margin: 0 0 12px !important;
	width: auto !important;
}

/* ------------------------------------------------------------------------------------------
   12. Dashboards - one widget per row, widget actions always visible (no hover on touch)
   ------------------------------------------------------------------------------------------ */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-dashboard-tabbar
{
	padding: 0 6px !important;
	border-bottom: 1px solid var(--zp-line);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-dashboard-tabbar > div
{
	width: 100% !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .zp-dashboard-tabbar .widget-tabs
{
	border-bottom: 0 !important;
	padding: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #dashboards :is(.stream-dashboard-outer, .container, .row, .col-sm-12, .content-left-medium)
{
	width: 100% !important;
	margin: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	float: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #dashboardContainer
{
	grid-template-columns: minmax(0, 1fr) !important;
	gap: 12px !important;
	padding: 12px 16px 20px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .dashboard-widget
{
	width: 100% !important;
	max-width: 100%;
	border-radius: 12px !important;
	overflow: hidden;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .dashboard-widget .icon-container,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .dashboard-widget .dashboard-icon
{
	opacity: 1 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .dashboard-widget .widget-container,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) .dashboard-widget .widget-content
{
	max-width: 100%;
	overflow-x: auto;
}

/* ------------------------------------------------------------------------------------------
   13. Reports - the folder tree becomes a bottom sheet behind a folder button; the list card and
       the report view take the full width
   ------------------------------------------------------------------------------------------ */
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #reportObjectContainer > .zp-m-folder-btn
{
	display: flex;
	align-items: center;
	gap: 8px;
	width: calc(100% - 32px);
	min-height: 44px;
	margin: 0 16px 8px;
	padding: 0 12px;
	border: 1px solid var(--zp-line);
	border-radius: 10px;
	background: var(--zp-surface);
	color: var(--zp-ink);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	box-sizing: border-box;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #reportObjectContainer > .zp-m-folder-btn > svg:first-child
{
	color: var(--zp-accent-strong);
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #reportObjectContainer > .zp-m-folder-btn .zp-m-folder-name
{
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #reportsFolder .stream-report-outer > .container > .row.grid,
body.zp-portal-theme main #reportsFolder .stream-report-outer > .container > .row.grid:has(> .col-sm-3 > .right-content-area-scroll.jstree)
{
	grid-template-columns: minmax(0, 1fr) !important;
	gap: 0 !important;
	margin: 0 !important;
	padding: 0 16px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #reportsFolder .stream-report-outer > .container
{
	width: 100% !important;
	padding: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #reportsFolder .row.grid > .col-sm-9
{
	width: 100% !important;
	max-width: 100%;
	padding: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #reportsFolder .row.grid > .col-sm-3:has(.jstree)
{
	display: none !important;
}

body.zp-portal-theme.zp-m-folders-open main:not(#zpm1):not(#zpm2):not(#zpm3) #reportsFolder .row.grid > .col-sm-3:has(.jstree)
{
	position: fixed !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	z-index: 1036;
	display: block !important;
	width: auto !important;
	max-height: 70dvh;
	margin: 0 !important;
	padding: 12px 8px calc(16px + var(--zp-m-safe-bottom)) !important;
	overflow-y: auto;
	border: 0 !important;
	border-radius: 16px 16px 0 0 !important;
	background: var(--zp-surface);
	box-shadow: 0 -8px 24px rgba(28,27,34,0.16);
}

body.zp-portal-theme.zp-m-folders-open::after
{
	content: "";
	position: fixed;
	inset: 0;
	z-index: 1035;
	background: rgba(28,27,34,0.4);
}

/* in the sheet the tree scrolls natively - its jScrollPane box is released */
body.zp-portal-theme.zp-m-folders-open main #reportsFolder .col-sm-3 :is(.right-content-area-scroll, .jspContainer, .jspPane)
{
	position: static !important;
	top: 0 !important;
	width: auto !important;
	height: auto !important;
}

body.zp-portal-theme.zp-m-folders-open main #reportsFolder .col-sm-3 .jspVerticalBar
{
	display: none !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #reportsFolder .content-left-medium,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #reportsFolder .report-table-container,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #reportsFolder .report-chart-container
{
	max-width: 100%;
	overflow-x: auto;
}

}

/* Record detail on a phone: smaller profile pictures (activity feed, comments, participants, task
   assignees) so the 40px avatars stop crowding the data beside them. */
@media (max-width: 767.98px)
{

body.zp-portal-theme main #recordDetail .img-outercon
{
	width: 28px !important;
	height: 28px !important;
	min-width: 28px;
	margin-right: 8px;
	background-size: auto;
}

body.zp-portal-theme main #recordDetail .img-outercon img
{
	width: 28px !important;
	height: 28px !important;
	object-fit: cover;
}

body.zp-portal-theme main #recordDetail .img-outercon .icon-approved
{
	transform: scale(0.7);
	transform-origin: bottom right;
}

body.zp-portal-theme main #recordDetail .top-section .name-outercon
{
	padding-left: 8px !important;
}

body.zp-portal-theme main #recordDetail .user-logo.user-image
{
	width: 20px !important;
	height: 20px !important;
}

}

/* Your settings -> Role header on a phone: smaller avatar, with the name and the gear + Edit sharing
   one line instead of Edit dropping onto a row of its own. */
@media (max-width: 767.98px)
{

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header
{
	grid-template-columns: 40px minmax(0, 1fr) auto;
	gap: 0 12px !important;
	padding: 12px 16px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .user-avatar-outer,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .user-avatar-outer .img-outercon
{
	width: 40px !important;
	height: 40px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .user-avatar-outer .img-outercon
{
	margin: 0 !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header .user-avatar-outer .img-outercon img
{
	width: 40px !important;
	height: 40px !important;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header #col-sm-710
{
	grid-column: 3;
	grid-row: 1;
	flex: none;
	width: auto !important;
	gap: 8px;
}

body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header #col-sm-710 .btn,
body.zp-portal-theme main:not(#zpm1):not(#zpm2):not(#zpm3) #currentUserProfile .form-header #col-sm-710 button
{
	height: 36px;
	padding: 0 16px;
}

}
