:root {
	--ink: #f7f4f0;
	--ink-muted: rgba(247, 244, 240, 0.68);
	--ink-faint: rgba(247, 244, 240, 0.42);
	--surface: rgba(13, 16, 20, 0.88);
	--surface-strong: rgba(8, 10, 13, 0.96);
	--surface-soft: rgba(24, 25, 27, 0.76);
	--line: rgba(255, 255, 255, 0.11);
	--line-strong: rgba(255, 255, 255, 0.22);
	--bronze: #e6bc86;
	--bronze-deep: #9e6741;
	--brown: #51372d;
	--green: #a9d7b4;
	--red: #ec9d91;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--panel-fill: linear-gradient(145deg, rgba(51, 35, 30, 0.82), rgba(8, 11, 15, 0.93) 68%);
	--panel-fill-hover: linear-gradient(145deg, rgba(67, 44, 35, 0.88), rgba(9, 12, 16, 0.95) 68%);
	--panel-fill-selected: linear-gradient(145deg, rgba(94, 59, 42, 0.94), rgba(12, 14, 17, 0.97) 70%);
	--control-fill: linear-gradient(180deg, rgba(22, 24, 28, 0.98), rgba(9, 11, 14, 0.98));
	--notch-lg: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
	--notch-md: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
	--notch-sm: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
	--control-cut: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

* {
	box-sizing: border-box;
	scrollbar-width: thin;
	scrollbar-color: #bf885d rgba(8, 10, 13, 0.66);
}

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: rgba(8, 10, 13, 0.66); }
*::-webkit-scrollbar-thumb {
	border: 2px solid rgba(8, 10, 13, 0.66);
	background: linear-gradient(180deg, #e3bc8b, #9d6743);
}
*::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #f0d1aa, #b57950); }
*::-webkit-scrollbar-corner { background: rgba(8, 10, 13, 0.8); }

html { min-height: 100%; scrollbar-gutter: stable; }
body {
	position: relative;
	isolation: isolate;
	min-height: 100vh;
	margin: 0;
	color: var(--ink);
	background: #0a151d;
	font-family: var(--font);
	-webkit-font-smoothing: antialiased;
}
body::before,
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; }
body::before {
	z-index: -2;
	inset: -8px;
	background: url("/assets/portal-sky.jpg") center / cover no-repeat;
	filter: blur(3px) saturate(0.92) brightness(0.9);
	transform: scale(1.01);
}
body.modal-open { overflow: hidden; }
body::after {
	z-index: -1;
	background: linear-gradient(110deg, rgba(4, 11, 16, 0.19), rgba(4, 9, 15, 0.34));
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 2px solid rgba(244, 213, 177, 0.92);
	outline-offset: 3px;
}
.hidden { display: none !important; }
.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; }

.admin-app { position: relative; z-index: 1; min-height: 100vh; }
.admin-app:has(> .admin-gate:not(.hidden)) { display: grid; place-items: center; padding: 24px; }
.admin-gate {
	width: min(100%, 530px);
	display: grid;
	justify-items: center;
	gap: 18px;
	padding: clamp(36px, 7vw, 64px);
	background: linear-gradient(160deg, rgba(55, 37, 31, 0.92), rgba(9, 12, 16, 0.97) 62%);
	box-shadow: inset 0 1px 0 rgba(255, 236, 216, 0.08), 0 10px 24px rgba(5, 7, 9, 0.2);
	clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
	text-align: center;
}
.admin-gate h1, .admin-gate p { margin: 0; }
.admin-gate h1 { font-size: clamp(2.8rem, 8vw, 4.4rem); line-height: 0.95; letter-spacing: -0.065em; }
.admin-gate p { max-width: 380px; color: var(--ink-muted); line-height: 1.6; }
.admin-loader { gap: 9px; min-height: 320px; }
.admin-loader-mark { position: relative; width: 78px; height: 78px; display: grid; place-items: center; margin-bottom: 10px; }
.admin-loader-mark::before, .admin-loader-mark::after { content: ""; position: absolute; width: 18px; height: 18px; border-color: rgba(230, 188, 134, 0.78); }
.admin-loader-mark::before { top: 0; left: 0; border-top: 2px solid; border-left: 2px solid; }
.admin-loader-mark::after { right: 0; bottom: 0; border-right: 2px solid; border-bottom: 2px solid; }
.admin-loader-mark img { width: 52px; height: 52px; object-fit: contain; filter: grayscale(1) brightness(0) invert(1); }
.admin-loader > strong { font-size: 1.05rem; letter-spacing: 0.035em; }
.admin-loader > p { margin: 0; font-size: 0.78rem; }
.admin-loader-track { width: min(190px, 62vw); height: 4px; margin-top: 17px; overflow: hidden; background: rgba(255, 255, 255, 0.08); clip-path: var(--notch-sm); }
.admin-loader-track span { display: block; width: 42%; height: 100%; background: linear-gradient(90deg, #9f6843, #efd0a7); animation: loader-track 1.15s cubic-bezier(0.55, 0, 0.2, 1) infinite; }
.gate-brand, .admin-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 800; text-decoration: none; }
.gate-brand img, .admin-brand img { display: block; object-fit: contain; filter: grayscale(1) brightness(0) invert(1); }
.gate-brand { margin-bottom: 8px; }
.text-link, .sidebar-account a { color: var(--ink-faint); font-size: 0.78rem; text-decoration: none; }
.text-link:hover, .sidebar-account a:hover { color: var(--ink); }

.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.admin-sidebar {
	position: sticky;
	top: 0;
	z-index: 30;
	height: 100vh;
	display: flex;
	flex-direction: column;
	padding: 25px 18px 18px;
	background: rgba(7, 12, 17, 0.56);
	box-shadow: inset -1px 0 rgba(255, 255, 255, 0.08), 9px 0 18px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(18px) saturate(1.12);
	-webkit-backdrop-filter: blur(18px) saturate(1.12);
}
.admin-brand { min-height: 46px; padding: 0 9px 24px; font-size: 0.92rem; letter-spacing: 0.04em; }
.admin-brand img { width: 31px; height: 31px; }
.admin-nav { display: grid; gap: 6px; margin-top: 30px; }
.admin-nav-item {
	position: relative;
	width: 100%;
	min-height: 44px;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0 34px 0 13px;
	border: 0;
	color: var(--ink-muted);
	background: transparent;
	cursor: pointer;
	font-size: 0.72rem;
	font-weight: 750;
	letter-spacing: 0.12em;
	text-align: left;
	text-transform: uppercase;
}
.admin-nav-item svg { width: 17px; height: 17px; flex: 0 0 auto; stroke-width: 1.75; }
.admin-nav-item:hover, .admin-nav-item.active { color: var(--ink); background: var(--panel-fill-selected); clip-path: var(--notch-sm); }
.admin-nav-item.active::after { content: ""; position: absolute; top: calc(50% - 4px); right: 15px; width: 8px; height: 8px; background: var(--bronze); transform: rotate(45deg); }
.sidebar-account { display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 24px 8px 0; }
.account-avatar { width: 39px; height: 39px; display: grid; place-items: center; overflow: hidden; background: rgba(255, 255, 255, 0.09); clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-avatar span { font-weight: 800; }
.account-copy { min-width: 0; }
.account-copy strong, .account-copy a { display: block; }
.account-copy strong { max-width: 135px; overflow: hidden; font-size: 0.79rem; text-overflow: ellipsis; white-space: nowrap; }
.account-copy a { margin-top: 3px; }

.admin-main { width: 100%; max-width: 1510px; min-width: 0; margin: 0 auto; padding: 38px clamp(30px, 5vw, 76px) 70px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; margin-bottom: 34px; padding: 0 5px 25px; }
.admin-header h1 { margin: 0; font-size: clamp(3rem, 5.5vw, 5rem); line-height: 0.9; letter-spacing: -0.065em; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.2); }
.save-cluster { display: flex; align-items: center; gap: 14px; }
.save-status { min-height: 28px; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-faint); font-size: 0.72rem; font-weight: 700; }
.save-status svg { width: 14px; height: 14px; }
.save-status.saved { color: var(--green); }
.save-status.dirty { color: var(--bronze); }
.save-status.failed { color: var(--red); }
.save-status.saving svg { animation: status-spin 900ms linear infinite; }
.admin-button {
	min-height: 45px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 20px;
	border: 1px solid transparent;
	color: var(--ink);
	background: transparent;
	cursor: pointer;
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.015em;
	text-decoration: none;
	clip-path: var(--notch-md);
}
.admin-button:disabled { opacity: 0.5; cursor: not-allowed; }
.admin-button.primary { color: #1b1009; background: linear-gradient(180deg, #f3d8b4 0%, #d29a63 55%, #9f6843 100%); box-shadow: inset 0 1px 0 #fff4e5, 0 3px 3px rgba(59, 35, 20, 0.22); }
.admin-button.primary:hover { background: linear-gradient(180deg, #fae6cc 0%, #dda873 55%, #ad734c 100%); }
.admin-button.secondary { border-color: transparent; background: rgba(247, 244, 240, 0.09); }
.admin-button.secondary:hover { background: rgba(247, 244, 240, 0.15); }
.admin-button.danger { color: #fff1ed; background: linear-gradient(180deg, #9f4d43, #71332d); box-shadow: inset 0 1px 0 rgba(255, 224, 218, 0.18); }
.admin-button.danger:hover { background: linear-gradient(180deg, #ad584d, #803b34); }
.mobile-admin-nav { display: none; }
.admin-view { display: none; }
.admin-view.active { display: block; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stat-cell { min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; padding: 25px 28px 27px; background: var(--panel-fill); clip-path: var(--notch-md); }
.stat-cell span { color: var(--ink-muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.stat-cell strong { font-size: clamp(2.3rem, 4vw, 4.1rem); line-height: 0.95; letter-spacing: -0.06em; }
.overview-columns { display: grid; grid-template-columns: minmax(300px, 0.75fr) minmax(430px, 1.25fr); gap: 18px; margin-top: 18px; }
.overview-section { min-width: 0; padding: 30px; background: var(--panel-fill); box-shadow: inset 0 1px 0 rgba(255, 236, 216, 0.06); backdrop-filter: blur(12px); clip-path: var(--notch-lg); }
.overview-section h2 { margin: 0 0 28px; font-size: 1.5rem; letter-spacing: -0.035em; }
.runtime-section h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.runtime-section h2 span { color: var(--red); font-size: 0.72rem; font-weight: 750; letter-spacing: 0.02em; }
.runtime-section h2 span.live { color: var(--green); }
.module-meter { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 30px; }
.module-meter strong { font-size: 5rem; line-height: 0.8; letter-spacing: -0.07em; }
.module-meter span { color: var(--ink-muted); }
.module-meter b { color: var(--ink); }
.overview-module-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.overview-module-bars span { height: 7px; background: rgba(255, 255, 255, 0.1); }
.overview-module-bars span.active { background: linear-gradient(90deg, var(--bronze-deep), var(--bronze)); }
.runtime-values { margin: 0; }
.runtime-values div { display: grid; grid-template-columns: minmax(110px, 0.45fr) minmax(0, 1fr); gap: 18px; margin-bottom: 3px; padding: 10px 12px; background: rgba(255, 255, 255, 0.025); }
.runtime-values dt, .runtime-values dd { margin: 0; }
.runtime-values dt { color: var(--ink-muted); font-size: 0.78rem; }
.runtime-values dd { overflow-wrap: anywhere; font-size: 0.82rem; text-align: right; }
.sample-time { margin: 20px 0 0; color: var(--ink-faint); font-size: 0.7rem; }

input, textarea {
	width: 100%;
	border: 0;
	border-radius: 0;
	color: var(--ink);
	background: var(--control-fill);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.045);
	outline: none;
	color-scheme: dark;
	clip-path: var(--control-cut);
	transition: background 150ms ease, box-shadow 150ms ease;
}
input { min-height: 44px; padding: 0 13px; }
textarea { min-height: 112px; padding: 14px 15px; line-height: 1.5; resize: vertical; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { margin: 0; appearance: none; -webkit-appearance: none; }
input::placeholder, textarea::placeholder { color: rgba(247, 244, 240, 0.34); }
input:hover, textarea:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
input:focus, textarea:focus { background: linear-gradient(180deg, rgba(39, 29, 25, 0.98), rgba(10, 12, 15, 0.98)); box-shadow: inset 0 0 0 1px rgba(230, 188, 134, 0.72), inset 0 1px 0 rgba(255, 233, 206, 0.12); }

.module-search { display: block; width: min(100%, 440px); margin-bottom: 22px; }
.module-search input { min-height: 52px; background: rgba(8, 11, 15, 0.8); backdrop-filter: blur(10px); }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 15px; }
.module-card {
	position: relative;
	min-height: 154px;
	display: flex;
	flex-direction: column;
	padding: 20px;
	border: 0;
	color: var(--ink);
	background: var(--panel-fill);
	clip-path: var(--notch-lg);
	cursor: pointer;
	transition: background 150ms ease, box-shadow 150ms ease;
}
.module-card:hover { background: var(--panel-fill-hover); }
.module-card.selected { background: var(--panel-fill-selected); box-shadow: inset 0 1px 0 rgba(241, 211, 176, 0.15); }
.module-card > div { display: grid; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.module-card-icon { width: 27px; height: 27px; display: grid; place-items: center; color: #e8c79e; }
.module-card-icon svg { width: 24px; height: 24px; }
.module-card h2 { margin: 0; font-size: 1.08rem; letter-spacing: -0.02em; }
.module-card p { margin: 17px 42px 0 0; color: var(--ink-muted); font-size: 0.79rem; line-height: 1.45; }
.module-configure { position: absolute; right: 16px; bottom: 15px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; color: var(--bronze); background: rgba(230, 188, 134, 0.08); clip-path: var(--notch-sm); cursor: pointer; }
.module-configure svg { width: 17px; height: 17px; transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.module-configure:hover { color: #f2d2ab; background: rgba(230, 188, 134, 0.15); }
.module-configure:hover svg { transform: rotate(42deg); }

.configuration-editor {
	box-shadow: inset 0 1px 0 rgba(255, 236, 216, 0.06);
	background: var(--panel-fill);
	backdrop-filter: blur(14px);
	clip-path: var(--notch-lg);
}
.module-modal { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 28px; background: rgba(3, 5, 7, 0.58); backdrop-filter: blur(12px); }
.module-editor { width: min(1120px, 100%); height: min(80vh, 760px); max-height: min(80vh, 760px); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; background: var(--panel-fill); box-shadow: inset 0 1px 0 rgba(255, 236, 216, 0.08), 0 8px 20px rgba(0, 0, 0, 0.34); clip-path: var(--notch-lg); }
.module-editor > header { position: relative; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; background: linear-gradient(95deg, rgba(83, 52, 39, 0.96), rgba(17, 18, 21, 0.98) 70%); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.07); }
.module-editor-heading, .module-editor-actions { display: flex; align-items: center; gap: 17px; }
.module-editor-icon { width: 27px; height: 27px; color: var(--bronze); }
.module-editor h2, .configuration-editor > h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1; letter-spacing: -0.055em; }
.editor-close { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 0; color: var(--ink-muted); background: rgba(255, 255, 255, 0.07); clip-path: var(--notch-sm); cursor: pointer; }
.editor-close svg { width: 20px; height: 20px; transition: transform 160ms ease; }
.editor-close:hover svg { transform: rotate(90deg); }
.text-button, .advanced-toggle { padding: 0; border: 0; color: var(--ink-muted); background: transparent; cursor: pointer; font-size: 0.75rem; font-weight: 750; }
.editor-close:hover, .text-button:hover, .advanced-toggle:hover { color: var(--ink); }
.text-button.danger { color: var(--red); }
.module-editor-body { min-height: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.module-page-navigation { min-height: 0; display: flex; flex-direction: column; gap: 7px; padding: 18px 14px; overflow: auto; background: rgba(7, 10, 13, 0.56); box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.07); }
.module-page-button { min-height: 49px; display: grid; grid-template-columns: 21px minmax(0, 1fr); align-items: center; gap: 11px; padding: 0 14px; border: 0; color: var(--ink-muted); background: transparent; clip-path: var(--notch-sm); cursor: pointer; text-align: left; transition: color 150ms ease, background 150ms ease; }
.module-page-button svg { width: 18px; height: 18px; }
.module-page-button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.055); }
.module-page-button.active { color: var(--ink); background: var(--panel-fill-selected); box-shadow: inset 0 1px 0 rgba(255, 231, 205, 0.1); }
.module-page-viewport { min-width: 0; min-height: 0; overflow: auto; }
.module-editor-page { min-height: 100%; padding: 31px 34px 38px; }
.module-editor-page h3 { margin: 0 0 24px; font-size: 1.18rem; letter-spacing: -0.025em; }
.role-panel-preview { margin: 24px 0 16px; padding: 20px; background: var(--surface-soft); overflow-wrap: anywhere; }
.role-panel-preview h4 { margin: 0 0 12px; font-size: 1.15rem; }
.role-panel-preview p { margin: 8px 0 0; white-space: pre-wrap; line-height: 1.6; }
.role-panel-preview + a { display: block; margin-bottom: 16px; color: var(--bronze); }
.role-panel-preview + a[hidden] { display: none; }
.module-editor-page[data-page="role-publish"] .admin-button { margin: 18px 0 0 12px; }
.configuration-editor { padding: 32px; }
.editor-empty { color: var(--ink-muted); font-size: 0.85rem; }
.owned-record-list, .message-catalog-list { display: grid; gap: 14px; margin-top: 22px; }
.owned-record, .message-template { padding: 18px; background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.065); clip-path: var(--notch-sm); }
.owned-record > header, .message-template > header { display: flex; align-items: center; gap: 14px; margin-bottom: 15px; }
.owned-record > header strong, .message-template > header strong { min-width: 0; flex: 1; font-size: 0.84rem; }
.owned-record .form-grid { margin-top: 0; }
.record-add { margin-top: 17px; }
.message-catalog-toolbar { position: sticky; z-index: 4; top: -31px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 12px 0 16px; background: var(--panel-fill); }
.message-catalog-toolbar input { min-height: 45px; }
.message-catalog-summary { color: var(--ink-muted); font-size: 0.75rem; }
.message-template textarea { width: 100%; min-height: 90px; resize: vertical; }
.message-template small { display: block; margin-top: 9px; color: var(--ink-muted); opacity: 0.78; font-size: 0.67rem; line-height: 1.45; }
.message-template .text-button:disabled { visibility: hidden; }
.message-catalog-pagination { display: flex; align-items: center; justify-content: center; gap: 15px; padding: 22px 0 4px; color: var(--ink-muted); font-size: 0.75rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.form-field { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.form-field > span { color: var(--ink-muted); font-size: 0.73rem; font-weight: 700; }
.form-field.wide, .form-field:has(textarea) { grid-column: 1 / -1; }
.toggle-field { min-height: 44px; flex-direction: row; align-items: center; justify-content: space-between; gap: 18px; padding: 0 4px; }
.toggle-field > .switch-control { flex: 0 0 auto; }

.switch-control { display: inline-flex; align-items: center; gap: 9px; padding: 0; border: 0; color: var(--ink-muted); background: transparent; cursor: pointer; transition: color 180ms ease; }
.switch-control span { position: relative; width: 49px; height: 26px; overflow: hidden; background: rgba(8, 10, 13, 0.88); clip-path: var(--control-cut); transition: background-color 210ms ease; }
.switch-control span::after { content: ""; position: absolute; z-index: 1; top: 4px; left: 4px; width: 18px; height: 18px; background: rgba(247, 244, 240, 0.56); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28); clip-path: var(--control-cut); transform: translateX(0); transition: transform 260ms cubic-bezier(0.22, 0.82, 0.22, 1), background-color 210ms ease, clip-path 260ms ease; }
.switch-control:hover { color: var(--ink); }
.switch-control:hover span { background: rgba(18, 20, 24, 0.94); }
.switch-control[aria-checked="true"] { color: rgba(247, 244, 240, 0.88); }
.switch-control[aria-checked="true"] span { background: rgba(76, 51, 40, 0.92); }
.switch-control[aria-checked="true"] span::after { background: #f2c995; clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px)); transform: translateX(23px); }
.switch-control strong { font-size: 0.68rem; font-weight: 750; transition: color 180ms ease; }

.option-picker { position: relative; min-width: 0; }
.option-picker-trigger { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 13px; border: 0; color: var(--ink); background: var(--control-fill); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.045); clip-path: var(--control-cut); cursor: pointer; text-align: left; }
.option-picker-trigger:hover, .option-picker.open .option-picker-trigger { box-shadow: inset 0 0 0 1px rgba(230, 188, 134, 0.6), inset 0 1px 0 rgba(255, 234, 207, 0.08); }
.option-picker-trigger > span { min-width: 0; display: grid; gap: 2px; }
.option-picker-trigger small { color: var(--ink-muted); font-size: 0.68rem; font-weight: 650; }
.picker-current-value { min-width: 0; overflow: hidden; font-size: 0.79rem; font-weight: 700; }
.selected-value-preview { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; overflow: hidden; }
.selected-value { min-width: 0; max-width: 210px; min-height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 5px; background: rgba(255, 255, 255, 0.065); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055); clip-path: var(--control-cut); }
.selected-value.single { max-width: 100%; background: transparent; box-shadow: none; clip-path: none; padding: 0; }
.selected-value .role-visual, .selected-value .channel-symbol { width: 20px; height: 20px; }
.selected-value .role-visual.has-image img { width: 19px; height: 19px; }
.selected-value .default-role-visual i { top: 3px; width: 6px; height: 6px; }
.selected-value .default-role-visual b { bottom: 2px; width: 12px; height: 7px; }
.selected-value-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-value-remainder { flex: 0 0 auto; color: var(--bronze); font-size: 0.72rem; }
.picker-chevron { width: 18px; height: 18px; flex: 0 0 auto; color: var(--bronze); transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.option-picker.open .picker-chevron { transform: rotate(180deg); }
.option-picker-menu { position: absolute; z-index: 80; top: calc(100% + 6px); left: 0; width: 100%; max-height: 360px; overflow: hidden; visibility: hidden; border: 0; opacity: 0; background: rgba(7, 9, 12, 0.985); box-shadow: inset 0 0 0 1px var(--line-strong), 0 8px 18px rgba(0, 0, 0, 0.34); clip-path: var(--control-cut); transform: translateY(-5px); transform-origin: top; pointer-events: none; transition: opacity 130ms ease, transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 160ms; }
.option-picker.open .option-picker-menu, .option-picker-menu.floating { visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto; transition-delay: 0s; }
.option-picker-menu.floating { position: fixed; z-index: 1000; clip-path: none; }
.option-picker-menu.floating .option-picker-list { max-height: calc(var(--picker-menu-height, 360px) - 12px); }
.option-picker-menu.floating:has(.option-picker-search) .option-picker-list { max-height: calc(var(--picker-menu-height, 360px) - 62px); }
.option-picker-search { width: calc(100% - 12px); min-height: 44px; margin: 6px; border: 0; background: rgba(255, 255, 255, 0.045); }
.option-picker-list { max-height: 300px; overflow: auto; padding: 6px; }
.option-group-label { padding: 12px 10px 6px; color: var(--ink-faint); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.option-picker-choice { width: 100%; min-height: 42px; display: grid; grid-template-columns: 28px minmax(0, 1fr) 22px; align-items: center; gap: 10px; padding: 5px 10px; border: 0; color: var(--ink-muted); background: transparent; cursor: pointer; text-align: left; }
.option-picker-choice.standard-emoji-choice { grid-template-columns: 28px minmax(0, 1fr); }
.option-picker-choice:hover { color: var(--ink); background: rgba(255, 255, 255, 0.07); }
.option-picker-choice.selected { color: var(--ink); background: var(--panel-fill-selected); }
.option-name { min-width: 0; overflow: hidden; color: var(--role-name-color, inherit); text-overflow: ellipsis; white-space: nowrap; }
.role-name-gradient { color: transparent !important; background: var(--role-name-gradient); background-clip: text; -webkit-background-clip: text; }
.option-check { width: 21px; height: 21px; display: grid; place-items: center; justify-self: end; border: 0; background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); clip-path: var(--control-cut); transition: box-shadow 150ms ease, background 150ms ease; }
.option-check svg { width: 13px; height: 13px; opacity: 0; color: #20140c; transform: scale(0.55) rotate(-12deg); transition: opacity 130ms ease, transform 170ms cubic-bezier(0.2, 0.9, 0.25, 1.2); }
.option-picker-choice.selected .option-check { background: linear-gradient(145deg, #f4d7b1, #b87a50); box-shadow: inset 0 0 0 1px rgba(255, 237, 213, 0.66); }
.option-picker-choice.selected .option-check svg { opacity: 1; transform: scale(1) rotate(0); }
.option-vector, .channel-symbol, .role-visual { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; color: var(--ink-muted); }
.option-vector { width: 18px; height: 18px; justify-self: center; }
.channel-symbol { color: rgba(247, 244, 240, 0.58); font-size: 1.2rem; font-weight: 500; }
.role-visual { position: relative; overflow: visible; background: transparent; font-size: 1rem; }
.role-visual.has-image img { width: 25px; height: 25px; display: block; object-fit: contain; }
.role-visual.has-emoji { font-size: 1.05rem; }
.emoji-visual { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; font-size: 1.15rem; line-height: 1; }
.emoji-visual img { width: 25px; height: 25px; display: block; object-fit: contain; }
.default-role-visual i { position: absolute; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.default-role-visual b { position: absolute; bottom: 4px; width: 14px; height: 8px; border-radius: 9px 9px 4px 4px; background: currentColor; }

.rule-table { display: grid; gap: 3px; margin-top: 22px; }
.rule-table > div { display: grid; grid-template-columns: minmax(150px, 1fr) auto 110px 110px; align-items: end; gap: 16px; padding: 14px 16px; background: rgba(255, 255, 255, 0.035); clip-path: var(--notch-sm); }
.rule-table > div > strong { align-self: center; font-size: 0.8rem; }
.rule-table .form-field > span { font-size: 0.64rem; }
.rule-table input { min-height: 42px; }
.editor-stack { display: grid; gap: 13px; }
.editor-stack details, .editor-stack article { background: rgba(255, 255, 255, 0.045); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055); clip-path: var(--notch-md); }
.editor-stack summary { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 18px; cursor: pointer; list-style: none; }
.editor-stack summary::-webkit-details-marker { display: none; }
.editor-stack details > div { padding: 20px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055); }
.editor-stack article > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.055); }
.editor-stack article > .form-grid { padding: 20px; }
.automod-introduction { max-width: 780px; }
.automod-delivery, .automod-rule-card {
	background: rgba(255, 255, 255, 0.036);
	box-shadow: inset 0 1px 0 rgba(255, 238, 220, 0.065);
	clip-path: var(--notch-md);
}
.automod-delivery { padding: 22px; }
.automod-section-heading { display: grid; gap: 6px; margin-bottom: 20px; }
.automod-section-heading h4 { margin: 0; font-size: 0.96rem; letter-spacing: -0.015em; }
.automod-section-heading p { max-width: 680px; margin: 0; color: var(--ink-muted); font-size: 0.73rem; line-height: 1.55; }
.automod-rule-list { display: grid; gap: 14px; margin-top: 14px; }
.automod-rule-card { position: relative; padding: 0 22px 23px; transition: background 160ms ease; }
.automod-rule-card.disabled { background: rgba(255, 255, 255, 0.018); }
.automod-rule-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.automod-rule-header > div { min-width: 0; }
.automod-rule-header strong { display: block; font-size: 0.9rem; }
.automod-rule-header p { max-width: 690px; margin: 5px 0 0; color: var(--ink-muted); font-size: 0.71rem; line-height: 1.45; }
.automod-action-grid, .automod-surface-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 3px 18px;
	margin: 0 -6px 21px;
	padding: 11px 14px;
	background: rgba(7, 10, 13, 0.34);
	clip-path: var(--notch-sm);
}
.automod-action-grid .toggle-field, .automod-surface-grid .toggle-field { min-height: 46px; }
.automod-surface-grid { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.add-row-button { min-height: 52px; border: 0; color: var(--bronze); background: rgba(91, 62, 45, 0.24); clip-path: var(--notch-md); cursor: pointer; font-weight: 750; }
.add-row-button:hover { background: rgba(91, 62, 45, 0.38); }
.ticket-publisher { max-width: 760px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.publish-panel-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; margin-top: 18px; padding: 0 20px; border: 0; color: #21130b; background: linear-gradient(180deg, #efd2ae, #b7794f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58), 0 3px 3px rgba(47, 27, 17, 0.2); cursor: pointer; font-weight: 800; clip-path: var(--notch-md); }
.publish-panel-button svg { width: 17px; height: 17px; }
.publish-panel-button:hover { background: linear-gradient(180deg, #f6dfc2, #c68759); }
.publish-panel-button:disabled { opacity: 0.5; cursor: not-allowed; }
.verification-role-reconciliation { display: grid; gap: 19px; margin-top: 30px; padding: 22px 24px 24px; background: rgba(255, 255, 255, 0.045); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.065); clip-path: var(--notch-md); }
.verification-role-reconciliation-heading { display: grid; gap: 8px; }
.verification-role-reconciliation-heading h4 { margin: 0; font-size: 0.94rem; letter-spacing: -0.015em; }
.verification-role-reconciliation-heading p { max-width: 760px; margin: 0; color: var(--ink-muted); font-size: 0.73rem; line-height: 1.6; }
.verification-resync-mode-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.verification-resync-mode { min-height: 48px; display: grid; grid-template-columns: 21px minmax(0, 1fr); align-items: center; gap: 10px; padding: 0 14px; border: 0; color: var(--ink-muted); background: rgba(255, 255, 255, 0.045); clip-path: var(--notch-sm); cursor: pointer; font: inherit; font-size: 0.73rem; font-weight: 750; text-align: left; }
.verification-resync-mode:hover, .verification-resync-mode.selected { color: var(--ink); background: var(--panel-fill-selected); }
.verification-resync-mode .option-check { justify-self: start; }
.verification-resync-mode.selected .option-check { background: linear-gradient(145deg, #f4d7b1, #b87a50); box-shadow: inset 0 0 0 1px rgba(255, 237, 213, 0.66); }
.verification-resync-mode.selected .option-check svg { opacity: 1; transform: scale(1) rotate(0); }
.verification-role-reconciliation-actions { display: flex; align-items: center; gap: 17px; }
.verification-role-reconciliation-button { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.verification-role-reconciliation-button svg { width: 17px; height: 17px; }
.verification-role-reconciliation-status { min-width: 0; margin: 0; color: var(--ink-muted); font-size: 0.72rem; line-height: 1.5; }
.verification-role-reconciliation-failures { padding-top: 2px; color: var(--ink-muted); font-size: 0.72rem; }
.verification-role-reconciliation-failures summary { width: max-content; max-width: 100%; color: #e4b982; cursor: pointer; font-weight: 750; }
.verification-role-reconciliation-failures ul { display: grid; gap: 6px; margin: 12px 0 0; padding: 0 0 0 20px; line-height: 1.5; }
.emoji-field { grid-column: auto; align-content: start; }
.emoji-upload-toggle, .emoji-file-button { width: max-content; min-height: 34px; display: inline-flex; align-items: center; gap: 7px; margin-top: 7px; padding: 0 10px; border: 0; color: var(--bronze); background: transparent; cursor: pointer; font: inherit; font-size: 0.7rem; font-weight: 750; }
.emoji-upload-toggle:hover, .emoji-file-button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.045); clip-path: var(--control-cut); }
.emoji-upload-toggle svg { width: 15px; height: 15px; }
.emoji-upload-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 10px; margin-top: 8px; padding: 14px; background: rgba(255, 255, 255, 0.035); clip-path: var(--notch-sm); }
.emoji-upload-form.hidden { display: none; }
.emoji-file-button { min-height: 42px; margin: 0; justify-content: center; color: var(--ink); background: rgba(255, 255, 255, 0.06); clip-path: var(--control-cut); }
.emoji-file-name { align-self: center; overflow: hidden; color: var(--ink-muted); font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.emoji-upload-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.structured-choice-section { display: grid; gap: 10px; grid-column: 1 / -1; }
.structured-choice-section h4 { margin: 0; color: var(--ink); font-size: 0.82rem; font-weight: 760; }
.ai-section-heading, .ai-block-heading { display: grid; gap: 5px; }
.ai-section-heading h4, .ai-block-heading h5 { margin: 0; color: var(--ink); font-size: 0.9rem; font-weight: 780; }
.ai-section-heading p, .ai-block-heading p { max-width: 760px; margin: 0; color: var(--ink-muted); font-size: 0.71rem; line-height: 1.55; }
.ai-behavior-tools { margin-top: 30px; }
.ai-definition-section { margin-top: 24px; }
.ai-definition-list { gap: 8px; }
.ai-definition-actions { display: flex; align-items: center; gap: 8px; }
.ai-definition-actions .switch-control strong { display: none; }
.ai-definition-list textarea { min-height: 92px; }
.ai-definition-list .form-field:last-child textarea { min-height: 120px; }
.ai-provider-manager { display: grid; gap: 24px; }
.ai-provider-console { min-width: 0; display: grid; grid-template-columns: 176px minmax(0, 1fr); background: rgba(255, 255, 255, 0.025); clip-path: var(--notch-md); }
.ai-provider-directory { min-width: 0; padding: 10px; background: rgba(6, 8, 11, 0.55); box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.065); }
.ai-provider-directory-button { width: 100%; min-height: 46px; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px 10px; border: 0; color: var(--ink-muted); background: transparent; clip-path: var(--notch-sm); cursor: pointer; text-align: left; }
.ai-provider-directory-button + .ai-provider-directory-button { margin-top: 4px; }
.ai-provider-directory-button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.045); }
.ai-provider-directory-button.selected { color: var(--ink); background: var(--panel-fill-selected); }
.ai-provider-directory-button strong { font-size: 0.8rem; }
.ai-provider-detail { min-width: 0; padding: 21px; }
.ai-provider-detail-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.ai-provider-detail-header h4 { margin: 0; font-size: 1.12rem; letter-spacing: -0.02em; }
.ai-provider-identity { display: flex; align-items: center; gap: 11px; }
.provider-logo { width: 20px; height: 20px; display: block; flex: 0 0 auto; object-fit: contain; }
.provider-logo-large { width: 25px; height: 25px; }
.option-provider-logo { width: 18px; height: 18px; justify-self: center; }
.ai-provider-detail-actions { display: flex; align-items: center; gap: 14px; }
.ai-refresh-models { display: inline-flex; align-items: center; gap: 8px; }
.ai-refresh-models svg { width: 15px; height: 15px; }
.ai-refresh-models:disabled svg { animation: spin 900ms linear infinite; }
.ai-provider-block { margin-top: 20px; }
.ai-block-heading { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.ai-model-heading span { color: var(--ink-faint); font-size: 0.67rem; }
.ai-credential-list { display: grid; gap: 3px; margin-top: 11px; }
.ai-credential-row { min-height: 50px; display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; background: rgba(255, 255, 255, 0.035); }
.ai-credential-row strong, .ai-credential-row span { display: block; }
.ai-credential-row strong { color: var(--ink); font-size: 0.74rem; }
.ai-credential-row span { margin-top: 3px; color: var(--ink-faint); font-size: 0.64rem; }
.ai-credential-composer { display: grid; grid-template-columns: minmax(120px, 0.65fr) minmax(190px, 1.35fr) auto; align-items: end; gap: 9px; margin-top: 12px; }
.ai-connect-key { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ai-connect-key svg { width: 15px; height: 15px; }
.ai-provider-empty { min-height: 50px; margin: 0; display: flex; align-items: center; color: var(--ink-muted); font-size: 0.7rem; line-height: 1.5; }
.ai-model-search { width: 100%; margin-top: 11px; }
.ai-model-list { max-height: 310px; overflow: auto; margin-top: 7px; }
.ai-model-row { min-height: 44px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 5px 7px 5px 12px; background: rgba(255, 255, 255, 0.03); }
.ai-model-row + .ai-model-row { margin-top: 3px; }
.ai-model-row strong, .ai-model-row span { display: block; }
.ai-model-row strong { color: var(--ink); font-size: 0.74rem; overflow-wrap: anywhere; }
.ai-model-row span { margin-top: 3px; color: var(--ink-faint); font-size: 0.63rem; overflow-wrap: anywhere; }
.ai-model-route-button { min-width: 78px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; border: 0; color: var(--ink-muted); background: rgba(255, 255, 255, 0.055); clip-path: var(--control-cut); cursor: pointer; font-size: 0.66rem; font-weight: 750; }
.ai-model-route-button:hover:not(:disabled) { color: var(--ink); background: rgba(255, 255, 255, 0.1); }
.ai-model-route-button:disabled { color: var(--bronze); opacity: 0.62; cursor: default; }
.ai-model-route-button svg { width: 14px; height: 14px; }
.ai-routing { display: grid; gap: 14px; }
.ai-fallback-list { display: grid; gap: 4px; }
.ai-fallback-row { display: grid; grid-template-columns: 34px minmax(260px, 1fr) minmax(135px, 0.38fr) 114px; align-items: end; gap: 10px; padding: 11px 14px; background: rgba(255, 255, 255, 0.035); clip-path: var(--notch-sm); }
.ai-fallback-row .toggle-field { min-height: 44px; padding: 0; }
.ai-fallback-order { align-self: center; color: var(--ink-faint); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.ai-fallback-actions { display: flex; align-items: center; align-self: end; justify-content: flex-end; }
.ai-icon-button { width: 38px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; color: var(--ink-faint); background: transparent; cursor: pointer; }
.ai-reset-prompt { align-self: end; justify-self: start; min-height: 44px; }
.ai-icon-button:hover:not(:disabled) { color: var(--ink); background: rgba(255, 255, 255, 0.045); clip-path: var(--control-cut); }
.ai-icon-button:disabled { opacity: 0.22; cursor: not-allowed; }
.ai-icon-button svg { width: 16px; height: 16px; }
.ai-add-route { min-height: 45px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.choice-button { min-height: 48px; display: grid; grid-template-columns: 21px 18px minmax(0, 1fr); align-items: center; gap: 10px; padding: 0 14px; border: 0; color: var(--ink-muted); background: rgba(255, 255, 255, 0.045); clip-path: var(--notch-sm); cursor: pointer; text-align: left; }
.choice-icon { width: 17px; height: 17px; color: var(--bronze); }
.choice-button:hover, .choice-button.selected { color: var(--ink); background: var(--panel-fill-selected); }
.choice-button .option-check { justify-self: start; }
.choice-button.selected .option-check { background: linear-gradient(145deg, #f4d7b1, #b87a50); box-shadow: inset 0 0 0 1px rgba(255, 237, 213, 0.66); }
.choice-button.selected .option-check svg { opacity: 1; transform: scale(1) rotate(0); }

.configuration-editor { margin-top: 0; }
.configuration-editor > h2 { margin-bottom: 12px; }
.configuration-introduction { max-width: 760px; margin: 0 0 34px; color: var(--ink-muted); font-size: 0.88rem; line-height: 1.6; }
.configuration-section { padding: 26px; background: rgba(255, 255, 255, 0.028); clip-path: var(--notch-md); }
.configuration-section + .configuration-section { margin-top: 15px; }
.configuration-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.configuration-section-heading > div { min-width: 0; }
.configuration-section-heading h3 { margin: 0; font-size: 1.18rem; letter-spacing: -0.025em; }
.configuration-section-heading p { max-width: 690px; margin: 7px 0 0; color: var(--ink-muted); font-size: 0.77rem; line-height: 1.55; }
.bot-rank-list { display: grid; gap: 8px; }
.bot-rank-card { min-width: 0; display: grid; grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1.45fr); gap: 24px; padding: 19px 20px; background: rgba(6, 9, 12, 0.54); clip-path: var(--notch-sm); }
.bot-rank-card > header { min-width: 0; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.bot-rank-mark { width: 23px; height: 23px; margin-top: 1px; color: #dfbd95; stroke-width: 1.65; }
.bot-rank-identity { min-width: 0; }
.bot-rank-identity strong { display: block; overflow: hidden; font-size: 0.9rem; text-overflow: ellipsis; white-space: nowrap; }
.bot-rank-identity p { margin: 6px 0 0; color: var(--ink-muted); font-size: 0.71rem; line-height: 1.45; }
.bot-rank-controls { min-width: 0; }
.bot-rank-remove { display: inline-flex; align-items: center; gap: 6px; }
.bot-rank-remove svg { width: 14px; height: 14px; }
.bot-rank-fields { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 12px; }
.bot-rank-card.custom .bot-rank-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bot-rank-full-access { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 13px; color: #e8c79e; background: rgba(166, 111, 72, 0.11); clip-path: var(--control-cut); font-size: 0.73rem; font-weight: 720; }
.bot-rank-full-access svg { width: 17px; height: 17px; flex: 0 0 auto; }
.runtime-configuration-section .form-grid { margin-top: 2px; }
.module-access-note { max-width: 720px; margin: 0 0 22px; }
.module-access-grid { align-items: end; }
.advanced-section { margin-top: 34px; padding-top: 24px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055); }
.advanced-toggle { color: var(--bronze); letter-spacing: 0.015em; }
.advanced-editor { margin-top: 18px; }
.json-editor textarea { min-height: 330px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }

.verification-toolbar { display: flex; align-items: stretch; gap: 10px; }
.verification-toolbar .module-search { flex: 1; margin: 0; }
.icon-labelled { gap: 8px; }
.icon-labelled svg { width: 16px; height: 16px; }
.verification-lookup, .management-lookup { min-height: 630px; }
.lookup-stage { width: 100%; transform-origin: center; }
.lookup-stage > h2 { margin: 0 0 16px; font-size: 1.35rem; letter-spacing: -0.025em; }
.is-empty { display: grid; place-items: center; }
.is-empty .lookup-stage { width: min(100%, 960px); padding: 0 22px 8vh; }
.is-empty .lookup-stage > h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.is-empty .lookup-stage input { min-height: 64px; padding: 0 22px; font-size: 1rem; }
.is-empty .lookup-stage .admin-button { min-height: 64px; padding: 0 28px; font-size: 0.82rem; }
.is-empty > .lookup-result { display: none; }
.has-result .lookup-stage { margin-bottom: 14px; }
.has-result .lookup-stage > h2 { display: none; }
.has-result > .lookup-result { opacity: 1; }
.verification-workspace { min-height: 630px; display: grid; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); background: rgba(5, 8, 11, 0.82); backdrop-filter: blur(12px); clip-path: var(--notch-lg); }
.verification-list-pane { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.07); }
.verification-list-pane > span { flex: 0 0 auto; padding: 0; color: var(--ink-faint); font-size: 0.68rem; }
.verification-record-list { min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding: 0; }
.verification-record-list > .lookup-skeleton { flex: 1 1 auto; min-width: 420px; }
.verification-record-button { width: 240px; min-width: 240px; min-height: 64px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 17px; align-items: center; gap: 12px; padding: 8px 11px; border: 0; color: var(--ink-muted); background: transparent; cursor: pointer; text-align: left; }
.verification-record-button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.verification-record-button.selected { color: var(--ink); background: var(--panel-fill-selected); clip-path: var(--notch-sm); }
.verification-record-button img, .verification-avatar-fallback { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; object-fit: cover; background: rgba(255, 255, 255, 0.08); font-weight: 800; }
.verification-record-button > span { min-width: 0; }
.verification-record-button strong, .verification-record-button > span > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verification-record-button strong { color: inherit; font-size: 0.8rem; }
.verification-record-button > span > span { margin-top: 4px; color: var(--ink-faint); font-size: 0.66rem; }
.verification-record-button > svg { width: 16px; height: 16px; color: var(--bronze); }
.verification-record-detail { min-width: 0; max-height: none; overflow: auto; padding: clamp(24px, 4vw, 42px); }
.verification-record-detail > header { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.verification-record-detail > header img, .verification-record-detail > header .verification-avatar-fallback { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.verification-record-detail h2 { margin: 0; font-size: 1.7rem; }
.verification-record-detail > header span { display: block; margin-top: 4px; color: var(--ink-muted); font-size: 0.72rem; }
.verification-record-detail > section { margin-top: 26px; }
.verification-record-detail h3 { margin: 0 0 8px; font-size: 0.92rem; }
.verification-record-detail dl { margin: 0; }
.verification-record-detail dl div { display: grid; grid-template-columns: minmax(130px, 0.32fr) minmax(0, 0.68fr); gap: 18px; padding: 10px 12px; background: rgba(255, 255, 255, 0.025); }
.verification-record-detail dl div + div { margin-top: 2px; }
.verification-record-detail dt, .verification-record-detail dd { margin: 0; overflow-wrap: anywhere; font-size: 0.74rem; }
.verification-record-detail dt { color: var(--ink-muted); }
.verification-record-detail dd { color: var(--ink); }
.verification-linked-list { margin-top: 0; }
.management-entity-list.verification-linked-list > article { grid-template-columns: 40px minmax(170px, 1fr) minmax(140px, auto); }
.verification-linked-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.verification-linked-list .admin-button { display: inline-flex; align-items: center; gap: 8px; }
.verification-linked-list .admin-button svg { width: 15px; height: 15px; }
.verification-data-list { display: grid; gap: 7px; }
.verification-data-list > article { padding: 16px; background: rgba(255, 255, 255, 0.035); clip-path: var(--notch-sm); }
.verification-data-list > article > header { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.verification-data-list > article > header strong { color: var(--ink); font-size: 0.82rem; text-transform: capitalize; }
.verification-data-list > article > header time { color: var(--ink-faint); font-size: 0.65rem; white-space: nowrap; }
.verification-data-list > article > section { margin: 0; }
.verification-data-list > article > section h3 { margin-bottom: 9px; color: var(--ink-muted); font-size: 0.72rem; }
.account-history > h3 { margin: 22px 0 9px; }
.account-history > h3:first-child { margin-top: 0; }
.verification-record-detail .record-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; }
.verification-record-detail .record-tabs button { min-width: 0; justify-content: center; padding: 0 7px; white-space: nowrap; }

.appeals-lookup { min-height: 630px; }
.appeals-toolbar { display: flex; align-items: stretch; justify-content: space-between; gap: 12px; }
.appeals-toolbar .admin-button { min-height: 42px; }
.appeal-status-tabs { margin: 0; padding: 0; }
.appeal-status-tabs button { min-height: 42px; }
.appeal-status-tabs button svg { color: var(--bronze); }
.appeals-workspace { min-height: 630px; display: grid; grid-template-columns: minmax(270px, 0.36fr) minmax(0, 0.64fr); background: rgba(5, 8, 11, 0.82); backdrop-filter: blur(12px); clip-path: var(--notch-lg); }
.appeals-list-pane { min-width: 0; display: flex; flex-direction: column; padding: 16px 0 10px; box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.07); }
.appeals-list-pane > span { padding: 0 20px 9px; color: var(--ink-faint); font-size: 0.68rem; }
.appeal-record-list { min-width: 0; max-height: 680px; overflow: auto; padding: 0 10px; }
.appeal-record-button { width: 100%; min-height: 64px; display: grid; grid-template-columns: minmax(0, 1fr) 17px; align-items: center; gap: 12px; padding: 8px 11px; border: 0; color: var(--ink-muted); background: transparent; cursor: pointer; text-align: left; }
.appeal-record-button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.appeal-record-button.selected { color: var(--ink); background: var(--panel-fill-selected); clip-path: var(--notch-sm); }
.appeal-record-button > span { min-width: 0; }
.appeal-record-button strong, .appeal-record-button > span > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appeal-record-button strong { color: inherit; font-size: 0.8rem; }
.appeal-record-button > span > span { margin-top: 4px; color: var(--ink-faint); font-size: 0.66rem; }
.appeal-record-button > svg { width: 16px; height: 16px; color: var(--bronze); }
.appeal-detail { min-width: 0; max-height: 720px; overflow: auto; padding: clamp(24px, 4vw, 42px); }
.appeal-detail > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 28px; }
.appeal-detail > header > div { min-width: 0; }
.appeal-detail h2 { margin: 0; font-size: 1.7rem; overflow-wrap: anywhere; }
.appeal-detail > header span { display: block; margin-top: 4px; color: var(--ink-muted); font-size: 0.72rem; }
.appeal-detail > section { margin-top: 26px; }
.appeal-detail h3 { margin: 0 0 8px; font-size: 0.92rem; }
.appeal-detail dl { margin: 0; }
.appeal-detail dl div { display: grid; grid-template-columns: minmax(130px, 0.32fr) minmax(0, 0.68fr); gap: 18px; padding: 10px 12px; background: rgba(255, 255, 255, 0.025); }
.appeal-detail dl div + div { margin-top: 2px; }
.appeal-detail dt, .appeal-detail dd { margin: 0; overflow-wrap: anywhere; font-size: 0.74rem; }
.appeal-detail dt { color: var(--ink-muted); }
.appeal-detail dd { color: var(--ink); }
.appeal-status-badge { flex: 0 0 auto; padding: 5px 11px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; clip-path: var(--notch-sm); }
.appeal-status-badge.pending { color: #e8c79e; background: rgba(166, 111, 72, 0.16); }
.appeal-status-badge.approved { color: #9ce8b6; background: rgba(64, 141, 88, 0.18); }
.appeal-status-badge.denied { color: #f08f85; background: rgba(141, 55, 48, 0.2); }
.appeal-review-form textarea { width: 100%; min-height: 110px; resize: vertical; }
.appeal-review-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.appeal-review-actions .admin-button { display: inline-flex; align-items: center; gap: 8px; }
.appeal-review-actions .admin-button svg { width: 15px; height: 15px; }

/* Embed editor and message previews use the same cut-metal visual system as the dashboard. */

.placeholder-chip {
	display: inline-block; margin: 0 2px; padding: 1px 7px; border-radius: 4px; color: #ffd9a8;
	background: rgba(230, 188, 134, 0.14); border: 1px solid rgba(230, 188, 134, 0.3);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82em; letter-spacing: 0.02em;
}
.embed-placeholder-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.embed-placeholder-chips button {
	padding: 5px 9px; border: 0; color: #f0c998;
	background: rgba(94, 59, 42, 0.34); box-shadow: inset 0 0 0 1px rgba(230, 188, 134, 0.22); clip-path: var(--control-cut); cursor: pointer; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.66rem;
}
.embed-placeholder-chips button:hover { color: var(--ink); background: rgba(112, 73, 53, 0.48); }

.embed-editor { width: 100%; max-width: 760px; }
.embed-editor-card {
	position: relative; display: grid; gap: 10px; padding: 22px 24px 20px 29px; overflow: hidden;
	background: linear-gradient(145deg, rgba(67, 44, 35, 0.66), rgba(8, 11, 15, 0.78) 72%);
	box-shadow: inset 0 1px 0 rgba(255, 235, 212, 0.08); clip-path: var(--notch-md);
}
.embed-editor-accent { position: absolute; top: 15px; bottom: 15px; left: 0; width: 5px; clip-path: polygon(0 0, 100% 8px, 100% calc(100% - 8px), 0 100%); }
.embed-slot-row { display: flex; align-items: center; gap: 10px; }
.embed-slot-author-icon { display: grid; place-items: center; width: 20px; height: 20px; color: var(--bronze); }
.embed-slot-author-icon svg { width: 17px; height: 17px; }
.embed-slot { position: relative; min-width: 0; padding: 4px 8px; margin: -4px -8px; cursor: text; overflow-wrap: anywhere; }
.embed-slot:hover, .embed-slot:focus-visible { background: rgba(230, 188, 134, 0.075); box-shadow: inset 0 0 0 1px rgba(230, 188, 134, 0.34); clip-path: var(--control-cut); outline: none; }
.embed-slot.author { font-size: 0.74rem; font-weight: 760; color: var(--ink); }
.embed-slot.title { font-size: 1rem; font-weight: 800; color: var(--ink); }
.embed-slot.description { color: var(--ink-muted); font-size: 0.8rem; line-height: 1.5; }
.embed-slot.footer { color: var(--ink-faint); font-size: 0.68rem; }
.embed-slot.empty { color: var(--ink-faint); font-style: italic; }
.embed-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 6px; }
.embed-field { position: relative; min-width: 0; padding: 10px 12px; background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045); clip-path: var(--notch-sm); }
.embed-field.inline { grid-column: span 1; }
.embed-field .embed-slot.field-name { font-size: 0.72rem; font-weight: 760; color: var(--ink); }
.embed-field .embed-slot.field-value { margin-top: 3px; font-size: 0.74rem; color: var(--ink-muted); }
.embed-field-remove {
	position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0;
	color: var(--ink-faint); background: rgba(255, 255, 255, 0.055); clip-path: var(--control-cut); cursor: pointer;
}
.embed-field-remove:hover { color: var(--red); }
.embed-field-remove svg { width: 12px; height: 12px; }
.embed-editor-controls { display: flex; align-items: center; gap: 8px; padding-top: 8px; }
.embed-color-control { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-muted); background: none; border: 0; cursor: pointer; font-size: 0.7rem; }
.embed-color-control:hover { color: var(--ink); }
.embed-color-control svg { width: 14px; height: 14px; color: var(--bronze); }
.embed-color-control input[type="color"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.embed-slot-editor {
	display: grid; gap: 9px; margin: 5px 0 11px; padding: 13px;
	background: rgba(7, 10, 13, 0.88); box-shadow: inset 0 0 0 1px rgba(230, 188, 134, 0.42); clip-path: var(--notch-sm);
}
.embed-slot-editor input, .embed-slot-editor textarea {
	width: 100%; padding: 10px 12px; color: var(--ink); background: var(--control-fill); border: 0; box-shadow: inset 0 0 0 1px var(--line); clip-path: var(--control-cut); font-size: 0.78rem;
}
.embed-slot-editor input:focus, .embed-slot-editor textarea:focus { box-shadow: inset 0 0 0 1px rgba(230, 188, 134, 0.68); outline: none; }
.embed-slot-editor > .admin-button { justify-self: start; }
.embed-content-field textarea { min-height: 84px; }

.message-template { padding: 0; background: rgba(6, 9, 12, 0.54); clip-path: var(--notch-sm); }
.message-template > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px 0; }
.message-template > header strong { font-size: 0.8rem; }
.message-template > small { display: block; padding: 7px 16px 13px; color: var(--ink-faint); font-size: 0.62rem; }
.message-preview {
	position: relative; display: grid; gap: 9px; margin: 0 16px; padding: 17px 19px 16px 24px; overflow: hidden;
	background: linear-gradient(145deg, rgba(67, 44, 35, 0.52), rgba(8, 11, 15, 0.7) 72%); box-shadow: inset 0 1px 0 rgba(255, 235, 212, 0.065); clip-path: var(--notch-sm); cursor: text;
}
.message-preview:hover, .message-preview:focus-visible { box-shadow: inset 0 0 0 1px rgba(230, 188, 134, 0.42), inset 0 1px 0 rgba(255, 235, 212, 0.08); outline: none; }
.message-preview-accent { position: absolute; top: 12px; left: 0; bottom: 12px; width: 4px; background: #dfbd95; clip-path: polygon(0 0, 100% 7px, 100% calc(100% - 7px), 0 100%); }
.message-preview-author { display: flex; align-items: center; gap: 9px; }
.message-preview-avatar { display: grid; place-items: center; width: 18px; height: 18px; color: var(--bronze); }
.message-preview-avatar svg { width: 16px; height: 16px; }
.message-preview-name { font-size: 0.72rem; font-weight: 800; color: var(--ink); }
.message-preview-body { color: var(--ink-muted); font-size: 0.8rem; line-height: 1.55; overflow-wrap: anywhere; }
.message-preview-empty { color: var(--ink-faint); font-style: italic; }
.message-preview-editor {
	display: grid; gap: 9px; margin: 0 16px 16px; padding: 13px;
	background: rgba(7, 10, 13, 0.88); box-shadow: inset 0 0 0 1px rgba(230, 188, 134, 0.42); clip-path: var(--notch-sm);
}
.message-preview-editor textarea {
	width: 100%; padding: 10px 12px; color: var(--ink); background: var(--control-fill); border: 0; box-shadow: inset 0 0 0 1px var(--line); clip-path: var(--control-cut); font-size: 0.78rem; resize: vertical;
}
.message-preview-editor textarea:focus { box-shadow: inset 0 0 0 1px rgba(230, 188, 134, 0.68); outline: none; }
.message-preview-editor > div:last-child { display: flex; gap: 8px; }

.levels-role-composer {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; margin-top: 14px; padding: 16px;
	background: rgba(255, 255, 255, 0.035); clip-path: var(--notch-sm);
}
.levels-role-composer .form-field { margin: 0; }
.levels-role-composer-actions { display: flex; align-items: center; gap: 8px; }
.levels-role-composer-actions .admin-button { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.levels-role-composer-actions svg { width: 15px; height: 15px; }
.levels-role-list { margin-top: 16px; }
.levels-role-card { padding: 14px 16px; background: rgba(255, 255, 255, 0.035); clip-path: var(--notch-sm); }
.levels-role-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.levels-role-card > span { display: block; margin-top: 6px; color: var(--ink-muted); font-size: 0.72rem; }

@media (max-width: 720px) {
	.levels-role-composer { grid-template-columns: 1fr; }
	.embed-fields { grid-template-columns: 1fr; }
}

.management-toolbar { display: flex; align-items: stretch; gap: 10px; }
.management-search { flex: 1; }
.management-detail { min-width: 0; min-height: 630px; max-height: 720px; overflow: auto; padding: clamp(24px, 4vw, 42px); background: rgba(5, 8, 11, 0.82); backdrop-filter: blur(12px); clip-path: var(--notch-lg); }
.management-detail > header { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.management-detail > header > div { min-width: 0; }
.management-detail > header img, .management-detail > header .hoplex-avatar { width: 64px; height: 64px; flex: 0 0 auto; object-fit: cover; clip-path: var(--notch-sm); }
.management-identity { display: flex; align-items: center; gap: 15px; min-width: 0; }
.hoplex-avatar { position: relative; display: block; overflow: hidden; image-rendering: pixelated; background: rgba(5, 8, 11, 0.78) url('/assets/logo-h.png') center / 36px no-repeat; }
.hoplex-avatar-canvas, .hoplex-avatar-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hoplex-avatar-canvas { z-index: 2; image-rendering: pixelated; opacity: 0; }
.hoplex-avatar-fallback { z-index: 1; }
.hoplex-avatar.loaded { background-image: none; }
.hoplex-avatar.loaded .hoplex-avatar-canvas { opacity: 1; }
.hoplex-avatar.loaded .hoplex-avatar-fallback { visibility: hidden; }
.guild-profile-editor textarea { min-height: 98px; }
.management-detail h2 { margin: 0; font-size: 1.7rem; }
.management-detail > header span { display: block; margin-top: 4px; color: var(--ink-muted); font-size: 0.72rem; overflow-wrap: anywhere; }
.management-detail > section { margin-top: 27px; }
.management-detail h3 { margin: 0 0 9px; font-size: 0.94rem; }
.management-detail dl { margin: 0; }
.management-detail dl div { display: grid; grid-template-columns: minmax(145px, 0.34fr) minmax(0, 0.66fr); gap: 18px; padding: 10px 12px; background: rgba(255, 255, 255, 0.025); }
.management-detail dl div + div { margin-top: 2px; }
.management-detail dt, .management-detail dd { margin: 0; overflow-wrap: anywhere; font-size: 0.74rem; }
.management-detail dt { color: var(--ink-muted); }
.management-detail dd { color: var(--ink); }
.management-split { min-height: 630px; display: grid; grid-template-columns: minmax(230px, 0.3fr) minmax(0, 0.7fr); }
.management-split-side { min-width: 0; padding: clamp(24px, 4vw, 42px); box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.07); }
.management-split-side > header { display: flex; align-items: flex-start; flex-direction: column; gap: 16px; }
.management-split-side > header h2 { font-size: 1.5rem; }
.management-split-side > header span { display: block; margin-top: 4px; color: var(--ink-muted); font-size: 0.72rem; overflow-wrap: anywhere; }
.management-split-side > header img, .management-split-side > header .hoplex-avatar { width: 72px; height: 72px; flex: 0 0 auto; object-fit: cover; clip-path: var(--notch-sm); }
.management-split-content { min-width: 0; padding: clamp(20px, 3vw, 34px); }
.management-split-content .record-tab-content { min-height: 0; }
.management-action-section { padding: 20px; background: rgba(255, 255, 255, 0.035); clip-path: var(--notch-md); }
.management-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.record-tabs-shell { margin-top: 0 !important; }
.record-tabs { display: flex; gap: 3px; padding: 0 0 10px; overflow-x: auto; scrollbar-width: thin; }
.record-tabs button { min-width: max-content; min-height: 42px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; border: 0; color: var(--ink-muted); background: rgba(5, 8, 11, 0.46); cursor: pointer; font: inherit; font-size: 0.7rem; font-weight: 750; }
.record-tabs button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.055); }
.record-tabs button.selected { color: var(--ink); background: var(--panel-fill-selected); clip-path: var(--notch-sm); }
.record-tabs button svg { width: 15px; height: 15px; color: var(--bronze); }
.record-tab-content { min-height: 430px; padding-top: 15px; }
.record-tab-panel { opacity: 1; }
.record-tab-panel > :first-child { margin-top: 0; }
.record-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0 0 32px; }
.management-detail .record-metrics, .verification-record-detail .record-metrics { margin: 0 0 32px; }
.record-metrics div { min-width: 0; min-height: 104px; display: flex; flex-direction: column; justify-content: flex-start; gap: 16px; padding: 17px 18px; background: rgba(255, 255, 255, 0.04); clip-path: var(--notch-sm); }
.management-detail .record-metrics div, .verification-record-detail .record-metrics div { display: flex; grid-template-columns: none; }
.record-metrics dt, .record-metrics dd { margin: 0; }
.record-metrics dt { color: var(--ink-muted); font-size: 0.68rem; font-weight: 760; }
.record-metrics dd { overflow: visible; color: var(--ink); font-size: clamp(1.08rem, 1.6vw, 1.28rem); font-weight: 820; line-height: 1.15; overflow-wrap: anywhere; white-space: normal; }
.record-metrics dd[data-tone="danger"] { color: #f08f85; }
.record-metrics dd[data-tone="good"] { color: #8bc9a0; }
.record-history { display: grid; gap: 3px; }
.record-history article { padding: 14px 16px; background: rgba(255, 255, 255, 0.035); clip-path: var(--notch-sm); }
.record-history strong, .record-history p, .record-history time { display: block; }
.record-history strong { color: var(--ink); font-size: 0.8rem; text-transform: capitalize; }
.record-history p { margin: 6px 0; color: var(--ink-muted); font-size: 0.72rem; line-height: 1.45; }
.record-history time { color: var(--ink-faint); font-size: 0.64rem; }
.match-history article { padding: 0; }
.match-disclosure { width: 100%; min-height: 58px; display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 18px; padding: 14px 18px; border: 0; color: inherit; background: transparent; cursor: pointer; text-align: left; }
.match-disclosure > span { color: var(--ink-faint); font-size: 0.64rem; white-space: nowrap; }
.match-disclosure svg, .record-disclosure svg { width: 16px; height: 16px; color: var(--bronze); transition: transform 170ms cubic-bezier(.2,.75,.25,1); }
.match-disclosure[aria-expanded="true"] svg, .record-disclosure[aria-expanded="true"] svg { transform: rotate(180deg); }
.match-entry-details { padding: 0 18px 17px; }
.match-entry-details p { margin-top: 0; }
.match-history strong[data-result="win"] { color: var(--green); }
.match-history strong[data-result="loss"] { color: var(--red); }
.match-history strong[data-result="draw"] { color: var(--bronze); }
.managed-history-toolbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.managed-record-list article { padding: 0; }
.record-disclosure { width: 100%; min-height: 66px; display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 18px; padding: 13px 16px; border: 0; color: inherit; background: transparent; cursor: pointer; text-align: left; }
.record-disclosure > span:first-child { min-width: 0; }
.record-disclosure strong, .record-disclosure > span > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-disclosure > span > span { margin-top: 5px; color: var(--ink-muted); font-size: 0.71rem; }
.record-disclosure time { color: var(--ink-faint); font-size: 0.64rem; white-space: nowrap; }
.record-entry-details { padding: 0 16px 18px; }
.record-entry-details > section { margin-top: 0; }
.record-entry-details dl div { background: rgba(255, 255, 255, 0.025); }

.lookup-skeleton { position: relative; min-width: 0; display: grid; gap: 7px; overflow: hidden; }
.lookup-skeleton.members { padding: 4px 0; }
.lookup-skeleton.members > div { min-height: 62px; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 11px; }
.lookup-skeleton.members > div > span:last-child, .skeleton-header > span:last-child { display: grid; gap: 8px; }
.skeleton-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.skeleton-avatar { position: relative; width: 40px; height: 40px; overflow: hidden; background: rgba(247, 244, 240, 0.1); clip-path: var(--notch-sm); }
.skeleton-avatar.large { width: 64px; height: 64px; }
.skeleton-line { position: relative; display: block; height: 10px; max-width: 100%; overflow: hidden; background: rgba(247, 244, 240, 0.09); clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px); }
.skeleton-line::after, .skeleton-avatar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 22%, rgba(230, 188, 134, 0.15) 46%, rgba(255, 241, 222, 0.22) 50%, rgba(230, 188, 134, 0.15) 54%, transparent 78%); transform: translateX(-105%); animation: skeleton-shine 1.35s cubic-bezier(.45,0,.25,1) infinite; }
.skeleton-tabs { display: flex; gap: 5px; margin: 0 0 18px; padding-bottom: 10px; overflow: hidden; }
.skeleton-tabs .skeleton-line { flex: 0 0 auto; height: 42px; }
.skeleton-content-row { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 0 16px; background: rgba(247, 244, 240, 0.025); }
.management-inline-editor { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(130px, 0.45fr) auto; align-items: end; gap: 10px; }
.management-inline-editor > .admin-button { align-self: end; }
.management-entity-list { display: grid; gap: 3px; margin-top: 18px; }
.management-entity-list > article { min-width: 0; display: grid; grid-template-columns: minmax(170px, 1fr) minmax(240px, auto); align-items: center; gap: 16px; padding: 12px 14px; background: rgba(255, 255, 255, 0.035); clip-path: var(--notch-sm); }
.management-entity-list > article > div:first-child { min-width: 0; }
.management-entity-list strong, .management-entity-list span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.management-entity-list strong { font-size: 0.78rem; }
.management-entity-list span { margin-top: 4px; color: var(--ink-faint); font-size: 0.66rem; }
.guild-role-editor { margin: 0 0 8px; padding: 18px; background: rgba(255, 255, 255, 0.028); clip-path: var(--notch-md); }
.guild-role-editor .form-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.guild-role-editor .form-field:first-child { grid-column: span 2; }
.guild-role-permissions { margin-top: 16px; }
.entity-controls { display: flex; align-items: flex-end; justify-content: flex-end; gap: 8px; }
.entity-controls .form-field { min-width: 190px; }
.entity-controls.compact { align-items: center; min-width: 0; }
.icon-action { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border: 0; color: var(--ink-muted); background: rgba(255, 255, 255, 0.055); cursor: pointer; clip-path: var(--notch-sm); }
.icon-action:hover { color: var(--ink); background: var(--panel-fill-selected); }
.icon-action.danger { color: #f08f85; }
.icon-action svg { width: 16px; height: 16px; }
.snapshot-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 3px; padding: 12px 14px; background: rgba(255, 255, 255, 0.035); clip-path: var(--notch-sm); }
.snapshot-row strong, .snapshot-row span { display: block; }
.snapshot-row strong { font-size: 0.78rem; }
.snapshot-row span { margin-top: 4px; color: var(--ink-faint); font-size: 0.66rem; }
.admin-button.compact { min-height: 38px; padding: 0 12px; }
.danger-zone + .danger-zone { margin-top: 14px; }
.danger-zone > .admin-button { margin-top: 18px; }
.guild-prune-section { margin-top: 10px; }
.guild-member-browser { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: end; gap: 16px; margin-top: 20px; }
.guild-member-browser .form-field { margin: 0; }
.guild-member-count { align-self: center; color: var(--ink-muted); font-size: 0.7rem; white-space: nowrap; }
.guild-member-list { margin-top: 10px; }
.guild-member-footer { min-height: 54px; display: grid; place-items: center; padding-top: 14px; }
.guild-member-sentinel { width: 1px; height: 1px; pointer-events: none; }
.guild-member-row { grid-template-columns: 42px minmax(170px, 1fr) minmax(240px, auto) !important; }
.guild-member-avatar { width: 42px; height: 42px; object-fit: cover; background: rgba(255, 255, 255, 0.045) url('/assets/logo-h.png') center / 22px no-repeat; clip-path: var(--notch-sm); }
.guild-member-avatar.failed { opacity: 0.48; }
.linked-discord-section { margin-top: 30px; }
.linked-discord-section > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; background: rgba(255, 255, 255, 0.035); clip-path: var(--notch-sm); }
.linked-discord-section strong, .linked-discord-section span { display: block; }
.linked-discord-section span { margin-top: 5px; color: var(--ink-muted); font-size: 0.7rem; }
.linked-discord-section .admin-button { display: inline-flex; align-items: center; gap: 8px; }
.linked-discord-section .admin-button svg { width: 15px; height: 15px; }
.focused-data-editor + .advanced-data-editor { margin-top: 12px; }
.advanced-data-editor::before { content: "Advanced field editor"; display: block; margin-bottom: 16px; color: var(--ink); font-size: 0.9rem; font-weight: 800; }
.queue-bulk-actions { justify-content: flex-end; margin-top: 0; }

.recovery-workspace { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr); gap: 18px; }
.recovery-controls, .recovery-status, .recovery-results { padding: clamp(26px, 4vw, 42px); background: var(--panel-fill); box-shadow: inset 0 1px 0 rgba(255, 236, 216, 0.06); backdrop-filter: blur(13px); clip-path: var(--notch-lg); }
.recovery-controls h2, .recovery-status h2, .recovery-results h2 { margin: 0 0 26px; font-size: 1.5rem; }
.recovery-actions { display: flex; gap: 10px; margin-top: 18px; }
.inline-note, .recovery-status > p, .recovery-results > p { margin: 20px 0 0; color: var(--ink-muted); font-size: 0.76rem; line-height: 1.55; }
.recovery-status dl, .recovery-results dl { margin: 0; }
.recovery-status dl div, .recovery-results dl div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 3px; padding: 12px; background: rgba(255, 255, 255, 0.025); }
.recovery-status dt, .recovery-status dd, .recovery-results dt, .recovery-results dd { margin: 0; }
.recovery-status dt, .recovery-results dt { color: var(--ink-muted); font-size: 0.79rem; }
.recovery-status dd, .recovery-results dd { font-size: 1.05rem; font-weight: 800; }
.recovery-results { margin-top: 18px; }
.recovery-users { margin-top: 18px; padding: clamp(24px, 4vw, 38px); background: var(--panel-fill); box-shadow: inset 0 1px 0 rgba(255, 236, 216, 0.06); backdrop-filter: blur(13px); clip-path: var(--notch-lg); }
.recovery-users > header { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.recovery-users h2 { margin: 0; font-size: 1.5rem; }
.recovery-users header span { color: var(--ink-muted); font-size: 0.76rem; }
.recovery-user-list { max-height: 480px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; overflow: auto; }
.recovery-user-list article { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 13px; background: rgba(255, 255, 255, 0.045); clip-path: var(--notch-sm); }
.recovery-user-list img { width: 42px; height: 42px; object-fit: cover; border-radius: 50%; }
.recovery-user-list article > div { min-width: 0; }
.recovery-user-list strong, .recovery-user-list article > div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recovery-user-list strong { font-size: 0.82rem; }
.recovery-user-list article > div span { margin-top: 4px; color: var(--ink-faint); font-size: 0.66rem; }
.recovery-user-state { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); font-size: 0.7rem; }
.recovery-user-state svg { width: 15px; height: 15px; }
.recovery-user-state.banned { color: var(--red); }
.recovery-user-state.unbanned { color: var(--green); }

.confirmation-layer { position: fixed; z-index: 150; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(4, 6, 8, 0.65); backdrop-filter: blur(10px); }
.confirmation-panel { width: min(100%, 460px); padding: 34px; border: 0; background: var(--panel-fill); box-shadow: inset 0 1px 0 rgba(255, 236, 216, 0.08), 0 8px 18px rgba(0, 0, 0, 0.36); clip-path: var(--notch-lg); }
.confirmation-panel h2 { margin: 0; font-size: 1.65rem; }
.confirmation-panel p { margin: 17px 0 26px; color: var(--ink-muted); line-height: 1.6; }
.confirmation-actions { display: flex; justify-content: flex-end; gap: 10px; }
.admin-toast { position: fixed; z-index: 200; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 48px)); min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 13px 17px; border: 0; color: var(--ink); background: linear-gradient(145deg, rgba(48, 34, 29, 0.98), rgba(7, 9, 12, 0.98) 72%); box-shadow: inset 0 1px 0 rgba(255, 236, 216, 0.1), 0 4px 8px rgba(0, 0, 0, 0.24); clip-path: var(--notch-md); font-size: 0.8rem; animation: toast-arrive 180ms cubic-bezier(0.18, 0.82, 0.22, 1); }
.admin-toast svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--green); }
.admin-toast[data-tone="error"] svg { color: var(--red); }

@keyframes status-spin { to { transform: rotate(360deg); } }
@keyframes toast-arrive { from { transform: translateX(12px); } to { transform: translateX(0); } }
@keyframes skeleton-shine { to { transform: translateX(105%); } }

@keyframes loader-track {
	from { transform: translateX(-105%); }
	to { transform: translateX(340%); }
}

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

@media (max-width: 800px) {
	body::before { background-position: 43% center; }
	.admin-layout { display: block; }
	.admin-sidebar { position: static; width: 100%; height: auto; display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 14px 17px; border-right: 0; box-shadow: inset 0 -1px rgba(255, 255, 255, 0.08); }
	.admin-brand { min-height: 40px; padding: 0; border: 0; }
	.admin-brand img { width: 28px; height: 28px; }
	.admin-nav { display: none; }
	.sidebar-account { margin: 0; padding: 0; border: 0; }
	.account-copy a { display: none; }
	.admin-main { padding: 22px 17px 95px; }
	.admin-header { min-height: 68px; margin-bottom: 16px; padding: 0 0 16px; }
	.admin-header h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
	.save-cluster { gap: 8px; }
	.save-status span { display: none; }
	.admin-button { min-height: 42px; padding: 0 15px; }
	.mobile-admin-nav { position: sticky; top: 0; z-index: 25; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(74px, 1fr); gap: 3px; margin: -1px -17px 20px; padding: 9px; overflow-x: auto; border-bottom: 0; background: rgba(7, 11, 16, 0.82); box-shadow: inset 0 -1px rgba(255, 255, 255, 0.08); backdrop-filter: blur(16px); }
	.mobile-admin-nav button { min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 4px; border: 0; color: var(--ink-muted); background: transparent; font-size: 0.68rem; font-weight: 750; }
	.mobile-admin-nav svg { width: 15px; height: 15px; }
	.mobile-admin-nav button.active { color: var(--ink); background: var(--panel-fill-selected); clip-path: var(--notch-sm); }
	.module-grid, .form-grid, .choice-grid, .recovery-workspace, .ticket-publisher { grid-template-columns: 1fr; }
	.automod-action-grid, .automod-surface-grid { grid-template-columns: 1fr; }
	.automod-rule-card { padding-inline: 18px; }
	.automod-rule-header { align-items: flex-start; padding: 17px 0; }
	.configuration-section { padding: 21px 18px; }
	.bot-rank-card { grid-template-columns: 1fr; gap: 17px; }
	.bot-rank-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bot-rank-card.custom .bot-rank-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bot-rank-fields > .form-field:first-child:nth-last-child(3) { grid-column: 1 / -1; }
	.verification-role-reconciliation { padding: 20px; }
	.verification-resync-mode-picker { grid-template-columns: 1fr; }
	.verification-role-reconciliation-actions { align-items: stretch; flex-direction: column; }
	.verification-role-reconciliation-button { width: 100%; }
	.ai-provider-console { grid-template-columns: 1fr; }
	.ai-provider-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.065); }
	.ai-provider-directory-button + .ai-provider-directory-button { margin-top: 0; }
	.ai-provider-detail-header { align-items: flex-start; }
	.ai-credential-composer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ai-credential-composer .ai-connect-key { grid-column: 1 / -1; justify-self: start; }
	.ai-fallback-row { grid-template-columns: 30px minmax(0, 1fr) 104px; align-items: end; }
	.ai-fallback-row > .ai-route-model { grid-column: 2 / -1; }
	.ai-fallback-row > .ai-route-vision { grid-column: 2; }
	.ai-fallback-actions { grid-column: 3; }
	.emoji-upload-form { grid-template-columns: 1fr; }
	.module-card { min-height: 148px; }
	.module-modal { padding: 12px; }
	.module-editor { height: calc(100vh - 24px); max-height: calc(100vh - 24px); }
	.module-editor > header { align-items: center; padding: 18px; }
	.module-editor-heading { min-width: 0; flex-wrap: wrap; gap: 10px; }
	.module-editor-heading h2 { font-size: 1.8rem; }
	.module-editor-icon { width: 22px; height: 22px; }
	.module-editor-actions { gap: 8px; }
	.modal-save { min-height: 40px; padding: 0 12px; font-size: 0.73rem; }
	.editor-close { width: 40px; height: 40px; }
	.module-editor-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
	.module-page-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 9px; overflow: visible; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.07); }
	.module-page-button { min-width: 0; min-height: 42px; grid-template-columns: 17px minmax(0, 1fr); padding: 0 12px; }
	.module-page-button svg { width: 16px; height: 16px; }
	.module-editor-page, .configuration-editor { padding: 23px 20px; }
	.form-field.wide, .form-field:has(textarea) { grid-column: auto; }
	.rule-table > div { grid-template-columns: 1fr 1fr; }
	.rule-table > div > strong { grid-column: 1 / -1; }
	.stat-cell { min-height: 122px; padding: 20px; }
	.stat-cell strong { font-size: 2.65rem; }
	.overview-section { padding: 24px 20px; }
	.runtime-values div { grid-template-columns: 105px minmax(0, 1fr); }
	.recovery-actions { flex-wrap: wrap; }
	.recovery-user-list { grid-template-columns: 1fr; }
	.verification-workspace { min-height: 0; grid-template-columns: 1fr; }
	.verification-list-pane { box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.07); }
	.verification-record-list { max-height: none; }
	.verification-record-detail { max-height: none; }
	.management-split { min-height: 0; grid-template-columns: 1fr; }
	.management-split-side { box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.07); }
	.appeals-workspace { min-height: 0; grid-template-columns: 1fr; }
	.appeals-list-pane { box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.07); }
	.appeal-record-list { max-height: 300px; }
	.appeal-detail { max-height: none; }
	.appeals-toolbar { align-items: stretch; flex-direction: column; }
	.management-detail { max-height: none; }
	.record-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.management-inline-editor { grid-template-columns: 1fr; }
	.guild-member-browser { grid-template-columns: 1fr; align-items: start; }
	.guild-member-count { justify-self: start; }
	.guild-role-editor .form-grid { grid-template-columns: 1fr 1fr; }
	.guild-role-editor .form-field:first-child { grid-column: 1 / -1; }
	.guild-role-permissions { grid-template-columns: 1fr 1fr; }
	.management-entity-list > article { grid-template-columns: 1fr; }
	.guild-member-row { grid-template-columns: 42px minmax(0, 1fr) !important; }
	.guild-member-row .entity-controls { grid-column: 1 / -1; }
	.management-entity-list.verification-linked-list > article { grid-template-columns: 40px minmax(0, 1fr); }
	.verification-linked-list .admin-button { grid-column: 2; justify-self: start; }
	.entity-controls { justify-content: flex-start; flex-wrap: wrap; }
	.entity-controls .form-field { min-width: min(100%, 240px); flex: 1; }
}

@media (max-width: 520px) {
	.account-copy strong { max-width: 88px; }
	.admin-header { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px; }
	.admin-header h1 { min-width: 0; font-size: clamp(2.25rem, 12vw, 3rem); }
	.save-cluster { width: 100%; justify-content: space-between; }
	.save-cluster .admin-button { min-width: 132px; }
	.module-grid { grid-template-columns: 1fr; }
	.stat-grid { grid-template-columns: 1fr 1fr; }
	.stat-cell { min-height: 108px; padding: 17px; }
	.stat-cell span { font-size: 0.64rem; }
	.stat-cell strong { font-size: 2.1rem; }
	.module-meter strong { font-size: 4rem; }
	.rule-table > div { grid-template-columns: 1fr; }
	.rule-table > div > strong { grid-column: auto; }
	.option-picker-menu { position: fixed; top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; max-height: min(70vh, 520px); }
	.option-picker-list { max-height: min(58vh, 440px); }
	.guild-role-editor .form-grid, .guild-role-permissions { grid-template-columns: 1fr; }
	.module-modal { padding: 0; }
	.module-editor { width: 100%; height: 100vh; max-height: 100vh; min-height: 0; clip-path: none; }
	.module-editor > header { padding: 14px; }
	.module-editor-heading { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; flex: 1; }
	.module-editor-heading h2 { grid-column: 2; font-size: clamp(1.35rem, 7vw, 1.8rem); }
	.module-editor-heading .module-editor-icon { grid-column: 1; grid-row: 1; }
	.module-editor-heading .switch-control { grid-column: 2; justify-self: start; }
	.module-editor-heading .switch-control strong { display: block; }
	.verification-record-detail .record-tabs { gap: 2px; }
	.verification-record-detail .record-tabs button { min-height: 38px; padding: 0 2px; font-size: 0.56rem; }
	.verification-record-detail .record-tabs button svg { display: none; }
	.is-empty .lookup-stage { padding-right: 0; padding-left: 0; }
	.is-empty .lookup-stage input, .is-empty .lookup-stage .admin-button { min-height: 56px; }
	.selected-value { max-width: 132px; }
	.configuration-section-heading { align-items: stretch; flex-direction: column; gap: 15px; }
	.configuration-section-heading .admin-button { width: 100%; }
	.bot-rank-card { padding: 17px 15px; }
	.bot-rank-card > header { grid-template-columns: 23px minmax(0, 1fr); }
	.bot-rank-controls { grid-column: 2; }
	.bot-rank-fields { grid-template-columns: 1fr; }
	.bot-rank-card.custom .bot-rank-fields { grid-template-columns: 1fr; }
	.bot-rank-fields > .form-field:first-child:nth-last-child(3) { grid-column: auto; }
	.ai-provider-detail { padding: 16px; }
	.ai-provider-detail-header { display: grid; }
	.ai-provider-detail-actions { flex-wrap: wrap; justify-content: space-between; }
	.ai-credential-composer { grid-template-columns: 1fr; }
	.ai-credential-composer .ai-connect-key { grid-column: 1; }
	.ai-fallback-row { grid-template-columns: 24px minmax(0, 1fr); padding: 12px; }
	.ai-fallback-row > .ai-route-model, .ai-fallback-row > .ai-route-vision, .ai-fallback-actions { grid-column: 2; }
	.ai-fallback-actions { justify-content: flex-start; }
	.recovery-user-list article { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 10px; }
	.recovery-user-list img { width: 38px; height: 38px; }
	.management-toolbar { flex-direction: column; }
	.linked-discord-section > div { align-items: flex-start; flex-direction: column; }
	.record-disclosure { grid-template-columns: minmax(0, 1fr) 16px; }
	.record-disclosure time { grid-column: 1; grid-row: 2; }
	.record-disclosure svg { grid-column: 2; grid-row: 1 / span 2; }
	.match-disclosure { grid-template-columns: minmax(0, 1fr) 16px; }
	.match-disclosure > span { grid-column: 1; grid-row: 2; }
	.match-disclosure svg { grid-column: 2; grid-row: 1 / span 2; }
	.management-detail { padding: 22px 16px; }
	.management-detail > header { align-items: flex-start; }
	.management-identity { align-items: flex-start; }
	.management-detail > header img, .management-detail > header .hoplex-avatar { width: 54px; height: 54px; }
	.record-tabs { margin: 0 -4px; }
	.record-metrics div { min-height: 82px; padding: 12px; }
	.snapshot-row { align-items: flex-start; }
}

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

.bot-ui-color-field {
	position: relative;
}
.bot-ui-color-field input[type="color"] {
	width: 54px;
	height: 34px;
	padding: 3px;
	border: 0;
	background: var(--control-fill);
	box-shadow: inset 0 0 0 1px var(--line-strong);
	clip-path: var(--control-cut);
	cursor: pointer;
}
.bot-ui-swatch {
	font-size: 0.72rem;
	color: var(--ink-muted);
	margin-right: 8px;
}
.bot-ui-preview {
	position: relative;
	max-width: 760px;
	padding: 22px 24px 20px 29px;
	background: linear-gradient(145deg, rgba(67, 44, 35, 0.66), rgba(8, 11, 15, 0.78) 72%);
	box-shadow: inset 0 1px 0 rgba(255, 235, 212, 0.08);
	clip-path: var(--notch-md);
	overflow: hidden;
	transition: padding 160ms ease, filter 160ms ease;
}
.bot-ui-preview.airy { padding-block: 29px 26px; }
.bot-ui-preview.disabled { filter: saturate(0.35); }
.bot-ui-preview-accent {
	position: absolute;
	left: 0;
	top: 15px;
	bottom: 15px;
	width: 5px;
	background: var(--bot-ui-preview-accent, #5865f2);
	clip-path: polygon(0 0, 100% 8px, 100% calc(100% - 8px), 0 100%);
}
.bot-ui-preview strong {
	display: block;
	font-size: 0.96rem;
	margin-bottom: 8px;
	color: var(--ink);
}
.bot-ui-preview strong.heading { font-size: 1.08rem; letter-spacing: -0.02em; }
.bot-ui-preview strong.bold { font-size: 0.9rem; }
.bot-ui-preview p {
	margin: 0;
	color: var(--ink-muted);
	font-size: 0.79rem;
	line-height: 1.55;
}
.bot-ui-preview small {
	color: var(--ink-faint);
	font-size: 0.68rem;
}
.bot-ui-preview-divider { display: block; height: 2px; margin: 15px 0 12px; background: rgba(230, 188, 134, 0.22); clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 4px 100%); }
.bot-ui-preview.without-dividers .bot-ui-preview-divider { display: none; }
.admin-select {
	min-height: 44px;
	padding: 8px 12px;
	border: 0;
	background: var(--control-fill);
	box-shadow: inset 0 0 0 1px var(--line);
	clip-path: var(--control-cut);
	color: var(--ink);
	font-size: 0.78rem;
}

.bot-ui-preview-button {
	display: inline-block;
	margin-top: 10px;
	padding: 7px 14px;
	border-radius: 6px;
	background: #5865f2;
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
}
