/* stylelint-disable selector-class-pattern */
:root {
	/* Brand + surfaces */
	--color-bg-start: #041437;
	--color-bg-mid: #06215a;
	--color-bg-end: #0b3f9f;
	--color-primary: #1f68ff;
	--color-primary-strong: #1251d6;
	--color-text: #f6f8ff;
	--color-muted: #aeb8d9;
	--color-stroke: rgba(145, 176, 255, 0.2);
	--color-stroke-strong: rgba(145, 176, 255, 0.3);
	--surface-card: rgba(11, 31, 80, 0.8);
	--surface-control: rgba(6, 23, 62, 0.66);
	--surface-control-hover: rgba(12, 34, 87, 0.72);

	/* Shape */
	--radius-card: 24px;
	--radius-control: 16px;
	--radius-control-sm: 14px;
	--radius-pill: 999px;

	/* Spacing (8px grid) */
	--space-1: 8px;
	--space-2: 16px;
	--space-3: 24px;
	--space-4: 32px;
	--space-5: 40px;

	/* Type scale */
	--fs-page-title: clamp(36px, 4vw, 40px);
	--fs-section-title: clamp(20px, 2.1vw, 24px);
	--fs-card-label: 15px;
	--fs-body: 16px;
	--fs-meta: 13px;
	--fs-micro: 12px;

	/* Effects */
	--control-height: 52px;
	--shadow-soft: 0 24px 56px rgba(2, 8, 24, 0.34);
	--easing: 180ms ease;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: var(--fs-body);
	color: var(--color-text);
	background:
		radial-gradient(circle at 85% 8%, rgba(72, 180, 255, 0.2) 0, rgba(72, 180, 255, 0.2) 16%, transparent 17%),
		radial-gradient(circle at 8% 92%, rgba(56, 152, 255, 0.18) 0, rgba(56, 152, 255, 0.18) 19%, transparent 20%),
		linear-gradient(135deg, var(--color-bg-start) 0%, var(--color-bg-mid) 54%, var(--color-bg-end) 100%);
}

a,
button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

.interviewadmin-body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.04), transparent 28%),
		radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.03), transparent 22%);
	mix-blend-mode: screen;
}

/* Login */
.login-page {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: var(--space-3);
}

.login-card {
	width: min(560px, 100%);
	background: var(--surface-card);
	border: 1px solid var(--color-stroke);
	border-radius: calc(var(--radius-card) + 4px);
	padding: var(--space-4);
	box-shadow: var(--shadow-soft);
	backdrop-filter: blur(12px);
}

.login-brand {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

.logo {
	width: 78px;
	height: 78px;
	border-radius: 24px;
	background:
		radial-gradient(circle at 78% 80%, rgba(57, 215, 255, 0.95), transparent 24%),
		linear-gradient(145deg, #020b3a, #07338d 70%, #05235e);
	box-shadow: inset 0 0 0 1px rgba(114, 167, 255, 0.25), 0 12px 28px rgba(0, 0, 0, 0.3);
	display: grid;
	place-items: center;
	flex: 0 0 auto;
}

.logo svg {
	width: 52px;
	height: 52px;
}

.login-brand h1,
.brand h1 {
	margin: 0;
	font-size: 19px;
	letter-spacing: 0.04em;
	font-weight: 800;
}

.login-brand p,
.brand p {
	margin: 4px 0 0;
	color: var(--color-muted);
	font-size: var(--fs-micro);
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.login-copy {
	color: var(--color-muted);
	line-height: 1.5;
	margin: var(--space-3) 0 0;
}

.login-error {
	margin-top: var(--space-2);
	border-radius: var(--radius-control-sm);
	padding: 12px 14px;
	border: 1px solid rgba(255, 93, 108, 0.35);
	background: rgba(93, 23, 41, 0.32);
	color: #ffd0d5;
}

.login-form {
	display: grid;
	gap: 14px;
	margin-top: var(--space-3);
}

.login-form label,
.admin-form-grid label {
	display: grid;
	gap: 8px;
}

.login-form span,
.admin-form-grid span {
	font-size: var(--fs-meta);
	font-weight: 600;
	color: var(--color-muted);
}

.login-form input,
.login-form button,
.admin-form-grid input,
.admin-form-grid select,
.search,
.select,
.apply-btn,
.reset-btn {
	height: var(--control-height);
	border-radius: var(--radius-control);
}

.login-form input,
.admin-form-grid input,
.admin-form-grid select {
	border: 1px solid var(--color-stroke);
	background: var(--surface-control);
	padding: 0 16px;
	outline: none;
	transition: border-color var(--easing), box-shadow var(--easing), background var(--easing);
}

.login-form input:focus,
.admin-form-grid input:focus,
.admin-form-grid select:focus,
.search:focus-within,
.select:focus-within {
	border-color: rgba(95, 154, 255, 0.7);
	box-shadow: 0 0 0 3px rgba(31, 104, 255, 0.18);
}

.login-form button {
	border: 0;
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
	font-weight: 700;
	cursor: pointer;
}

/* Layout */
.app {
	display: grid;
	grid-template-columns: 290px minmax(0, 1fr);
	min-height: 100vh;
	backdrop-filter: blur(10px);
}

.sidebar {
	position: relative;
	min-width: 0;
	padding: var(--space-4) var(--space-3) var(--space-3);
	background: linear-gradient(180deg, rgba(2, 11, 35, 0.88), rgba(3, 17, 55, 0.9));
	border-right: 1px solid rgba(130, 166, 255, 0.12);
	box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.brand {
	display: grid;
	grid-template-columns: 78px minmax(0, 1fr);
	align-items: center;
	gap: var(--space-2);
	padding: 0 var(--space-1) var(--space-3);
	border-bottom: 1px solid rgba(130, 166, 255, 0.14);
}

.brand > div:last-child {
	min-width: 0;
}

.brand h1 {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nav {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

.nav a {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--color-text);
	text-decoration: none;
	padding: 14px 16px;
	border-radius: var(--radius-control);
	font-size: 16px;
	font-weight: 600;
	border: 1px solid transparent;
	transition: background var(--easing), border-color var(--easing), box-shadow var(--easing), transform var(--easing);
}

.nav a:hover,
.nav a.active {
	background: rgba(23, 74, 180, 0.42);
	border-color: rgba(101, 152, 255, 0.22);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), var(--shadow-soft);
}

.nav .badge {
	margin-left: auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(39, 93, 228, 0.9);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	padding: 0;
	line-height: 1;
}

.sidebar-spacer {
	flex: 1;
}

.user-card {
	margin-top: auto;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: var(--space-3) var(--space-1) 0;
	border-top: 1px solid rgba(130, 166, 255, 0.14);
}

.avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: linear-gradient(135deg, #2f89ff, #7ec6ff);
	display: grid;
	place-items: center;
	box-shadow: var(--shadow-soft);
	font-weight: 800;
}

.user-card strong {
	display: block;
	font-size: 16px;
	line-height: 1.2;
}

.user-card span {
	color: var(--color-muted);
	font-size: var(--fs-meta);
}

.logout-form {
	margin: 0;
}

.logout {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: var(--space-2);
	font-weight: 600;
	padding: 10px var(--space-1);
	border: 0;
	background: transparent;
	cursor: pointer;
}

.main {
	min-width: 0;
	padding: 36px 40px 40px;
}

/* Header */
.topbar {
	display: flex;
	min-width: 0;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	margin-bottom: var(--space-3);
}

.headline h2 {
	margin: 0;
	font-size: var(--fs-page-title);
	line-height: 1.05;
	letter-spacing: -0.03em;
	font-weight: 800;
}

.headline p {
	margin: 10px 0 0;
	font-size: 20px;
	line-height: 1.35;
	color: var(--color-muted);
}

.top-actions {
	display: inline-flex;
	min-width: 0;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.pill,
.search,
.select,
.apply-btn,
.reset-btn,
.page-btn,
.action,
.status,
.channel-tag,
.lang-switch {
	backdrop-filter: blur(12px);
}

.pill,
.search,
.select {
	border-radius: var(--radius-control);
	border: 1px solid var(--color-stroke);
	background: var(--surface-control);
	color: var(--color-text);
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0 16px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
	transition: border-color var(--easing), background var(--easing);
}

.pill {
	height: var(--control-height);
	font-size: var(--fs-card-label);
	font-weight: 600;
}

.pill-queue {
	min-width: 168px;
}

.pill-meta {
	min-width: 208px;
	padding-inline: 14px;
}

.pill-meta small {
	font-size: var(--fs-micro);
	font-weight: 500;
	color: var(--color-muted);
}

.pill-meta strong {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.25;
}

.lang-switch {
	height: var(--control-height);
	border-radius: var(--radius-control);
	border: 1px solid var(--color-stroke);
	background: var(--surface-control);
	padding: 6px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.lang-switch a {
	height: calc(var(--control-height) - 14px);
	min-width: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 14px;
	border-radius: 12px;
	border: 1px solid transparent;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-decoration: none;
	text-transform: uppercase;
	color: var(--color-muted);
	position: relative;
	transition: color var(--easing), border-color var(--easing), background var(--easing), box-shadow var(--easing);
}

.lang-switch a.active,
.lang-switch a[aria-current="true"] {
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
	border-color: rgba(146, 187, 255, 0.48);
	color: #f4f8ff;
	box-shadow: 0 0 0 2px rgba(31, 104, 255, 0.2);
}

.lang-switch a.active::after,
.lang-switch a[aria-current="true"]::after {
	content: "";
	position: absolute;
	top: 5px;
	right: 5px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #fff;
	opacity: 0.9;
}

.login-card .lang-switch {
	margin: var(--space-2) 0;
}

.muted,
.subtle,
.record-id {
	color: var(--color-muted);
}

/* Cards + metrics */
.metrics {
	display: grid;
	min-width: 0;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--space-2);
	margin-bottom: var(--space-3);
}

.metric,
.table-card {
	background: var(--surface-card);
	border: 1px solid var(--color-stroke-strong);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-soft);
}

.metric {
	padding: 22px;
	min-height: 144px;
	display: flex;
	align-items: stretch;
}

.metric h3 {
	margin: 0;
	font-size: var(--fs-card-label);
	font-weight: 600;
	color: var(--color-muted);
}

.metric strong {
	display: block;
	font-size: 40px;
	line-height: 1;
	margin: 12px 0 10px;
	letter-spacing: -0.03em;
	font-weight: 800;
}

.metric span {
	font-size: var(--fs-meta);
	line-height: 1.4;
	color: var(--color-muted);
}

/* Filter toolbar */
.toolbar {
	display: grid;
	min-width: 0;
	grid-template-columns: 1.5fr 1fr 1fr auto;
	gap: 12px;
	margin-bottom: var(--space-3);
	align-items: stretch;
}

.search input,
.select select {
	appearance: none;
	width: 100%;
	background: transparent;
	border: 0;
	outline: none;
	color: var(--color-text);
	font: inherit;
}

.search input::placeholder {
	color: #8ea2d2;
}

.select {
	position: relative;
	padding-right: 40px;
	cursor: pointer;
}

.select::after {
	content: "▾";
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #a4b6e4;
	font-size: 12px;
	pointer-events: none;
}

.select select {
	cursor: pointer;
}

.toolbar-actions {
	display: inline-flex;
	min-width: 0;
	gap: 10px;
}

.apply-btn,
.reset-btn,
.page-btn {
	border: 1px solid var(--color-stroke);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 16px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: transform var(--easing), background var(--easing), border-color var(--easing), box-shadow var(--easing);
}

.apply-btn {
	border-color: rgba(50, 118, 255, 0.72);
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
	cursor: pointer;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.apply-btn:hover,
.page-btn:hover,
.action:hover {
	transform: translateY(-1px);
}

.reset-btn,
.page-btn,
.action {
	background: var(--surface-control);
}

.reset-btn {
	border-color: rgba(145, 176, 255, 0.26);
}

.reset-btn:hover,
.page-btn:hover,
.action:hover,
.search:hover,
.select:hover,
.pill:hover {
	background: var(--surface-control-hover);
	border-color: rgba(145, 176, 255, 0.42);
}

/* Table system */
.table-card {
	overflow: hidden;
	position: relative;
}

.table-wrap {
	overflow-x: auto;
}

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

thead th {
	text-align: left;
	color: #dbe6ff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 20px 18px;
	border-bottom: 1px solid rgba(140, 173, 255, 0.14);
	background: rgba(20, 42, 97, 0.28);
	vertical-align: middle;
}

tbody td {
	padding: 18px;
	border-bottom: 1px solid rgba(140, 173, 255, 0.12);
	vertical-align: middle;
	font-size: 15px;
	line-height: 1.45;
}

tbody tr {
	transition: background var(--easing);
}

tbody tr:hover {
	background: rgba(34, 72, 145, 0.14);
}

tbody tr:last-child td {
	border-bottom: 0;
}

.interview-cell {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	min-width: 240px;
}

.play {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 0;
	background: linear-gradient(135deg, #0f5fff, #0f98ff);
	display: grid;
	place-items: center;
	box-shadow: var(--shadow-soft);
	flex: 0 0 auto;
	cursor: pointer;
	transition: transform var(--easing), box-shadow var(--easing);
}

.play:hover {
	transform: translateY(-1px) scale(1.02);
}

.play:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(31, 104, 255, 0.25), var(--shadow-soft);
}

.play::before {
	content: "";
	margin-left: 3px;
	width: 0;
	height: 0;
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	border-left: 12px solid #fff;
}

.interview-meta strong {
	display: block;
	font-size: 17px;
	font-weight: 700;
	margin-bottom: 6px;
}

.interview-link {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--color-text);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
}

.interview-link:hover,
.interview-link:focus-visible {
	color: #8dc0ff;
	outline: none;
}

.record-id {
	font-size: var(--fs-meta);
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.channel-tag,
.status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border-radius: var(--radius-pill);
	font-size: 13px;
	font-weight: 700;
	padding: 8px 14px;
	white-space: nowrap;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.channel-tag.politics {
	background: rgba(28, 127, 255, 0.18);
	color: #7dc0ff;
}

.channel-tag.economy {
	background: rgba(7, 174, 208, 0.16);
	color: #61e0ff;
}

.channel-tag.culture {
	background: rgba(154, 102, 255, 0.18);
	color: #c9a9ff;
}

.channel-tag.science {
	background: rgba(92, 119, 255, 0.16);
	color: #b4c3ff;
}

.status.new,
.status.transcription-pending {
	background: rgba(244, 180, 64, 0.16);
	color: #ffca6b;
}

.status.review,
.status.transcription-processing {
	background: rgba(31, 122, 255, 0.16);
	color: #7db8ff;
}

.status.approved,
.status.transcription-completed {
	background: rgba(31, 212, 156, 0.16);
	color: #74e8c2;
}

.status.rejected,
.status.transcription-failed {
	background: rgba(255, 93, 108, 0.14);
	color: #ff9aa4;
}

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

.action {
	width: 44px;
	height: 44px;
	border-radius: var(--radius-control-sm);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--color-stroke);
	color: #dce8ff;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
	text-decoration: none;
}

.action[disabled],
.page-btn.is-disabled {
	opacity: 0.45;
	cursor: not-allowed;
	pointer-events: none;
}

.empty-state {
	padding: 76px 30px;
	text-align: center;
	display: grid;
	gap: 10px;
	justify-items: center;
}

.empty-state::before {
	content: "";
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: 1px solid rgba(145, 176, 255, 0.3);
	background:
		radial-gradient(circle at 50% 34%, rgba(121, 184, 255, 0.45) 0, rgba(121, 184, 255, 0.12) 52%, transparent 53%),
		rgba(10, 32, 82, 0.66);
}

.empty-state strong {
	display: block;
	font-size: 24px;
	margin: 0;
}

.empty-state p {
	margin: 0;
	max-width: 500px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--color-muted);
}

.table-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
	padding: 20px 24px 24px;
	font-size: var(--fs-meta);
	color: var(--color-muted);
	border-top: 1px solid rgba(140, 173, 255, 0.12);
}

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

.page-btn {
	height: 44px;
	min-width: 44px;
	padding: 0 14px;
	border-radius: var(--radius-control-sm);
	color: var(--color-text);
}

.page-btn.active {
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
	border-color: rgba(111, 156, 255, 0.3);
}

/* Admin */
.admin-notice {
	margin-bottom: var(--space-2);
	border-radius: var(--radius-control-sm);
	padding: 14px 16px;
	font-weight: 600;
	border: 1px solid transparent;
}

.admin-notice.is-success {
	background: rgba(31, 212, 156, 0.14);
	border-color: rgba(31, 212, 156, 0.34);
	color: #8ff0cf;
}

.admin-notice.is-error {
	background: rgba(255, 93, 108, 0.14);
	border-color: rgba(255, 93, 108, 0.34);
	color: #ffd0d5;
}

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

.card {
	position: relative;
	overflow: hidden;
	background: linear-gradient(180deg, rgba(10, 39, 102, 0.7), rgba(8, 31, 82, 0.7));
	border: 1px solid rgba(122, 164, 255, 0.26);
	border-radius: 30px;
	box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.card::before,
.table-card::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 22%);
	border-radius: inherit;
}

.card-body {
	position: relative;
	z-index: 1;
	padding: 22px 24px 18px;
}

.section-title {
	margin: 0;
	font-size: 21px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.section-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 38px;
	padding: 0 14px;
	border: 1px solid rgba(122, 164, 255, 0.2);
	border-radius: 12px;
	background: linear-gradient(135deg, #2f7cff, #3dbfff);
	box-shadow: 0 8px 20px rgba(20, 76, 204, 0.28);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
	flex-shrink: 0;
	transition: 160ms ease;
	backdrop-filter: blur(12px);
	appearance: none;
	-webkit-appearance: none;
}

.icon-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 26px rgba(20, 76, 204, 0.36);
}

.section-copy {
	margin: 10px 0 0;
	color: var(--color-muted);
	font-size: 15px;
	line-height: 1.55;
}

.tabbar {
	display: inline-flex;
	gap: 8px;
	padding: 8px;
	border-radius: 20px;
	background: rgba(8, 31, 80, 0.52);
	border: 1px solid var(--color-stroke);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.admin-tabbar {
	display: flex;
	width: 100%;
	align-items: center;
	margin-bottom: 18px;
}

.admin-tabbar .tab {
	min-width: 120px;
	flex: 0 0 auto;
}

.tab {
	min-height: 46px;
	padding: 0 22px;
	border-radius: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	color: var(--color-muted);
	text-decoration: none;
	transition: 160ms ease;
	border: 1px solid transparent;
}

.tab:hover,
.tab.active {
	color: #fff;
	background: linear-gradient(135deg, rgba(47, 124, 255, 0.94), rgba(26, 181, 255, 0.22));
	border-color: rgba(122, 164, 255, 0.16);
	box-shadow: 0 12px 24px rgba(12, 61, 162, 0.18);
}

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

.admin-panel.table-card,
.admin-panel.card {
	border-radius: 30px;
}

.admin-inline-form {
	margin-top: 18px;
}

.form-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr auto;
	gap: 14px;
	align-items: end;
}

.admin-form-grid-receivers {
	grid-template-columns: 1.45fr 1fr auto;
}

.admin-form-grid-clients {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-form-grid-support {
	grid-template-columns: minmax(0, 1fr) auto;
}

.field {
	display: grid;
	gap: 8px;
}

.field > span {
	color: #dbe7ff;
	font-size: 14px;
	font-weight: 700;
}

.field.checkbox-field {
	min-height: var(--control-height);
	align-content: center;
	padding-bottom: 6px;
}

.field-row {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: var(--control-height);
}

.field-row label {
	margin: 0;
	color: #dce7ff;
	font-size: 14px;
	font-weight: 700;
}

.input,
.admin-inline-form input[type="text"],
.admin-inline-form input[type="email"],
.admin-inline-form input[type="password"],
.admin-inline-form select {
	width: 100%;
	height: var(--control-height);
	border-radius: 16px;
	border: 1px solid rgba(122, 164, 255, 0.16);
	background: rgba(7, 28, 74, 0.58);
	color: #fff;
	padding: 0 16px;
	outline: none;
	font: inherit;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
	transition: border-color var(--easing), box-shadow var(--easing), background var(--easing);
}

.input::placeholder,
.admin-inline-form input::placeholder {
	color: #8ea4d3;
}

.input:focus,
.admin-inline-form input:focus,
.admin-inline-form select:focus {
	border-color: rgba(95, 154, 255, 0.7);
	box-shadow: 0 0 0 3px rgba(31, 104, 255, 0.18);
}

.checkbox {
	width: 20px;
	height: 20px;
	accent-color: var(--color-primary);
	margin: 0;
}

.button-row {
	display: flex;
	gap: 12px;
	margin-top: 18px;
	flex-wrap: wrap;
}

.button,
.action-btn,
.pager-btn {
	min-height: 50px;
	border-radius: 16px;
	border: 1px solid var(--color-stroke);
	background: rgba(7, 27, 74, 0.5);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 18px;
	text-decoration: none;
	font-weight: 800;
	transition: 160ms ease;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
	backdrop-filter: blur(12px);
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.button.primary,
.pager-btn.active {
	background: linear-gradient(135deg, #2f7cff, #3dbfff);
	border-color: rgba(122, 164, 255, 0.2);
	box-shadow: 0 16px 34px rgba(20, 76, 204, 0.24);
}

.button.warning,
.action-btn.warning {
	background: linear-gradient(135deg, rgba(173, 94, 26, 0.92), rgba(232, 171, 74, 0.88));
	border-color: rgba(247, 207, 116, 0.42);
	color: #fff8e7;
	box-shadow: 0 16px 30px rgba(104, 64, 6, 0.24);
}

.button.danger,
.action-btn.danger {
	background: linear-gradient(135deg, rgba(141, 38, 57, 0.94), rgba(255, 107, 122, 0.74));
	border-color: rgba(255, 150, 161, 0.32);
	color: #fff4f6;
	box-shadow: 0 16px 30px rgba(84, 14, 29, 0.24);
}

.button:hover,
.action-btn:hover,
.pager-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
}

.admin-table-head {
	padding-bottom: 0;
}

.table-toolbar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 14px;
	align-items: center;
	margin-top: 18px;
	margin-bottom: 16px;
}

.table-toolbar-actions {
	margin: 0;
}

.admin-list-wrap table {
	min-width: 860px;
}

.admin-list-wrap thead th {
	padding: 16px 18px;
	font-size: 14px;
	font-weight: 800;
	border-top: 1px solid rgba(122, 164, 255, 0.12);
	border-bottom: 1px solid rgba(122, 164, 255, 0.12);
	background: rgba(7, 28, 74, 0.22);
}

.admin-list-wrap tbody td {
	padding: 20px 18px;
	font-size: 16px;
	color: #f0f5ff;
	border-bottom: 1px solid rgba(122, 164, 255, 0.1);
}

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

.action-btn {
	min-height: 40px;
	border-radius: 14px;
	padding: 0 14px;
	font-size: 15px;
	min-width: 108px;
}

.action-btn.secondary {
	background: rgba(7, 27, 74, 0.42);
}

.toggle {
	width: 52px;
	height: 28px;
	border-radius: 999px;
	border: 1px solid rgba(122, 164, 255, 0.16);
	background: rgba(7, 27, 74, 0.58);
	position: relative;
	display: inline-block;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
	backdrop-filter: blur(12px);
}

.toggle::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #cddafe;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.22);
	transition: 160ms ease;
}

.toggle.on {
	background: linear-gradient(135deg, rgba(47, 124, 255, 0.84), rgba(61, 191, 255, 0.48));
	border-color: rgba(122, 164, 255, 0.2);
}

.toggle.on::after {
	left: 27px;
	background: #fff;
}

.table-footer {
	padding: 18px 24px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	color: var(--color-muted);
	font-size: 15px;
}

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

.pager-btn {
	width: 40px;
	min-height: 40px;
	padding: 0;
	border-radius: 14px;
	font-size: 15px;
}

.pager-btn.is-disabled {
	opacity: 0.45;
	cursor: not-allowed;
	pointer-events: none;
}

.admin-form-section {
	margin-top: 18px;
	padding: 18px;
	border-radius: 18px;
	border: 1px solid rgba(122, 164, 255, 0.14);
	background: rgba(255, 255, 255, 0.03);
}

.admin-form-section strong {
	display: block;
	margin-bottom: 12px;
	font-size: 14px;
	font-weight: 800;
	color: #dce7ff;
}

.admin-checklist-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 12px;
}

.admin-checkline {
	display: flex !important;
	align-items: center;
	gap: 10px;
	padding: 4px 0;
}

.admin-checkline span {
	color: #dce5ff;
	font-size: 14px;
	font-weight: 600;
}

.admin-checkline input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--color-primary);
}

.notification-stack {
	gap: 20px;
}

.notification-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	margin-top: 18px;
}

.notification-meta-item {
	display: grid;
	gap: 6px;
	padding: 16px 18px;
	min-width: 280px;
	border-radius: 18px;
	border: 1px solid rgba(122, 164, 255, 0.14);
	background: rgba(7, 28, 74, 0.34);
}

.notification-meta-item strong {
	font-size: 13px;
	font-weight: 800;
	color: var(--color-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.notification-meta-item span {
	font-size: 16px;
	font-weight: 700;
	color: #f4f8ff;
}

.notification-warning {
	padding: 14px 16px;
	border-radius: 18px;
	border: 1px solid rgba(230, 178, 75, 0.24);
	background: rgba(86, 58, 9, 0.22);
	color: #ffe1a8;
	font-size: 14px;
	line-height: 1.5;
}

.notification-table {
	min-width: 920px;
}

.notification-receiver {
	display: grid;
	gap: 4px;
}

.notification-receiver strong {
	font-size: 15px;
	font-weight: 700;
	color: #f4f8ff;
}

.notification-receiver span {
	font-size: 13px;
	color: var(--color-muted);
}

.notification-toggle-cell {
	text-align: center;
}

.notification-checkline {
	justify-content: center;
}

.notification-checkline span {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.admin-empty-cell {
	padding: 28px 18px !important;
	text-align: center;
	color: var(--color-muted);
	font-size: 14px;
}

.inline-form {
	display: inline-flex;
}

.admin-form-spacer {
	display: none;
}

.admin-confirm-modal[hidden] {
	display: none;
}

.admin-confirm-modal {
	position: fixed;
	inset: 0;
	z-index: 220;
	display: grid;
	place-items: center;
	padding: 24px;
}

.admin-confirm-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(2, 10, 32, 0.62);
	backdrop-filter: blur(10px);
}

.admin-confirm-dialog {
	position: relative;
	z-index: 2;
	width: min(560px, calc(100vw - 32px));
	border-radius: 28px;
	border: 1px solid rgba(122, 164, 255, 0.22);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 22%),
		linear-gradient(180deg, rgba(13, 40, 99, 0.94), rgba(8, 28, 76, 0.96));
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
	overflow: hidden;
}

.admin-confirm-head,
.admin-confirm-footer {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 24px 28px 0;
}

.admin-confirm-head h3 {
	margin: 0;
	font-size: 28px;
	line-height: 1.05;
	letter-spacing: -0.03em;
	font-weight: 800;
}

.admin-confirm-close {
	width: 44px;
	height: 44px;
	border-radius: 14px;
	border: 1px solid rgba(122, 164, 255, 0.18);
	background: rgba(8, 27, 74, 0.45);
	color: #dce7ff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.admin-confirm-body {
	position: relative;
	z-index: 1;
	padding: 16px 28px 12px;
	display: grid;
	gap: 14px;
}

.admin-confirm-copy,
.admin-confirm-step-two-copy {
	margin: 0;
	padding: 18px 20px;
	border-radius: 20px;
	border: 1px solid rgba(122, 164, 255, 0.16);
	background: rgba(9, 31, 82, 0.42);
	color: #dbe8ff;
	font-size: 16px;
	line-height: 1.6;
}

.admin-confirm-step-two-copy {
	border-color: rgba(246, 207, 116, 0.3);
	background: rgba(86, 53, 10, 0.26);
	color: #fff1c9;
}

.admin-confirm-footer {
	justify-content: flex-end;
	padding: 0 28px 28px;
}

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

.ri-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 160;
	display: grid;
	place-items: center;
	padding: 32px;
}

.ri-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(2, 10, 32, 0.6);
	backdrop-filter: blur(10px);
}

.ri-modal {
	position: relative;
	z-index: 2;
	width: min(860px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	display: flex;
	flex-direction: column;
	border-radius: 28px;
	border: 1px solid rgba(122, 164, 255, 0.24);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 22%),
		linear-gradient(180deg, rgba(13, 40, 99, 0.94), rgba(8, 28, 76, 0.96));
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
	overflow: hidden;
}

.ri-modal::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(circle at 14% 78%, rgba(68, 145, 255, 0.12), transparent 20%),
		radial-gradient(circle at 76% 22%, rgba(70, 212, 255, 0.08), transparent 18%);
}

.ri-modal-compact {
	width: min(680px, calc(100vw - 32px));
}

.ri-modal-player-only {
	width: min(840px, calc(100vw - 32px));
}

.ri-modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	padding: 28px 32px 18px;
}

.ri-modal-title {
	margin: 0;
	font-size: 28px;
	line-height: 1.05;
	letter-spacing: -0.03em;
	font-weight: 800;
}

.ri-modal-subtitle {
	margin: 10px 0 0;
	color: var(--color-muted);
	font-size: 15px;
	line-height: 1.5;
}

.ri-modal-close {
	width: 44px;
	height: 44px;
	border-radius: 14px;
	border: 1px solid rgba(122, 164, 255, 0.18);
	background: rgba(8, 27, 74, 0.45);
	color: #dce7ff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.ri-modal-body {
	padding: 0 32px 24px;
	display: grid;
	gap: 18px;
	overflow: auto;
}

.ri-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding: 0 32px 28px;
}

.ri-panel {
	border: 1px solid rgba(122, 164, 255, 0.16);
	border-radius: 22px;
	background: rgba(9, 31, 82, 0.42);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.top-action-button {
	min-width: 164px;
}

.ri-form-panel,
.ri-check-panel {
	padding: 22px 24px;
}

.ri-form-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.ri-check-panel strong {
	display: block;
	margin-bottom: 14px;
	font-size: 16px;
}

.ri-form-grid,
.ri-status-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
	gap: 14px;
	align-items: end;
}

.ri-form-grid-clients,
.ri-form-grid-upload {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ri-form-grid-password {
	grid-template-columns: 1fr;
}

.field-block {
	display: grid;
	gap: 8px;
}

.input-textarea {
	height: auto;
	min-height: 120px;
	padding: 14px 16px;
	resize: vertical;
}

.input-file {
	padding: 12px 16px;
	height: auto;
}

.ri-details {
	padding: 8px 22px 16px;
}

.ri-detail-row {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 18px;
	align-items: start;
	padding: 14px 4px;
	border-bottom: 1px solid rgba(122, 164, 255, 0.12);
}

.ri-detail-row:last-of-type {
	border-bottom: 0;
}

.ri-label {
	color: var(--color-muted);
	font-size: 15px;
	font-weight: 600;
}

.ri-value {
	font-size: 16px;
	font-weight: 600;
	color: var(--color-text);
	line-height: 1.55;
	word-break: break-word;
}

.ri-idbox {
	margin-top: 8px;
	padding: 12px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	border-radius: 16px;
	border: 1px solid rgba(122, 164, 255, 0.14);
	background: rgba(7, 28, 74, 0.58);
}

.ri-idtext {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 14px;
	color: #c8d8ff;
}

.ri-icon-actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

.ri-icon-btn {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	border: 1px solid rgba(122, 164, 255, 0.14);
	background: rgba(34, 83, 194, 0.46);
	color: #dbe8ff;
	display: grid;
	place-items: center;
	text-decoration: none;
	font-size: 16px;
	cursor: pointer;
}

.ri-player-top {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 18px;
	align-items: center;
	padding: 20px 22px 18px;
	border-bottom: 1px solid rgba(122, 164, 255, 0.1);
}

.ri-play {
	width: 60px;
	height: 60px;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(135deg, #2e7dff, #35cfff);
	color: #fff;
	display: grid;
	place-items: center;
	font-size: 22px;
	box-shadow: 0 16px 30px rgba(20, 76, 204, 0.28);
	cursor: pointer;
}

.ri-timeline-block {
	display: grid;
	gap: 10px;
}

.ri-time-row {
	display: flex;
	align-items: center;
	gap: 16px;
	color: #e8f0ff;
	font-size: 15px;
	font-weight: 600;
}

.ri-spacer {
	flex: 1;
}

.ri-wave-wrap {
	position: relative;
	height: 42px;
	display: flex;
	align-items: center;
}

.ri-wave-bars {
	position: absolute;
	inset: 0;
	border-radius: 16px;
	background:
		repeating-linear-gradient(
			90deg,
			rgba(65, 152, 255, 0.08) 0 8px,
			rgba(65, 152, 255, 0.35) 8px 12px,
			rgba(65, 152, 255, 0.08) 12px 18px
		);
	mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.ri-progress-line {
	--ri-progress: 0%;
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	height: 4px;
	border-radius: 999px;
	background: rgba(122, 164, 255, 0.2);
}

.ri-progress-line::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: var(--ri-progress);
	border-radius: inherit;
	background: linear-gradient(90deg, rgba(53, 127, 255, 0.95), rgba(53, 207, 255, 0.95));
}

.ri-progress-line::after {
	content: "";
	position: absolute;
	left: var(--ri-progress);
	top: 50%;
	transform: translate(-50%, -50%);
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #cfe0ff;
	box-shadow: 0 0 0 4px rgba(60, 151, 255, 0.14);
}

.ri-seek {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.ri-player-bottom {
	padding: 18px 22px 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ri-audio-element {
	display: none;
}

.ri-file-row {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #d6e3ff;
	font-size: 15px;
	line-height: 1.4;
	flex-wrap: wrap;
}

.ri-file-icon {
	width: 26px;
	height: 26px;
	border-radius: 8px;
	background: rgba(38, 97, 219, 0.34);
	display: grid;
	place-items: center;
	flex-shrink: 0;
}

.ri-download-row,
.ri-downloads,
.ri-status-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.ri-download {
	align-self: flex-start;
	min-height: 50px;
	padding: 0 22px;
	border-radius: 16px;
	border: 0;
	background: linear-gradient(135deg, #e6b24b, #f6cf72);
	color: #1f1c10;
	font-weight: 800;
	font-size: 16px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	box-shadow: 0 16px 30px rgba(88, 61, 7, 0.24);
}

.ri-status-form {
	padding: 18px 22px;
}

.metrics {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Responsive */
	@media (max-width: 1220px) {
		.metrics {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}
		.toolbar {
			grid-template-columns: 1fr 1fr;
		}
		.form-grid,
		.admin-form-grid-receivers,
		.admin-form-grid-clients,
		.admin-form-grid-support,
		.ri-form-grid,
		.ri-form-columns,
		.ri-status-grid,
		.table-toolbar {
			grid-template-columns: 1fr;
		}
		.admin-tabbar {
			overflow-x: auto;
		}
	}

@media (max-width: 980px) {
	.app {
		grid-template-columns: minmax(0, 1fr);
	}
	.sidebar {
		border-right: 0;
		border-bottom: 1px solid rgba(130, 166, 255, 0.12);
	}
	.main {
		padding: 24px;
	}
	.topbar {
		flex-direction: column;
		align-items: stretch;
	}
	.top-actions {
		justify-content: flex-start;
	}
	.headline p {
		font-size: 18px;
	}
}

	@media (max-width: 720px) {
		.metrics {
			grid-template-columns: 1fr;
		}
		.toolbar {
			grid-template-columns: 1fr;
		}
		.admin-checklist-grid {
			grid-template-columns: 1fr;
		}
		.ri-modal-overlay {
			padding: 16px;
		}
		.ri-modal-header,
		.ri-modal-body,
		.ri-modal-footer {
			padding-left: 18px;
			padding-right: 18px;
		}
		.ri-detail-row {
			grid-template-columns: 1fr;
			gap: 6px;
			padding: 12px 0;
		}
		.ri-player-top {
			grid-template-columns: 1fr;
			justify-items: start;
		}
		.ri-download-row {
			flex-direction: column;
			align-items: stretch;
		}
		.ri-downloads,
		.ri-status-actions,
		.ri-modal-footer {
			flex-direction: column;
			align-items: stretch;
		}
		.tabbar {
			width: 100%;
			overflow: auto;
		}
		.admin-confirm-footer {
			flex-direction: column-reverse;
			align-items: stretch;
		}
			.top-actions {
				display: grid;
				grid-template-columns: minmax(0, 1fr);
				width: 100%;
		}
		.top-actions > * {
			min-width: 0;
			width: 100%;
		}
		.lang-switch,
	.pill,
	.pill-meta {
		width: 100%;
	}
		.toolbar-actions {
			display: grid;
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}
		.table-footer {
			flex-direction: column;
			align-items: flex-start;
		}
		.main {
			padding: 18px 16px 26px;
		}
		.card-body {
			padding: 18px;
		}
	}
