/*
	Единые элементы служебных страниц: формы, кнопки, карточки, сообщения.
	Подключается после style.css. Действует только внутри .ui-page и .ui-form,
	поэтому статьи, слайдеры и раздел рекламы не задевает.
	Палитра — из style.css: #ff8a00 (акцент), #ee612f (наведение), #292929, #f7f7f7.
*/

.ui-page .stt-block-title h1 {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
	line-height: inherit;
}

.ui-page [hidden] {
	display: none !important;
}

.ui-page .stt-block-content {
	font-size: 14px;
	line-height: 22px;
}

.ui-lead {
	margin: 0 0 20px 0;
	color: #565656;
	font-size: 14px;
	line-height: 22px;
}

/* ---------- Поля ---------- */

.ui-form {
	max-width: 640px;
}

.ui-field {
	display: block;
	margin: 0 0 18px 0;
}

.ui-label {
	display: block;
	margin: 0 0 6px 0;
	color: #292929;
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
}

.ui-req {
	color: #ee612f;
	font-style: normal;
}

.ui-hint {
	display: block;
	margin: 6px 0 0 0;
	color: #8a8a8a;
	font-size: 12px;
	line-height: 18px;
}

.ui-form input[type="text"],
.ui-form input[type="email"],
.ui-form input[type="password"],
.ui-form input[type="search"],
.ui-form input[type="number"],
.ui-form input:not([type]),
.ui-form select,
.ui-form textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 10px 14px !important;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #dcdcdc;
	border-radius: 6px;
	box-shadow: none;
	color: #292929 !important;
	font-family: inherit;
	font-size: 15px;
	line-height: 22px;
	transition: border-color .15s, box-shadow .15s;
}

.ui-form textarea {
	min-height: 180px;
	resize: vertical;
}

.ui-form select {
	padding-right: 40px !important;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23777' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
	cursor: pointer;
}

.ui-form select[multiple] {
	padding-right: 14px !important;
	background-image: none;
	min-height: 160px;
}

.ui-form input::placeholder,
.ui-form textarea::placeholder {
	color: #a8a8a8;
}

.ui-form input:hover,
.ui-form select:hover,
.ui-form textarea:hover {
	border-color: #c4c4c4;
}

.ui-form input:focus,
.ui-form select:focus,
.ui-form textarea:focus {
	outline: none;
	border-color: #ff8a00;
	box-shadow: 0 0 0 3px rgba(255, 138, 0, .18);
}

/* Ошибка: класс ставит скрипт проверки или шаблон. */
.ui-form .ui-invalid,
.ui-form .ui-invalid:focus {
	border-color: #e5484d;
	box-shadow: 0 0 0 3px rgba(229, 72, 77, .14);
}

.ui-error-text {
	display: block;
	margin: 6px 0 0 0;
	color: #d93a3f;
	font-size: 12px;
	line-height: 18px;
}

/* Галочки и радиокнопки. */
.ui-form input[type="checkbox"],
.ui-form input[type="radio"] {
	width: 18px;
	height: 18px;
	margin: 0 8px 0 0;
	vertical-align: -3px;
	accent-color: #ff8a00;
	cursor: pointer;
}

.ui-check {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	margin: 0 18px 0 0;
	color: #3a3a3a;
	cursor: pointer;
}

/* Две колонки полей на широком экране. */
.ui-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 16px;
}

/* Капча DLE и Google не тянутся — просто отступ. */
.ui-captcha {
	margin: 0 0 18px 0;
}

/* ---------- Кнопки ---------- */

.ui-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin: 6px 0 0 0;
}

.ui-btn,
.stt-block-content a.ui-btn,
.ui-form input[type="submit"].ui-btn,
.ui-form input[type="button"].ui-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	padding: 0 24px !important;
	box-sizing: border-box;
	background: #ff8a00;
	border: 1px solid #ff8a00;
	border-radius: 6px;
	box-shadow: none;
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
}

.ui-btn:hover,
.stt-block-content a.ui-btn:hover,
.ui-form input[type="submit"].ui-btn:hover,
.ui-form input[type="button"].ui-btn:hover {
	background: #ee612f;
	border-color: #ee612f;
	color: #fff;
}

.ui-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 138, 0, .3);
}

.ui-btn-ghost,
.stt-block-content a.ui-btn-ghost,
.ui-form input[type="button"].ui-btn-ghost {
	background: #fff;
	border-color: #dcdcdc;
	color: #3a3a3a;
}

.ui-btn-ghost:hover,
.stt-block-content a.ui-btn-ghost:hover,
.ui-form input[type="button"].ui-btn-ghost:hover {
	background: #f7f7f7;
	border-color: #c4c4c4;
	color: #000;
}

.ui-note {
	color: #8a8a8a;
	font-size: 12px;
	line-height: 18px;
}

/* ---------- Раскладка «форма + карточка» ---------- */

.ui-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 32px;
	align-items: start;
}

.ui-layout .ui-form {
	max-width: none;
}

.ui-aside {
	padding: 20px;
	background: #f7f7f7;
	border-radius: 8px;
}

.ui-aside-title {
	margin: 0 0 14px 0;
	color: #292929;
	font-size: 16px;
	line-height: 22px;
	font-weight: 500;
}

.ui-contact {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 0 0 16px 0;
	color: #565656;
	font-size: 13px;
	line-height: 18px;
}

	.ui-contact > i {
		flex: 0 0 36px;
		width: 36px;
		height: 36px;
		line-height: 36px;
		text-align: center;
		background: #fff;
		border-radius: 50%;
		color: #ff8a00;
		font-size: 15px;
	}

	.ui-contact b {
		display: block;
		color: #292929;
		font-size: 14px;
		font-weight: 500;
	}

	.stt-block-content .ui-contact a {
		color: #ee612f;
	}

	.stt-block-content .ui-contact a:hover {
		color: #ee612f;
	}

.ui-aside-sep {
	margin: 18px 0;
	border: 0;
	border-top: 1px solid #e6e6e6;
}

/* ---------- Узкая карточка по центру (восстановление пароля и т. п.) ---------- */

.ui-narrow {
	max-width: 440px;
	margin: 10px auto 10px auto;
}

/* ---------- Сообщение: информация, ошибка, 404 ---------- */

.ui-state {
	max-width: 620px;
	margin: 10px auto 0 auto;
	text-align: center;
}

.ui-state-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin: 0 0 16px 0;
	background: #fff3e3;
	border-radius: 50%;
	color: #ff8a00;
	font-size: 30px;
}

.ui-state-title {
	margin: 0 0 10px 0;
	color: #292929;
	font-size: 22px;
	line-height: 30px;
	font-weight: 500;
}

.ui-state-text {
	color: #565656;
	font-size: 15px;
	line-height: 24px;
}

.ui-state-icon-warn {
	background: #fdecea;
	color: #e5484d;
}

.ui-info {
	padding: 30px 0 10px 0;
	border-top: 0;
}

	.ui-state-text a {
		color: #ee612f;
	}

.ui-state .ui-actions {
	justify-content: center;
	margin: 22px 0 0 0;
}

.ui-help {
	max-width: 620px;
	margin: 32px auto 0 auto;
	padding: 24px 0 0 0;
	border-top: 1px solid #efefef;
}

.ui-help-title {
	margin: 0 0 12px 0;
	color: #6b6b6b;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
	text-align: center;
}

/* Поле с кнопкой в одну строку. */
.ui-inline {
	display: flex;
	gap: 10px;
}

	.ui-inline input {
		flex: 1 1 auto;
	}

	.ui-inline .ui-btn {
		flex: 0 0 auto;
	}

/* Плитки разделов. */
.ui-tiles {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 18px 0 0 0;
}

	.stt-block-content .ui-tiles a {
		display: inline-flex;
		align-items: center;
		min-height: 36px;
		padding: 0 14px;
		background: #f4f4f4;
		border-radius: 18px;
		color: #3a3a3a;
		font-size: 13px;
		text-decoration: none;
	}

	.stt-block-content .ui-tiles a:hover {
		background: #ff8a00;
		color: #fff;
	}

/* ---------- Планшет и телефон ---------- */

@media (max-width: 1050px) {
	.ui-layout {
		grid-template-columns: minmax(0, 1fr) 260px;
		gap: 24px;
	}
}

@media (max-width: 850px) {
	.ui-layout {
		grid-template-columns: 1fr;
	}

	/* 16px — чтобы iOS Safari не увеличивал страницу при фокусе. */
	.ui-form input[type="text"],
	.ui-form input[type="email"],
	.ui-form input[type="password"],
	.ui-form input[type="search"],
	.ui-form input[type="number"],
	.ui-form input:not([type]),
	.ui-form select,
	.ui-form textarea {
		font-size: 16px;
	}
}

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

	.ui-actions .ui-btn {
		width: 100%;
	}

	.ui-inline {
		flex-direction: column;
	}

	.ui-state-title {
		font-size: 19px;
		line-height: 26px;
	}
}

/* ---------- Обратная связь ---------- */

/* Получатель один — выбирать нечего, список не показываем. */
.fb-recipient:has(select option:only-child) {
	display: none;
}

.ui-form input[type="file"] {
	display: block;
	max-width: 100%;
	font-size: 14px;
}

/* ---------- Окно входа (login.tpl, гость) ---------- */

.login-form {
	padding: 4px 0 0 0;
}

.login-form .login-line {
	display: block;
	margin: 0 20px 14px 20px;
}

.login-form .login-line-title {
	display: flex;
	justify-content: space-between;
	margin: 0 0 6px 0;
	color: #565656;
	font-size: 13px;
}

	.login-form .login-lost {
		color: #ee612f;
		font-size: 12px;
	}

	.login-form .login-lost:hover {
		text-decoration: underline;
	}

.login-form .login-input-text {
	display: block;
	width: 100%;
	height: 42px;
	padding: 0 12px;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #dcdcdc;
	border-radius: 6px;
	color: #292929;
	font-size: 14px;
}

.login-form .login-input-text:focus {
	outline: none;
	border-color: #ff8a00;
	box-shadow: 0 0 0 3px rgba(255, 138, 0, .18);
}

.login-form input.login-input-text:-webkit-autofill {
	-webkit-box-shadow: inset 0 0 0 50px #fff !important;
}

.login-pass {
	position: relative;
	display: block;
}

	.login-pass .login-input-text {
		padding-right: 42px;
	}

.login-pass-toggle {
	position: absolute;
	top: 0;
	right: 0;
	width: 42px;
	height: 42px;
	padding: 0;
	background: none;
	border: 0;
	color: #9a9a9a;
	font-size: 15px;
	cursor: pointer;
}

	.login-pass-toggle:hover {
		color: #ff8a00;
	}

.login-form .enter {
	display: block;
	width: calc(100% - 40px);
	height: 44px;
	margin: 4px 20px 0 20px;
	padding: 0;
	background: #ff8a00;
	border-radius: 6px;
	color: #fff;
	font-size: 15px;
	font-weight: 500;
}

	.login-form .enter:hover {
		background: #ee612f;
	}

.login-form .login-enter-line {
	padding: 14px 20px 18px 20px;
	color: #8a8a8a;
	font-size: 13px;
	text-align: center;
}

	.login-form .login-enter-line a {
		color: #ee612f;
	}

	.login-form .login-enter-line a:hover {
		color: #ee612f;
		text-decoration: underline;
	}

@media (max-width: 850px) {
	.login-form .login-input-text {
		font-size: 16px;
	}
}

/* ---------- Восстановление пароля ---------- */

.ui-narrow > .ui-state-icon {
	display: flex;
	margin: 0 auto 16px auto;
}

.ui-narrow > .ui-lead,
.ui-narrow-note {
	text-align: center;
}

.ui-narrow .ui-actions .ui-btn {
	width: 100%;
}

.ui-narrow-note {
	margin: 16px 0 0 0;
}

	.stt-block-content .ui-narrow-note a {
		color: #ee612f;
	}

/* ---------- Поиск (search.tpl) ---------- */

.ui-search {
	max-width: none;
}

.ui-search-bar {
	display: flex;
	gap: 10px;
	max-width: 720px;
}

.ui-search-field {
	position: relative;
	flex: 1 1 auto;
}

	.ui-search-field > i {
		position: absolute;
		top: 50%;
		left: 15px;
		margin-top: -8px;
		color: #a8a8a8;
		font-size: 15px;
		pointer-events: none;
	}

	.ui-form .ui-search-field input {
		min-height: 48px;
		padding-left: 42px !important;
		font-size: 16px;
	}

.ui-search-bar .ui-btn {
	min-height: 48px;
	padding: 0 28px !important;
}

.stt-block-content a.ui-search-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 12px 0 0 0;
	color: #6b6b6b;
	font-size: 13px;
}

	.stt-block-content a.ui-search-more:hover {
		color: #ee612f;
	}

.ui-search .ui-actions .ui-search-more {
	margin: 0;
}

.ui-search-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 22px 0 20px 0;
}

.ui-search-group {
	padding: 16px;
	background: #f7f7f7;
	border-radius: 8px;
}

	.ui-search-group .ui-field {
		margin: 0 0 8px 0;
	}

.ui-search-group-title {
	margin: 0 0 10px 0;
	color: #292929;
	font-size: 14px;
	font-weight: 500;
}

/* Два поля DLE в строку: «не менее / 0», «за всё время / и новее». */
.ui-search-pair {
	display: flex;
	gap: 8px;
}

	.ui-search-pair > select:first-child {
		flex: 1 1 auto;
	}

	.ui-search-pair > select + select {
		flex: 0 0 42%;
	}

	.ui-search-pair-col {
		flex-direction: column;
	}

	.ui-search-pair-col > select + select {
		flex: 0 0 auto;
	}

	.ui-form .ui-search-pair > #replylimit {
		flex: 0 0 76px;
		width: 76px;
	}

.ui-search-view label,
.ui-search-group label[for] {
	display: flex;
	align-items: center;
	min-height: 32px;
	cursor: pointer;
}

.ui-search-cats {
	grid-column: span 3;
}

	.ui-form .ui-search-cats select[multiple] {
		min-height: 150px;
		padding: 6px !important;
	}

	.ui-search-cats select[multiple] option {
		padding: 5px 8px;
		border-radius: 4px;
	}

.ui-search-msg {
	margin: 18px 0 0 0;
	padding: 12px 16px;
	background: #f7f7f7;
	border-left: 4px solid #ff8a00;
	border-radius: 0 6px 6px 0;
	color: #3a3a3a;
	font-size: 14px;
}

@media (max-width: 1050px) {
	.ui-search-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ui-search-cats {
		grid-column: span 2;
	}
}

@media (max-width: 600px) {
	.ui-search-bar {
		flex-direction: column;
	}

	.ui-search-grid {
		grid-template-columns: 1fr;
	}

	.ui-search-cats {
		grid-column: auto;
	}
}

/* ---------- Статистика (stats.tpl) ---------- */

.ui-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.ui-stat {
	padding: 20px;
	background: #f7f7f7;
	border-radius: 8px;
}

.ui-stat-head {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #6b6b6b;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
}

	.ui-stat-head i {
		color: #ff8a00;
		font-size: 15px;
	}

.ui-stat-num {
	margin: 6px 0 12px 0;
	color: #292929;
	font-size: 34px;
	line-height: 40px;
	font-weight: 500;
}

.ui-stat-list {
	margin: 0;
	padding: 12px 0 0 0;
	list-style: none;
	border-top: 1px solid #e6e6e6;
}

	.ui-stat-list li {
		display: flex;
		justify-content: space-between;
		padding: 3px 0;
		color: #6b6b6b;
		font-size: 13px;
		line-height: 20px;
	}

	.ui-stat-list b {
		color: #292929;
		font-weight: 500;
	}

.stt-block-content a.ui-stat-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 12px 0 0 0;
	color: #ee612f;
	font-size: 13px;
}

.ui-stat-db {
	margin: 16px 0 0 0;
	color: #6b6b6b;
	font-size: 13px;
}

	.ui-stat-db i {
		margin: 0 6px 0 0;
		color: #b0b0b0;
	}

	.ui-stat-db b {
		color: #292929;
		font-weight: 500;
	}

.ui-h2 {
	margin: 32px 0 14px 0;
	color: #292929;
	font-size: 18px;
	line-height: 24px;
	font-weight: 500;
}

/* Таблица: на узком экране листается внутри себя, а не всей страницей. */
.ui-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.ui-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	line-height: 20px;
}

	.ui-table td,
	.ui-table th {
		padding: 10px 12px;
		border-bottom: 1px solid #efefef;
		text-align: left;
		white-space: nowrap;
	}

	.ui-table thead td,
	.ui-table thead th {
		color: #8a8a8a;
		font-size: 12px;
		text-transform: uppercase;
		letter-spacing: .03em;
		border-bottom-color: #e2e2e2;
	}

	.ui-table tbody tr:hover,
	.ui-table > tr:hover {
		background: #fafafa;
	}

	.stt-block-content .ui-table a {
		color: #ee612f;
	}

/* Лучшие авторы: числа по центру, на телефоне — без дат и ЛС. */
.ui-top-users td:nth-child(n+2) {
	text-align: center;
}

@media (max-width: 850px) {
	.ui-stats {
		grid-template-columns: 1fr;
	}

	.ui-stat-num {
		font-size: 28px;
		line-height: 34px;
	}
}

@media (max-width: 600px) {
	.ui-top-users td:nth-child(3),
	.ui-top-users td:nth-child(4),
	.ui-top-users td:nth-child(7) {
		display: none;
	}

	.ui-table td,
	.ui-table th {
		padding: 10px 6px;
	}
}

/* ---------- Комментарии (comments.tpl) ---------- */

.comment-item.ui-comment {
	margin: 0 0 16px 0;
	padding: 16px 18px 12px 18px;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 8px;
}

.ui-comment-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 0 60px 0 0;
}

.ui-comment .comment-item-image {
	position: static;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #f0f0f0;
}

	.ui-comment .comment-item-image img {
		width: 44px;
		height: 44px;
		margin: 0;
		border-radius: 50%;
		object-fit: cover;
	}

.ui-comment-who {
	min-width: 0;
}

.ui-comment .comment-item-author {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	color: #292929;
	font-size: 15px;
	line-height: 20px;
	font-weight: 500;
}

	.ui-comment .comment-item-author a {
		color: #292929;
	}

.ui-online {
	display: inline-block;
	width: 8px;
	height: 8px;
	background: #5bb85b;
	border-radius: 50%;
}

.ui-comment .comment-item-date {
	position: static;
	color: #9a9a9a;
	font-size: 12px;
	line-height: 18px;
}

.ui-comment .comr {
	top: 50%;
	right: 0;
	margin-top: -7px;
}

.ui-comment-news {
	margin: 10px 0 0 0;
	color: #8a8a8a;
	font-size: 12px;
	line-height: 18px;
}

	.ui-comment-news:empty {
		display: none;
	}

	.ui-comment-news::before {
		content: "к материалу: ";
	}

	.ui-comment-news a {
		color: #ee612f;
	}

.ui-comment .comment-item-text2 {
	padding: 12px 0 4px 0;
	background: none;
	box-shadow: none;
	border-radius: 0;
	color: #3a3a3a;
	font-size: 14px;
	line-height: 22px;
}

.ui-comment .comments-item-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 8px 0 0 0;
	padding: 10px 0 0 0;
	border-top: 1px solid #f2f2f2;
	font-size: 12px;
}

	.ui-comment .comments-item-links a {
		display: inline-flex;
		align-items: center;
		gap: 5px;
		min-height: 28px;
		margin: 0;
		color: #8a8a8a;
	}

	.ui-comment .comments-item-links a:hover {
		color: #ee612f;
	}

	.ui-comment .comments-item-links:empty,
	.ui-comment .comments-item-links:not(:has(a)) {
		display: none;
	}

/* ---------- Профиль (userinfo.tpl) ---------- */

.ui-profile-head {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: 0 0 24px 0;
	padding: 20px;
	background: #f7f7f7;
	border-radius: 8px;
}

.ui-profile-avatar {
	flex: 0 0 96px;
	width: 96px;
	height: 96px;
	overflow: hidden;
	background: #e9e9e9;
	border: 3px solid #fff;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

	.ui-profile-avatar img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

.ui-profile-main {
	flex: 1 1 auto;
	min-width: 0;
}

.ui-profile-name {
	margin: 0;
	color: #292929;
	font-size: 24px;
	line-height: 30px;
	font-weight: 500;
	word-break: break-word;
}

.ui-profile-group {
	display: inline-block;
	margin: 6px 0 0 0;
	padding: 2px 10px;
	background: #fff3e3;
	border-radius: 12px;
	color: #c25e00;
	font-size: 12px;
	line-height: 20px;
}

.ui-profile-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin: 10px 0 0 0;
	color: #6b6b6b;
	font-size: 13px;
}

	.ui-profile-meta i {
		margin: 0 6px 0 0;
		color: #b0b0b0;
	}

.ui-profile-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

	/* {email}/{pm} без права отправки — просто текст: такой пункт не показываем. */
	.ui-pa:not(:has(a)) {
		display: none;
	}

	.ui-pa a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 40px;
		padding: 0 18px;
		box-sizing: border-box;
		width: 100%;
		background: #fff;
		border: 1px solid #dcdcdc;
		border-radius: 6px;
		color: #3a3a3a;
		font-size: 14px;
		white-space: nowrap;
	}

	.ui-pa-pm a {
		background: #ff8a00;
		border-color: #ff8a00;
		color: #fff;
	}

	.stt-block-content .ui-pa a:hover,
	.ui-pa a:hover {
		border-color: #ee612f;
		color: #ee612f;
	}

	.ui-pa-pm a:hover {
		background: #ee612f;
		color: #fff !important;
	}

/* Вкладки как в разделе рекламы: строка с подчёркиванием. */
.ui-profile .tabs-profile .index-tabs {
	display: flex;
	gap: 24px;
	margin: 0 0 20px 0;
	border-bottom: 1px solid #ececec;
	font-size: 14px;
	bottom: 0;
}

	.ui-profile .tabs-profile .index-tabs span {
		height: auto;
		padding: 0 0 10px 0;
		background: none;
		border: 0;
		border-bottom: 2px solid transparent;
		border-radius: 0;
		color: #6b6b6b;
		font-size: 14px;
		line-height: 22px;
		bottom: -1px;
	}

	.ui-profile .tabs-profile .index-tabs span:hover {
		color: #292929;
	}

	.ui-profile .tabs-profile .active-ttab {
		height: auto !important;
		line-height: 22px !important;
		background: none !important;
		border-bottom-color: #ff8a00;
		color: #292929 !important;
		bottom: -1px !important;
	}

	/* Чужой профиль: вкладка одна — строку вкладок не показываем. */
	.ui-profile .tabs-profile .index-tabs:not(:has(span + span)) {
		display: none;
	}

.ui-profile .tabs-profile .tt-panel {
	border: 0;
	background: none;
}

.ui-profile-facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.ui-profile-fact {
	padding: 14px 16px;
	border: 1px solid #ececec;
	border-radius: 8px;
	color: #6b6b6b;
	font-size: 13px;
}

	.ui-profile-fact span {
		display: block;
		margin: 0 0 4px 0;
		color: #8a8a8a;
		font-size: 12px;
		text-transform: uppercase;
		letter-spacing: .03em;
	}

	.ui-profile-fact b {
		margin: 0 8px 0 0;
		color: #292929;
		font-size: 16px;
		font-weight: 500;
	}

	.ui-profile-fact a {
		font-size: 13px;
	}

.ui-profile-about {
	margin: 20px 0 0 0;
	color: #3a3a3a;
	font-size: 14px;
	line-height: 22px;
}

	.ui-profile-about:empty {
		display: none;
	}

.ui-profile-form {
	max-width: 720px;
}

.ui-profile-section {
	margin: 0 0 8px 0;
	padding: 0 0 8px 0;
	border-bottom: 1px solid #f0f0f0;
}

	.ui-profile-section .ui-h2 {
		margin: 18px 0 14px 0;
		font-size: 16px;
	}

.ui-profile-hint {
	margin: -6px 0 14px 0;
}

@media (max-width: 600px) {
	.ui-profile-head {
		flex-wrap: wrap;
		gap: 14px;
		padding: 16px;
	}

	.ui-profile-avatar {
		flex-basis: 72px;
		width: 72px;
		height: 72px;
	}

	.ui-profile-main {
		flex-basis: calc(100% - 90px);
	}

	.ui-profile-name {
		font-size: 20px;
		line-height: 26px;
	}

	.ui-profile-actions {
		flex-direction: row;
		width: 100%;
	}

	.ui-pa {
		flex: 1 1 0;
	}

	.ui-profile-facts {
		grid-template-columns: 1fr;
	}

	.ui-top-users td:nth-child(6) {
		display: none;
	}
}

.ui-profile-fact a,
.ui-profile-about a,
.ui-profile-form .ui-label a {
	color: #ee612f;
}

	.ui-profile-fact a:hover {
		text-decoration: underline;
	}

/* Пустое поле профиля («Откуда» не заполнено) — карточку не показываем. */
.ui-profile-fact:has(> b:empty):not(:has(a)) {
	display: none;
}

/* ---------- Старые формы DLE в новом виде: подпись над полем ----------
   .ui-stack ставится на контейнер формы (addnews, pm, addcomments, registration):
   разметку DLE (.form-line-tt-left/right) не переписываем, только раскладку. */

.ui-form-wide {
	max-width: none;
}

.ui-stack .form-line-tt {
	margin: 0 0 18px 0;
}

	.ui-stack .form-line-tt-left {
		display: block;
		width: auto !important;
		margin: 0 0 6px 0;
		padding: 0;
		color: #292929;
		font-size: 14px;
		line-height: 20px;
		font-weight: 500;
	}

	.ui-stack .form-line-tt-right {
		display: block;
		width: auto !important;
	}

	.ui-stack .form-line-tt input[type="text"],
	.ui-stack .form-line-tt input[type="email"],
	.ui-stack .form-line-tt input[type="password"] {
		max-width: 560px;
		width: 100% !important;
	}

	.ui-stack .form-line-tt textarea {
		width: 100% !important;
		box-sizing: border-box;
	}

/* Кнопка «Добавить комментарий» под статьёй. */
.fullpage-comments-add {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 24px;
	box-sizing: border-box;
	background: #ff8a00;
	border-radius: 6px;
	color: #fff;
	font-size: 15px;
	font-weight: 500;
}

	.fullpage-comments-add:hover {
		background: #ee612f;
	}

.add-comment.ui-form {
	max-width: none;
}

	.add-comment .form-submit-block-tt {
		border-top: 0;
		padding: 4px 0 0 0;
	}

/* Личные сообщения: меню папок — вкладками. */
.ui-pm .pmtt-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 20px 0;
}

	.ui-pm .pmtt-menu a {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		min-height: 40px;
		padding: 0 16px;
		background: #f4f4f4;
		border-radius: 20px;
		color: #3a3a3a;
		font-size: 14px;
	}

	.ui-pm .pmtt-menu a:hover {
		background: #ff8a00;
		color: #fff;
	}

	.ui-pm .pmtt-menu a i {
		margin: 0;
		font-size: 14px;
	}

	.ui-pm .pmtt-menu {
		justify-content: flex-start;
		padding: 0 0 16px 0;
		border-bottom: 1px solid #efefef;
		text-align: left;
	}

	.ui-pm .pmtt-menu a {
		position: static;
		width: auto;
		margin: 0;
		padding: 0 16px;
		background: #f4f4f4;
		border: 0;
		box-shadow: none;
	}

	.ui-pm .pmtt-menu a i {
		position: static;
		color: inherit;
	}

	.ui-pm .pmtt-menu a i {
		left: auto;
		top: auto;
		margin: 0;
		font-size: 14px;
	}

.ui-comments-closed {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	padding: 14px 16px;
	background: #f7f7f7;
	border-radius: 8px;
	color: #565656;
	font-size: 14px;
}

	.ui-comments-closed i {
		color: #ff8a00;
		font-size: 18px;
	}

	.ui-comments-closed a {
		color: #ee612f;
	}

/* ---------- Статические страницы и правила (static.tpl) ---------- */

.ui-static-body {
	max-width: 780px;
	color: #2f2f2f;
	font-size: 15px;
	line-height: 26px;
}

	.ui-static-body p {
		margin: 0 0 16px 0;
	}

	.ui-static-body h2 {
		margin: 28px 0 12px 0;
		color: #292929;
		font-size: 19px;
		line-height: 26px;
		font-weight: 500;
	}

	.ui-static-body h2:first-child {
		margin-top: 4px;
	}

	.ui-static-body ul {
		margin: 0 0 18px 0;
		padding: 0;
		list-style: none;
	}

	.ui-static-body li {
		position: relative;
		margin: 0 0 8px 0;
		padding: 0 0 0 22px;
	}

		.ui-static-body li::before {
			content: "";
			position: absolute;
			top: 10px;
			left: 4px;
			width: 7px;
			height: 7px;
			background: #ff8a00;
			border-radius: 50%;
		}

	.ui-static-body b,
	.ui-static-body strong {
		font-weight: 500;
		color: #1f1f1f;
	}

@media (max-width: 600px) {
	.ui-static-body {
		font-size: 15px;
		line-height: 24px;
	}
}

/* ======================= Правки после проверки 26.10.2026 ======================= */

/* Профиль: подчёркивание активной вкладки (правило span выше перебивало цвет). */
.ui-profile .tabs-profile .index-tabs span.active-ttab {
	border-bottom-color: #ff8a00 !important;
}

/* Кнопка выбора файла — в общем стиле. */
.ui-form input[type="file"]::file-selector-button,
.adv-form input[type="file"]::file-selector-button {
	margin: 0 12px 0 0;
	padding: 9px 16px;
	background: #fff;
	border: 1px solid #dcdcdc;
	border-radius: 6px;
	color: #3a3a3a;
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
}

.ui-form input[type="file"]::file-selector-button:hover,
.adv-form input[type="file"]::file-selector-button:hover {
	border-color: #ff8a00;
	color: #ee612f;
}

/* Добавление новости: доп. поля DLE выводит таблицей — раскладываем столбиком. */
.ui-stack .add-news-table table,
.ui-stack .add-news-table tbody,
.ui-stack .add-news-table tr,
.ui-stack .add-news-table td {
	display: block;
	width: auto !important;
	background: none !important;
}

.ui-stack .add-news-table tr {
	margin: 0 0 18px 0;
}

.ui-stack .add-news-table td.addnews,
.ui-stack .add-news-table td.xfields {
	padding: 0;
	color: #292929;
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
}

	.ui-stack .add-news-table td.addnews {
		margin: 0 0 6px 0;
	}

	.ui-stack .add-news-table td.xfields .bb-editor {
		margin: 6px 0 0 0;
		font-weight: 400;
	}

.ui-stack .qq-upload-button {
	display: inline-flex !important;
	align-items: center;
	min-height: 40px;
	padding: 0 18px !important;
	background: #fff !important;
	border: 1px solid #dcdcdc !important;
	border-radius: 6px !important;
	box-shadow: none !important;
	color: #3a3a3a !important;
	font-size: 14px !important;
	font-weight: 400;
	text-transform: none !important;
}

	.ui-stack .qq-upload-button:hover {
		border-color: #ff8a00 !important;
		color: #ee612f !important;
	}

/* Личные сообщения: список писем и действия над ними. */
.ui-pm .pmtt-pm-list-title,
.ui-pm .pmtt-status-title,
.ui-pm .pmtt-new-title {
	margin: 0 0 12px 0;
	color: #292929;
	font-size: 16px;
	font-weight: 500;
}

.ui-pm table.pm {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

	.ui-pm table.pm td {
		padding: 10px 8px;
		border-bottom: 1px solid #f0f0f0;
		background: none;
	}

	.ui-pm table.pm td.pm_head {
		color: #8a8a8a;
		font-size: 12px;
		text-transform: uppercase;
		letter-spacing: .03em;
		border-bottom-color: #e2e2e2;
	}

	.ui-pm table.pm tr:hover td.pm_list {
		background: #fafafa;
	}

	.ui-pm table.pm a.pm_list {
		color: #292929;
	}

	.ui-pm table.pm a.pm_list:hover {
		color: #ee612f;
	}

	.ui-pm table.pm select[name="doaction"] {
		min-height: 36px;
		padding: 0 10px;
		background: #fff;
		border: 1px solid #dcdcdc;
		border-radius: 6px;
		font-size: 13px;
	}

	.ui-pm table.pm input.bbcodes {
		min-height: 36px;
		margin: 0 0 0 6px;
		padding: 0 16px;
		background: #fff;
		border: 1px solid #dcdcdc;
		border-radius: 6px;
		box-shadow: none;
		color: #3a3a3a;
		font-size: 13px;
		cursor: pointer;
	}

	.ui-pm table.pm input.bbcodes:hover {
		border-color: #ff8a00;
		color: #ee612f;
	}

.ui-pm .pmtt-status {
	margin: 28px 0 0 0;
	padding: 16px 0 0 0;
	border-top: 1px solid #f0f0f0;
	color: #8a8a8a;
	font-size: 12px;
}

	.ui-pm .pmtt-status-title {
		font-size: 13px;
		color: #6b6b6b;
	}

/* Формы раздела рекламы — те же поля, что и в остальных формах сайта. */
.adv-form input[type="text"],
.adv-form input[type="email"],
.adv-form input[type="url"],
.adv-form input[type="number"],
.adv-form input[type="date"],
.adv-form select,
.adv-form textarea {
	min-height: 42px;
	padding: 9px 12px !important;
	box-sizing: border-box;
	background: #fff !important;
	border: 1px solid #dcdcdc;
	border-radius: 6px;
	box-shadow: none;
	color: #292929 !important;
	font-family: inherit;
	font-size: 14px;
}

.adv-form textarea {
	min-height: 110px;
}

.adv-form input:focus,
.adv-form select:focus,
.adv-form textarea:focus {
	outline: none;
	border-color: #ff8a00;
	box-shadow: 0 0 0 3px rgba(255, 138, 0, .18);
}

.adv-form input[type="checkbox"],
.adv-form input[type="radio"] {
	accent-color: #ff8a00;
}

.adv-form .form-submit-block-tt,
.adv-form .ui-btn {
	margin-top: 4px;
}

@media (max-width: 850px) {
	.adv-form input[type="text"],
	.adv-form input[type="email"],
	.adv-form input[type="url"],
	.adv-form input[type="number"],
	.adv-form input[type="date"],
	.adv-form select,
	.adv-form textarea {
		font-size: 16px;
	}
}

/* Телефон: первая большая новость — картинка не выше 240px (вертикальные постеры
   растягивали карточку на весь экран). */
@media (max-width: 1050px) {
	.main-news-big .main-news-image {
		max-height: 240px;
		overflow: hidden;
	}

	.main-news-big .main-news-image img {
		width: 100%;
		height: 240px;
		object-fit: cover;
	}
}

/* Поля раздела рекламы были 320px — подсказка «ООО …, ИНН …» обрезалась. */
.adv-form .form-line-tt-right input[type="text"],
.adv-form .form-line-tt-right input[type="email"] {
	width: 420px;
	max-width: 100%;
}

/* ---------- Заголовок лент: раздел, тег, архив (engine/modules/site/h1.php) ---------- */

.list-h1-box {
	padding: 20px 20px 0 20px;
}

.list-h1 {
	margin: 0;
	color: #292929;
	font-size: 22px;
	line-height: 30px;
	font-weight: 500;
}

@media (max-width: 600px) {
	.list-h1 {
		font-size: 19px;
		line-height: 26px;
	}
}

/* Регистрация: кнопка проверки логина под полем. */
.ui-reg-check {
	margin-top: 8px !important;
	min-height: 38px;
	font-size: 14px;
}
