/* xChange-24, редизайн 2026 — плоский современный вид (макет docs/concepts/concept-a3.html).
   Подключается после style.css и переопределяет его только внутри body.v2.
   Без теней, градиентов и «карточек»: структура — отступами и тонкими линиями. */

:root {
	--accent: #186EA2;
	--accent-hover: #125A86;
	--accent-soft: #EAF3F9;
	--ink: #0F172A;
	--text: #334155;
	--muted: #64748B;
	--line: #E5E7EB;
	--line-strong: #D1D5DB;
	--soft: #F8FAFC;
	--ok: #16A34A;
	--warn: #D97706;
	--warn-soft: #FFFBEB;
	--error: #DC2626;
	--radius: 6px;
	--page: #F1F5F9;	/* фон страницы: белые карточки на сером, как у banki.ru */
	--card-shadow: 0 1px 8px rgba(22, 33, 54, .06);
	--field-border: #CFDAE5;
	--chip: #EEF3F8;
	--font: Inter, "PT Sans", Arial, sans-serif;
	--card: #fff;			/* шапка, подвал, карточки, поля */
	--link: #186EA2;		/* текст ссылок; --accent — фон кнопок */
	--link-hover: #125A86;
	--warn-ink: #92400E; --warn-chip: #FEF3C7;
	--ok-ink: #15803D; --ok-soft: #ECFDF3;
	--error-soft: #FEE2E2;
	--hover: #E2EBF3; --hover-strong: #DDEBF5;
	--notice: #F5F8FF; --step-line: #D5E4EF;
	--notice-line: #DCE7FD;
	/* Значки (набор Tabler: линия 2px, скругления). Рисуются маской — цвет берут из темы */
	--i-telegram: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M21 3l-6.5 18a.55.55 0 0 1-1 0L10 14l-7-3.5a.55.55 0 0 1 0-1z'/%3E%3C/svg%3E");
	--i-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
	--i-news: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1-4 0V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v12a3 3 0 0 0 3 3h11'/%3E%3Cpath d='M8 8h4'/%3E%3Cpath d='M8 12h4'/%3E%3Cpath d='M8 16h4'/%3E%3C/svg%3E");
	--i-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7a4 4 0 1 0 8 0 4 4 0 1 0-8 0'/%3E%3Cpath d='M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2'/%3E%3C/svg%3E");
	--i-moon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3h.393a7.5 7.5 0 0 0 7.92 12.446A9 9 0 1 1 12 2.992z'/%3E%3C/svg%3E");
	--i-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 12a4 4 0 1 0 8 0 4 4 0 1 0-8 0'/%3E%3Cpath d='M3 12h1m8-9v1m8 8h1m-9 8v1M5.6 5.6l.7.7m12.1-.7-.7.7m0 11.4.7.7m-12.1-.7-.7.7'/%3E%3C/svg%3E");
	--i-chevron-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E");
	--i-chevron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	--i-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M10.363 3.591 2.257 17.125a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636-2.87L13.637 3.59a1.914 1.914 0 0 0-3.274 0z'/%3E%3Cpath d='M12 16h.01'/%3E%3C/svg%3E");
	--i-error: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0'/%3E%3Cpath d='M12 8v4'/%3E%3Cpath d='M12 16h.01'/%3E%3C/svg%3E");
	--i-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0'/%3E%3Cpath d='M12 9h.01'/%3E%3Cpath d='M11 12h1v4h1'/%3E%3C/svg%3E");
	color-scheme: light;
}

/* ---------- Основа ---------- */

body.v2 { margin: 0; background: var(--card); color: var(--text); -webkit-font-smoothing: antialiased; }
body.v2, body.v2 table, body.v2 input, body.v2 select, body.v2 textarea, body.v2 button { font-family: var(--font); font-size: 15px; line-height: 1.6; }
body.v2 * { box-sizing: border-box; }
body.v2 img { max-width: 100%; height: auto; }
body.v2 a { color: var(--link); text-decoration: none; }
body.v2 a:hover { color: var(--link-hover); background: none; text-decoration: underline; }
body.v2 a:focus-visible, body.v2 button:focus-visible, body.v2 input:focus-visible, body.v2 select:focus-visible, body.v2 textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.v2 h1 { font-family: var(--font); font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.6px; margin: 0 0 12px; color: var(--ink); text-align: left; }
body.v2 h2, body.v2 h2.dir, body.v2 h2.news { font-family: var(--font); font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.3px; margin: 32px 0 10px; color: var(--ink); }
body.v2 h4 { font-family: var(--font); }
body.v2 p { text-align: left; margin: 0 0 12px; }
body.v2 li { list-style: disc; margin-bottom: 6px; }
body.v2 li::marker { color: var(--muted); }
body.v2 ol li { list-style: decimal; }
body.v2 hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Шапка ---------- */

/* Края экрана у iPhone (вырез, скругления, панель Safari) — белые, как шапка и подвал; серый фон только у страницы */
html { background: var(--card); }
/* Safari на iOS 26 красит края экрана цветом фона body — поэтому body белый, а серый фон страницы — у .page-bg между шапкой и подвалом */
.page-bg { background: var(--page); }
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 64px; }
.site-logo { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; text-decoration: none; }
body.v2 .site-logo:hover { background: none; text-decoration: none; }
body.v2 .site-logo img { display: block; width: auto; height: 34px; max-width: none; }
body.v2 .site-logo .site-logo__globe { width: 32px; height: 32px; }
/* Надпись — текстом страницы: шрифт Inter внутри SVG в <img> недоступен */
.logo-text { font-family: var(--font); font-size: 22px; font-weight: 700; letter-spacing: -.035em; line-height: 1; color: var(--ink); white-space: nowrap; }
.logo-text em { font-style: normal; color: var(--link); }
.site-nav ul { display: flex; gap: 24px; margin: 0; padding: 0; }
body.v2 .site-nav li { list-style: none; margin: 0; flex: 0 0 auto; }
body.v2 .site-nav a { display: block; padding: 20px 0 18px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
body.v2 .site-nav a:hover { color: var(--ink); text-decoration: none; }
body.v2 .site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
@media (min-width: 1150px) { body.v2 .site-nav .site-nav__narrow { display: none; } }
.header-contact { margin-left: auto; display: flex; align-items: center; gap: 20px; }
body.v2 .header-phone { color: var(--ink); font-weight: 500; white-space: nowrap; }

/* Кнопки-ссылки */
body.v2 .btn-primary { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; border-radius: var(--radius); background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; }
body.v2 .btn-primary:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }

/* ---------- Раскладка ---------- */

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; padding-top: 28px; padding-bottom: 32px; }	/* отступ до подвала */
.content { min-width: 0; }
.sidebar { min-width: 0; display: grid; gap: 16px; align-content: start; }

/* Главная: заголовок, подзаголовок, факты */
body.v2 .intro h1 { margin-bottom: 4px; }
.intro .lead { font-size: 16px; color: var(--muted); margin: 0 0 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 20px; padding: 0; }
body.v2 .facts li { list-style: none; margin: 0; font-size: 14px; color: var(--text); }
.facts li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 6px; }
.facts__chip { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--link); font-weight: 600; white-space: nowrap; }
body.v2 .form-note { margin: -20px -24px 16px; padding: 12px 24px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
body.v2 .form-note b { font-weight: 600; color: var(--ink); }
body.v2 .field-warn { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--warn-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field-warn::before { content: ""; flex: 0 0 16px; height: 16px; background: var(--warn); -webkit-mask: var(--i-alert) no-repeat center / contain; mask: var(--i-alert) no-repeat center / contain; }

/* Панели колонки (menu/sidebar.php): общая рамка вместо «висящих» блоков */
.side-panel { border: 0; border-radius: 16px; padding: 16px; background: var(--card); box-shadow: var(--card-shadow); }
body.v2 .side-panel > .side-title { margin-bottom: 12px; }
body.v2 .side-link { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 500; }
.side-more summary { list-style: none; cursor: pointer; margin-top: 10px; font-size: 13px; font-weight: 500; color: var(--link); }
.side-more summary::-webkit-details-marker { display: none; }
.side-more summary::after { content: " ▾"; }
.side-more[open] summary { display: none; }
.reserves { margin: 0; padding: 0; display: grid; gap: 8px; }
.side-more .reserves { margin-top: 8px; }
body.v2 .reserves li { list-style: none; margin: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; column-gap: 10px; align-items: center; font-size: 13px; color: var(--ink); }
body.v2 .reserves img { width: 20px; height: 20px; max-width: none; object-fit: contain; }
.res-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); justify-self: center; }
.res-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-sum { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.news-list { margin: 0; padding: 0; display: grid; gap: 12px; }
body.v2 .news-list li { list-style: none; margin: 0; display: grid; gap: 1px; font-size: 13px; line-height: 1.4; }
.news-list time { font-size: 12px; color: var(--muted); }
body.v2 .news-list a { color: var(--ink); font-weight: 500; }
body.v2 .news-list a:hover { color: var(--link); }
.cab-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cab-links { display: grid; gap: 2px; }
body.v2 .cab-links a { display: block; padding: 6px 0; font-size: 14px; font-weight: 500; border-top: 1px solid var(--line); }
body.v2 .cab-links a:last-child { color: var(--muted); }

/* Блоки боковой колонки. menu/*.php выводят строки таблиц с заголовком <div class="sh"> — показываем их плоско */
body.v2 .side-title, body.v2 .side-block .sh {
	margin: 0 0 12px; padding: 0; max-height: none; background: none; text-align: left;
	font-family: var(--font); font-size: 16px; line-height: 1.3; font-weight: 700; letter-spacing: -.2px; text-transform: none; color: var(--ink);
}
/* Заголовки блоков в menu/*.php набраны капсом прямо в тексте («НАШИ РЕЗЕРВЫ») — показываем как обычное предложение */
body.v2 .side-block .sh { text-transform: lowercase; }
body.v2 .side-block .sh::first-letter { text-transform: uppercase; }
body.v2 .side-block { width: 100%; border-collapse: collapse; background: none; }
body.v2 .side-block > tbody > tr > td { padding: 0 0 32px; background: none; }
body.v2 .side-block > tbody > tr > td[bgcolor] { padding: 0; background: none; }
body.v2 .side-block td { font-size: 14px; color: var(--text); }
body.v2 .side-block img[src*="/logos/"] { width: 22px; height: 22px; max-width: none; object-fit: contain; vertical-align: middle; }	/* max-width: 100% в ячейке таблицы сжимал до 0 */	/* логотипы в «Наших резервах» */
body.v2 .side-block a.leftlink { color: var(--link); padding: 0; }
body.v2 .side-block h2 { font-size: 15px; font-weight: 600; margin: 4px 0 2px; }
body.v2 .side-block hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
body.v2 .side-block font[color="green"] { color: var(--muted); font-size: 13px; }
/* «Как проходит обмен»: цельный блок на светлой подложке, шаги связаны линией */

/* ---------- Подвал ---------- */

/* Подвал — отдельная белая полоса: ссылки, подписанный список систем, в самом низу логотип слева и копирайт справа */
.site-footer { margin-top: 0; padding: 32px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 13px; }
body.v2 .footer-logo { display: inline-flex; align-items: center; gap: 8px; }
body.v2 .footer-logo:hover { background: none; }
body.v2 .footer-logo img { display: block; width: auto; height: 28px; max-width: none; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
body.v2 .footer-nav a { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; }
body.v2 .footer-nav a:hover { color: var(--link); }
.footer-systems { padding: 20px 0; }
.footer-systems__cap { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--ink); }
body.v2 .footer-systems p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
body.v2 .footer-copy { margin: 0; font-size: 12px; color: var(--muted); text-align: right; }
@media (max-width: 767px) {
	.site-footer { padding-top: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
	.footer-nav { padding-bottom: 14px; }
	.footer-systems { padding: 14px 0; }
	.footer-bottom { padding-top: 12px; }
	.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
	body.v2 .footer-nav a { line-height: 20px; }
	body.v2 .footer-logo img { height: 24px; }
}

/* ---------- Контент страниц ---------- */

body.v2 .content > div[align="center"] { text-align: left; }
body.v2 .breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
body.v2 .dir-lead { font-size: 16px; color: var(--text); margin-bottom: 20px; }
body.v2 .dir-off { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 12px 16px; margin: 12px 0 20px; }
body.v2 .dir-q { margin-bottom: 16px; }
/* Предупреждения главной из БД (разноцветный <font>) — спокойной информационной плашкой */
body.v2 .notice { margin: 0 0 16px; border-collapse: separate; }
body.v2 .notice > tbody > tr > td::before { content: ""; position: absolute; left: 16px; top: 14px; width: 20px; height: 20px; background: var(--link); -webkit-mask: var(--i-info) no-repeat center / contain; mask: var(--i-info) no-repeat center / contain; }
body.v2 .notice > tbody > tr > td { padding: 12px 16px 12px 44px; font-size: 14px; line-height: 1.5; background: var(--notice); position: relative; border: 1px solid var(--notice-line); border-radius: 10px; }
body.v2 .notice font, body.v2 .notice b { color: var(--ink); font-weight: 500; }
body.v2 .notice p { margin: 0 0 4px; }
body.v2 .notice p:last-child { margin-bottom: 0; }
body.v2 .monitor-reviews { color: var(--muted); }
body.v2 .dir-popular { margin-top: 16px; border: 0; border-radius: 16px; padding: 16px 20px 18px; background: var(--card); box-shadow: var(--card-shadow); }
body.v2 .dir-popular h2 { margin: 0 0 12px; font-size: 17px; }
body.v2 .dir-popular .dir-list { margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; }
body.v2 .dir-popular .dir-list li { list-style: none; margin: 0; font-size: 14px; }
body.v2 .dir-popular p { margin: 0; font-size: 14px; font-weight: 500; }
/* Старые таблицы с bgcolor (формы регистрации, кабинета) — светлым фоном вместо серого */
body.v2 .content table[bgcolor], body.v2 .content tr[bgcolor], body.v2 .content td[bgcolor] { background: var(--soft); }
body.v2 .content form table { border-collapse: collapse; }
body.v2 .content form td { padding: 6px 8px; }

/* ---------- Форма обмена (forms/form_main.php; id и name не меняем — на них завязан JS) ---------- */

body.v2 #main-div { background: var(--card); border: 0; border-radius: 16px; padding: 20px 24px 24px; box-shadow: var(--card-shadow); }
body.v2 #main-div > div[align="center"] { text-align: left; }
body.v2 #mainform td { padding: 0; vertical-align: top; }
body.v2 #mainform img[src*="blank.gif"] { display: none; }
body.v2 #main-div .uk, body.v2 #main-div .uk2 { left: 0; }
body.v2 #main-div h4 {
	margin: 0 0 4px; font-family: var(--font); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left;
}
body.v2 #main-div h4 + br { display: none; }
/* Два столбца «Отдаёте / Получаете» (первая строка таблицы в forms/form_main.php пустая, столбцы — во второй) */
body.v2 #mainform > table > tbody > tr:nth-child(2) > td { width: 50%; }
body.v2 #mainform > table > tbody > tr:nth-child(2) > td:first-child { padding-right: 20px; }
body.v2 #mainform > table > tbody > tr:nth-child(2) > td + td { padding-left: 20px; }

/* Настоящие списки прячем (остаются в форме), вместо них — калькулятор jscripts/syslist.js */
html.js body.v2 #mainform select#from, html.js body.v2 #mainform select#to { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); }

/* Пока пара не выбрана — поля заявки скрыты (только если работает jscripts/syslist.js) */
html.js body.v2 #main-div:not(.pair-ready) .my_table, html.js body.v2 #main-div:not(.pair-ready) #fields { display: none !important; }

/* Курс */
body.v2 .my_table { width: 100%; top: 0; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); border-collapse: collapse; }
body.v2 .my_table td { padding: 2px 0; white-space: normal; background: none; }
body.v2 .my_table td[bgcolor] { background: none; font-size: 18px; font-weight: 600; color: var(--ink); padding-top: 6px; }
body.v2 #sys_f, body.v2 #sys_t { display: inline; }
body.v2 #sys4 { width: auto; color: var(--muted); }
body.v2 #main-div.js-calc .my_table { margin: 0; padding: 0; border-top: 0; }

/* Поля: одна колонка, подпись над полем */
body.v2 #fields { max-width: none; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
body.v2 #fields table, body.v2 #fields tbody, body.v2 #fields tr, body.v2 #fields td { display: block; width: 100%; }
body.v2 #fields td { white-space: normal; text-align: left; padding: 0; }
body.v2 #fields > table > tbody > tr { margin-bottom: 12px; }
body.v2 #fields > table > tbody > tr.form-section { margin: 28px 0 12px; }
body.v2 #fields > table > tbody > tr.form-section:first-child { margin-top: 0; }
body.v2 #fields .fg-contacts, body.v2 #fields .fg-tail { margin-top: 16px; }
body.v2 #fields tr.form-section td { font-size: 15px; font-weight: 600; color: var(--ink); }	/* как «Отдаёте» / «Получаете» в калькуляторе */
body.v2 #fields > table > tbody:first-child > tr:first-child { display: none; }	/* строка-распорка с blank.gif */
body.v2 #fields td[align="right"] { font-size: 13px; font-weight: 500; color: var(--text); padding-bottom: 6px; }
body.v2 #fields font[color="red"] b { color: var(--error); font-weight: 600; }
/* Вложенная табличка «поле суммы + название системы + ошибка» — обычной таблицей в строку */
body.v2 #fields td table { display: table; width: auto; }
body.v2 #fields td table tbody { display: table-row-group; width: auto; }
body.v2 #fields td table tr { display: table-row; width: auto; margin: 0; }
body.v2 #fields td table td { display: table-cell; width: auto; vertical-align: middle; padding: 0 10px 0 0; }
body.v2 #mainform input[type="text"], body.v2 #mainform .select-css-country {
	width: 100%; height: 44px; padding: 0 12px; font-family: var(--font); font-size: 15px; color: var(--ink); max-width: 100%;
	border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); box-shadow: none;
}
body.v2 #mainform input#g1, body.v2 #mainform input#t1 { width: 180px; }
body.v2 #mainform input#rt { width: 112px; letter-spacing: .08em; }
/* Капча: поле и картинка одной высоты, одной строкой; ошибка — строкой ниже */
body.v2 #fields td:has(> #rt) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.v2 #fields td:has(> #rt) img[src^="/rt.php"] { display: block; width: auto; height: 44px; border: 1px solid var(--field-border); border-radius: 10px; }
body.v2 #fields td:has(> #rt) .errors { flex-basis: 100%; margin-top: 0; }
body.v2 #mainform input[type="text"]:focus, body.v2 #mainform .select-css-country:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); outline: none; }
body.v2 #mainform input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); vertical-align: middle; }
body.v2 #mainform .errors, body.v2 #mainform .warnings { color: var(--error); font-size: 13px; }
body.v2 #mainform .errors:not(:empty) { margin-top: 4px; line-height: 18px; }
body.v2 #mainform .is-invalid { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
body.v2 #warning1, body.v2 #warning2 { margin: 16px 0 0; padding: 10px 16px; background: var(--warn-soft); border-left: 3px solid var(--warn); }
body.v2 #warning2 { margin-top: 0; }

body.v2 #btn, body.v2 #btn1, body.v2 #btn2, body.v2 input[type="submit"], body.v2 input[type="button"] {
	width: auto; min-width: 0; height: 48px; padding: 0 32px; font-family: var(--font); font-size: 16px; font-weight: 600; color: #fff; cursor: pointer;
	border: 0; border-radius: var(--radius); background: var(--accent); text-shadow: none; box-shadow: none; filter: none; transform: none;
}
body.v2 #btn:hover, body.v2 #btn1:hover, body.v2 #btn2:hover, body.v2 input[type="submit"]:hover, body.v2 input[type="button"]:hover { background: var(--accent-hover); }
body.v2 #btn:disabled { background: var(--line-strong); cursor: default; }

/* ---------- Поля на остальных страницах: вход, регистрация, кабинет, отзывы ---------- */

body.v2 input[type="text"], body.v2 input[type="password"], body.v2 input[type="email"], body.v2 textarea, body.v2 select:not([size]) {
	height: 44px; padding: 0 12px; margin: 0; font-family: var(--font); font-size: 15px; color: var(--ink); max-width: 100%;
	border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); box-shadow: none;
}
body.v2 textarea { height: auto; min-height: 120px; padding: 10px 12px; width: 100%; }
body.v2 select:not([size]) { display: inline-block; width: auto; margin-left: 0; }
body.v2 input[type="text"]:focus, body.v2 input[type="password"]:focus, body.v2 textarea:focus, body.v2 select:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); outline: none; }
body.v2 .side-block input[type="text"], body.v2 .side-block input[type="password"] { width: 100%; }
body.v2 .side-block input[name="rtl"] { width: 110px; }
body.v2 .side-block input[type="submit"], body.v2 .side-block input[type="button"] { height: 40px; width: 100%; padding: 0 16px; font-size: 15px; background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); }
body.v2 .side-block input[type="submit"]:hover, body.v2 .side-block input[type="button"]:hover { background: var(--soft); }

/* ---------- «Мы на мониторингах»: ровная сетка плиток ---------- */

.monitors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
body.v2 .monitors a { display: block; aspect-ratio: 88 / 31; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }	/* баннер 88×31 заполняет всю плитку */
body.v2 .monitors a:hover { border-color: var(--line-strong); background: var(--soft); }
body.v2 .monitors img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0; }
body.v2 .monitors img[src*="xrates"] { object-fit: contain; padding: 4px; }	/* квадратный логотип — целиком, без обрезки */

/* ---------- Контакты (contacts.php): колонка и страница «Контакты» ---------- */

body.v2 td.contacts-cell { padding: 0; }
body.v2 .contacts-note { font-size: 13px; line-height: 1.45; color: var(--muted); margin: 0 0 12px; }
/* Контакты: каждая строка — ссылка целиком; Telegram оператора — главный способ связи */
.contact-list { margin: 0; padding: 0; display: grid; gap: 4px; }
body.v2 .contact-list li { list-style: none; margin: 0; }
body.v2 .cl-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 16px; column-gap: 12px; align-items: center; margin: 0 -8px; padding: 8px; border-radius: 12px; color: var(--ink); text-decoration: none; }
body.v2 .cl-row:hover { background: var(--soft); color: var(--ink); text-decoration: none; }
body.v2 .cl-row--main { background: var(--accent-soft); }
body.v2 .cl-row--main:hover { background: var(--hover-strong); }
.cl-row::after { content: ""; width: 16px; height: 16px; background: var(--muted); opacity: .75; -webkit-mask: var(--i-chevron-right) no-repeat center / contain; mask: var(--i-chevron-right) no-repeat center / contain; }
.cl-ic { position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); }
/* Значок — маской: цвет берётся из темы (--link), рисунок — набор Tabler, линия 2px со скруглением */
.cl-ic::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto; width: 20px; height: 20px; background: var(--link); -webkit-mask: var(--ic) no-repeat center / contain; mask: var(--ic) no-repeat center / contain; }
.contacts--page .cl-ic::before { width: 22px; height: 22px; }
.cl-row--main .cl-ic { background-color: var(--card); }
.cl-text { display: grid; min-width: 0; }
.cl-label { font-size: 12px; line-height: 1.3; color: var(--muted); }
.cl-value { font-size: 14px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.cl-telegram { --ic: var(--i-telegram); }
.cl-mail { --ic: var(--i-mail); }
.cl-news { --ic: var(--i-news); }
/* Страница «Контакты»: список пошире */
body.v2 .content .table_contacts { width: 100%; max-width: 420px; margin-top: 16px; }

/* ---------- Вход (forms/form_login.php) ---------- */

/* В колонке — свёрнутой строкой «Личный кабинет»; по клику раскрывается компактная форма */
.login-box { border: 0; border-radius: 16px; background: var(--card); box-shadow: var(--card-shadow); }
.side-panel.login-box { padding: 0; }
.login-box summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; border-radius: 16px; }	/* отступ и скругление — как у карточки */
.login-box summary::-webkit-details-marker { display: none; }
.login-box summary:hover { background: var(--soft); }
.login-box[open] summary { border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; }
.lb-icon { position: relative; display: inline-block; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); }
.lb-icon::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto; width: 20px; height: 20px; background: var(--link); -webkit-mask: var(--i-user) no-repeat center / contain; mask: var(--i-user) no-repeat center / contain; }
.lb-icon--initials::before { content: none; }
.lb-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.lb-text b { font-size: 15px; font-weight: 600; color: var(--ink); }
.lb-text small { font-size: 12px; color: var(--muted); }
.lb-action { margin-left: auto; flex: 0 0 20px; width: 20px; height: 20px; transition: transform .15s; background: var(--muted); -webkit-mask: var(--i-chevron-down) no-repeat center / 18px; mask: var(--i-chevron-down) no-repeat center / 18px; }
.login-box[open] .lb-action { transform: rotate(180deg); }
.login-box .login-form { padding: 16px; }
.login-box .lf-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }	/* подпись остаётся для экранных чтецов, видна подсказка в поле */

.login-form { display: grid; gap: 10px; }
.lf-field { display: block; }
.lf-label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
body.v2 .login-form input[type="text"], body.v2 .login-form input[type="password"] { width: 100%; height: 40px; }
.lf-captcha { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
body.v2 .lf-captcha img { display: block; width: auto; max-width: none; height: 40px; border: 1px solid var(--field-border); border-radius: 10px; }	/* body.v2 img ставит height: auto — картинка была ниже поля */
body.v2 .lf-submit { height: 40px; width: 100%; border: 0; border-radius: var(--radius); background: var(--accent); color: #fff; font-family: var(--font); font-size: 15px; font-weight: 600; cursor: pointer; }
body.v2 .lf-submit:hover { background: var(--accent-hover); }
.lf-links { font-size: 13px; color: var(--muted); text-align: center; }

/* Страница входа ?a=7: обычная форма с подписями над полями */
body.v2 .content .login-form { max-width: 380px; gap: 14px; margin-top: 8px; }
body.v2 .content .lf-submit { height: 44px; }
body.v2 .content .lf-links { text-align: left; }
body.v2 .content .login-form input::placeholder { color: transparent; }	/* подписи над полями уже есть */

/* ---------- Подсказки (jquery.tooltip по атрибуту title) ---------- */

body.v2 #tooltip { width: auto; max-width: 260px; padding: 6px 10px; border: 0; border-radius: 6px; background: var(--ink); color: #fff; box-shadow: 0 4px 12px rgba(15, 23, 42, .18); }
body.v2 #tooltip h3, body.v2 #tooltip div { font-family: var(--font); font-size: 13px; line-height: 1.4; }

/* ---------- Планшет ---------- */

/* Шапке в одну строку нужно ~1140px: уже этого меню уходит второй строкой, иначе кнопка вылезает за край */
@media (max-width: 1149px) {
	.header-inner { flex-wrap: wrap; gap: 0 24px; }
	.site-nav { order: 3; width: calc(100% + 48px); margin: 0 -24px; padding: 0 24px; border-top: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }	/* только вбок: при overflow-x: auto браузер включает и вертикальную прокрутку */
	/* Меню прокручивается пальцем без полосы прокрутки; справа мягкое затухание — видно, что пункты есть дальше */
	.site-nav { scrollbar-width: none; }
	.site-nav::-webkit-scrollbar { display: none; }
	.site-nav:not(.is-end) {	/* затухание справа — только у пунктов; верхняя линия (1px) остаётся целой */
		-webkit-mask: linear-gradient(#000, #000) top / 100% 1px no-repeat, linear-gradient(to right, #000 calc(100% - 40px), transparent);
		mask: linear-gradient(#000, #000) top / 100% 1px no-repeat, linear-gradient(to right, #000 calc(100% - 40px), transparent); }
	body.v2 .site-nav a { padding: 12px 0 10px; }
	.site-logo, .header-contact { padding: 12px 0; }
}

@media (max-width: 1023px) {
	.layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-bottom: 24px; }
	/* Планшет: колонка в два столбца «кирпичной кладкой» — карточки своей высоты, без пустот под короткими */
	/* Планшет: колонка в два столбца, карточки парами — верх соседних совпадает, высота своя (не тянем) */
	.sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
	.sidebar > .login-box, .sidebar > .cabinet { grid-column: 1 / -1; }	/* кабинет — строкой на всю ширину */
	body.v2 .content td { white-space: normal; }
	body.v2 .content input[size] { width: 100%; }
	body.v2 .content input[type="checkbox"], body.v2 .content input[type="radio"] { width: auto; }
}

/* ---------- Телефон ---------- */

@media (max-width: 767px) {
	body.v2, body.v2 table, body.v2 input, body.v2 select, body.v2 textarea, body.v2 button { font-size: 16px; }
	.wrap { padding-left: 16px; padding-right: 16px; }	/* только бока: сокращённая запись обнуляла нижний отступ .layout */
	.site-nav { width: calc(100% + 32px); margin: 0 -16px; padding: 0 16px; }
	body.v2 .site-logo img { height: 28px; }
	.logo-text { font-size: 19px; }
	body.v2 .header-phone { display: none; }
	.header-inner { gap: 0 12px; }
	body.v2 .btn-primary { padding: 0 14px; }
	.layout { padding-top: 16px; gap: 24px; }
	body.v2 #main-div { padding: 16px; border-radius: 10px; }
	body.v2 .form-note { margin: -16px -16px 16px; padding: 12px 16px; }
	.sidebar { grid-template-columns: minmax(0, 1fr); }
	body.v2 h1 { font-size: 24px; }
	body.v2 h2, body.v2 h2.dir, body.v2 h2.news { font-size: 19px; }

	/* Форма: «Отдаёте» и «Получаете» друг под другом */
	body.v2 #mainform > table, body.v2 #mainform > table > tbody, body.v2 #mainform > table > tbody > tr, body.v2 #mainform > table > tbody > tr > td { display: block; width: 100%; }
	body.v2 #mainform > table > tbody > tr:nth-child(2) > td:first-child { padding-right: 0; }
	body.v2 #mainform > table > tbody > tr:nth-child(2) > td + td { padding-left: 0; margin-top: 24px; }
	body.v2 #mainform input#g1, body.v2 #mainform input#t1 { width: 150px; }
	body.v2 #main-div .uk2 { margin-top: 28px; }
	body.v2 .my_table, body.v2 .my_table tbody, body.v2 .my_table tr, body.v2 .my_table td { display: block; width: 100%; }
	body.v2 #btn { width: 100%; }

	/* Формы в контенте (регистрация, восстановление пароля, данные кабинета, отзыв): в одну колонку */
	body.v2 .content form:not(#mainform) table, body.v2 .content form:not(#mainform) tbody, body.v2 .content form:not(#mainform) tr, body.v2 .content form:not(#mainform) td { display: block; width: 100%; }
	body.v2 .content form:not(#mainform) td { padding: 4px 0; text-align: left; }
	body.v2 .content input[type="submit"], body.v2 .content input[type="button"] { width: 100%; }
}

/* ---------- Калькулятор обмена (jscripts/syslist.js) ---------- */

body.v2 #main-div.js-calc .calc-lists, body.v2 #main-div.js-calc .calc-moved, body.v2 #main-div.js-calc #exm { display: none; }
.calc { display: grid; grid-template-columns: minmax(0, 1fr); text-align: left; margin-bottom: 8px; }
.calc__side { position: relative; min-width: 0; }
body.v2 .calc__cap { display: block; margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.calc__amount { display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 8px 0 16px; border: 1px solid var(--field-border); border-radius: 16px; background: var(--card); transition: border-color .15s, box-shadow .15s; }
.calc__amount:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
body.v2 #mainform #calc input.calc__input, body.v2 #mainform #calc input.calc__input:focus { display: block; min-width: 0; width: 100%; height: 34px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: 0; font-size: 26px; font-weight: 600; letter-spacing: -.4px; color: var(--ink); }
body.v2 #mainform #calc input.calc__input.is-invalid { color: var(--error); }
.calc__amount:has(.is-invalid) { border-color: var(--error); }
.calc__field { display: flex; flex-direction: column; justify-content: center; flex: 1 1 auto; min-width: 0; }
.calc__hint { font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calc__hint:empty { display: none; }
body.v2 #mainform .calc__field .errors { margin: 0; font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.v2 #mainform .calc__field .errors:empty { display: none; }
.calc__field:has(.errors:not(:empty)) .calc__hint { display: none; }
body.v2 #mainform #calc input.calc__input:disabled { color: var(--muted); cursor: default; -webkit-text-fill-color: var(--muted); }
.calc__cur { font-size: 15px; color: var(--muted); white-space: nowrap; }
body.v2 .calc__sel { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--chip); font-family: var(--font); font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; white-space: nowrap; }
.calc__sel::after { content: ""; flex: 0 0 16px; width: 16px; height: 16px; background: var(--muted); -webkit-mask: var(--i-chevron-down) no-repeat center / contain; mask: var(--i-chevron-down) no-repeat center / contain; }
body.v2 .calc__sel:hover { background: var(--hover); }
/* Система выбрана — кнопка синяя, как выбранная быстрая кнопка */
body.v2 .has-sys .calc__sel { background: var(--accent); color: #fff; }
body.v2 .has-sys .calc__sel:hover { background: var(--accent-hover); }
.has-sys .calc__sel::after { background: #fff; }
.has-sys .calc__sel .calc__ic { background: #fff; padding: 2px; }	/* тёмные логотипы (PayPal) не теряются на синем */
.calc__ic { display: inline-block; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; object-fit: contain; }
.calc__ic--letter { display: inline-grid; place-items: center; background: var(--line); font-size: 12px; font-weight: 600; color: var(--text); }
.calc__picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
body.v2 .calc__pick { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 6px; border: 1px solid transparent; border-radius: 12px; background: var(--chip); font-family: var(--font); font-size: 14px; color: var(--ink); cursor: pointer; }
body.v2 .calc__pick:hover { background: var(--hover); }
body.v2 .calc__pick.is-sel, body.v2 .calc__pick.is-sel:hover { background: var(--accent); color: #fff; }
body.v2 .calc__pick.is-off, body.v2 .calc__pick.is-off:hover { background: var(--chip); color: var(--muted); opacity: .5; cursor: default; }
.calc__pick.is-off .calc__ic { filter: grayscale(1); opacity: .5; }
body.v2 .calc__pick--more { padding: 0 12px; background: var(--card); border-color: var(--field-border); color: var(--link); font-weight: 500; }
.calc__mid { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 10px 0; font-size: 14px; color: var(--muted); }
.calc__mid b { font-size: 16px; color: var(--ink); }
.calc__back { margin-left: 12px; color: var(--muted); }
body.v2 .calc__swap { flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--chip); font-size: 16px; color: var(--muted); cursor: pointer; }
body.v2 .calc__swap:hover:not([disabled]) { border-color: var(--accent); color: var(--link); }
body.v2 .calc__swap[disabled] { opacity: .4; cursor: default; }
.calc__placeholder { color: var(--muted); font-weight: 400; }
body.v2 .calc__pick--more[aria-disabled="true"] { color: var(--muted); cursor: default; }
.calc__noway { color: var(--warn-ink); }
body.v2 .calc__noway a { font-weight: 600; }
.calc__pop { position: absolute; z-index: 20; top: 92px; right: 0; width: 340px; max-width: 100%; max-height: 420px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 12px 32px rgba(15, 23, 42, .16); }
body.v2 .calc__search { width: 100%; height: 38px; margin-bottom: 6px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 14px; }
body.v2 .calc__row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: none; font-family: var(--font); font-size: 15px; color: var(--ink); text-align: left; cursor: pointer; }
body.v2 .calc__row:hover { background: var(--soft); }
body.v2 .calc__row.is-sel { background: var(--accent-soft); color: var(--link); }
.calc__row small, .calc__row .calc__badge { margin-left: auto; }
.calc__row small { font-size: 13px; color: var(--muted); }
body.v2 .calc__row.is-off { color: var(--muted); cursor: default; }
body.v2 .calc__row.is-off:hover { background: none; }
.calc__row.is-off .calc__ic { filter: grayscale(1); opacity: .5; }
.calc__badge { padding: 1px 8px; border-radius: 999px; background: var(--warn-chip); font-size: 11px; font-weight: 600; color: var(--warn-ink); }
.calc__group { padding: 8px 8px 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn-ink); }
.calc__nothing { padding: 12px 8px; font-size: 14px; color: var(--muted); }
@media (max-width: 767px) {
	.calc__amount { height: 60px; }
	body.v2 #mainform #calc input.calc__input { font-size: 22px; }
	body.v2 .calc__sel { padding: 0 8px; font-size: 14px; }
	.calc__pop { left: 0; width: auto; }
}

/* ---------- Выбор с поиском: страна, штат (jscripts/select-search.js) ---------- */

body.v2 #mainform select.sel-search__native { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); }
.sel-search { position: relative; }
body.v2 .sel-search__btn { display: flex; align-items: center; width: 100%; height: 44px; padding: 0 36px 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--card); position: relative; font-family: var(--font); font-size: 15px; color: var(--ink); text-align: left; cursor: pointer; }
body.v2 .sel-search__btn::after { content: ""; position: absolute; top: 0; bottom: 0; right: 12px; margin: auto 0; width: 16px; height: 16px; background: var(--muted); -webkit-mask: var(--i-chevron-down) no-repeat center / contain; mask: var(--i-chevron-down) no-repeat center / contain; }
body.v2 .sel-search__btn:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
body.v2 #mainform select.is-invalid + .sel-search .sel-search__btn { border-color: var(--error); }
.sel-search__placeholder { color: var(--muted); }
.sel-search__pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; max-height: 360px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 12px 32px rgba(15, 23, 42, .16); }
body.v2 #mainform .sel-search__input { width: 100%; height: 38px; margin-bottom: 6px; padding: 0 10px; font-size: 14px; }
body.v2 .sel-search__row { display: block; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: none; font-family: var(--font); font-size: 15px; color: var(--ink); text-align: left; cursor: pointer; }
body.v2 .sel-search__row:hover { background: var(--soft); }
body.v2 .sel-search__row.is-sel { background: var(--accent-soft); color: var(--link); }
.sel-search__nothing { padding: 12px 8px; font-size: 14px; color: var(--muted); }

/* Согласие с правилами: чекбокс слева от подписи, подпись нажимается */
body.v2 #fields tr.agree-row { display: flex; align-items: center; gap: 10px; }
body.v2 #fields tr.agree-row td { width: auto; padding: 0; }
body.v2 #fields tr.agree-row td:last-child { order: -1; }
body.v2 #fields tr.agree-row label { flex: 0 0 auto; white-space: nowrap; font-size: 14px; color: var(--text); cursor: pointer; }
body.v2 #fields tr.agree-row td:first-child { display: flex; align-items: center; gap: 12px; }
body.v2 #mainform #fields tr.agree-row .errors { min-height: 0; margin: 0; }	/* ошибка справа от подписи, строка не растёт */

/* Десктоп: отправитель и получатель — две колонки, поля стоят построчно друг против друга
   (строка растёт по более высокому полю — например, с предупреждением под картой — и обе колонки остаются ровными) */
@media (min-width: 768px) {
	body.v2 #fields > table { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; grid-auto-flow: row dense; align-items: start; }
	body.v2 #fields > table > tbody { grid-column: 1 / -1; }
	body.v2 #fields > table > tbody.fg-give, body.v2 #fields > table > tbody.fg-get { display: contents; }
	body.v2 #fields > table > tbody.fg-give > tr { grid-column: 1; }
	body.v2 #fields > table > tbody.fg-get > tr { grid-column: 2; }
	body.v2 #fields > table > tbody.fg-contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; }
	body.v2 #fields .fg-contacts > tr.form-section { grid-column: 1 / -1; }
}
body.v2 #fields tr.form-note-required td { font-size: 13px; color: var(--muted); }
body.v2 #fields .field-hint { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* У каждого поля заявки — одна строка под подсказку или ошибку, зарезервированная заранее: ничего не прыгает */
body.v2 #fields .errors { min-height: 18px; margin-top: 4px; font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.v2 #fields .errors:not(:empty) + .field-warn { display: none; }
body.v2 #mainform #fields .errors:empty:has(+ .field-warn) { display: none; }	/* предупреждение и ошибка — одна и та же строка под полем */
body.v2 #fields .field-warn { margin-top: 4px; }
body.v2 #fields .field-hint { margin-top: 4px; line-height: 18px; }
body.v2 #fields #err_uicq:empty { display: none; }
body.v2 #fields #err_uskype:empty { display: none; }

/* Поиск в выпадающих списках закреплён сверху: список прокручивается под ним */
body.v2 .calc__search, body.v2 #mainform .sel-search__input, body.v2 .calc__search:focus, body.v2 #mainform .sel-search__input:focus {
	position: sticky; top: 0; z-index: 1; -webkit-appearance: none; appearance: none; outline: 0;
	border: 1px solid var(--field-border); border-radius: 10px; background: var(--card);
	box-shadow: 0 0 0 8px var(--card);	/* белое поле вокруг закрывает строки, прокрученные под поиск; рамка остаётся одна */
}
body.v2 .calc__search:focus, body.v2 #mainform .sel-search__input:focus { border-color: var(--accent); }

/* Низ формы — отдельный блок под линией: капча и согласие слева, кнопка справа, пояснение про «*» под кнопкой */
body.v2 #fields .fg-tail { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (min-width: 768px) {
	body.v2 #fields > table > tbody.fg-tail { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; row-gap: 14px; align-items: center; }
	body.v2 #fields .fg-tail > tr { grid-column: 1; margin: 0; }
	body.v2 #fields .fg-tail > tr.form-submit { grid-column: 2; grid-row: 1 / span 2; }
	body.v2 #fields .fg-tail > tr.form-note-required { grid-column: 2; grid-row: 3; text-align: right; }
}

/* Ошибка поля: иконка + короткий текст в одну строку, у самого поля — красная рамка */
body.v2 #mainform .errors:not(:empty) { position: relative; padding-left: 22px; color: var(--error); }
body.v2 #mainform .errors:not(:empty)::before { content: ""; position: absolute; left: 0; top: 1px; width: 16px; height: 16px; background: var(--error); -webkit-mask: var(--i-error) no-repeat center / contain; mask: var(--i-error) no-repeat center / contain; }
body.v2 #mainform input[type="text"].is-invalid, body.v2 #mainform input[type="text"].is-invalid:focus { border-color: var(--error); box-shadow: 0 0 0 3px var(--error-soft); }
body.v2 #mainform select.is-invalid + .sel-search .sel-search__btn { box-shadow: 0 0 0 3px var(--error-soft); }
body.v2 #mainform input[type="checkbox"].is-invalid { box-shadow: none; outline: 2px solid var(--error); outline-offset: 2px; }

/* «Как проходит обмен»: шаги с номерами, соединённые линией — на странице направления и в боковой колонке */
body.v2 .dir-card { margin-top: 16px; padding: 20px 24px; border-radius: 16px; background: var(--card); box-shadow: var(--card-shadow); }
body.v2 .dir-card h2.dir { margin-top: 0; }
body.v2 ol.steps { display: grid; gap: 16px; margin: 14px 0 0; padding: 0; }
body.v2 ol.steps li { list-style: none; margin: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.steps__n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); font-size: 13px; font-weight: 700; color: #fff; }
.steps b { display: block; font-size: 15px; line-height: 28px; font-weight: 600; color: var(--ink); }
body.v2 .steps p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text); }
body.v2 ol.steps li { position: relative; }
body.v2 ol.steps li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: -16px; width: 2px; background: var(--step-line); }	/* линия до следующего кружка (gap 16px) */
.steps__n { position: relative; z-index: 1; }

/* Страница направления: вопросы и ответы — раскрытым списком в карточке */
body.v2 .dir-faq { margin: 0; }
.dir-faq__item { padding: 14px 0; border-top: 1px solid var(--line); }
.dir-faq__item:first-child { padding-top: 4px; border-top: 0; }
body.v2 .dir-faq dt { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink); }
body.v2 .dir-faq dd { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--text); }
body.v2 .dir-card__more { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* Другие направления — группы ссылок-плашек */
.dir-other + .dir-other { margin-top: 16px; }
.dir-other__cap { margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.dir-other__links { display: flex; flex-wrap: wrap; gap: 6px; }
body.v2 .dir-other__links a { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 12px; background: var(--chip); font-size: 14px; color: var(--ink); text-decoration: none; }
body.v2 .dir-other__links a:hover { background: var(--hover); color: var(--link); text-decoration: none; }

/* Телефон: плотнее внутри логических блоков формы, крупнее — между блоками */
@media (max-width: 767px) {
	body.v2 #fields > table > tbody > tr { margin-bottom: 6px; }
	body.v2 #mainform #fields .errors, body.v2 #mainform #fields .errors:not(:empty) { min-height: 16px; margin-top: 2px; line-height: 16px; font-size: 12px; }
	body.v2 #fields .field-warn, body.v2 #fields .field-hint { margin-top: 2px; line-height: 16px; font-size: 12px; }
	body.v2 #fields > table > tbody > tr.form-section { margin: 22px 0 8px; }
	body.v2 #fields > table > tbody > tr.form-section:first-child { margin-top: 0; }
	body.v2 #fields td[align="right"] { padding-bottom: 4px; }
	body.v2 #fields .fg-tail { margin-top: 12px; padding-top: 16px; }
	body.v2 #fields .fg-get, body.v2 #fields .fg-contacts { margin-top: 18px; }	/* заголовок группы — первая строка своего блока, отступ у самого блока */
	body.v2 #fields .fg-tail > tr { margin-bottom: 10px; }
}
/* Боковая колонка: те же шаги компактнее */
body.v2 ol.steps--compact { gap: 12px; margin-top: 10px; }
body.v2 ol.steps--compact li { grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
body.v2 ol.steps--compact li:not(:last-child)::before { left: 11px; top: 24px; bottom: -12px; }
.steps--compact .steps__n { width: 24px; height: 24px; font-size: 12px; }
.steps--compact b { font-size: 14px; line-height: 24px; }
body.v2 .steps--compact p { font-size: 13px; line-height: 1.35; color: var(--muted); }

/* Узкий телефон: логотип и кнопка должны уместиться в одну строку шапки */
@media (max-width: 440px) {
	.header-contact .btn-long { display: none; }
}

/* ---------- Единая шкала: заголовки карточек и отступы ---------- */
/* Заголовок любой карточки (колонка, форма, страница направления, популярные направления) — один размер и один отступ до содержимого */
body.v2 .side-title, body.v2 .dir-card h2.dir, body.v2 .dir-popular h2 { margin: 0 0 12px; font-size: 18px; line-height: 1.3; font-weight: 600; letter-spacing: -.2px; color: var(--ink); text-transform: none; }
body.v2 ol.steps, body.v2 ol.steps--compact { margin-top: 0; }
body.v2 .dir-popular .dir-list { margin-bottom: 12px; }

@media (max-width: 767px) {
	/* Карточки: одинаковые внутренние отступы */
	body.v2 #main-div, body.v2 .side-panel:not(.login-box), body.v2 .dir-card, body.v2 .dir-popular { padding: 16px; }	/* у «Личного кабинета» свои отступы у строки и формы */
	/* Текст в карточках колонки на телефоне — не мельче 14px: рядом основной текст 16px */
	body.v2 .side-panel p, body.v2 .contacts-note, body.v2 .reserves li, body.v2 .news-list li, body.v2 .steps--compact p { font-size: 14px; }
	body.v2 .news-list time, body.v2 .cl-label { font-size: 13px; }
	/* Заголовки разделов в тексте страниц */
	body.v2 h2, body.v2 h2.dir, body.v2 h2.news { font-size: 18px; margin: 24px 0 10px; }
	body.v2 .side-title, body.v2 .dir-card h2.dir, body.v2 .dir-popular h2 { margin: 0 0 12px; }	/* заголовок карточки — не заголовок раздела текста */
	/* Между карточками везде 16px: и внутри колонки, и между основной колонкой и боковой */
	body.v2 .layout { gap: 16px; }
	body.v2 .facts { margin-bottom: 16px; }
}
/* Под заголовком «Контакты» — подзаголовок (часы работы): он относится к заголовку, поэтому ближе */
body.v2 .side-title:has(+ .contacts) { margin-bottom: 4px; }

/* Калькулятор на узком телефоне: короткая подпись резерва; валюта уже видна в названии системы — подпись валюты убираем */
.calc__hint-short { display: none; }
@media (max-width: 420px) {
	.calc__hint-full { display: none; }
	.calc__hint-short { display: inline; }
	.calc__cur { display: none; }
	/* Кнопка системы не шире половины поля: иначе сумму некуда вписать; длинное название обрезается многоточием */
	body.v2 .calc__sel { max-width: 52%; min-width: 0; }
	.calc__sel > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Страница направления: шапка (крошки, заголовок, курс и сумма) — белой карточкой, как остальные блоки страницы */
body.v2 .dir-hero { margin-bottom: 16px; padding: 20px 24px; border-radius: 16px; background: var(--card); box-shadow: var(--card-shadow); }
body.v2 .dir-hero .breadcrumbs { margin: 0 0 8px; }
body.v2 .dir-hero h1 { margin: 0 0 8px; }
body.v2 .dir-hero .dir-lead { margin: 0; color: var(--text); }
body.v2 .dir-hero .dir-off { margin: 12px 0 0; }
@media (max-width: 767px) {
	body.v2 .dir-hero { padding: 16px; }
}

/* Каталог направлений: карточка на каждую систему «Отдаёте», направления — строками-ссылками с курсом */
body.v2 ul.dir-rows { margin: 0 -8px; padding: 0; }
body.v2 .dir-rows li { list-style: none; margin: 0; }
body.v2 .dir-rows li + li { border-top: 1px solid var(--line); }
body.v2 .dir-rows a { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 10px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; }
body.v2 .dir-rows a:hover { background: var(--soft); color: var(--link); text-decoration: none; }
.dir-rows__name { font-size: 15px; font-weight: 500; }
.dir-rows__rate { flex: 0 0 auto; font-size: 14px; color: var(--muted); white-space: nowrap; }
@media (max-width: 767px) {
	body.v2 .dir-rows a { flex-direction: column; align-items: flex-start; }	/* курс под названием */
}

/* Правила, вопросы, отзывы: те же карточки, что на страницах направлений */
body.v2 .page-text h4 { margin: 24px 0 8px; font-family: var(--font); font-size: 16px; line-height: 1.35; font-weight: 600; color: var(--ink); }
body.v2 .page-text h4:first-child { margin-top: 0; }
body.v2 .page-text p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; color: var(--text); text-align: left; }
body.v2 .page-text b { font-weight: 600; color: var(--ink); }
body.v2 .page-text .rule-n { color: var(--link); }
body.v2 .dir-hero .monitor-reviews { margin: 8px 0 0; font-size: 14px; }
.reviews { display: grid; }
.review { padding: 14px 0; border-top: 1px solid var(--line); }
.review:first-child { padding-top: 0; border-top: 0; }
.review time { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
body.v2 .review p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text); }
body.v2 .review-form__note { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--muted); }
body.v2 .review-form form { display: grid; gap: 6px; max-width: 560px; }
body.v2 .review-form__label { margin-top: 8px; font-size: 14px; font-weight: 500; color: var(--text); }
body.v2 .review-form textarea { width: 100%; min-height: 120px; padding: 12px 14px; border: 1px solid var(--field-border); border-radius: 12px; font-family: var(--font); font-size: 15px; line-height: 1.5; resize: vertical; }
body.v2 .review-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: 0; }
.review-form__captcha { display: flex; align-items: center; gap: 8px; }
body.v2 .review-form__captcha input { width: 112px; height: 44px; letter-spacing: .08em; }
body.v2 .review-form__captcha img { display: block; width: auto; height: 44px; max-width: none; border: 1px solid var(--field-border); border-radius: 10px; }
body.v2 .review-form .btn-primary { justify-self: start; height: 44px; margin-top: 12px; padding: 0 20px; border: 0; font-family: var(--font); font-size: 15px; cursor: pointer; }
/* Страница «Контакты»: способы связи — плитками в ряд; внутри плитки иконка сверху, ниже подпись и значение во всю ширину */
body.v2 .contacts--page { margin-top: 20px; }
body.v2 .contacts--page .contact-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
body.v2 .contacts--page .contact-list li { display: flex; }
body.v2 .contacts--page .cl-row { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
body.v2 .contacts--page .cl-row--main { border-color: transparent; }
body.v2 .contacts--page .cl-row::after { position: absolute; top: 16px; right: 16px; }
.contacts--page .cl-ic { flex: 0 0 auto; width: 40px; height: 40px; }
.contacts--page .cl-value { font-size: 16px; overflow-wrap: break-word; }
@media (max-width: 900px) {
	body.v2 .contacts--page .contact-list { grid-template-columns: minmax(0, 1fr); }
	body.v2 .contacts--page .cl-row { flex-direction: row; align-items: center; }	/* в столбик — снова строкой: иконка слева */
	body.v2 .contacts--page .cl-row::after { position: static; margin-left: auto; }
}
body.v2 .content > :last-child { margin-bottom: 0; }	/* до колонки / подвала — только общий отступ раскладки */

/* Архив новостей: каждая новость — карточка, как отзывы и направления */
body.v2 .news-item summary { position: relative; display: block; padding-right: 32px; list-style: none; cursor: pointer; }
body.v2 .news-item summary::-webkit-details-marker { display: none; }
body.v2 .news-item summary::after { content: ""; position: absolute; top: 50%; right: 4px; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); }
body.v2 .news-item[open] summary::after { margin-top: -2px; transform: rotate(-135deg); }
body.v2 .news-item summary:hover h2.dir { color: var(--link); }
body.v2 .news-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
body.v2 .news-item time { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
body.v2 .news-item h2.dir { margin: 0; }
body.v2 .news-item h2.dir::first-letter { text-transform: uppercase; }
body.v2 .news-item__text { margin-top: 12px; }
body.v2 .news-item__text p { margin: 0 0 10px; font-size: 15px; line-height: 1.6; color: var(--text); overflow-wrap: break-word; }
body.v2 .news-item__text p:last-child { margin-bottom: 0; }
body.v2 .news-item { scroll-margin-top: 16px; }

/* Регистрация, восстановление пароля, вход (?a=3, 4, 7): шапка и форма в одной карточке, под каждым полем строка подсказки или ошибки */
body.v2 .auth-page .login-form { max-width: 440px; gap: 12px; margin-top: 24px; }
body.v2 .auth-page .auth-form--register { max-width: 560px; }
.auth-form__pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; align-items: start; }
@media (max-width: 599px) { .auth-form__pair { grid-template-columns: minmax(0, 1fr); } }
.lf-optional { font-weight: 400; color: var(--muted); }
body.v2 .lf-msg { display: block; margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--muted); }
body.v2 .lf-msg:empty { display: none; }	/* пустая строка места не занимает: без подсказки и ошибки поля идут плотно */
body.v2 .lf-msg.is-error { color: var(--error); }
body.v2 .auth-form > .lf-msg { margin-top: -8px; }	/* строка под числом с картинки и под согласием */
body.v2 .login-form input.is-invalid { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.lf-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
body.v2 .lf-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
body.v2 .lf-check input.is-invalid { outline: 2px solid var(--error); outline-offset: 1px; }
body.v2 .lf-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* ---------- Личный кабинет (?a=6, 8): вкладки разделов в шапке, содержимое в той же карточке ---------- */
.cab-tabs { display: flex; gap: 24px; margin: 16px -24px 0; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.cab-tabs::-webkit-scrollbar { display: none; }
body.v2 .cab-tabs a { flex: 0 0 auto; padding: 10px 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font-weight: 500; white-space: nowrap; }
body.v2 .cab-tabs a:hover { color: var(--ink); text-decoration: none; }
body.v2 .cab-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
body.v2 .cab-tabs .cab-tabs__exit { margin-left: auto; }
.cab-body { margin-top: 24px; }
body.v2 .cab-flash { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: 14px; }
@media (max-width: 767px) { .cab-tabs { margin: 12px -16px 0; padding: 0 16px; gap: 20px; } .cab-body { margin-top: 16px; } }
.cab-tabs:not(.is-end) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }	/* не влезли — затухание справа, как у меню */

/* Мои заявки */
.orders-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
body.v2 .orders-head p { margin: 0; font-size: 14px; color: var(--muted); }
.orders { display: grid; gap: 12px; margin: 0; padding: 0; }
body.v2 .order { list-style: none; margin: 0; padding: 16px; border-radius: 12px; background: var(--soft); }
.order__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.v2 .order__head b { color: var(--ink); font-weight: 600; }
.order__status { flex: 0 0 auto; padding: 2px 10px; border-radius: 999px; background: var(--chip); color: var(--text); font-size: 13px; font-weight: 600; }
.order--wait .order__status { background: var(--warn-soft); color: var(--warn-ink); }
.order--work .order__status { background: var(--accent-soft); color: var(--link); }
.order--done .order__status { background: var(--ok-soft); color: var(--ok-ink); }
.order--cancel .order__status { color: var(--muted); }
body.v2 .order__route { margin: 8px 0 0; font-size: 16px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
body.v2 .order__meta, body.v2 .order__note, body.v2 .order__hint { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
body.v2 .order__note { color: var(--text); }
.order__pay { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: end; max-width: 520px; margin-top: 12px; }
body.v2 .order__pay input[type="text"] { width: 100%; height: 40px; }
body.v2 .order__pay .lf-submit { width: auto; padding: 0 20px; }
body.v2 .order__hint { margin-top: 8px; }
.cab-empty { display: grid; justify-items: start; gap: 8px; }
body.v2 .cab-empty p { margin: 0; color: var(--muted); }
body.v2 .cab-empty b { color: var(--ink); font-weight: 600; }
body.v2 .cab-empty .btn-primary { margin-top: 8px; }

/* Личные данные: смена пароля и реквизиты раскрываются по запросу */
body.v2 .cab-page .login-form { max-width: 560px; gap: 12px; margin-top: 0; }
.cab-more > summary { display: inline-flex; align-items: center; gap: 8px; color: var(--link); font-weight: 500; cursor: pointer; list-style: none; }
.cab-more > summary::-webkit-details-marker { display: none; }
.cab-more > summary::after { content: ""; width: 7px; height: 7px; margin-top: -4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.cab-more[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.cab-more__body { display: grid; gap: 12px; margin-top: 12px; }
.wallets { display: grid; gap: 12px; margin: 12px 0 0; padding: 0; border: 0; min-width: 0; }
body.v2 .wallets legend { padding: 0; margin-bottom: 4px; font-size: 18px; font-weight: 600; color: var(--ink); }
.wallets__list { display: grid; gap: 8px; }
.wallet { display: grid; grid-template-columns: 24px 160px minmax(0, 1fr); align-items: center; gap: 10px; }
body.v2 .wallet img { width: 24px; height: 24px; border-radius: 50%; object-fit: contain; }
.wallet__name { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.v2 .wallet input[type="text"] { width: 100%; height: 40px; }
@media (max-width: 599px) {
	.wallet { grid-template-columns: 24px minmax(0, 1fr); gap: 4px 10px; }
	.wallet input { grid-column: 1 / -1; }
	.order__pay { grid-template-columns: minmax(0, 1fr); }
	body.v2 .order__pay .lf-submit { width: 100%; }
	.orders-head { align-items: flex-start; }
}

/* Второстепенная кнопка — как белая кнопка с рамкой в колонке */
body.v2 .btn-secondary { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); color: var(--ink); font-family: var(--font); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
body.v2 .btn-secondary:hover { background: var(--soft); text-decoration: none; }

/* ---------- Партнёрская программа (?a=17) ---------- */
body.v2 .partner-steps { margin-top: 16px; }
.partner-cta, .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; font-size: 14px; color: var(--muted); }
.partner-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.partner-stat { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--soft); }
.partner-stat span { font-size: 13px; color: var(--muted); }
body.v2 .partner-stat b { font-size: 18px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.partner-stat--main { background: var(--accent-soft); }
body.v2 .partner-stat--main b { color: var(--link); }
.cab-section { display: grid; gap: 12px; margin-top: 28px; }
body.v2 .cab-section h2.dir { margin: 0; }
body.v2 .cab-section > .lf-note { margin-top: -4px; }
.partner-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; max-width: 560px; }
body.v2 .partner-link input { width: 100%; height: 40px; color: var(--ink); background: var(--soft); }
.partner-code { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; max-width: 560px; }
body.v2 .partner-code img { display: block; width: 88px; height: 31px; }
body.v2 .partner-code textarea, body.v2 .cab-more textarea[readonly] { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.5; color: var(--text); background: var(--soft); resize: vertical; }
body.v2 .partner-export p { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
body.v2 .partner-export code { padding: 0 4px; border-radius: 4px; background: var(--chip); font-size: 13px; }
body.v2 .cab-section select { width: 100%; height: 40px; }
body.v2 .auth-form textarea { width: 100%; }
body.v2 .cab-empty-note { margin: 0; font-size: 14px; color: var(--muted); }
.cab-table-wrap { max-height: 420px; overflow: auto; border-radius: 12px; background: var(--soft); }
.cab-table { width: 100%; border-collapse: collapse; font-size: 14px; }
body.v2 .cab-table th { position: sticky; top: 0; padding: 10px 12px; background: var(--soft); color: var(--muted); font-size: 13px; font-weight: 500; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
body.v2 .cab-table td { padding: 10px 12px; border-top: 1px solid var(--line); color: var(--text); vertical-align: top; }
body.v2 .cab-table tr:first-child td { border-top: 0; }
body.v2 .cab-table .num { text-align: right; white-space: nowrap; }
.order__status.is-work { background: var(--accent-soft); color: var(--link); }
.order__status.is-done { background: var(--ok-soft); color: var(--ok-ink); }
.order__status.is-cancel { color: var(--muted); }
@media (max-width: 767px) {
	.partner-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cab-section { margin-top: 24px; }
	.partner-code { grid-template-columns: minmax(0, 1fr); }
	body.v2 .cab-table th, body.v2 .cab-table td { padding: 8px; font-size: 13px; }
}

/* Новости на главной: под направлениями, три в ряд */
.news-home__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; margin: 0 0 12px; padding: 0; }
body.v2 .news-home__list li { list-style: none; margin: 0; display: grid; align-content: start; gap: 2px; }
.news-home__list time { font-size: 13px; color: var(--muted); }
body.v2 .news-home__list a { display: block; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.35; }
body.v2 .news-home__list a:first-letter { text-transform: uppercase; }
body.v2 .news-home__list a:hover { color: var(--link); }
body.v2 .news-home__list p { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
@media (max-width: 767px) { .news-home__list { grid-template-columns: minmax(0, 1fr); } }

/* Сообщение над страницей: форма отправлена с устаревшей страницы (config.php, post_guard) */
body.v2 .page-flash { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--warn-soft); color: var(--warn-ink); font-size: 14px; font-weight: 500; }

/* Кнопки в шапке страницы (404) */
body.v2 .dir-popular .review-links { margin: 0 0 10px; font-weight: 400; color: var(--text); line-height: 1.6; }

/* Страница заявки (?a=100&e=9): шаги 1–3 карточками */
body.v2 .order-step h2.dir { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
body.v2 .order-step h2 .steps__n { flex: 0 0 28px; }
body.v2 .order-step > .lf-note { margin: 0 0 12px; }
body.v2 .order-step p:last-child, body.v2 .order-step__text > :last-child { margin-bottom: 0; }
body.v2 .order-step__text { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
body.v2 .order-step__text font { color: inherit; }	/* цвета <font> из текста системы в админке */
body.v2 .site-message > :last-child { margin-bottom: 0; }
body.v2 .site-message h4 { margin: 8px 0; font-size: 16px; }

/* Вход в кабинет в шапке — только пока колонка уходит вниз страницы (≤1023): там он виден сразу, а блок кабинета внизу не нужен */
.header-account { display: none; }
@media (max-width: 1023px) {
	body.v2 .header-account { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink); white-space: nowrap; }
	body.v2 .header-account:hover { text-decoration: none; }
	body.v2 .header-account:hover .lb-icon { background-color: var(--hover-strong); }
	.header-account .lb-icon { width: 40px; height: 40px; flex-basis: 40px; }	/* один круг, как у кнопки темы */
	.header-account__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }	/* «Войти»/«Кабинет» — только для экранных чтецов */
	.sidebar > .login-box, .sidebar > .cabinet { display: none; }
}
@media (max-width: 599px) {
	.header-contact { gap: 8px; }
}
@media (max-width: 520px) { .header-contact .btn-long { display: none; } }
@media (max-width: 374px) { body.v2 .site-logo .site-logo__globe { display: none; } body.v2 .header-contact .btn-primary { padding: 0 12px; } }	/* самые узкие: логотип, вход и «Написать» в одну строку */

/* Кружок с инициалами вошедшего пользователя (config.php, user_avatar) */
.lb-icon--initials { display: inline-grid; place-items: center; background-image: none; color: var(--link); font-size: 14px; font-weight: 600; letter-spacing: .02em; line-height: 1; }
body.v2 .review-form .is-invalid { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
body.v2 .review-form .lf-msg { margin-top: -2px; }

/* Мониторинги (?a=18) */
.monitor-list { display: grid; margin: 0; padding: 0; }
body.v2 .monitor-list li { list-style: none; margin: 0; display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
body.v2 .monitor-list li:first-child { border-top: 0; padding-top: 0; }
body.v2 .monitor-list li:last-child { padding-bottom: 0; }
body.v2 .monitor-list a { font-weight: 600; }
.monitor-list span { font-size: 14px; color: var(--muted); }
body.v2 .monitor-list .monitor-list__reviews { font-weight: 500; font-size: 14px; white-space: nowrap; }
@media (max-width: 599px) { body.v2 .monitor-list li { grid-template-columns: minmax(0, 1fr) auto; } .monitor-list span { grid-column: 1 / -1; grid-row: 2; } }

/* Полезные сайты (?a=15): шаги обмена ссылками и требования */
body.v2 .links-steps { margin: 4px 0 16px; }
body.v2 .links-rules { margin: 0; padding-left: 20px; font-size: 14px; color: var(--text); }
body.v2 .links-rules li { margin: 0 0 4px; }
body.v2 .dir-card .cab-more { margin-top: 12px; }
body.v2 .dir-card .partner-code { margin-top: 4px; }

/* ---------- Тёмная тема «Графит» (docs/concepts/dark-palette.html) — html[data-theme="dark"]: выбор в шапке или настройка устройства ---------- */
[data-theme="dark"] {
	color-scheme: dark;
	--page: #0D1117; --card: #161B22; --soft: #1C232C; --chip: #212A34;
	--line: #2A333E; --line-strong: #38434F; --field-border: #3A4654;
	--ink: #E6EDF3; --text: #C5CFD9; --muted: #8B98A6;
	--accent: #1F78AE; --accent-hover: #2B89C2; --accent-soft: #12283A;
	--link: #6DB3E0; --link-hover: #9ACCEE;
	--ok: #3FB968; --ok-ink: #5FD08A; --ok-soft: #12291B;
	--warn: #F2B35B; --warn-soft: #2A2114; --warn-ink: #F2B35B; --warn-chip: #3A2C12;
	--error: #F47171; --error-soft: #3A1717;
	--hover: #26313D; --hover-strong: #2B3845; --notice: #172233; --notice-line: #243650; --step-line: #2E3C4B;
	--card-shadow: 0 0 0 1px var(--line);
}
/* Поля ввода — на цвете карточки */
[data-theme="dark"] body.v2 input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), [data-theme="dark"] body.v2 select, [data-theme="dark"] body.v2 textarea { background-color: var(--card); color: var(--ink); }
[data-theme="dark"] body.v2 ::placeholder { color: var(--muted); }
/* Старая вёрстка: цветной текст из <font color> и заливки bgcolor придуманы под белый фон */
[data-theme="dark"] body.v2 font[color] { color: inherit; }
[data-theme="dark"] body.v2 font[color="red"], [data-theme="dark"] body.v2 font[color="#FF0000"], [data-theme="dark"] body.v2 font[color="#ff0000"] { color: var(--error); }
[data-theme="dark"] body.v2 [bgcolor] { background-color: var(--soft) !important; }
[data-theme="dark"] body.v2 a.leftlink, [data-theme="dark"] body.v2 a.leftlink_lm { color: var(--link); }
[data-theme="dark"] body.v2 #tooltip { background: #E6EDF3; color: #0D1117; }

/* Кнопка темы в шапке: луна — включить тёмную, солнце — светлую */
body.v2 .theme-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; padding: 0; border: 0; border-radius: 50%; background: var(--accent-soft); color: var(--link); cursor: pointer; }
body.v2 .theme-toggle:hover { background: var(--hover-strong); }
.ti { display: inline-block; flex: 0 0 auto; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--ic) no-repeat center / contain; mask: var(--ic) no-repeat center / contain; }
.i-moon { --ic: var(--i-moon); } .i-sun { --ic: var(--i-sun); }
.theme-toggle .i-sun, [data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }

/* Логотип: в тёмной теме — светлая копия (pic/logo-line-dark.svg), в светлой — исходный */
body.v2 .site-logo .logo-dark, body.v2 .footer-logo .logo-dark, [data-theme="dark"] body.v2 .site-logo .logo-light, [data-theme="dark"] body.v2 .footer-logo .logo-light { display: none; }
[data-theme="dark"] body.v2 .site-logo .logo-dark, [data-theme="dark"] body.v2 .footer-logo .logo-dark { display: block; }	/* сильнее, чем .site-logo img { display: block } */
@media (min-width: 600px) { body.v2 .header-contact .theme-toggle { margin-right: -12px; } }	/* после кнопки темы всегда 8px, как на телефоне (общий отступ шапки тут 20px) */

/* Значки в разметке (спрайт в index.php): рисуются в первом же кадре вместе со страницей */
.ic { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-icon:has(> .ic), .cl-ic:has(> .ic) { display: inline-grid; place-items: center; color: var(--link); }
.lb-icon:has(> .ic)::before, .cl-ic:has(> .ic)::before { content: none; }
.contacts--page .cl-ic .ic { width: 22px; height: 22px; }

/* ---------- Бегущая строка курсов (menu/ticker.php): светодиодное табло над шапкой ----------
   Как настоящее: сетка светодиодов неподвижна (погашенные видны тусклыми точками), буквы бегут под ней и зажигают точки. */
.ticker { --tk-bg: #07090C; --tk-line: #1B222B; --tk-off: rgba(255, 176, 32, .09); --tk-pair: #FFB020; --tk-val: #FFE7B0; --tk-hover: #FFD27A; --tk-up: #33E07A; --tk-down: #FF5A5A; --tk-flat: #5B6673;
	--tk-glow: drop-shadow(0 0 2px rgba(255, 176, 32, .55)); --tk-pitch: 2px; --tk-dot: .8px;
	height: 30px; border-bottom: 1px solid var(--tk-line);
	background: radial-gradient(circle, var(--tk-off) var(--tk-dot), transparent calc(var(--tk-dot) + .35px)) 0 0 / var(--tk-pitch) var(--tk-pitch), var(--tk-bg); }
:root:not([data-theme="dark"]) .ticker { --tk-bg: #EAF3F9; --tk-line: #D5E4EF; --tk-off: rgba(24, 110, 162, .10); --tk-pair: #186EA2; --tk-val: #0B2540; --tk-hover: #0B4F7A; --tk-up: #15803D; --tk-down: #B91C1C; --tk-flat: #94A3B8; --tk-glow: none; }	/* светлая тема: синие точки на бледно-голубом (вариант «Д») */
.ticker__glow { height: 100%; filter: var(--tk-glow); }	/* ореол вокруг каждой горящей точки */
.ticker__view { height: 100%; overflow: hidden;	/* неподвижная сетка точек + мягкие края */
	-webkit-mask: radial-gradient(circle, #000 var(--tk-dot), transparent calc(var(--tk-dot) + .35px)) 0 0 / var(--tk-pitch) var(--tk-pitch), linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
	-webkit-mask-composite: source-in;
	mask: radial-gradient(circle, #000 var(--tk-dot), transparent calc(var(--tk-dot) + .35px)) 0 0 / var(--tk-pitch) var(--tk-pitch), linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
	mask-composite: intersect; }
.ticker__track { display: flex; width: max-content; animation: ticker-run 60s linear infinite; }
.ticker:hover .ticker__track, .ticker:focus-within .ticker__track { animation-play-state: paused; }
@keyframes ticker-run { to { transform: translateX(-50%); } }	/* два одинаковых списка подряд — строка бесшовная */
.ticker__list { display: flex; gap: 44px; padding-right: 44px; font: 700 14px/30px ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
body.v2 .ticker__item { display: inline-flex; gap: 12px; color: var(--tk-pair); text-decoration: none; }
body.v2 .ticker__item:hover { color: var(--tk-hover); background: none; text-decoration: none; }
.ticker__item b { color: var(--tk-val); font-weight: 700; }
.ticker__up { color: var(--tk-up); }
.ticker__down { color: var(--tk-down); }
.ticker__flat { color: var(--tk-flat); }
@media (prefers-reduced-motion: reduce) {	/* без движения: строка стоит, листается пальцем */
	.ticker__view { overflow-x: auto; scrollbar-width: none; }
	.ticker__track { animation: none; }
	.ticker__list[aria-hidden] { display: none; }
}
