.sh-portal,
.sh-form-wrap,
.sh-kb {
	max-width: 720px;
	margin: 0 auto;
	font-family: inherit;
	color: #334155;
	--sh-color-primary: #2563eb;
	--sh-color-primary-hover: #1d4ed8;
	--sh-color-primary-soft: #eff6ff;
	--sh-color-primary-border: #93c5fd;
	--sh-color-primary-badge-bg: #dbeafe;
	--sh-color-primary-badge-text: #1d4ed8;
	--sh-color-primary-on: #ffffff;
	--sh-color-primary-rgb: 37, 99, 235;
}

.sh-ticket-view {
	max-width: 1200px;
	width: 100%;
	box-sizing: border-box;
	margin: 0 auto;
	font-family: inherit;
	color: #334155;
	--sh-color-primary: #2563eb;
	--sh-color-primary-hover: #1d4ed8;
	--sh-color-primary-soft: #eff6ff;
	--sh-color-primary-border: #93c5fd;
	--sh-color-primary-badge-bg: #dbeafe;
	--sh-color-primary-badge-text: #1d4ed8;
	--sh-color-primary-on: #ffffff;
	--sh-color-primary-rgb: 37, 99, 235;
}

@media (min-width: 960px) {
	.sh-ticket-view:not(.sh-ticket-view--empty) {
		width: min(1200px, calc(100vw - 2rem));
		max-width: none;
		margin-left: calc(50% - min(600px, 50vw - 1rem));
		margin-right: calc(50% - min(600px, 50vw - 1rem));
	}
}

.sh-card {
	padding: 1.5rem;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
}

.sh-button {
	display: inline-block;
	padding: 0.5rem 1rem;
	background: var(--sh-color-primary);
	color: var(--sh-color-primary-on, #fff) !important;
	border: none;
	border-radius: 6px;
	text-decoration: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.95rem;
	transition: background-color 0.15s ease;
}

.sh-button:hover,
.sh-button:focus-visible {
	background: var(--sh-color-primary-hover);
}

.sh-button--secondary {
	background: #64748b;
}

.sh-input,
.sh-form textarea {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sh-input:focus,
.sh-form textarea:focus {
	outline: none;
	border-color: var(--sh-color-primary);
	box-shadow: 0 0 0 3px rgba(var(--sh-color-primary-rgb), 0.2);
}

.sh-input--locked,
.sh-input[readonly],
select.sh-input:disabled {
	background: #f1f5f9;
	color: #475569;
	cursor: not-allowed;
}

.sh-input--locked:focus,
.sh-input[readonly]:focus,
select.sh-input:disabled:focus {
	border-color: #cbd5e1;
	box-shadow: none;
}

select.sh-input:disabled {
	opacity: 1;
}

.sh-version-field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	width: 100%;
}

.sh-version-field__other[hidden] {
	display: none !important;
}

.sh-badge {
	display: inline-block;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: #e2e8f0;
	line-height: 1.35;
	white-space: nowrap;
}

.sh-badge--open { background: var(--sh-color-primary-badge-bg); color: var(--sh-color-primary-badge-text); }
.sh-badge--pending { background: #fef3c7; color: #b45309; }
.sh-badge--answered { background: #d1fae5; color: #047857; }
.sh-badge--closed { background: #f1f5f9; color: #475569; }
.sh-badge--waiting { background: #e0e7ff; color: #4338ca; }

.sh-badge--type {
	background: #f1f5f9;
	color: #334155;
	font-weight: 600;
}

.sh-badge--type-bug { background: #fee2e2; color: #b42318; }
.sh-badge--type-question { background: #dbeafe; color: #1d4ed8; }
.sh-badge--type-billing { background: #fef3c7; color: #b45309; }
.sh-badge--type-feature { background: #ede9fe; color: #6d28d9; }

.sh-ticket-view__header {
	margin: 0 0 1.25rem;
}

.sh-ticket-view__number {
	margin: 0 0 0.35rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #64748b;
}

.sh-ticket-view__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 0.65rem 0 0;
}

.sh-ticket-view__title {
	margin: 0;
	font-size: clamp(1.5rem, 3vw, 2.125rem);
	line-height: 1.25;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.02em;
}

.sh-ticket-view-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
	gap: 2rem;
	align-items: start;
}

.sh-ticket-view--portal .sh-card {
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sh-ticket-view-main {
	grid-column: 1;
	grid-row: 1;
	min-width: 0;
	color-scheme: light;
	color: #0f172a;
}

.sh-ticket-view-main .sh-conversation {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.sh-ticket-view-main .sh-conversation-replies__list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.sh-ticket-view-main .sh-conversation-load-more {
	display: flex;
	justify-content: center;
	margin: 0 0 1rem;
	padding: 0.15rem 0 0.25rem;
	text-align: center;
}

.sh-ticket-view-main .sh-load-more-replies--text {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.4;
	color: var(--sh-color-primary, #2563eb);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	appearance: none;
	-webkit-appearance: none;
}

.sh-ticket-view-main .sh-load-more-replies--text:hover,
.sh-ticket-view-main .sh-load-more-replies--text:focus-visible {
	color: var(--sh-color-primary-hover, #1d4ed8);
	background: none;
	box-shadow: none;
	outline: none;
}

.sh-ticket-view-main .sh-load-more-replies--text:focus-visible {
	text-decoration-thickness: 2px;
}

.sh-ticket-view-main .sh-message {
	margin-bottom: 0;
	color: #0f172a;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sh-ticket-view-main .sh-message--customer {
	background: #fff;
	border-left: 1px solid #e2e8f0;
}

.sh-ticket-view-main .sh-message--agent {
	background: #eff6ff;
	border-color: #dbeafe;
	border-left: 1px solid #bfdbfe;
}

.sh-message__subject {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	padding: 1.15rem 1.25rem 0.85rem;
	border-bottom: 1px solid #e2e8f0;
}

.sh-message--has-subject .sh-message__layout {
	padding-top: 0.85rem;
}

.sh-message__subject-title {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	font-size: clamp(1.125rem, 2vw, 1.375rem);
	line-height: 1.35;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.01em;
}

.sh-message__subject-badge {
	flex: 0 0 auto;
	margin-top: 0.15rem;
}

.sh-message-attachments__heading {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem;
	font-weight: 700;
	color: #334155;
}

.sh-ticket-reply-card {
	margin-top: 1rem;
	padding: 1.25rem 1.35rem;
}

.sh-ticket-reply-card__title {
	margin: 0 0 1rem;
	font-size: 1.0625rem;
	line-height: 1.35;
	font-weight: 700;
	color: #0f172a;
}

.sh-ticket-reply-form {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.sh-ticket-reply-form__textarea {
	min-height: 9rem;
	padding: 0.75rem 0.85rem;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: #0f172a;
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	resize: vertical;
}

.sh-ticket-reply-form__attachments {
	margin-top: 1rem;
}

.sh-ticket-reply-form__attachments-title {
	margin: 0 0 0.5rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #475569;
}

.sh-ticket-reply-form__actions {
	margin-top: 1rem;
}

.sh-button--send {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1.15rem;
	font-weight: 600;
}

.sh-button__icon {
	width: 1.125rem;
	height: 1.125rem;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
}

.sh-ticket-view-sidebar {
	grid-column: 2;
	grid-row: 1;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.sh-ticket-view-sidebar .sh-card {
	box-shadow: none;
	border: none;
}

.sh-ticket-panel__head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.85rem;
}

.sh-ticket-panel__title {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #334155;
}

.sh-ticket-panel__title-icon {
	display: flex;
	flex-shrink: 0;
	color: #64748b;
}

.sh-ticket-panel__title-icon .sh-icon {
	width: 1.125rem;
	height: 1.125rem;
}

.sh-ticket-view .sh-icon,
.sh-portal .sh-icon,
.sh-form-wrap .sh-icon {
	display: block;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
}

.sh-ticket-view-sidebar .sh-icon {
	width: 1.125rem;
	height: 1.125rem;
}

.sh-ticket-details-card__link-icon.sh-icon {
	width: 0.875rem;
	height: 0.875rem;
}

.sh-ticket-details-card {
	padding: 1.1rem 1.15rem;
	background: #f8fafc;
}

.sh-ticket-details-card__link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	max-width: 100%;
	color: #2563eb;
	text-decoration: none;
}

.sh-ticket-details-card__link-text {
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.sh-ticket-details-card__link:hover,
.sh-ticket-details-card__link:focus-visible {
	color: #1d4ed8;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sh-ticket-details-card__link-icon {
	width: 0.875rem;
	height: 0.875rem;
	flex-shrink: 0;
}

.sh-ticket-files-card {
	padding: 1.15rem 1.25rem;
	background: #f8fafc;
}

.sh-ticket-files-card__summary {
	margin: 0 0 0.85rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: #0f172a;
}

.sh-ticket-files-card__list {
	list-style: none;
	margin: 0 0 0.85rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.sh-ticket-files-card__file {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.55rem 0.65rem;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	color: #0f172a;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sh-ticket-files-card__file:hover,
.sh-ticket-files-card__file:focus-visible {
	border-color: #94a3b8;
	background: #f8fafc;
	color: #0f172a;
}

.sh-ticket-files-card__file-download {
	display: flex;
	flex-shrink: 0;
	color: #64748b;
}

.sh-ticket-files-card__file-download .sh-icon {
	width: 1.125rem;
	height: 1.125rem;
	fill: none;
	stroke: currentColor;
}

.sh-ticket-files-card__file-body {
	min-width: 0;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.sh-ticket-files-card__file-name {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #0f172a;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sh-ticket-files-card__file-meta {
	font-size: 0.75rem;
	color: #64748b;
}

.sh-ticket-files-card__file-meta-sep {
	margin: 0 0.2rem;
}

.sh-ticket-files-card__download-all {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	width: 100%;
	padding: 0.55rem 0.85rem;
	background: #fff;
	color: #334155 !important;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sh-ticket-files-card__download-all:hover,
.sh-ticket-files-card__download-all:focus-visible {
	background: #f1f5f9;
	border-color: #94a3b8;
	color: #0f172a !important;
}

/* Ticket details sidebar — always light, high-contrast text */
.sh-ticket-view-sidebar,
.sh-ticket-details-card {
	color-scheme: light;
	color: #0f172a;
	--sh-color-text: #0f172a;
	--sh-color-muted: #475569;
	--sh-color-border: #e2e8f0;
	--sh-color-primary: #2563eb;
}

.sh-ticket-details-card__title {
	margin: 0 0 0.85rem;
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #334155;
}

.sh-ticket-view-main .sh-message__body,
.sh-ticket-view-main .sh-message__body :where(p, li, blockquote) {
	color: #1e293b;
}

.sh-ticket-view-main .sh-message__name {
	color: #0f172a;
}

.sh-ticket-view-main .sh-message__email,
.sh-ticket-view-main .sh-message__time {
	color: #475569;
}

.sh-ticket-view-main .sh-message__role {
	color: #475569;
}

.sh-ticket-view-main .sh-activity-event__inner {
	color: #475569;
	background: #f8fafc;
	border-color: #e2e8f0;
}

.sh-ticket-view-main .sh-activity-event__content strong {
	color: #0f172a;
}

.sh-ticket-view-main .sh-field--attachments .sh-field__hint {
	color: #475569;
}

.sh-ticket-details-card__list {
	margin: 0;
}

.sh-ticket-details-card__row {
	display: grid;
	grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
	gap: 0.35rem 0.75rem;
	padding: 0.55rem 0;
	border-top: 1px solid #e2e8f0;
}

.sh-ticket-details-card__row:first-child {
	border-top: 0;
	padding-top: 0;
}

.sh-ticket-details-card__row--stack {
	grid-template-columns: 1fr;
	gap: 0.25rem;
}

.sh-ticket-details-card__row--stack .sh-ticket-details-card__link {
	display: flex;
	width: 100%;
}

.sh-ticket-details-card__row dt {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 600;
	color: #475569;
}

.sh-ticket-details-card__row dd {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 500;
	color: #0f172a;
	word-break: break-word;
}

.sh-ticket-details-card__row dd time {
	color: inherit;
}

.sh-ticket-details-card__row dd a {
	color: #1d4ed8;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sh-ticket-details-card__row dd a:hover,
.sh-ticket-details-card__row dd a:focus-visible {
	color: #1e40af;
}
.sh-ticket-details-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

@media (max-width: 782px) {
	.sh-ticket-view-layout {
		grid-template-columns: 1fr;
	}

	.sh-ticket-view-sidebar {
		grid-column: 1;
		grid-row: 1;
	}

	.sh-ticket-view-main {
		grid-column: 1;
		grid-row: 2;
	}
}

.sh-ticket-card__badges {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.35rem;
}

.sh-activity-event {
	margin: 1rem 0;
	display: flex;
	justify-content: center;
}

.sh-activity-event__inner {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	max-width: 36rem;
	padding: 0.65rem 0.9rem;
	border-radius: 8px;
	background: var(--sh-surface-2, #f1f5f9);
	border: 1px solid var(--sh-border, #e2e8f0);
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--sh-muted, #64748b);
	text-align: center;
}

.sh-activity-event__icon {
	flex-shrink: 0;
	margin-top: 0.1rem;
	color: var(--sh-color-primary, #2563eb);
}

.sh-activity-event__content strong {
	color: var(--sh-text, #0f172a);
	font-weight: 600;
}

.sh-activity-event__time {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.75rem;
	color: var(--sh-muted, #94a3b8);
}

.sh-notice {
	padding: 0.75rem 1rem;
	border-radius: 6px;
	margin-bottom: 1rem;
}

.sh-notice--error { background: #fee2e2; color: #991b1b; }
.sh-notice--success { background: #d1fae5; color: #065f46; }

/* Centered ticket empty / error state */
.sh-ticket-view--empty {
	max-width: 40rem;
	margin: 0 auto;
}

.sh-support-empty {
	margin: 2.5rem auto 3rem;
	padding: 0 1rem;
	text-align: center;
}

.sh-support-empty__inner {
	padding: 2rem 1.75rem;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.sh-support-empty--error .sh-support-empty__inner {
	border-color: #fecaca;
	background: linear-gradient(180deg, #fff 0%, #fffbfb 100%);
}

.sh-support-empty__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4rem;
	height: 4rem;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background: var(--sh-color-primary-soft);
	color: var(--sh-color-primary);
}

.sh-support-empty--error .sh-support-empty__icon {
	background: #fee2e2;
	color: #b91c1c;
}

.sh-support-empty__title {
	margin: 0 0 0.65rem;
	font-size: 1.35rem;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
}

.sh-support-empty__message {
	margin: 0 auto 1.5rem;
	max-width: 32rem;
	font-size: 0.98rem;
	line-height: 1.55;
	color: #475569;
}

.sh-support-empty__cta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.65rem;
	margin-bottom: 1.75rem;
}

.sh-support-empty__service {
	margin-top: 0.25rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e2e8f0;
	text-align: left;
}

.sh-support-empty__service-title {
	margin: 0 0 0.85rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #64748b;
	text-align: center;
}

.sh-support-empty__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.sh-support-empty__links a {
	display: block;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--sh-color-primary);
	text-decoration: none;
}

.sh-support-empty__links a:hover,
.sh-support-empty__links a:focus-visible {
	color: var(--sh-color-primary-hover);
	text-decoration: underline;
}

.sh-support-empty__link-hint {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.82rem;
	font-weight: 400;
	line-height: 1.4;
	color: #64748b;
}

.sh-conversation { margin: 1.5rem 0; }

.sh-conversation-load-more {
	margin-bottom: 0.85rem;
}

.sh-load-more-replies {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.sh-load-more-replies.is-loading .sh-load-more-replies__label {
	opacity: 0.65;
}

.sh-load-more-replies__spinner {
	display: inline-block;
	width: 1rem;
	height: 1rem;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: sh-spin 0.65s linear infinite;
}

.sh-load-more-replies__spinner[hidden] {
	display: none;
}

@keyframes sh-spin {
	to {
		transform: rotate(360deg);
	}
}

.sh-message {
	margin-bottom: 0.85rem;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #fff;
	overflow: visible;
}

.sh-message--customer {
	border-left: 4px solid #94a3b8;
	background: #f8fafc;
}

.sh-message--agent {
	border-left: 4px solid var(--sh-color-primary);
	background: var(--sh-color-primary-soft);
}

.sh-message__layout {
	display: flex;
	gap: 0.85rem;
	padding: 1rem;
}

.sh-message__avatar {
	flex: 0 0 48px;
	flex-shrink: 0;
	width: 48px;
	min-width: 48px;
	height: 48px;
	overflow: visible;
}

.sh-message__avatar-img,
.sh-avatar-preview__trigger img.avatar,
.sh-avatar-preview__trigger .sh-message__avatar-img {
	width: 48px !important;
	height: 48px !important;
	min-width: 48px;
	max-width: none;
	border-radius: 50%;
	display: block;
	object-fit: cover;
	flex-shrink: 0;
}

.sh-message__avatar-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 48px;
	min-width: 48px;
	height: 48px;
	border-radius: 50%;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
}

.sh-message__avatar-fallback--customer {
	background: #64748b;
}

.sh-message__avatar-fallback--agent {
	background: var(--sh-color-primary);
}

.sh-avatar-preview {
	position: relative;
	display: block;
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	line-height: 0;
}

.sh-avatar-preview__trigger {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	background: transparent;
	border-radius: 50%;
	cursor: pointer;
	line-height: 0;
	overflow: hidden;
	flex-shrink: 0;
}

.sh-avatar-preview__trigger:focus-visible {
	outline: 2px solid var(--sh-color-primary);
	outline-offset: 2px;
}

.sh-avatar-preview__popover {
	position: absolute;
	left: calc(100% + 0.65rem);
	top: 50%;
	z-index: 200;
	width: 192px;
	height: 192px;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-50%) scale(0.96);
	transition:
		opacity 0.2s ease,
		transform 0.2s ease,
		visibility 0s linear 0.2s;
}

.sh-avatar-preview__popover::before {
	content: "";
	position: absolute;
	right: 100%;
	top: 50%;
	width: 0.65rem;
	height: 100%;
	transform: translateY(-50%);
}

@media (hover: hover) {
	.sh-avatar-preview:hover .sh-avatar-preview__popover {
		opacity: 1;
		visibility: visible;
		transform: translateY(-50%) scale(1);
		transition:
			opacity 0.2s ease,
			transform 0.2s ease,
			visibility 0s linear 0s;
	}
}

.sh-avatar-preview__trigger:focus-visible ~ .sh-avatar-preview__popover {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%) scale(1);
	transition:
		opacity 0.2s ease,
		transform 0.2s ease,
		visibility 0s linear 0s;
}

@media (prefers-reduced-motion: reduce) {
	.sh-avatar-preview__popover,
	.sh-avatar-preview:hover .sh-avatar-preview__popover,
	.sh-avatar-preview__trigger:focus-visible ~ .sh-avatar-preview__popover {
		transition: none;
	}
}

.sh-avatar-preview__img,
.sh-avatar-preview__fallback {
	display: block;
	width: 192px !important;
	height: 192px !important;
	min-width: 192px;
	max-width: none;
	border-radius: 50%;
	box-shadow:
		0 4px 24px rgba(15, 23, 42, 0.18),
		0 0 0 1px rgba(15, 23, 42, 0.08);
	object-fit: cover;
	flex-shrink: 0;
	opacity: 0;
	visibility: hidden;
}

.sh-avatar-preview:hover .sh-avatar-preview__img,
.sh-avatar-preview:hover .sh-avatar-preview__fallback,
.sh-avatar-preview__trigger:focus-visible ~ .sh-avatar-preview__popover .sh-avatar-preview__img,
.sh-avatar-preview__trigger:focus-visible ~ .sh-avatar-preview__popover .sh-avatar-preview__fallback {
	opacity: 1;
	visibility: visible;
}

.sh-avatar-preview__fallback {
	font-size: 3rem;
}

@media (max-width: 640px) {
	.sh-avatar-preview__popover {
		left: 50%;
		top: auto;
		bottom: calc(100% + 0.5rem);
		transform: translateX(-50%) scale(0.96);
	}

	@media (hover: hover) {
		.sh-avatar-preview:hover .sh-avatar-preview__popover {
			transform: translateX(-50%) scale(1);
		}
	}

	.sh-avatar-preview__trigger:focus-visible ~ .sh-avatar-preview__popover {
		transform: translateX(-50%) scale(1);
	}

	.sh-avatar-preview__popover::before {
		right: auto;
		left: 50%;
		top: 100%;
		width: 100%;
		height: 0.5rem;
		transform: translateX(-50%);
	}
}

.sh-message__main {
	flex: 1;
	min-width: 0;
}

.sh-message__header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.35rem 1rem;
	margin-bottom: 0.65rem;
}

.sh-message__identity {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 0.65rem;
	min-width: 0;
}

.sh-message__role {
	display: inline-block;
	padding: 0.1rem 0.45rem;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-radius: 4px;
	background: rgba(15, 23, 42, 0.08);
	color: #64748b;
}

.sh-message--agent .sh-message__role {
	background: var(--sh-color-primary-badge-bg);
	color: var(--sh-color-primary-badge-text);
}

.sh-message__name {
	font-weight: 600;
	color: #0f172a;
}

.sh-message__email {
	font-size: 0.875rem;
	color: #64748b;
	text-decoration: none;
	word-break: break-all;
}

.sh-message__email:hover {
	color: var(--sh-color-primary);
	text-decoration: underline;
}

.sh-message__time {
	font-size: 0.8125rem;
	color: #64748b;
	white-space: nowrap;
}

.sh-message__body {
	font-size: 0.9375rem;
	line-height: 1.55;
	color: #1e293b;
}

.sh-message__body > :first-child {
	margin-top: 0;
}

.sh-message__body > :last-child {
	margin-bottom: 0;
}

.sh-fieldset {
	margin: 1.25rem 0 0;
	padding: 1.25rem 1.25rem 0.25rem;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
}

.sh-fieldset .sh-field:last-child,
.sh-fieldset > p:last-child {
	margin-bottom: 0.75rem;
}

.sh-fieldset legend {
	padding: 0 0.35rem;
	font-weight: 600;
	color: #0f172a;
}

.sh-portal-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 1.25rem;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
}

.sh-portal-header__text {
	min-width: 0;
}

.sh-portal-title {
	margin: 0;
	font-size: 1.5rem;
	line-height: 1.25;
	font-weight: 700;
	color: #0f172a;
}

.sh-portal-header__count {
	margin: 0.35rem 0 0;
	font-size: 0.9rem;
	color: #64748b;
}

.sh-portal-header__cta {
	flex-shrink: 0;
	font-weight: 600;
	padding: 0.6rem 1.15rem;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.sh-portal-empty {
	margin-top: 0.5rem;
}

.sh-ticket-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.sh-ticket-list__item {
	margin: 0;
}

.sh-ticket-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.1rem;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #fff;
	color: inherit;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease,
		background-color 0.15s ease;
}

.sh-ticket-card:hover,
.sh-ticket-card:focus-visible {
	border-color: var(--sh-color-primary-border);
	background: var(--sh-color-primary-soft);
	box-shadow: 0 4px 14px rgba(var(--sh-color-primary-rgb), 0.12);
	color: inherit;
	text-decoration: none;
}

.sh-ticket-card:focus-visible {
	outline: 2px solid var(--sh-color-primary);
	outline-offset: 2px;
}

.sh-ticket-card__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.sh-ticket-card__title {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	color: #0f172a;
	word-break: break-word;
}

.sh-ticket-card:hover .sh-ticket-card__title,
.sh-ticket-card:focus-visible .sh-ticket-card__title {
	color: var(--sh-color-primary-hover);
}

.sh-ticket-card__date {
	font-size: 0.8125rem;
	color: #64748b;
	line-height: 1.35;
}

.sh-ticket-card__aside {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.sh-ticket-card__chevron {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
	transition: color 0.15s ease, transform 0.15s ease;
}

.sh-ticket-card__chevron .sh-icon {
	width: 1.25rem;
	height: 1.25rem;
}

.sh-ticket-card:hover .sh-ticket-card__chevron,
.sh-ticket-card:focus-visible .sh-ticket-card__chevron {
	color: var(--sh-color-primary);
	transform: translateX(2px);
}

@media (max-width: 520px) {
	.sh-ticket-card {
		flex-wrap: wrap;
		align-items: flex-start;
	}

	.sh-ticket-card__aside {
		width: 100%;
		justify-content: space-between;
		padding-top: 0.35rem;
		border-top: 1px solid #e2e8f0;
	}

	.sh-ticket-card:hover .sh-ticket-card__aside,
	.sh-ticket-card:focus-visible .sh-ticket-card__aside {
		border-top-color: var(--sh-color-primary-border);
	}
}

.sh-empty {
	margin: 0;
	padding: 1.25rem 1rem;
	text-align: center;
	color: #64748b;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
}

/* Knowledge base */
.sh-kb {
	padding: 1.5rem;
}

.sh-kb-header {
	margin-bottom: 1.25rem;
}

.sh-kb-title {
	margin: 0 0 0.35rem;
	font-size: 1.5rem;
	line-height: 1.25;
	color: #0f172a;
}

.sh-kb-lead {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.5;
	color: #64748b;
}

.sh-kb-search {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.625rem;
	margin-bottom: 1.25rem;
}

.sh-kb-search__field {
	position: relative;
	flex: 1 1 220px;
	min-width: 0;
}

.sh-kb-search__input {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.85rem 0.65rem 2.85rem;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 0.95rem;
	line-height: 1.4;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M10.5 18a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15Z' stroke='%2394a3b8' stroke-width='1.75'/%3E%3Cpath d='M16.5 16.5 21 21' stroke='%2394a3b8' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 0.9rem center;
	background-size: 1.125rem 1.125rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sh-kb-search__input:hover {
	border-color: #94a3b8;
}

.sh-kb-search__input:focus {
	outline: none;
	border-color: var(--sh-color-primary);
	box-shadow: 0 0 0 3px rgba(var(--sh-color-primary-rgb), 0.2);
}

.sh-kb-search__input::-webkit-search-decoration,
.sh-kb-search__input::-webkit-search-results-button,
.sh-kb-search__input::-webkit-search-results-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.sh-kb-search__input::-ms-clear {
	display: none;
}

.sh-kb-search__submit {
	flex: 0 0 auto;
	align-self: stretch;
	padding: 0.65rem 1.25rem;
	border-radius: 8px;
	font-weight: 600;
	white-space: nowrap;
}

.sh-kb-search__submit:focus-visible {
	outline: 2px solid var(--sh-color-primary);
	outline-offset: 2px;
}

.sh-kb-search__clear {
	flex: 0 0 100%;
	font-size: 0.875rem;
	color: #64748b;
	text-decoration: underline;
	text-underline-offset: 2px;
	align-self: center;
}

.sh-kb-search__clear:hover,
.sh-kb-search__clear:focus-visible {
	color: var(--sh-color-primary);
}

.sh-kb-results-meta {
	margin: -0.25rem 0 1rem;
	font-size: 0.875rem;
	color: #64748b;
}

.sh-kb-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 2rem 1.25rem;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
}

.sh-kb-empty__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4rem;
	height: 4rem;
	margin-bottom: 0.75rem;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--sh-color-primary-border);
	color: var(--sh-color-primary);
	box-shadow: 0 1px 2px rgba(var(--sh-color-primary-rgb), 0.08);
}

.sh-kb .sh-kb-empty__title {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
	font-weight: 600;
	color: #0f172a;
}

.sh-kb .sh-kb-empty__hint {
	margin: 0;
	max-width: 28rem;
	font-size: 0.925rem;
	line-height: 1.5;
	color: #64748b;
}

.sh-kb-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.sh-kb-list__item {
	margin: 0;
	padding: 0;
	border: none;
}

.sh-kb-list__link {
	display: block;
	position: relative;
	padding: 1rem 2.25rem 1rem 1rem;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.sh-kb-list__link:hover {
	border-color: var(--sh-color-primary-border);
	box-shadow: 0 4px 14px rgba(var(--sh-color-primary-rgb), 0.08);
	transform: translateY(-1px);
}

.sh-kb-list__link:focus-visible {
	outline: 2px solid var(--sh-color-primary);
	outline-offset: 2px;
}

.sh-kb-list__title {
	display: block;
	font-size: 1rem;
	font-weight: 600;
	color: #0f172a;
	line-height: 1.35;
}

.sh-kb-list__source,
.sh-kb-suggestion-source {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: #475569;
}

.sh-kb-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 1.25rem;
}

.sh-kb-list__excerpt {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.9rem;
	line-height: 1.45;
	color: #64748b;
}

.sh-kb-list__arrow {
	position: absolute;
	right: 1rem;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: translateY(-50%);
	color: #94a3b8;
	transition: color 0.15s ease, transform 0.15s ease;
}

.sh-kb-list__arrow .sh-icon {
	width: 1.125rem;
	height: 1.125rem;
}

.sh-kb-list__link:hover .sh-kb-list__arrow {
	color: var(--sh-color-primary);
	transform: translateY(-50%) translateX(2px);
}

@media (min-width: 540px) {
	.sh-kb-search__clear {
		flex: 0 0 auto;
		margin-left: 0.25rem;
	}
}

@media (max-width: 539px) {
	.sh-kb {
		padding: 1.15rem;
	}

	.sh-kb-search__submit {
		flex: 1 1 100%;
		width: 100%;
	}
}

.sh-kb-suggestions { margin: 1rem 0; padding: 1rem; background: #f0fdf4; border-radius: 8px; display: none; }
.sh-kb-suggestions.is-visible { display: block; }

/* Form layout — consistent label → control spacing */
.sh-form .sh-field,
.sh-form > p:not(.sh-form-actions) {
	margin: 0 0 1rem;
}

.sh-form label.sh-field__label,
.sh-form div.sh-field__label {
	margin: 0 0 0.4rem;
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.35;
	color: #0f172a;
}

.sh-form label.sh-field__label {
	display: block;
}

.sh-form div.sh-field__label {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.sh-form div.sh-field__label label {
	margin: 0;
	padding: 0;
	font-weight: inherit;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}

.sh-form label:not(.sh-field__label) {
	display: block;
	margin: 0 0 0.4rem;
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.35;
	color: #0f172a;
}

.sh-form .sh-input,
.sh-form select.sh-input,
.sh-form textarea.sh-input {
	display: block;
	width: 100%;
	margin: 0;
	box-sizing: border-box;
}

.sh-form select.sh-input {
	min-height: 2.5rem;
	padding: 0.5rem 0.65rem;
}

.sh-form-actions {
	margin: 1.5rem 0 0;
	padding: 0;
}

.sh-form-actions .sh-button {
	padding: 0.65rem 1.35rem;
	font-weight: 600;
	min-height: 2.75rem;
}

.sh-field-label-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.sh-field-help {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.sh-field-help:hover,
.sh-field-help:focus-visible {
	color: var(--sh-color-primary);
	background: var(--sh-color-primary-soft);
	outline: none;
}

.sh-field-help.is-open {
	color: var(--sh-color-primary);
	background: var(--sh-color-primary-soft);
}

.sh-tooltip {
	display: none;
	position: absolute;
	z-index: 20;
	left: 50%;
	top: calc(100% + 0.45rem);
	transform: translateX(-50%);
	width: min(18rem, 70vw);
	padding: 0.65rem 0.75rem;
	border-radius: 8px;
	background: #0f172a;
	color: #f8fafc;
	font-size: 0.8125rem;
	font-weight: 400;
	line-height: 1.45;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.sh-tooltip::before {
	content: "";
	position: absolute;
	left: 50%;
	top: -0.35rem;
	transform: translateX(-50%) rotate(45deg);
	width: 0.55rem;
	height: 0.55rem;
	background: #0f172a;
}

.sh-field-help:hover + .sh-tooltip,
.sh-field-help:focus-visible + .sh-tooltip,
.sh-field-help.is-open + .sh-tooltip {
	display: block;
}

.sh-field-hint {
	display: block;
	margin-top: 0.4rem;
	font-size: 0.8125rem;
	font-weight: 400;
	color: #64748b;
	line-height: 1.45;
}

.sh-form-wrap > h2 {
	margin: 0 0 1.25rem;
}

.sh-form-wrap .sh-guide {
	margin-bottom: 1.25rem;
}

.sh-magic-access__form .sh-field {
	margin-bottom: 1rem;
}

.sh-form .required {
	color: #dc2626;
}

.sh-optional {
	font-weight: 400;
	color: #64748b;
	font-size: 0.875rem;
}

/* Contextual access guides & magic portal */
.sh-guide {
	margin: 0 0 1.25rem;
	padding: 1rem 1.1rem;
	border-radius: 8px;
	background: var(--sh-color-primary-soft);
	border: 1px solid var(--sh-color-primary-border);
	color: #334155;
	font-size: 0.925rem;
	line-height: 1.5;
}

.sh-guide__title {
	margin: 0 0 0.5rem;
	font-weight: 600;
	color: #0f172a;
	font-size: 0.95rem;
}

.sh-guide__text {
	margin: 0 0 0.5rem;
}

.sh-guide__text:last-child {
	margin-bottom: 0;
}

.sh-guide__text--muted {
	color: #64748b;
	font-size: 0.875rem;
}

.sh-guide__list {
	margin: 0;
	padding-left: 1.25rem;
}

.sh-guide__list li {
	margin-bottom: 0.35rem;
}

.sh-guide__list li:last-child {
	margin-bottom: 0;
}

.sh-guide a {
	color: var(--sh-color-primary);
	font-weight: 500;
}

.sh-guide--portal_session {
	background: #f8fafc;
	border-color: #e2e8f0;
}

.sh-magic-access {
	margin: 1.25rem 0;
	padding: 1.25rem;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
}

.sh-magic-access__title {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
	color: #0f172a;
}

.sh-magic-access__lead {
	margin: 0 0 1rem;
	color: #64748b;
	font-size: 0.925rem;
	line-height: 1.45;
}

.sh-magic-access__form {
	margin: 0;
}

.sh-portal-divider {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 1.5rem 0;
	color: #94a3b8;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.sh-portal-divider::before,
.sh-portal-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e2e8f0;
}

.sh-portal-divider span {
	flex: 0 0 auto;
}

.sh-portal-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
}

.sh-portal-footer-hint {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid #e2e8f0;
	font-size: 0.925rem;
}

.sh-portal-footer-hint a {
	color: var(--sh-color-primary);
}

.sh-button--large {
	padding: 0.75rem 1.35rem;
	font-size: 1rem;
	font-weight: 600;
}

.sh-guest-portal__lead {
	margin: 0 0 1.25rem;
	font-size: 1rem;
	line-height: 1.5;
	color: #475569;
}

.sh-guest-portal__primary {
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #e2e8f0;
}

.sh-guest-portal__secondary {
	margin-bottom: 1rem;
}

.sh-guest-portal__section-title {
	margin: 0 0 0.5rem;
	font-size: 1.05rem;
	color: #0f172a;
}

.sh-guest-portal__text {
	margin: 0 0 0.85rem;
	color: #64748b;
	font-size: 0.925rem;
	line-height: 1.45;
}

.sh-guest-portal__actions {
	margin: 0;
}

.sh-guest-portal__kb {
	margin: 0 0 1rem;
	font-size: 0.925rem;
}

.sh-guest-portal__login {
	margin-top: 1rem;
	padding: 0.85rem 1rem;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #f8fafc;
}

.sh-guest-portal__login summary {
	cursor: pointer;
	font-weight: 600;
	color: #334155;
}

.sh-guest-portal__login summary:focus-visible {
	outline: 2px solid var(--sh-color-primary);
	outline-offset: 2px;
	border-radius: 4px;
}

.sh-guest-portal__register {
	margin-bottom: 1.25rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid #e2e8f0;
}

.sh-register-cta {
	margin: 0 0 1.25rem;
	padding: 1rem 1.1rem;
	border: 1px solid #bfdbfe;
	border-radius: 10px;
	background: #eff6ff;
}

.sh-register-cta__title {
	margin: 0 0 0.45rem;
	font-size: 1.05rem;
	color: #0f172a;
}

.sh-register-cta__text,
.sh-register-cta__email {
	margin: 0 0 0.5rem;
	color: #475569;
	font-size: 0.925rem;
	line-height: 1.45;
}

.sh-register-cta__actions {
	margin: 0.75rem 0 0;
}

.sh-free-plan-notice {
	margin: 0 0 1.25rem;
}

.sh-guide--link-account .sh-link-account__actions {
	margin: 0.75rem 0 0;
}

/* Ticket attachments (under message text) — always light */
.sh-message-attachments,
.sh-attachments {
	color-scheme: light;
	--sh-color-surface: #f8fafc;
	--sh-color-surface-hover: #f1f5f9;
	--sh-color-border: #e2e8f0;
	--sh-color-text: #334155;
	--sh-color-muted: #64748b;
	--sh-color-primary: #2563eb;
}

.sh-message-attachments {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--sh-color-border, #e2e8f0);
}

.sh-attachments {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.sh-attachments__item {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	max-width: 100%;
}

.sh-attachments__card {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.375rem 0.5rem;
	border-radius: 8px;
	border: 1px solid var(--sh-color-border, #e2e8f0);
	background: var(--sh-color-surface, #f8fafc);
	text-decoration: none;
	color: inherit;
	max-width: 100%;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sh-attachments__card:hover {
	border-color: var(--sh-color-primary, #6366f1);
	background: var(--sh-color-surface-hover, #f1f5f9);
}

.sh-attachments__thumb {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 6px;
	overflow: hidden;
	background: var(--sh-color-border, #e2e8f0);
	display: flex;
	align-items: center;
	justify-content: center;
}

.sh-attachments__thumb-img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	display: block;
}

.sh-attachments__thumb-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--sh-color-muted, #64748b);
}

.sh-attachments__thumb-fallback svg {
	width: 1.375rem;
	height: 1.375rem;
}

.sh-attachments__info {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	min-width: 0;
	flex: 1 1 auto;
}

.sh-attachments__name {
	display: block;
	min-width: 0;
	max-width: 100%;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--sh-color-primary, #6366f1);
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sh-attachments__date {
	font-size: 0.75rem;
	color: var(--sh-color-muted, #64748b);
	line-height: 1.3;
}

/* Frontend ticket attachments — 3-column card grid */
.sh-attachments.sh-attachments--grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
}

.sh-attachments-wrap {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.sh-attachments__more {
	display: flex;
	justify-content: center;
	width: 100%;
	padding: 0.15rem 0 0.25rem;
	text-align: center;
}

.sh-attachments__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.4;
	color: var(--sh-color-primary, #2563eb);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	appearance: none;
	-webkit-appearance: none;
}

.sh-attachments__toggle:hover,
.sh-attachments__toggle:focus-visible {
	color: var(--sh-color-primary-hover, #1d4ed8);
	background: none;
	box-shadow: none;
	outline: none;
}

.sh-attachments__toggle:focus-visible {
	text-decoration-thickness: 2px;
}

.sh-attachments--grid .sh-attachments__item {
	max-width: none;
	min-width: 0;
}

.sh-attachments__tile {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	transition: border-color 0.15s ease;
}

.sh-attachments__tile:hover {
	border-color: #cbd5e1;
}

.sh-attachments__preview-wrap {
	position: relative;
	padding: 0.5rem;
	background: #f1f5f9;
}

.sh-attachments__overlay-actions {
	position: absolute;
	top: 0.65rem;
	right: 0.65rem;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.sh-attachments__dimensions-badge {
	position: absolute;
	left: 0.85rem;
	bottom: 0.65rem;
	z-index: 3;
	padding: 0.15rem 0.45rem;
	border-radius: 4px;
	font-size: 0.625rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.01em;
	line-height: 1.35;
	color: #f8fafc;
	background: rgba(15, 23, 42, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
	backdrop-filter: blur(4px);
	pointer-events: none;
}

.sh-attachments__overlay-actions :is(a, button).sh-attachments__action {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 2rem;
	width: 2rem;
	height: 2rem;
	min-width: 2rem;
	min-height: 2rem;
	max-width: 2rem;
	max-height: 2rem;
	padding: 0;
	margin: 0;
	line-height: 1;
	font: inherit;
	color: #0f172a;
	text-decoration: none;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(15, 23, 42, 0.14);
	box-shadow: 0 1px 4px rgba(15, 23, 42, 0.16);
	transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
	appearance: none;
	-webkit-appearance: none;
}

.sh-attachments__overlay-actions button.sh-attachments__action {
	cursor: pointer;
	vertical-align: top;
	text-transform: none;
	letter-spacing: normal;
	outline: none;
}

.sh-attachments__overlay-actions .sh-attachments__action .sh-icon {
	width: 1rem;
	height: 1rem;
	min-width: 1rem;
	min-height: 1rem;
	display: block;
}

.sh-attachments__overlay-actions .sh-attachments__action svg,
.sh-attachments__overlay-actions .sh-attachments__action svg path {
	stroke: currentColor;
	flex-shrink: 0;
}

.sh-attachments__overlay-actions .sh-attachments__action svg {
	width: 1rem;
	height: 1rem;
	min-width: 1rem;
	min-height: 1rem;
	stroke-width: 2.25;
}

.sh-attachments__overlay-actions :is(a, button).sh-attachments__action:hover,
.sh-attachments__overlay-actions :is(a, button).sh-attachments__action:focus-visible {
	color: var(--sh-color-primary, #2563eb);
	background: #fff;
	border-color: #93c5fd;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.sh-attachments__overlay-actions a.sh-attachments__action,
.sh-attachments__overlay-actions a.sh-attachments__action:visited {
	color: #0f172a;
	text-decoration: none;
}

.sh-attachment-preview {
	display: block;
	width: 100%;
}

.sh-attachment-preview__trigger {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 6px;
	cursor: zoom-in;
	background: #fff;
	text-decoration: none;
	overflow: hidden;
}

.sh-attachment-preview__trigger:focus-visible {
	outline: 2px solid var(--sh-color-primary, #2563eb);
	outline-offset: 2px;
}

.sh-attachment-preview__popover {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	box-sizing: border-box;
	background: rgba(15, 23, 42, 0.55);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition:
		opacity 0.2s ease,
		visibility 0s linear 0.2s;
}

.sh-attachment-preview.is-open .sh-attachment-preview__popover {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition:
		opacity 0.2s ease,
		visibility 0s linear 0s;
}

.sh-attachment-preview__img {
	display: block;
	max-width: min(92vw, 720px);
	max-height: 85vh;
	width: auto;
	height: auto;
	border-radius: 8px;
	box-shadow:
		0 4px 24px rgba(15, 23, 42, 0.18),
		0 0 0 1px rgba(15, 23, 42, 0.08);
	object-fit: contain;
	background: #fff;
	cursor: zoom-out;
}

body.sh-attachment-preview-open {
	overflow: hidden;
}

.sh-attachments__preview--file {
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sh-attachments__preview {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	min-height: 5.5rem;
	border-radius: 6px;
	background: #fff;
	text-decoration: none;
	overflow: hidden;
}

.sh-attachments__preview-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
	border-radius: 6px;
}

.sh-attachments__preview-img[hidden] {
	display: none !important;
}

.sh-attachments__preview-fallback {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: #f1f5f9;
	color: #2563eb;
}

.sh-attachments__preview-fallback:not([hidden]) {
	display: flex;
}

.sh-attachments__preview--file .sh-attachments__preview-fallback {
	position: static;
	display: flex;
	width: 100%;
	height: 100%;
	background: transparent;
}

.sh-attachments__preview-fallback svg {
	width: 2.25rem;
	height: 2.25rem;
}

.sh-attachments__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 0.35rem;
	padding: 0.65rem 0.75rem 0.7rem;
	min-width: 0;
}

.sh-attachments--grid .sh-attachments__name {
	margin: 0;
	min-width: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #0f172a;
	line-height: 1.35;
	text-align: left;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.sh-attachments__meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	min-width: 0;
}

.sh-attachments__meta-group {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-width: 0;
}

.sh-attachments__meta-sep {
	color: #64748b;
	font-size: 0.6875rem;
	line-height: 1;
	opacity: 0.65;
	flex-shrink: 0;
}

.sh-attachments__type {
	display: inline-flex;
	align-items: center;
	padding: 0.1rem 0.45rem;
	border-radius: 4px;
	font-size: 0.625rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	background: #e2e8f0;
	color: #475569;
}

.sh-attachments__type--png,
.sh-attachments__type--jpg,
.sh-attachments__type--jpeg,
.sh-attachments__type--webp,
.sh-attachments__type--gif {
	background: #dcfce7;
	color: #15803d;
}

.sh-attachments__type--txt {
	background: #ede9fe;
	color: #6d28d9;
}

.sh-attachments__type--log {
	background: #f1f5f9;
	color: #64748b;
}

.sh-attachments__size {
	font-size: 0.6875rem;
	color: #64748b;
	line-height: 1.35;
	white-space: nowrap;
}

.sh-attachments__time {
	font-size: 0.6875rem;
	color: #64748b;
	line-height: 1.35;
	text-align: right;
}

@media (max-width: 640px) {
	.sh-attachments.sh-attachments--grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0.5rem;
	}

	.sh-attachments__body {
		padding: 0.5rem 0.55rem 0.55rem;
	}

	.sh-attachments--grid .sh-attachments__name {
		font-size: 0.6875rem;
	}
}

/* Attachment upload dropzone — always light (no OS dark-mode surface) */
.sh-upload-zone {
	margin-top: 0.35rem;
	color-scheme: light;
	--sh-color-surface: #f8fafc;
	--sh-color-surface-hover: #f1f5f9;
	--sh-color-border: #cbd5e1;
	--sh-color-text: #334155;
	--sh-color-muted: #64748b;
}

.sh-upload-zone__drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	min-height: 7.5rem;
	padding: 1.25rem 1rem;
	border: 2px dashed var(--sh-color-border, #cbd5e1);
	border-radius: var(--sh-radius-sm, 10px);
	background: var(--sh-color-surface, #f8fafc);
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.sh-upload-zone__drop:hover,
.sh-upload-zone:focus-within .sh-upload-zone__drop {
	border-color: var(--sh-color-primary, #6366f1);
	background: var(--sh-color-surface-hover, #f1f5f9);
}

.sh-upload-zone.is-dragover .sh-upload-zone__drop {
	border-color: var(--sh-color-primary, #6366f1);
	background: color-mix(in srgb, var(--sh-color-primary, #6366f1) 8%, var(--sh-color-surface, #f8fafc));
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--sh-color-primary, #6366f1) 18%, transparent);
}

.sh-upload-zone.is-invalid .sh-upload-zone__drop {
	border-color: #dc2626;
}

.sh-upload-zone__icon {
	display: flex;
	color: var(--sh-color-muted, #64748b);
}

.sh-upload-zone__icon svg {
	width: 2rem;
	height: 2rem;
}

.sh-upload-zone.is-dragover .sh-upload-zone__icon {
	color: var(--sh-color-primary, #6366f1);
}

.sh-upload-zone__prompt {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--sh-color-text, #334155);
	line-height: 1.4;
}

.sh-upload-zone__browse {
	margin: 0;
	padding: 0.4rem 0.9rem;
	border: 1px solid var(--sh-color-primary, #2563eb);
	border-radius: 6px;
	background: var(--sh-color-primary, #2563eb);
	color: var(--sh-color-primary-on, #fff);
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sh-upload-zone__browse:hover,
.sh-upload-zone__browse:focus-visible {
	background: var(--sh-color-primary-hover, #1d4ed8);
	border-color: var(--sh-color-primary-hover, #1d4ed8);
	outline: none;
	box-shadow: 0 0 0 3px rgba(var(--sh-color-primary-rgb, 37, 99, 235), 0.35);
}

.sh-upload-zone__input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sh-upload-zone__list {
	list-style: none;
	margin: 0.65rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.sh-upload-zone__list[hidden] {
	display: none !important;
}

.sh-upload-zone__file {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.55rem;
	border: 1px solid var(--sh-color-border, #e2e8f0);
	border-radius: 8px;
	background: #fff;
	font-size: 0.8125rem;
}

.sh-upload-zone__file-name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
	color: var(--sh-color-text, #1e293b);
}

.sh-upload-zone__file-meta {
	flex: 0 0 auto;
	color: var(--sh-color-muted, #64748b);
	font-size: 0.75rem;
}

.sh-upload-zone__file-remove {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: var(--sh-color-muted, #64748b);
	font-family: inherit;
	cursor: pointer;
}

.sh-upload-zone__file-remove .sh-icon {
	width: 1rem;
	height: 1rem;
}

.sh-upload-zone__file-remove:hover {
	background: #fee2e2;
	color: #b91c1c;
}

.sh-field--attachments .sh-field__label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}

.sh-field--attachments .sh-field__hint {
	margin-top: 0.35rem;
	font-size: 0.8125rem;
	color: var(--sh-color-muted, #64748b);
}

/* Guest spam protection (honeypot + Turnstile) */
.sh-hp-field {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	padding: 0;
	margin: 0;
}

.sh-spam-protection {
	margin: 0.75rem 0 0;
}

.sh-field--turnstile {
	margin: 0 0 0.75rem;
}

.sh-turnstile-wrap {
	display: inline-flex;
	align-items: flex-start;
	width: auto;
	max-width: 100%;
	box-sizing: border-box;
	padding: 0.7rem;
	border: 1px solid var(--sh-color-border, #cbd5e1);
	border-radius: var(--sh-radius-sm, 8px);
	background: var(--sh-color-surface, #fff);
	line-height: 0;
	font-size: 0;
}

.sh-turnstile-wrap .cf-turnstile,
.sh-turnstile-wrap .sh-turnstile {
	display: block;
	width: auto;
	line-height: 0;
	font-size: 0;
}

.sh-turnstile-wrap iframe {
	display: block;
	margin: 0;
	vertical-align: bottom;
}

.sh-spam-feedback {
	margin-top: 0.5rem;
}

.sh-field-feedback,
.sh-attachment-feedback {
	margin-top: 0.5rem;
	padding: 0.65rem 0.85rem;
	border-radius: var(--sh-radius-sm, 8px);
	font-size: 0.875rem;
	line-height: 1.45;
	background: #fee2e2;
	color: #991b1b;
}

.sh-field-feedback[hidden],
.sh-attachment-feedback[hidden] {
	display: none !important;
}

.sh-form-errors {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-radius: var(--sh-radius-sm, 8px);
	background: #fee2e2;
	color: #991b1b;
	font-size: 0.9375rem;
}

.sh-form-errors[hidden] {
	display: none !important;
}

.sh-input.is-invalid,
.sh-attachment-input.is-invalid {
	border-color: #dc2626;
	box-shadow: 0 0 0 1px #dc2626;
}

/* Dark surfaces (OS preference) — portal & forms only; ticket view stays light */
@media (prefers-color-scheme: dark) {
	.sh-portal,
	.sh-form-wrap {
		color: #e2e8f0;
		--sh-color-surface: #1e293b;
		--sh-color-surface-hover: #334155;
		--sh-color-border: #475569;
		--sh-color-text: #e2e8f0;
		--sh-color-muted: #94a3b8;
	}

	.sh-portal .sh-card,
	.sh-form-wrap .sh-card {
		background: #0f172a;
		border-color: #334155;
	}
}
