/* Kundenbereich – stile integrato con main.css (website) */

body.as-portal {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* Header/footer: stessi margini del sito (as-landing) */
body.as-portal .site-header .container,
body.as-portal .site-footer .container {
	max-width: var(--content-max-width);
	padding-left: var(--page-padding);
	padding-right: var(--page-padding);
}

body.as-portal .portal-main > .container {
	max-width: var(--content-max-width);
	padding-left: var(--page-padding);
	padding-right: var(--page-padding);
}

.portal-main {
	flex: 1;
	padding: 1.5rem 0 2.5rem;
}

.portal-main__inner {
	max-width: none;
}

body.as-portal .page-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
	gap: 1.5rem;
	align-items: start;
}

body.as-portal .portal-dashboard__main {
	min-width: 0;
}

@media (max-width: 1024px) {
	body.as-portal .page-layout {
		grid-template-columns: 1fr;
		gap: 0.85rem;
	}

	body.as-portal .portal-dashboard__main {
		order: 1;
	}

	body.as-portal .portal-sidebar {
		order: 0;
	}
}

.cp-page-head {
	margin-bottom: 1.25rem;
}

.cp-page-head h1 {
	margin: 0 0 0.35rem;
	font-size: 1.45rem;
	line-height: 1.25;
}

.cp-page-head .cp-muted {
	margin: 0;
}

.cp-vehicle-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.85rem;
}

.cp-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 1.15rem;
	flex-wrap: wrap;
}

.cp-pagination__btn {
	display: inline-block;
	padding: 0.45rem 0.85rem;
	border-radius: 8px;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid var(--accent);
	color: var(--accent);
	background: var(--surface);
	line-height: 1.2;
}

.cp-pagination__btn:hover {
	background: var(--accent);
	color: #fff;
	text-decoration: none;
}

.cp-pagination__btn--disabled {
	opacity: 0.45;
	border-color: var(--border);
	color: var(--text-muted);
	cursor: default;
}

.cp-pagination__info {
	font-size: 0.85rem;
	color: var(--text-muted);
	text-align: center;
}

.cp-pagination__count {
	display: block;
	font-size: 0.75rem;
	margin-top: 0.1rem;
}

.cp-vehicle-card {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	min-height: 148px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
	box-shadow: var(--shadow);
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cp-vehicle-card:hover {
	border-color: rgba(222, 46, 33, 0.35);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	text-decoration: none;
}

.cp-vehicle-card__media {
	position: relative;
	flex: 0 0 44%;
	max-width: 44%;
	min-width: 0;
	background: #f3f4f6;
}

.cp-vehicle-card__img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 148px;
	object-fit: cover;
}

.cp-vehicle-card__status {
	position: absolute;
	top: 0.4rem;
	left: 0.4rem;
	padding: 0.2rem 0.45rem;
	border-radius: 999px;
	font-size: 0.62rem;
	font-weight: 700;
	line-height: 1.2;
	background: rgba(255, 255, 255, 0.94);
	color: var(--text);
	border: 1px solid var(--border);
	max-width: calc(100% - 0.8rem);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cp-vehicle-card__status--1 {
	color: #92400e;
	border-color: #fcd34d;
	background: #fffbeb;
}

.cp-vehicle-card__status--2 {
	color: #1d4ed8;
	border-color: #93c5fd;
	background: #eff6ff;
}

.cp-vehicle-card__status--3 {
	color: #166534;
	border-color: #86efac;
	background: #f0fdf4;
}

.cp-vehicle-card__body {
	flex: 1;
	min-width: 0;
	padding: 0.7rem 0.8rem 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.cp-vehicle-card__title {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.3;
	font-weight: 700;
}

.cp-vehicle-card__variant {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.25;
	color: var(--text-muted);
}

.cp-vehicle-card__ref {
	margin: 0;
	font-size: 0.75rem;
	color: var(--text-muted);
	line-height: 1.25;
}

.cp-vehicle-card__meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.22rem;
}

.cp-vehicle-card__meta li {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.5rem;
	font-size: 0.78rem;
	line-height: 1.35;
}

.cp-vehicle-card__meta span {
	color: var(--text-muted);
	flex-shrink: 0;
}

.cp-vehicle-card__meta strong {
	font-weight: 600;
	color: var(--text);
	text-align: right;
	min-width: 0;
}

.cp-vehicle-card__cta {
	margin-top: auto;
	padding-top: 0.35rem;
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--accent);
	line-height: 1.25;
}

.portal-sidebar {
	min-width: 0;
	min-height: 0;
	max-width: 100%;
}

.portal-sidebar__card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	box-shadow: var(--shadow);
	overflow: hidden;
}

.portal-sidebar__toggle {
	display: none;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.9rem 1rem;
	border: none;
	background: transparent;
	cursor: pointer;
	font-family: inherit;
	text-align: left;
}

.portal-sidebar__toggle-text {
	min-width: 0;
	flex: 1;
}

.portal-sidebar__chevron {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	background: rgba(222, 46, 33, 0.08);
	color: var(--accent);
	transition: transform 0.2s ease;
}

.portal-sidebar__chevron svg {
	width: 1rem;
	height: 1rem;
	display: block;
}

.portal-sidebar__card.is-open .portal-sidebar__chevron {
	transform: rotate(180deg);
}

.portal-sidebar__panel {
	padding: 1.15rem 1.2rem;
}

.portal-sidebar__greeting--desktop {
	margin: 0 0 1rem;
}

.portal-sidebar__greeting {
	margin: 0 0 1rem;
}

.portal-sidebar__greeting-line {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-muted);
	line-height: 1.4;
}

.portal-sidebar__greeting-name {
	display: block;
	margin-top: 0.2rem;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--text);
}

.portal-sidebar__greeting-sub {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.9rem;
	color: var(--text-muted);
}

.portal-sidebar__details {
	margin: 0;
}

.portal-sidebar__row {
	margin: 0 0 0.85rem;
}

.portal-sidebar__row:last-child {
	margin-bottom: 0;
}

.portal-sidebar__row dt {
	margin: 0 0 0.2rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.portal-sidebar__row dd {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--text);
}

.portal-sidebar__note {
	margin: 1rem 0 0;
	font-size: 0.8rem;
	line-height: 1.4;
}

.portal-sidebar__phone-cta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 1.15rem;
	padding: 0.85rem 1rem;
	border-radius: 10px;
	background: var(--accent);
	color: #fff;
	text-decoration: none;
	width: 100%;
	box-sizing: border-box;
	transition: background 0.15s ease;
}

.portal-sidebar__phone-cta:hover {
	background: var(--accent-dark);
	color: #fff;
	text-decoration: none;
}

.portal-sidebar__phone-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
}

.portal-sidebar__phone-icon svg {
	width: 1.15rem;
	height: 1.15rem;
	display: block;
}

.portal-sidebar__phone-text {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	line-height: 1.2;
}

.portal-sidebar__phone-text span {
	font-size: 0.8rem;
	opacity: 0.9;
}

.portal-sidebar__phone-text strong {
	font-size: 1.2rem;
	font-weight: 700;
}

/* Contract detail */
.cp-back {
	margin: 0 0 1rem;
	font-size: 0.88rem;
}

.cp-back a {
	color: var(--accent);
	font-weight: 600;
	text-decoration: none;
}

.cp-back a:hover {
	text-decoration: underline;
}

.cp-detail-hero {
	display: grid;
	grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
	gap: 1.25rem;
	align-items: start;
	padding: 1rem 1.15rem;
}

.cp-detail-hero__media {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	background: #f3f4f6;
}

.cp-detail-hero__img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.cp-detail-hero__title {
	margin: 0 0 0.35rem;
	font-size: 1.45rem;
	line-height: 1.25;
}

.cp-detail-hero__subtitle {
	margin: 0 0 0.35rem;
	font-size: 0.95rem;
	color: var(--text-muted);
}

.cp-detail-hero__ref {
	margin: 0 0 0.75rem;
}

.cp-detail-hero__actions {
	margin-top: 0.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.cp-btn--doc {
	white-space: nowrap;
}

.cp-detail-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.65rem;
	margin-bottom: 0.65rem;
}

.cp-detail-section {
	min-width: 0;
}

@media (min-width: 769px) {
	.cp-detail-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem;
		margin-bottom: 1rem;
	}
}

.cp-detail-section__title {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
	line-height: 1.3;
}

.cp-detail-section__intro {
	margin: -0.35rem 0 1rem;
}

.cp-detail-dl {
	margin: 0;
}

.cp-detail-dl__row {
	display: grid;
	grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
	gap: 0.5rem 1rem;
	padding: 0.45rem 0;
	border-bottom: 1px solid var(--border);
	font-size: 0.9rem;
	line-height: 1.4;
}

.cp-detail-dl__row:last-child {
	border-bottom: none;
}

.cp-detail-dl__row dt {
	margin: 0;
	font-weight: 600;
	color: var(--text-muted);
}

.cp-detail-dl__row dd {
	margin: 0;
	color: var(--text);
}

.cp-doc-groups {
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
}

.cp-doc-group__title {
	margin: 0 0 0.5rem;
	font-size: 0.92rem;
	font-weight: 700;
	color: var(--text);
}

.cp-doc-group__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: 10px;
	overflow: hidden;
}

.cp-doc-group__item {
	border-bottom: 1px solid var(--border);
}

.cp-doc-group__item:last-child {
	border-bottom: none;
}

.cp-doc-group__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.7rem 0.85rem;
	text-decoration: none;
	color: inherit;
	background: var(--surface);
	transition: background 0.15s ease;
}

.cp-doc-group__link:hover {
	background: rgba(222, 46, 33, 0.05);
	text-decoration: none;
}

.cp-doc-group__label {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text);
}

.cp-doc-group__action {
	flex-shrink: 0;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--accent);
}

.site-header__nav--portal {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.site-header__portal-label {
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--text);
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.site-header__brand .site-header__portal-label {
	border-left: 3px solid var(--accent);
	padding-left: 0.85rem;
	margin-left: 0.15rem;
}

.site-header__portal-link {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--accent);
	text-decoration: none;
}

.site-header__portal-link:hover {
	text-decoration: underline;
}

.site-header__portal-btn {
	display: inline-block;
	padding: 0.45rem 0.85rem;
	border-radius: 8px;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid var(--accent);
	color: var(--accent);
	background: var(--surface);
	line-height: 1.2;
}

.site-header__portal-btn:hover {
	background: var(--accent);
	color: #fff;
	text-decoration: none;
}

.cp-card {
	background: var(--surface);
	border-radius: 12px;
	padding: 1.25rem 1.35rem;
	box-shadow: var(--shadow);
	border: 1px solid var(--border);
	margin-bottom: 1rem;
}

.cp-card h1 {
	margin: 0 0 0.5rem;
	font-size: 1.45rem;
	line-height: 1.25;
}

.cp-card h2 {
	margin: 0 0 0.75rem;
	font-size: 1.15rem;
}

.cp-muted {
	color: var(--text-muted);
	font-size: 0.9rem;
}

.cp-btn {
	display: inline-block;
	background: var(--accent);
	color: #fff;
	border: 0;
	padding: 0.65rem 1.1rem;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.3;
}

.cp-btn:hover {
	background: var(--accent-dark);
	color: #fff;
	text-decoration: none;
}

.cp-btn--ghost {
	background: var(--surface);
	color: var(--accent);
	border: 1px solid var(--accent);
}

.cp-btn--ghost:hover {
	background: var(--accent);
	color: #fff;
}

.cp-btn--primary {
	background: var(--accent);
	color: #fff;
	border: 0;
}

.cp-btn--primary:hover {
	background: var(--accent-dark);
	color: #fff;
}

.cp-btn--sign {
	border: 1px dashed var(--accent);
	background: rgba(222, 46, 33, 0.06);
	color: var(--accent);
}

.cp-btn--sign:hover {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

body.cp-sign-modal-open {
	overflow: hidden;
}

.cp-sign-modal {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem;
}

.cp-sign-modal[hidden] {
	display: none !important;
}

.cp-sign-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}

.cp-sign-modal__dialog {
	position: relative;
	width: min(100%, 920px);
	max-height: calc(100vh - 1.5rem);
	max-height: calc(100dvh - 1.5rem);
	background: var(--surface);
	border-radius: 12px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.cp-sign-modal__head {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--border);
	background: var(--surface);
	background: linear-gradient(180deg, rgba(222, 46, 33, 0.05) 0%, var(--surface) 100%);
}

.cp-sign-modal__title {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.3;
}

.cp-sign-modal__close {
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--text-muted);
	cursor: pointer;
	padding: 0.15rem 0.35rem;
}

.cp-sign-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 0.85rem 1rem;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.cp-sign-modal__hint {
	margin: 0 0 0.75rem;
	font-size: 0.88rem;
	color: var(--text-muted);
	line-height: 1.45;
}

.cp-sign-modal__preview-wrap {
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	background: #f3f4f6;
	margin-bottom: 0.85rem;
}

.cp-sign-modal__preview-pages {
	max-height: min(42vh, 360px);
	overflow-y: auto;
	overflow-x: hidden;
	padding: 0.35rem;
	-webkit-overflow-scrolling: touch;
	background: #fff;
}

.cp-sign-modal__preview-page {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto 0.5rem;
}

.cp-sign-modal__preview-page:last-child {
	margin-bottom: 0;
}

.cp-sign-modal__preview-loading,
.cp-sign-modal__preview-error {
	margin: 0.75rem 0.5rem;
	font-size: 0.85rem;
	color: var(--text-muted);
	text-align: center;
}

.cp-sign-modal__preview-actions {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0.65rem 0.75rem 0.7rem;
	background: #f9fafb;
	border-top: 1px solid var(--border);
}

.cp-sign-modal__preview-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: min(100%, 280px);
	max-width: 100%;
	text-align: center;
	white-space: normal;
}

.cp-sign-modal__sign-label {
	margin: 0 0 0.45rem;
	font-size: 0.88rem;
	font-weight: 600;
}

.cp-sign-modal__canvas-wrap {
	border: 2px solid var(--border);
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
}

.cp-sign-modal__canvas {
	display: block;
	width: 100%;
	height: 160px;
	touch-action: none;
}

.cp-sign-modal__clear {
	margin-top: 0.5rem;
}

.cp-sign-modal__footer {
	flex-shrink: 0;
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
	padding: 0.85rem 1rem;
	border-top: 1px solid var(--border);
	background: #fafafa;
}

.cp-form label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.cp-form input[type="email"],
.cp-form input[type="password"] {
	width: 100%;
	max-width: 100%;
	padding: 0.55rem 0.65rem;
	border: 1px solid #ccc;
	border-radius: 8px;
	font-size: 1rem;
	margin-bottom: 0.85rem;
	font-family: inherit;
	box-sizing: border-box;
}

.cp-form input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(222, 46, 33, 0.15);
}

.cp-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cp-list li {
	border-bottom: 1px solid var(--border);
	padding: 0.85rem 0;
}

.cp-list li:last-child {
	border-bottom: none;
}

.cp-list__actions {
	margin-top: 0.5rem;
}

.cp-doc-list a {
	display: block;
	padding: 0.5rem 0;
}

.cp-greeting {
	margin: 0.35rem 0 0.5rem;
}

.cp-greeting__line {
	display: block;
	font-weight: 600;
	font-size: 0.875rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	line-height: 1.45;
}

.cp-greeting__body {
	margin: 0 0 2rem;
}

.cp-form--activate {
	margin-top: 0.25rem;
}

.portal-flash .message,
.portal-flash .flash-message,
.portal-flash .notification {
	padding: 0.75rem 1rem;
	border-radius: 8px;
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

.portal-flash .notification.error,
.portal-flash .flash-message.error {
	background: #fee2e2;
	color: #991b1b;
}

.portal-flash .notification.success,
.portal-flash .flash-message.success {
	background: #dcfce7;
	color: #166534;
}

@media (max-width: 768px) {
	.site-header__nav--portal {
		gap: 0.65rem;
	}

	body.as-portal .portal-sidebar {
		width: auto !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	body.as-portal .portal-sidebar__card {
		background: var(--surface) !important;
		border: 1px solid var(--border) !important;
		border-radius: 12px !important;
		box-shadow: var(--shadow) !important;
	}

	.site-header__portal-label {
		font-size: 0.95rem;
	}

	.portal-main {
		padding: 1rem 0 2rem;
	}

	.cp-card {
		padding: 1rem 1.1rem;
	}

	.cp-card h1 {
		font-size: 1.25rem;
	}

	.cp-vehicle-grid {
		grid-template-columns: 1fr;
	}

	.cp-page-head h1 {
		font-size: 1.25rem;
	}

	.cp-vehicle-card {
		min-height: 132px;
	}

	.cp-vehicle-card__media {
		flex-basis: 38%;
		max-width: 38%;
	}

	.cp-vehicle-card__img {
		min-height: 132px;
	}

	.cp-detail-hero {
		grid-template-columns: 1fr;
		gap: 0.75rem;
		padding: 0.75rem 0.85rem;
	}

	.cp-detail-hero__media {
		max-height: 168px;
	}

	.cp-detail-hero__img {
		aspect-ratio: auto;
		height: 168px;
		max-height: 168px;
	}

	.cp-detail-hero__title {
		font-size: 1.15rem;
	}

	.cp-detail-hero__subtitle {
		font-size: 0.85rem;
	}

	.cp-detail-hero__ref {
		margin-bottom: 0.5rem;
		font-size: 0.78rem;
	}

	.cp-detail-hero__actions {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.4rem;
		margin-top: 0.35rem;
	}

	.cp-btn--doc {
		white-space: normal;
		text-align: center;
		padding: 0.45rem 0.5rem;
		font-size: 0.72rem;
		line-height: 1.25;
		border-radius: 8px;
	}

	.cp-detail-section.cp-card {
		padding: 0.65rem 0.85rem;
	}

	.cp-detail-section__title {
		font-size: 0.95rem;
		margin-bottom: 0.5rem;
	}

	.cp-detail-dl__row {
		grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
		gap: 0.2rem 0.55rem;
		padding: 0.32rem 0;
		font-size: 0.82rem;
		line-height: 1.35;
	}

	.cp-detail-dl__row dt {
		font-size: 0.72rem;
	}

	.cp-back {
		margin-bottom: 0.65rem;
		font-size: 0.82rem;
	}

	body.as-portal .portal-sidebar__toggle {
		display: flex;
	}

	body.as-portal .portal-sidebar__greeting--desktop {
		display: none;
	}

	body.as-portal .portal-sidebar__panel {
		display: none;
		padding: 0 1rem 1rem;
		border-top: 1px solid var(--border);
	}

	body.as-portal .portal-sidebar__card.is-open .portal-sidebar__panel {
		display: block;
	}

	body.as-portal .site-header__brand {
		min-width: 0;
	}

	body.as-portal .site-header__portal-label {
		font-size: 0.82rem;
		padding-left: 0.55rem;
		margin-left: 0.1rem;
		border-left-width: 2px;
	}

	body.as-portal .site-header__logo {
		height: 2.35rem;
		max-width: 140px;
	}

	.cp-sign-modal {
		align-items: stretch;
		justify-content: stretch;
		padding: 0;
	}

	.cp-sign-modal__dialog {
		width: 100%;
		max-width: none;
		height: 100%;
		max-height: 100dvh;
		border-radius: 0;
	}

	.cp-sign-modal__head {
		padding: 0.65rem 0.75rem;
	}

	.cp-sign-modal__title {
		font-size: 0.95rem;
	}

	.cp-sign-modal__body {
		padding: 0.55rem 0.75rem 0.65rem;
	}

	.cp-sign-modal__hint {
		font-size: 0.8rem;
		margin-bottom: 0.5rem;
	}

	.cp-sign-modal__preview-pages {
		max-height: min(34vh, 240px);
	}

	.cp-sign-modal__canvas {
		height: 110px;
	}

	.cp-sign-modal__footer {
		padding: 0.65rem 0.75rem;
		gap: 0.4rem;
	}

	.cp-sign-modal__footer .cp-btn {
		flex: 1 1 auto;
		min-width: 0;
		justify-content: center;
	}
}

@media (min-width: 769px) {
	body.as-portal .portal-sidebar__card {
		position: sticky;
		top: 6.75rem;
		align-self: start;
	}

	body.as-portal .portal-sidebar__panel {
		display: block;
	}
}
