.ifsd-portal {
	max-width: 1180px;
	margin: 0 auto;
	color: #1f2933;
	font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ifsd-portal h2,
.ifsd-ticket h2 {
	margin: 0 0 4px;
	font-size: 1.25rem;
	line-height: 1.3;
}

.ifsd-sheet {
	background: #fff;
	border: 1px solid #e6e8ec;
	border-radius: 12px;
	padding: 20px 22px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ifsd-help,
.ifsd-kicker {
	display: block;
	margin: 0 0 10px;
	color: #52606d;
	font-weight: 400;
}

.ifsd-form label,
.ifsd-participants legend,
.ifsd-status-form label,
.ifsd-compose label {
	display: block;
	margin-bottom: 4px;
	font-weight: 650;
}

.ifsd-participants {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

.ifsd-form p,
.ifsd-side-search {
	margin: 0 0 14px;
}

.ifsd-form input[type="text"],
.ifsd-form input[type="search"],
.ifsd-form input[type="email"],
.ifsd-form select,
.ifsd-form textarea,
.ifsd-side-search input,
.ifsd-side-search select,
.ifsd-status-form select {
	width: 100%;
	max-width: 640px;
	padding: 9px 11px;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	background: #fff;
	font: inherit;
	box-sizing: border-box;
}

.ifsd-form button,
.ifsd-status-form button,
.ifsd-pager a {
	display: inline-block;
	padding: 9px 16px;
	border: 0;
	border-radius: 8px;
	background: #2271b1;
	color: #fff;
	font: inherit;
	font-weight: 650;
	text-decoration: none;
	cursor: pointer;
}

.ifsd-check {
	font-weight: 400;
}

.ifsd-app {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

.ifsd-side {
	padding: 12px;
	border-radius: 12px;
	background: #f4f6f8;
}

.ifsd-side-search input,
.ifsd-side-search select {
	max-width: none;
	margin-bottom: 8px;
}

.ifsd-filters {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ifsd-filters a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 8px;
	color: inherit;
	text-decoration: none;
}

.ifsd-filters a.is-active {
	background: #fff;
	font-weight: 650;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ifsd-count {
	min-width: 1.4em;
	padding: 0 6px;
	border-radius: 99px;
	background: #e7eaee;
	font-size: 12px;
	text-align: center;
}

.ifsd-filters a.is-active .ifsd-count {
	background: #2271b1;
	color: #fff;
}

.ifsd-main-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 10px;
}

.ifsd-main-head p {
	margin: 0;
	color: #52606d;
}

.ifsd-list {
	overflow: hidden;
	border: 1px solid #e6e8ec;
	border-radius: 12px;
	background: #fff;
}

.ifsd-row {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	gap: 12px;
	width: 100%;
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid #eef0f3;
	background: #fff;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.ifsd-row:last-child {
	border-bottom: 0;
}

.ifsd-row:hover,
.ifsd-row:focus {
	background: #f8fafc;
}

.ifsd-avatar {
	display: grid;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	color: #fff;
	font-weight: 700;
	place-items: center;
}

.ifsd-person,
.ifsd-row-meta time {
	display: block;
	color: #52606d;
	font-size: 12px;
}

.ifsd-subject {
	display: block;
	font-weight: 650;
}

.ifsd-tag {
	display: inline-block;
	margin-top: 4px;
	padding: 1px 8px;
	border-radius: 99px;
	background: #eef2f6;
	color: #52606d;
	font-size: 12px;
}

.ifsd-row-meta {
	text-align: right;
}

.ifsd-empty {
	margin: 0;
	padding: 28px 16px;
	color: #52606d;
	text-align: center;
}

.ifsd-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 99px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.ifsd-badge--new { background: #ffedd5; color: #9a3412; }
.ifsd-badge--open { background: #fef3c7; color: #92400e; }
.ifsd-badge--waiting_customer { background: #dbeafe; color: #1e3a8a; }
.ifsd-badge--forwarded { background: #ede9fe; color: #5b21b6; }
.ifsd-badge--parked { background: #e5e7eb; color: #374151; }
.ifsd-badge--resolved { background: #d1fae5; color: #065f46; }
.ifsd-badge--closed { background: #f3f4f6; color: #4b5563; }
.ifsd-badge--spam { background: #fee2e2; color: #991b1b; }

.ifsd-pager {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 12px;
}

.ifsd-notice {
	margin: 0 0 12px;
	padding: 10px 12px;
	border: 1px solid #b8e6bf;
	border-radius: 8px;
	background: #edfaef;
}

.ifsd-modal {
	width: min(880px, calc(100vw - 32px));
	max-height: min(88vh, 920px);
	padding: 0;
	border: 0;
	border-radius: 14px;
	box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.ifsd-modal::backdrop {
	background: rgba(15, 23, 42, 0.48);
}

.ifsd-modal[open] {
	position: fixed;
	inset: auto;
	top: 50%;
	left: 50%;
	margin: 0;
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: column;
	height: auto;
	overflow: hidden;
}

.ifsd-modal-bar {
	display: flex;
	justify-content: flex-end;
	padding: 12px 12px 0;
}

.ifsd-modal-close {
	padding: 6px 12px;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	background: #fff;
	color: #1f2933;
	font: inherit;
	cursor: pointer;
}

.ifsd-modal-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	padding: 4px 20px 20px;
}

.ifsd-modal .ifsd-sheet {
	padding: 0;
	border: 0;
	box-shadow: none;
}

.ifsd-ticket-head {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: flex-start;
	margin-bottom: 16px;
}

.ifsd-ticket-status span {
	margin-left: 6px;
	color: #52606d;
}

.ifsd-status-form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: end;
	min-width: 220px;
}

.ifsd-status-form select {
	width: auto;
	min-width: 160px;
}

.ifsd-thread {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ifsd-message {
	padding: 12px 14px;
	border: 1px solid #e6e8ec;
	border-radius: 10px;
	background: #fff;
}

.ifsd-message header {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
	font-size: 13px;
}

.ifsd-message--staff { background: #f4f8fc; }
.ifsd-message--internal_note { background: #fffbeb; border-color: #f5d06a; }
.ifsd-message--system { background: #f6f7f7; color: #52606d; }
.ifsd-message pre { white-space: pre-wrap; font: 13px/1.4 ui-monospace, monospace; }

.ifsd-compose {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e6e8ec;
}

.ifsd-compose-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.ifsd-files {
	margin: 12px 0 0;
	padding-left: 18px;
}

.ifsd-combo {
	position: relative;
	max-width: 640px;
}

.ifsd-combo-box {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	min-height: 42px;
	padding: 4px;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	background: #fff;
}

.ifsd-combo-box:focus-within {
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.16);
}

.ifsd-combo-picks {
	display: contents;
}

.ifsd-form .ifsd-combo-input {
	flex: 1;
	width: auto;
	min-width: 160px;
	max-width: none;
	padding: 6px 8px;
	border: 0;
	box-shadow: none;
}

.ifsd-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 99px;
	background: #e8f1fa;
	font-size: 13px;
}

.ifsd-form .ifsd-chip button {
	padding: 0 2px;
	background: transparent;
	color: #1f2933;
	font-size: 16px;
	line-height: 1;
}

.ifsd-combo-list {
	position: absolute;
	z-index: 30;
	top: calc(100% + 4px);
	right: 0;
	left: 0;
	max-height: 240px;
	margin: 0;
	padding: 4px;
	overflow: auto;
	list-style: none;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.ifsd-combo-list[hidden] {
	display: none !important;
}

.ifsd-combo-list li {
	padding: 8px 10px;
	border-radius: 6px;
	cursor: pointer;
}

.ifsd-combo-list li.is-active,
.ifsd-combo-list li:hover {
	background: #f3f6f9;
}

.ifsd-combo-empty {
	color: #52606d;
	cursor: default;
}

.ifsd-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

.ifsd-cards div {
	padding: 12px;
	border: 1px solid #e6e8ec;
	border-radius: 10px;
}

.ifsd-cards strong {
	display: block;
	font-size: 1.4rem;
}

.ifsd-bars {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.ifsd-bars li {
	display: grid;
	grid-template-columns: 140px 1fr 32px;
	gap: 8px;
	align-items: center;
	margin: 0 0 8px;
}

.ifsd-bar-track {
	display: block;
	height: 8px;
	overflow: hidden;
	border-radius: 99px;
	background: #f0f2f5;
}

.ifsd-bar-track span {
	display: block;
	height: 100%;
	background: #2271b1;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ifsd-dash-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: end;
	margin: 0 0 18px;
}

.ifsd-dash-filters label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
	font-weight: 650;
}

.ifsd-dash-filters select,
.ifsd-dash-filters input {
	min-width: 160px;
	padding: 8px 10px;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	background: #fff;
	font: inherit;
	font-weight: 400;
}

.ifsd-dash-filters a {
	padding: 9px 16px;
	border: 0;
	border-radius: 8px;
	background: #2271b1;
	color: #fff;
	font: inherit;
	font-weight: 650;
	text-decoration: none;
	cursor: pointer;
}

@media (max-width: 800px) {
	.ifsd-app,
	.ifsd-ticket-head,
	.ifsd-compose-bar {
		grid-template-columns: 1fr;
		display: block;
	}

	.ifsd-row {
		grid-template-columns: 40px minmax(0, 1fr);
	}

	.ifsd-row-meta {
		grid-column: 2;
		text-align: left;
	}

	.ifsd-status-form {
		margin-top: 12px;
	}
}
