* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	   /* Шрифты */
    --font-display: 'Unbounded', 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	--ink: #3d4f63; /* Темно-серо-голубой (на основе #8da4b6) */
	--ink-2: #5a6f83; /* Второй темный оттенок */
	--ink-3: #7a8fa3; /* Более светлый темный */

	/* Акцент — приглушенный сине-серый */
	--accent: #6b8a9e;
	--accent-dark: #4e6a7e; /* Более темный акцент */
	--accent-tint: #e8eef2; /* Светлый акцент на основе #f0f0f0 + голубой */

	/* Статусные цвета (адаптированы под гамму) */
	--success: #5a8a7a;
	--success-tint: #eaf3ef;
	--error: #b06a6a;
	--error-tint: #f5ebeb;

	/* Нейтральные тона */
	--bg: #f5f5f5; /* Основной фон (близко к #f0f0f0) */
	--surface: #ffffff; /* Фон карточек */
	--border: #e0e0e0; /* Основной цвет рамок (ваш #e0e0e0) */
	--border-strong: #c8d0d8; /* Более заметная рамка (чуть темнее) */
	--text: #3d4f63; /* Основной цвет текста (в тон ink) */
	--text-light: #7a8fa3; /* Второстепенный текст */
	--text-faint: #a8b8c8; /* Едва заметный текст */

	/* Скругления и тени */
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 18px;
	--shadow-sm: 0 1px 2px rgba(61, 79, 99, 0.06);
	--shadow-md: 0 6px 20px rgba(61, 79, 99, 0.08);
	--shadow-lg: 0 16px 40px rgba(61, 79, 99, 0.16);
}

/* Базовые стили страницы: шрифт, фон, межстрочный интервал */
body {
    font-family: var(--font-body);
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
}

h1,
h2,
h3 {
	 font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--ink);
}

h1 {
	font-size: 1.75rem;
}
h2 {
	font-size: 1.3rem;
}
h3 {
	font-size: 1.05rem;
}

code {
	    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
	background: var(--accent-tint);
	color: var(--accent-dark);
	padding: 0.15rem 0.4rem;
	border-radius: 4px;
	font-size: 0.85em;
}

/* НАВИГАЦИОННАЯ ПАНЕЛЬ (шапка сайта) */
nav {
	background: var(--ink);
	color: white;
	padding: 0 2rem;
	display: flex;
	justify-content: space-between; /* лого слева, меню справа */
	align-items: center;
	height: 64px;
	box-shadow: var(--shadow-md); /* тень под шапкой, чуть заметнее прежней */
	position: sticky;
	top: 0;
	z-index: 100;
}

.nav-brand {
    font-family: var(--font-display);
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.nav-brand::before {
	content: '';
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--accent);
}

.nav-menu {
	display: flex;
	gap: 2rem; /* расстояние между пунктами меню */
	list-style: none; /* убираем маркеры списка */
	align-items: center;
}

.nav-menu a {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
	transition: color 0.2s;
	cursor: pointer;
	position: relative;
	padding: 0.25rem 0;
}
.nav-menu a::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -4px;
	height: 2px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s ease;
}

.nav-menu a:hover {
	color: white;
}

.nav-menu a:hover::after {
	transform: scaleX(1);
}

.btn-logout {
	background: var(--accent);
	color: var(--ink);
	border: none;
	padding: 0.5rem 1.1rem;
	border-radius: var(--radius-sm);
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 600;
	transition:
		background 0.2s,
		transform 0.15s;
}

.btn-logout:hover {
	background: var(--accent-dark);
	color: white;
	transform: translateY(-1px);
}

/* ОСНОВНОЙ КОНТЕЙНЕР И ПЕРЕКЛЮЧЕНИЕ СЕКЦИЙ */
.container {
	max-width: 1200px;
	margin: 0 auto; 
	padding: 2.5rem 2rem;
}

.section {
	display: none; 
	animation: fadeIn 0.35s ease; 
}

.section.active {
	display: block; 
}

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

/* ФОРМЫ (поля ввода, лейблы, группировка полей)*/
.form-group {
	margin-bottom: 1.5rem;
}

label {
	display: block;
	font-weight: 500;
	margin-bottom: 0.5rem;
	font-size: 0.9rem;
	color: var(--text);
}

input,
textarea,
select {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1.5px solid var(--border-strong);
	border-radius: var(--radius-sm);
	font-family: inherit;
	font-size: 0.95rem;
	color: var(--text);
	background: var(--surface);
	transition:
		border-color 0.2s,
		box-shadow 0.2s;
}

input::placeholder,
textarea::placeholder {
	color: var(--text-faint);
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 4px var(--accent-tint);
}

textarea {
	resize: vertical;
	min-height: 120px;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

/* КНОПКИ */
.btn {
	padding: 0.7rem 1.4rem;
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	transition:
		transform 0.15s ease,
		box-shadow 0.15s ease,
		background 0.15s ease;
	text-decoration: none;
	display: inline-block;
	text-align: center;
}

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

.btn-primary {
	background: var(--accent);
	color: var(--ink);
}

.btn-primary:hover {
	background: var(--accent-dark);
	color: white;
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

.btn-secondary {
	background: var(--surface);
	color: var(--ink);
	border: 1.5px solid var(--border-strong);
}

.btn-secondary:hover {
	background: var(--ink);
	color: white;
	border-color: var(--ink);
}

.btn-danger {
	background: var(--error-tint);
	color: var(--error);
	border: 1.5px solid transparent;
}

.btn-danger:hover {
	background: var(--error);
	color: white;
}

.btn-success {
	background: var(--success);
	color: white;
}

.btn-success:hover {
	background: #336f52;
}

/* ТАБЛИЦЫ (используются в разделе жюри для списка конкурсантов) */
table {
	width: 100%;
	border-collapse: collapse; /* убираем двойные границы между ячейками */
	margin-top: 1.5rem;
	background: var(--surface);
	border-radius: var(--radius-md);
	overflow: hidden; /* скругление углов у таблицы работает только вместе с overflow:hidden */
	box-shadow: var(--shadow-sm);
}

th {
	background: var(--ink-2);
	color: white;
	padding: 0.9rem 1.1rem;
	text-align: left;
	font-weight: 600;
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

td {
	padding: 0.9rem 1.1rem;
	border-bottom: 1px solid var(--border);
	font-size: 0.92rem;
}

tr:last-child td {
	border-bottom: none;
}

tbody tr {
	transition: background 0.15s;
}

tr:hover td {
	background: var(--accent-tint); /* подсветка строки при наведении курсора */
}

/* КАРТОЧКИ */
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 1.75rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--shadow-sm);
	transition: box-shadow 0.2s;
}

.card h2 {
	margin-bottom: 1rem;
	font-size: 1.15rem;
	color: var(--ink);
}

/* УВЕДОМЛЕНИЯ */
.alert {
	padding: 0.9rem 1.1rem;
	border-radius: var(--radius-sm);
	margin-bottom: 1rem;
	display: none;
	font-size: 0.9rem;
	font-weight: 500;
	border-left: 3px solid transparent;
}

.alert.show {
	display: block;
	animation: fadeIn 0.25s ease;
}

.alert-success {
	background: var(--success-tint);
	color: var(--success);
	border-left-color: var(--success);
}

.alert-error {
	background: var(--error-tint);
	color: var(--error);
	border-left-color: var(--error);
}

.alert-info {
	background: var(--accent-tint);
	color: var(--accent-dark);
	border-left-color: var(--accent);
}

/* БЛОК СТАТИСТИКИ */
.stats-grid {
	display: grid;
	/* auto-fit + minmax позволяет карточкам автоматически переноситься
       на новую строку на маленьких экранах без media-запросов */
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.25rem;
	margin-top: 1.5rem;
}

.stat-card {
	background: linear-gradient(145deg, var(--ink) 0%, var(--ink-2) 100%);
	color: white;
	padding: 1.5rem;
	border-radius: var(--radius-md);
	text-align: left;
	box-shadow: var(--shadow-sm);
	position: relative;
	overflow: hidden;
}

.stat-card::after {
	content: '';
	position: absolute;
	top: -30px;
	right: -30px;
	width: 90px;
	height: 90px;
	border-radius: 50%;
	background: var(--accent);
	opacity: 0.18;
}

.stat-value {
    font-family: var(--font-display);
	font-size: 2.1rem;
	font-weight: 600;
	line-height: 1;
}

.stat-label {
	font-size: 0.85rem;
	margin-top: 0.6rem;
	opacity: 0.85;
}

/* ФИЛЬТРЫ (панель жюри: фильтр по номинации/возрасту/статусу) */
.filters {
	display: flex;
	gap: 1rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}

.filter-group {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	flex: 1;
	min-width: 200px;
}

.filter-group label {
	margin: 0;
	white-space: nowrap;
	font-weight: 500;
}

.filter-group select {
	margin: 0;
}

/* МОДАЛЬНОЕ ОКНО (например, для смены номинации конкурсанта) */
.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: rgba(27, 36, 56, 0.55);
	backdrop-filter: blur(2px);
	animation: fadeIn 0.2s;
}

.modal.show {
	display: flex;
	align-items: center;
	justify-content: center;
}

.modal-content {
	background: var(--surface);
	padding: 2rem;
	border-radius: var(--radius-lg);
	max-width: 500px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: var(--shadow-lg);
}

.modal-close {
	float: right;
	font-size: 1.5rem;
	cursor: pointer;
	background: none;
	border: none;
	color: var(--text-light);
	line-height: 1;
	transition: color 0.15s;
}

.modal-close:hover {
	color: var(--error);
}

@media (max-width: 768px) {
	.form-row {
		grid-template-columns: 1fr;
	}

	.nav-menu {
		display: none;
	}

	.filters {
		flex-direction: column;
	}

	.filter-group {
		min-width: auto;
	}

	table {
		font-size: 0.85rem;
	}

	td,
	th {
		padding: 0.7rem;
	}

	.container {
		padding: 1.5rem 1.25rem;
	}
}

/* СТРАНИЦА АВТОРИЗАЦИИ (вход / регистрация) */
.auth-container {
	max-width: 400px;
	margin: 90px auto;
	padding: 2.25rem 2rem;
	background: var(--surface);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	border: 1px solid var(--border);
}

.auth-container h1 {
	text-align: center;
	margin-bottom: 0.5rem;
}

.auth-container h1::after {
	content: '';
	display: block;
	width: 36px;
	height: 3px;
	background: var(--accent);
	border-radius: 2px;
	margin: 0.75rem auto 1.5rem;
}

.auth-links {
	display: flex;
	gap: 1rem;
	margin-top: 1.5rem;
}

.auth-links a {
	flex: 1;
	text-align: center;
	color: var(--accent-dark);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
}

.auth-links a:hover {
	text-decoration: underline;
}

/* ИНДИКАТОР ЗАГРУЗКИ (спиннер) */
.spinner {
	border: 3px solid var(--border);
	border-top: 3px solid var(--accent);
	border-radius: 50%;
	width: 30px;
	height: 30px;
	animation: spin 0.8s linear infinite;
	display: inline-block;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* ПУСТОЕ СОСТОЯНИЕ (когда список конкурсантов/данных пуст)*/
.empty-state {
	text-align: center;
	padding: 2.5rem 1.5rem;
	color: var(--text-light);
	background: var(--surface);
	border: 1.5px dashed var(--border-strong);
	border-radius: var(--radius-md);
}

.empty-state h3 {
	margin-bottom: 0.5rem;
	color: var(--text);
}
