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

:root {
	--black: #0a0a0a;
	--white: #ffffff;
	--gray-100: #f5f5f5;
	--gray-200: #e8e8e8;
	--gray-300: #d0d0d0;
	--gray-500: #888888;
	--gray-700: #444444;
	--accent: #0a0a0a;
	--font: 'Inter', 'Segoe UI', Roboto, system-ui, sans-serif;
	--radius: 10px;
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
	--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.09);
	--header-h: 68px;
	--max-w: 1200px;
	--pad-x: 2rem;
}

html {
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
	font-family: var(--font);
	background: var(--white);
	color: var(--black);
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

.site-container {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.list-reset {
	list-style: none;
}

.btn-reset {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
}

a {
	color: inherit;
	text-decoration: none;
}


.header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--black);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
	height: var(--header-h);
}

.header__container {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 var(--pad-x);
	height: 100%;
}

.header__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	gap: 2rem;
}


.header__logo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
}

.logo-mark {
	background: var(--white);
	color: var(--black);
	font-weight: 800;
	font-size: 1rem;
	padding: 0.3rem 0.65rem;
	border-radius: 6px;
	letter-spacing: 0.5px;
	line-height: 1;
}

.logo-mark--sm {
	font-size: 0.85rem;
	padding: 0.25rem 0.55rem;
}

.header__brand {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}

.header__brand strong {
	color: var(--white);
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: -0.3px;
}

.header__brand small {
	color: rgba(255, 255, 255, 0.45);
	font-size: 0.72rem;
	font-weight: 400;
	letter-spacing: 0.3px;
}


.header__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.nav__list {
	display: flex;
	gap: 0.25rem;
}

.nav__link {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 0.9rem;
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.9rem;
	font-weight: 500;
	transition: color 0.2s, background 0.2s;
}

.nav__link svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}

.nav__link:hover,
.nav__link.active {
	color: var(--white);
	background: rgba(255, 255, 255, 0.1);
}


.header__burger {
	display: none;
	flex-direction: column;
	gap: 5px;
	padding: 6px;
	position: relative;
	z-index: 3;
}

.header__burger span {
	display: block;
	width: 24px;
	height: 3px;
	background: #ffffff;
	border-radius: 2px;
	transition: all 0.25s;
}

.header__burger.open span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.header__burger.open span:nth-child(2) {
	opacity: 0;
}

.header__burger.open span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.header__mobile-head {
	display: none;
}

.header__actions {
	display: flex;
	align-items: center;
}


.section-container {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 5rem var(--pad-x);
}

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 2.5rem;
	flex-wrap: wrap;
}

.section-title {
	font-size: 2rem;
	font-weight: 700;
	letter-spacing: -0.5px;
	color: var(--black);
}

.section-badge {
	background: var(--black);
	color: var(--white);
	padding: 0.25rem 1rem;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.3px;
}

.section-link {
	color: var(--gray-700);
	font-weight: 600;
	font-size: 0.9rem;
	transition: color 0.2s;
}

.section-link:hover {
	color: var(--black);
}


.hero {
	background: var(--black);
	color: var(--white);
	padding: 5rem 0 4rem;
}

.hero__container {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 var(--pad-x);
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 3rem;
	flex-wrap: wrap;
}

.hero__eyebrow {
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: rgba(255, 255, 255, 0.4);
	margin-bottom: 1rem;
}

.hero__title {
	font-size: clamp(3.5rem, 8vw, 6rem);
	font-weight: 800;
	letter-spacing: -2px;
	line-height: 0.95;
	margin-bottom: 1.5rem;
}

.hero__title em {
	font-style: normal;
	color: rgba(255, 255, 255, 0.35);
}

.hero__subtitle {
	font-size: 1.1rem;
	color: rgba(255, 255, 255, 0.55);
	max-width: 460px;
	line-height: 1.6;
	margin-bottom: 2.5rem;
}

.hero__actions {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.hero__stats {
	display: flex;
	gap: 2.5rem;
	flex-shrink: 0;
	align-self: flex-end;
	padding-bottom: 0.5rem;
}

.hero__stat {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	border-left: 2px solid rgba(255, 255, 255, 0.12);
	padding-left: 1.5rem;
}

.hero__stat-num {
	font-size: 2.2rem;
	font-weight: 800;
	color: var(--white);
	letter-spacing: -1px;
	line-height: 1;
}

.hero__stat-label {
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.35);
	font-weight: 500;
	margin-top: 0.25rem;
	letter-spacing: 0.3px;
}


.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.75rem;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	transition: all 0.2s;
	border: none;
	font-family: var(--font);
	letter-spacing: 0.2px;
	text-decoration: none;
}

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

.btn--primary:hover {
	background: rgba(255, 255, 255, 0.88);
}


section:not(.hero) .btn--primary,
.modal .btn--primary {
	background: var(--black);
	color: var(--white);
}

section:not(.hero) .btn--primary:hover,
.modal .btn--primary:hover {
	background: #2a2a2a;
}

.btn--outline {
	background: transparent;
	color: var(--white);
	border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.btn--outline:hover {
	border-color: rgba(255, 255, 255, 0.6);
}

.btn--ghost {
	background: var(--gray-100);
	color: var(--gray-700);
	border: 1.5px solid var(--gray-200);
}

.btn--ghost:hover {
	background: var(--gray-200);
}

.btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}


.nearest {
	background: var(--gray-100);
	border-bottom: 1px solid var(--gray-200);
}

.nearest__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1rem;
}

.nearest-card {
	background: var(--white);
	border-radius: var(--radius);
	padding: 1.5rem;
	border: 1px solid var(--gray-200);
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	transition: all 0.2s;
}

.nearest-card:hover {
	box-shadow: var(--shadow-md);
	border-color: var(--gray-300);
}

.nearest-card__days {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--black);
	text-transform: uppercase;
	letter-spacing: 0.8px;
	background: var(--gray-100);
	border-radius: 6px;
	padding: 0.25rem 0.6rem;
	width: fit-content;
}

.nearest-card__days.urgent {
	background: #fee2e2;
	color: #991b1b;
}

.nearest-card__days.soon {
	background: #fef3c7;
	color: #92400e;
}

.nearest-card__title {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--black);
	line-height: 1.3;
}

.nearest-card__date {
	font-size: 0.88rem;
	color: var(--gray-700);
	font-weight: 500;
}

.nearest-card__loc {
	font-size: 0.83rem;
	color: var(--gray-500);
	display: flex;
	align-items: flex-start;
	gap: 0.35rem;
}

.nearest-card__loc svg {
	width: 13px;
	height: 13px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	flex-shrink: 0;
	margin-top: 2px;
}

.nearest-card__btn {
	margin-top: 0.5rem;
	padding: 0.6rem 1.2rem;
	font-size: 0.85rem;
	border-radius: 7px;
	background: var(--black);
	color: var(--white);
	border: none;
	cursor: pointer;
	font-weight: 600;
	width: fit-content;
	transition: background 0.2s;
}

.nearest-card__btn:hover {
	background: #2a2a2a;
}


.competitions {
	background: var(--white);
}

.competitions__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
	gap: 1.5rem;
}

.event-card {
	background: var(--white);
	border-radius: var(--radius);
	padding: 1.8rem;
	border: 1px solid var(--gray-200);
	box-shadow: var(--shadow-sm);
	display: flex;
	flex-direction: column;
	transition: all 0.2s;
}

.event-card:hover {
	box-shadow: var(--shadow-md);
	border-color: var(--gray-300);
	transform: translateY(-2px);
}

.event-card__meta {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--gray-500);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 0.8rem;
}

.event-card__dot {
	width: 6px;
	height: 6px;
	background: var(--black);
	border-radius: 50%;
}

.event-card__title {
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--black);
	margin-bottom: 0.5rem;
	line-height: 1.3;
}

.event-card__date {
	font-size: 0.9rem;
	font-weight: 600;
	color: #333;
	margin-bottom: 0.3rem;
}

.event-card__loc {
	font-size: 0.85rem;
	color: var(--gray-500);
	margin-bottom: 1.5rem;
	flex: 1;
}

.event-card__btn {
	margin-top: auto;
	padding: 0.75rem 1.5rem;
	background: var(--black);
	color: var(--white);
	border: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
	width: fit-content;
	transition: background 0.2s;
	font-family: var(--font);
}

.event-card__btn:hover {
	background: #2a2a2a;
}


.calendar-section {
	background: var(--gray-100);
}

.calendar-list {
	display: flex;
	flex-direction: column;
	gap: 0;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--gray-200);
}

.cal-month {
	background: var(--white);
}

.cal-month__header {
	padding: 1rem 1.5rem;
	font-weight: 700;
	font-size: 0.95rem;
	background: var(--gray-100);
	border-bottom: 1px solid var(--gray-200);
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--gray-700);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-size: 0.8rem;
}

.cal-month__header-count {
	background: var(--gray-200);
	border-radius: 20px;
	padding: 0.1rem 0.6rem;
	font-size: 0.75rem;
	color: var(--gray-500);
}

.cal-item {
	display: grid;
	grid-template-columns: 80px 1fr auto;
	align-items: center;
	gap: 1.5rem;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid var(--gray-100);
	transition: background 0.15s;
}

.cal-item:last-child {
	border-bottom: none;
}

.cal-item:hover {
	background: #fafafa;
}

.cal-item__date {
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--black);
	white-space: nowrap;
}

.cal-item__info {
	min-width: 0;
}

.cal-item__title {
	font-weight: 600;
	font-size: 0.95rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cal-item__loc {
	font-size: 0.8rem;
	color: var(--gray-500);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cal-item__action {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--black);
	white-space: nowrap;
	cursor: pointer;
	background: none;
	border: none;
	font-family: var(--font);
	padding: 0.4rem 0.8rem;
	border-radius: 6px;
	transition: background 0.2s;
}

.cal-item__action:hover {
	background: var(--gray-100);
}

.cal-item__action svg {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}


.results-section {
	background: var(--white);
}

.results-empty-state {
	text-align: center;
	padding: 5rem 2rem;
	color: var(--gray-500);
}

.empty-icon {
	margin: 0 auto 1.5rem;
	width: 80px;
	height: 80px;
	background: var(--gray-100);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.results-empty-state h3 {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--black);
	margin-bottom: 0.6rem;
}

.results-empty-state p {
	max-width: 400px;
	margin: 0 auto;
	font-size: 0.95rem;
	line-height: 1.6;
}


.media-section {
	background: var(--gray-100);
}

.media-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1rem;
}

.media-card {
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--white);
	border: 1px solid var(--gray-200);
	transition: all 0.2s;
}

.media-card:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-2px);
}

.media-card--placeholder .media-card__img {
	aspect-ratio: 4/3;
	background: var(--gray-100);
	display: flex;
	align-items: center;
	justify-content: center;
}

.media-card--placeholder .media-card__img svg {
	width: 36px;
	height: 36px;
	stroke: var(--gray-300);
	fill: none;
	stroke-width: 1.5;
}

.media-card p {
	padding: 0.8rem 1rem;
	font-size: 0.82rem;
	color: var(--gray-500);
	font-weight: 500;
}


.admin-section {
	background: var(--white);
}

.export-buttons {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.export-btn {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	font-size: 0.82rem;
	color: var(--white);
	transition: opacity 0.2s;
	font-family: var(--font);
}

.export-btn svg {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.csv-btn {
	background: var(--black);
}

.json-btn {
	background: #333;
}

.refresh-btn {
	background: #555;
}

.export-btn:hover {
	opacity: 0.82;
}

.table-wrapper {
	overflow-x: auto;
	border-radius: var(--radius);
	border: 1px solid var(--gray-200);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.84rem;
}

th {
	background: var(--gray-100);
	padding: 0.75rem 0.75rem;
	text-align: left;
	font-weight: 700;
	color: var(--black);
	white-space: nowrap;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	border-bottom: 2px solid var(--gray-200);
}

td {
	padding: 0.7rem 0.75rem;
	border-bottom: 1px solid var(--gray-100);
	color: #333;
}

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

tr:hover td {
	background: #fafafa;
}

.table-placeholder {
	text-align: center;
	padding: 2.5rem;
	color: var(--gray-500);
}

.records-count {
	margin-top: 1rem;
	color: var(--gray-500);
	font-size: 0.88rem;
	font-weight: 500;
}


.footer {
	background: var(--black);
	color: var(--white);
	margin-top: auto;
}

.footer__container {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 3.5rem var(--pad-x) 2rem;
}

.footer__main {
	display: grid;
	grid-template-columns: 1.8fr 1fr 1fr 1.3fr;
	gap: 3rem;
	margin-bottom: 2.5rem;
	padding-bottom: 2.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__logo {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	margin-bottom: 1rem;
}

.footer__logo strong {
	font-size: 1.3rem;
	font-weight: 800;
	color: var(--white);
}

.footer__brand p {
	color: rgba(255, 255, 255, 0.35);
	font-size: 0.88rem;
	line-height: 1.6;
}

.footer__col-title {
	font-weight: 700;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: rgba(255, 255, 255, 0.35);
	margin-bottom: 1rem;
}

.footer__col nav {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.footer__col nav a {
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.9rem;
	font-weight: 500;
	transition: color 0.2s;
}

.footer__col nav a:hover {
	color: var(--white);
}

.footer__phone {
	display: inline-block;
	color: var(--white);
	font-size: 1.15rem;
	font-weight: 800;
	text-decoration: none;
	margin-bottom: 0.4rem;
	cursor: pointer;
}

.footer__phone:hover {
	opacity: 0.85;
}

.footer__person {
	color: rgba(255, 255, 255, 0.55);
	font-size: 0.9rem;
}

.footer__bottom {
	display: flex;
	justify-content: space-between;
	color: rgba(255, 255, 255, 0.3);
	font-size: 0.82rem;
	gap: 1rem;
	flex-wrap: wrap;
}


.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	padding: 1rem;
}

.modal-overlay.active {
	display: flex;
}

.modal {
	background: var(--white);
	border-radius: 16px;
	max-width: 560px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 2.2rem;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
	position: relative;
}

.modal__close {
	position: absolute;
	top: 1.1rem;
	right: 1.3rem;
	font-size: 1.7rem;
	color: var(--gray-300);
	transition: color 0.2s;
	line-height: 1;
}

.modal__close:hover {
	color: var(--black);
}

.modal__title {
	font-size: 1.6rem;
	font-weight: 700;
	margin-bottom: 0.3rem;
}

.modal__subtitle {
	color: var(--gray-500);
	margin-bottom: 1.8rem;
	font-size: 0.92rem;
	font-weight: 500;
}

.form-group {
	display: flex;
	flex-direction: column;
	margin-bottom: 1rem;
}

.form-row {
	display: flex;
	gap: 1rem;
}

.form-row .form-group {
	flex: 1;
	min-width: 130px;
}

label {
	font-weight: 600;
	font-size: 0.82rem;
	color: var(--gray-700);
	margin-bottom: 0.3rem;
	letter-spacing: 0.2px;
}

input,
select {
	padding: 0.7rem 0.9rem;
	border: 1.5px solid var(--gray-200);
	border-radius: 8px;
	font-size: 0.92rem;
	background: #fafafa;
	font-family: var(--font);
	color: var(--black);
	transition: all 0.2s;
}

input:focus,
select:focus {
	outline: none;
	border-color: var(--black);
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
	background: var(--white);
}

#entryTime {
	font-family: 'Courier New', monospace;
	font-size: 1.05rem;
	letter-spacing: 2px;
	font-weight: 600;
}

.field-hint {
	font-size: 0.72rem;
	color: var(--gray-500);
	margin-top: 0.25rem;
}

.modal__actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.form-message {
	text-align: center;
	margin-top: 0.8rem;
	font-weight: 600;
	font-size: 0.9rem;
	min-height: 1.4em;
}


@media (max-width: 900px) {
	.header__nav {
		position: fixed;
		top: var(--header-h);
		left: 0;
		right: 0;
		z-index: 1;
		background: var(--black);
		padding: 1.5rem var(--pad-x);
		/* Полностью прячем над экраном (учитываем высоту шапки + запас),
		   чтобы нижний край меню не выглядывал и не перекрывал бургер. */
		transform: translateY(calc(-100% - var(--header-h) - 24px));
		transition: transform 0.3s ease;
		border-top: 1px solid rgba(255, 255, 255, 0.08);
		justify-content: flex-start;
	}

	.header__nav.open {
		transform: translateY(0);
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	}

	.nav__list {
		flex-direction: column;
		gap: 0.25rem;
		width: 100%;
	}

	.nav__link {
		padding: 0.75rem 1rem;
		font-size: 1rem;
		border-radius: 8px;
	}

	.header__burger {
		display: flex;
	}

	.hero__stats {
		display: none;
	}

	.hero__title {
		letter-spacing: -1px;
	}

	.footer__main {
		grid-template-columns: 1fr 1fr;
	}

	.footer__brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 600px) {
	:root {
		--pad-x: 1.2rem;
	}

	.section-container {
		padding: 3.5rem var(--pad-x);
	}

	.section-title {
		font-size: 1.6rem;
	}

	.competitions__grid,
	.nearest__grid,
	.media-grid {
		grid-template-columns: 1fr;
	}

	.cal-item {
		grid-template-columns: 65px 1fr;
		grid-template-rows: auto auto;
	}

	.cal-item__action {
		display: none;
	}

	.footer__main {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.modal {
		padding: 1.5rem;
		border-radius: 12px;
	}

	.form-row {
		flex-direction: column;
		gap: 0;
	}

	.modal__actions {
		flex-direction: column-reverse;
	}

	.modal__actions .btn {
		width: 100%;
		justify-content: center;
	}

	.section-head {
		align-items: flex-start;
		flex-direction: column;
		gap: 0.5rem;
	}
}


.auth-tabs {
	display: flex;
	border-bottom: 2px solid var(--gray-200);
	margin-bottom: 1.8rem;
}

.auth-tab {
	flex: 1;
	padding: 0.7rem;
	background: none;
	border: none;
	font-family: var(--font);
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--gray-500);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: all 0.2s;
}

.auth-tab.active {
	color: var(--black);
	border-bottom-color: var(--black);
}

.auth-form {
	display: none;
}

.auth-form.active {
	display: block;
}

.header__auth {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
}

.btn--header-login {
	background: transparent;
	border: 1.5px solid rgba(255, 255, 255, 0.3);
	color: var(--white);
	padding: 0.45rem 1.2rem;
	border-radius: 7px;
	font-weight: 600;
	font-size: 0.88rem;
	cursor: pointer;
	font-family: var(--font);
	transition: all 0.2s;
}

.btn--header-login:hover {
	border-color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.08);
}

.btn--header-register {
	background: var(--white);
	border: none;
	color: var(--black);
	padding: 0.45rem 1.2rem;
	border-radius: 7px;
	font-weight: 600;
	font-size: 0.88rem;
	cursor: pointer;
	font-family: var(--font);
	transition: opacity 0.2s;
}

.btn--header-register:hover {
	opacity: 0.88;
}


.user-menu {
	position: relative;
}

.user-menu__btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: rgba(255, 255, 255, 0.1);
	border: 1.5px solid rgba(255, 255, 255, 0.15);
	color: var(--white);
	padding: 0.4rem 0.9rem;
	border-radius: 7px;
	font-weight: 600;
	font-size: 0.88rem;
	cursor: pointer;
	font-family: var(--font);
	transition: all 0.2s;
}

.user-menu__btn:hover {
	background: rgba(255, 255, 255, 0.18);
}

.user-menu__avatar {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--white);
	color: var(--black);
	font-size: 0.7rem;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}

.user-menu__badge {
	background: #fbbf24;
	color: #000;
	font-size: 0.65rem;
	font-weight: 800;
	padding: 0.1rem 0.4rem;
	border-radius: 4px;
	letter-spacing: 0.3px;
}

.user-menu__dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	background: var(--white);
	border-radius: 10px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
	border: 1px solid var(--gray-200);
	min-width: 200px;
	overflow: hidden;
	z-index: 200;
}

.user-menu__dropdown.open {
	display: block;
}

.user-menu__info {
	padding: 0.9rem 1rem;
	border-bottom: 1px solid var(--gray-100);
}

.user-menu__name {
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--black);
}

.user-menu__role {
	font-size: 0.75rem;
	color: var(--gray-500);
	margin-top: 0.1rem;
}

.user-menu__dropdown a,
.user-menu__dropdown button {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	width: 100%;
	padding: 0.7rem 1rem;
	font-size: 0.88rem;
	font-weight: 500;
	color: var(--gray-700);
	background: none;
	border: none;
	cursor: pointer;
	font-family: var(--font);
	text-align: left;
	transition: background 0.15s;
	text-decoration: none;
}

.user-menu__dropdown a:hover,
.user-menu__dropdown button:hover {
	background: var(--gray-100);
	color: var(--black);
}

.user-menu__dropdown .logout-btn {
	color: #dc2626;
}

.user-menu__dropdown .logout-btn:hover {
	background: #fef2f2;
	color: #dc2626;
}

.user-menu__dropdown svg {
	width: 15px;
	height: 15px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}


.my-apps-section {
	background: var(--gray-100);
}

.my-apps-empty {
	text-align: center;
	padding: 3rem 1rem;
	color: var(--gray-500);
}

.my-apps-list {
	display: grid;
	gap: 1rem;
}

.my-app-card {
	background: var(--white);
	border-radius: var(--radius);
	padding: 1.3rem 1.5rem;
	border: 1px solid var(--gray-200);
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.5rem 1rem;
	align-items: center;
}

.my-app-card__event {
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--black);
}

.my-app-card__details {
	font-size: 0.83rem;
	color: var(--gray-500);
	margin-top: 0.2rem;
}

.my-app-card__status {
	font-size: 0.78rem;
	font-weight: 700;
	background: #d1fae5;
	color: #065f46;
	padding: 0.2rem 0.7rem;
	border-radius: 20px;
	white-space: nowrap;
}


.auth-gate {
	background: var(--gray-100);
	border-radius: var(--radius);
	border: 1px dashed var(--gray-300);
	padding: 1.5rem;
	text-align: center;
	font-size: 0.9rem;
	color: var(--gray-500);
	margin-top: 1rem;
}

.auth-gate strong {
	color: var(--black);
	display: block;
	margin-bottom: 0.5rem;
}

.auth-gate .btn {
	margin: 0.75rem 0.3rem 0;
	font-size: 0.85rem;
	padding: 0.5rem 1.2rem;
}


.toast {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	background: var(--black);
	color: var(--white);
	padding: 0.9rem 1.4rem;
	border-radius: 10px;
	font-weight: 600;
	font-size: 0.9rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	z-index: 9999;
	transform: translateY(100px);
	opacity: 0;
	transition: all 0.3s ease;
	max-width: 320px;
}

.toast.show {
	transform: translateY(0);
	opacity: 1;
}

.toast.success {
	background: #065f46;
}

.toast.error {
	background: #991b1b;
}

@media (max-width: 600px) {
	.header__auth {
		gap: 0.4rem;
	}

	.btn--header-login,
	.btn--header-register {
		padding: 0.4rem 0.8rem;
		font-size: 0.82rem;
	}

	.user-menu__dropdown {
		right: -0.5rem;
	}
}

.btn--header-pay {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: #16a34a;
	border: none;
	color: var(--white);
	padding: 0.45rem 1rem;
	border-radius: 7px;
	font-weight: 700;
	font-size: 0.85rem;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
}

.btn--header-pay:hover {
	opacity: 0.9;
}

.pay-nav__amount {
	background: rgba(255, 255, 255, 0.22);
	padding: 0.05rem 0.45rem;
	border-radius: 20px;
	font-size: 0.78rem;
}

.distances-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin: 1.4rem 0 0.6rem;
}

.distances-head__title {
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--black);
}

.distances-head__hint {
	font-size: 0.75rem;
	color: var(--gray-500);
}

.distance-block {
	background: var(--gray-100);
	border: 1px solid var(--gray-200);
	border-radius: var(--radius);
	padding: 1rem 1.1rem 0.6rem;
	margin-bottom: 0.8rem;
}

.distance-block__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.5rem;
}

.distance-block__num {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--gray-500);
}

.distance-block__remove {
	background: none;
	border: none;
	color: var(--gray-500);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	padding: 0 0.3rem;
	border-radius: 6px;
}

.distance-block__remove:hover {
	color: #dc2626;
	background: var(--gray-200);
}

.add-distance {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
	margin: 0.2rem auto 0.4rem;
	background: none;
	border: none;
	cursor: pointer;
}

.add-distance__plus {
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1.5px dashed var(--gray-300);
	border-radius: 50%;
	font-size: 1.4rem;
	color: var(--gray-700);
	line-height: 1;
	transition: border-color 0.15s, color 0.15s;
}

.add-distance:hover .add-distance__plus {
	border-color: var(--black);
	color: var(--black);
}

.add-distance__label {
	font-size: 0.72rem;
	color: var(--gray-500);
	opacity: 0.6;
}

.price-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.9rem 0 0.2rem;
	border-top: 1px solid var(--gray-200);
	margin-top: 0.6rem;
	font-size: 0.95rem;
	color: var(--gray-700);
}

.price-line strong {
	font-size: 1.25rem;
	color: var(--black);
}

.my-app-card__main {
	min-width: 0;
}

.my-app-card__person {
	font-size: 0.85rem;
	color: var(--gray-700);
	margin-top: 0.2rem;
}

.my-app-card__dist {
	font-size: 0.82rem;
	color: var(--gray-500);
	margin-top: 0.15rem;
}

.my-app-card__meta {
	font-size: 0.75rem;
	color: var(--gray-300);
	margin-top: 0.4rem;
}

.my-app-card__side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.4rem;
	white-space: nowrap;
}

.my-app-card__amount {
	font-weight: 800;
	font-size: 1.05rem;
	color: var(--black);
}

.my-app-card__status.is-paid {
	background: #d1fae5;
	color: #065f46;
}

.my-app-card__status.is-unpaid {
	background: #fef3c7;
	color: #92400e;
}

.my-apps-pay {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: 1.2rem;
	padding: 1.2rem 1.5rem;
	background: var(--gray-100);
	border: 1px solid var(--gray-200);
	border-radius: var(--radius);
}

.my-apps-pay__info {
	display: flex;
	flex-direction: column;
}

.my-apps-pay__label {
	font-size: 0.8rem;
	color: var(--gray-500);
}

.my-apps-pay__sum {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--black);
}

.my-apps-pay .btn--primary {
	background: #16a34a;
	color: var(--white);
	border: none;
}

.my-apps-pay .btn--primary:hover {
	opacity: 0.9;
}

html,
body {
	overflow-x: hidden;
	max-width: 100%;
}

img,
svg,
table {
	max-width: 100%;
}

@media (max-width: 900px) {
	.header__top {
		gap: 0.6rem;
	}

	.header__actions {
		gap: 0.5rem;
	}

	.header__nav {
		padding: 1rem var(--pad-x) 1.4rem;
		max-height: calc(100vh - var(--header-h));
		overflow-y: auto;
	}
}

@media (max-width: 600px) {
	.header__brand small {
		display: none;
	}

	.header__brand strong {
		font-size: 1.15rem;
	}

	.logo-mark {
		font-size: 0.9rem;
		padding: 0.28rem 0.55rem;
	}

	.header__logo {
		gap: 0.5rem;
	}

	.hero__title {
		font-size: clamp(2.6rem, 16vw, 4rem);
	}

	.my-app-card {
		grid-template-columns: 1fr;
		gap: 0.6rem;
	}

	.my-app-card__side {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.my-apps-pay {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.my-apps-pay .btn--primary {
		width: 100%;
	}
}

@media (max-width: 380px) {
	.header__brand strong {
		font-size: 1.02rem;
	}
}

.nav__auth {
	display: none;
}

@media (max-width: 900px) {
	.nav__auth {
		display: flex;
		flex-direction: column;
		gap: 0.7rem;
		width: 100%;
		margin-top: 1rem;
		padding-top: 1.2rem;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
	}

	.nav__auth #guestButtons {
		display: flex;
		flex-direction: column;
		gap: 0.7rem;
		width: 100%;
	}

	.nav__auth .btn--header-login,
	.nav__auth .btn--header-register {
		width: 100%;
		text-align: center;
		padding: 0.75rem;
		font-size: 0.95rem;
	}

	.nav__auth .btn--header-pay {
		width: 100%;
		justify-content: center;
		padding: 0.75rem;
		font-size: 0.95rem;
	}

	.nav__auth .user-menu {
		width: 100%;
	}

	.nav__auth .user-menu__btn {
		width: 100%;
		justify-content: flex-start;
	}

	.nav__auth .user-menu__dropdown {
		position: static;
		width: 100%;
		margin-top: 0.5rem;
		box-shadow: none;
	}
}