/* vstsm-like lightweight theme: focuses on login/public pages */

:root {
	--vstsm-bg: #f5f7fb;
	--vstsm-card-bg: #ffffff;
	--vstsm-border: #e6e9ef;
	--vstsm-text: #2d3436;
	--vstsm-muted: #6c757d;
	--vstsm-primary: #cb3340;
	--vstsm-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
	--vstsm-radius: 5px;
}

/* Page background for public pages */
body.vstsm-public {
	background: var(--vstsm-bg);
	color: var(--vstsm-text);
}

/* Centered container helper */
.vstsm-center {
	min-height: calc(100vh - 56px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px 16px;
}

/* Card-like auth block */
.vstsm-card {
	background: var(--vstsm-card-bg);
	border: 1px solid var(--vstsm-border);
	box-shadow: var(--vstsm-shadow);
	border-radius: var(--vstsm-radius);
	padding: 28px;
	max-width: 420px;
	width: 100%;
}

.vstsm-title {
	margin: 0 0 12px;
	font-weight: 600;
	letter-spacing: -0.2px;
}

.vstsm-subtitle {
	margin: 0 0 18px;
	color: var(--vstsm-muted);
	font-size: 0.95rem;
}

.vstsm-field.form-control {
	border-radius: 10px;
	padding: 0.85rem 0.9rem;
}

.vstsm-btn.btn-primary {
	border-radius: 10px;
	padding: 0.7rem 1.25rem;
	font-weight: 600;
	transition: transform .15s ease, box-shadow .15s ease;
}

.vstsm-btn.btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(13, 110, 253, 0.18);
}

.vstsm-muted-link {
	color: var(--vstsm-muted);
	text-decoration: none;
}

.vstsm-muted-link:hover {
	text-decoration: underline;
}

/* Access Denied simple block */
.vstsm-access {
	max-width: 560px;
	margin: 40px auto;
	text-align: center;
}

.vstsm-access .card {
	border-radius: var(--vstsm-radius);
	box-shadow: var(--vstsm-shadow);
}



/* Public login page layout pieces */
/* 1) Header */
.section__header {
	background: #fff;
	box-shadow: 0 0 60px #5267f433;
	position: relative;
	padding: 20px 0;
}

.section__header .section__header-wrapper_start {
	max-width: 1568px;
	padding: 0;
}

.section__header .section__header-wrapper {
	padding: 0 20px;
	max-width: 1920px;
	margin: 0 auto;
	height: 100%;
}

/* Hide default app navbar on public theme */
body.vstsm-public #navbar {
	display: none !important;
}

/* 2) Sidebar menu */
.section__header .header-sidebar {
	position: fixed;
	width: 400px;
	height: 100vh;
	left: 0;
	top: 0;
	padding: 34px 16px 23px;
	border-radius: 0 12px 12px 0;
	box-shadow: 0 0 10px #5267f44d;
	background: #fff;
	z-index: 100;
	display: flex;
	justify-content: flex-start;
	flex-direction: column;
	align-items: center;
	transform: translateX(-110%);
	transition: transform .2s ease-in-out;
}

/* Sidebar controls */
.header-sidebar__controls {
	position: absolute;
	left: 12px;
	top: 12px;
}

.controls__close-btn {
	border: 0;
	background: transparent;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}

.controls__close-btn span {
	color: var(--vstsm-muted);
	font-size: 0.85rem;
}

.section__header-logo-item {
	color: var(--vstsm-primary);

}

.header-sidebar__logo {
	margin: 5px 10px;
	text-align: left;
	position: relative;
	display: flex;
	gap: 10px;
	align-items: center;
	transition: all 0.5ms ease;
}

.header-sidebar__logo .image_logo {
	max-width: 50px;
	height: auto;
	display: block;
}

.header-sidebar__logo h3 {
	max-width: 130px;
	line-height: 1;
	font-size: 1.15em;
}


.collapsed .header-sidebar__logo {
	margin: 5px 0 5px;
	gap: 0;
	align-items: center;
	justify-content: center;
}

.header-sidebar__logo .image_logo {
	max-width: 38px;
}

.collapsed .header-sidebar__logo h3 {
	display: none;
}


.header-sidebar__items {
	list-style: none;
	padding: 0;
	margin: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	max-height: 800px;
	overflow-y: scroll;
}

.header-sidebar__items .sidebar__item {
	margin: 0 0;
	width: 100%;
}

.header-sidebar__items .sidebar__item a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	text-decoration: none;
	color: var(--vstsm-text);
	width: 100%;
	justify-content: flex-start;
	line-height: 1.15;
}

.header-sidebar__items .sidebar__item a:hover {
	background: #f3f5ff;
}

.header-sidebar__items .sidebar__item a.active {
	background: #eef2ff;
	color: #1d2b5f;
}



.collapsed .header-sidebar__items .sidebar__item a {
	gap: 0;
	width: 100%;
	text-align: center;
	justify-content: center;
}

.collapsed .header-sidebar__items .sidebar__item a span {
	display: none;
}



.header-sidebar__items .sidebar__item .bi {
	color: var(--vstsm-primary);
	font-size: 20px;
}

.header-sidebar__items .sidebar__item .sidebar__item-icon {
	width: 28px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.header-sidebar__items .sidebar__group-title {
	padding: 12px 12px 6px;
	margin-top: 12px;
	font-weight: 600;
	color: #232323;
	border-bottom: 1px solid var(--vstsm-border);
	font-size: 10px;
}

.header-sidebar__items .sidebar__group-title:first-child {
	margin-top: 0;
}


.collapsed .header-sidebar__items .sidebar__group-title {
	font-size: 7px;
	text-align: center;
	padding: 5px 0;
	margin: 0 auto;
	color: #000;
}


/* 3) Content container */
.container-start.section__auth {
	margin-left: 20px;
	padding: 20px;
}

/* Для всех страниц с новой шапкой - смещаем контент */
main#mainContent {
	margin-left: 0;
	padding: 20px;
}

/* Collapsed sidebar */
/* Show sidebar only when explicitly opened */
body.menu-open .section__header .header-sidebar {
	transform: translateX(0);
}

@media (min-width: 1351px) {
	body.menu-open main#mainContent {
		margin-left: 400px;
	}
}

/* Mobile/tablet adjustments: default closed sidebar; no content shift; flat corners */
@media (max-width: 1350px) {

	/* Content should not shift on narrower screens */
	main#mainContent {
		margin-left: 0;
	}

	.container-start.section__auth {
		margin-left: 0;
	}

	/* Sidebar default closed with flat corners */
	.section__header .header-sidebar {
		border-radius: 0;
		width: 100%;
		max-width: 400px;
		left: 0;
	}
}

/* 4) Auth form card */
.section__auth .block__card {
	max-width: 448px;
	width: 100%;
	box-sizing: border-box;
	border: 1px solid rgba(82, 102, 244, .16);
	border-radius: 30px;
	box-shadow: 0 0 20px #5267f41f;
	background: #fff;
	min-height: 300px;
	padding: 20px 40px 66px;
	margin-bottom: 30px;
}

.section__auth .block__card-title {
	font-weight: 600;
	margin-bottom: 12px;
}

.section__auth .input__row {
	margin-bottom: 14px;
}

.section__auth .input__row input[type="text"],
.section__auth .input__row input[type="password"] {
	width: 100%;
	border: 1px solid var(--vstsm-border);
	border-radius: 10px;
	padding: 0.85rem 0.9rem;
}

.g-button.g-button--primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 10px;
	padding: 0.6rem 1rem;
	background: rgba(82, 102, 244, 0.75);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	min-width: 200px;
	/* Одинаковая ширина для всех кнопок */
	width: 100%;
	max-width: 300px;
	transition: background .2s ease;
}

.g-button.g-button--primary:hover {
	background: var(--vstsm-primary);
	/* Непрозрачный фон при наведении */
	color: #fff;
}

.section__auth .g-button.g-button--primary {
	width: 100%;
	padding: 0.75rem 1.2rem;
}

.g-button .btn-icon {
	display: inline-flex;
	margin-right: 8px;
}

/* Files page-like profile card */
.card__profile {
	background: #fff;
	border: 1px solid var(--vstsm-border);
	border-radius: 20px;
	box-shadow: var(--vstsm-shadow);
	padding: 20px 20px 24px;
}

/* Краткий вывод дней и СУ в списке соревнований */
.race-days-summary {
	max-height: 250px;
	overflow-y: auto;
	font-size: 0.85rem;
}

.title__wrapper h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	font-weight: 600;
}

.card__table-wrapper {
	width: 100%;
}

.custom-box {
	margin-bottom: 12px;
}

/* Data table styles (files-like) */
.card__table {
	width: 100%;
	border-collapse: collapse;
	background: rgb(246, 247, 250);
}

.card__table thead th {
	font-weight: 600;
	font-size: 0.9rem;
	padding: 10px 12px;
	color: #0f172a;
	border-bottom: 1px solid var(--vstsm-border);
}

.card__table-header th {
	vertical-align: middle;
}

.card__table tbody td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--vstsm-border);
	font-size: 0.95rem;
	color: #0f172a;
}

.card__table tbody tr:hover {
	background: #fafbff;
}

.card__table .text-end {
	text-align: right;
}

/* User management action buttons */
.um-actions {
	display: inline-flex;
	gap: 8px;
}

.um-actions .action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: #eef2ff;
	color: var(--vstsm-primary);
	text-decoration: none;
	transition: background .15s ease, transform .1s ease;
	border: none;
}

.um-actions .action-btn:hover {
	background: #e3e8ff;
	transform: translateY(-1px);
}

.um-actions .action-delete {
	background: #ffdede;
	color: #e23c3c;
}

.um-actions .action-delete:hover {
	background: #ffe6e6;
}

/* Badges (bigger, themed) */
.badge {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.6rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1;
}

.badge-soft-primary {
	background: rgba(82, 102, 244, 0.12);
	color: #cb3340;
}

.badge-soft-success {
	background: #eaf7f0;
	color: #1ea45d;
}

.badge-soft-secondary {
	background: #f1f3f5;
	color: #6c757d;
	padding: 0px;
}

.badge-soft-info {
	background: rgba(139, 92, 246, 0.12);
	color: #8b5cf6;
}

/* Breadcrumbs (vstsm-like) */
nav[aria-label="breadcrumb"] {
	display: block;
	padding: 0 30px;
}

.breadcrumb {
	min-height: 42px;
	width: fit-content;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	box-sizing: border-box;
	border: 1px solid rgba(82, 102, 244, .16);
	border-radius: 12px;
	box-shadow: 0 0 20px #5267f41f;
	background: #fff;
	padding: 7.5px 10px;
	margin: 0;
	gap: 6px;
}

.breadcrumb .breadcrumb-item {
	display: inline-flex;
	align-items: center;
	color: #6c757d;
	padding: 0;
}

.breadcrumb .breadcrumb-item a {
	color: var(--vstsm-primary);
	text-decoration: none;
}

.breadcrumb .breadcrumb-item a:hover {
	text-decoration: underline;
}

.breadcrumb .breadcrumb-item.active {
	color: #0f172a;
	font-weight: 600;
}

/* Override default divider with chevron */
.breadcrumb .breadcrumb-item+.breadcrumb-item::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 9px;
	border-right: 2px solid #cb3340;
	border-top: 2px solid #cb3340;
	transform: rotate(45deg);
	margin: 0 9px 0 0px;
	opacity: 0.5;
}

/* Дополнительные цвета из палитры vstsm */
:root {
	--vstsm-primary-dark: #3d4fb8;
	--vstsm-primary-light: #6b7ff6;
	--vstsm-primary-lighter: #eef2ff;
	--vstsm-accordion-active: #b7bfee;
	--vstsm-success: #1ea45d;
	--vstsm-success-light: #eaf7f0;
	--vstsm-signature: #8b5cf6;
	--vstsm-signature-light: #f3f0ff;
	--vstsm-documents: #0ea5e9;
	--vstsm-documents-light: #e0f2fe;
}

/* Карточки в стиле vstsm */
.vstsm-card-item {
	border: 1px solid var(--vstsm-border);
	border-radius: var(--vstsm-radius);
	box-shadow: var(--vstsm-shadow);
	background: var(--vstsm-card-bg);
	overflow: hidden;
}

.vstsm-card-header-primary {
	background: var(--vstsm-primary);
	color: #fff;
	border: none;
	padding: 16px 20px;
	font-weight: 600;
}

.vstsm-card-header-signature {
	background: var(--vstsm-signature);
	color: #fff;
	border: none;
	padding: 16px 20px;
	font-weight: 600;
}

.vstsm-card-header-documents {
	background: var(--vstsm-documents);
	color: #fff;
	border: none;
	padding: 16px 20px;
	font-weight: 600;
}

.vstsm-card-item .card-body {
	padding: 20px;
}

/* Кнопки в стиле vstsm */
.vstsm-btn {
	border-radius: 10px;
	padding: 0.7rem 1.25rem;
	font-weight: 600;
	transition: transform .15s ease, box-shadow .15s ease;
	border: none;
}

.vstsm-btn-primary {
	background: var(--vstsm-primary);
	color: #fff;
}

.vstsm-btn-primary:hover {
	background: var(--vstsm-primary-dark);
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(82, 102, 244, 0.18);
	color: #fff;
}

.vstsm-btn-secondary {
	background: var(--vstsm-muted);
	color: #fff;
}

.vstsm-btn-secondary:hover {
	background: #5a6268;
	color: #fff;
	transform: translateY(-1px);
}

.vstsm-btn-success {
	background: var(--vstsm-success);
	color: #fff;
}

.vstsm-btn-success:hover {
	background: #1a8f4d;
	color: #fff;
	transform: translateY(-1px);
}

.vstsm-btn-outline {
	border: 1px solid var(--vstsm-primary);
	color: var(--vstsm-primary);
	background: transparent;
	border-radius: 10px;
	padding: 0.7rem 1.25rem;
	font-weight: 600;
	transition: all .15s ease;
}

.vstsm-btn-outline:hover {
	background: var(--vstsm-primary);
	color: #fff;
	transform: translateY(-1px);
}

.vstsm-btn-outline:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Поля ввода в стиле vstsm */
.vstsm-field.form-control {
	border-radius: 10px;
	padding: 0.85rem 0.9rem;
	border: 1px solid var(--vstsm-border);
}

.vstsm-field.form-control:focus {
	border-color: var(--vstsm-primary);
	box-shadow: 0 0 0 0.2rem rgba(82, 102, 244, 0.15);
}

/* Элементы документов */
.vstsm-document-item:last-child {
	border-bottom: none !important;
	padding-bottom: 0 !important;
	margin-bottom: 0 !important;
}

.vstsm-document-item h6 {
	color: var(--vstsm-text);
	font-weight: 600;
	font-size: 1rem;
}

/* Алерты в стиле vstsm */
.vstsm-alert-success {
	background: var(--vstsm-success-light);
	border: 1px solid var(--vstsm-success);
	color: var(--vstsm-success);
	border-radius: 10px;
	padding: 12px 16px;
}

/* Важные текстовые поля (например, race_name, event_name в соревнованиях) */
.race-important-input {
	font-weight: 600;
	border-color: #495057;
}

.alert.alert-info {
	background: var(--vstsm-primary-lighter);
	border: 1px solid var(--vstsm-primary-light);
	color: var(--vstsm-primary-dark);
	border-radius: 10px;
}

.alert.alert-danger {
	background: #ffdede;
	border: 1px solid #e23c3c;
	color: #e23c3c;
	border-radius: 10px;
}

/* Модальное окно в стиле vstsm */
.vstsm-modal-content {
	border-radius: var(--vstsm-radius);
	border: 1px solid var(--vstsm-border);
	box-shadow: var(--vstsm-shadow);
}

.vstsm-modal-header {
	background: var(--vstsm-signature);
	color: #fff;
	border-bottom: 1px solid var(--vstsm-border);
	padding: 16px 20px;
	border-radius: var(--vstsm-radius) var(--vstsm-radius) 0 0;
}

.vstsm-modal-header .btn-close {
	filter: invert(1);
}

/* Аккордеон в стиле vstsm */
.vstsm-accordion {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.vstsm-accordion-item {
	background: var(--vstsm-card-bg);
	border: 1px solid var(--vstsm-border);
	border-radius: var(--vstsm-radius);
	box-shadow: var(--vstsm-shadow);
	overflow: hidden;
	transition: box-shadow .15s ease;
}

.vstsm-accordion-item:hover {
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.vstsm-accordion-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 20px;
	cursor: pointer;
	background: var(--vstsm-card-bg);
	border: none;
	width: 100%;
	text-align: left;
	transition: background .15s ease;
}

.vstsm-accordion-header:hover {
	background: var(--vstsm-primary-lighter);
}

.vstsm-accordion-header.active {
	background: var(--vstsm-accordion-active);
	border-bottom: 1px solid var(--vstsm-border);
}

.vstsm-accordion-title {
	font-weight: 600;
	font-size: 1rem;
	color: var(--vstsm-text);
	flex: 1;
}

.vstsm-accordion-icon {
	color: var(--vstsm-primary);
	font-size: 1.2rem;
	transition: transform .3s ease;
	margin-left: 12px;
}

.vstsm-accordion-collapse {
	max-height: 0;
	overflow: hidden;
	transition: max-height .3s ease;
}

.vstsm-accordion-collapse.show {
	max-height: 1000px;
}

.vstsm-accordion-body {
	padding: 20px;
	color: var(--vstsm-text);
	line-height: 1.6;
}

.vstsm-accordion-body p {
	margin: 0;
}

/* Группировка полей в формах */
.form-group-block {
	background: #f8f9ff;
	border: 1px solid #eef2ff;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 2rem;
}

.form-group-title {
	color: var(--vstsm-primary);
	font-weight: 600;
	font-size: 1.1rem;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid #eef2ff;
}