/* Reset и базовые стили */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	--primary-color: #2563eb;
	--primary-hover: #1d4ed8;
	--primary-light: #dbeafe;
	--text-primary: #1f2937;
	--text-secondary: #6b7280;
	--text-muted: #9ca3af;
	--bg-primary: #ffffff;
	--bg-secondary: #f3f4f6;
	--border-color: #e5e7eb;
	--error-color: #dc2626;
	--success-color: #059669;
	--shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
	--shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
	--shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
	--radius-sm: 6px;
	--radius-md: 8px;
	--radius-lg: 12px;
}

body {
	font-family: -aplle-system, BlinkMacSystemFont, 'Sergoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	line-height: 1.6;
	color: var(--text-primary);
}

/* Стили для уведомлений */
#notification-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 400px;
}

.notification {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	animation: slideIn 0.3s ease-out;
	background: #ffffff;
	border-left: 4px solid;
}

.notification-hiding {
	animation: slideOut 0.3s ease-in forwards;
}

.notification-success {
	border-left-color: var(--success-color);
	background: #ecfdf5;
}

.notification-error {
	border-left-color: var(--error-color);
	background: #fef2f2;
}

.notification-warning {
	border-left-color: #d97706;
	background: #fffbeb;
}

.notification-info {
	border-left-color: var(--primary-color);
	background: #eff6ff;
}

.notification-icon svg {
	fill: currentColor;
	flex-shrink: 0;
}

.notification-success .notification-icon { color: var(--success-color); }
.notification-error .notification-icon { color: var(--error-color); }
.notification-warning .notification-icon { color: #d97706); }
.notification-info .notification-icon { color: var(--primary-color); }

.notification-message {
	flex: 1;
	font-size: 14px;
	color: #000000;
	line-height: 1.5;
}

.notification-close {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: var(--text-muted);
	transition: color 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.notification-close:hover {
	color: var(--text-primary);
}

.notification-close svg {
	fill: currentColor;
}

@keyframes slideIn {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes slideOut {
	from {
		transform: translateX(0);
		opacity: 1;
	}
	to {
		transform: translateX(100%);
		opacity: 0;
	}
}

/* ===== НАВИГАЦИОННОЕ МЕНЮ ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand::before {
    content: "🎫";
    -webkit-text-fill-color: initial;
    font-size: 24px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.nav-item a:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

.nav-item:nth-child(3) a {
    color: var(--error-color);
}

.nav-item:nth-child(3) a:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Кнопка мобильного меню */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.mobile-menu-toggle:hover {
    background: var(--bg-secondary);
}

/* Контейнер логина */
.login-container {
	width: 100%;
	max-width: 420px;
	animation: fadeIn 0.5s ease-out;
}

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

.login-box {
	background: var(--bg-primary);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	padding: 40px;
	width: 100%;
}

/* Шапка */
.login-header {
	text-align: center;
	margin-bottom: 32px;
}

.logo {
	width: 56px;
	height: 56px;
	background: linear-gradient(135deg, var(--primary-color), #7c3aed);
	color: #ffffff;
	border-radius: var(--radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	margin: 0 auto 20px;
	box-shadow: var(--shadow-md);
}

.login-header h1 {
	font-size: 24px;
	font-weight: 700;
	color: var(--text-primary);
	margin-bottom: 8px;
	letter-spacing: -0.025em;
}

.login-header p {
	color: var(--text-secondary);
	font-size: 14px;
}

/* Форма */
.login-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Блок ошибок в форме */
.form-error {
	display: none; /*По умолчанию скрыт */
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background-color: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: var(--radius-md);
	color: #991b1b;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 16px;
	animation: shake 0.5s ease-in-out;
}

.form-error::before {
	content: "⚠";
	font-size: 16px;
	color: #dc2626;
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-5px); }
	75% { transform: translateX(5px); }
}

.form-error.show {
	display: flex;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.form-group label {
	font-size: 14px;
	font-weight: 500;
	color: var(--text-primary);
}

.form-group input {
	padding: 12px 16px;
	border: 1px solid var(--border-color);
	border-radius: var(--raduis-md);
	font-size: 15px;
	transition: all 0.2s ease;
	background-color: var(--bg-primary);
	color: var(--text-primary);
}

.form-group input::placeholder {
	color: var(--text-muted);
}

.form-group input:hover {
	border-color: #d1d5db;
}

.form-group input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px var(--primary-light);
}

/* Поле пароля с кнопкой показа пароля */
.password-wrapper {
	position: relative;
}

.password-wrapper input {
	width: 100%;
	padding-right: 44px;
}

.toggle-password {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: var(--text-muted);
	transition: color 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.toggle-password:hover {
	color: var(--text-secondary);
}

.toggle-password svg {
	fill: currentColor;
}

/* опции формы */
.form-options {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
}

.checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	color: var(--text-secondary);
	user-select: none;
}

.checkbox-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: var(--primary-color);
}

.forgot-link {
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s;
}

.forgot-link:hover {
	color: var(--primary-hover);
	text-decoration: underline;
}

/* Кнопка входа */
.login-button {
	background: linear-gradient(135deg, var(--primary-color), #7c3aed);
	color: #ffffff;
	border: none;
	padding: 14px 24px;
	border-radius: var(--radius-md);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 8px;
	box-shadow: var(--shadow-md);
}

.login-button:hover {
	transform: translateY(-1px);
	box-shadow: var(--shadow-lg);
	filter: brightness(1.1);
}

.login-button:active {
	transform: translateY(0);
}

.login-button svg {
	fill: currentColor;
	transition: transform 0.2s;
}

.login-button:hover svg {
	transform: translateX(4px);
}

/* Футер */
.login-footer {
	margin-top: 24px;
	text-align: center;
	padding-top: 24px;
	border-top: 1px solid var(--border-color);
}

.login-footer p {
	color: var(--text-secondary);
	font-size: 14px;
}

.login-footer a {
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s;
}

.login-footer a:hover {
	color: var(--primary-hover);
	text-decoration: underline;
}

.login-info {
	text-align: center;
	margin-top: 24px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 13px;
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
	body {
		padding: 16px;
		background: var(--bg-primary);
	}

	#notification-container {
		left: 16px;
		right: 16px;
		top: 16px;
		max-width: none;
	}

	.notification {
  		width: 100%
	}

	.login-box {
		padding: 32px 24px;
		box-shadow: none;
		border-radius: 0;
	}

	.login-container {
		max-width: 100%;
	}

	.login-header h1 {
		font-size: 22px;
	}

	.form-options {
		flex-direction: column;
		gap: 12px;
		align-items: flex-start;
	}

	.login-info {
		color: var(--text-muted);
		margin-top: 32px;
	}
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
	:root {
		--bg-primary: #1f2937;
		--bg-secondary: #111827;
		--text-primary: #f9fafb;
		--text-secondary: #d1d5db;
		--text-muted: #9ca3af;
		--border-color: #374151;
	}

	body {
		background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
	}

	.login-box {
		background: var(--bg-primary);
	}

	.form-group input {
		background-color: var(--bg-secondary);
		border-color: var(--border-color);
		color: var(--text-primary);
	}

	@media (max-width: 480px) {
		body {
			background: var(--bg-primary);
		}
	}
}

/* Мобильное меню */
@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
        height: 56px;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 99;
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-item {
        width: 100%;
    }

    .nav-item a {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 16px;
        font-size: 16px;
    }

    /* Смещаем контент под фиксированное меню */
    body {
        padding-top: 56px;
    }

    .login-container {
        padding-top: 20px;
    }
}

/* Десктоп: смещение контента под фиксированное меню */
@media (min-width: 769px) {
    body {
        padding-top: 64px;
    }

    .login-container {
        padding-top: 40px;
    }
}

/* Темная тема для меню */
@media (prefers-color-scheme: dark) {
    .navbar {
        background: rgba(31, 41, 55, 0.95);
        border-bottom-color: var(--border-color);
    }

    .nav-menu {
        background: rgba(31, 41, 55, 0.98);
    }

    @media (max-width: 768px) {
        .nav-menu {
            background: rgba(31, 41, 55, 0.98);
        }
    }
}

/* Утилиты */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0,0,0,0);
	white-space: nowrap;
	border-width: 0;
}
