/* ElegantSupport Customer Portal. Scoped to .es-portal / .es-portal-body. */
@import url('../styles/checkbox.css');

.es-portal-body {
	margin: 0;
	background: var(--es-bg, #f8fafc);
	color: var(--es-text, #0f172a);
	font-family: inherit;
}
.es-portal {
	min-height: 100vh;
	background: var(--es-bg, #f8fafc);
	color: var(--es-text, #0f172a);
	display: flex;
	flex-direction: column;
}
.es-p-unavailable { padding: 48px 16px; text-align: center; }
.es-p-ticket__actions { margin-top: 12px; }
.es-p-skip { position:absolute; left:12px; top:12px; transform:translateY(-200%); }
.es-p-skip:not(:focus) { width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.es-p-skip:focus {
	transform:translateY(0);
	left: 8px;
	z-index: 20;
	background: var(--es-surface);
	padding: 8px;
}
.es-p-top {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 20px;
	background: var(--es-surface, #fff);
	border-bottom: 1px solid var(--es-border, #e5e7eb);
	position: sticky;
	top: 0;
	z-index: 10;
}
.es-p-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	color: inherit;
	text-decoration: none;
	min-height: 44px;
}
.es-p-brand img { height: 28px; width: auto; }
.es-p-nav {
	display: flex;
	gap: 4px;
	flex: 1;
	flex-wrap: wrap;
}
.es-p-nav a {
	color: var(--es-muted, #64748b);
	text-decoration: none;
	padding: 8px 12px;
	border-radius: 999px;
	min-height: 40px;
	display: inline-flex;
	align-items: center;
}
.es-p-nav a.is-active,
.es-p-nav a:hover {
	color: var(--es-text);
	background: var(--es-primary-soft, #eef2ff);
}
.es-p-account-menu { display: flex; gap: 8px; align-items: center; }
.es-p-menu, .es-p-bottom { display: none; }
.es-p-main {
	width: min(1120px, calc(100% - 32px));
	margin: 24px auto 80px;
	flex: 1;
}
.es-p-hero {
	background: var(--es-surface);
	border: 1px solid var(--es-border);
	border-radius: var(--es-radius, 12px);
	padding: 28px 24px;
	margin-bottom: 20px;
	box-shadow: var(--es-shadow);
}
.es-p-kicker { color: var(--es-primary); font-weight: 600; margin: 0 0 6px; }
.es-p-hero h1, .es-p-main h1 { margin: 0 0 8px; letter-spacing: -0.03em; }
.es-p-lead { color: var(--es-muted); margin: 0 0 16px; }
.es-p-hero__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.es-p-kpis {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-bottom: 20px;
}
.es-p-kpi {
	background: var(--es-surface);
	border: 1px solid var(--es-border);
	border-radius: var(--es-radius);
	padding: 16px;
	text-align: left;
	cursor: pointer;
	min-height: 88px;
}
.es-p-kpi strong { display: block; font-size: 28px; }
.es-p-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.es-p-stack { display: flex; flex-direction: column; gap: 16px; }
.es-p-card {
	background: var(--es-surface);
	border: 1px solid var(--es-border);
	border-radius: var(--es-radius);
	padding: 18px;
	box-shadow: var(--es-shadow);
}
.es-p-card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.es-p-card__head h2, .es-p-card h2 { margin: 0; font-size: 16px; }
.es-p-list { list-style: none; margin: 0; padding: 0; }
.es-p-list.es-p-ai__messages { display: grid; gap: 20px; margin-bottom: 24px; }
.es-p-ai__messages:empty { display: none; }
.es-p-list li { border-top: 1px solid var(--es-border); padding: 10px 0; }
.es-p-list li:first-child { border-top: 0; }
.es-p-ticket-row, .es-p-ticket-card {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	text-align: left;
	background: none;
	border: 0;
	padding: 12px 0;
	cursor: pointer;
	color: inherit;
}
.es-p-ticket-row > div,
.es-p-ticket-card > div {
	/* The ticket subject is unbounded user content. Allow its column to shrink
	 * so a long title cannot push the status pill off-screen. */
	min-width: 0;
	flex: 1 1 auto;
}
.es-p-ticket-row strong,
.es-p-ticket-card strong,
.es-p-ticket__head h1 {
	display: block;
	overflow-wrap: anywhere;
}
.es-p-ticket-row > .es-p-status,
.es-p-ticket-card > .es-p-status {
	flex: 0 0 auto;
	align-self: center;
	max-width: 40%;
	overflow-wrap: anywhere;
	text-align: center;
}
.es-p-muted { color: var(--es-muted); margin: 4px 0 0; font-size: 13px; }
.es-p-mono { font-variant-numeric: tabular-nums; color: var(--es-muted); font-size: 12px; }
.es-p-status {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: var(--es-info-soft);
	color: var(--es-info);
}
.es-p-status--waiting { background: var(--es-warning-soft); color: var(--es-warning); }
.es-p-status--resolved { background: var(--es-success-soft); color: var(--es-success); }
.es-p-status--closed { background: var(--es-border); color: var(--es-muted); }
.es-p-btn {
	border: 1px solid var(--es-border);
	background: var(--es-surface);
	color: var(--es-text);
	border-radius: 10px;
	padding: 10px 14px;
	min-height: 44px;
	cursor: pointer;
	font-weight: 600;
}
.es-p-btn--primary {
	background: var(--es-primary, #6366f1);
	border-color: transparent;
	color: #fff;
}
.es-p-btn:focus-visible, .es-p-nav a:focus-visible, .es-p-link:focus-visible, .es-p-editor:focus-visible, .es-portal :is(input, textarea, select):focus-visible {
	outline: 2px solid var(--es-primary);
	outline-offset: 2px;
}
.es-p-link { background: none; border: 0; color: var(--es-primary); cursor: pointer; padding: 0; text-decoration: none; }
.es-p-toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 16px; align-items: center; }
.es-p-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.es-p-filters button {
	border: 1px solid var(--es-border);
	background: var(--es-surface);
	border-radius: 999px;
	padding: 8px 12px;
	min-height: 40px;
	cursor: pointer;
	color: inherit;
}
.es-p-filters button.is-active { background: var(--es-primary); color: #fff; border-color: transparent; }
.es-p-search {
	flex: 1;
	min-width: 180px;
	border: 1px solid var(--es-border);
	border-radius: 10px;
	padding: 10px 12px;
	background: var(--es-surface);
	color: inherit;
}
.es-p-search--lg { width: 100%; margin: 12px 0 20px; }
.es-p-table { width: 100%; border-collapse: collapse; }
.es-p-table th { text-align: left; font-size: 12px; color: var(--es-muted); padding: 8px; }
.es-p-table td { padding: 12px 8px; border-top: 1px solid var(--es-border); vertical-align: top; }
.es-p-table tr { cursor: pointer; }
.es-p-cards { display: none; }
.es-p-thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.es-p-msg { display: flex; gap: 12px; }
.es-p-avatar {
	width: 40px; height: 40px; border-radius: 50%;
	background: var(--es-primary-soft); color: var(--es-primary);
	display: grid; place-items: center; font-weight: 700; flex: none;
}
.es-p-msg--agent .es-p-avatar { background: var(--es-sidebar, #1e1b4b); color: #fff; }
.es-p-msg__body {
	background: var(--es-surface);
	border: 1px solid var(--es-border);
	border-radius: 12px;
	padding: 12px 14px;
	flex: 1;
	min-width: 0;
}
.es-p-msg--agent .es-p-msg__body { background: var(--es-primary-soft); }
.es-p-msg__html { overflow-wrap: anywhere; }
.es-p-msg__html img { max-width: 100%; height: auto; }
.es-p-files { min-width: 0; padding-left: 20px; }
.es-p-files a, .es-p-files span { overflow-wrap: anywhere; }
.es-p-composer {
	margin-top: 20px;
	background: var(--es-surface);
	border: 1px solid var(--es-border);
	border-radius: 12px;
	padding: 12px;
}
.es-p-editor {
	min-height: 120px;
	border: 1px solid var(--es-border);
	border-radius: 8px;
	padding: 10px;
	margin: 8px 0;
	background: var(--es-bg);
	color: inherit;
}
.es-p-composer__tools { display: flex; gap: 6px; flex-wrap: wrap; }
.es-p-composer__tools button, .es-p-file {
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid var(--es-border);
	background: var(--es-bg);
	color: inherit;
	border-radius: 8px;
	cursor: pointer;
}
.es-p-file input { display: none; }
.es-p-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.es-p-field input, .es-p-field textarea, .es-p-field select, .es-p-csat textarea {
	border: 1px solid var(--es-border);
	border-radius: 8px;
	padding: 10px;
	background: var(--es-bg);
	color: inherit;
	width: 100%;
}
.es-p-create__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.es-p-empty { text-align: center; padding: 32px 12px; }
.es-p-skeleton__row { height: 16px; background: var(--es-border); border-radius: 8px; margin: 10px 0; animation: es-p-pulse 1.2s ease infinite; }
@keyframes es-p-pulse { 50% { opacity: .5; } }
.es-p-login { min-height: 70vh; display: grid; place-items: center; }
.es-p-login__card { width: min(420px, 100%); }
.es-p-hp { position: absolute; left: -9999px; }
.es-portal .es-p-card .es-p-error,
.es-p-error { color: var(--es-danger); }
.es-p-toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 30; width: min(360px, calc(100vw - 32px)); }
.es-p-toast { background: var(--es-sidebar, #1e1b4b); color: #fff; padding: 10px 14px; border-radius: 10px; overflow-wrap: anywhere; }
.es-p-csat { margin-top: 20px; padding: 16px; border: 1px solid var(--es-border); border-radius: 12px; background: var(--es-surface); }
.es-p-stars { display: flex; gap: 8px; margin: 8px 0; }
.es-p-stars button { min-width: 44px; min-height: 44px; border-radius: 8px; border: 1px solid var(--es-border); background: var(--es-bg); color: inherit; }
.es-p-stars button.is-on { background: var(--es-primary); color: #fff; }
.es-p-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.es-p-kb { list-style: none; padding: 0; }
.es-p-kb a { display: block; padding: 14px; border: 1px solid var(--es-border); border-radius: 12px; margin-bottom: 10px; text-decoration: none; color: inherit; background: var(--es-surface); }

[data-es-theme="dark"] .es-portal-body,
[data-es-theme="dark"] .es-portal {
	background: var(--es-bg);
	color: var(--es-text);
}
[data-es-theme="dark"] .es-p-editor,
[data-es-theme="dark"] .es-p-field input,
[data-es-theme="dark"] .es-p-field textarea,
[data-es-theme="dark"] .es-p-search {
	background: var(--es-surface);
	color: var(--es-text);
}

@media (max-width: 900px) {
	.es-p-kpis, .es-p-grid, .es-p-create__grid { grid-template-columns: 1fr 1fr; }
	.es-p-table-wrap { display: none; }
	.es-p-cards { display: flex; flex-direction: column; gap: 10px; }
	.es-p-ticket-card {
		border: 1px solid var(--es-border);
		border-radius: 12px;
		padding: 14px;
		background: var(--es-surface);
	}
}
@media (max-width: 720px) {
	.es-p-nav, .es-p-account-menu { display: none; }
	.es-portal.is-nav-open .es-p-nav {
		display: flex;
		flex-direction: column;
		position: absolute;
		top: 60px; left: 0; right: 0;
		background: var(--es-surface);
		padding: 12px;
		border-bottom: 1px solid var(--es-border);
	}
	.es-p-menu { display: inline-flex; min-height: 44px; min-width: 44px; }
	.es-p-bottom {
		display: flex;
		position: sticky;
		bottom: 0;
		background: var(--es-surface);
		border-top: 1px solid var(--es-border);
		justify-content: space-around;
		padding: 8px;
	}
	.es-p-bottom a { color: inherit; text-decoration: none; font-size: 12px; min-height: 44px; display: grid; place-items: center; }
	.es-p-kpis { grid-template-columns: 1fr 1fr; }
	.es-p-main { width: calc(100% - 24px); margin-bottom: 24px; }
	.es-p-toasts { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: auto; }
}
/* Balanced spacing and hierarchy for all functional portal views. */
.es-portal-body { font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif; font-size:15px; line-height:1.6; }
.es-portal *, .es-portal *::before, .es-portal *::after { box-sizing:border-box; }
.es-p-top { padding:16px max(24px,calc((100vw - 1180px)/2)); gap:24px; }
.es-p-main { width:min(1180px,calc(100% - 48px)); margin:40px auto 56px; }
.es-p-main h1 { font-size:clamp(28px,3vw,38px); line-height:1.2; margin-bottom:14px; }
.es-p-main h2 { font-size:21px; letter-spacing:-.025em; line-height:1.4; }
.es-p-card { border-radius:16px; padding:28px; box-shadow:0 3px 14px #17214a04; }
.es-p-grid, .es-p-create__grid { gap:28px; }
.es-p-hero { padding:36px; margin-bottom:24px; border-radius:18px; }
.es-p-lead { max-width:68ch; line-height:1.75; margin-bottom:28px; }
.es-p-kpis { gap:20px; margin-bottom:28px; }
.es-p-kpi { padding:24px; }
.es-p-toolbar { gap:20px; margin-block:24px; }
.es-p-field { gap:9px; margin-bottom:22px; }
.es-p-field :is(input,select,textarea) { padding:12px 14px; min-height:48px; border-radius:9px; font:inherit; }
.es-p-field :is(input,textarea,select):focus-visible { outline:3px solid color-mix(in srgb,var(--es-primary) 25%,transparent); outline-offset:2px; border-color:var(--es-primary); }
.es-p-btn { min-height:44px; padding:10px 20px; border-radius:9px; font-weight:600; }
.es-p-login { grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:64px; min-height:620px; align-items:center; }
.es-p-login__card { width:100%; padding:36px; }
/* On phones the sign-in task comes before the optional promotional panel. */
@media(max-width:768px) { .es-p-login__intro { display:none; } }
.es-p-login__intro { padding:24px 12px; }
.es-p-login__intro h2 { font-size:36px; max-width:20ch; line-height:1.25; margin:16px 0 20px; }
.es-p-login__intro p { color:var(--es-muted); max-width:45ch; line-height:1.85; }
.es-p-login__intro ul { padding:0; list-style:none; margin:28px 0; }
.es-p-login__intro li { padding:12px 0; border-bottom:1px solid var(--es-border); }
.es-p-login__intro li::before { content:'✓'; color:var(--es-primary); font-weight:700; margin-right:12px; }
.es-p-login__intro a { color:var(--es-primary); font-weight:600; text-decoration:none; }
.es-p-profile-heading { display:flex; gap:16px; align-items:center; margin-bottom:28px; padding-bottom:24px; border-bottom:1px solid var(--es-border); }
.es-p-profile-heading h2, .es-p-profile-heading p { margin:0; }
.es-p-profile-avatar { width:64px; height:64px; border-radius:18px; display:grid; place-items:center; background:var(--es-primary-soft); color:var(--es-primary); font-size:22px; font-weight:700; flex:0 0 64px; }
.es-p-account > form { max-width:760px; }
.es-p-table th, .es-p-table td { padding:18px 20px; }
.es-p-table tbody tr { transition:background .15s; }
.es-p-table tbody tr:hover { background:var(--es-primary-soft); }
.es-p-footer { padding:32px max(24px,calc((100vw - 1180px)/2)); border-top:1px solid var(--es-border); background:var(--es-surface); font-size:13px; }
.es-p-footer p { color:var(--es-muted); margin:8px 0 18px; }
.es-p-footer > div { display:flex; gap:24px; flex-wrap:wrap; }
.es-p-footer a { color:var(--es-muted); text-decoration:none; }
.es-p-footer a:hover { color:var(--es-primary); }
.es-p-utility{display:flex;align-items:center;gap:24px;padding:10px max(24px,calc((100vw - 1180px)/2));font-size:12px;background:var(--es-surface-alt,var(--es-surface));border-bottom:1px solid var(--es-border)}
.es-p-utility span{margin-right:auto}.es-p-utility a{color:var(--es-text);text-decoration:none}
.es-portal[data-es-footer-layout="directory"] .es-p-footer>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding-top:20px;border-top:1px solid var(--es-border)}
.es-portal[data-es-footer-layout="centered"] .es-p-footer{text-align:center}.es-portal[data-es-footer-layout="centered"] .es-p-footer>div{justify-content:center}
.es-portal[data-es-footer-layout="split"] .es-p-footer{display:grid;grid-template-columns:1fr 1fr;gap:12px 48px}.es-portal[data-es-footer-layout="split"] .es-p-footer p{grid-column:1;max-width:420px}.es-portal[data-es-footer-layout="split"] .es-p-footer>div{grid-column:2;grid-row:1/span 2;align-content:center}
.es-portal[data-es-footer-layout="minimal"] .es-p-footer{display:flex;flex-wrap:wrap;gap:20px 32px;align-items:center}.es-portal[data-es-footer-layout="minimal"] .es-p-footer p{margin:0;flex:1}
.es-portal[data-es-footer-layout="editorial"] .es-p-footer>strong{font-family:Georgia,serif;font-size:36px;line-height:1.2}.es-portal[data-es-footer-layout="editorial"] .es-p-footer>div{padding-top:24px;border-top:1px solid var(--es-border)}
@media(min-width:901px){
 .es-portal[data-es-header-layout="centered"] .es-p-top{display:grid;grid-template-columns:1fr auto 1fr}.es-portal[data-es-header-layout="centered"] .es-p-brand{grid-column:2;grid-row:1;justify-self:center}.es-portal[data-es-header-layout="centered"] .es-p-nav{grid-column:1/-1;grid-row:2;justify-content:center}.es-portal[data-es-header-layout="centered"] .es-p-top>:last-child{grid-column:3;grid-row:1;justify-self:end}
 .es-portal[data-es-header-layout="stacked"] .es-p-top{flex-wrap:wrap}.es-portal[data-es-header-layout="stacked"] .es-p-nav{order:10;flex-basis:100%;padding-top:14px;border-top:1px solid var(--es-border)}
 .es-portal[data-es-header-layout="floating"] .es-p-top{max-width:1180px;width:calc(100% - 48px);margin:20px auto;border:1px solid var(--es-border);border-radius:16px;padding:18px 24px;box-shadow:0 10px 32px #17233d0a}
 .es-portal[data-es-header-layout="compact"] .es-p-top{padding-block:10px;gap:18px}.es-portal[data-es-header-layout="compact"] .es-p-nav{font-size:12px;gap:18px}
}
@media(max-width:700px){.es-portal[data-es-footer-layout="split"] .es-p-footer{display:block}.es-portal[data-es-footer-layout="directory"] .es-p-footer>div{grid-template-columns:1fr}.es-p-utility{padding-inline:20px;gap:16px;flex-wrap:wrap}}
@media(max-width:768px) { .es-p-main { width:calc(100% - 32px); margin:28px auto 40px; } .es-p-card,.es-p-hero { padding:24px 20px; } .es-p-grid,.es-p-create__grid { gap:20px; } .es-p-login { grid-template-columns:1fr; gap:24px; min-height:0; } .es-p-login__intro { padding:12px 4px; } .es-p-login__intro h2 { font-size:28px; } .es-p-login__intro ul { margin:20px 0; } .es-p-top { padding:12px 16px; } .es-p-footer { padding:28px 20px 88px; } .es-p-kpis { gap:12px; } }
@media(prefers-reduced-motion:reduce) { .es-portal * { animation:none!important; transition:none!important; } }
.es-p-card,.es-p-hero,.es-p-kpi,.es-p-ticket-card,.es-p-composer { border-radius:var(--es-radius,16px); }
.es-p-menu,.es-p-account-menu>button:not(.es-p-btn) { min-height:44px; padding:9px 13px; border:1px solid currentColor; border-radius:8px; background:transparent; color:inherit; font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.es-p-menu:hover,.es-p-account-menu>button:not(.es-p-btn):hover { background:color-mix(in srgb,currentColor 8%,transparent); }
.es-p-menu:focus-visible,.es-p-account-menu>button:focus-visible { outline:3px solid var(--es-primary); outline-offset:3px; }

/* Functional screens share the same visual language as their knowledge library. */
.es-portal[data-kb-theme="cloudora"] .es-p-login__card { border:0; border-top:5px solid var(--es-primary); box-shadow:0 20px 60px #1764c014; border-radius:8px 8px 28px 28px; }
.es-portal[data-kb-theme="cloudora"] .es-p-nav a { border-radius:10px; }
.es-portal:is([data-kb-theme="devatlas"],[data-kb-theme="codeharbor"]) :is(.es-p-card,.es-p-hero,.es-p-btn,.es-p-field input,.es-p-field textarea,.es-p-field select) { border-radius:3px; box-shadow:none; }
.es-portal:is([data-kb-theme="devatlas"],[data-kb-theme="codeharbor"]) .es-p-top { background:#102b26; color:#f4fff9; border-bottom:3px solid var(--es-primary); }
.es-portal[data-kb-theme="codeharbor"] .es-p-top { background:#14263c; }
.es-portal:is([data-kb-theme="devatlas"],[data-kb-theme="codeharbor"]) .es-p-nav a { color:#e1edf0; border-radius:2px; }
.es-portal:is([data-kb-theme="devatlas"],[data-kb-theme="codeharbor"]) .es-p-nav a:is(:hover,.is-active) { background:#ffffff18; color:#fff; }
.es-portal:is([data-kb-theme="devatlas"],[data-kb-theme="codeharbor"]) :is(.es-p-kicker,.es-p-field label) { font-family:ui-monospace,monospace; letter-spacing:.025em; }
.es-portal[data-kb-theme="maison"] :is(h1,h2,.es-p-brand) { font-family:Georgia,'Times New Roman',serif; font-weight:400; }
.es-portal[data-kb-theme="maison"] :is(.es-p-card,.es-p-btn,.es-p-field input,.es-p-nav a) { border-radius:0; box-shadow:none; }
.es-portal[data-kb-theme="maison"] .es-p-login__card { border:0; border-top:3px solid var(--es-primary); border-bottom:1px solid var(--es-border); }
.es-portal[data-kb-theme="bloomhelp"] .es-p-login__card { border:2px solid var(--es-primary); border-radius:28px 10px 28px 10px; box-shadow:7px 7px 0 color-mix(in srgb,var(--es-primary) 22%,transparent); }
.es-portal[data-kb-theme="bloomhelp"] .es-p-btn { border-radius:999px; }
.es-portal[data-kb-theme="finora"] .es-p-login__card { border:0; border-top:6px solid var(--es-primary); box-shadow:0 16px 44px #113b2b12; }
.es-portal[data-kb-theme="finora"] .es-p-btn { border-radius:999px; }
.es-portal[data-kb-theme="trustvault"] .es-p-login__card { border:0; border-left:6px solid var(--es-primary); border-radius:4px; box-shadow:0 12px 40px #102a4310; }
.es-portal[data-kb-theme="trustvault"] .es-p-field label { font-weight:700; }
.es-portal[data-kb-theme="modern-search"] .es-p-login__card { border:0; border-top:5px solid var(--es-primary); box-shadow:0 20px 60px #42228516; }
.es-portal[data-kb-theme="corporate-blue"] .es-p-login__card { border-radius:4px; border:0; border-top:6px solid var(--es-primary); box-shadow:0 12px 32px #153d6414; }
.es-portal[data-kb-theme="compact-docs"] .es-p-login__card { border-radius:4px; box-shadow:none; border-top:3px solid var(--es-primary); }
.es-p-login__art { display:block; max-width:100%; height:auto; margin:0 0 24px; }
.es-p-profile-heading p { overflow-wrap:anywhere; }
.es-p-login__card > p { margin:12px 0 20px; line-height:1.7; }
.es-p-login__card label { display:block; margin-bottom:8px; font-size:13px; font-weight:600; line-height:1.5; }
.es-p-login__card > p > a { color:var(--es-primary); font-size:14px; font-weight:500; text-decoration:none; text-underline-offset:4px; }
.es-p-login__card > p > a:hover { text-decoration:underline; }
.es-p-login__card input { transition:border-color .15s,box-shadow .15s; }
.es-p-login__card input:focus { outline:0; border-color:var(--es-primary); box-shadow:0 0 0 3px color-mix(in srgb,var(--es-primary) 15%,transparent); }
.es-p-login__card > button[type="submit"] { width:100%; min-height:46px; margin-top:4px; }
.es-portal :is(button,input,textarea,select) { font-family:inherit; }

/* Native ticket fields must shrink inside the responsive portal grid. */
.es-p-create__grid>*,.es-p-create .es-tf-field{min-width:0}
.es-p-create .es-tf-field :is(input,textarea,select){min-width:0;max-width:100%;box-sizing:border-box}
.es-p-grid>*,.es-p-stack>*,.es-p-ticket-row>*,.es-p-ticket-card>*{min-width:0}
.es-p-ticket-row strong,.es-p-ticket-card strong{overflow-wrap:anywhere}
@media(max-width:720px){.es-p-grid,.es-p-create__grid{grid-template-columns:minmax(0,1fr)}.es-p-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
.es-p-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px;margin:20px 0 28px;font-size:13px;color:var(--es-muted)}
.es-p-msg__body>header{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px 20px;margin-bottom:16px}
.es-p-msg__body>header time{font-size:12px;color:var(--es-muted)}
.es-p-msg__html>:first-child{margin-top:0}.es-p-msg__html>:last-child{margin-bottom:0}
.es-p-account__grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:48px;align-items:start}
.es-p-account__grid>.es-p-card{max-width:none;margin:0}
.es-p-account__guide{padding:12px 0;line-height:1.8;min-width:0}
.es-p-account__guide>img{display:block;max-width:100%;height:auto;margin-bottom:28px}
.es-p-account__guide h2{font-size:clamp(24px,2.5vw,32px);line-height:1.3;max-width:22ch;color:var(--es-text);margin:12px 0 20px}
.es-p-account__guide p,.es-p-account__guide li{color:var(--es-muted)}
.es-p-account__guide ul{padding-left:20px;margin:24px 0}.es-p-account__guide li{padding:4px 0}
.es-p-account__identity-note{margin-top:32px;padding-top:24px;border-top:2px solid var(--es-primary)}
.es-p-account__identity-note h3{font-size:17px;line-height:1.4;margin:0 0 12px}
.es-p-account__identity-note a{font-weight:600;color:var(--es-primary);text-underline-offset:4px}
@media(max-width:768px){.es-p-account__grid{grid-template-columns:minmax(0,1fr);gap:28px}.es-p-account__guide>img{width:180px}.es-p-msg__body>header{align-items:flex-start;flex-direction:column;gap:4px}}
/* Text enlargement must not push portal headings or bottom navigation off screen. */
.es-portal .es-p-main :is(h1,h2,h3){min-width:0;max-width:100%;overflow-wrap:anywhere}
.es-portal .es-p-card__head{flex-wrap:wrap;gap:12px 16px}
.es-portal .es-p-card__head>*{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:900px){.es-portal .es-p-bottom a{flex:1 1 0%;min-width:0;max-width:100%;padding-inline:4px;text-align:center;white-space:normal;overflow-wrap:anywhere}}

/* Let guest header actions wrap and keep the open menu inside the viewport. */
@media(max-width:720px){
 .es-portal .es-p-top{flex-wrap:wrap;gap:12px 16px}
 .es-portal .es-p-top .es-p-brand{flex:1 1 120px;min-width:0;max-width:100%;overflow-wrap:anywhere}
 .es-portal .es-p-top .es-p-brand>span{min-width:0;overflow-wrap:anywhere}
 .es-portal .es-p-top>:is(.es-p-btn,.es-p-menu){flex:0 0 auto;width:auto;min-width:44px;max-width:100%;box-sizing:border-box}
 .es-portal .es-p-top>.es-p-btn{margin-inline-start:auto}
 .es-portal.is-nav-open .es-p-top .es-p-nav{top:100%;max-height:var(--es-p-nav-available,60svh);overflow-y:auto;overscroll-behavior:contain}
}

/* A short mobile menu scrolls vertically; enlarged footer names can wrap. */
.es-portal .es-p-footer>strong{display:block;min-width:0;max-width:100%;overflow-wrap:anywhere}
@media(max-width:720px){
 .es-portal.is-nav-open .es-p-top .es-p-nav{flex-wrap:nowrap}
 .es-portal.is-nav-open .es-p-top .es-p-nav>a{flex-shrink:0;min-width:0;max-width:100%;width:100%;box-sizing:border-box;overflow-wrap:anywhere}
}
/* Keep order identifiers, status, price and the action in distinct, wrapping cells. */
.es-portal .es-p-list .es-p-order-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;padding-block:20px}
.es-portal .es-p-order-row>*{min-width:0;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
.es-portal .es-p-order-row>strong:first-child{flex:1 1 180px}
.es-portal .es-p-order-row>span{white-space:normal}
.es-portal .es-p-order-row>button{flex:0 0 auto}

/* Long reference URLs and source links stay inside portal content cards. */
.es-portal .es-p-main{overflow-wrap:anywhere}
