:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --border: #e5e5ea;
  --text: #17171a;
  --text-muted: #6b6b74;
  --text-faint: #9a9aa2;
  --accent: #ff5f8a;
  --accent-dark: #17171a;
  --free: #16a34a;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  flex: 1;
}

.wrap.narrow { max-width: 760px; }

.legal-content { padding: 40px 0 60px; }
.legal-content h1 { font-size: 28px; margin: 0 0 20px; letter-spacing: -0.02em; }
.legal-content h2 { font-size: 18px; margin: 32px 0 10px; }
.legal-content p { color: var(--text-muted); line-height: 1.6; margin: 0 0 14px; }
.legal-content ul { color: var(--text-muted); line-height: 1.6; padding-left: 20px; margin: 0 0 14px; }
.legal-content a { color: var(--accent); text-decoration: underline; }
.legal-content .contact-email { font-size: 18px; font-weight: 600; }

header.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

header.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

header.site-header .logo {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

header.site-header .logo span { color: var(--accent); }

.hero {
  text-align: center;
  padding: 40px 0 24px;
}

.hero h1 {
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) { .hero h1 { font-size: 42px; } }

.hero p {
  color: var(--text-muted);
  margin: 0 auto 20px;
  max-width: 620px;
  line-height: 1.5;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin: 0 0 24px;
}

.hero-stats .stat { display: flex; flex-direction: column; align-items: center; }
.hero-stats .num {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero-stats .label {
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.seo-section {
  max-width: 820px;
  margin: 0 auto;
  padding: 8px 0 64px;
}
.seo-section h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 32px 0 10px;
}
.seo-section p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 14px;
}
.seo-section h3 {
  font-size: 16px;
  margin: 20px 0 6px;
}
.seo-section a { color: var(--accent); text-decoration: underline; }
.seo-section .seo-tags { justify-content: flex-start; margin: 4px 0 8px; }
.seo-section .seo-tags a { color: var(--text-muted); text-decoration: none; }
.seo-section .seo-tags a:hover { color: var(--text); border-color: var(--text-faint); }

.breadcrumbs {
  font-size: 13px;
  color: var(--text-faint);
  padding-top: 20px;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span { margin: 0 6px; }

.landing-hero { padding-top: 20px; }
.landing-hero .landing-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.related-links { padding: 0 0 56px; text-align: center; }
.related-links h2 { font-size: 20px; letter-spacing: -0.02em; margin: 0; }
.tag-chip:hover { color: var(--text); border-color: var(--text-faint); }

.empty-state a { color: var(--accent); text-decoration: underline; }
.seo-section .seo-disclaimer {
  font-size: 13px;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-top: 28px;
}

.search-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  outline: none;
}

.search-form input[type="search"]:focus { border-color: var(--accent); }

.search-form button {
  padding: 11px 22px;
  border-radius: 999px;
  border: none;
  background: var(--accent-dark);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
}

.search-form-v2 {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 18px;
  height: 46px;
}

.search-form-v2:focus-within { border-color: var(--accent); }

.search-form-v2 .search-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--text-faint);
}

.search-form-v2 input[type="search"] {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  height: 100%;
}

.search-form-v2 input[type="search"]::placeholder { color: var(--text-faint); }

.filter-details { position: relative; flex: none; }

.filter-details > summary {
  list-style: none;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

.filter-details > summary::-webkit-details-marker { display: none; }
.filter-details[open] > summary { border-color: var(--accent); }

.filter-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  width: 280px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  z-index: 20;
}

.filter-panel .tag-row { justify-content: flex-start; margin-top: 0; }

.sort-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  margin-top: 22px;
  border-bottom: 1px solid var(--border);
}

.sort-tab {
  font-size: 14px;
  color: var(--text-muted);
  padding: 8px 2px 12px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.sort-tab:hover { color: var(--text); }

.sort-tab.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--accent-dark);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.tag-chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.tag-chip.active {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 24px 0 56px;
}

@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1150px) { .grid { grid-template-columns: repeat(5, 1fr); } }

.card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: box-shadow .15s, transform .15s;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

.card-media {
  display: block;
  position: relative;
  aspect-ratio: 3 / 4;
  width: 100%;
  background: #eee;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-media .no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-faint);
  font-size: 13px;
}

.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.badge.free { background: var(--free); color: #fff; }
.badge.paid { background: #fff; color: #111; }
.badge.growth { right: auto; left: 8px; background: #16a34a; color: #fff; }
.profile-stats .growth dd { color: #16a34a; }

.card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.25) 70%, transparent);
  color: #fff;
}

.card-overlay h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-overlay .username {
  margin: 1px 0 0;
  font-size: 12px;
  opacity: .75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-stats {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  font-size: 11px;
  opacity: .9;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
}

.card-tags span {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  color: var(--text-muted);
  transition: border-color .15s, color .15s;
}

.card-tags:hover span {
  border-color: var(--accent);
  color: var(--accent);
}

.empty-state {
  text-align: center;
  color: var(--text-faint);
  padding: 60px 0;
}

/* profile page */
.profile {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 0 56px;
}

@media (min-width: 640px) { .profile { flex-direction: row; } }

.back-link {
  display: inline-block;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 20px;
}
.back-link:hover { color: var(--text); }

.profile-photo {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: #eee;
  flex-shrink: 0;
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }

.profile-info { flex: 1; }
.profile-info h1 { margin: 0 0 10px; font-size: 26px; letter-spacing: -0.02em; }

.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.profile-tags a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 12px;
  color: var(--text-muted);
}
.profile-tags a:hover { color: var(--text); border-color: var(--text-faint); }

.profile-about { color: var(--text-muted); line-height: 1.6; margin-bottom: 18px; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  max-width: 360px;
}
.profile-stats dt { font-size: 12px; color: var(--text-faint); margin: 0; }
.profile-stats dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; }

.cta-btn {
  display: inline-block;
  background: var(--accent-dark);
  color: #fff;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
}

.cta-note { color: var(--text-faint); font-size: 12px; margin-top: 8px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-bottom: 40px;
}
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }

.gallery a {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #eee;
  display: block;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; }

.profile-username { margin: -4px 0 14px; color: var(--text-faint); font-size: 14px; }

.profile-seo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}
.profile-seo h2 { font-size: 20px; margin: 0 0 12px; letter-spacing: -0.01em; }
.profile-seo h2:not(:first-child) { margin-top: 28px; }
.profile-seo h3 { font-size: 15px; margin: 20px 0 8px; }
.profile-seo p { color: var(--text-muted); line-height: 1.65; margin: 0 0 12px; }
.profile-seo .profile-about { white-space: pre-line; overflow-wrap: anywhere; }

.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  background: var(--bg);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 0;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-faint); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 12px; }

/* guides */
.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 20px;
  margin-bottom: 32px;
  line-height: 1.7;
}
.article h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 8px; }
.article h2 { font-size: 21px; letter-spacing: -0.01em; margin: 32px 0 10px; }
.article h3 { font-size: 16px; margin: 22px 0 6px; }
.article p, .article li { color: #3a3a42; }
.article p { margin: 0 0 14px; }
.article ul, .article ol { padding-left: 22px; margin: 0 0 14px; }
.article li { margin-bottom: 6px; }
.article a:not(.tag-chip) { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article code { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 14px; }
.article table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.article th, .article td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.article th { background: var(--bg); }
.article .tip { background: #fff4f7; border-left: 3px solid var(--accent); border-radius: 8px; padding: 12px 14px; }
.article-meta { color: var(--text-faint); font-size: 13px; margin: 0 0 20px !important; }
.article-note { background: var(--bg); border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--text-muted); }
.article-chips { justify-content: flex-start; }
.article-more { text-align: center; margin: 16px 0 0; }
.guide-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 48px; }
.guide-item {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: inherit;
  text-decoration: none;
}
.guide-item:hover { border-color: var(--text-faint); }
.guide-item h2 { font-size: 19px; margin: 0 0 6px; letter-spacing: -0.01em; }
.guide-item p { margin: 0 0 8px; color: var(--text-muted); line-height: 1.55; }
.guide-item span { color: var(--accent); font-weight: 600; font-size: 14px; }
@media (max-width: 640px) {
  .article { padding: 20px 16px 12px; }
  .article h1 { font-size: 24px; }
}

.similar { padding-bottom: 20px; }
.similar h2 { font-size: 20px; margin: 0 0 14px; letter-spacing: -0.01em; }

/* language switcher */
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { color: var(--text); border-color: var(--text-faint); }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 50;
  width: 340px;
  max-width: calc(100vw - 32px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}
.lang-menu a { padding: 7px 10px; border-radius: 8px; font-size: 14px; color: var(--text-muted); }
.lang-menu a:hover { background: var(--bg); color: var(--text); }
.lang-menu a.active { background: var(--bg); color: var(--text); font-weight: 600; }

/* RTL (ar, he) */
[dir="rtl"] .legal-content ul { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .profile-username, [dir="rtl"] .card-overlay .username { direction: ltr; text-align: right; }

footer.site-footer {
  margin-top: 40px;
  background: var(--accent-dark);
  color: #a8a8ae;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  padding: 40px 20px 24px;
}

@media (min-width: 640px) { .footer-inner { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .footer-inner { grid-template-columns: repeat(5, 1fr) 1.4fr; } }

.footer-langs { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.footer-langs a { font-size: 13px; }

.footer-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.footer-col h4 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 15px;
}

.footer-col a {
  color: #a8a8ae;
  font-size: 14px;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #2c2c30;
  padding: 16px 20px;
  font-size: 13px;
  color: #77777d;
}

/* simple footer used on admin pages */
footer.site-footer.simple {
  background: transparent;
  color: var(--text-faint);
}
footer.site-footer.simple .footer-bottom {
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-faint);
}

/* admin */
.admin-nav {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.admin-nav a { color: var(--text-muted); font-size: 14px; }
.admin-nav a:hover { color: var(--text); }
.admin-nav form { margin-left: auto; }
.admin-nav button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
}

.admin-content { padding-top: 24px; padding-bottom: 60px; }

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
table.admin-table th, table.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}
table.admin-table th { color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
table.admin-table img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
table.admin-table tr:last-child td { border-bottom: none; }

.sync-log {
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--accent-dark); color: #fff; border-color: var(--accent-dark); }
.btn.danger { color: #dc2626; border-color: #fecaca; }
.admin-nav a.active { color: var(--text); font-weight: 600; }

/* admin: статистика */
.stats { --good: #16a34a; --bad: #dc2626; --warn: #d97706; }
.stats-top { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.stats-periods { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.stats-periods a { padding: 6px 12px; border-radius: 7px; font-size: 13px; color: var(--text-muted); }
.stats-periods a:hover { color: var(--text); }
.stats-periods a.active { background: var(--accent-dark); color: #fff; }
.stats-ot-refresh { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--text-faint); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.kpi.money { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.kpi-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); }
.kpi.money .kpi-label, .kpi.money .kpi-sub { color: rgba(255,255,255,.65); }
.kpi-value { font-size: 28px; font-weight: 800; margin: 6px 0 4px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kpi-sub { font-size: 12px; color: var(--text-faint); }
.chg { font-size: 12px; font-weight: 600; color: var(--text-faint); white-space: nowrap; }
.chg.up { color: var(--good); }
.chg.down { color: var(--bad); }
.stats-note { font-size: 12px; color: var(--text-faint); margin: 8px 0 0; }
.stats-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-top: 16px; }
.stats-card h2 { font-size: 16px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.stats-card h2 .hint, .stats-card h2 .legend { font-size: 12px; font-weight: 400; color: var(--text-faint); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 8px; vertical-align: -1px; }
.legend .lv, .stats-chart .bv { background: #ffc2d3; }
.legend .lc, .stats-chart .bc { background: var(--accent); }
.stats-chart { display: flex; align-items: stretch; height: 200px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.stats-chart .day { flex: 1; position: relative; display: flex; justify-content: center; border-radius: 4px 4px 0 0; }
.stats-chart .day:hover { background: var(--bg); }
.stats-chart .bv, .stats-chart .bc { position: absolute; bottom: 0; width: 70%; max-width: 28px; border-radius: 3px 3px 0 0; }
.stats-chart .lbl { position: absolute; top: 100%; margin-top: 4px; font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.insights { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.insights li { padding: 10px 12px 10px 36px; border-radius: 8px; font-size: 14px; position: relative; background: var(--bg); }
.insights li::before { position: absolute; left: 12px; top: 10px; }
.insights li.good { background: #f0fdf4; } .insights li.good::before { content: "💰"; }
.insights li.warn { background: #fffbeb; } .insights li.warn::before { content: "⚠️"; }
.insights li.bad { background: #fef2f2; } .insights li.bad::before { content: "⛔"; }
.insights li.info::before { content: "ℹ️"; }
.table-scroll { overflow-x: auto; }
.stats-table th[data-type] { cursor: pointer; user-select: none; white-space: nowrap; }
.stats-table th[data-type]:hover { color: var(--text); }
.stats-table th.sorted-desc::after { content: " ▼"; }
.stats-table th.sorted-asc::after { content: " ▲"; }
.stats-table td { white-space: nowrap; }
.stats-table td.money { font-weight: 700; }
.stats-table tr.muted td { opacity: .55; }
.stats-table .sub { font-size: 12px; color: var(--text-faint); font-weight: 400; }
.stats-table .sub.good { color: var(--good); }
.stats-model { display: flex; gap: 10px; align-items: center; }
.stats-model a { font-weight: 600; color: var(--text); }
.stats .tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 5px; background: var(--bg); color: var(--text-muted); margin-left: 4px; }
.stats .tag.bad { background: #fef2f2; color: var(--bad); }
.stats .tag.warn { background: #fffbeb; color: var(--warn); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 16px; }
.breakdown table { width: 100%; border-collapse: collapse; font-size: 13px; }
.breakdown th { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--text-faint); text-align: right; padding: 0 0 6px 8px; }
.breakdown td { padding: 5px 0 5px 8px; text-align: right; white-space: nowrap; }
.breakdown td.bd-label { text-align: left; padding-left: 0; position: relative; width: 100%; max-width: 0; }
.bd-bar { position: absolute; left: 0; top: 2px; bottom: 2px; background: #ffe4ec; border-radius: 4px; }
.bd-text { position: relative; padding: 0 6px; display: block; overflow: hidden; text-overflow: ellipsis; }
.bd-text a { color: var(--text); }
.stats-help summary { cursor: pointer; font-weight: 600; }
.stats-help dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 14px 0 0; font-size: 14px; }
.stats-help dt { font-weight: 600; }
.stats-help dd { margin: 0; color: var(--text-muted); }

/* admin: превью SEO-текста в форме модели */
.seo-preview { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; }
.seo-preview h2 { font-size: 17px; margin: 0 0 6px; }
.seo-preview h3 { font-size: 15px; margin: 16px 0 6px; }
.seo-preview p { color: var(--text-muted); line-height: 1.6; }
.seo-serp { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-top: 12px; font-family: arial, sans-serif; }
.serp-title { color: #1a0dab; font-size: 18px; }
.serp-url { color: #006621; font-size: 13px; margin: 2px 0; }
.serp-desc { color: #4d5156; font-size: 13px; line-height: 1.5; }
.seo-preview details summary { cursor: pointer; font-weight: 600; }
.seo-langs { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 12px; color: var(--text-faint); font-size: 13px; }

.login-box, .form-box {
  max-width: 420px;
  margin: 60px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.form-box.wide { max-width: 640px; }

.login-box h1, .form-box h1 { font-size: 20px; margin: 0 0 18px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 5px; }
.field input[type="text"],
.field input[type="password"],
.field input[type="number"],
.field input[type="url"],
.field textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; }
.field.checkbox { display: flex; align-items: center; gap: 8px; }
.field.checkbox label { margin: 0; }

.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.notice-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}

.import-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
.import-box label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.import-row { display: flex; gap: 8px; }
.import-row input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.import-row input:focus { border-color: var(--accent); }
.import-row .btn { white-space: nowrap; }
.import-box .hint { margin: 8px 0 0; font-size: 12px; color: var(--text-faint); }

.or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  font-size: 12px;
  color: var(--text-faint);
}
.or-divider::before, .or-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

.avatar-preview {
  display: block;
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 6px;
}

.error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}

.actions-row { display: flex; gap: 8px; margin-top: 18px; }
