:root {
	--primary-color: #4dabf7;
	--success-color: #51cf66;
	--danger-color: #ff6b6b;
	--warning-color: #fcc419;
	--light-color: #e9ecef;
	--dark-color: #212529;
	--border-color: #495057;
	--body-bg: #212529;
	--surface: #2d3238;
	--surface-raised: #343a40;
	--muted: #adb5bd;
	--shell-accent: #67e8f9;
	--shell-accent-strong: #38bdf8;
	--shell-accent-soft: rgba(103, 232, 249, 0.16);
	--shell-border-soft: rgba(148, 163, 184, 0.28);
	--shell-card-bg: linear-gradient(180deg, rgba(48, 55, 64, 0.96) 0%, rgba(36, 43, 50, 0.98) 100%);
	--shell-card-bg-alt: linear-gradient(180deg, rgba(34, 40, 47, 0.98) 0%, rgba(28, 34, 40, 0.98) 100%);
	--shell-shadow: 0 18px 40px rgba(8, 15, 22, 0.22);
	--shell-text-soft: #9fb0c0;
	--font-size-body: 17px;
	--font-size-small: 0.98rem;
	--font-size-caption: 0.86rem;
	--font-size-label: 1rem;
	--font-size-control: 1.02rem;
	--font-size-nav: 1.04rem;
	--font-size-h1: clamp(2.25rem, 4vw, 3.5rem);
	--font-size-h2: 1.42rem;
	--font-size-h3: 1.12rem;
	--font-size-h4: 1rem;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
.bm {
	display: none;
}
#burger {
	display: none;
}
body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
		'Helvetica Neue', Arial, sans-serif;
	background:
		radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 24%),
		radial-gradient(circle at top right, rgba(45, 212, 191, 0.1), transparent 22%),
		linear-gradient(180deg, #171c22 0%, #1f252c 100%);
	color: var(--light-color);
	font-size: var(--font-size-body);
	line-height: 1.6;
	padding: 20px;
	min-height: 100vh;
}

.container {
	max-width: 1460px;
	margin: 0 auto;
	padding: 0;
}

h1 {
	text-align: center;
	margin-bottom: 30px;
	color: var(--light-color);
	font-size: var(--font-size-h1);
}

h2 {
	color: var(--primary-color);
	border-bottom: 2px solid var(--border-color);
	padding-bottom: 10px;
	margin-bottom: 20px;
	font-size: var(--font-size-h2);
}

h3 {
	margin-bottom: 15px;
	color: var(--light-color);
	font-size: var(--font-size-h3);
}

h4 {
	margin-top: 20px;
	margin-bottom: 10px;
	color: var(--light-color);
	font-size: var(--font-size-h4);
}

.settings-page-intro {
	max-width: 760px;
	margin: -14px auto 26px;
	text-align: center;
	color: var(--shell-text-soft);
	font-size: var(--font-size-small);
}

.admin-main {
	display: grid;
	gap: 24px;
}

.admin-page-head {
	padding: 8px 0 2px;
}

.admin-page-head h1 {
	margin-bottom: 10px;
	font-size: clamp(2.1rem, 3.8vw, 3.4rem);
	letter-spacing: -0.035em;
	color: #f4f8fb;
}

.admin-page-intro {
	max-width: 820px;
}

.admin-section-card {
	background: var(--shell-card-bg);
	border: 1px solid var(--shell-border-soft);
	border-radius: 18px;
	padding: 24px;
	box-shadow: var(--shell-shadow);
}

.admin-section-card h2 {
	margin-bottom: 8px;
	padding-bottom: 0;
	border-bottom: none;
	color: #f4f8fb;
	font-size: 1.32em;
	letter-spacing: -0.01em;
}

.debug-panel {
	display: grid;
	gap: 18px;
}

.debug-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
}

.debug-card {
	background: var(--shell-card-bg-alt);
	border: 1px solid rgba(120, 140, 160, 0.22);
	border-radius: 14px;
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.debug-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.debug-flash-list {
	display: grid;
	gap: 12px;
}

.settings-column-main {
	--settings-accent: #67e8f9;
	--settings-accent-strong: #38bdf8;
	--settings-accent-soft: rgba(103, 232, 249, 0.16);
	--settings-border-soft: rgba(148, 163, 184, 0.28);
	--settings-section-bg: linear-gradient(180deg, rgba(48, 55, 64, 0.96) 0%, rgba(36, 43, 50, 0.98) 100%);
	--settings-subsection-bg: linear-gradient(180deg, rgba(34, 40, 47, 0.98) 0%, rgba(28, 34, 40, 0.98) 100%);
}

.settings-section {
	margin-bottom: 40px;
}

.settings-column-main .settings-section {
	background: var(--settings-section-bg);
	border: 1px solid var(--settings-border-soft);
	border-radius: 18px;
	padding: 24px;
	box-shadow: 0 18px 40px rgba(8, 15, 22, 0.22);
}

.settings-column-main .settings-section h2 {
	margin-bottom: 8px;
	padding-bottom: 0;
	border-bottom: none;
	color: #f4f8fb;
	font-size: calc(var(--font-size-h3) + 0.12rem);
	letter-spacing: -0.01em;
}

.settings-section-intro {
	margin-bottom: 18px;
	color: #9fb0c0;
	font-size: var(--font-size-small);
	max-width: 760px;
}

.settings-subsection {
	margin-bottom: 18px;
	padding: 18px 18px 4px;
	border: 1px solid rgba(120, 140, 160, 0.22);
	border-radius: 14px;
	background: var(--settings-subsection-bg);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.settings-subsection:last-child {
	margin-bottom: 0;
}

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

.settings-subsection-head h3 {
	margin: 0;
	font-size: var(--font-size-h3);
}

.settings-card-grid {
	display: grid;
	gap: 16px;
}

.settings-card-grid-payments {
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	align-items: start;
}

.settings-provider-card,
.settings-mode-card {
	height: 100%;
}

.settings-chip {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid rgba(103, 232, 249, 0.28);
	background: rgba(103, 232, 249, 0.12);
	color: #d5f7ff;
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.settings-chip-muted {
	border-color: rgba(148, 163, 184, 0.24);
	background: rgba(148, 163, 184, 0.12);
	color: #c8d3df;
}

.settings-inline-note {
	margin-top: 8px;
}

.settings-form-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 32px;
	padding: 18px 20px;
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(34, 41, 48, 0.96) 0%, rgba(28, 34, 40, 0.98) 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.settings-form-actions-copy {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 560px;
}

.settings-form-actions-copy strong {
	color: #f4f8fb;
	font-size: 0.98em;
}

.settings-form-actions-copy span {
	color: #9fb0c0;
	font-size: 0.9em;
}

.settings-inline-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 12px;
}

.settings-runtime-subsection {
	margin-top: 22px;
}

.settings-runtime-description,
.settings-runtime-note {
	margin: 8px 0 0;
	color: #9fb0c0;
	font-size: 0.92em;
	line-height: 1.55;
	max-width: 760px;
}

.settings-runtime-status-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
}

.settings-runtime-status {
	display: flex;
	align-items: center;
	gap: 10px;
}

.settings-runtime-label {
	color: #cbd7e2;
	font-weight: 600;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: var(--light-color);
	font-size: var(--font-size-label);
}

.settings-column-main .form-group label {
	color: #edf5fb;
}

.form-group input[type='text'],
.form-group input[type='url'],
.form-group input[type='password'],
.form-group input[type='number'],
.form-group select,
.form-group textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--border-color);
	border-radius: 5px;
	font-size: var(--font-size-control);
	transition: border-color 0.2s, box-shadow 0.2s;
	background-color: var(--surface-raised);
	color: var(--light-color);
}

.settings-column-main .form-group input[type='text'],
.settings-column-main .form-group input[type='url'],
.settings-column-main .form-group input[type='password'],
.settings-column-main .form-group input[type='number'],
.settings-column-main .form-group select,
.settings-column-main .form-group textarea {
	background-color: rgba(20, 26, 33, 0.78);
	border-color: rgba(120, 140, 160, 0.26);
	border-radius: 10px;
}

.settings-column-main .form-group small,
.settings-column-main small {
	display: block;
	margin-top: 7px;
	color: #92a5b8;
}

.form-group textarea {
	resize: vertical;
	min-height: 80px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.25);
}

.form-group-checkbox {
	display: flex;
	align-items: center;
	margin-top: 15px;
}

.form-group-checkbox input[type='checkbox'] {
	width: 18px;
	height: 18px;
	margin-right: 10px;
}

.form-group-checkbox label {
	margin-bottom: 0;
	font-weight: normal;
	color: var(--light-color);
}

.password-wrapper {
	position: relative;
}

.toggle-password {
	position: absolute;
	top: 42.5%;
	right: 0px;
	height: calc(57.5%);
	width: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: #495057;
	cursor: pointer;
	border-radius: 5px;
	font-size: 20px;
	padding: 0;
	color: var(--light-color);
}

.toggle-password:hover {
	background: #5c636a;
}

.settings-column-main .toggle-password {
	background: linear-gradient(180deg, rgba(67, 77, 88, 0.96) 0%, rgba(50, 59, 68, 0.98) 100%);
	border: 1px solid rgba(120, 140, 160, 0.24);
	border-left: none;
	border-radius: 0 10px 10px 0;
}

.settings-column-main .toggle-password:hover {
	background: linear-gradient(180deg, rgba(81, 92, 104, 1) 0%, rgba(60, 69, 78, 1) 100%);
}

.admin-shell .form-group input[type='text'],
.admin-shell .form-group input[type='url'],
.admin-shell .form-group input[type='password'],
.admin-shell .form-group input[type='number'],
.admin-shell .form-group select,
.admin-shell .form-group textarea,
body.login-page .form-group input[type='text'],
body.login-page .form-group input[type='password'] {
	background-color: rgba(20, 26, 33, 0.78);
	border-color: rgba(120, 140, 160, 0.26);
	border-radius: 10px;
}

.button {
	display: inline-block;
	padding: 12px 25px;
	font-size: var(--font-size-control);
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	border: none;
	border-radius: 10px;
	transition: background-color 0.2s, transform 0.1s;
	color: #fff;
	text-decoration: none;
}

.button:active {
	transform: translateY(1px);
}

.button-primary {
	background-color: var(--primary-color);
}
.button-primary:hover {
	background-color: #339af0;
}

.settings-column-main .button-primary {
	background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
	box-shadow: 0 12px 28px rgba(2, 132, 199, 0.26);
}

.settings-column-main .button-primary:hover {
	background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 100%);
}

.admin-shell .button-primary,
body.login-page .button-primary {
	background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
	box-shadow: 0 12px 28px rgba(2, 132, 199, 0.26);
}

.admin-shell .button-primary:hover,
body.login-page .button-primary:hover {
	background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 100%);
}

.button-start {
	background-color: var(--success-color);
}
.button-start:hover {
	background-color: #37b24d;
}

.button-stop {
	background-color: var(--warning-color);
	color: #1f2328;
}
.button-stop:hover {
	background-color: #e0a800;
}

.button-danger {
	background-color: var(--danger-color);
}
.button-danger:hover {
	background-color: #fa5252;
}

.button-warning {
	background-color: var(--warning-color);
	color: #1f2328;
}
.button-warning:hover {
	background-color: #e0a800;
}

.button-disabled {
	background-color: #6c757d;
	cursor: not-allowed;
	opacity: 0.7;
}

.button-small {
	padding: 8px 15px;
	font-size: 14px;
}

.button-tiny {
	padding: 2px 8px;
	font-size: 12px;
	line-height: 1.5;
}

.flash {
	padding: 14px 18px;
	margin-bottom: 18px;
	border: 1px solid rgba(120, 140, 160, 0.24);
	border-radius: 14px;
	box-shadow: 0 14px 32px rgba(8, 15, 22, 0.18);
	backdrop-filter: blur(10px);
}

.flash-success {
	color: var(--light-color);
	background: linear-gradient(180deg, rgba(42, 104, 62, 0.92) 0%, rgba(31, 78, 48, 0.96) 100%);
	border-color: rgba(82, 196, 122, 0.36);
}

.flash-danger {
	color: var(--light-color);
	background: linear-gradient(180deg, rgba(122, 46, 52, 0.92) 0%, rgba(96, 34, 40, 0.96) 100%);
	border-color: rgba(255, 107, 107, 0.32);
}

.user-session-controls {
	display: flex;
	align-items: center;
	gap: 15px;
}

.button-logout {
	background: linear-gradient(180deg, rgba(67, 77, 88, 0.96) 0%, rgba(50, 59, 68, 0.98) 100%);
	border: 1px solid rgba(120, 140, 160, 0.24);
	padding: 10px 16px;
	font-size: 14px;
}
.button-logout:hover {
	background: linear-gradient(180deg, rgba(81, 92, 104, 1) 0%, rgba(60, 69, 78, 1) 100%);
}

body.login-page {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 24px;
}

.login-container {
	width: 100%;
	max-width: 460px;
	padding: 32px 34px;
	background: var(--shell-card-bg);
	border-radius: 22px;
	border: 1px solid var(--shell-border-soft);
	box-shadow: var(--shell-shadow);
}

.login-container h1 {
	text-align: center;
	margin-bottom: 10px;
	color: #f4f8fb;
}

.login-intro {
	margin: 0 auto 24px;
	max-width: 320px;
	text-align: center;
	color: var(--shell-text-soft);
	font-size: 0.94em;
}

.main-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	padding: 16px 18px;
	margin-bottom: 20px;
	border: 1px solid rgba(120, 140, 160, 0.22);
	border-radius: 22px;
	background: rgba(24, 29, 36, 0.72);
	backdrop-filter: blur(12px);
	box-shadow: 0 16px 34px rgba(8, 15, 22, 0.2);
}

.navigation {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.navigation .nav-link {
	font-size: var(--font-size-nav);
	font-weight: 600;
	color: var(--light-color);
	text-decoration: none;
	padding: 9px 16px;
	border-radius: 999px;
	border: 1px solid rgba(120, 140, 160, 0.22);
	background-color: rgba(49, 57, 65, 0.92);
	transition: all 0.2s ease;
}

.navigation .nav-link:hover,
.navigation .nav-link.active {
	color: #eefbff;
	border-color: rgba(103, 232, 249, 0.5);
	background: linear-gradient(135deg, rgba(56, 189, 248, 0.26) 0%, rgba(45, 212, 191, 0.18) 100%);
	box-shadow: 0 12px 26px rgba(8, 47, 73, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.header-controls {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.main-footer {
	margin-top: 40px;
	padding-top: 20px;
	border-top: 1px solid var(--border-color);
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
	margin-bottom: 0;
}

.stat-card {
	background: var(--shell-card-bg-alt);
	padding: 24px 22px;
	border-radius: 16px;
	text-align: left;
	border: 1px solid rgba(120, 140, 160, 0.22);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.stat-card h3 {
	margin-top: 0;
	margin-bottom: 10px;
	color: var(--shell-text-soft);
	font-size: 0.94em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.stat-card .stat-number {
	font-size: clamp(2.5rem, 3vw, 3.2rem);
	font-weight: bold;
	color: var(--light-color);
	line-height: 1.2;
}

.stat-card .stat-number small {
	font-size: 0.4em;
	font-weight: normal;
	color: var(--muted);
}

.settings-container {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
}

.settings-column-left {
	flex: 2;
	min-width: 380px;
}

.settings-column-right {
	flex: 3;
	min-width: 450px;
}

.settings-column-main {
	flex: 1 1 100%;
	min-width: 0;
	max-width: 100%;
}

.hosts-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 18px;
}

.hosts-list-panel {
	min-width: 0;
}

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

.hosts-panel-head h3 {
	margin: 0;
	color: var(--light-color);
	font-size: 1.05em;
}

.hosts-panel-head p {
	margin-top: 4px;
	color: var(--shell-text-soft);
	font-size: 0.92em;
}

.hosts-scroll-list {
	display: grid;
	gap: 14px;
	max-height: none;
	overflow: visible;
	padding-right: 0;
}

.settings-groups-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 22px;
	padding: 14px;
	border: 1px solid rgba(120, 140, 160, 0.22);
	border-radius: 18px;
	background: rgba(24, 29, 36, 0.72);
	backdrop-filter: blur(12px);
	position: sticky;
	top: 12px;
	z-index: 20;
	box-shadow: 0 16px 34px rgba(8, 15, 22, 0.2);
}

.settings-group-tab {
	border: 1px solid rgba(120, 140, 160, 0.22);
	border-radius: 999px;
	background-color: rgba(49, 57, 65, 0.92);
	color: var(--light-color);
	font-size: 15px;
	font-weight: 600;
	padding: 10px 16px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.settings-group-tab:hover {
	border-color: rgba(103, 232, 249, 0.34);
	background-color: rgba(61, 70, 80, 0.96);
	transform: translateY(-1px);
}

.settings-group-tab.is-active {
	border-color: rgba(103, 232, 249, 0.5);
	background: linear-gradient(135deg, rgba(56, 189, 248, 0.26) 0%, rgba(45, 212, 191, 0.18) 100%);
	color: #eefbff;
	box-shadow: 0 12px 26px rgba(8, 47, 73, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.settings-column-right.settings-grouped .settings-group {
	display: none;
}

.settings-column-right.settings-grouped .settings-group.is-active {
	display: block;
	animation: settingsFadeIn 0.22s ease;
}

@keyframes settingsFadeIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.host-card {
	background-color: var(--surface);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
}

.settings-column-main .host-card {
	background: linear-gradient(180deg, rgba(43, 50, 58, 0.98) 0%, rgba(35, 41, 48, 0.98) 100%);
	border: 1px solid rgba(120, 140, 160, 0.24);
	border-radius: 14px;
	box-shadow: 0 10px 24px rgba(7, 12, 18, 0.18);
}

.settings-column-main .host-card-highlight {
	border-color: rgba(103, 232, 249, 0.7);
	box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.18), 0 10px 24px rgba(7, 12, 18, 0.18);
}

.settings-column-main .host-card-status-healthy {
	border-left: 4px solid #27ae60;
}

.settings-column-main .host-card-status-degraded {
	border-left: 4px solid #f39c12;
}

.settings-column-main .host-card-status-unavailable {
	border-left: 4px solid #e74c3c;
}

.settings-column-main .host-card-status-maintenance,
.settings-column-main .host-card-status-unknown {
	border-left: 4px solid #8e44ad;
}

.hosts-scroll-list .host-card {
	margin-bottom: 0;
}

.host-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 10px;
	margin-bottom: 15px;
}

.host-header h3 {
	margin: 0;
	color: var(--light-color);
}

.host-title-row {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.host-summary-grid,
.host-dialog-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 12px;
}

.host-summary-grid {
	margin-bottom: 12px;
}

.host-summary-grid p,
.host-dialog-meta p {
	min-width: 0;
	padding: 11px 12px;
	border: 1px solid rgba(120, 140, 160, 0.18);
	border-radius: 10px;
	background: rgba(18, 24, 31, 0.48);
}

.host-summary-grid strong,
.host-summary-grid span,
.host-dialog-meta strong,
.host-dialog-meta span {
	display: block;
}

.host-summary-grid strong,
.host-dialog-meta strong {
	margin-bottom: 3px;
	color: #9fb0c0;
	font-size: 0.78em;
	font-weight: 700;
	text-transform: uppercase;
}

.host-summary-grid span,
.host-dialog-meta span {
	color: #f0f6fb;
	overflow-wrap: anywhere;
}

.host-check-row {
	display: grid;
	gap: 4px;
}

.host-check-row small[data-host-error] {
	color: #ff9b9b;
}

.host-status {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 5px 10px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 0.84em;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
}

.host-status-healthy {
	background: rgba(39, 174, 96, 0.22);
	border-color: rgba(81, 207, 102, 0.32);
	color: #b9f8c7;
}

.host-status-degraded {
	background: rgba(243, 156, 18, 0.22);
	border-color: rgba(252, 196, 25, 0.36);
	color: #ffe7a0;
}

.host-status-unavailable {
	background: rgba(231, 76, 60, 0.22);
	border-color: rgba(255, 107, 107, 0.34);
	color: #ffc2c2;
}

.host-status-maintenance,
.host-status-unknown {
	background: rgba(142, 68, 173, 0.22);
	border-color: rgba(193, 132, 219, 0.34);
	color: #f0d1ff;
}

.host-inline-note,
.host-inline-warning {
	margin: -2px 0 12px;
	padding: 9px 11px;
	border-radius: 10px;
	font-size: 0.9em;
}

.host-inline-note {
	background: rgba(56, 189, 248, 0.1);
	border: 1px solid rgba(56, 189, 248, 0.18);
	color: #bdefff;
}

.host-inline-warning {
	background: rgba(252, 196, 25, 0.12);
	border: 1px solid rgba(252, 196, 25, 0.2);
	color: #ffe7a0;
}

.plans-section h4,
.plans-section h5 {
	color: var(--light-color);
	border: none;
}

.plan-list {
	list-style: none;
	padding: 0;
	margin-bottom: 20px;
}

.plan-list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px;
	border-bottom: 1px solid #495057;
}

.settings-column-main .plan-list li {
	border-bottom-color: rgba(120, 140, 160, 0.2);
}

.plan-list li:last-child {
	border-bottom: none;
}

.form-inline {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.form-inline input {
	flex: 1;
	min-width: 96px;
	padding: 10px !important;
	font-size: 15px !important;
}

.form-inline button {
	flex-shrink: 0;
}

.host-token-form {
	margin: 8px 0 4px;
}

.settings-dialog {
	inset: 0;
	margin: auto;
	width: min(960px, calc(100vw - 32px));
	max-width: 100%;
	max-height: min(92vh, 1040px);
	padding: 0;
	border: none;
	border-radius: 18px;
	background: transparent;
	color: var(--light-color);
}

.settings-dialog::backdrop {
	background: rgba(5, 10, 16, 0.78);
	backdrop-filter: blur(9px);
}

.settings-dialog-shell {
	max-height: min(92vh, 1040px);
	overflow: auto;
	background: var(--settings-section-bg);
	border: 1px solid rgba(148, 163, 184, 0.28);
	border-radius: 18px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.48);
}

.add-host-dialog .settings-dialog-shell {
	max-height: min(96vh, 1040px);
}

.settings-dialog-header {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 22px;
	border-bottom: 1px solid rgba(120, 140, 160, 0.2);
	background: rgba(30, 37, 45, 0.96);
	backdrop-filter: blur(12px);
}

.settings-dialog-header h3 {
	margin: 0;
	font-size: 1.22em;
}

.settings-dialog-kicker {
	margin-bottom: 2px;
	color: #8fdcf6;
	font-size: 0.76em;
	font-weight: 700;
	text-transform: uppercase;
}

.dialog-close {
	width: 40px;
	height: 40px;
	border: 1px solid rgba(148, 163, 184, 0.24);
	border-radius: 10px;
	background: rgba(54, 64, 74, 0.92);
	color: var(--light-color);
	cursor: pointer;
	font-size: 1.45em;
	line-height: 1;
}

.dialog-close:hover {
	background: rgba(74, 86, 98, 0.98);
}

.settings-dialog-body {
	display: grid;
	gap: 16px;
	padding: 22px;
}

.dialog-section,
.token-source {
	border: 1px solid rgba(120, 140, 160, 0.22);
	border-radius: 14px;
	background: var(--settings-subsection-bg);
}

.dialog-section {
	padding: 18px;
}

.dialog-section-head {
	display: grid;
	gap: 2px;
	margin-bottom: 14px;
}

.dialog-section-head h4 {
	margin: 0;
}

.dialog-section-head p {
	color: var(--shell-text-soft);
	font-size: 0.92em;
}

.dialog-form-columns,
.dialog-form-grid {
	display: grid;
	gap: 14px;
}

.dialog-form-columns {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dialog-form-grid {
	grid-template-columns: minmax(180px, 1fr) minmax(110px, 0.45fr) minmax(130px, 0.5fr) auto;
	align-items: end;
}

.dialog-form-grid .form-group,
.dialog-form-columns .form-group,
.token-source .form-group {
	margin-bottom: 0;
}

.dialog-form-submit {
	padding-bottom: 1px;
}

.dialog-actions,
.host-dialog-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.dialog-actions {
	margin-top: 16px;
}

.token-source {
	display: grid;
	gap: 14px;
	margin: 0;
	padding: 16px;
}

.token-source legend {
	padding: 0 8px;
	color: #eaf4fb;
	font-weight: 700;
}

.token-source-modes {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.token-source-modes label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 8px 12px;
	border: 1px solid rgba(120, 140, 160, 0.22);
	border-radius: 10px;
	background: rgba(18, 24, 31, 0.52);
	cursor: pointer;
}

.token-source-modes input {
	width: 18px;
	height: 18px;
	margin: 0;
}

.token-source-panel {
	display: grid;
	gap: 12px;
}

.token-source-panel[hidden] {
	display: none;
}

.host-danger-zone {
	background: rgba(120, 36, 36, 0.16);
	border-color: rgba(255, 107, 107, 0.2);
}

.status-running {
	color: var(--success-color);
}

.status-stopped {
	color: var(--muted);
}

.status-warning {
	color: var(--warning-color);
	font-size: 0.9em;
}

.dashboard-analytics-panel {
	padding: 24px;
}

.dashboard-toolbar {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.live-sync-bar {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 10px;
	margin-left: auto;
}

.dashboard-live-sync-bar {
	margin-left: auto;
}

.live-sync-status {
	font-size: 0.8em;
	color: var(--shell-text-soft);
	white-space: nowrap;
}

.live-sync-status.is-error {
	color: var(--warning-color);
}

.live-sync-refresh {
	white-space: nowrap;
}

.dashboard-filter-group {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.dashboard-filter-label {
	font-size: 0.78em;
	color: var(--shell-text-soft);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.dashboard-filter-buttons {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.dashboard-filter-btn {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 999px;
	border: 1px solid rgba(120, 140, 160, 0.22);
	background: rgba(49, 57, 65, 0.92);
	color: var(--light-color);
	font-weight: 600;
	font-size: 0.9em;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease;
}

.dashboard-filter-btn:hover {
	border-color: rgba(103, 232, 249, 0.34);
	background-color: rgba(61, 70, 80, 0.96);
	transform: translateY(-1px);
}

.dashboard-filter-btn--active {
	border-color: rgba(103, 232, 249, 0.5);
	background: linear-gradient(135deg, rgba(56, 189, 248, 0.26) 0%, rgba(45, 212, 191, 0.18) 100%);
	color: #eefbff;
	box-shadow: 0 12px 26px rgba(8, 47, 73, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dashboard-filter-btn--action {
	border-style: dashed;
}

.dashboard-filter-btn--reset {
	border-color: var(--danger-color);
	color: var(--danger-color);
	background: transparent;
}

.dashboard-filter-btn--reset:hover {
	background: rgba(255, 107, 107, 0.15);
}

.dashboard-filter-caption {
	color: var(--shell-text-soft);
	margin-bottom: 16px;
}

.dashboard-kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 12px;
	margin-bottom: 14px;
}

.dashboard-kpi-card {
	background: var(--shell-card-bg-alt);
	border: 1px solid rgba(120, 140, 160, 0.22);
	border-radius: 14px;
	padding: 14px 16px 12px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
	display: flex;
	flex-direction: column;
	min-height: 116px;
}

.dashboard-kpi-label {
	font-size: 0.78em;
	color: var(--shell-text-soft);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.dashboard-kpi-value {
	font-size: 1.35em;
	font-weight: 700;
	color: var(--light-color);
	margin-top: auto;
	padding-top: 10px;
}

.dashboard-kpi-value small {
	font-size: 0.62em;
	font-weight: 500;
	color: var(--muted);
}

.dashboard-type-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 10px;
}
.dashboard-type-summary + .dashboard-type-summary {
	margin-top: 10px;
}

.dashboard-type-summary-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 14px;
	border: 1px solid rgba(120, 140, 160, 0.22);
	background: var(--shell-card-bg-alt);
}

.dashboard-type-summary-item span {
	color: var(--shell-text-soft);
	font-size: 0.88em;
}

.dashboard-type-summary-item strong {
	font-size: 1.05em;
	color: var(--light-color);
}

.dashboard-source-summary .dashboard-type-summary-item {
	justify-content: center;
	text-align: center;
}

.dashboard-type-summary-item--btn {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}

.dashboard-type-summary-item--btn:hover {
	border-color: rgba(103, 232, 249, 0.34);
	background: linear-gradient(180deg, rgba(51, 59, 69, 0.98) 0%, rgba(41, 49, 58, 0.98) 100%);
}

.dashboard-type-summary-item--btn.dashboard-type-summary-item--active {
	border-color: rgba(103, 232, 249, 0.5);
	background: linear-gradient(135deg, rgba(56, 189, 248, 0.26) 0%, rgba(45, 212, 191, 0.18) 100%);
	box-shadow: 0 12px 26px rgba(8, 47, 73, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dashboard-type-summary-item--btn.dashboard-type-summary-item--active span,
.dashboard-type-summary-item--btn.dashboard-type-summary-item--active strong {
	color: #eefbff;
}

.dashboard-collapsible {
	margin-top: 16px;
	border: 1px solid rgba(120, 140, 160, 0.22);
	border-radius: 16px;
	background: var(--shell-card-bg-alt);
	overflow: hidden;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dashboard-collapsible > summary {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	cursor: pointer;
	font-weight: 600;
	color: var(--light-color);
}

.dashboard-collapsible > summary::-webkit-details-marker {
	display: none;
}

.dashboard-collapsible > summary::after {
	content: '▾';
	margin-left: 6px;
	font-size: 0.85em;
	color: var(--muted);
	transition: transform 0.2s ease;
}

.dashboard-collapsible[open] > summary::after {
	transform: rotate(180deg);
}

.dashboard-collapsible-summary-meta {
	margin-left: auto;
	font-size: 0.84em;
	font-weight: 500;
	color: var(--muted);
}

.dashboard-collapsible-body {
	padding: 16px;
	border-top: 1px solid rgba(120, 140, 160, 0.18);
}

.dashboard-collapsible-body .transactions-table {
	margin-top: 0;
}

.dashboard-chart-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 18px;
}

.dashboard-chart-grid .chart-container {
	max-width: 100%;
	max-height: none;
	min-height: auto;
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.chart-canvas-wrap {
	position: relative;
	width: 100%;
	height: 320px;
}

.chart-canvas-wrap canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

.transactions-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.transactions-panel-subtitle {
	color: var(--muted);
	font-size: 0.9em;
}

.chart-container {
	background: var(--shell-card-bg-alt);
	border: 1px solid rgba(120, 140, 160, 0.22);
	border-radius: 16px;
	margin-bottom: 0;
	padding: 20px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.chart-container h3 {
	margin: 0;
	color: #eef5fb;
	font-size: 1.05em;
}

.transaction-list {
	list-style: none;
	padding: 0;
}

.transaction-item {
	background-color: var(--surface);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 15px;
	margin-bottom: 15px;
}

.transaction-item p {
	margin: 0 0 8px 0;
	font-size: 0.95em;
	color: var(--light-color);
}

.transaction-item p strong {
	color: var(--light-color);
	display: inline-block;
	width: 130px;
}

.transaction-item .user-info {
	color: var(--primary-color);
	font-weight: bold;
}

.table-scroll-shell {
	overflow-x: auto;
	border: 1px solid rgba(120, 140, 160, 0.22);
	border-radius: 14px;
	background: var(--shell-card-bg-alt);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.transactions-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin-top: 0;
}

.transactions-table th,
.transactions-table td {
	border-right: 1px solid rgba(120, 140, 160, 0.18);
	border-bottom: 1px solid rgba(120, 140, 160, 0.18);
	padding: 11px 12px;
	text-align: left;
	font-size: 0.88em;
	color: var(--light-color);
	background: transparent;
}

.transactions-table thead {
	background-color: transparent;
}

.transactions-table th {
	font-weight: 600;
	background: rgba(56, 64, 74, 0.86);
	font-size: 0.76em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--shell-text-soft);
}

.transactions-table th:last-child,
.transactions-table td:last-child {
	border-right: none;
}

.transactions-table tbody tr:last-child td {
	border-bottom: none;
}

.transactions-table tbody tr:hover td {
	background: rgba(103, 232, 249, 0.04);
}

.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 24px;
	gap: 8px;
	flex-wrap: wrap;
}

.pagination a {
	color: #dcecf8;
	background-color: rgba(49, 57, 65, 0.92);
	border: 1px solid rgba(120, 140, 160, 0.22);
	padding: 8px 14px;
	text-decoration: none;
	border-radius: 999px;
	transition: all 0.2s ease;
}

.pagination a:hover {
	border-color: rgba(103, 232, 249, 0.34);
	background-color: rgba(61, 70, 80, 0.96);
}

.pagination a.active {
	background: linear-gradient(135deg, rgba(56, 189, 248, 0.26) 0%, rgba(45, 212, 191, 0.18) 100%);
	color: #eefbff;
	border-color: rgba(103, 232, 249, 0.5);
	box-shadow: 0 12px 26px rgba(8, 47, 73, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
	cursor: default;
}

.pagination a.disabled {
	color: #6c757d;
	background-color: rgba(36, 43, 50, 0.8);
	border-color: rgba(120, 140, 160, 0.12);
	pointer-events: none;
}

.pagination-ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	color: var(--muted);
}

.users-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin-top: 0;
}

.users-table th,
.users-table td {
	border-right: 1px solid rgba(120, 140, 160, 0.18);
	border-bottom: 1px solid rgba(120, 140, 160, 0.18);
	padding: 11px 12px;
	text-align: left;
	vertical-align: middle;
	color: var(--light-color);
	background: transparent;
}

.users-table thead {
	background-color: transparent;
}

.users-table th {
	font-weight: 600;
	background: rgba(56, 64, 74, 0.86);
	font-size: 0.76em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--shell-text-soft);
}

.users-table th:last-child,
.users-table td:last-child {
	border-right: none;
}

.users-table tbody tr:last-child td {
	border-bottom: none;
}

.users-table tbody tr:hover td {
	background: rgba(103, 232, 249, 0.04);
}

.table-primary-text {
	color: #edf5fb;
	font-weight: 500;
}

.table-secondary-text {
	color: #92a5b8;
	font-size: 0.82em;
}

.table-mono {
	font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
	letter-spacing: -0.01em;
}

.table-date {
	white-space: nowrap;
	color: #dce8f1;
}

.table-amount {
	white-space: nowrap;
	font-weight: 700;
	color: #edf5fb;
}

.table-user-cell {
	min-width: 150px;
}

.user-detail-trigger {
	background: none;
	border: none;
	padding: 0;
	color: var(--primary-color);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.user-detail-trigger:hover {
	color: #74c0fc;
}

.user-detail-trigger-mono {
	font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
	letter-spacing: -0.01em;
}

.users-table .actions-cell {
	width: 250px;
	text-align: right;
}

.users-table .issued-keys-cell {
	max-width: 420px;
	white-space: normal;
	word-break: break-all;
	line-height: 1.35;
}

.actions-cell form {
	display: inline-block;
	margin-left: 5px;
}

.users-toolbar {
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin-bottom: 18px;
	padding: 20px;
	border: 1px solid rgba(120, 140, 160, 0.22);
	border-radius: 18px;
	background:
		linear-gradient(180deg, rgba(88, 196, 255, 0.04), rgba(88, 196, 255, 0) 48%),
		var(--shell-card-bg-alt);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.users-search-form {
	display: grid;
	gap: 14px;
	min-width: 0;
}

.users-filters-form {
	gap: 14px;
}

.users-filter-grid {
	display: grid;
	grid-template-columns:
		minmax(260px, 1.7fr)
		repeat(3, minmax(150px, 1fr))
		repeat(2, minmax(140px, 0.9fr))
		minmax(180px, 1fr);
	gap: 12px;
}

.users-filter-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.users-filter-field--search {
	grid-column: auto;
}

.users-filter-label {
	padding-left: 4px;
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #92a6b8;
}

.search-input {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid rgba(120, 140, 160, 0.26);
	border-radius: 12px;
	font-size: 14px;
	background-color: rgba(17, 23, 30, 0.9);
	color: var(--light-color);
	min-width: 0;
	min-height: 44px;
	transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.search-input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.25);
	background-color: rgba(20, 27, 35, 0.96);
}

.search-input::placeholder {
	color: #8294a6;
}

.search-select,
.search-date {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid rgba(120, 140, 160, 0.26);
	border-radius: 12px;
	font-size: 14px;
	background-color: rgba(17, 23, 30, 0.9);
	color: var(--light-color);
	min-height: 44px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.search-select:focus,
.search-date:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.25);
}

.users-toolbar-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-top: 6px;
	border-top: 1px solid rgba(120, 140, 160, 0.16);
}

.users-toolbar-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.users-toolbar-apply {
	min-width: 148px;
	justify-content: center;
	box-shadow:
		0 10px 24px rgba(56, 189, 248, 0.18),
		inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.button-reset {
	background-color: #495057;
}

.button-reset:hover {
	background-color: #5c636a;
}

.users-toolbar-summary {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-left: auto;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid rgba(103, 232, 249, 0.2);
	background:
		linear-gradient(180deg, rgba(103, 232, 249, 0.12), rgba(103, 232, 249, 0.02)),
		rgba(21, 28, 36, 0.94);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.04),
		0 10px 24px rgba(8, 14, 21, 0.16);
}

.users-toolbar-summary-label {
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #9ab3c7;
	white-space: nowrap;
}

.users-toolbar-summary-value {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.users-toolbar-summary-value strong {
	font-size: 1.6em;
	line-height: 1;
	color: #f4fbff;
}

.users-toolbar-summary-value span {
	font-size: 0.98em;
	color: #d4e8f6;
}

.users-toolbar-summary-meta {
	font-size: 0.84em;
	line-height: 1.45;
	color: var(--shell-text-soft);
	padding-left: 12px;
	border-left: 1px solid rgba(120, 140, 160, 0.16);
}

.users-toolbar-summary-meta strong {
	color: var(--light-color);
}

@media (max-width: 1280px) {
	.users-filter-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.users-filter-field--search {
		grid-column: 1 / -1;
	}
}

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

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

	.users-toolbar-summary {
		margin-left: 0;
		justify-content: space-between;
	}

	.live-sync-bar {
		margin-left: 0;
		justify-content: flex-start;
	}
}

.active-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(103, 232, 249, 0.12);
	border: 1px solid rgba(103, 232, 249, 0.28);
	font-size: 0.84em;
	color: #d5f7ff;
}

.empty-state {
	text-align: center;
	padding: 32px 20px;
	color: var(--shell-text-soft);
	font-size: 1.04em;
	border: 1px dashed rgba(120, 140, 160, 0.22);
	border-radius: 14px;
	background: rgba(30, 36, 43, 0.62);
}

.status-badge {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 0.8em;
	font-weight: 600;
	color: #fff;
}

.status-banned {
	background-color: var(--danger-color);
}

.status-active {
	background-color: var(--success-color);
}

.status-warning-badge {
	background-color: #f59f00;
	color: #17212b;
}

.status-vpn-active {
	background-color: var(--success-color);
}

.status-vpn-none {
	background-color: #6c757d;
}

.status-vpn-expired {
	background-color: #d39e00;
	color: #1f2328;
}

.status-vpn-mixed {
	background-color: #0d6efd;
}

body.modal-open {
	overflow: hidden;
}

.user-detail-modal-overlay {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(5, 10, 16, 0.74);
	backdrop-filter: blur(10px);
	z-index: 1000;
	padding: 20px;
}

.user-detail-modal-overlay[hidden] {
	display: none;
}

.user-detail-modal {
	width: fit-content;
	min-width: 600px;
	max-width: min(95vw, 1400px);
	max-height: 90vh;
	overflow: auto;
	background: var(--shell-card-bg);
	border: 1px solid var(--shell-border-soft);
	border-radius: 22px;
	box-shadow: 0 22px 52px rgba(0, 0, 0, 0.42);
}

.user-detail-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid rgba(120, 140, 160, 0.18);
}

.user-detail-modal-header h3 {
	margin: 0;
}

.user-detail-modal-body {
	padding: 20px;
}

.user-detail-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(220px, 1fr));
	gap: 12px;
	margin-bottom: 20px;
}

.user-detail-item {
	background: var(--shell-card-bg-alt);
	border: 1px solid rgba(120, 140, 160, 0.22);
	border-radius: 14px;
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.user-detail-label {
	font-size: 0.82em;
	color: var(--muted);
}

.user-detail-keys h4 {
	margin: 0 0 8px;
}

.user-detail-transactions h4 {
	margin: 16px 0 8px;
}

.user-detail-state {
	color: var(--muted);
	margin-bottom: 12px;
}

.user-detail-state-error {
	color: var(--danger-color);
}

.user-detail-table-scroll {
	position: relative;
	margin-top: 10px;
}

.user-detail-keys-wrapper {
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-gutter: stable both-edges;
	padding-bottom: 8px;
	cursor: grab;
	touch-action: pan-x;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background:
		linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
		var(--surface-raised);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.user-detail-keys-wrapper.is-dragging {
	cursor: grabbing;
	user-select: none;
}

.user-detail-keys-wrapper::-webkit-scrollbar {
	height: 12px;
}

.user-detail-keys-wrapper::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.08);
	border-radius: 999px;
}

.user-detail-keys-wrapper::-webkit-scrollbar-thumb {
	background: linear-gradient(90deg, rgba(60, 160, 255, 0.85), rgba(95, 186, 255, 0.95));
	border-radius: 999px;
	border: 2px solid rgba(15, 23, 35, 0.9);
}

.user-detail-keys-wrapper::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(90deg, rgba(85, 178, 255, 0.95), rgba(125, 202, 255, 1));
}

.user-detail-keys-wrapper {
	scrollbar-color: rgba(77, 171, 247, 0.95) rgba(255, 255, 255, 0.08);
	scrollbar-width: auto;
}

.user-detail-table-scroll.is-overflowing::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 44px;
	width: 34px;
	pointer-events: none;
	background: linear-gradient(270deg, rgba(30, 37, 48, 0.95), rgba(30, 37, 48, 0));
}

.user-detail-table-scroll.is-scrolled-end::after {
	opacity: 0;
}

.user-detail-keys-table {
	width: max-content;
	min-width: 100%;
	border-collapse: separate;
	border-spacing: 0;
}

.user-detail-keys-table th,
.user-detail-keys-table td {
	border-right: 1px solid rgba(120, 140, 160, 0.18);
	border-bottom: 1px solid rgba(120, 140, 160, 0.18);
	padding: 10px 11px;
	text-align: left;
	vertical-align: top;
	background: transparent;
}

.user-detail-keys-table thead {
	background-color: transparent;
}

.user-detail-keys-table th {
	background: rgba(56, 64, 74, 0.86);
	font-size: 0.76em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--shell-text-soft);
}

.user-detail-keys-table th:last-child,
.user-detail-keys-table td:last-child {
	border-right: none;
}

.user-detail-keys-table tbody tr:last-child td {
	border-bottom: none;
}

.user-detail-keys-table tbody tr:hover td {
	background: rgba(103, 232, 249, 0.04);
}

.user-detail-keys-table .actions-cell {
	text-align: center;
	width: 156px;
	white-space: nowrap;
}

.user-detail-key-action-cell {
	min-width: 156px;
}

.user-detail-copy {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.user-detail-key-email-cell {
	min-width: 280px;
}

.user-detail-key-email-value {
	margin-bottom: 8px;
	line-height: 1.35;
	word-break: break-all;
}

.user-detail-copy-email {
	width: auto;
	min-width: 128px;
	font-size: 0.76rem;
	padding: 6px 10px;
}

.user-detail-date-cell {
	white-space: nowrap;
	min-width: 116px;
}

.user-detail-empty-cell {
	color: var(--muted);
	text-align: center;
}

.user-detail-scroll-hint {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
	padding: 8px 12px;
	border: 1px dashed rgba(77, 171, 247, 0.45);
	border-radius: 10px;
	background: rgba(77, 171, 247, 0.08);
	color: #d5ebff;
	font-size: 0.85em;
	line-height: 1.4;
}

.user-detail-scroll-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(77, 171, 247, 0.18);
	color: #8fd0ff;
	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

@media (max-width: 1256px) {
	.navigation {
		display: flex;
		justify-content: flex-start;
		flex-wrap: wrap;
	}
	.header-controls {
		flex-wrap: wrap;
	}
	li {
		list-style-type: none;
	}
	.bm {
		display: block;
		input + label {
			position: fixed;
			top: 40px;
			right: 40px;
			z-index: 5;
			span {
				position: absolute;
				width: 100%;
				height: 2px;
				top: 50%;
				margin-top: -1px;
				left: 0;
				display: block;
				transition: 0.5s;
			}
			span:first-child {
				top: 3px;
			}
			span:last-child {
				top: 16px;
			}
		}
		label:hover {
			cursor: pointer;
		}
		input:checked + label {
			span {
				opacity: 0;
				top: 50%;
			}
			span:first-child {
				opacity: 1;
				transform: rotate(405deg);
			}
			span:last-child {
				opacity: 1;
				transform: rotate(-405deg);
			}
		}
		input ~ nav {
			background: rgba(45, 50, 56, 0.9);
			position: fixed;
			top: 0;
			right: 0;
			width: 330px;
			height: 0px;
			z-index: 3;
			transition: 0.5s;
			transition-delay: 0.5s;
			overflow: hidden;

			> ul {
				position: absolute;
				top: 100px;
				right: 10%;
				> li {
					opacity: 0;
					transition: 0.5s;
					transition-delay: 0s;
					text-align: right;
					> a {
						font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
							'Helvetica Neue', Arial, sans-serif;
						color: var(--light-color);
						line-height: 1.6;
						text-decoration: none;
						font-size: 2em;
					}
				}
			}
		}
		input:checked ~ nav {
			height: 100%;
			transition-delay: 0s;
			> ul {
				> li {
					opacity: 1;
					transition-delay: 0.5s;
					margin-bottom: 30px;
				}
			}
		}
	}
	.navigation {
		display: flex;
		width: 100%;
		justify-content: flex-start;
	}
	.burger_img {
		background: url('../img/burger.png');
		background-size: max(32px, 32px);
		height: 32px;
		width: 32px;
	}
	.main-header {
		justify-content: space-between;
	}
	.container {
		max-width: 100%;
		padding: 0;
	}
	.bm {
		input + label {
			top: 20px;
			right: 10px;
		}
	}
}

@media (max-width: 772px) {
	.header-controls {
		justify-content: flex-start;
	}
}

@media (max-width: 1024px) {
	.hosts-layout {
		grid-template-columns: 1fr;
	}

	.hosts-scroll-list {
		max-height: none;
		overflow: visible;
		padding-right: 0;
	}
}

@media (max-width: 620px) {
	.container {
		width: 100%;
	}
}
@media (max-width: 475px) {
	h2 {
		font-size: 1em;
	}
	h1 {
		font-size: 1.5em;
	}
}
@media (max-width: 455px) {
	.chart-container h3 {
		font-size: 1em;
	}
}

@media (max-width: 600px) {
	h1 {
		font-size: 1.4em;
		margin-bottom: 15px;
	}

	.settings-page-intro {
		margin: -8px auto 18px;
		font-size: 0.9em;
	}

	.settings-container {
		flex-direction: column;
	}

	.settings-column-left,
	.settings-column-right {
		flex: 1 1 100%;
		min-width: 0;
	}

	.settings-groups-nav {
		top: 8px;
		gap: 8px;
		padding: 10px;
	}

	.settings-group-tab {
		flex: 1 1 calc(50% - 8px);
		text-align: center;
		padding: 9px 10px;
		font-size: 13px;
	}

	.settings-column-main .settings-section {
		padding: 18px;
		border-radius: 14px;
	}

	.settings-subsection {
		padding: 14px 14px 2px;
	}

	.settings-subsection-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.settings-card-grid-payments {
		grid-template-columns: 1fr;
	}

	.settings-form-actions {
		flex-direction: column;
		align-items: stretch;
		padding: 16px;
	}

	.settings-form-actions .button {
		width: 100%;
	}

	.settings-runtime-status-row {
		flex-direction: column;
		align-items: flex-start;
	}

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

	.hosts-scroll-list {
		max-height: none;
		overflow: visible;
		padding-right: 0;
	}

	/* Адаптация секции хостов */
	.host-card {
		padding: 15px;
		margin-bottom: 15px;
	}

	.host-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.host-header h3 {
		margin-bottom: 5px;
	}

	.host-header form {
		margin-top: 5px;
	}

	.hosts-panel-head,
	.host-title-row,
	.host-dialog-actions,
	.dialog-actions {
		align-items: stretch;
		flex-direction: column;
	}

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

	.settings-dialog {
		width: calc(100vw - 16px);
		max-height: calc(100dvh - 16px);
	}

	.settings-dialog-shell {
		max-height: calc(100dvh - 16px);
	}

	.plan-list li {
		flex-direction: column;
		align-items: flex-start;
		gap: 5px;
		padding: 8px;
	}

	.plan-list li form {
		margin-top: 5px;
	}

	/* Адаптация форм */
	.form-group {
		margin-bottom: 15px;
	}

	.form-group label {
		font-size: 0.9em;
	}

	.form-group input[type='text'],
	.form-group input[type='url'],
	.form-group input[type='password'],
	.form-group input[type='number'],
	.form-group select,
	.form-group textarea {
		font-size: 14px;
		padding: 10px;
	}

	.form-group textarea {
		min-height: 60px;
	}

	.toggle-password {
		top: 40%;
		width: 40px;
		font-size: 18px;
	}

	.form-inline {
		flex-direction: column;
		gap: 8px;
	}

	.form-inline input {
		min-width: 100%;
	}

	.button {
		padding: 10px 20px;
		font-size: 14px;
	}

	.button-small {
		padding: 6px 12px;
		font-size: 12px;
	}

	.button-tiny {
		padding: 2px 6px;
		font-size: 10px;
	}

	.users-search-form {
		width: 100%;
	}

	.users-filter-grid {
		grid-template-columns: 1fr;
	}

	.users-filter-field--search {
		grid-column: auto;
	}

	.search-input {
		min-width: 0;
		width: 100%;
	}

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

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

	.users-toolbar-apply,
	.users-toolbar-actions .button-reset {
		width: 100%;
	}

	.users-toolbar-summary {
		width: 100%;
		min-height: auto;
		margin-left: 0;
		flex-direction: column;
		align-items: flex-start;
	}

	.users-toolbar-summary-meta {
		padding-left: 0;
		border-left: none;
	}

	.live-sync-bar {
		width: 100%;
	}

	.live-sync-refresh {
		width: 100%;
	}

	.user-detail-modal {
		min-width: unset;
		width: 95vw;
		max-height: 95vh;
	}

	.user-detail-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	h1 {
		font-size: 1.2em;
	}

	.settings-column-main .settings-section {
		padding: 14px;
	}

	.settings-subsection {
		padding: 12px 12px 1px;
	}

	.host-card {
		padding: 10px;
	}

	.form-group input[type='text'],
	.form-group input[type='url'],
	.form-group input[type='password'],
	.form-group input[type='number'],
	.form-group select,
	.form-group textarea {
		font-size: 12px;
		padding: 8px;
	}

	.toggle-password {
		width: 35px;
		font-size: 16px;
	}

	.button {
		padding: 8px 15px;
		font-size: 12px;
	}

	.users-toolbar {
		padding: 16px;
	}

	.users-toolbar-summary {
		padding: 16px;
	}

	.users-toolbar-summary-value strong {
		font-size: 1.8em;
	}
}

@media (max-width: 680px) {
	.dashboard-filter-group {
		width: 100%;
	}

	.dashboard-live-sync-bar {
		width: 100%;
		justify-content: flex-start;
	}

	.dashboard-filter-buttons {
		width: 100%;
	}

	.dashboard-filter-btn {
		flex: 1 1 auto;
		text-align: center;
	}

	.dashboard-type-summary-item--btn {
		min-width: 0;
	}

	.dashboard-collapsible > summary {
		flex-wrap: wrap;
	}

	.dashboard-collapsible-summary-meta {
		margin-left: 0;
		width: 100%;
	}

	.dashboard-chart-grid {
		grid-template-columns: 1fr;
	}

	.dashboard-chart-grid .chart-container {
		min-height: auto;
	}

	.chart-canvas-wrap {
		height: 240px;
	}
}

@media (max-width: 375px) {
	h1 {
		font-size: 1em;
	}

	.host-card {
		padding: 8px;
	}

	.form-group input[type='text'],
	.form-group input[type='url'],
	.form-group input[type='password'],
	.form-group input[type='number'],
	.form-group select,
	.form-group textarea {
		font-size: 10px;
		padding: 6px;
	}

	.toggle-password {
		width: 30px;
		font-size: 14px;
	}

	.button {
		padding: 6px 10px;
		font-size: 10px;
	}

	.plan-list li {
		padding: 6px;
	}
}

/* Host health status indicators */
.host-status {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 0.9em;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}
.host-status-healthy { background: #27ae60; color: #fff; }
.host-status-degraded { background: #f39c12; color: #fff; }
.host-status-unavailable { background: #e74c3c; color: #fff; }
.host-status-maintenance { background: #8e44ad; color: #fff; }
.host-status-unknown { background: #95a5a6; color: #fff; }

.toggle-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}
.host-maintenance-toggle { cursor: pointer; }

/* ============================================================
   Bot status pills (compact header controls)
   ============================================================ */
.header-bots {
	display: flex;
	align-items: center;
	gap: 8px;
}
.bot-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border-radius: 999px;
	border: 1px solid var(--border-color);
	background: var(--surface-raised);
	font-size: 0.82em;
	white-space: nowrap;
}
.bot-pill-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}
.bot-pill--running .bot-pill-dot { background: var(--success-color); box-shadow: 0 0 6px var(--success-color); }
.bot-pill--stopped .bot-pill-dot { background: #6c757d; }
.bot-pill--inactive { opacity: 0.5; }
.bot-pill--inactive .bot-pill-dot { background: #6c757d; }
.bot-pill-label { font-weight: 600; color: var(--light-color); }
.bot-pill-warn { color: #fcc419; font-weight: 400; font-size: 0.9em; }

.bot-pill-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	font-size: 10px;
	line-height: 1;
	color: #fff;
	text-decoration: none;
	transition: opacity 0.15s;
}
.bot-pill-btn:hover { opacity: 0.85; }
.bot-pill-btn--start { background: var(--success-color); }
.bot-pill-btn--stop { background: var(--danger-color); }
.bot-pill-btn--link { background: var(--primary-color); font-size: 12px; }
.bot-pill-btn--disabled { background: #6c757d; cursor: not-allowed; opacity: 0.5; }

.header-logout { margin-left: 4px; }

.shop-watchdog-alert {
	margin-top: 10px;
	padding: 10px 12px;
	border: 1px solid rgba(252, 196, 25, 0.32);
	background: linear-gradient(180deg, rgba(86, 67, 18, 0.42) 0%, rgba(62, 47, 12, 0.38) 100%);
	border-radius: 14px;
	max-width: none;
	width: 100%;
}
.shop-watchdog-alert-title {
	font-weight: 700;
	color: #ffe066;
	margin-bottom: 6px;
}
.shop-watchdog-alert-body {
	display: grid;
	gap: 4px;
	color: var(--light-color);
	font-size: 0.9em;
}

/* ============================================================
   Unified tab pills
   ============================================================ */
.tab-pills {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
.tab-pill {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 6px;
	text-decoration: none;
	border: 1px solid #2f3f56;
	background: #1d2b3f;
	color: #fff;
	font-weight: 600;
	font-size: 0.88em;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}
.tab-pill:hover { background: #244061; }
.tab-pill.active { background: #2d6cdf; border-color: #2d6cdf; }
.tab-pill--action { border-style: dashed; }
.tab-pill--reset { border-color: var(--danger-color); color: var(--danger-color); background: transparent; }
.tab-pill--reset:hover { background: rgba(255, 107, 107, 0.15); }

/* "Все" (total) в сводке — синяя обводка */
.dashboard-type-summary-item--total {
	border-color: var(--primary-color);
	background: rgba(77, 171, 247, 0.08);
}
.dashboard-type-summary-item--total span,
.dashboard-type-summary-item--total strong { color: var(--primary-color); }
.dashboard-type-summary-item--total.dashboard-type-summary-item--active span,
.dashboard-type-summary-item--total.dashboard-type-summary-item--active strong { color: #fff; }

/* TX type badges in transactions table */
.tx-type-badge {
	display: inline-block;
	padding: 4px 9px;
	border-radius: 999px;
	font-size: 0.73em;
	font-weight: 700;
	letter-spacing: 0.06em;
}
.tx-type-hysteria { background: #2d6cdf; color: #fff; }
.tx-type-super { background: #8e44ad; color: #fff; }
.tx-type-old { background: #495057; color: var(--muted); }
.tx-type-vless { background: #27ae60; color: #fff; }

.bot-source-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.72em;
	font-weight: 700;
	white-space: nowrap;
	letter-spacing: 0.04em;
}
.bot-source-badge-main {
	background: rgba(64, 192, 87, 0.2);
	color: #9be7ac;
	border: 1px solid rgba(64, 192, 87, 0.45);
}
.bot-source-badge-reserve {
	background: rgba(255, 193, 7, 0.2);
	color: #ffd972;
	border: 1px solid rgba(255, 193, 7, 0.45);
}

/* ============================================================
   Dashboard range modal
   ============================================================ */
.dashboard-range-modal-overlay {
	position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
	background: rgba(5, 10, 16, 0.74); z-index: 1000; padding: 20px; backdrop-filter: blur(10px);
}
.dashboard-range-modal-overlay[hidden] { display: none; }
.dashboard-range-modal {
	width: min(420px, 100%); background: var(--shell-card-bg); border: 1px solid var(--shell-border-soft);
	border-radius: 20px; box-shadow: 0 22px 52px rgba(0, 0, 0, 0.42); padding: 24px;
}
.dashboard-range-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.dashboard-range-modal-header h3 { margin: 0; }
.dashboard-range-form { display: flex; flex-direction: column; gap: 12px; }
.dashboard-range-label { font-size: 0.9em; color: var(--muted); }
.dashboard-range-form input[type='date'] {
	padding: 10px; border: 1px solid rgba(120, 140, 160, 0.26); border-radius: 10px;
	background: rgba(20, 26, 33, 0.78); color: var(--light-color); font-size: 14px;
}
.dashboard-range-actions { display: flex; gap: 8px; margin-top: 8px; }

.button-success { background-color: var(--success-color); }
.button-success:hover { background-color: #37b24d; }
.button-secondary { background-color: #495057; }
.button-secondary:hover { background-color: #5c636a; }

/* ============================================================
   Trial conversion panel
   ============================================================ */
.trial-conversion-panel { margin-top: 16px; }
.trial-conversion-header { margin-bottom: 12px; }
.trial-conversion-header h3 { margin-bottom: 4px; font-size: 1em; }
.trial-conversion-header p { font-size: 0.85em; color: var(--muted); margin: 0; }
.trial-kpi-grid { margin-bottom: 14px; }
.trial-conversion-table-wrap { overflow-x: auto; }
.trial-conversion-table { font-size: 0.88em; }
.trial-conversion-empty { color: var(--muted); font-size: 0.9em; padding: 12px 0; }

/* ============================================================
   Migration page
   ============================================================ */
.migration-layout,
.issue-layout {
	display: grid;
	grid-template-columns: minmax(420px, 36vw) minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}
@media (max-width: 900px) {
	.migration-layout,
	.issue-layout { grid-template-columns: 1fr; }
}
.migration-form-panel,
.issue-panel {
	position: sticky; top: 16px;
	min-width: 0;
}
.migration-results-panel {
	min-width: 0;
}
.migration-section,
.issue-section {
	background: var(--shell-card-bg);
	border: 1px solid var(--shell-border-soft);
	border-radius: 16px;
	padding: 20px;
	margin-bottom: 16px;
	box-shadow: var(--shell-shadow);
}
.migration-section h2,
.issue-section h2 {
	font-size: 1.05em;
	margin-bottom: 14px;
	color: var(--light-color);
}
.migration-hint {
	font-size: var(--font-size-caption);
	color: var(--muted);
	margin-bottom: 8px;
}
.migration-select,
.migration-input,
.migration-input-number {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--shell-border-soft);
	border-radius: 10px;
	background: rgba(20, 26, 33, 0.78);
	color: var(--light-color);
	font-size: var(--font-size-control);
}
.migration-input-number { width: 100px; }
.migration-textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--shell-border-soft);
	border-radius: 10px;
	background: rgba(20, 26, 33, 0.78);
	color: var(--light-color);
	font-size: var(--font-size-control);
	font-family: inherit;
	resize: vertical;
	min-height: 100px;
}
.migration-actions {
	display: flex; gap: 10px;
}
.migration-actions .button {
	flex: 1;
	text-align: center;
	padding: 12px;
	font-size: var(--font-size-control);
}

/* Status / progress */
.migration-status { margin-bottom: 14px; }
.migration-status-text {
	font-size: 0.95em;
	margin-bottom: 8px;
	color: var(--shell-accent);
}
.migration-progress-wrap {
	height: 8px;
	background: rgba(120, 140, 160, 0.18);
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 6px;
}
.migration-progress-bar {
	height: 100%;
	background: var(--success-color);
	border-radius: 4px;
	width: 0;
	transition: width 0.3s ease;
}
.migration-progress-detail {
	font-size: var(--font-size-caption);
	color: var(--muted);
}

/* Summary cards */
.migration-summary { margin-bottom: 14px; }
.migration-summary-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
}
.migration-summary-item {
	text-align: center;
	padding: 10px 6px;
	border-radius: 10px;
	background: rgba(120, 140, 160, 0.08);
	border: 1px solid var(--shell-border-soft);
}
.migration-summary-label {
	display: block;
	font-size: var(--font-size-caption);
	color: var(--muted);
	margin-bottom: 4px;
}
.migration-summary-value {
	display: block;
	font-size: 1.3em;
	font-weight: 700;
	color: var(--light-color);
}
.migration-summary-ok .migration-summary-value { color: var(--success-color); }
.migration-summary-skip .migration-summary-value { color: var(--warning-color); }
.migration-summary-err .migration-summary-value { color: var(--danger-color); }

/* Table */
.migration-table-wrap { overflow-x: auto; max-height: 500px; overflow-y: auto; }
.migration-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85em;
}
.migration-table th,
.migration-table td {
	padding: 8px 10px;
	text-align: left;
	border-bottom: 1px solid var(--shell-border-soft);
	white-space: nowrap;
}
.migration-table th {
	position: sticky; top: 0;
	background: var(--surface);
	color: var(--muted);
	font-weight: 600;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.migration-table tr:hover td { background: rgba(103, 232, 249, 0.04); }

.mig-status-dry { color: var(--shell-accent); }
.mig-status-migrated { color: var(--success-color); }
.mig-status-skipped { color: var(--warning-color); }
.mig-status-error { color: var(--danger-color); }

.migration-empty {
	color: var(--muted);
	font-size: var(--font-size-small);
	padding: 24px 0;
	text-align: center;
}

.migration-tabs {
	display: inline-flex;
	gap: 8px;
	padding: 6px;
	margin: 12px 0 18px;
	border: 1px solid var(--shell-border-soft);
	border-radius: 14px;
	background: rgba(120, 140, 160, 0.08);
}
.migration-tab-button {
	border: 0;
	border-radius: 10px;
	padding: 10px 14px;
	background: transparent;
	color: var(--muted);
	font-weight: 600;
	font-size: var(--font-size-small);
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.migration-tab-button:hover {
	background: rgba(103, 232, 249, 0.08);
	color: var(--light-color);
}
.migration-tab-button--active {
	background: var(--shell-card-bg);
	color: var(--light-color);
	box-shadow: var(--shell-shadow);
}
.migration-tab-panel[hidden] {
	display: none !important;
}

/* ============================================================
   Issue-by-ID page
   ============================================================ */
.issue-result {
	border: 1px solid var(--shell-border-soft);
	border-radius: 14px;
	padding: 16px;
	background: rgba(120, 140, 160, 0.06);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
.issue-result-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
@media (max-width: 640px) {
	.issue-result-grid { grid-template-columns: 1fr; }
}
.issue-result-item {
	background: rgba(120, 140, 160, 0.08);
	border: 1px solid var(--shell-border-soft);
	border-radius: 12px;
	padding: 12px 14px;
}
.issue-result-label {
	display: block;
	font-size: var(--font-size-caption);
	color: var(--muted);
	margin-bottom: 4px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.issue-result-value {
	display: block;
	font-size: var(--font-size-control);
	color: var(--light-color);
	font-weight: 600;
	word-break: break-word;
}
.issue-duration-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}
.issue-duration-field {
	min-width: 0;
}
.issue-duration-field label {
	font-size: var(--font-size-caption);
	margin-bottom: 6px;
}
.issue-duration-field .migration-input-number {
	width: 100%;
}
.issue-duration-toggle {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	cursor: pointer;
}
.issue-duration-toggle span {
	font-size: var(--font-size-small);
	color: var(--light-color);
}
.issue-keys-modal-overlay {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(5, 10, 16, 0.74);
	backdrop-filter: blur(8px);
	z-index: 1100;
}
.issue-keys-modal-overlay[hidden] {
	display: none;
}
.issue-keys-modal {
	width: min(1180px, 100%);
	max-height: 86vh;
	overflow: auto;
	background: var(--shell-card-bg);
	border: 1px solid var(--shell-border-soft);
	border-radius: 16px;
	box-shadow: var(--shell-shadow);
	padding: 18px;
}
.issue-keys-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}
.issue-keys-modal-header h3 {
	margin: 0;
}
.issue-modal-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.issue-modal-action {
	padding: 7px 10px;
	font-size: var(--font-size-caption);
}
@media (max-width: 640px) {
	.issue-duration-grid {
		grid-template-columns: 1fr;
	}
	.issue-modal-actions {
		flex-direction: column;
	}
}
