/* ============================================================
Formatru — основной стиль сайта
============================================================ */

:root {
--bg: #0b0b12;
--panel: #14141f;
--panel-2: #1b1b28;
--border: rgba(255, 255, 255, .08);
--text: #e2e8f0;
--muted: #94a3b8;
--accent-1: #f43f5e;
--accent-2: #a855f7;
--grad: linear-gradient(90deg, var(--accent-1), var(--accent-2));
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
background: var(--bg);
color: var(--text);
font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
line-height: 1.6;
min-height: 100vh;
display: flex;
flex-direction: column;
}

main { flex: 1; }

a { color: inherit; text-decoration: none; }

.container {
max-width: 1100px;
margin: 0 auto;
padding: 0 1rem;
}

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

.site-header {
background: var(--panel);
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 50;
}

.header-inner {
max-width: 1100px;
margin: 0 auto;
padding: .9rem 1rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}

.logo {
font-size: 1.4rem;
font-weight: 800;
background: var(--grad);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
letter-spacing: .5px;
}

.logo-img { height: 34px; width: auto; display: block; }

.site-nav {
display: flex;
align-items: center;
gap: 1.25rem;
}

.site-nav a {
color: var(--muted);
font-size: .95rem;
transition: color .2s;
white-space: nowrap;
}

.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--text); font-weight: 600; }

/* Бургер: скрыт на десктопе */
.burger {
display: none;
flex-direction: column;
gap: 5px;
background: none;
border: none;
padding: .35rem;
cursor: pointer;
}

.burger span {
width: 24px;
height: 2px;
background: var(--text);
border-radius: 2px;
transition: transform .2s, opacity .2s;
}

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Рекламный блок VK ---------------- */

.ad-section {
margin: 2rem auto;
padding: 1.25rem;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 16px;
text-align: center;
max-width: 1100px;
}

.ad-section__label {
color: var(--muted);
font-size: .72rem;
font-weight: 700;
letter-spacing: .6px;
text-transform: uppercase;
margin-bottom: .75rem;
}

/* Контейнер баннера VK: центрируем и задаём минимальную высоту,
чтобы страница не «прыгала» при загрузке объявления */
.ad-section .mrg-tag {
display: block;
min-height: 90px;
}

/* ---------------- Герой ---------------- */

.hero {
text-align: center;
padding: 3rem 1rem 3.5rem;
background:
radial-gradient(ellipse 60% 50% at 50% 0%, rgba(168, 85, 247, .18), transparent),
radial-gradient(ellipse 40% 40% at 30% 30%, rgba(244, 63, 94, .12), transparent);
}

.hero h1 {
font-size: 2.6rem;
line-height: 1.2;
margin: 0 0 1rem;
background: var(--grad);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}

.hero-sub {
max-width: 620px;
margin: 0 auto 1.75rem;
color: var(--muted);
font-size: 1.05rem;
}

.hero-buttons {
display: flex;
gap: .75rem;
justify-content: center;
flex-wrap: wrap;
}

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

.btn-primary {
display: inline-block;
padding: .8rem 1.6rem;
background: var(--grad);
color: #fff;
font-weight: 600;
font-size: 1rem;
border: none;
border-radius: 12px;
cursor: pointer;
transition: transform .15s, box-shadow .15s;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(168, 85, 247, .35); }
.btn-primary:disabled { opacity: .6; cursor: wait; transform: none; }

.btn-secondary {
display: inline-block;
padding: .8rem 1.6rem;
border: 1px solid var(--border);
border-radius: 12px;
color: var(--text);
font-weight: 600;
font-size: 1rem;
background: none;
font-family: inherit;
cursor: pointer;
transition: border-color .2s, background .2s;
}

.btn-secondary:hover { border-color: var(--accent-2); background: rgba(168, 85, 247, .08); }

/* Компактная кнопка внутри карточек */
.btn-compact {
padding: .6rem 1.4rem !important;
margin-top: .5rem;
}

/* ---------------- Заголовки и секции ---------------- */

.page-title {
font-size: 2rem;
margin: 2rem 0 .5rem;
}

.intro { color: var(--muted); margin: 0 0 2rem; }

.section-title {
font-size: 1.5rem;
margin: 2.5rem 0 1.25rem;
}

.subtitle { color: var(--muted); margin: .25rem 0 1.5rem; }

/* ---------------- Каталоги инструментов ---------------- */

.tools-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
}

.tool-card {
position: relative;
display: block;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 16px;
padding: 1.5rem 1.25rem;
transition: transform .15s, border-color .15s;
}

.tool-card:hover {
transform: translateY(-3px);
border-color: rgba(168, 85, 247, .45);
}

.tool-icon { font-size: 2rem; margin-bottom: .6rem; }

.tool-card h3 { margin: 0 0 .35rem; font-size: 1.05rem; }

.tool-card p {
margin: 0;
color: var(--muted);
font-size: .88rem;
}

.badge {
display: inline-block;
margin-top: .75rem;
padding: .15rem .6rem;
border-radius: 999px;
font-size: .72rem;
font-weight: 700;
letter-spacing: .4px;
}

.badge.ready {
background: rgba(74, 222, 128, .15);
color: #4ade80;
}

/* ---------------- Страницы инструментов ---------------- */

.convert-wrap {
max-width: 640px;
margin: 0 auto;
padding: 2rem 1rem 3rem;
}

.convert-wrap h1 {
font-size: 2.2rem;
line-height: 1.25;
margin: 0 0 .5rem;
background: var(--grad);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}

/* Зона загрузки с перетаскиванием (скрытый input) */
.upload-area {
position: relative;
border: 2px dashed rgba(168, 85, 247, .4);
border-radius: 16px;
background: var(--panel);
padding: 2.5rem 1rem;
text-align: center;
cursor: pointer;
transition: border-color .2s, background .2s;
}

.upload-area:hover,
.upload-area.dragover {
border-color: var(--accent-2);
background: var(--panel-2);
}

.upload-area .icon { font-size: 2.25rem; margin-bottom: .5rem; }

.upload-area p { margin: 0; color: var(--muted); }

/* Скрытый input: растянут на всю зону, клик работает даже без JS */
.file-input {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
opacity: 0;
cursor: pointer;
}

/* Подпись выбранного файла под зоной загрузки */
.file-name {
margin-top: .75rem;
color: var(--muted);
font-size: .9rem;
}

.file-name b { color: var(--text); font-weight: 600; }

/* ---------------- Видимый выбор файла (input[type=file]) ---------------- */

input[type="file"] {
max-width: 100%;
color: var(--muted);
font-size: .92rem;
font-family: inherit;
cursor: pointer;
}

/* Кнопка внутри нативного выбора файла */
input[type="file"]::file-selector-button {
padding: .6rem 1.2rem;
margin-right: .75rem;
border: none;
border-radius: 10px;
background: linear-gradient(90deg, #f43f5e, #a855f7);
color: #fff;
font-weight: 600;
font-size: .92rem;
font-family: inherit;
cursor: pointer;
transition: transform .15s, box-shadow .15s;
}

input[type="file"]::file-selector-button:hover {
transform: translateY(-1px);
box-shadow: 0 6px 18px rgba(168, 85, 247, .35);
}

/* Кнопка в Safari (старый синтаксис) */
input[type="file"]::-webkit-file-upload-button {
padding: .6rem 1.2rem;
margin-right: .75rem;
border: none;
border-radius: 10px;
background: linear-gradient(90deg, #f43f5e, #a855f7);
color: #fff;
font-weight: 600;
font-size: .92rem;
font-family: inherit;
cursor: pointer;
}

/* Обёртка вокруг видимого выбора файла, если страница её использует */
.upload-group {
margin: 1.25rem 0;
padding: 1.25rem;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 16px;
}

.pdf-error {
margin-top: 1rem;
padding: .75rem 1rem;
background: rgba(244, 63, 94, .12);
border: 1px solid rgba(244, 63, 94, .4);
border-radius: 10px;
color: #fda4af;
font-size: .9rem;
}

.result-box {
margin-top: 1rem;
padding: .75rem 1rem;
background: rgba(74, 222, 128, .1);
border: 1px solid rgba(74, 222, 128, .35);
border-radius: 10px;
color: #4ade80;
font-size: .95rem;
opacity: 0;
transform: translateY(-4px);
transition: opacity .25s, transform .25s;
}

.result-box.show { opacity: 1; transform: none; }

/* ---------------- Формы: подписи, списки, поля ---------------- */

label.tool-label,
.tool-form label {
display: block;
margin: 1.25rem 0 .4rem;
color: var(--muted);
font-size: .9rem;
font-weight: 600;
}

/* Выпадающий список в тёмной теме */
select {
width: 100%;
padding: .65rem .9rem;
background: var(--panel-2);
border: 1px solid var(--border);
border-radius: 10px;
color: var(--text);
font-size: .95rem;
font-family: inherit;
cursor: pointer;
transition: border-color .2s;
appearance: none;
-webkit-appearance: none;
background-image: url("data:image/svg+xml;charset=UTF-8,%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' stroke='%23a855f7' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right .9rem center;
padding-right: 2.4rem;
}

select:hover { border-color: rgba(168, 85, 247, .45); }

select:focus {
outline: none;
border-color: var(--accent-2);
}

select option,
select optgroup {
background: var(--panel-2);
color: var(--text);
}

/* Текстовые, числовые и прочие поля */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea {
width: 100%;
padding: .65rem .9rem;
background: var(--panel-2);
border: 1px solid var(--border);
border-radius: 10px;
color: var(--text);
font-size: .95rem;
font-family: inherit;
transition: border-color .2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
textarea:focus {
outline: none;
border-color: var(--accent-2);
}

textarea { resize: vertical; }

input::placeholder,
textarea::placeholder { color: rgba(148, 163, 184, .6); }

input[type="checkbox"],
input[type="radio"] {
accent-color: var(--accent-2);
cursor: pointer;
}

/* ---------------- Выбор даты (input[type=date]) в тёмной теме ---------------- */

input[type="date"] {
width: 100%;
padding: .65rem .9rem;
background: var(--panel-2);
border: 1px solid var(--border);
border-radius: 10px;
color: var(--text);
font-size: .95rem;
font-family: inherit;
transition: border-color .2s;
color-scheme: dark; /* тёмный нативный календарь в Chrome и Firefox */
min-width: 0; /* чтобы поле сжималось в мобильной сетке */
}

input[type="date"]:hover { border-color: rgba(168, 85, 247, .45); }

input[type="date"]:focus {
outline: none;
border-color: var(--accent-2);
}

/* Иконка календаря: перекрашиваем чёрный глиф под тёмную тему (Chrome/Edge/Safari) */
input[type="date"]::-webkit-calendar-picker-indicator {
cursor: pointer;
opacity: .75;
filter: invert(.85);
transition: opacity .15s, filter .15s;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
opacity: 1;
filter: invert(.4) sepia(1) saturate(5) hue-rotate(250deg);
}

/* Сегменты даты (дд.мм.гггг): цвет и подсветка при наведении */
input[type="date"]::-webkit-datetime-edit { color: var(--text); }

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
color: var(--text);
border-radius: 4px;
padding: 0 1px;
}

input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus {
background: rgba(168, 85, 247, .25);
color: #fff;
outline: none;
}

/* Firefox: тёмная иконка календаря */
input[type="date"]::-moz-calendar-picker-indicator {
cursor: pointer;
opacity: .75;
filter: invert(.85);
}

/* Строка из двух дат (как на калькуляторе): подпись и поле в ряд */
.ut-card.ut-field label:has(input[type="date"]) {
display: flex;
align-items: center;
gap: .55rem;
flex: 1;
min-width: 0;
color: var(--muted);
font-size: .9rem;
font-weight: 600;
white-space: nowrap;
}

.ut-card.ut-field label:has(input[type="date"]) input[type="date"] {
flex: 1;
white-space: normal;
}

/* ---------------- Предупреждения и ошибки ---------------- */

.notice {
margin: 1.25rem 0;
padding: .75rem 1rem;
background: rgba(168, 85, 247, .08);
border-left: 3px solid var(--accent-2);
border-radius: 0 10px 10px 0;
color: var(--muted);
font-size: .92rem;
}

.notice strong { color: var(--text); }
.notice small { color: var(--muted); }

.error {
margin: 1rem 0;
padding: .75rem 1rem;
background: rgba(244, 63, 94, .12);
border-left: 3px solid var(--accent-1);
border-radius: 0 10px 10px 0;
color: #fda4af;
font-size: .9rem;
}

/* ---------------- Строка преимуществ под формой ---------------- */

.features-inline {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
margin-top: 2rem;
}

.feature-item {
text-align: center;
padding: 1rem .75rem;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 12px;
font-size: .85rem;
color: var(--muted);
line-height: 1.5;
}

.feature-item strong {
display: block;
color: var(--text);
font-size: .95rem;
margin-bottom: .15rem;
}

/* ---------------- Публичная статистика на главной ---------------- */

.stats-strip {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
margin: 2.5rem auto;
}

.stat-item {
text-align: center;
padding: 1.25rem;
background: rgba(255, 255, 255, .04);
border: 1px solid var(--border);
border-radius: 16px;
}

.stat-num {
font-size: 1.8rem;
font-weight: 700;
background: var(--grad);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}

.stat-label { color: var(--muted); font-size: .85rem; margin-top: .25rem; }

/* ============================================================
Главная: новые блоки
============================================================ */

/* Популярные инструменты — компактные карточки */
.pop-grid {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: .75rem;
}

.pop-card {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
gap: .3rem;
padding: 1rem .5rem .9rem;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 14px;
transition: transform .15s, border-color .15s;
}

.pop-card:hover {
transform: translateY(-3px);
border-color: rgba(168, 85, 247, .45);
}

.pop-icon { font-size: 1.6rem; line-height: 1; }

.pop-name {
font-weight: 600;
font-size: .85rem;
color: var(--text);
line-height: 1.3;
}

.pop-badge {
padding: .1rem .5rem;
border-radius: 999px;
font-size: .68rem;
font-weight: 700;
letter-spacing: .4px;
background: rgba(74, 222, 128, .15);
color: #4ade80;
}

/* Категории */
.cat-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}

.cat-card {
display: flex;
align-items: center;
gap: 1.1rem;
padding: 1.25rem;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 16px;
transition: transform .15s, border-color .15s;
}

.cat-card:hover {
transform: translateY(-3px);
border-color: rgba(168, 85, 247, .45);
}

.cat-card > div { flex: 1; }

.cat-icon { font-size: 2.2rem; line-height: 1; }

.cat-card h3 { margin: 0 0 .2rem; font-size: 1.05rem; }

.cat-card p {
margin: 0;
color: var(--muted);
font-size: .85rem;
}

.cat-btn {
padding: .5rem 1.1rem;
border: 1px solid var(--border);
border-radius: 10px;
color: var(--text);
font-weight: 600;
font-size: .85rem;
white-space: nowrap;
transition: border-color .2s, background .2s;
}

.cat-card:hover .cat-btn {
border-color: var(--accent-2);
background: rgba(168, 85, 247, .08);
}

/* ============================================================
Хиты и новинки: карточки единого размера с фиксированной плашкой
============================================================ */

.highlight-grid .pop-card {
position: relative;
padding: 28px 22px;
min-height: 160px;
}

.highlight-grid .pop-icon {
font-size: 2.4em;
flex-shrink: 0;
margin-top: 14px;
}

.highlight-grid .pop-name {
font-size: 1.08em;
flex: 1;
margin-top: 8px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-word;
}

.highlight-grid .pop-badge {
position: absolute;
top: 12px;
right: 12px;
margin: 0;
}

.pop-badge-new {
background: #16a34a;
}

/* Как это работает */
.steps-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
}

.step {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 16px;
padding: 1.5rem;
text-align: center;
}

.step-num {
width: 44px;
height: 44px;
margin: 0 auto .75rem;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: var(--grad);
color: #fff;
font-weight: 800;
font-size: 1.1rem;
}

.step h3 { margin: 0 0 .4rem; font-size: 1rem; }

.step p {
margin: 0;
color: var(--muted);
font-size: .87rem;
}

/* Безопасность */
.trust-banner {
background: linear-gradient(135deg, rgba(168, 85, 247, .12), rgba(244, 63, 94, .08));
border: 1px solid var(--border);
border-radius: 16px;
padding: 1.75rem 1.5rem;
text-align: center;
}

.trust-banner h2 { margin: 0 0 1rem; font-size: 1.3rem; }

.trust-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: .75rem;
}

.trust-item {
color: var(--muted);
font-size: .9rem;
padding: .75rem;
background: rgba(0, 0, 0, .2);
border-radius: 10px;
}

/* Почему выбирают нас — 3 колонки компактнее */
.why-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
}

.why-card { padding: 1.25rem; }

/* CTA: аккаунт */
.cta-box {
text-align: center;
padding: 2.25rem 1.5rem;
background: var(--grad);
border-radius: 20px;
color: #fff;
}

.cta-box h2 { margin: 0 0 .5rem; font-size: 1.4rem; }

.cta-box p {
margin: 0 auto 1.25rem;
max-width: 560px;
color: rgba(255, 255, 255, .9);
font-size: .95rem;
}

.cta-box .btn-secondary {
border-color: rgba(255, 255, 255, .5);
color: #fff;
}

.cta-box .btn-secondary:hover {
border-color: #fff;
background: rgba(255, 255, 255, .15);
}

.cta-box .btn-primary {
background: #fff;
color: var(--accent-1);
}

.cta-box form { display: inline-block; }
.cta-box button.btn-secondary { font-size: 1rem; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-list details {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 12px;
margin-bottom: .6rem;
overflow: hidden;
}

.faq-list summary {
padding: .9rem 2.6rem .9rem 1.1rem;
cursor: pointer;
font-weight: 600;
font-size: .95rem;
list-style: none;
position: relative;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
content: '+';
position: absolute;
right: 1rem;
top: 50%;
transform: translateY(-50%);
color: var(--accent-2);
font-size: 1.2rem;
font-weight: 700;
}

.faq-list details[open] summary::after { content: '–'; }

.faq-list details p {
margin: 0;
padding: 0 1.1rem 1rem;
color: var(--muted);
font-size: .9rem;
}

/* ============================================================
Отступы между секциями главной
============================================================ */

section.container > .trust-banner,
section.container > .cta-box {
margin: 2.5rem 0;
}

.faq-list {
margin: 2.5rem auto;
}

main section.container,
main div.container {
margin-top: 2.5rem;
}

main .hero + .container,
main .hero + section.container {
margin-top: 0;
}

.stats-strip { margin-top: 0; }

.step h3 { margin-top: .25rem; }
.why-card h3 { margin-top: .1rem; }

/* ============================================================
Профиль: карточки настроек, поля, кнопка «Выйти»
============================================================ */

/* Карточка растянута на всю ширину контейнера страницы (1100px) */
.settings-card {
margin: 1.5rem 0;
padding: 22px 24px;
background:
linear-gradient(160deg, rgba(255,255,255,.04), rgba(255,255,255,.015) 55%),
var(--panel);
border: 1px solid var(--border);
border-radius: 16px;
box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 24px -18px rgba(0,0,0,.8);
max-width: none;
width: 100%;
transition: border-color .2s;
}

.settings-card:hover { border-color: rgba(168,85,247,.3); }

.card-title {
font-size: 1.05rem;
font-weight: 700;
color: var(--text);
margin-bottom: .75rem;
}

/* Бейдж статуса в заголовке карточки («активна») */
.card-title .ad-status.on {
display: inline-block;
margin-left: .5rem;
padding: .1rem .55rem;
border-radius: 999px;
font-size: .72rem;
font-weight: 700;
background: rgba(74, 222, 128, .15);
color: #4ade80;
}

.settings-card p {
margin: 0 0 1rem;
color: var(--muted);
font-size: .92rem;
line-height: 1.55;
}

.settings-card p strong { color: var(--text); }

.settings-card label {
display: block;
color: var(--muted);
font-size: .9rem;
font-weight: 600;
}

/* Строка благодарности в зелёной карточке подписки */
.settings-card .ad-ok {
color: #4ade80;
font-size: .98rem;
font-weight: 600;
line-height: 1.5;
margin: .25rem 0 1rem;
}

.ut-error {
margin: 1rem 0;
padding: .75rem 1rem;
background: rgba(244, 63, 94, .12);
border: 1px solid rgba(244, 63, 94, .4);
border-radius: 10px;
color: #fda4af;
font-size: .9rem;
}

.ut-error div { padding: .1rem 0; }

.profile-field {
display: block;
width: 100%;
max-width: 520px;
margin-top: .4rem;
padding: .65rem .9rem;
background: var(--panel-2);
border: 1px solid var(--border);
border-radius: 10px;
color: var(--text);
font-size: .95rem;
font-family: inherit;
transition: border-color .2s;
}

.profile-field:focus {
outline: none;
border-color: var(--accent-2);
}

.profile-ad-text {
color: var(--muted);
font-size: .9rem;
line-height: 1.5;
margin: .5rem 0 1.25rem;
max-width: 560px;
}

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

/* Кнопка «Выйти»: полноширинная, тёмная с красным акцентом */
.btn-logout {
width: 100%;
padding: .75rem 1.4rem;
border-radius: 12px;
border: 1px solid rgba(244, 63, 94, .35);
background: rgba(244, 63, 94, .08);
color: #f87171;
font-weight: 700;
font-size: .95rem;
font-family: inherit;
cursor: pointer;
text-align: center;
transition: background .2s, border-color .2s, transform .15s;
}

.btn-logout:hover {
background: rgba(244, 63, 94, .16);
border-color: rgba(244, 63, 94, .6);
transform: translateY(-1px);
}

.btn-logout:active {
transform: translateY(0);
}

.profile-logout-form {
display: block;
margin-top: 1.5rem;
}

/* Карточка «Реклама» (подписка) */
.ad-card {
margin: 2rem 0;
padding: 1.5rem 1.5rem 1.75rem;
background: linear-gradient(135deg, rgba(168, 85, 247, .1), rgba(244, 63, 94, .07));
border: 1px solid rgba(168, 85, 247, .3);
border-radius: 16px;
max-width: 560px;
}

.ad-card-head {
display: flex;
align-items: center;
gap: .6rem;
margin-bottom: .5rem;
}

.ad-card-head .icon { font-size: 1.4rem; }

.ad-card-head h3 {
margin: 0;
font-size: 1.05rem;
color: var(--text);
}

.ad-card p {
margin: 0 0 1.1rem;
color: var(--muted);
font-size: .92rem;
line-height: 1.55;
}

.ad-card p strong { color: var(--text); }

.ad-card .ad-status {
display: inline-block;
margin-left: .5rem;
padding: .1rem .55rem;
border-radius: 999px;
font-size: .72rem;
font-weight: 700;
}

.ad-card .ad-status.on {
background: rgba(74, 222, 128, .15);
color: #4ade80;
}

.ad-card .ad-status.off {
background: rgba(244, 63, 94, .15);
color: #fda4af;
}

/* ---------------- SEO-текст ---------------- */

.seo-text {
margin: 3rem auto 3.5rem;
color: var(--muted);
font-size: .95rem;
max-width: 800px;
}

.seo-text h2 { color: var(--text); font-size: 1.25rem; }

/* ---------------- Футер ---------------- */

footer {
background: var(--panel);
border-top: 1px solid var(--border);
padding: 1.75rem 1rem 2rem;
text-align: center;
}

.footer-nav {
display: flex;
flex-wrap: wrap;
gap: 1rem;
justify-content: center;
margin-bottom: .75rem;
}

.footer-nav a { color: var(--muted); font-size: .9rem; }
.footer-nav a:hover { color: var(--text); }

footer p { margin: 0; color: var(--muted); font-size: .8rem; }

/* ============================================================
Админка: статистика (Filament не грузит style.css —
этот же блок продублируйте тегом <style> в stats.blade.php)
============================================================ */

.admin-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.admin-stat-card { padding: 1rem 1.25rem; border: 1px solid #e5e7eb; border-radius: .75rem; background: #fff; }
.admin-stat-card .value { font-size: 1.5rem; font-weight: 700; }
.admin-stat-card .label { color: #6b7280; font-size: .8rem; margin-top: .25rem; }
.admin-h { font-weight: 700; font-size: 1.1rem; margin: 1.5rem 0 .75rem; }
.admin-chart { display: flex; align-items: flex-end; gap: .35rem; height: 180px; padding: 1rem; border: 1px solid #e5e7eb; border-radius: .75rem; background: #fff; }
.admin-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.admin-chart .bar { width: 100%; max-width: 42px; background: linear-gradient(180deg,#a855f7,#f43f5e); border-radius: 6px 6px 0 0; min-height: 2px; }
.admin-chart .day { font-size: .6rem; color: #6b7280; margin-top: .35rem; white-space: nowrap; }
.admin-top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1rem; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e5e7eb; border-radius: .75rem; overflow: hidden; }
.admin-table td { padding: .5rem .75rem; border-bottom: 1px solid #f3f4f6; font-size: .85rem; }
.admin-table .num { text-align: right; font-weight: 600; }

/* ============================================================
Новости
============================================================ */

.news-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.25rem;
}

.news-card {
display: flex;
flex-direction: column;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 16px;
overflow: hidden;
transition: transform .15s, border-color .15s;
}

.news-card:hover {
transform: translateY(-3px);
border-color: rgba(168, 85, 247, .45);
}

.news-photo {
height: 170px;
background-color: var(--panel-2);
background-size: cover;
background-position: center;
}

.news-photo-hero {
height: 320px;
border-radius: 16px;
margin-bottom: 1.25rem;
}

.news-body {
display: flex;
flex-direction: column;
flex: 1;
padding: 1.1rem 1.25rem 1.25rem;
}

.news-meta {
display: flex;
align-items: center;
gap: .6rem;
margin-bottom: .5rem;
}

.news-cat {
padding: .1rem .55rem;
border-radius: 999px;
font-size: .68rem;
font-weight: 700;
letter-spacing: .4px;
background: rgba(168, 85, 247, .15);
color: #c084fc;
}

.news-date {
color: var(--muted);
font-size: .78rem;
}

.news-title {
margin: 0 0 .4rem;
font-size: 1.1rem;
line-height: 1.3;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}

.news-excerpt {
margin: 0 0 .75rem;
color: var(--muted);
font-size: .9rem;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}

.news-more {
margin-top: auto;
color: var(--accent-2);
font-size: .88rem;
font-weight: 600;
}

/* Полная новость */
.news-full { max-width: 800px; margin: 0 auto; }

.news-full-title {
font-size: 2rem;
line-height: 1.25;
margin: .25rem 0 .75rem;
}

.news-full-excerpt {
color: var(--muted);
font-size: 1.05rem;
margin: 0 0 1.5rem;
}

.news-content { color: var(--text); font-size: 1rem; }
.news-content p { margin: 0 0 1rem; }
.news-content h2, .news-content h3 { margin: 1.5rem 0 .5rem; }
.news-content ul, .news-content ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.news-content a { color: var(--accent-2); text-decoration: underline; }

.news-pagination { margin-top: 2rem; }

/* ============================================================
Переносы и длинные строки
============================================================ */

/* Обычные тексты: переносы по слогам в пределах блока */
body {
hyphens: auto;
-webkit-hyphens: auto;
-ms-hyphens: auto;
}

/* Неразрывные строки (хеши, ссылки, Base64) — рвать в любом месте,
а не вылезать за край карточки */
.result-box,
.ut-result,
.ut-out,
.news-content,
.tool-card p,
.cat-card p,
.convert-wrap p,
.notice,
.error {
overflow-wrap: anywhere;
word-break: break-word;
}

/* Моноширинный вывод (хеши, Base64): не раздувать колонку, рвать длинную строку */
.ut-out {
max-width: 100%;
white-space: pre-wrap;
overflow-wrap: anywhere;
}

/* Элементы, где переносы по слогам вредят (кнопки, меню, заголовки карточек) */
.btn-primary,
.btn-secondary,
.site-nav a,
.tool-card h3,
.pop-name,
.news-title {
hyphens: none;
-webkit-hyphens: none;
-ms-hyphens: none;
}

/* ---------------- Мобильная версия ---------------- */

@media (max-width: 900px) {
.tools-grid { grid-template-columns: repeat(2, 1fr); }
.pop-grid { grid-template-columns: repeat(3, 1fr); }
.why-grid { grid-template-columns: repeat(2, 1fr); }
.news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
.burger { display: flex; }

.site-nav {
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
flex-direction: column;
align-items: stretch;
background: var(--panel);
border-bottom: 1px solid var(--border);
padding: .75rem 1rem 1rem;
gap: .25rem;
}

.site-nav.open { display: flex; }
.site-nav a { padding: .6rem .25rem; border-radius: 8px; }
.site-nav a.active { background: rgba(168, 85, 247, .12); }

.hero { padding: 1.5rem 1rem 2rem; }
.hero h1 { font-size: 1.8rem; }
.hero-sub { font-size: .95rem; }

.ad-section { margin: 1.25rem auto; padding: 1rem .75rem; }

.tools-grid { grid-template-columns: 1fr; }
.admin-stat-grid, .admin-top-grid { grid-template-columns: 1fr; }
.stats-strip { grid-template-columns: repeat(2, 1fr); }
.page-title { font-size: 1.5rem; }

.features-inline { grid-template-columns: 1fr; }
.convert-wrap h1 { font-size: 1.6rem; }

.pop-grid { grid-template-columns: repeat(2, 1fr); }
.cat-grid { grid-template-columns: 1fr; }
.cat-btn { display: none; }
.steps-grid, .trust-grid, .why-grid { grid-template-columns: 1fr; }
.news-grid { grid-template-columns: 1fr; }
.news-photo { height: 140px; }
.news-photo-hero { height: 220px; }
.news-full-title { font-size: 1.5rem; }
.highlight-grid .pop-card { min-height: 130px; }

.settings-card, .ad-card { max-width: 100%; }
}

/* ============================================================
CMS-страницы из админки (меню): контент редактора Filament
============================================================ */

.page-content {
color: var(--text);
line-height: 1.65;
overflow-wrap: break-word;
word-break: break-word;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4 {
margin: 1.4rem 0 .6rem;
line-height: 1.25;
}

.page-content p { margin: .6rem 0; }

.page-content a {
color: var(--accent-2);
text-decoration: underline;
}

.page-content img {
max-width: 100%;
height: auto;
border-radius: 10px;
}

.page-content ul,
.page-content ol {
margin: .6rem 0;
padding-left: 1.4rem;
}

.page-content blockquote {
margin: 1rem 0;
padding: .6rem 1rem;
border-left: 3px solid var(--accent-2);
background: rgba(168, 85, 247, .07);
border-radius: 0 10px 10px 0;
color: var(--muted);
}

.page-content hr {
border: none;
border-top: 1px solid var(--border);
margin: 1.5rem 0;
}

/* Таблицы: тёмная тема, рамки и зебра */
.page-content table {
width: 100%;
border-collapse: collapse;
margin: 1.2rem 0;
font-size: .95rem;
display: table;
}

.page-content table td,
.page-content table th {
border: 1px solid rgba(255, 255, 255, .18);
padding: 9px 12px;
text-align: left;
vertical-align: top;
overflow-wrap: break-word;
word-break: break-word;
}

.page-content table th {
background: rgba(255, 255, 255, .07);
font-weight: 600;
}

.page-content table tr:nth-child(even) td {
background: rgba(255, 255, 255, .03);
}

@media (max-width: 640px) {
/* Чтобы таблица не уезжала за экран на телефоне — скролл внутри блока */
.page-content table {
display: block;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.page-content table td,
.page-content table th {
padding: 7px 8px;
font-size: .85rem;
min-width: 110px;
}
}

/* ============================================================
Таблицы на CMS-страницах: компактный «документный» формат
============================================================ */

/* Ограничиваем ширину таблицы и центрируем, чтобы она
не растягивалась на весь контейнер, а выглядела как лист А4 */
.page-content table {
width: auto;
max-width: 760px;
margin-left: auto;
margin-right: auto;
min-width: min(560px, 100%);
}

/* Узкая таблица из одной колонки — пусть занимает свою естественную ширину */
.page-content table:has(td:only-child),
.page-content table:has(th:only-child) {
min-width: 0;
}

@media (max-width: 800px) {
.page-content table {
max-width: 100%;
}
}

/* ============================================================
   Тестовый режим: модальное окно оплаты
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 10, .72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 9999;
}

.modal-box {
    width: 100%;
    max-width: 420px;
    background: var(--panel-2);
    border: 1px solid rgba(168, 85, 247, .35);
    border-radius: 16px;
    padding: 1.5rem 1.4rem 1.4rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    animation: modal-in .18s ease-out;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(10px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

.modal-box h3 {
    margin: 0 0 .6rem;
    font-size: 1.1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.modal-box p {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.modal-box p strong { color: var(--text); }
.modal-box a { color: var(--accent-2); }

.modal-actions {
    display: flex;
    gap: .75rem;
    align-items: center;
}

.modal-actions .btn-primary {
    flex: 1;
    padding: .65rem 1rem;
    font-size: .95rem;
}

.modal-actions .btn-secondary {
    padding: .65rem 1.2rem;
    font-size: .95rem;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .modal-actions { flex-direction: column; }
    .modal-actions .btn-primary,
    .modal-actions .btn-secondary { width: 100%; text-align: center; }
}

/* Тёмный фон за нативным dialog */
dialog.modal-box::backdrop,
dialog#test-pay-modal::backdrop {
    background: rgba(4, 4, 10, .72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ============================================================
   Конвертер DOCX → PDF: пакетная обработка
   ============================================================ */

.convert {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.convert-hero {
    text-align: center;
    margin-bottom: 1.5rem;
}

.convert-badge {
    display: inline-block;
    padding: .3rem .85rem;
    border-radius: 999px;
    background: var(--grad);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.convert h1 {
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.15;
    font-weight: 800;
    margin: 14px 0 8px;
    hyphens: none;
    -webkit-hyphens: none;
    -ms-hyphens: none;
}

.convert h1 em {
    font-style: normal;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.convert-sub {
    color: var(--muted);
    font-size: 1.05rem;
    margin: 0;
}

/* Локальная плашка с условиями: центрированная, в стиле сайта */
.convert-notice {
    text-align: center;
    font-size: .9rem;
    color: var(--muted);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .7rem 1rem;
    margin-bottom: 1.25rem;
}

.convert-notice strong { color: var(--text); }

/* Ошибка валидации на странице конвертера */
.convert-error {
    background: rgba(244, 63, 94, .12);
    border: 1px solid rgba(244, 63, 94, .4);
    border-radius: 10px;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    font-size: .9rem;
    color: #fda4af;
    text-align: center;
}

/* Внутри зоны загрузки: иконка и подписи */
.upload-area .upload-icon {
    color: var(--accent-2);
    margin-bottom: .6rem;
}

.upload-area .upload-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 .25rem;
}

.upload-area .upload-or {
    color: var(--muted);
    font-size: .8rem;
    margin: 0 0 .9rem;
}

/* Скрытый input: клики по зоне обрабатывает JS */
.convert .convert-input {
    display: none;
}

/* Список выбранных файлов */
.file-list {
    list-style: none;
    padding: 0;
    margin: .9rem 0 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .6rem .9rem;
    font-size: .88rem;
    color: var(--text);
    animation: file-in .2s ease;
}

.file-item .fname {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item .fsize {
    color: var(--muted);
    font-size: .75rem;
    flex-shrink: 0;
}

.file-item .fremove {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 .15rem;
    transition: color .2s;
}

.file-item .fremove:hover { color: #fda4af; }

@keyframes file-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

/* Главная кнопка конвертации */
.btn-convert {
    width: 100%;
    margin-top: 1rem;
    padding: .9rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    background: var(--grad);
    transition: transform .15s, box-shadow .15s, opacity .2s;
    opacity: .4;
    pointer-events: none;
}

.btn-convert:not(:disabled) {
    opacity: 1;
    pointer-events: auto;
}

.btn-convert:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(168, 85, 247, .35);
}

.btn-convert.loading {
    pointer-events: none;
    opacity: .7;
    cursor: wait;
}

/* Мобильная версия конвертера */
@media (max-width: 640px) {
    .convert h1 { font-size: 1.7rem; }
    .convert-sub { font-size: .95rem; }
}
/* Ссылки внутри локальных плашек конвертера */
.convert-notice a {
    color: var(--accent-2);
    font-weight: 600;
}
.convert-notice a:hover { text-decoration: underline; }

/* Опции OCR и прочих форм в стиле конвертера */
.ocr-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.25rem 0;
}
@media (max-width: 640px) {
    .ocr-options { grid-template-columns: 1fr; }
}
.convert-label {
    display: block;
    margin-bottom: .35rem;
    color: var(--muted, #6b7280);
    font-size: .9rem;
    font-weight: 600;
}
.convert-select {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid var(--border, #e2e2e8);
    border-radius: 10px;
    font-size: .95rem;
    background: #fff;
    color: inherit;
}
/* Селекты конвертеров: тёмная тема */
.convert-select {
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border, rgba(255, 255, 255, .18));
    color: var(--text, #e8e8ee);
    color-scheme: dark;
    appearance: none;
    -webkit-appearance: none;
    background-image: 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 1.5l5 5 5-5' fill='none' stroke='%23a0a0b0' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.4rem;
    cursor: pointer;
    transition: border-color .15s ease;
}
.convert-select:hover { border-color: var(--accent-2, #8b7cf6); }
.convert-select:focus {
    outline: none;
    border-color: var(--accent-2, #8b7cf6);
    box-shadow: 0 0 0 3px rgba(139, 124, 246, .15);
}
.convert-label { color: var(--muted, #a0a0b0); }
.btn-convert:disabled { opacity: .55; cursor: not-allowed; filter: grayscale(.3); }

/* ============================================================
Страницы категорий инструментов: сетка плиток + рекламные блоки
============================================================ */

/* Хиро-блок страниц категорий: центрированная плашка со свечением */
.md-hero {
    margin: 24px 0 0;
    text-align: center;
    position: relative;
    padding: 34px 30px 30px;
    border-radius: 26px;
    border: 1px solid var(--border);
    background:
        radial-gradient(90% 130% at 50% 0%, rgba(168,85,247,.16), transparent 65%),
        linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.015) 55%),
        var(--panel);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 20px 50px -30px rgba(0,0,0,.9);
    overflow: hidden;
}
/* Два мягких цветных пятна по углам плашки */
.md-hero::before,
.md-hero::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .5;
    pointer-events: none;
}
.md-hero::before {
    top: -110px;
    left: -60px;
    background: rgba(244,63,94,.35);
}
.md-hero::after {
    top: -110px;
    right: -60px;
    background: rgba(168,85,247,.4);
}

.md-hero .md-hero-pill {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid rgba(168,85,247,.35);
    background: rgba(168,85,247,.12);
    color: #c4b5fd;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.md-hero .md-title {
    position: relative;
    z-index: 1;
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
}

.md-hero .subtitle {
    position: relative;
    z-index: 1;
    margin: 12px auto 0;
    font-size: 16px;
    color: var(--muted);
    max-width: 560px;
}

@media (max-width: 640px) {
    .md-hero { padding: 26px 18px 24px; border-radius: 20px; }
    .md-hero .subtitle { font-size: 14.5px; }
}

.md-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
    margin-top: 32px;
}

.md-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 22px 20px;
    min-height: 178px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.015) 45%),
        var(--panel);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 24px -18px rgba(0,0,0,.8);
    text-decoration: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
    transition: transform .2s cubic-bezier(.2,.7,.3,1.2), border-color .2s, box-shadow .2s;
}

.md-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120px 120px at var(--mx,50%) var(--my,0%), rgba(168,85,247,.18), transparent 70%);
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
}

.md-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(168,85,247,.45);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 40px -18px rgba(168,85,247,.35);
}

.md-tile:hover::before { opacity: 1; }

.md-ico {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--c1, rgba(244,63,94,.22)), var(--c2, rgba(168,85,247,.12)));
    border: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

.md-name {
    font-weight: 700;
    font-size: 15.5px;
    letter-spacing: -.01em;
}

.md-desc {
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.md-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(34,197,94,.12);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,.25);
    letter-spacing: .02em;
    white-space: nowrap;
}

/* Отключённый инструмент («скоро») */
.md-tile.disabled { pointer-events: none; opacity: .55; }
.md-tile.disabled:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.md-badge.soon {
    background: rgba(148,163,184,.12);
    color: #94a3b8;
    border: 1px solid rgba(148,163,184,.3);
}

/* Рекламный блок внутри плитки */
.md-ad {
    justify-content: flex-start;
    align-items: stretch;
    border-style: dashed;
    border-color: rgba(168,85,247,.35);
    background:
        linear-gradient(160deg, rgba(168,85,247,.08), rgba(168,85,247,.02) 60%),
        var(--panel);
}

.md-ad .md-ad-tag {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}

/* Слот рекламы ужат до высоты обычной плитки */
.md-ad .md-ad-slot {
    width: 100%;
    height: 128px;
    align-self: center;
    border-radius: 12px;
    overflow: hidden;
}

@media (max-width: 640px) {
    .md-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .md-tile { padding: 16px 14px; border-radius: 16px; }
    .md-hero .md-title { font-size: clamp(24px, 7vw, 30px); }
}

/* ============================================================
Страница «Утилиты»: вкладки, поиск, чипы, модальные окна
============================================================ */

button.md-tile {
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.hidden { display: none !important; }

.nores {
    color: var(--muted);
    font-size: .92rem;
    text-align: center;
    padding: 1.5rem 0;
}

.tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin: 1.5rem 0 .75rem;
}

.tab {
    padding: .55rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    color: var(--muted);
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .2s, background .2s;
}

.tab:hover { border-color: rgba(168,85,247,.45); }
.tab.active { background: var(--grad); color: #fff; border-color: transparent; }

.toolbar {
    display: flex;
    gap: .75rem;
    margin: 0 0 1.25rem;
}

.toolbar input { flex: 1; }
.toolbar select { width: auto; min-width: 150px; }

.chips {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .25rem;
}

.chip {
    padding: .4rem .9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--muted);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .2s, background .2s;
}

.chip:hover { border-color: rgba(168,85,247,.45); }
.chip.active {
    background: rgba(168,85,247,.15);
    color: #c084fc;
    border-color: rgba(168,85,247,.45);
}

/* Модальные окна калькуляторов */
.mwrap {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(5,5,10,.7);
}

.modal {
    background: var(--panel);
    border: 1px solid rgba(168,85,247,.35);
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    padding: 1.25rem 1.25rem 1.5rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.m-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .9rem;
    padding-right: 2.2rem;
}

.m-head b { font-size: 1.1rem; }

.m-close {
    position: absolute;
    top: .7rem;
    right: .7rem;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.05);
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}

.m-close:hover { color: var(--text); border-color: rgba(244,63,94,.55); }

.m-foot { margin-top: 1rem; text-align: center; }
.m-foot .btn-secondary { width: 100%; }

.modal label {
    display: block;
    margin: .6rem 0 .2rem;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 600;
}

.cout {
    margin-top: .75rem;
    color: #4ade80;
    font-size: .95rem;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.5;
}

.cout:empty { display: none; }
.cout b { color: var(--text); }

/* ============================================================
Главная: герой и онлайн-счётчик
============================================================ */

.hero-pill {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid rgba(168,85,247,.35);
    background: rgba(168,85,247,.12);
    color: #c4b5fd;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

/* Статистика: 4 колонки */
.stats-strip { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

/* Плитка «сейчас онлайн» */
.stat-item { position: relative; }

.online-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    margin-right: 7px;
    vertical-align: baseline;
    animation: online-pulse 2s ease-out infinite;
}

@keyframes online-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(74,222,128,.5); }
    70%  { box-shadow: 0 0 0 9px rgba(74,222,128,0); }
    100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

.md-badge.new {
    background: rgba(168,85,247,.12);
    color: #c084fc;
    border: 1px solid rgba(168,85,247,.35);
}

/* ============================================================
Профиль: хиро, вкладки, карточки
============================================================ */

.profile-tabs {
    display: flex;
    gap: .5rem;
    margin: 1.25rem 0 1.5rem;
    flex-wrap: wrap;
}

.profile-tabs a {
    padding: .55rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    color: var(--muted);
    font-weight: 600;
    font-size: .92rem;
    text-decoration: none;
    transition: border-color .2s, background .2s;
}

.profile-tabs a:hover { border-color: rgba(168,85,247,.45); }
.profile-tabs a.active {
    background: var(--grad);
    color: #fff;
    border-color: transparent;
}

/* Карточка с подсветкой по цвету: зелёная — активная подписка */
.settings-card.ok {
    border-color: rgba(74,222,128,.35);
    background:
        linear-gradient(160deg, rgba(74,222,128,.06), rgba(74,222,128,.02) 55%),
        var(--panel);
}

.card-section {
    margin: 12px 0;
}

.card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    padding: 16px;
}

/* ============================================================
Страница «Покупки»: карточки-квитанции
============================================================ */

.pay-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 1.25rem;
}

.pay-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        linear-gradient(160deg, rgba(255,255,255,.04), rgba(255,255,255,.015) 55%),
        var(--panel);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 24px -18px rgba(0,0,0,.8);
    flex-wrap: wrap;
}

.pay-ico {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(236,72,153,.22), rgba(168,85,247,.12));
    border: 1px solid rgba(255,255,255,.08);
}

.pay-main {
    flex: 1;
    min-width: 180px;
}

.pay-title {
    font-weight: 700;
    font-size: 15.5px;
    letter-spacing: -.01em;
}

.pay-title .test-mark {
    opacity: .55;
    font-size: .8em;
    font-weight: 500;
}

.pay-date {
    font-size: 13px;
    color: var(--muted);
    margin-top: 3px;
}

.pay-side {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-wrap: wrap;
}

.pay-amount {
    font-weight: 800;
    font-size: 17px;
    white-space: nowrap;
    color: var(--text);
}

.pay-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: .02em;
}

.pay-badge.paid {
    background: rgba(34,197,94,.12);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,.3);
}

.pay-badge.pending {
    background: rgba(251,191,36,.12);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,.3);
}

.pay-badge.canceled {
    background: rgba(244,63,94,.1);
    color: #f87171;
    border: 1px solid rgba(244,63,94,.3);
}

.pay-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

.pay-actions .btn-primary,
.pay-actions .btn-secondary {
    padding: .45rem 1rem;
    font-size: .88rem;
}

@media (max-width: 560px) {
    .pay-side { width: 100%; justify-content: space-between; }
}
/* ============================================================
Хлебные крошки
============================================================ */

.breadcrumbs {
    max-width: 1100px;
    margin: 1.25rem auto 0;
    padding: 0 1rem;
    font-size: .85rem;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: .25rem;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* Разделитель — тонкая стрелка в цвете градиента */
.breadcrumbs li + li::before {
    content: '›';
    margin: 0 .55rem;
    color: var(--accent-2);
    opacity: .55;
    font-weight: 700;
}

.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: color .2s, border-color .2s;
}

/* Ховер — как у ссылок в шапке и футере */
.breadcrumbs a:hover {
    color: var(--text);
    border-bottom-color: var(--accent-2);
}

/* Текущая страница — градиентный текст, как у заголовков и логотипа */
.breadcrumbs .crumb-current {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
}

@media (max-width: 640px) {
    .breadcrumbs {
        margin-top: 1rem;
        font-size: .8rem;
    }
    .breadcrumbs a,
    .breadcrumbs .crumb-current {
        padding-bottom: 0;
    }
}

/* Рекламный кабинет: постоянная ссылка в шапке для мобильных */
.ads-header-link { display: none; }

@media (max-width: 640px) {
    .ads-header-link {
        display: inline-flex;
        align-items: center;
        background: linear-gradient(90deg, #ec4899, #8b5cf6);
        color: #fff;
        border-radius: 999px;
        padding: 6px 14px;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        margin-left: auto;
    }
}
@media(max-width:767px){.pkg-extra{display:none}.md-badge{font-size:.62rem;padding:3px 8px;letter-spacing:.2px}}
