:root {
	--brand: #1769e0;
	--brand-strong: #0b54c4;
	--brand-soft: #edf5ff;
	--brand-faint: #f5f9ff;
	--navy: #12213d;
	--ink: #172033;
	--muted: #6f7d92;
	--subtle: #96a1b1;
	--line: #e5eaf1;
	--line-strong: #d6deea;
	--surface: #ffffff;
	--canvas: #f5f7fa;
	--success: #15935d;
	--success-soft: #eaf8f1;
	--warning: #b66a0b;
	--warning-soft: #fff7e7;
	--danger: #cf3f4f;
	--danger-soft: #fff0f1;
	--sidebar-width: 248px;
	color-scheme: light;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
	box-sizing: border-box;
}

html,
body {
	min-height: 100%;
}

body {
	margin: 0;
	background: var(--canvas);
	color: var(--ink);
	font-size: 14px;
	-webkit-font-smoothing: antialiased;
}

button,
input,
select {
	font: inherit;
}

button,
a {
	-webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
	outline: 3px solid rgba(23, 105, 224, .2);
	outline-offset: 2px;
}

[hidden] {
	display: none !important;
}

.app-shell {
	min-height: 100vh;
}

.sidebar {
	position: fixed;
	z-index: 40;
	top: 0;
	bottom: 0;
	left: 0;
	display: flex;
	width: var(--sidebar-width);
	flex-direction: column;
	border-right: 1px solid #dfe5ed;
	background: #fff;
}

.sidebar-head {
	display: flex;
	min-height: 74px;
	align-items: center;
	gap: 11px;
	padding: 15px 18px;
	border-bottom: 1px solid #eef1f5;
}

.brand-mark {
	display: block;
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	border-radius: 11px;
	background: var(--brand) url('/snappymail/v/2.38.2/static/favicon.svg') center / 29px no-repeat;
	box-shadow: 0 8px 20px rgba(23, 105, 224, .19);
}

.brand-copy {
	min-width: 0;
}

.brand-copy strong,
.brand-copy small {
	display: block;
}

.brand-copy strong {
	font-size: 16px;
	letter-spacing: -.1px;
}

.brand-copy small {
	margin-top: 2px;
	color: var(--brand);
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 2.4px;
}

.sidebar-close {
	display: none;
	width: 34px;
	height: 34px;
	margin-left: auto;
	border: 0;
	border-radius: 9px;
	background: #f2f5f9;
	color: #5f6c80;
	cursor: pointer;
	font-size: 21px;
}

.sidebar-nav {
	flex: 1;
	overflow-y: auto;
	padding: 18px 12px;
}

.nav-group + .nav-group {
	margin-top: 22px;
}

.nav-label {
	margin: 0 10px 8px;
	color: #a0a9b7;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .5px;
}

.nav-item {
	display: flex;
	width: 100%;
	min-height: 44px;
	align-items: center;
	gap: 12px;
	margin: 3px 0;
	padding: 0 12px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #4e5d72;
	cursor: pointer;
	text-align: left;
	transition: background-color .15s ease, color .15s ease;
}

.nav-item:hover {
	background: #f4f7fb;
	color: var(--ink);
}

.nav-item.active {
	background: var(--brand-soft);
	color: var(--brand-strong);
	font-weight: 700;
}

.nav-icon {
	display: grid;
	width: 24px;
	height: 24px;
	place-items: center;
	border-radius: 7px;
	background: #f0f3f7;
	color: #718095;
	font-size: 12px;
	font-weight: 800;
}

.nav-item.active .nav-icon {
	background: #d8e9ff;
	color: var(--brand);
}

.nav-count {
	min-width: 23px;
	margin-left: auto;
	padding: 2px 7px;
	border-radius: 999px;
	background: #f1f4f8;
	color: #7e8a9c;
	font-size: 11px;
	text-align: center;
}

.sidebar-foot {
	padding: 12px;
	border-top: 1px solid #edf1f5;
}

.service-state {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 4px 12px;
	color: var(--muted);
	font-size: 11px;
}

.service-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--success);
	box-shadow: 0 0 0 4px var(--success-soft);
}

.actor-card {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border-radius: 10px;
	background: #f7f9fc;
}

.actor-avatar,
.avatar {
	display: grid;
	place-items: center;
	border-radius: 9px;
	background: #e6f0ff;
	color: var(--brand-strong);
	font-weight: 800;
}

.actor-avatar {
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
}

.actor-copy {
	min-width: 0;
}

.actor-copy strong,
.actor-copy small {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.actor-copy strong {
	font-size: 12px;
}

.actor-copy small {
	margin-top: 3px;
	color: var(--muted);
	font-size: 10px;
}

.workspace {
	min-height: 100vh;
	margin-left: var(--sidebar-width);
}

.topbar {
	position: sticky;
	z-index: 30;
	top: 0;
	display: flex;
	min-height: 64px;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 0 clamp(20px, 3vw, 38px);
	border-bottom: 1px solid rgba(218, 225, 234, .9);
	background: rgba(255, 255, 255, .94);
	backdrop-filter: blur(14px);
}

.topbar-left,
.topbar-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.menu-button {
	display: none;
	width: 38px;
	height: 38px;
	border: 1px solid var(--line);
	border-radius: 9px;
	background: #fff;
	color: #4d5a6d;
	cursor: pointer;
	font-size: 17px;
}

.breadcrumb {
	color: #7e8a9d;
	font-size: 13px;
}

.breadcrumb strong {
	color: var(--ink);
	font-weight: 650;
}

.top-link {
	display: inline-flex;
	min-height: 36px;
	align-items: center;
	gap: 7px;
	padding: 0 13px;
	border: 1px solid var(--line-strong);
	border-radius: 9px;
	background: #fff;
	color: #405069;
	text-decoration: none;
}

.top-link:hover {
	border-color: #9fbee9;
	color: var(--brand);
}

.top-link:disabled {
	cursor: not-allowed;
	opacity: .58;
}

.content {
	width: min(1440px, 100%);
	margin: 0 auto;
	padding: 30px clamp(20px, 3vw, 40px) 58px;
}

.page {
	animation: page-in .18s ease-out;
}

@keyframes page-in {
	from { opacity: 0; transform: translateY(3px); }
	to { opacity: 1; transform: translateY(0); }
}

.page-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 22px;
}

.page-heading h1 {
	margin: 0;
	font-size: clamp(24px, 2.4vw, 30px);
	font-weight: 750;
	letter-spacing: -.5px;
}

.page-heading p {
	margin: 8px 0 0;
	color: var(--muted);
	line-height: 1.65;
}

.primary,
.secondary,
.quiet,
.danger-button {
	min-height: 38px;
	padding: 0 15px;
	border: 1px solid transparent;
	border-radius: 9px;
	cursor: pointer;
	font-weight: 650;
}

.primary {
	background: var(--brand);
	color: #fff;
	box-shadow: 0 6px 14px rgba(23, 105, 224, .16);
}

.primary:hover {
	background: var(--brand-strong);
}

.secondary {
	border-color: var(--line-strong);
	background: #fff;
	color: #405069;
}

.secondary:hover {
	border-color: #a8c3e8;
	color: var(--brand);
}

.quiet {
	min-height: 32px;
	padding: 0 9px;
	background: transparent;
	color: #51647f;
}

.quiet:hover {
	background: var(--brand-soft);
	color: var(--brand);
}

.danger-button {
	border-color: #f1c4ca;
	background: #fff;
	color: var(--danger);
}

button:disabled {
	cursor: not-allowed;
	opacity: .55;
}

.hero-card {
	position: relative;
	display: grid;
	overflow: hidden;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 30px;
	min-height: 192px;
	padding: clamp(25px, 4vw, 38px);
	border-radius: 18px;
	background: var(--navy);
	color: #fff;
	box-shadow: 0 16px 42px rgba(18, 33, 61, .14);
}

.hero-card::before,
.hero-card::after {
	position: absolute;
	border-radius: 50%;
	background: rgba(64, 146, 255, .14);
	content: '';
}

.hero-card::before {
	top: -115px;
	right: 150px;
	width: 290px;
	height: 290px;
}

.hero-card::after {
	right: -65px;
	bottom: -105px;
	width: 240px;
	height: 240px;
}

.hero-copy,
.hero-summary {
	position: relative;
	z-index: 1;
}

.hero-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 13px;
	color: #9ec6ff;
	font-size: 12px;
	font-weight: 700;
}

.hero-kicker::before {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #48d49a;
	box-shadow: 0 0 0 4px rgba(72, 212, 154, .12);
	content: '';
}

.hero-copy h1 {
	margin: 0;
	font-size: clamp(25px, 3vw, 34px);
	letter-spacing: -.7px;
}

.hero-copy p {
	max-width: 680px;
	margin: 12px 0 0;
	color: #b9c7db;
	line-height: 1.7;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

.hero-actions .primary {
	background: #2b7deb;
}

.hero-actions .secondary {
	border-color: rgba(255, 255, 255, .2);
	background: rgba(255, 255, 255, .08);
	color: #fff;
}

.hero-summary {
	min-width: 170px;
	padding: 20px;
	border: 1px solid rgba(255, 255, 255, .11);
	border-radius: 14px;
	background: rgba(255, 255, 255, .07);
	backdrop-filter: blur(8px);
}

.hero-summary span,
.hero-summary small {
	display: block;
	color: #aec0d8;
}

.hero-summary strong {
	display: block;
	margin: 6px 0 4px;
	font-size: 38px;
	font-weight: 760;
}

.hero-summary small {
	font-size: 11px;
}

.stat-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin: 18px 0;
}

.stat-card {
	min-width: 0;
	padding: 19px 20px;
	border: 1px solid var(--line);
	border-radius: 13px;
	background: #fff;
	box-shadow: 0 4px 16px rgba(29, 45, 71, .035);
}

.stat-label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	color: var(--muted);
	font-size: 12px;
}

.stat-icon {
	display: grid;
	width: 28px;
	height: 28px;
	place-items: center;
	border-radius: 8px;
	background: var(--brand-faint);
	color: var(--brand);
	font-size: 11px;
	font-weight: 800;
}

.stat-value {
	display: block;
	margin-top: 11px;
	font-size: 27px;
	font-weight: 760;
	letter-spacing: -.5px;
}

.stat-note {
	display: block;
	margin-top: 5px;
	color: var(--subtle);
	font-size: 11px;
}

.overview-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr);
	gap: 18px;
}

.stack {
	display: grid;
	gap: 18px;
}

.panel {
	border: 1px solid var(--line);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 5px 20px rgba(29, 45, 71, .035);
}

.panel-head {
	display: flex;
	min-height: 61px;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 18px;
	border-bottom: 1px solid #edf1f5;
}

.panel-head h2,
.panel-head h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
}

.panel-head p {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 11px;
}

.panel-body {
	padding: 18px;
}

.domain-list,
.recommendation-list,
.policy-list,
.timeline {
	display: grid;
	gap: 0;
}

.domain-row,
.recommendation-row,
.policy-row {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 61px;
	padding: 10px 0;
	border-bottom: 1px solid #eef1f5;
}

.domain-row:last-child,
.recommendation-row:last-child,
.policy-row:last-child {
	border-bottom: 0;
}

.domain-symbol,
.recommendation-symbol,
.policy-symbol {
	display: grid;
	width: 36px;
	height: 36px;
	flex: 0 0 36px;
	place-items: center;
	border-radius: 10px;
	background: var(--brand-faint);
	color: var(--brand);
	font-size: 12px;
	font-weight: 800;
}

.recommendation-symbol.warning {
	background: var(--warning-soft);
	color: var(--warning);
}

.row-copy {
	min-width: 0;
	flex: 1;
}

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

.row-copy strong {
	overflow: hidden;
	font-size: 13px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.row-copy small {
	margin-top: 4px;
	color: var(--muted);
	font-size: 11px;
	line-height: 1.45;
}

.text-link {
	border: 0;
	background: transparent;
	color: var(--brand);
	cursor: pointer;
	font-size: 12px;
	white-space: nowrap;
}

.progress-block + .progress-block {
	margin-top: 19px;
}

.progress-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: 8px;
	font-size: 12px;
}

.progress-meta span {
	color: var(--muted);
}

progress {
	display: block;
	width: 100%;
	height: 8px;
	border: 0;
	border-radius: 999px;
	background: #edf1f6;
	overflow: hidden;
}

progress::-webkit-progress-bar {
	background: #edf1f6;
}

progress::-webkit-progress-value {
	border-radius: 999px;
	background: var(--brand);
}

progress::-moz-progress-bar {
	border-radius: 999px;
	background: var(--brand);
}

.toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 15px 17px;
	border-bottom: 1px solid #edf1f5;
}

.toolbar-filters {
	display: flex;
	min-width: 0;
	flex: 1;
	align-items: center;
	gap: 10px;
}

.search {
	position: relative;
	width: min(360px, 100%);
}

.search::before {
	position: absolute;
	top: 9px;
	left: 13px;
	color: #8996a8;
	content: '⌕';
	font-size: 17px;
}

.search input,
.filter-select {
	height: 40px;
	border: 1px solid var(--line-strong);
	border-radius: 9px;
	background: #fafbfd;
	color: var(--ink);
	outline: 0;
}

.search input {
	width: 100%;
	padding: 0 12px 0 38px;
}

.filter-select {
	min-width: 116px;
	padding: 0 31px 0 11px;
}

.search input:focus,
.filter-select:focus,
.field input:focus,
.field select:focus {
	border-color: #73a7ec;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(23, 105, 224, .09);
}

.directory-layout {
	display: grid;
	grid-template-columns: 230px minmax(0, 1fr);
}

.org-panel {
	min-height: 500px;
	padding: 17px 13px;
	border-right: 1px solid #edf1f5;
	background: #fbfcfe;
}

.org-title {
	margin: 0 7px 12px;
	color: var(--muted);
	font-size: 11px;
	font-weight: 700;
}

.org-tree {
	display: grid;
	gap: 4px;
}

.org-node {
	display: flex;
	align-items: center;
	gap: 9px;
	min-height: 39px;
	padding: 7px 9px;
	border-radius: 8px;
	color: #47576e;
}

.org-node.root {
	background: var(--brand-soft);
	color: var(--brand-strong);
	font-weight: 700;
}

.org-node.child {
	margin-left: 17px;
}

.org-node small {
	margin-left: auto;
	color: var(--subtle);
	font-size: 10px;
}

.table-wrap {
	overflow: auto;
}

table {
	width: 100%;
	min-width: 920px;
	border-collapse: collapse;
}

th {
	padding: 11px 15px;
	background: #f8fafc;
	color: #778397;
	font-size: 11px;
	font-weight: 650;
	text-align: left;
	white-space: nowrap;
}

td {
	padding: 14px 15px;
	border-top: 1px solid #edf1f5;
	font-size: 12px;
	vertical-align: middle;
}

tbody tr:hover {
	background: #fbfdff;
}

.identity {
	display: flex;
	align-items: center;
	gap: 10px;
}

.avatar {
	width: 36px;
	height: 36px;
	flex: 0 0 36px;
}

.identity strong,
.identity small {
	display: block;
	max-width: 230px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.identity strong {
	font-size: 13px;
}

.identity small {
	margin-top: 3px;
	color: var(--muted);
	font-size: 10px;
}

.badge,
.status {
	display: inline-flex;
	min-height: 24px;
	align-items: center;
	gap: 6px;
	padding: 0 8px;
	border-radius: 999px;
	background: #f0f3f7;
	color: #566477;
	font-size: 10px;
	font-weight: 650;
	white-space: nowrap;
}

.badge.super_admin {
	background: #e6edff;
	color: #264fa5;
}

.badge.admin {
	background: var(--brand-soft);
	color: var(--brand-strong);
}

.badge.user {
	background: #f2f4f7;
	color: #637083;
}

.status::before {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--success);
	content: '';
}

.status.inactive {
	color: #8793a4;
}

.status.inactive::before {
	background: #b4becb;
}

.status.pending {
	background: var(--warning-soft);
	color: var(--warning);
}

.status.pending::before {
	background: #d68a20;
}

.mailbox-chips {
	display: flex;
	max-width: 300px;
	flex-wrap: wrap;
	gap: 5px;
}

.mailbox-chip {
	display: inline-block;
	max-width: 230px;
	overflow: hidden;
	padding: 4px 7px;
	border-radius: 6px;
	background: #f0f5fc;
	color: #415a78;
	font-size: 10px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mailbox-empty,
.muted {
	color: var(--subtle);
}

.row-actions {
	display: flex;
	gap: 1px;
	white-space: nowrap;
}

.empty {
	padding: 58px 22px;
	text-align: center;
}

.empty-symbol {
	display: grid;
	width: 48px;
	height: 48px;
	margin: 0 auto 13px;
	place-items: center;
	border-radius: 13px;
	background: var(--brand-faint);
	color: var(--brand);
	font-size: 17px;
	font-weight: 800;
}

.empty h3 {
	margin: 0;
	font-size: 15px;
}

.empty p {
	max-width: 520px;
	margin: 8px auto 17px;
	color: var(--muted);
	font-size: 12px;
	line-height: 1.65;
}

.feature-note {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	margin-bottom: 16px;
	padding: 13px 15px;
	border: 1px solid #d7e7fb;
	border-radius: 11px;
	background: #f3f8ff;
	color: #425b7b;
	font-size: 12px;
	line-height: 1.6;
}

.feature-note strong {
	color: var(--brand-strong);
}

.domain-grid,
.policy-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 15px;
}

.domain-card,
.policy-card {
	padding: 19px;
	border: 1px solid var(--line);
	border-radius: 13px;
	background: #fff;
}

.domain-card-head,
.policy-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 13px;
}

.domain-card h3,
.policy-card h3 {
	margin: 0;
	font-size: 15px;
}

.domain-card p,
.policy-card p {
	margin: 6px 0 0;
	color: var(--muted);
	font-size: 11px;
	line-height: 1.6;
}

.domain-metrics {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin: 17px 0;
}

.domain-metric {
	padding: 10px;
	border-radius: 9px;
	background: #f7f9fc;
}

.domain-metric span,
.domain-metric strong {
	display: block;
}

.domain-metric span {
	color: var(--muted);
	font-size: 10px;
}

.domain-metric strong {
	margin-top: 4px;
	font-size: 15px;
}

.domain-checks {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.check-chip {
	padding: 5px 8px;
	border-radius: 7px;
	background: #f1f4f8;
	color: #6e7a8d;
	font-size: 10px;
}

.policy-card {
	min-height: 150px;
}

.policy-icon {
	display: grid;
	width: 39px;
	height: 39px;
	place-items: center;
	border-radius: 11px;
	background: var(--brand-soft);
	color: var(--brand);
	font-size: 13px;
	font-weight: 800;
}

.policy-value {
	display: block;
	margin-top: 20px;
	color: var(--success);
	font-size: 12px;
	font-weight: 700;
}

.timeline-item {
	position: relative;
	display: grid;
	grid-template-columns: 120px 28px minmax(0, 1fr);
	gap: 12px;
	min-height: 68px;
}

.timeline-time {
	padding-top: 2px;
	color: var(--muted);
	font-size: 10px;
	text-align: right;
}

.timeline-line {
	position: relative;
}

.timeline-line::before {
	position: absolute;
	top: 8px;
	bottom: -6px;
	left: 13px;
	width: 1px;
	background: #e3e8ef;
	content: '';
}

.timeline-item:last-child .timeline-line::before {
	display: none;
}

.timeline-dot {
	position: absolute;
	top: 2px;
	left: 7px;
	width: 13px;
	height: 13px;
	border: 3px solid #dceaff;
	border-radius: 50%;
	background: var(--brand);
}

.timeline-copy strong,
.timeline-copy small {
	display: block;
}

.timeline-copy strong {
	font-size: 12px;
}

.timeline-copy small {
	margin-top: 5px;
	color: var(--muted);
	font-size: 10px;
	line-height: 1.5;
}

.fatal {
	width: min(520px, calc(100% - 34px));
	margin: 90px auto;
	padding: 34px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 14px 42px rgba(22, 34, 54, .08);
	text-align: center;
}

.fatal h2 {
	margin: 0 0 9px;
}

.fatal p {
	color: var(--muted);
	line-height: 1.7;
}

.loading-mask {
	position: fixed;
	z-index: 100;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(245, 247, 250, .8);
	backdrop-filter: blur(3px);
}

.spinner {
	width: 38px;
	height: 38px;
	border: 4px solid #dce8f7;
	border-top-color: var(--brand);
	border-radius: 50%;
	animation: spin .75s linear infinite;
}

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

.sidebar-backdrop {
	display: none;
}

dialog {
	width: min(720px, calc(100% - 28px));
	max-height: calc(100dvh - 38px);
	padding: 0;
	border: 0;
	border-radius: 15px;
	box-shadow: 0 30px 90px rgba(15, 35, 70, .25);
}

dialog::backdrop {
	background: rgba(22, 32, 50, .47);
	backdrop-filter: blur(3px);
}

.dialog-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	padding: 18px 21px;
	border-bottom: 1px solid #e8edf3;
}

.dialog-header h2 {
	margin: 0;
	font-size: 18px;
}

.dialog-close {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 8px;
	background: #f2f5f8;
	color: #5d6b7f;
	cursor: pointer;
	font-size: 20px;
}

.dialog-body {
	max-height: calc(100dvh - 165px);
	overflow: auto;
	padding: 20px 21px;
}

.dialog-actions {
	display: flex;
	justify-content: flex-end;
	gap: 9px;
	padding: 14px 21px;
	border-top: 1px solid #e8edf3;
	background: #fafbfd;
}

.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.field.full {
	grid-column: 1 / -1;
}

.field label,
.group-label {
	display: block;
	margin: 0 0 7px;
	color: #44546b;
	font-size: 12px;
	font-weight: 680;
}

.field input,
.field select {
	width: 100%;
	height: 42px;
	padding: 0 11px;
	border: 1px solid var(--line-strong);
	border-radius: 9px;
	background: #fbfcfe;
	color: var(--ink);
	outline: 0;
}

.field input:disabled,
.field select:disabled {
	background: #f0f3f7;
	color: #8995a7;
}

.help {
	display: block;
	margin-top: 6px;
	color: #8a96a7;
	font-size: 10px;
	line-height: 1.55;
}

.mailbox-picker {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	max-height: 190px;
	overflow: auto;
	padding: 3px;
}

.mailbox-option {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 10px;
	border: 1px solid #dce4ee;
	border-radius: 9px;
	cursor: pointer;
}

.mailbox-option:has(input:checked) {
	border-color: #83afe9;
	background: #f1f7ff;
}

.mailbox-option input {
	margin-top: 2px;
	accent-color: var(--brand);
}

.mailbox-option span {
	min-width: 0;
}

.mailbox-option strong,
.mailbox-option small {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mailbox-option strong {
	font-size: 11px;
}

.mailbox-option small {
	margin-top: 3px;
	color: var(--muted);
	font-size: 9px;
}

.switch-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 13px;
	border: 1px solid #dce4ee;
	border-radius: 9px;
}

.switch-row input {
	width: 18px;
	height: 18px;
	accent-color: var(--brand);
}

.password-dialog,
.detail-dialog {
	width: min(480px, calc(100% - 28px));
}

.detail-list {
	display: grid;
	gap: 9px;
}

.detail-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 12px;
	border: 1px solid var(--line);
	border-radius: 9px;
	background: #fafbfd;
}

.detail-item strong,
.detail-item small {
	display: block;
}

.detail-item small {
	margin-top: 3px;
	color: var(--muted);
	font-size: 10px;
}

.toast {
	position: fixed;
	z-index: 200;
	right: 22px;
	bottom: 22px;
	max-width: min(420px, calc(100% - 36px));
	padding: 12px 16px;
	border-radius: 10px;
	background: #17233a;
	color: #fff;
	box-shadow: 0 14px 34px rgba(15, 23, 42, .24);
	font-size: 12px;
}

.toast.error {
	background: #991b2a;
}

.global-footer {
	padding: 24px 20px 0;
	color: #9aa5b5;
	font-size: 10px;
	text-align: center;
}

.global-footer a {
	color: inherit;
}

@media (max-width: 1100px) {
	.stat-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.overview-grid {
		grid-template-columns: 1fr;
	}

	.directory-layout {
		grid-template-columns: 190px minmax(0, 1fr);
	}
}

@media (max-width: 880px) {
	.sidebar {
		transform: translateX(-102%);
		box-shadow: 18px 0 50px rgba(18, 33, 61, .13);
		transition: transform .2s ease;
	}

	body.nav-open {
		overflow: hidden;
	}

	body.nav-open .sidebar {
		transform: translateX(0);
	}

	.sidebar-close,
	.menu-button {
		display: grid;
		place-items: center;
	}

	.sidebar-backdrop {
		position: fixed;
		z-index: 35;
		inset: 0;
		background: rgba(18, 30, 49, .35);
	}

	body.nav-open .sidebar-backdrop {
		display: block;
	}

	.workspace {
		margin-left: 0;
	}

	.directory-layout {
		grid-template-columns: 1fr;
	}

	.org-panel {
		display: none;
	}
}

@media (max-width: 680px) {
	.topbar {
		min-height: 58px;
		padding: 0 14px;
	}

	.topbar-actions .top-link-label {
		display: none;
	}

	.content {
		padding: 20px 13px 42px;
	}

	.page-heading {
		align-items: flex-start;
		flex-direction: column;
	}

	.page-heading .primary {
		width: 100%;
	}

	.hero-card {
		grid-template-columns: 1fr;
		padding: 24px 20px;
	}

	.hero-summary {
		display: none;
	}

	.toolbar,
	.toolbar-filters {
		align-items: stretch;
		flex-direction: column;
	}

	.search,
	.filter-select {
		width: 100%;
	}

	.domain-grid,
	.policy-grid {
		grid-template-columns: 1fr;
	}

	.form-grid,
	.mailbox-picker {
		grid-template-columns: 1fr;
	}

	.field.full {
		grid-column: auto;
	}

	.timeline-item {
		grid-template-columns: 28px minmax(0, 1fr);
	}

	.timeline-time {
		grid-column: 2;
		grid-row: 2;
		padding: 0 0 13px;
		text-align: left;
	}

	.timeline-line {
		grid-column: 1;
		grid-row: 1 / span 2;
	}

	.timeline-copy {
		grid-column: 2;
		grid-row: 1;
	}
}

@media (max-width: 460px) {
	.stat-grid {
		grid-template-columns: 1fr 1fr;
		gap: 9px;
	}

	.stat-card {
		padding: 15px;
	}

	.stat-value {
		font-size: 23px;
	}

	.domain-metrics {
		grid-template-columns: 1fr 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

/* Personal account portal */
.personal-shell {
	min-height: 100vh;
	background: var(--canvas);
}

.personal-topbar {
	position: sticky;
	z-index: 30;
	top: 0;
	display: flex;
	min-height: 66px;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 0 max(22px, calc((100vw - 1180px) / 2));
	border-bottom: 1px solid rgba(218, 225, 234, .92);
	background: rgba(255, 255, 255, .95);
	backdrop-filter: blur(14px);
}

.portal-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	text-decoration: none;
}

.portal-brand .brand-mark {
	width: 36px;
	height: 36px;
	flex-basis: 36px;
	background-size: 26px;
	box-shadow: none;
}

.portal-brand strong,
.portal-brand small {
	display: block;
}

.portal-brand strong {
	font-size: 14px;
}

.portal-brand small {
	margin-top: 2px;
	color: var(--muted);
	font-size: 9px;
}

.portal-nav {
	display: flex;
	align-items: center;
	gap: 7px;
}

.portal-nav a {
	display: inline-flex;
	min-height: 36px;
	align-items: center;
	padding: 0 12px;
	border-radius: 8px;
	color: #536176;
	font-size: 12px;
	text-decoration: none;
}

.portal-nav a:hover,
.portal-nav a.active {
	background: var(--brand-soft);
	color: var(--brand-strong);
}

.personal-content {
	width: min(1180px, calc(100% - 38px));
	margin: 0 auto;
	padding: 32px 0 56px;
}

.personal-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 28px;
	padding: clamp(24px, 4vw, 38px);
	border: 1px solid #dce6f4;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 12px 36px rgba(25, 48, 82, .06);
}

.personal-kicker {
	margin: 0 0 10px;
	color: var(--brand);
	font-size: 12px;
	font-weight: 750;
}

.personal-hero h1 {
	margin: 0;
	font-size: clamp(26px, 3vw, 34px);
	letter-spacing: -.6px;
}

.personal-hero p {
	margin: 10px 0 0;
	color: var(--muted);
	line-height: 1.7;
}

.personal-identity {
	display: flex;
	min-width: 250px;
	align-items: center;
	gap: 12px;
	padding: 15px;
	border-radius: 13px;
	background: var(--brand-faint);
}

.personal-avatar {
	display: grid;
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	place-items: center;
	border-radius: 14px;
	background: var(--brand);
	color: #fff;
	font-size: 18px;
	font-weight: 800;
}

.personal-identity strong,
.personal-identity small {
	display: block;
	max-width: 190px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.personal-identity small {
	margin-top: 5px;
	color: var(--muted);
	font-size: 10px;
}

.personal-stat-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin: 18px 0;
}

.personal-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(300px, .75fr);
	gap: 18px;
}

.personal-mailboxes {
	display: grid;
	gap: 10px;
}

.personal-mailbox {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
	border: 1px solid var(--line);
	border-radius: 11px;
	background: #fff;
}

.personal-mailbox-symbol {
	display: grid;
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	place-items: center;
	border-radius: 11px;
	background: var(--brand-soft);
	color: var(--brand);
	font-weight: 800;
}

.personal-mailbox-copy {
	min-width: 0;
	flex: 1;
}

.personal-mailbox-copy strong,
.personal-mailbox-copy small {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.personal-mailbox-copy small {
	margin-top: 4px;
	color: var(--muted);
	font-size: 10px;
}

.profile-list {
	display: grid;
	gap: 0;
}

.profile-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	min-height: 52px;
	padding: 12px 0;
	border-bottom: 1px solid #eef1f5;
}

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

.profile-row span {
	color: var(--muted);
	font-size: 11px;
}

.profile-row strong {
	max-width: 65%;
	overflow-wrap: anywhere;
	font-size: 12px;
	text-align: right;
}

.personal-actions {
	display: grid;
	gap: 9px;
}

.personal-action {
	display: flex;
	min-height: 50px;
	align-items: center;
	gap: 11px;
	padding: 0 13px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #fff;
	color: #42536b;
	cursor: pointer;
	text-align: left;
}

.personal-action:hover {
	border-color: #b8cceb;
	background: var(--brand-faint);
	color: var(--brand);
}

.personal-action span:last-child {
	margin-left: auto;
}

/* Personal anti-spam portal */
.antispam-content {
	max-width: 1180px;
}

.antispam-hero {
	background: linear-gradient(135deg, #fff 0%, #f5f9ff 100%);
}

.antispam-shield {
	display: grid;
	width: 130px;
	height: 130px;
	place-items: center;
	border: 1px solid #cfe1fb;
	border-radius: 36% 36% 48% 48%;
	background: #eaf3ff;
	color: var(--brand);
	font-size: 38px;
	font-weight: 850;
	box-shadow: inset 0 0 0 9px rgba(255, 255, 255, .64);
}

.antispam-shield span {
	display: block;
	margin-top: -31px;
	color: #6080a8;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
}

.antispam-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	align-items: start;
	gap: 18px;
}

.antispam-mailbox-list {
	display: grid;
	gap: 13px;
}

.antispam-mailbox-card {
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 13px;
	background: #fff;
}

.antispam-mailbox-card > header {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 14px 16px;
	border-bottom: 1px solid #edf1f6;
	background: #fbfcfe;
}

.antispam-mailbox-icon {
	display: grid;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	place-items: center;
	border-radius: 10px;
	background: var(--brand-soft);
	color: var(--brand);
	font-size: 13px;
	font-weight: 800;
}

.antispam-mailbox-copy {
	min-width: 0;
	flex: 1;
}

.antispam-mailbox-copy strong,
.antispam-mailbox-copy small {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.antispam-mailbox-copy strong {
	font-size: 13px;
}

.antispam-mailbox-copy small {
	margin-top: 4px;
	color: var(--muted);
	font-size: 10px;
}

.antispam-score-form {
	padding: 17px 16px 15px;
}

.antispam-score-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 13px;
}

.antispam-score-fields label {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 82px;
	align-items: center;
	gap: 4px 10px;
	padding: 13px;
	border: 1px solid #e1e7ef;
	border-radius: 10px;
	background: #fafbfd;
}

.antispam-score-fields label > span {
	font-size: 12px;
	font-weight: 750;
}

.antispam-score-fields label > small {
	grid-column: 1;
	color: var(--muted);
	font-size: 9px;
	line-height: 1.5;
}

.antispam-score-fields input {
	grid-column: 2;
	grid-row: 1 / span 2;
	width: 82px;
	height: 40px;
	padding: 0 9px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	color: var(--ink);
	font-size: 15px;
	font-weight: 750;
	text-align: center;
}

.antispam-score-preview {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	overflow: hidden;
	margin-top: 14px;
	border-radius: 8px;
	font-size: 10px;
	font-weight: 750;
	text-align: center;
}

.antispam-score-preview span {
	padding: 8px 5px;
}

.antispam-score-preview .safe {
	background: #e9f8f0;
	color: #187248;
}

.antispam-score-preview .caution {
	background: #fff5d9;
	color: #956115;
}

.antispam-score-preview .danger {
	background: #fff0f1;
	color: #b73543;
}

.antispam-score-form footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 14px;
}

.antispam-score-form footer small {
	color: var(--muted);
	font-size: 9px;
}

.antispam-score-form footer button {
	min-width: 105px;
}

.antispam-readonly-note {
	padding: 18px 16px;
	background: #fafbfd;
}

.antispam-readonly-note strong {
	font-size: 12px;
}

.antispam-readonly-note p {
	margin: 6px 0 0;
	color: var(--muted);
	font-size: 11px;
	line-height: 1.65;
}

.antispam-readonly-note a {
	display: inline-flex;
	margin-top: 11px;
	color: var(--brand);
	font-size: 11px;
	font-weight: 700;
	text-decoration: none;
}

.antispam-guide {
	position: sticky;
	top: 84px;
}

.antispam-guide-list {
	display: grid;
	gap: 13px;
}

.antispam-guide-item {
	display: grid;
	grid-template-columns: 9px minmax(0, 1fr);
	gap: 11px;
	padding-bottom: 13px;
	border-bottom: 1px solid #eef1f5;
}

.antispam-guide-item > span {
	width: 9px;
	height: 38px;
	border-radius: 999px;
}

.antispam-guide-item.safe > span { background: #46b77d; }
.antispam-guide-item.caution > span { background: #e5ae3d; }
.antispam-guide-item.danger > span { background: #df6470; }

.antispam-guide-item strong {
	font-size: 12px;
}

.antispam-guide-item p {
	margin: 5px 0 0;
	color: var(--muted);
	font-size: 10px;
	line-height: 1.65;
}

.antispam-warning {
	margin: 0;
	padding: 13px;
	border: 1px solid #f0dfb5;
	border-radius: 9px;
	background: #fffaf0;
	color: #77613d;
	font-size: 10px;
	line-height: 1.7;
}

.stat-icon.success {
	background: var(--success-soft);
	color: var(--success);
}

.stat-icon.danger {
	background: var(--danger-soft);
	color: var(--danger);
}

.antispam-policy-panel {
	overflow: visible;
}

.antispam-policy-head {
	align-items: flex-end;
}

.antispam-mailbox-picker {
	display: grid;
	min-width: min(330px, 46%);
	gap: 6px;
}

.antispam-mailbox-picker span {
	color: var(--muted);
	font-size: 10px;
	font-weight: 700;
}

.antispam-mailbox-picker select {
	width: 100%;
	height: 38px;
	padding: 0 34px 0 10px;
	border: 1px solid var(--line-strong);
	border-radius: 8px;
	background: #fff;
	color: var(--ink);
	font-size: 11px;
}

.antispam-policy-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.antispam-policy-list-card {
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: #fff;
}

.antispam-policy-list-card > header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px;
	border-bottom: 1px solid var(--line);
	background: #fbfcfe;
}

.antispam-policy-list-card > header > div {
	min-width: 0;
	flex: 1;
}

.antispam-policy-list-card h3,
.antispam-policy-list-card p {
	margin: 0;
}

.antispam-policy-list-card h3 {
	font-size: 13px;
}

.antispam-policy-list-card p {
	margin-top: 3px;
	color: var(--muted);
	font-size: 9px;
	line-height: 1.45;
}

.antispam-policy-list-card > header > strong {
	display: inline-flex;
	min-width: 27px;
	height: 27px;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: #eef2f7;
	color: #59697e;
	font-size: 11px;
}

.antispam-policy-mark {
	display: grid;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	place-items: center;
	border-radius: 9px;
	font-size: 11px;
	font-weight: 850;
}

.whitelist .antispam-policy-mark {
	background: var(--success-soft);
	color: var(--success);
}

.blacklist .antispam-policy-mark {
	background: var(--danger-soft);
	color: var(--danger);
}

.antispam-policy-form {
	display: flex;
	gap: 7px;
	padding: 12px;
	border-bottom: 1px solid #edf1f5;
}

.antispam-policy-form input {
	min-width: 0;
	height: 38px;
	flex: 1;
	padding: 0 10px;
	border: 1px solid var(--line-strong);
	border-radius: 8px;
	background: #fbfcfe;
	color: var(--ink);
	font-size: 11px;
}

.antispam-policy-form input:focus {
	border-color: #73a7ec;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(23, 105, 224, .09);
	outline: 0;
}

.antispam-policy-form button {
	min-width: 66px;
	height: 38px;
}

.antispam-blacklist-form {
	display: grid;
	gap: 9px;
}

.antispam-action-choice {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 7px;
}

.antispam-action-choice label {
	position: relative;
	display: block;
	cursor: pointer;
}

.antispam-action-choice input[type="radio"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.antispam-action-choice label > span {
	display: flex;
	min-height: 43px;
	align-items: center;
	justify-content: space-between;
	gap: 5px;
	padding: 7px 9px;
	border: 1px solid var(--line-strong);
	border-radius: 8px;
	background: #fbfcfe;
	color: #43536a;
	font-size: 10px;
	font-weight: 750;
	transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.antispam-action-choice label > span small {
	color: var(--muted);
	font-size: 8px;
	font-weight: 650;
}

.antispam-action-choice input:checked + span {
	border-color: #6d9ff0;
	background: #eef5ff;
	box-shadow: 0 0 0 2px rgba(23, 105, 224, .08);
	color: var(--primary);
}

.antispam-action-choice input:focus-visible + span {
	outline: 2px solid rgba(23, 105, 224, .35);
	outline-offset: 2px;
}

.antispam-policy-input-row {
	display: flex;
	gap: 7px;
}

.antispam-policy-input-row > input {
	min-width: 0;
	flex: 1;
}

.antispam-policy-items {
	display: grid;
}

.antispam-policy-item {
	display: flex;
	min-height: 55px;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border-bottom: 1px solid #f0f3f7;
}

.antispam-policy-item:last-child {
	border-bottom: 0;
}

.antispam-policy-sender {
	min-width: 0;
	flex: 1;
}

.antispam-policy-sender strong,
.antispam-policy-sender small {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.antispam-policy-sender strong {
	font-size: 11px;
}

.antispam-policy-sender small {
	margin-top: 3px;
	color: var(--muted);
	font-size: 9px;
}

.antispam-policy-delete {
	min-height: 29px;
	padding: 0 8px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	cursor: pointer;
	font-size: 10px;
}

.antispam-policy-action-label {
	display: inline-flex;
	min-height: 27px;
	align-items: center;
	padding: 0 8px;
	border-radius: 999px;
	background: #f2f5f9;
	color: #607086;
	font-size: 9px;
	font-weight: 720;
	white-space: nowrap;
}

.antispam-policy-action-editor {
	flex: 0 0 auto;
}

.antispam-policy-action-select {
	width: 104px;
	height: 30px;
	padding: 0 26px 0 8px;
	border: 1px solid var(--line-strong);
	border-radius: 7px;
	background: #fff;
	color: #43536a;
	font-size: 9px;
	font-weight: 700;
}

.antispam-policy-action-select:focus {
	border-color: #73a7ec;
	box-shadow: 0 0 0 3px rgba(23, 105, 224, .09);
	outline: 0;
}

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

.antispam-policy-empty {
	display: grid;
	min-height: 142px;
	place-items: center;
	align-content: center;
	gap: 5px;
	padding: 20px;
	color: var(--muted);
	text-align: center;
}

.antispam-policy-empty > span {
	display: grid;
	width: 32px;
	height: 32px;
	place-items: center;
	border-radius: 50%;
	background: #f0f4f8;
	color: #7e8c9f;
	font-size: 12px;
}

.antispam-policy-empty strong {
	color: #536176;
	font-size: 11px;
}

.antispam-policy-empty small {
	font-size: 9px;
	line-height: 1.55;
}

/* Personal self-service query */
.self-service-content {
	max-width: 1160px;
}

.self-service-hero {
	align-items: center;
	background: linear-gradient(135deg, #fff 0%, #f3f8ff 100%);
}

.self-service-hero .primary {
	min-width: 108px;
}

.self-service-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr);
	align-items: start;
	gap: 18px;
}

.self-service-mailboxes {
	display: grid;
	gap: 9px;
}

.self-service-mailbox {
	display: flex;
	min-height: 62px;
	align-items: center;
	gap: 11px;
	padding: 11px 13px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #fbfcfe;
}

.self-service-mailbox-state {
	width: 9px;
	height: 9px;
	flex: 0 0 9px;
	border-radius: 50%;
	background: #9ba7b6;
	box-shadow: 0 0 0 4px #edf0f4;
}

.self-service-mailbox-state.online {
	background: var(--success);
	box-shadow: 0 0 0 4px var(--success-soft);
}

.self-service-mailbox-copy {
	min-width: 0;
	flex: 1;
}

.self-service-mailbox-copy strong,
.self-service-mailbox-copy small {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.self-service-mailbox-copy strong {
	font-size: 12px;
}

.self-service-mailbox-copy small {
	margin-top: 4px;
	color: var(--muted);
	font-size: 9px;
}

.self-service-action {
	text-decoration: none;
}

/* Platform operations portal */
.portal-platform {
	--brand: #087f7a;
	--brand-strong: #06645f;
	--brand-soft: #e8f7f5;
	--brand-faint: #f2fbfa;
}

.portal-platform .brand-mark {
	background: transparent url('/snappymail/v/2.38.2/themes/DingGuagua/images/dgg-mail-mark.svg?v=brand-20260727-1922') center / 40px 40px no-repeat;
	box-shadow: none;
	filter: drop-shadow(0 7px 12px rgba(37, 99, 235, .24));
}

.portal-platform .sidebar {
	background: #10242b;
	border-right-color: #18343d;
}

.portal-platform .sidebar-head,
.portal-platform .sidebar-foot {
	border-color: #213a43;
}

.portal-platform .brand-copy strong {
	color: #f3f8fa;
}

.portal-platform .brand-copy small,
.portal-platform .nav-label {
	color: #78939b;
}

.portal-platform .nav-item {
	color: #b9c9cd;
}

.portal-platform .nav-item:hover {
	background: #18343d;
	color: #fff;
}

.portal-platform .nav-item.active {
	background: #16443f;
	color: #d9fffa;
}

.portal-platform .nav-icon {
	background: #1c3841;
	color: #91a7ad;
}

.portal-platform .nav-item.active .nav-icon {
	background: #17615a;
	color: #d9fffa;
}

.portal-platform .nav-count {
	background: #1b3740;
	color: #a6bac0;
}

.portal-platform .service-state {
	color: #91a7ad;
}

.portal-platform .actor-card {
	background: #18333b;
}

.portal-platform .actor-avatar {
	background: #17615a;
	color: #e1fffb;
}

.portal-platform .actor-copy strong {
	color: #eef7f8;
}

.portal-platform .actor-copy small {
	color: #8ba2a8;
}

.portal-platform .hero-card {
	background: #11323b;
}

.platform-tag {
	display: inline-flex;
	min-height: 24px;
	align-items: center;
	padding: 0 9px;
	border-radius: 999px;
	background: #e7f7f4;
	color: #087f7a;
	font-size: 10px;
	font-weight: 750;
}

.service-dot.inactive {
	background: var(--warning);
	box-shadow: 0 0 0 4px var(--warning-soft);
}

.input-with-suffix {
	display: flex;
	align-items: stretch;
}

.input-with-suffix input {
	min-width: 0;
	border-radius: 9px 0 0 9px;
}

.input-with-suffix span {
	display: inline-flex;
	align-items: center;
	padding: 0 12px;
	border: 1px solid var(--line-strong);
	border-left: 0;
	border-radius: 0 9px 9px 0;
	background: #f3f6f9;
	color: var(--muted);
	font-size: 12px;
	white-space: nowrap;
}

.service-list {
	display: grid;
	gap: 9px;
}

.service-card {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 13px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #fafcfd;
}

.service-card .service-dot {
	margin: 0 4px;
}

.service-card strong,
.service-card small {
	display: block;
}

.service-card small {
	margin-top: 4px;
	color: var(--muted);
	font-size: 10px;
}

.platform-scope-note {
	padding: 16px;
	border: 1px solid #cfe7e4;
	border-radius: 12px;
	background: #f1faf9;
	color: #3c625f;
	font-size: 12px;
	line-height: 1.65;
}

@media (max-width: 820px) {
	.personal-grid {
		grid-template-columns: 1fr;
	}

	.self-service-grid {
		grid-template-columns: 1fr;
	}

	.antispam-layout {
		grid-template-columns: 1fr;
	}

	.antispam-policy-grid {
		grid-template-columns: 1fr;
	}

	.antispam-guide {
		position: static;
	}
}

@media (max-width: 680px) {
	.personal-topbar {
		min-height: 58px;
		padding: 0 14px;
	}

	.portal-brand small,
	.portal-nav .optional-label {
		display: none;
	}

	.portal-nav {
		gap: 2px;
	}

	.portal-nav a {
		padding: 0 9px;
	}

	.personal-content {
		width: calc(100% - 26px);
		padding-top: 20px;
	}

	.personal-hero {
		grid-template-columns: 1fr;
	}

	.personal-identity {
		min-width: 0;
	}

	.self-service-hero {
		align-items: stretch;
		flex-direction: column;
	}

	.personal-stat-grid {
		grid-template-columns: 1fr 1fr;
	}

	.antispam-shield {
		display: none;
	}

	.antispam-policy-head {
		align-items: stretch;
		flex-direction: column;
	}

	.antispam-mailbox-picker {
		width: 100%;
		min-width: 0;
	}

	.antispam-score-fields {
		grid-template-columns: 1fr;
	}

	.antispam-score-form footer {
		align-items: stretch;
		flex-direction: column;
	}

	.antispam-policy-item {
		flex-wrap: wrap;
	}

	.antispam-policy-sender {
		flex-basis: calc(100% - 55px);
	}
}

/* Contacts */
.org-cell {
	display: flex;
	min-width: 120px;
	flex-direction: column;
	gap: 4px;
}

.org-cell strong,
.org-cell small {
	display: block;
	max-width: 240px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.org-cell strong {
	color: #334155;
	font-size: 12px;
}

.org-cell small {
	color: var(--muted);
	font-size: 10px;
}

.contacts-shell {
	min-height: 100dvh;
}

.contacts-topbar {
	position: sticky;
	top: 0;
	z-index: 20;
}

.contacts-content {
	width: min(1240px, calc(100% - 48px));
	margin: 0 auto;
	padding: 30px 0 46px;
}

.contacts-hero {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	padding: 27px 30px;
	border: 1px solid #dbe5f0;
	border-radius: 16px;
	background: linear-gradient(130deg, #fff 0%, #f5f9ff 70%, #edf5ff 100%);
	box-shadow: var(--shadow-sm);
}

.contacts-hero h1 {
	margin: 4px 0 8px;
	font-size: clamp(27px, 3vw, 36px);
	letter-spacing: -.7px;
}

.contacts-hero p:last-child {
	margin: 0;
	color: var(--muted);
	line-height: 1.65;
}

.contacts-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin: 22px 0 14px;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: #fff;
	box-shadow: var(--shadow-sm);
}

.contacts-search {
	width: min(470px, 100%);
}

.contacts-tabs {
	display: flex;
	gap: 5px;
	padding: 4px;
	border-radius: 10px;
	background: #f1f5f9;
}

.contacts-tab {
	min-height: 34px;
	padding: 0 13px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	font-size: 12px;
	font-weight: 680;
}

.contacts-tab span {
	display: inline-flex;
	min-width: 19px;
	height: 19px;
	align-items: center;
	justify-content: center;
	margin-left: 4px;
	padding: 0 5px;
	border-radius: 999px;
	background: #e2e8f0;
	font-size: 10px;
}

.contacts-tab.active {
	background: #fff;
	box-shadow: 0 2px 7px rgba(35, 55, 80, .09);
	color: var(--brand);
}

.contacts-tab.active span {
	background: var(--brand-soft);
	color: var(--brand);
}

.contacts-section {
	display: grid;
	gap: 16px;
}

.contacts-summary {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 13px 16px;
	border: 1px solid #d8e7fa;
	border-radius: 11px;
	background: #f4f8fe;
}

.contacts-summary-mark {
	display: inline-flex;
	width: 34px;
	height: 34px;
	align-items: center;
	justify-content: center;
	border-radius: 9px;
	background: var(--brand);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
}

.contacts-summary strong,
.contacts-summary small {
	display: block;
}

.contacts-summary small {
	margin-top: 3px;
	color: var(--muted);
	font-size: 10px;
}

.contact-panel {
	overflow: hidden;
}

.contacts-table {
	min-width: 850px;
}

.contact-email-list {
	display: grid;
	min-width: 250px;
	gap: 7px;
}

.contact-email-list > span {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.contact-email-list strong,
.contact-email-list small {
	display: block;
}

.contact-email-list strong,
.contact-address {
	color: #234265;
	font-size: 12px;
}

.contact-email-list small {
	margin-top: 2px;
	color: var(--muted);
	font-size: 9px;
}

.contact-copy {
	min-height: 26px;
	font-size: 10px;
}

.secondary.compact {
	min-height: 30px;
	padding: 0 10px;
	font-size: 11px;
	white-space: nowrap;
}

.mailbox-avatar {
	background: #edf2f8;
	color: #506680;
}

.external-avatar {
	background: #eaf7f0;
	color: #168454;
}

.danger-text {
	color: #c24141;
}

.danger-text:hover {
	background: #fff0f0;
	color: #a92828;
}

.field textarea {
	width: 100%;
	min-height: 96px;
	padding: 10px 11px;
	resize: vertical;
	border: 1px solid var(--line-strong);
	border-radius: 9px;
	background: #fbfcfe;
	color: var(--ink);
	font: inherit;
	line-height: 1.55;
	outline: 0;
}

.field textarea:focus {
	border-color: #73a7ec;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(23, 105, 224, .09);
}

.clipboard-fallback {
	position: fixed;
	top: -1000px;
	left: -1000px;
}

@media (max-width: 760px) {
	.contacts-content {
		width: calc(100% - 26px);
		padding-top: 20px;
	}

	.contacts-hero {
		align-items: stretch;
		flex-direction: column;
		padding: 22px 20px;
	}

	.contacts-toolbar {
		align-items: stretch;
		flex-direction: column;
	}

	.contacts-tabs {
		width: 100%;
	}

	.contacts-tab {
		flex: 1;
	}
}

/* Inbox-style contact list */
.contacts-mail-body {
	height: 100dvh;
	overflow: hidden;
	background: #eef3f9;
}

.contacts-mail-shell {
	display: grid;
	height: 100dvh;
	grid-template-columns: 218px minmax(0, 1fr);
}

.contacts-mail-sidebar {
	display: flex;
	min-width: 0;
	flex-direction: column;
	border-right: 1px solid #dce5ef;
	background: #edf3fa;
}

.contacts-mail-brand {
	display: flex;
	min-height: 68px;
	align-items: center;
	gap: 10px;
	padding: 12px 18px;
	color: var(--ink);
	text-decoration: none;
}

.contacts-mail-brand .brand-mark {
	width: 37px;
	height: 37px;
	flex-basis: 37px;
	border-radius: 10px;
	background-size: 27px;
}

.contacts-mail-brand strong,
.contacts-mail-brand small {
	display: block;
}

.contacts-mail-brand strong {
	font-size: 15px;
}

.contacts-mail-brand small {
	margin-top: 2px;
	color: var(--brand);
	font-size: 8px;
	font-weight: 800;
	letter-spacing: 2px;
}

.contacts-back-mail {
	display: flex;
	min-height: 42px;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 12px 17px;
	border-radius: 7px;
	background: var(--brand);
	box-shadow: 0 6px 15px rgba(23, 105, 224, .18);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.contacts-back-mail:hover {
	background: var(--brand-strong);
}

.contacts-back-mail span:first-child {
	font-size: 17px;
	line-height: 1;
}

.contacts-mail-nav {
	flex: 1;
	padding: 0 10px;
}

.contacts-mail-nav > p {
	margin: 0 10px 7px;
	color: #8b99aa;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .5px;
}

.contacts-mail-nav button {
	display: grid;
	width: 100%;
	min-height: 42px;
	align-items: center;
	gap: 9px;
	margin: 2px 0;
	padding: 0 10px;
	grid-template-columns: 25px minmax(0, 1fr) auto;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: #41536b;
	cursor: pointer;
	font-size: 12px;
	text-align: left;
}

.contacts-mail-nav button:hover {
	background: rgba(255, 255, 255, .68);
}

.contacts-mail-nav button.active {
	background: #dceaff;
	color: #1258bd;
	font-weight: 700;
}

.contacts-mail-nav button > span:nth-child(2) {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.contacts-mail-nav button strong {
	min-width: 23px;
	padding: 2px 5px;
	border-radius: 10px;
	background: rgba(74, 95, 121, .09);
	font-size: 9px;
	font-weight: 700;
	text-align: center;
}

.contacts-mail-nav button.active strong {
	background: rgba(23, 105, 224, .11);
}

.contacts-nav-icon {
	display: inline-flex;
	width: 24px;
	height: 24px;
	align-items: center;
	justify-content: center;
	border-radius: 7px;
	background: rgba(255, 255, 255, .75);
	color: #536a86;
	font-size: 10px;
	font-weight: 800;
}

.contacts-mail-nav button.active .contacts-nav-icon {
	background: #fff;
	color: var(--brand);
}

.contacts-mail-account {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 10px;
	padding: 12px 10px;
	border-top: 1px solid #d8e2ed;
}

.contacts-mail-account > span {
	display: inline-flex;
	width: 31px;
	height: 31px;
	align-items: center;
	justify-content: center;
	flex: 0 0 31px;
	border-radius: 50%;
	background: var(--brand);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
}

.contacts-mail-account div {
	min-width: 0;
}

.contacts-mail-account strong,
.contacts-mail-account small {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.contacts-mail-account strong {
	font-size: 11px;
}

.contacts-mail-account small {
	margin-top: 3px;
	color: var(--muted);
	font-size: 9px;
}

.contacts-mail-main {
	display: flex;
	min-width: 0;
	min-height: 0;
	flex-direction: column;
}

.contacts-mail-topbar {
	display: flex;
	min-height: 60px;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 9px 20px;
	border-bottom: 1px solid #e3e9f0;
	background: #f7f9fc;
}

.contacts-mail-search {
	display: flex;
	width: min(560px, 62vw);
	height: 38px;
	align-items: center;
	gap: 8px;
	padding: 0 13px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: #e9eef5;
	color: #7a899c;
}

.contacts-mail-search:focus-within {
	border-color: #9fc1ed;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(23, 105, 224, .08);
}

.contacts-mail-search input {
	width: 100%;
	border: 0;
	background: transparent;
	color: var(--ink);
	font-size: 12px;
	outline: 0;
}

.contacts-mail-topbar > a {
	color: #52647b;
	font-size: 11px;
	text-decoration: none;
}

.contacts-mail-topbar > a:hover {
	color: var(--brand);
}

.contacts-list-pane {
	display: flex;
	min-width: 0;
	min-height: 0;
	flex: 1;
	flex-direction: column;
	margin: 12px;
	overflow: hidden;
	border: 1px solid #e0e7ef;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 5px 18px rgba(38, 59, 82, .05);
}

.contacts-list-toolbar {
	display: flex;
	min-height: 61px;
	align-items: center;
	gap: 17px;
	padding: 9px 14px;
	border-bottom: 1px solid #e8edf3;
}

.contacts-list-heading {
	display: flex;
	min-width: 245px;
	align-items: center;
	gap: 11px;
}

.contacts-list-heading h1 {
	margin: 0;
	font-size: 15px;
	letter-spacing: -.1px;
}

.contacts-list-heading p {
	max-width: 360px;
	margin: 3px 0 0;
	overflow: hidden;
	color: var(--muted);
	font-size: 9px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.contacts-select-all,
.contacts-row-checkbox {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.contacts-select-all input,
.contacts-row-checkbox input {
	width: 15px;
	height: 15px;
	margin: 0;
	accent-color: var(--brand);
	cursor: pointer;
}

.contacts-select-all input:disabled {
	cursor: not-allowed;
	opacity: .38;
}

.contacts-list-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.contacts-list-actions button,
.contacts-row-actions button,
.contacts-list-empty button {
	display: inline-flex;
	min-height: 31px;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 0 10px;
	border: 1px solid #d8e0ea;
	border-radius: 6px;
	background: #fff;
	color: #34465e;
	cursor: pointer;
	font-size: 10px;
	font-weight: 650;
}

.contacts-list-actions button:hover:not(:disabled),
.contacts-row-actions button:hover {
	border-color: #aac7ec;
	background: #f4f8fe;
	color: var(--brand);
}

.contacts-list-actions button:disabled {
	cursor: not-allowed;
	opacity: .4;
}

.contacts-list-actions button.danger:hover:not(:disabled),
.contacts-row-actions button.danger:hover {
	border-color: #efb9c0;
	background: var(--danger-soft);
	color: var(--danger);
}

.contacts-list-actions button span,
.contacts-row-actions button span {
	font-size: 13px;
	line-height: 1;
}

.contacts-list-result {
	margin-left: auto;
	color: var(--muted);
	font-size: 10px;
	white-space: nowrap;
}

.contacts-list-columns,
.contacts-list-row {
	display: grid;
	min-width: 1020px;
	grid-template-columns: 42px minmax(170px, 1.1fr) minmax(180px, 1fr) minmax(230px, 1.35fr) minmax(160px, .9fr) minmax(170px, .85fr);
}

.contacts-list-columns {
	min-height: 34px;
	align-items: center;
	padding: 0 10px;
	border-bottom: 1px solid #e8edf3;
	background: #f8fafc;
	color: #8a96a7;
	font-size: 9px;
	font-weight: 700;
}

.contacts-list-scroll {
	min-width: 0;
	min-height: 0;
	flex: 1;
	overflow: auto;
}

.contacts-list-group {
	display: flex;
	min-width: 1020px;
	min-height: 32px;
	align-items: center;
	gap: 7px;
	padding: 0 15px;
	border-bottom: 1px solid #e7edf4;
	background: #f4f7fb;
	color: #394b62;
	font-size: 10px;
}

.contacts-list-group span {
	color: var(--muted);
	font-size: 9px;
}

.contacts-list-row {
	min-height: 57px;
	align-items: center;
	padding: 5px 10px;
	border-bottom: 1px solid #edf1f5;
	background: #fff;
	transition: background-color .12s ease;
}

.contacts-list-row:hover {
	background: #f8fbff;
}

.contacts-list-row.selected {
	background: #edf5ff;
}

.contacts-external-row {
	cursor: default;
}

.contacts-external-row:focus-visible {
	position: relative;
	z-index: 1;
	outline: 2px solid rgba(23, 105, 224, .35);
	outline-offset: -2px;
}

.contacts-row-readonly {
	display: inline-flex;
	width: 20px;
	height: 20px;
	align-items: center;
	justify-content: center;
	justify-self: center;
	border-radius: 6px;
	background: #edf2f7;
	color: #758499;
	font-size: 8px;
	font-weight: 800;
}

.contacts-row-readonly.mailbox {
	color: #3c6caa;
}

.contacts-person {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 9px;
	padding-right: 14px;
}

.contacts-person > span:last-child,
.contacts-stacked {
	min-width: 0;
}

.contacts-list-avatar {
	display: inline-flex;
	width: 31px;
	height: 31px;
	align-items: center;
	justify-content: center;
	flex: 0 0 31px;
	border-radius: 8px;
	background: #e8f1ff;
	color: var(--brand);
	font-size: 11px;
	font-weight: 800;
}

.contacts-list-avatar.external {
	background: #e9f7f0;
	color: #148454;
}

.contacts-list-avatar.mailbox {
	background: #eef1f5;
	color: #576d88;
}

.contacts-person strong,
.contacts-person small,
.contacts-stacked strong,
.contacts-stacked small {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.contacts-person strong,
.contacts-stacked strong {
	color: #2b3b50;
	font-size: 10px;
	font-weight: 680;
}

.contacts-person small,
.contacts-stacked small {
	margin-top: 3px;
	color: #919bab;
	font-size: 8px;
}

.contacts-address {
	color: #234b78 !important;
}

.contacts-row-actions {
	display: flex;
	align-items: center;
	gap: 5px;
	padding-left: 4px;
}

.contacts-row-actions button {
	min-height: 27px;
	padding: 0 8px;
	font-size: 9px;
}

.contacts-list-empty {
	margin: auto;
	padding: 50px 20px;
	color: var(--muted);
	text-align: center;
}

.contacts-list-empty > span {
	display: inline-flex;
	width: 50px;
	height: 50px;
	align-items: center;
	justify-content: center;
	border-radius: 15px;
	background: var(--brand-soft);
	color: var(--brand);
	font-size: 15px;
	font-weight: 800;
}

.contacts-list-empty h2 {
	margin: 14px 0 7px;
	color: var(--ink);
	font-size: 16px;
}

.contacts-list-empty p {
	margin: 0 0 18px;
	font-size: 11px;
}

.contacts-list-empty button {
	border-color: var(--brand);
	background: var(--brand);
	color: #fff;
}

.contacts-mail-shell.is-busy .contacts-list-pane {
	pointer-events: none;
	opacity: .72;
}

@media (max-width: 900px) {
	.contacts-mail-shell {
		grid-template-columns: 190px minmax(0, 1fr);
	}

	.contacts-list-toolbar {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.contacts-list-result {
		align-self: center;
	}
}

@media (max-width: 680px) {
	.contacts-mail-body {
		height: auto;
		min-height: 100dvh;
		overflow: auto;
	}

	.contacts-mail-shell {
		display: flex;
		height: auto;
		min-height: 100dvh;
		flex-direction: column;
	}

	.contacts-mail-sidebar {
		min-height: auto;
		border-right: 0;
		border-bottom: 1px solid #dce5ef;
	}

	.contacts-mail-brand {
		min-height: 56px;
		padding: 8px 14px;
	}

	.contacts-mail-brand .brand-mark {
		width: 33px;
		height: 33px;
		flex-basis: 33px;
	}

	.contacts-back-mail {
		position: absolute;
		top: 11px;
		right: 12px;
		min-height: 34px;
		margin: 0;
		padding: 0 11px;
	}

	.contacts-mail-nav {
		display: flex;
		gap: 5px;
		padding: 6px 9px 10px;
	}

	.contacts-mail-nav > p,
	.contacts-mail-account {
		display: none;
	}

	.contacts-mail-nav button {
		flex: 1;
		grid-template-columns: 24px minmax(0, 1fr) auto;
	}

	.contacts-mail-main {
		min-height: calc(100dvh - 108px);
	}

	.contacts-mail-topbar {
		min-height: 54px;
		padding: 8px 10px;
	}

	.contacts-mail-search {
		width: 100%;
	}

	.contacts-mail-topbar > a {
		display: none;
	}

	.contacts-list-pane {
		min-height: calc(100dvh - 176px);
		margin: 7px;
	}

	.contacts-list-heading {
		min-width: 0;
		flex: 1 1 100%;
	}

	.contacts-list-heading p {
		max-width: calc(100vw - 90px);
	}

	.contacts-list-actions {
		order: 3;
	}

	.contacts-list-result {
		margin-left: auto;
		order: 4;
	}
}

/* External mailbox collection portal */
.compact-empty {
	padding: 34px 20px;
}

.external-collection-mailbox .personal-mailbox-symbol {
	background: #eaf7f0;
	color: #168454;
}

.external-mail-content {
	max-width: 1220px;
}

/* Same-origin embedded mode used by the webmail right-hand workspace. */
body.dgg-embedded {
	height: 100dvh;
	min-height: 100dvh;
	overflow: auto;
	background: var(--canvas);
}

.dgg-embedded .personal-topbar,
.dgg-embedded .global-footer {
	display: none !important;
}

.dgg-embedded .personal-shell {
	min-height: 100dvh;
}

.dgg-embedded .personal-content {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 18px 18px 34px;
}

.contacts-mail-body.dgg-embedded {
	height: 100dvh;
	min-height: 100dvh;
	overflow: hidden;
}

.dgg-embedded .contacts-mail-shell {
	display: block;
	height: 100dvh;
	min-height: 0;
}

.dgg-embedded .contacts-mail-sidebar {
	display: none !important;
}

.dgg-embedded .contacts-mail-main {
	height: 100dvh;
	min-height: 0;
}

.dgg-embedded .contacts-mail-topbar {
	flex: 0 0 auto;
}

.dgg-embedded .contacts-list-pane {
	min-height: 0;
}

@media (max-width: 680px) {
	.dgg-embedded .personal-content {
		padding: 10px 9px 28px;
	}

	.dgg-embedded .contacts-mail-main {
		height: 100dvh;
		min-height: 0;
	}

	.dgg-embedded .contacts-list-pane {
		min-height: 0;
	}
}

.external-mail-hero {
	background: linear-gradient(135deg, #fff 0%, #f5f9ff 68%, #eef8f5 100%);
}

.external-mail-hero-actions {
	display: grid;
	min-width: 230px;
	gap: 12px;
}

.external-security-badge {
	display: block;
	padding: 14px 16px;
	border: 1px solid #cfe7df;
	border-radius: 12px;
	background: rgba(241, 250, 247, .9);
}

.external-security-badge strong,
.external-security-badge small {
	display: block;
}

.external-security-badge strong {
	color: #197454;
	font-size: 12px;
}

.external-security-badge small {
	margin-top: 4px;
	color: #658276;
	font-size: 10px;
}

.external-mail-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(270px, .36fr);
	align-items: start;
	gap: 18px;
}

.external-mail-list {
	display: grid;
	gap: 10px;
}

.external-mail-card {
	display: flex;
	align-items: center;
	gap: 13px;
	padding: 15px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: #fff;
}

.external-mail-card:hover {
	border-color: #bfd1e8;
	box-shadow: 0 5px 18px rgba(34, 65, 105, .06);
}

.external-mail-card-icon {
	display: grid;
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	place-items: center;
	border-radius: 12px;
	background: #eaf7f0;
	color: #168454;
	font-size: 12px;
	font-weight: 800;
}

.external-mail-card-copy {
	min-width: 0;
	flex: 1;
}

.external-mail-card-copy strong,
.external-mail-card-copy small,
.external-mail-card-copy span {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.external-mail-card-copy strong {
	font-size: 13px;
}

.external-mail-card-copy small {
	margin-top: 4px;
	color: #435b77;
	font-size: 11px;
}

.external-mail-card-copy span {
	margin-top: 5px;
	color: var(--muted);
	font-size: 10px;
}

.external-mail-actions {
	flex-wrap: wrap;
	justify-content: flex-end;
}

.external-mail-actions .quiet {
	min-height: 31px;
	padding: 0 9px;
	font-size: 10px;
}

.external-mail-guide {
	position: sticky;
	top: 82px;
}

.external-mail-guide-list {
	display: grid;
	gap: 16px;
}

.external-mail-guide-list > div {
	display: flex;
	align-items: flex-start;
	gap: 11px;
}

.external-mail-guide-list > div > span {
	display: grid;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	place-items: center;
	border-radius: 9px;
	background: var(--brand-soft);
	color: var(--brand);
	font-size: 11px;
	font-weight: 800;
}

.external-mail-guide-list p,
.external-mail-guide-list strong,
.external-mail-guide-list small {
	display: block;
	margin: 0;
}

.external-mail-guide-list strong {
	font-size: 12px;
}

.external-mail-guide-list small {
	margin-top: 5px;
	color: var(--muted);
	font-size: 10px;
	line-height: 1.6;
}

.external-mail-warning {
	padding: 12px;
	border: 1px solid #f0dfbd;
	border-radius: 10px;
	background: #fffaf0;
	color: #795d2e;
	font-size: 10px;
	line-height: 1.65;
}

.external-provider-note {
	margin: 16px 0 0;
}

.field > small {
	display: block;
	margin-top: 6px;
	color: var(--muted);
	font-size: 10px;
	line-height: 1.5;
}

.field input[readonly] {
	background: #f1f4f8;
	color: #718096;
}

@media (max-width: 920px) {
	.external-mail-layout {
		grid-template-columns: 1fr;
	}

	.external-mail-guide {
		position: static;
	}
}

@media (max-width: 680px) {
	.external-mail-hero-actions {
		min-width: 0;
	}

	.external-mail-card {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.external-mail-card-copy {
		min-width: calc(100% - 58px);
	}

	.external-mail-actions {
		width: 100%;
		justify-content: flex-start;
		padding-left: 55px;
	}
}

/* Platform verification provider settings */
.system-settings-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.system-setting-card {
	overflow: hidden;
}

.system-setting-card .panel-head {
	align-items: flex-start;
}

.system-setting-card .panel-body {
	min-height: 430px;
}

.toggle-field label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.field.toggle-field input[type="checkbox"] {
	width: 17px;
	height: 17px;
	margin: 0;
	accent-color: var(--brand);
}

.panel-form-actions {
	display: flex;
	justify-content: flex-end;
	padding: 14px 18px;
	border-top: 1px solid #edf1f5;
	background: #fafbfd;
}

.provider-test-form {
	padding: 16px 18px 18px;
	border-top: 1px solid #edf1f5;
	background: #f7fafc;
}

.provider-test-form > label {
	display: block;
	margin-bottom: 7px;
	color: #44546b;
	font-size: 11px;
	font-weight: 680;
}

.provider-test-form > div {
	display: flex;
	gap: 8px;
}

.provider-test-form input {
	min-width: 0;
	height: 38px;
	flex: 1;
	padding: 0 10px;
	border: 1px solid var(--line-strong);
	border-radius: 9px;
	background: #fff;
	color: var(--ink);
	outline: 0;
}

.provider-test-form input:focus {
	border-color: var(--brand);
	box-shadow: 0 0 0 3px rgba(8, 127, 122, .1);
}

.platform-tag.is-disabled {
	background: #eef1f5;
	color: #6d7788;
}

.platform-tag.is-incomplete {
	background: var(--warning-soft);
	color: #87631d;
}

@media (max-width: 1060px) {
	.system-settings-grid {
		grid-template-columns: 1fr;
	}

	.system-setting-card .panel-body {
		min-height: 0;
	}
}

@media (max-width: 560px) {
	.provider-test-form > div {
		align-items: stretch;
		flex-direction: column;
	}
}

/* Platform customer-service mailbox */
.support-mailbox-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	margin-bottom: 18px;
	padding: 28px 30px;
	border: 1px solid #dce8f8;
	border-radius: 16px;
	background: linear-gradient(135deg, #fff 0%, #f4f8ff 58%, #edf5ff 100%);
	box-shadow: 0 10px 30px rgba(37, 93, 173, .07);
}

.support-mailbox-identity {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 16px;
}

.support-mailbox-mark {
	display: grid;
	width: 58px;
	height: 58px;
	flex: 0 0 58px;
	place-items: center;
	border-radius: 16px;
	background: var(--brand);
	box-shadow: 0 10px 24px rgba(23, 105, 224, .23);
	color: #fff;
	font-size: 20px;
	font-weight: 800;
}

.support-mailbox-identity small,
.support-mailbox-identity strong,
.support-mailbox-identity span {
	display: block;
}

.support-mailbox-identity small {
	margin-bottom: 5px;
	color: var(--muted);
	font-size: 11px;
}

.support-mailbox-identity strong {
	overflow: hidden;
	color: var(--navy);
	font-size: clamp(19px, 2.2vw, 27px);
	letter-spacing: -.4px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.support-mailbox-identity span {
	margin-top: 5px;
	color: var(--brand-strong);
	font-size: 12px;
	font-weight: 650;
}

.support-mailbox-metrics {
	display: grid;
	min-width: 390px;
	grid-template-columns: repeat(3, minmax(100px, 1fr));
	gap: 10px;
}

.support-mailbox-metrics > div {
	padding: 15px;
	border: 1px solid rgba(211, 224, 242, .9);
	border-radius: 12px;
	background: rgba(255, 255, 255, .82);
}

.support-mailbox-metrics span,
.support-mailbox-metrics strong {
	display: block;
}

.support-mailbox-metrics span {
	color: var(--muted);
	font-size: 10px;
}

.support-mailbox-metrics strong {
	margin-top: 7px;
	color: var(--navy);
	font-size: 17px;
}

.support-workflow-grid {
	align-items: start;
}

.support-mailbox-workspace {
	margin: 22px 0;
	overflow: hidden;
	border: 1px solid #d7e2f0;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 16px 42px rgba(32, 70, 128, .11);
	scroll-margin-top: 82px;
}

.support-mailbox-workspace-head {
	display: flex;
	min-height: 78px;
	align-items: center;
	justify-content: space-between;
	gap: 22px;
	padding: 15px 20px;
	border-bottom: 1px solid var(--line);
	background: linear-gradient(135deg, #fff 0%, #f5f9ff 100%);
}

.support-mailbox-workspace-head h2,
.support-mailbox-workspace-head p {
	margin: 0;
}

.support-mailbox-workspace-head h2 {
	margin-top: 3px;
	color: var(--navy);
	font-size: 17px;
}

.support-mailbox-workspace-head p {
	margin-top: 4px;
	color: var(--muted);
	font-size: 11px;
}

.support-mailbox-live {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--success);
	font-size: 10px;
	font-weight: 750;
}

.support-mailbox-live > span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--success);
	box-shadow: 0 0 0 4px var(--success-soft);
}

.support-mailbox-workspace-actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
}

.support-mailbox-workspace-actions button {
	display: inline-flex;
	min-height: 36px;
	align-items: center;
	gap: 7px;
	padding: 0 12px;
}

.support-mailbox-frame-shell {
	position: relative;
	height: clamp(680px, calc(100vh - 150px), 980px);
	background: #f7f9fc;
}

.support-mailbox-frame-shell iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #fff;
}

.support-mailbox-frame-loading {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	place-items: center;
	gap: 13px;
	background: rgba(247, 250, 255, .94);
	color: #52637c;
	font-size: 12px;
	backdrop-filter: blur(3px);
}

.support-mailbox-frame-loading > span {
	width: 30px;
	height: 30px;
	border: 3px solid #dce8fa;
	border-top-color: var(--brand);
	border-radius: 50%;
	animation: support-mailbox-spin .75s linear infinite;
}

.portal-platform.support-mailbox-open .content {
	width: min(1680px, 100%);
}

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

.support-scope-list {
	display: grid;
	gap: 15px;
}

.support-scope-list > div {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.support-scope-list > div > span {
	display: grid;
	width: 32px;
	height: 32px;
	flex: 0 0 32px;
	place-items: center;
	border-radius: 9px;
	background: var(--brand-soft);
	color: var(--brand-strong);
	font-size: 11px;
	font-weight: 800;
}

.support-scope-list p,
.support-scope-list strong,
.support-scope-list small {
	display: block;
	margin: 0;
}

.support-scope-list small {
	margin-top: 4px;
	color: var(--muted);
	font-size: 11px;
	line-height: 1.6;
}

.support-guidance {
	display: grid;
	gap: 12px;
}

.support-guidance p {
	margin: 0;
	padding: 12px 14px;
	border-radius: 10px;
	background: #f7f9fc;
	color: #536176;
	font-size: 11px;
	line-height: 1.7;
}

.support-guidance strong {
	color: var(--ink);
}

.support-guidance code {
	color: var(--brand-strong);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-weight: 700;
}

@media (max-width: 980px) {
	.support-mailbox-card {
		align-items: stretch;
		flex-direction: column;
	}

	.support-mailbox-metrics {
		min-width: 0;
	}
}

@media (max-width: 620px) {
	.support-mailbox-card {
		padding: 20px;
	}

	.support-mailbox-metrics {
		grid-template-columns: 1fr;
	}

	.support-mailbox-identity strong {
		font-size: 18px;
	}

	.support-mailbox-workspace-head {
		align-items: stretch;
		flex-direction: column;
	}

	.support-mailbox-workspace-actions {
		width: 100%;
	}

	.support-mailbox-workspace-actions button {
		flex: 1;
		justify-content: center;
	}

	.support-mailbox-frame-shell {
		height: calc(100vh - 118px);
		min-height: 620px;
	}
}
