:root {
	--bg: #0b0d10;
	--bg-secondary: #101318;
	--bg-sidebar: #0e1115;
	--bg-hover: #171b21;
	--bg-active: #1d1711;
	--border: #242930;
	--text: #e7e9ec;
	--text-secondary: #8d949d;
	--text-muted: #5f6670;
	--accent: #f39800;
	--accent-hover: #ffad26;
	--accent-soft: rgba(243, 152, 0, .12);
	--topbar-height: 64px;
}

* {
	box-sizing: border-box;
}

html {
	min-height: 100%;
	background: var(--bg);
}

body {
	margin: 0;
	min-width: 320px;
	min-height: 100dvh;
	background: var(--bg);
	color: var(--text);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 15px;
	line-height: 1.5;
}

button,
input,
select,
textarea {
	font: inherit;
}

button,
a {
	-webkit-tap-highlight-color: transparent;
}

a {
	color: inherit;
}

/* Макет приложения */
.club-layout {
	width: 100%;
	min-height: 100dvh;
}

.club-content {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	min-height: 100dvh;
	padding-top: var(--topbar-height);
}

/* Верхняя панель */
.topbar {
position: fixed;
top: 0;
left: 0;
display: flex;
align-items: center;
gap: 12px;
width: 100%;
min-height: var(--topbar-height);
padding: 8px clamp(12px, 3vw, 32px);
background: rgba(11, 13, 16, .94);
border-bottom: 1px solid var(--border);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
z-index: 100;
}

/* Логотип */
.logo {
display: flex;
align-items: center;
justify-content: flex-start;
flex: 0 0 42px;
width: 42px;
height: 48px;
text-decoration: none;
}

.logo img {
display: block;
width: 42px;
height: 42px;
object-fit: contain;
}

/* Центральное меню */
.navigation {
display: flex;
align-items: center;
justify-content: center;
flex: 1 1 auto;
min-width: 0;
gap: 4px;
flex-wrap: wrap;
}

/* Кнопки меню */
.nav-button {
display: flex;
align-items: center;
justify-content: center;
flex: 0 0 42px;
width: 42px;
height: 42px;
padding: 0;
border: 0;
border-radius: 7px;
background: transparent;
color: var(--text-secondary);
text-decoration: none;
cursor: pointer;
transition: background .15s ease, color .15s ease;
}

.nav-button:hover {
background: var(--bg-hover);
color: var(--text);
}

.nav-button.active {
background: var(--bg-active);
color: var(--accent);
}

.nav-icon {
display: block;
width: 22px;
height: 22px;
color: currentColor;
}

.logout-button {
appearance: none;
-webkit-appearance: none;
}

.logout-icon {
display: block;
width: 22px;
height: 22px;
background: currentColor;
mask: url("/img/logout.svg") center / contain no-repeat;
-webkit-mask: url("/img/logout.svg") center / contain no-repeat;
}

/* EVE Time */
.eve-time {
display: flex;
align-items: center;
justify-content: flex-end;
flex: 0 0 auto;
gap: 8px;
min-width: 82px;
white-space: nowrap;
}

.eve-time strong {
color: var(--text);
font-family: Consolas, "Courier New", monospace;
font-size: 13px;
font-weight: 600;
letter-spacing: .04em;
}

.eve-dot {
width: 6px;
height: 6px;
flex: 0 0 6px;
border-radius: 50%;
background: var(--accent);
box-shadow: 0 0 8px rgba(243, 152, 0, .55);
}

/* Основной контент */
.page-content {
	width: min(100%, 1200px);
	margin: 0 auto;
	padding: clamp(20px, 3vw, 32px);
}

.hidden {
	display: none !important;
}

.card {
	background: var(--bg-secondary);
	border: 1px solid var(--border);
	border-radius: 8px;
}

.primary-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 20px;
	border: 1px solid var(--accent);
	border-radius: 6px;
	background: var(--accent);
	color: #111;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}

.primary-button:hover {
	background: var(--accent-hover);
	border-color: var(--accent-hover);
}

.primary-button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

input,
select,
textarea {
	width: 100%;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--bg-secondary);
	color: var(--text);
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

input,
select {
	height: 42px;
	padding: 0 12px;
}

textarea {
	min-height: 100px;
	padding: 10px 12px;
	resize: vertical;
}

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

input:focus,
select:focus,
textarea:focus {
	border-color: rgba(243, 152, 0, .65);
	box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Страница входа */
.login-page {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100dvh;
	min-height: 320px;
	padding: clamp(12px, 3vh, 32px);
	overflow: hidden;
	background: var(--bg);
}

.login-card {
	width: min(400px, calc(100vw - 24px));
	padding: clamp(20px, 4vh, 32px);
	background: var(--bg-secondary);
	border: 1px solid var(--border);
	border-radius: 8px;
}

.login-logo {
	display: flex;
	justify-content: center;
	margin-bottom: clamp(12px, 3vh, 24px);
}

.login-logo img {
	display: block;
	width: clamp(40px, 8vh, 56px);
	height: clamp(40px, 8vh, 56px);
	object-fit: contain;
}

.login-card h1 {
	margin: 0 0 clamp(16px, 3vh, 28px);
	color: var(--text);
	font-size: clamp(15px, 2.5vh, 18px);
	font-weight: 700;
	letter-spacing: .1em;
	text-align: center;
}

.form-group {
	margin-bottom: clamp(10px, 2vh, 16px);
}

.form-label {
	display: block;
	margin-bottom: 6px;
	color: var(--text-secondary);
	font-size: 13px;
	font-weight: 600;
}

.login-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: clamp(12px, 2vh, 18px);
}

.login-actions .primary-button,
.secondary-button {
	width: 100%;
	min-height: 42px;
}

.secondary-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 20px;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--bg-hover);
	color: var(--text);
	font-weight: 700;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.secondary-button:hover {
	border-color: var(--accent);
	background: var(--bg-active);
	color: var(--accent);
}

.primary-button:disabled,
.secondary-button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.login-error {
	margin-top: 12px;
	padding: 9px 11px;
	border: 1px solid rgba(220, 70, 70, .35);
	border-radius: 6px;
	background: rgba(220, 70, 70, .08);
	color: #e58a8a;
	font-size: 13px;
}

.password-field {
	position: relative;
}

.password-field input {
	width: 100%;
	padding-right: 42px;
}

.password-toggle {
	position: absolute;
	top: 50%;
	right: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 5px;
	background: transparent;
	color: var(--text-muted);
	transform: translateY(-50%);
	cursor: pointer;
}

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

.password-toggle-icon {
	display: block;
	width: 20px;
	height: 20px;
	background: currentColor;
	mask: url("/img/eye.svg") center / contain no-repeat;
	-webkit-mask: url("/img/eye.svg") center / contain no-repeat;
}

.forgot-password {
	display: block;
	margin-top: 16px;
	color: var(--text-muted);
	font-size: 13px;
	text-align: center;
	text-decoration: none;
	transition: color .15s ease;
}

.forgot-password:hover {
	color: var(--accent);
	text-decoration: underline;
}

/* Профиль */
.profile-page {
	width: 100%;
}

.profile-card {
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: clamp(16px, 2vw, 24px);
}

.profile-section {
	width: 100%;
}

.profile-section + .profile-section {
	margin-top: 28px;
}

.profile-section-title {
	margin-bottom: 14px;
	color: var(--text);
	font-size: 14px;
	font-weight: 700;
}

.profile-account {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 30px 24px;
	margin-bottom: 20px;
	width: 100%;
	text-align: center;
}

.profile-account strong {
	color: var(--text);
	font-weight: 600;
}



.profile-reputation {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.profile-reputation strong {
	white-space: nowrap;
	line-height: 1;
}

.profile-description {
	margin: -4px 0 16px;
	color: var(--text-muted);
	font-size: 12px;
	line-height: 1.5;
}

.profile-password {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.profile-account-item {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.profile-account-item > span {
	color: var(--text-secondary);
	white-space: nowrap;
	line-height: 1;
}

.profile-account-item > strong {
	color: var(--text);
	white-space: nowrap;
	line-height: 1;
}

.profile-account-item > span, .profile-account-item > strong {
	line-height: 1;
}

.profile-password label {
	color: var(--text-secondary);
}

.profile-password .profile-input {
	width: 100%;
	padding-right: 42px;
}

.profile-account-item,
.profile-reputation,
.profile-password {
	align-items: center;
}

.profile-access-value {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 12px;
	min-width: 0;
}

.profile-account-item.profile-access {
	width: 100%;
	min-width: 0;
}

#profile-access-until {
	min-width: 0;
	overflow-wrap: anywhere;
}

.profile-access-link {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 0 20px;
	border-radius: 7px;
	background: var(--accent-color, #555);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color 0.15s ease,
		transform 0.15s ease;
}

.profile-access-link:hover {
	background: var(--accent-hover-color, #666);
	text-decoration: none;
}

.profile-access-link:active {
	transform: translateY(1px);
}

/* Список персонажей */
.characters-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

.character-row {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
}

.character-number {
	flex: 0 0 28px;
	color: var(--text-muted);
	font-size: 12px;
	text-align: center;
}

.character-input {
	flex: 1 1 auto;
	min-width: 0;
}

.profile-input,
.profile-time {
	height: 40px;
	padding: 0 11px;
	border: 1px solid var(--border);
	border-radius: 6px;
	outline: none;
	background: var(--bg);
	color: var(--text);
	font: inherit;
	transition: border-color .15s ease, background .15s ease;
}

.profile-input:focus,
.profile-time:focus {
	border-color: var(--accent);
}

.profile-input {
	width: 100%;
}

.character-main,
.character-main-button {
	flex: 0 0 140px;
	width: 140px;
	padding: 0;
	box-sizing: border-box;
	text-align: center;
	white-space: nowrap;
}

.character-main {
	color: var(--accent);
	font-size: 12px;
	font-weight: 600;
}

.character-main-button {
	border: 0;
	background: none;
	color: var(--text-muted);
	font: inherit;
	font-size: 12px;
	cursor: pointer;
}

.character-main-button:hover {
	color: var(--accent);
}

/* Онлайн время */
.online-times {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 30px 24px;
	width: 100%;
}

.online-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	white-space: nowrap;
}

.online-number {
	flex: 0 0 28px;
	color: var(--text-muted);
	font-size: 12px;
	text-align: center;
}

.profile-time {
	flex: 0 0 90px;
	width: 90px;
	min-width: 90px;
	height: 36px;
	padding: 0 8px;
	box-sizing: border-box;
	cursor: pointer;
	text-align: center;
}

.profile-time::-webkit-calendar-picker-indicator {
	display: none;
	-webkit-appearance: none;
}

.online-separator {
	flex: 0 0 15px;
	color: var(--text-muted);
	text-align: center;
}

/* Направления */
.directions-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 18px;
	width: 100%;
}

.direction-row {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	min-width: 0;
	min-height: 40px;
	padding: 0 11px;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--bg);
	color: var(--text-secondary);
	font-size: 13px;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.direction-row:hover {
	border-color: var(--accent);
	color: var(--text);
}

.direction-row input {
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	margin: 0;
	accent-color: var(--accent);
}

.direction-row span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.profile-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 12px;
	width: 100%;
	max-width: 1100px;
	padding: clamp(16px, 2vw, 24px);
}

.profile-footer .primary-button {
	min-width: 140px;
	max-width: 100%;
}

.profile-message {
	margin: 0;
	padding: 9px 11px;
	border: 1px solid rgba(243, 152, 0, .3);
	border-radius: 6px;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 13px;
	overflow-wrap: anywhere;
}

.profile-message.error {
	border-color: rgba(220, 70, 70, .35);
	background: rgba(220, 70, 70, .08);
	color: #e58a8a;
}

/* Выбор времени */
.time-picker {
position: fixed;
z-index: 1000;
display: flex;
flex-direction: column;
width: 220px;
padding: 10px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--bg-secondary);
box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

.time-picker-columns {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 6px;
height: 220px;
}

.time-picker-column {
display: flex;
flex-direction: column;
gap: 2px;
padding: 2px;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}

.time-picker-option {
flex: 0 0 32px;
width: 100%;
padding: 0;
border: 0;
border-radius: 5px;
background: transparent;
color: var(--text-secondary);
font: inherit;
font-family: Consolas, "Courier New", monospace;
font-size: 14px;
cursor: pointer;
transition: background .12s ease, color .12s ease;
}

.time-picker-option:hover {
background: var(--bg-hover);
color: var(--text);
}

.time-picker-option.active {
background: var(--bg-active);
color: var(--accent);
font-weight: 700;
}

.time-picker-actions {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 6px;
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid var(--border);
}

.time-picker-actions button {
height: 34px;
padding: 0 6px;
border: 1px solid var(--border);
border-radius: 5px;
background: var(--bg-hover);
color: var(--text-secondary);
font-size: 12px;
cursor: pointer;
transition: background .12s ease, border-color .12s ease, color .12s ease;
}

.time-picker-actions button:hover {
border-color: var(--accent);
background: var(--bg-active);
color: var(--accent);
}

.time-picker-apply {
border-color: var(--accent) !important;
background: var(--accent) !important;
color: #111 !important;
font-weight: 700;
}

.time-picker-apply:hover {
border-color: var(--accent-hover) !important;
background: var(--accent-hover) !important;
color: #111 !important;
}

.profile-time {
cursor: pointer;
text-align: center;
}

.payment-page {
	display: flex;
	justify-content: center;
	padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 32px);
}

.payment-card {
	width: min(760px, 100%);
}

.payment-description {
	max-width: 560px;
	margin: 0 auto 28px;
	color: var(--text-secondary);
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
}

.payment-options {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: 14px;
	width: 100%;
}

.payment-option {
	position: relative;
	display: flex;
	flex: 1 1 120px;
	flex-direction: column;
	align-items: center;
	width: 100%;
	min-width: 120px;
	max-width: 200px;
	padding: 22px 16px 16px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--bg-secondary);
	text-align: center;
	transition:
		border-color .15s ease,
		transform .15s ease,
		background-color .15s ease;
}

.payment-option:hover {
	border-color: var(--accent);
	background: var(--bg-hover);
	transform: translateY(-2px);
}

.payment-option-period {
	margin-bottom: 12px;
	font-size: 17px;
	font-weight: 600;
}

.payment-option-price {
	margin-bottom: 6px;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.1;
}

.payment-option-day {
	margin-bottom: 16px;
	color: var(--text-secondary);
	font-size: 13px;
}

.payment-option-benefit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	min-height: 24px;
	margin: 2px 0 16px;
	padding: 4px 10px;
	border-radius: 5px;
	background: rgba(143, 207, 143, .15);
	color: #8fcf8f;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.payment-option-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 100%;
	min-height: 40px;
	margin-top: auto;
	padding: 8px 12px;
	border: 0;
	border-radius: 7px;
	background: var(--accent);
	color: #111;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition:
		background-color .15s ease,
		transform .15s ease;
}

.payment-option-button:hover {
	background: var(--accent-hover);
}

.payment-option-button:active {
	transform: translateY(1px);
}

.payment-option-button img {
	width: 17px;
	height: 17px;
	flex: 0 0 17px;
}

.event-create-section {
	width: 100%;
}

.event-create-title {
	margin-bottom: 24px;
	font-size: 20px;
	font-weight: 600;
}

.event-form {
	width: 100%;
}

.event-form-group {
	margin-bottom: 24px;
}

.event-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-bottom: 24px;
}

.event-form-group label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
}

.event-form-hint {
	margin-top: 6px;
	font-size: 12px;
	opacity: 0.7;
}

.event-picker {
	display: grid;
	gap: 16px;
	padding: 0;
	background: transparent;
	border: 0;
}

.event-picker-row {
	display: grid;
	gap: 8px;
}

.event-picker-row > label {
	margin-bottom: 0;
}

.event-time-selects {
	display: flex;
	align-items: center;
	gap: 8px;
}

.event-time-selects .profile-input {
	width: 100px;
}

.event-duration {
	display: flex;
	align-items: center;
	gap: 8px;
}

.event-duration .profile-input {
	width: 90px;
}

.event-picker-message {
	min-height: 18px;
	font-size: 12px;
}

.event-form-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 32px;
}

.event-form-footer .secondary-button,
.event-form-footer .primary-button {
	width: auto;
	flex: 0 0 auto;
}

.events-message {
	margin-top: 16px;
}

@media (max-width: 700px) {
	.event-form-row {
		grid-template-columns: 1fr;
		gap: 0;
		margin-bottom: 0;
	}

	.event-form-row .event-form-group {
		margin-bottom: 24px;
	}
}