.sms-portal {
	background: #eef3fa;
	color: #0f172a;
	font-family: inherit;
	margin: -96px calc(50% - 50vw) 0;
	min-height: 100vh;
	padding: 24px;
}

@supports selector(body:has(.sms-portal)) {
	body:has(.sms-portal) #sp-main-body,
	body:has(.sms-portal) .sp-main-body,
	body:has(.sms-portal) #sp-component {
		padding-top: 0 !important;
	}

	body:has(.sms-portal) #sp-main-body,
	body:has(.sms-portal) .sp-main-body {
		padding-bottom: 0 !important;
	}

	.sms-portal {
		margin-top: 0;
	}
}

.sms-portal *,
.sms-portal *::before,
.sms-portal *::after {
	box-sizing: border-box;
}

.sms-portal a {
	color: inherit;
}

.sms-portal-login {
	background: #fff;
	border: 1px solid #d8e2ee;
	border-radius: 8px;
	box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
	margin: 72px auto 0;
	max-width: 520px;
	padding: 34px;
	text-align: center;
}

.sms-brand-large,
.sms-portal-brand {
	align-items: center;
	background: #fff;
	border: 1px solid #d8e2ee;
	border-radius: 8px;
	color: #174f7a;
	display: inline-flex;
	gap: 10px;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0;
	padding: 10px;
	text-decoration: none;
}

.sms-brand-large img,
.sms-portal-brand img {
	display: block;
	height: auto;
	max-height: 58px;
	max-width: 170px;
	object-fit: contain;
}

.sms-brand-large span,
.sms-portal-brand span {
	display: block;
	line-height: 1.2;
}

.sms-portal-login h1 {
	font-size: 28px;
	line-height: 1.2;
	margin: 22px 0 10px;
}

.sms-portal-login p {
	color: #526174;
	font-size: 16px;
	line-height: 1.6;
	margin: 0 auto 22px;
	max-width: 420px;
}

.sms-portal-shell {
	display: grid;
	gap: 18px;
	grid-template-columns: 240px minmax(0, 1fr);
	margin: 0 auto;
	max-width: 1500px;
}

.sms-portal-sidebar {
	align-self: start;
	background: #fff;
	border: 1px solid #d8e2ee;
	border-radius: 8px;
	box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
	padding: 18px;
	position: sticky;
	top: 18px;
}

.sms-portal-sidebar .sms-portal-brand {
	display: flex;
	justify-content: center;
	margin-bottom: 18px;
	width: 100%;
}

.sms-portal-nav {
	display: grid;
	gap: 7px;
}

.sms-portal-nav a {
	border-radius: 8px;
	color: #314154;
	display: block;
	font-weight: 600;
	padding: 12px 13px;
	text-decoration: none;
}

.sms-portal-nav a:hover,
.sms-portal-nav a:focus,
.sms-portal-nav a.is-active {
	background: #e8f4ff;
	color: #075985;
}

.sms-portal-main {
	display: grid;
	gap: 16px;
	min-width: 0;
}

.sms-portal-top {
	align-items: center;
	background: #fff;
	border: 1px solid #d8e2ee;
	border-radius: 8px;
	box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
	display: flex;
	gap: 14px;
	justify-content: space-between;
	padding: 18px 20px;
}

.sms-portal-top p {
	color: #667085;
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 4px;
	text-transform: uppercase;
}

.sms-portal-top h1 {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
}

.sms-portal-user {
	background: #f4f7fb;
	border: 1px solid #d8e2ee;
	border-radius: 999px;
	color: #314154;
	font-weight: 600;
	padding: 8px 13px;
	white-space: nowrap;
}

.sms-portal-sidebar-footer {
	border-top: 1px solid #e3eaf3;
	margin-top: 14px;
	padding-top: 14px;
}

.sms-portal-logout {
	align-items: center;
	border: 1px solid #b8c7da;
	border-radius: 8px;
	color: #174f7a;
	display: flex;
	font-weight: 600;
	justify-content: center;
	min-height: 40px;
	padding: 9px 12px;
	text-decoration: none;
}

.sms-portal-logout:hover,
.sms-portal-logout:focus {
	background: #e8f7ff;
	color: #0a78aa;
}

.sms-portal-actions,
.sms-portal-actions-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.sms-btn,
.sms-small-btn {
	align-items: center;
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 700;
	justify-content: center;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.sms-btn {
	min-height: 42px;
	padding: 10px 15px;
}

.sms-small-btn {
	background: #f4f7fb;
	border-color: #d8e2ee;
	color: #203040;
	font-size: 12px;
	min-height: 28px;
	padding: 5px 8px;
}

.sms-action-icon {
	display: block;
	flex: 0 0 auto;
}

.sms-portal .sms-btn-primary,
.sms-portal a.sms-btn-primary,
.sms-portal button.sms-btn-primary {
	background: #16a4d8;
	color: #fff !important;
}

.sms-portal .sms-btn-primary:hover,
.sms-portal .sms-btn-primary:focus {
	background: #0d8fbe;
	color: #fff !important;
}

.sms-portal .sms-btn-ghost,
.sms-portal a.sms-btn-ghost,
.sms-portal button.sms-btn-ghost {
	background: #fff;
	border-color: #b8c7da;
	color: #17324d !important;
}

.sms-portal .sms-btn-ghost:hover,
.sms-portal .sms-btn-ghost:focus,
.sms-portal .sms-small-btn:hover,
.sms-portal .sms-small-btn:focus {
	background: #e8f7ff;
	color: #0a78aa !important;
}

.sms-portal .sms-btn-success,
.sms-portal .sms-small-btn.is-green {
	background: #16a4d8;
	border-color: #16a4d8;
	color: #fff !important;
}

.sms-portal .sms-small-btn.is-red {
	background: #c62828;
	border-color: #c62828;
	color: #fff !important;
}

.sms-portal-stats {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sms-portal-stats a,
.sms-portal-card {
	background: #fff;
	border: 1px solid #d8e2ee;
	border-radius: 8px;
	box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.sms-portal-stats a {
	color: #0f172a;
	padding: 18px;
	text-decoration: none;
}

.sms-portal-stats span {
	color: #667085;
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 8px;
}

.sms-portal-stats strong {
	font-size: 34px;
	line-height: 1;
}

.sms-portal-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sms-portal-card {
	min-width: 0;
	padding: 18px;
}

.sms-portal-card h2 {
	font-size: 18px;
	line-height: 1.25;
	margin: 0 0 16px;
}

.sms-card-head {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 12px;
}

.sms-card-head h2 {
	margin: 0;
}

.sms-card-head a {
	color: #0b77bd;
	font-weight: 600;
	text-decoration: none;
}

.sms-list {
	display: grid;
	gap: 8px;
}

.sms-list-row {
	align-items: center;
	background: #f8fafc;
	border: 1px solid #e3eaf3;
	border-radius: 8px;
	color: #0f172a;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 12px;
	text-decoration: none;
}

.sms-list-row strong,
.sms-list-row small {
	display: block;
}

.sms-list-row small {
	color: #64748b;
	margin-top: 4px;
}

.sms-list-row em,
.sms-pill {
	background: #edf7ed;
	border-radius: 999px;
	color: #116932;
	display: inline-flex;
	font-size: 12px;
	font-style: normal;
	font-weight: 600;
	padding: 5px 8px;
	white-space: nowrap;
}

.sms-muted {
	color: #64748b;
	margin: 0;
}

.sms-alert {
	border-radius: 8px;
	font-weight: 700;
	padding: 14px 16px;
}

.sms-alert pre {
	font: inherit;
	margin: 0;
	white-space: pre-wrap;
}

.sms-alert-warning {
	background: #fff8e1;
	border: 1px solid #f0d489;
	color: #7a5200;
}

.sms-alert-info {
	background: #e8f4ff;
	border: 1px solid #b7dcff;
	color: #075985;
}

.sms-portal-filter {
	align-items: flex-end;
	background: #fff;
	border: 1px solid #d8e2ee;
	border-radius: 8px;
	box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 14px;
}

.sms-portal-filter > div {
	flex: 1 1 160px;
	min-width: 160px;
}

.sms-portal-filter > .sms-filter-search {
	flex: 2 1 360px;
	min-width: 280px;
}

.sms-filter-actions {
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
	justify-content: flex-end;
	min-width: 210px;
}

.sms-portal label {
	color: #17324d;
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 7px;
}

.sms-portal input[type="text"],
.sms-portal input[type="tel"],
.sms-portal input[type="search"],
.sms-portal input[type="file"],
.sms-portal select,
.sms-portal textarea {
	background: #fff;
	border: 1px solid #bcc9d8;
	border-radius: 7px;
	color: #0f172a;
	display: block;
	font: inherit;
	min-height: 42px;
	padding: 9px 11px;
	width: 100%;
}

.sms-portal input[readonly],
.sms-portal select:disabled,
.sms-portal textarea[readonly] {
	background: #f3f6fa;
	color: #697586;
}

.sms-portal textarea {
	min-height: 120px;
	resize: vertical;
}

.sms-form-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sms-form-span {
	grid-column: 1 / -1;
}

.sms-manual-parent {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sms-disabled-fieldset {
	opacity: 0.58;
}

.sms-form-submit {
	display: flex;
	justify-content: flex-end;
}

.sms-contract-preview {
	background: #f8fafc;
	border: 1px solid #d8e2ee;
	border-radius: 8px;
	min-height: 280px;
	overflow: auto;
	padding: 18px;
}

.sms-upload-summary {
	background: #f8fafc;
	border: 1px solid #d8e2ee;
	border-radius: 8px;
	display: grid;
	gap: 5px;
	margin-bottom: 14px;
	padding: 14px;
}

.sms-upload-summary strong {
	color: #17324d;
	font-size: 13px;
	text-transform: uppercase;
}

.sms-upload-summary span,
.sms-upload-current,
.sms-upload-hint {
	color: #334155;
	line-height: 1.45;
	margin: 0;
	overflow-wrap: anywhere;
}

.sms-upload-current {
	margin-bottom: 14px;
}

.sms-upload-hint {
	color: #64748b;
	font-size: 13px;
	margin-top: 8px;
}

.sms-table-wrap {
	overflow-x: auto;
	width: 100%;
}

.sms-portal-table {
	border-collapse: collapse;
	font-size: 14px;
	min-width: 900px;
	width: 100%;
}

.sms-portal-table th,
.sms-portal-table td {
	border-bottom: 1px solid #e3eaf3;
	padding: 12px;
	text-align: left;
	vertical-align: top;
}

.sms-portal-table th {
	color: #17324d;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.sms-portal-table .sms-number-col,
.sms-portal-table .sms-row-number {
	text-align: center;
	width: 42px;
}

.sms-portal-table .sms-row-number {
	color: #64748b;
	font-weight: 700;
	white-space: nowrap;
}

.sms-portal-table tbody tr:hover {
	background: #f8fafc;
}

.sms-row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	justify-content: flex-end;
}

.sms-portal-table .sms-row-actions .sms-small-btn {
	border-radius: 7px;
	font-size: 12px;
	font-weight: 700;
	height: 32px;
	line-height: 1;
	min-height: 32px;
	padding: 0;
	width: 32px;
}

.sms-portal-table .sms-row-actions .sms-small-btn.is-sms {
	min-width: 46px;
	padding: 0 9px;
	width: auto;
}

.sms-message-cell {
	line-height: 1.45;
	max-width: 520px;
	overflow-wrap: anywhere;
}

.sms-portal-sms-table {
	min-width: 1040px;
}

@media (max-width: 1180px) {
	.sms-portal-shell {
		grid-template-columns: 1fr;
	}

	.sms-portal-sidebar {
		position: static;
	}

	.sms-portal-nav {
		display: flex;
		flex-wrap: wrap;
	}
}

@media (max-width: 900px) {
	.sms-portal {
		padding: 14px;
	}

	.sms-portal-top {
		align-items: stretch;
		flex-direction: column;
	}

	.sms-portal-actions-inline,
	.sms-portal-actions,
	.sms-filter-actions,
	.sms-form-submit {
		justify-content: stretch;
	}

	.sms-btn,
	.sms-small-btn,
	.sms-filter-actions > * {
		width: 100%;
	}

	.sms-portal-stats,
	.sms-portal-grid,
	.sms-form-grid,
	.sms-manual-parent {
		grid-template-columns: 1fr;
	}

	.sms-portal-filter > div,
	.sms-portal-filter > .sms-filter-search,
	.sms-filter-actions {
		flex-basis: 100%;
		min-width: 0;
	}

	.sms-table-wrap {
		overflow: visible;
	}

	.sms-portal-table,
	.sms-portal-table thead,
	.sms-portal-table tbody,
	.sms-portal-table tr,
	.sms-portal-table th,
	.sms-portal-table td {
		display: block;
		min-width: 0;
		width: 100%;
	}

	.sms-portal-table thead {
		display: none;
	}

	.sms-portal-table tr {
		background: #fff;
		border: 1px solid #d8e2ee;
		border-radius: 8px;
		margin-bottom: 12px;
		padding: 10px;
	}

	.sms-portal-table td {
		border: 0;
		display: grid;
		gap: 8px;
		grid-template-columns: minmax(112px, 38%) minmax(0, 1fr);
		padding: 8px 0;
	}

	.sms-portal-table td::before {
		color: #64748b;
		content: attr(data-label);
		font-size: 12px;
		font-weight: 700;
		text-transform: uppercase;
	}

	.sms-row-actions {
		justify-content: stretch;
	}

	.sms-portal-table .sms-row-actions .sms-small-btn {
		flex: 0 0 34px;
		height: 34px;
		width: 34px;
	}

	.sms-portal-table .sms-row-actions .sms-small-btn.is-sms {
		flex: 0 0 48px;
		width: 48px;
	}
}

@media (max-width: 560px) {
	.sms-portal {
		padding: 10px;
	}

	.sms-portal-login {
		margin-top: 24px;
		padding: 24px 18px;
	}

	.sms-portal-top h1 {
		font-size: 22px;
	}

	.sms-portal-card,
	.sms-portal-top,
	.sms-portal-sidebar,
	.sms-portal-filter {
		padding: 14px;
	}

	.sms-portal-nav a {
		width: 100%;
	}

	.sms-portal-table td {
		grid-template-columns: 1fr;
	}
}
