/* Тема сайта — та же графитовая тема, что у панели MarkLoader (admin.css на проде, 2026-11-19).
   Токены, кнопки, поля, таблицы и фон взяты из панели без изменений, чтобы сайт выглядел с ней одинаково. */
:root {
	color-scheme: dark;
	--bg: #0b0b0d;
	--shell: #0e0e11;
	--surface: #141417;
	--surface-2: #18181c;
	--field: #1d1d21;
	--raised: #28282d;
	--hover: #232327;
	--line: rgb(255 255 255 / 7%);
	--line-2: rgb(255 255 255 / 12%);
	--ink: #ededef;
	--ink-2: #c6c6cb;
	--muted: #8f8f97;
	--faint: #66666e;
	--silver: #c9c9ce;
	--signal: #f0a93c;
	--ok: #84cf9f;
	--info: #8fb6e6;
	--bad: #ec8f86;
	--warn: #e9b65c;
	--off: #74747c;
	--blue: #e4e4e7;
	--radius: 14px;
	--card-shadow: 0 1px 0 rgb(255 255 255 / 3%) inset, 0 16px 34px -24px rgb(0 0 0 / 90%);
	--mono: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
	font: 14px/1.45 Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
	min-width: 320px;
	min-height: 100vh;
	margin: 0;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, .brand { letter-spacing: -.03em; }
h2 { font-size: 15px; line-height: 1.3; font-weight: 620; }
p, dt { color: var(--muted); }
button, input, select { font: inherit; }
button, :where(a.tab-button) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 13px;
	border: 1px solid var(--line-2);
	border-radius: 9px;
	color: var(--ink);
	background: rgb(255 255 255 / 4%);
	font-weight: 550;
	font-size: 13px;
	cursor: pointer;
}
button:hover, :where(a.tab-button):hover { background: rgb(255 255 255 / 8%); }
button:disabled { opacity: .45; cursor: default; }
button, a, summary { touch-action: manipulation; }
a { color: inherit; }
.icon { width: 16px; height: 16px; flex: none; }
:focus-visible { outline: 2px solid rgb(232 232 236 / 70%); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
code, .record-id, .issue-date, .secret-output, kbd, .mono { font-family: var(--mono); }
.mono { font-size: 12.5px; }
.primary { background: var(--silver); color: #111114; border-color: transparent; font-weight: 620; }
.primary:hover { background: #d6d6da; }
.primary .icon { color: #111114; }
.ghost { background: rgb(255 255 255 / 4%); }
.danger { color: var(--bad); }
.compact { padding: 6px 11px; font-size: 12.5px; }
.link-button { padding: 3px 6px; border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 550; }
.link-button:hover { color: var(--ink); background: rgb(255 255 255 / 5%); }

/* Статусы и оттенки */
.active { --status: var(--ok); }
.created { --status: #d4d4d9; }
.frozen { --status: var(--info); }
.banned { --status: var(--bad); }
.expired { --status: var(--off); }
.hue-0 { --hue-bg: #c4513c; --hue-ink: #2b110c; }
.hue-1 { --hue-bg: #c99a45; --hue-ink: #2f220a; }
.hue-2 { --hue-bg: #62a07c; --hue-ink: #0f251a; }
.hue-3 { --hue-bg: #7093c8; --hue-ink: #111d31; }
.hue-4 { --hue-bg: #9e80c6; --hue-ink: #22183a; }
.hue-5 { --hue-bg: #bd6e87; --hue-ink: #2f121d; }
.hue-admin { --hue-bg: #dcdce0; --hue-ink: #18181b; }


/* Фон: размытая топографическая карта и плавающий свет */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.backdrop canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s ease; }
.backdrop.ready canvas { opacity: 1; }
.backdrop .light {
	--r: 6vmax;
	--spot: none;
	position: absolute;
	inset: calc(var(--r) * -1);
	background: rgb(234 234 240 / var(--haze, 7%));
	-webkit-mask-image: var(--spot);
	mask-image: var(--spot);
}
/* .hold cancels the light's orbit, so lit lines stay aligned with the base lines underneath. */
.backdrop .light > .hold { position: absolute; left: var(--r); top: var(--r); width: calc(100% - var(--r) * 2); height: calc(100% - var(--r) * 2); }
.backdrop .light-a {
	--r: 11vmax;
	--period: 42s;
	--haze: 5.5%;
	--spot: radial-gradient(44vmax 36vmax at 72% 12%, #000, rgb(0 0 0 / 64%) 24%, rgb(0 0 0 / 30%) 48%, rgb(0 0 0 / 10%) 72%, transparent);
}
.backdrop .light-b {
	--r: 13vmax;
	--period: 54s;
	--phase: -22s;
	--turn: reverse;
	--haze: 5%;
	--spot: radial-gradient(50vmax 34vmax at 24% 90%, #000, rgb(0 0 0 / 64%) 24%, rgb(0 0 0 / 30%) 48%, rgb(0 0 0 / 10%) 72%, transparent);
}
.backdrop .light-c {
	--r: 9vmax;
	--period: 48s;
	--phase: -31s;
	--haze: 4.5%;
	--spot: radial-gradient(38vmax 30vmax at 86% 92%, #000, rgb(0 0 0 / 64%) 24%, rgb(0 0 0 / 30%) 48%, rgb(0 0 0 / 10%) 72%, transparent);
}
.backdrop::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(130% 120% at 50% 48%, transparent 58%, rgb(11 11 13 / 42%) 100%);
}
@media (prefers-reduced-motion: no-preference) {
	@keyframes light-orbit {
		from { transform: rotate(0turn) translateX(var(--r)) rotate(0turn); }
		to { transform: rotate(1turn) translateX(var(--r)) rotate(-1turn); }
	}
	@keyframes light-hold {
		from { transform: rotate(0turn) translateX(calc(var(--r) * -1)) rotate(0turn); }
		to { transform: rotate(1turn) translateX(calc(var(--r) * -1)) rotate(-1turn); }
	}
	/* The lines float: a slow drift with a hint of rotation and zoom. Scale stays above 1.08,
	   which keeps the canvas edges outside the viewport at every point of the path. */
	@keyframes terrain-drift {
		0%, 100% { translate: 0 0; rotate: 0deg; scale: 1.08; }
		25% { translate: 1.1vmax -.7vmax; rotate: .35deg; scale: 1.095; }
		50% { translate: .3vmax .9vmax; rotate: -.25deg; scale: 1.085; }
		75% { translate: -1vmax .2vmax; rotate: .2deg; scale: 1.1; }
	}
	/* Only transform is animated on the masked light layers: animating their opacity made
	   Chrome occasionally drop the mask for a frame, which flashed the haze over the whole page. */
	.backdrop .light {
		animation: light-orbit var(--period, 80s) linear var(--phase, 0s) infinite var(--turn, normal);
		will-change: transform;
	}
	.backdrop .light > .hold {
		animation: light-hold var(--period, 80s) linear var(--phase, 0s) infinite var(--turn, normal);
		will-change: transform;
	}
	.backdrop canvas.terrain {
		animation: terrain-drift 46s ease-in-out infinite;
		will-change: translate, rotate, scale;
	}
}
/* С WebGL весь фон собирается в canvas.composite; CSS-слои остаются только запасным вариантом. */
.backdrop.gl > canvas.terrain, .backdrop.gl .light { display: none; }
.backdrop.still .light, .backdrop.still .light > *, .backdrop.still canvas { animation: none !important; }
main, .notice { position: relative; z-index: 1; }

/* Таблицы */
.table-wrap { position: relative; overflow-x: auto; scrollbar-width: thin; }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; }
th { color: var(--muted); font-size: 12px; font-weight: 540; white-space: nowrap; background: var(--field); }
td, th { padding: 12px; }
td { font-size: 13px; }
th:first-child, td:first-child { border-radius: 7px 0 0 7px; }
th:last-child, td:last-child { border-radius: 0 7px 7px 0; }
tbody tr:nth-child(even) { background: var(--field); }
tbody tr:hover { background: var(--hover); }
.status, .artifact-state { display: inline-flex; align-items: center; gap: 7px; color: var(--status, var(--muted)); font-size: 12px; }
.status { padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--status, var(--muted)) 13%, var(--surface)); font-size: 11px; white-space: nowrap; }
.status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Поля */
label { display: block; font-size: 12px; font-weight: 560; color: var(--ink-2); }
input, select {
	width: 100%;
	min-width: 0;
	min-height: 39px;
	padding: 9px 11px;
	border: 1px solid var(--line);
	border-radius: 9px;
	background: var(--field);
	color: var(--ink);
	font: inherit;
	font-size: 14px;
}
input:hover, select:hover { border-color: var(--line-2); }
input:focus { border-color: rgb(255 255 255 / 22%); }
input:focus-visible, select:focus-visible { outline-width: 1px; outline-offset: 1px; }
input::placeholder { color: var(--faint); }
label > input, label > select, label > .field-pair { display: block; margin-top: 6px; }
label > .field-pair { display: flex; gap: 8px; }

/* Плитки статистики */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-tile { display: grid; align-content: start; gap: 3px; min-width: 0; padding: 14px 16px; border-radius: 12px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-size: 24px; font-weight: 610; letter-spacing: -.035em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-note { overflow: hidden; color: var(--faint); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.stat-tile.warn .stat-value { color: var(--warn); }
.stat-tile.live .stat-value { display: flex; align-items: center; gap: 9px; color: var(--info); }
.stat-tile.live .stat-value::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgb(143 182 230 / 16%); }

/* Таблицы разделов */
.table-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--card-shadow); }
.data-table { min-width: 720px; }
.data-table th {
	height: 44px; padding: 10px 16px; border-bottom: 1px solid var(--line); border-radius: 0; background: rgb(255 255 255 / 1.5%);
	color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.data-table td { height: 58px; padding: 9px 16px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 13.5px; }
.data-table tbody tr, .data-table tbody tr:nth-child(even) { background: transparent; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgb(255 255 255 / 2.5%); }
.data-table td.num, .data-table td.muted { font-variant-numeric: tabular-nums; }
.data-table td.num small, .cell-stack small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; }
.data-table td.muted, .muted { color: var(--muted); }
.data-table td.empty { height: auto; padding: 26px 16px; color: var(--muted); text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--field); color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--signal); }
.row-actions { width: 1%; text-align: right; white-space: nowrap; }
.row-actions .row-icon { width: 32px; height: 32px; margin-left: 4px; border: 1px solid var(--line); border-radius: 9px; background: rgb(255 255 255 / 3%); color: var(--ink-2); }
.row-actions .row-icon:hover { border-color: var(--line-2); background: rgb(255 255 255 / 8%); color: var(--ink); }
.row-actions .row-icon .icon { width: 15px; height: 15px; }
.table-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.pager-buttons { display: flex; align-items: center; gap: 8px; }

/* Карточка — та же поверхность, что у карточек и таблиц панели */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgb(255 255 255 / 2.2%), transparent 120px), var(--surface); box-shadow: var(--card-shadow); }

/* Заглушка: центрированный блок, как страница /loader */
.hold-page { display: grid; min-height: 100vh; min-height: 100dvh; place-items: center; padding: 28px 16px; }
.hold-wrap { width: min(100%, 420px); text-align: center; }
.hold-brand { display: flex; justify-content: center; align-items: center; gap: 9px; margin: 0 0 26px; color: var(--ink); font-size: 23px; font-weight: 680; letter-spacing: -.04em; }
.hold-brand svg { width: 26px; height: 26px; color: var(--silver); }
.hold-page h1 { font: 620 21px/1.3 Inter, "Segoe UI", sans-serif; letter-spacing: -.03em; }
.hold-caption { margin: 6px 0 24px; color: var(--muted); }
.hold-card { display: grid; gap: 10px; padding: 16px; text-align: left; }
.hold-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.hold-row .status { --status: var(--signal); }
