/* ============================================================
   ОтзывМетр — дизайн-система v2
   Шрифт: Manrope · Палитра: indigo/violet + slate · Радиусы 12–18
   ============================================================ */
:root {
  --bg: #f5f6fa;
  --bg-deep: #eef0f7;
  --surface: #ffffff;
  --text: #101526;
  --text-soft: #626b84;
  --line: #e6e9f2;
  --line-strong: #d4d9e8;

  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --primary-dark: #4338ca;
  --primary-soft: #eef0ff;
  --primary-grad: linear-gradient(135deg, #4f46e5, #7c3aed);

  --accent: #f59e0b;
  --good: #059669;
  --good-soft: #ecfdf5;
  --mid: #d97706;
  --bad: #dc2626;
  --bad-soft: #fef2f2;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow-xs: 0 1px 2px rgba(16, 21, 38, .05);
  --shadow: 0 1px 2px rgba(16, 21, 38, .04), 0 8px 24px -8px rgba(16, 21, 38, .10);
  --shadow-lg: 0 2px 6px rgba(16, 21, 38, .05), 0 18px 44px -12px rgba(16, 21, 38, .18);
  --ring: 0 0 0 3px rgba(79, 70, 229, .18);
  --font: 'Manrope', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.58; font-size: 16px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column; min-height: 100vh;
}
img { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style-position: inside; }
::selection { background: #c7d2fe; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; width: 100%; }
.container-narrow { max-width: 860px; }
.muted { color: var(--text-soft); font-size: .92em; }
.mt { margin-top: 28px; }
.hidden { display: none !important; }

h1 { font-size: 1.85rem; line-height: 1.22; margin-bottom: .4em; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.4rem; margin-bottom: .5em; font-weight: 800; letter-spacing: -.015em; }
h3 { font-size: 1.05rem; font-weight: 700; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px; border-radius: 12px; border: none; cursor: pointer;
  font: 700 .95rem var(--font); text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: var(--primary-grad); color: #fff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, .35), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(79, 70, 229, .42), inset 0 1px 0 rgba(255,255,255,.18); transform: translateY(-1px); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline { background: var(--surface); color: var(--primary); border: 1.5px solid var(--line-strong); }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-soft); }
.btn-light { background: #fff; color: var(--primary); }
.btn-outline-light { background: rgba(255,255,255,.07); color: #fff; border: 1.5px solid rgba(255,255,255,.45); backdrop-filter: blur(4px); }
.btn-outline-light:hover { background: rgba(255,255,255,.16); }
.btn-sm { padding: 8px 15px; font-size: .86rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: none; color: var(--primary); cursor: pointer; font: inherit; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.inline-form { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Шапка ---------- */
.site-header {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; align-items: center; gap: 22px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.32rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); text-decoration: none !important; }
.logo-mark { display: inline-flex; filter: drop-shadow(0 3px 8px rgba(99, 102, 241, .35)); }
.logo-text em { font-style: normal; background: var(--primary-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.header-search { flex: 1; max-width: 440px; display: flex; position: relative; }
.header-search input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 10px 44px 10px 15px; font: 500 .92rem var(--font); background: var(--bg); outline: none; min-width: 0;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.header-search input:focus { border-color: var(--primary); background: #fff; box-shadow: var(--ring); }
.header-search button {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  border: none; background: var(--primary-grad); color: #fff; width: 32px; height: 32px;
  border-radius: 9px; cursor: pointer; font-size: .9rem; display: grid; place-items: center;
}
.header-nav { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.header-nav > a { color: var(--text); font-weight: 700; font-size: .92rem; text-decoration: none !important; padding: 6px 2px; border-bottom: 2px solid transparent; transition: color .12s, border-color .12s; }
.header-nav > a:hover, .header-nav > a.active { color: var(--primary); border-color: var(--primary); }
.header-nav > a.header-cta { border-bottom: none; }
.nav-user { display: inline-flex; align-items: center; gap: 8px; }
.nav-admin { position: relative; }
.nav-badge {
  display: inline-block; background: var(--bad); color: #fff; border-radius: 20px;
  font-size: .68rem; font-weight: 800; padding: 1px 7px; margin-left: 5px; vertical-align: 2px;
}
.burger { display: none; background: none; border: none; cursor: pointer; padding: 10px; margin-left: auto; }
.burger span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; transition: .2s; }

/* ---------- Аватары и монограммы ---------- */
.avatar {
  width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, hsl(var(--hue, 220) 65% 52%), hsl(calc(var(--hue, 220) + 30) 65% 42%));
  color: #fff; font-weight: 800; font-size: 1.05rem; flex-shrink: 0;
  box-shadow: inset 0 -2px 6px rgba(0,0,0,.14);
}
.avatar-sm { width: 30px; height: 30px; font-size: .8rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }

.company-logo {
  width: 46px; height: 46px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, hsl(var(--hue, 220) 62% 95%), hsl(var(--hue, 220) 60% 88%));
  color: hsl(var(--hue, 220) 55% 38%);
  border: 1px solid hsl(var(--hue, 220) 45% 84%);
  font-weight: 800; font-size: 1.15rem; flex-shrink: 0;
}
.company-logo-sm { width: 34px; height: 34px; font-size: .9rem; border-radius: 10px; }
.company-logo-lg { width: 68px; height: 68px; font-size: 1.7rem; border-radius: 18px; }

/* ---------- Иконки категорий ---------- */
.cat-tile {
  width: 44px; height: 44px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, hsl(var(--h, 220) 85% 96%), hsl(var(--h, 220) 75% 91%));
  color: hsl(var(--h, 220) 62% 44%);
  border: 1px solid hsl(var(--h, 220) 55% 87%);
  flex-shrink: 0; transition: transform .18s ease;
}
.page-title-icon { display: flex; align-items: center; gap: 12px; }
.page-title-icon .cat-tile { width: 48px; height: 48px; }

/* ---------- Звёзды и рейтинги ---------- */
.stars { display: inline-flex; gap: 1px; font-size: 1rem; line-height: 1; }
.star { color: #d8dcea; }
.star.on { color: var(--accent); text-shadow: 0 1px 3px rgba(245, 158, 11, .35); }
.rating-good b { color: var(--good); }
.rating-mid b { color: var(--mid); }
.rating-bad b { color: var(--bad); }
.rec-yes { color: var(--good); font-weight: 700; font-size: .88rem; }
.rec-no { color: var(--bad); font-weight: 700; font-size: .88rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(52rem 30rem at 82% -12%, rgba(139, 92, 246, .55), transparent 60%),
    radial-gradient(40rem 26rem at -8% 108%, rgba(56, 189, 248, .32), transparent 55%),
    linear-gradient(150deg, #171a3b 0%, #23277a 48%, #3b3bbb 100%);
  padding: 74px 0 62px;
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.13) 1px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 75%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 75%);
}
.hero::after {
  content: ''; position: absolute; right: -140px; top: -140px; width: 480px; height: 480px;
  background: conic-gradient(from 120deg, rgba(255,255,255,.12), transparent 32%);
  border-radius: 50%; pointer-events: none;
}
.hero-inner { max-width: 760px; position: relative; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; }
.hero-sub { font-size: 1.12rem; opacity: .88; margin: 14px 0 28px; max-width: 560px; }
.hero-search { display: flex; max-width: 600px; position: relative; }
.hero-search input {
  flex: 1; border: 1px solid rgba(255,255,255,.18); border-radius: 15px; padding: 17px 158px 17px 20px;
  font: 500 1rem var(--font); outline: none; min-width: 0; color: var(--text);
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 34px -10px rgba(10, 12, 40, .55);
  transition: box-shadow .15s;
}
.hero-search input:focus { box-shadow: 0 12px 34px -10px rgba(10, 12, 40, .55), var(--ring); }
.hero-search .btn { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); padding: 11px 20px; border-radius: 11px; }
.hero-search .btn:hover { transform: translateY(calc(-50% - 1px)); }
.hero-stats { display: flex; gap: 0; margin-top: 38px; }
.hero-stats div { display: flex; flex-direction: column; padding: 0 34px; border-left: 1px solid rgba(255,255,255,.18); }
.hero-stats div:first-child { padding-left: 0; border-left: none; }
.hero-stats b { font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; }
.hero-stats span { opacity: .72; font-size: .88rem; }

/* ---------- Секции ---------- */
.section { padding: 52px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-link { font-weight: 700; font-size: .92rem; white-space: nowrap; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

/* Категории */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.category-card {
  display: flex; align-items: center; gap: 13px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px;
  color: var(--text); text-decoration: none !important;
  box-shadow: var(--shadow-xs);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
}
.category-card:hover { border-color: hsl(var(--h, 226) 60% 78%); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.category-card:hover .cat-tile { transform: scale(1.08); }
.category-card-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; padding-right: 4px; }
.category-card-body b { font-weight: 700; font-size: .93rem; line-height: 1.28; overflow-wrap: anywhere; }
.category-card-body small { color: var(--text-soft); font-size: .78rem; }
.category-arrow { margin-left: 2px; color: var(--line-strong); font-weight: 700; transition: color .15s, transform .15s; flex-shrink: 0; }
.category-card:hover .category-arrow { color: var(--primary); transform: translateX(3px); }

/* ---------- Карточки компаний ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.company-list { display: flex; flex-direction: column; gap: 10px; }
.company-card {
  display: flex; align-items: center; gap: 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px;
  color: var(--text); text-decoration: none !important; box-shadow: var(--shadow-xs);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.company-card:hover { border-color: #c7cdf0; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.company-card-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.company-card-name { font-weight: 700; }
.company-card-legal { color: var(--text-soft); font-size: .82rem; }
.company-card-rating { display: flex; align-items: center; gap: 8px; font-size: .9rem; }

/* ---------- Каталог ---------- */
.breadcrumbs { font-size: .85rem; color: var(--text-soft); margin: 20px 0 14px; }
.breadcrumbs a { color: var(--text-soft); }
.breadcrumbs a:hover { color: var(--primary); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.page-desc { max-width: 720px; margin-bottom: 20px; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin: 10px 0 46px; }
.catalog-card {
  display: flex; gap: 15px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; color: var(--text); text-decoration: none !important;
  box-shadow: var(--shadow-xs);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.catalog-card:hover { border-color: hsl(var(--h, 226) 60% 78%); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.catalog-card:hover .cat-tile { transform: scale(1.08); }
.catalog-card-body { display: flex; flex-direction: column; gap: 4px; }
.catalog-count { color: var(--primary); font-weight: 800; font-size: .84rem; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 18px 0 16px; }
.sort-tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; flex-wrap: wrap; box-shadow: var(--shadow-xs); }
.sort-tabs a {
  padding: 7px 15px; border-radius: 9px; font-size: .86rem; font-weight: 700;
  color: var(--text-soft); text-decoration: none !important; transition: background .12s, color .12s;
}
.sort-tabs a.active { background: var(--primary-grad); color: #fff; box-shadow: 0 2px 6px rgba(79,70,229,.3); }
.sort-tabs a:not(.active):hover { background: var(--primary-soft); color: var(--primary); }

/* ---------- Страница компании ---------- */
.company-hero { display: flex; justify-content: space-between; gap: 30px; padding: 30px; margin-bottom: 26px; flex-wrap: wrap; }
.company-hero-main { display: flex; gap: 20px; flex: 1; min-width: 280px; }
.company-hero-main h1 { font-size: 1.5rem; }
.company-req { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; margin: 4px 0; color: var(--text-soft); }
.company-desc { margin-top: 10px; font-size: .93rem; max-width: 560px; }
.company-hero-side { width: 300px; display: flex; flex-direction: column; gap: 14px; }
.big-rating { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.big-rating > b { font-size: 2.7rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.big-rating .stars { font-size: 1.25rem; }
.rec-pct { color: var(--good); font-weight: 800; font-size: .9rem; }
.breakdown { display: flex; flex-direction: column; gap: 5px; }
.breakdown-row { display: grid; grid-template-columns: 28px 1fr 30px; align-items: center; gap: 8px; font-size: .82rem; }
.bar { height: 8px; background: var(--bg-deep); border-radius: 5px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 5px; }
.bar-5, .bar-4 { background: linear-gradient(90deg, #10b981, #059669); }
.bar-3 { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.bar-2, .bar-1 { background: linear-gradient(90deg, #f87171, #dc2626); }

.company-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; margin-bottom: 56px; }
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-card { padding: 18px; }
.sidebar-card h3 { margin-bottom: 12px; }
.sidebar-company { display: flex; gap: 10px; align-items: center; padding: 8px 0; color: var(--text); text-decoration: none !important; border-top: 1px solid var(--line); }
.sidebar-company:first-of-type { border-top: none; }
.sidebar-company span { display: flex; flex-direction: column; }
.sidebar-company:hover b { color: var(--primary); }

/* ---------- Отзывы ---------- */
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.review-stack { display: flex; flex-direction: column; gap: 14px; }
.review-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-xs);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s;
}
.review-card:hover { box-shadow: var(--shadow-lg); border-color: #c7cdf0; transform: translateY(-2px); }
.review-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.company-chip, .user-chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; color: var(--text); text-decoration: none !important; }
.company-chip:hover span:last-child, a.user-chip:hover { color: var(--primary); }
span.user-chip { cursor: default; }
.review-card-title { margin: 2px 0 6px; font-size: 1.08rem; }
.review-card-title a { color: var(--text); }
.review-card-title a:hover { color: var(--primary); text-decoration: none; }
.review-card-body { color: var(--text-soft); font-size: .93rem; margin-bottom: 10px; }
.review-card-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; color: var(--text-soft); align-items: center; }

.review-full { padding: 30px; margin-bottom: 20px; }
.review-full-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.review-full-score { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.review-full-score .stars { font-size: 1.3rem; }
.review-full-title { font-size: 1.55rem; margin-bottom: 14px; }
.company-chip-big { display: flex; padding: 13px 15px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 14px; transition: border-color .15s; }
.company-chip-big:hover { border-color: var(--primary); }
.company-chip-big > span:last-child { display: flex; flex-direction: column; }
.review-full-body { margin: 14px 0; }
.review-full-body p { margin-bottom: 12px; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.pros, .cons { border-radius: var(--radius-sm); padding: 14px 16px; font-size: .93rem; }
.pros { background: var(--good-soft); border: 1px solid #a7f3d0; }
.cons { background: var(--bad-soft); border: 1px solid #fecaca; }
.pros b { color: var(--good); } .cons b { color: var(--bad); }
.pros p, .cons p { margin-top: 4px; }
.review-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; }
.vote-btn.voted { background: var(--primary-soft); border-color: var(--primary); }
.complaint-form { margin-top: 14px; padding: 16px; background: var(--bg); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 10px; }
.complaint-form select, .complaint-form textarea { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; font: .9rem var(--font); }

.comments-card { padding: 24px 28px; margin-bottom: 20px; }
.comment { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.comment:first-of-type { border-top: none; }
.comment-head { display: flex; align-items: center; gap: 8px; font-size: .88rem; margin-bottom: 2px; flex-wrap: wrap; }
.comment p { font-size: .94rem; }
.comment-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; margin-top: 14px; }
.comment-form .field-row { width: 100%; }
.comment-form textarea { width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font: .94rem var(--font); resize: vertical; }
.comment-form textarea:focus { border-color: var(--primary); outline: none; box-shadow: var(--ring); }

/* Фото в отзывах */
.review-photos { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.review-photo { display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); transition: transform .15s ease, box-shadow .15s ease; }
.review-photo:hover { transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow-lg); }
.review-photo img { display: block; width: 132px; height: 132px; object-fit: cover; }

/* ---------- Формы ---------- */
.form-card { padding: 28px 32px; display: flex; flex-direction: column; gap: 16px; margin-bottom: 50px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.field > span { font-weight: 700; font-size: .92rem; }
.req { color: var(--bad); }
.field input, .field textarea, .field select {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px;
  font: 500 .95rem var(--font); background: #fff; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); outline: none; box-shadow: var(--ring); }
.field textarea { resize: vertical; }
.field-row { display: flex; gap: 16px; }
.form-note { font-size: .85rem; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; font-size: 2.2rem; }
.star-input input { display: none; }
.star-input label { color: #d8dcea; cursor: pointer; transition: transform .1s, color .1s; }
.star-input label:hover { transform: scale(1.12); }
.star-input label:hover, .star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--accent); }
.file-input { padding: 12px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--bg); width: 100%; font: .9rem var(--font); cursor: pointer; transition: border-color .15s; }
.file-input:hover { border-color: var(--primary); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- Авторизация ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 40px 20px 70px; }
.auth-card { width: 420px; max-width: 100%; }
.auth-alt { text-align: center; }
.demo-creds { background: var(--bg); border-radius: var(--radius-sm); padding: 12px 16px; font-size: .84rem; display: flex; flex-direction: column; gap: 3px; }
.demo-creds code { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; }

/* ---------- Профиль ---------- */
.profile-head { display: flex; align-items: center; gap: 20px; padding: 24px 28px; margin-bottom: 24px; flex-wrap: wrap; }
.profile-stats { display: flex; gap: 28px; margin-left: auto; }
.profile-stats div { display: flex; flex-direction: column; align-items: center; }
.profile-stats b { font-size: 1.4rem; color: var(--primary); }
.profile-stats span { font-size: .8rem; color: var(--text-soft); }
.profile-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; margin-bottom: 50px; }
.reject-note { background: var(--bad-soft); color: #991b1b; border-radius: 10px; padding: 8px 12px; font-size: .87rem; margin: 8px 0; }

/* ---------- Рейтинг ---------- */
.rating-table { display: flex; flex-direction: column; gap: 8px; margin-bottom: 50px; }
.rating-row {
  display: flex; align-items: center; gap: 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px;
  color: var(--text); text-decoration: none !important; box-shadow: var(--shadow-xs);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.rating-row:hover { border-color: #c7cdf0; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.rating-pos { width: 34px; text-align: center; font-weight: 800; color: var(--text-soft); font-size: 1.05rem; }
.rating-pos.top { color: var(--accent); font-size: 1.2rem; }
.rating-name { display: flex; flex-direction: column; min-width: 0; }
.rating-score { margin-left: auto; text-align: right; display: flex; flex-direction: column; }
.rating-score b { font-size: 1.2rem; }

/* ---------- Флеш-сообщения ---------- */
.flash { border-radius: var(--radius-sm); padding: 13px 18px; margin: 14px 0; font-size: .93rem; border: 1px solid; }
.flash ul { list-style: none; }
.flash-ok { background: var(--good-soft); border-color: #a7f3d0; color: #065f46; }
.flash-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.flash-err { background: var(--bad-soft); border-color: #fecaca; color: #991b1b; }

/* ---------- Админка ---------- */
.admin-tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin: 10px 0 24px; flex-wrap: wrap; }
.admin-tabs a {
  padding: 10px 18px; font-weight: 700; font-size: .93rem; color: var(--text-soft);
  text-decoration: none !important; border-bottom: 2.5px solid transparent; margin-bottom: -2px;
}
.admin-tabs a.active, .admin-tabs a:hover { color: var(--primary); border-color: var(--primary); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.stat-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-direction: column; color: var(--text); text-decoration: none !important;
  box-shadow: var(--shadow-xs);
}
.stat-tile b { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-tile span { font-size: .85rem; color: var(--text-soft); }
.stat-warn b { color: var(--mid); }
a.stat-tile:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.admin-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 40px; box-shadow: var(--shadow-xs); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th { text-align: left; padding: 12px 16px; background: var(--bg); font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-soft); }
.admin-table td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.row-banned { opacity: .55; }
.mod-card { border-left: 4px solid var(--accent); }
.mod-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.reject-form input { border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 10px; font: .85rem var(--font); width: 220px; }
.check-label { font-size: .85rem; display: inline-flex; gap: 6px; align-items: center; }
.admin-search { border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 14px; font: .92rem var(--font); width: 300px; max-width: 100%; }
.admin-search:focus { border-color: var(--primary); outline: none; box-shadow: var(--ring); }

/* ---------- Бейджи ---------- */
.badge { display: inline-block; border-radius: 20px; font-size: .72rem; font-weight: 800; padding: 2px 10px; vertical-align: 1px; }
.badge-mod { background: var(--primary-soft); color: var(--primary); }
.badge-pending { background: #fffbeb; color: #92400e; }
.badge-approved { background: var(--good-soft); color: #065f46; }
.badge-rejected { background: var(--bad-soft); color: #991b1b; }

/* ---------- Разное ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 28px 0 46px; flex-wrap: wrap; }
.page { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700; text-decoration: none !important; padding: 0 8px; transition: border-color .12s, color .12s; }
.page:hover { border-color: var(--primary); color: var(--primary); }
.page.current { background: var(--primary-grad); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(79,70,229,.3); }
.page.dots { border: none; background: none; }
.empty-state { background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 38px; text-align: center; color: var(--text-soft); margin: 14px 0 40px; }
.plain-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 8px 0 30px; }
.plain-list .stars { font-size: .85rem; }
.text-page { padding: 32px 38px; margin-bottom: 50px; }
.text-page h2 { margin-top: 22px; }
.text-page ul, .text-page ol { margin: 8px 0 8px 6px; display: flex; flex-direction: column; gap: 6px; }
.text-page p { margin: 8px 0; }
.error-wrap { text-align: center; padding: 70px 20px 90px; }
.error-code { font-size: 6rem; font-weight: 800; background: var(--primary-grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .25; line-height: 1; }
.error-wrap .btn { margin-top: 20px; }

.cta-band { background:
  radial-gradient(40rem 22rem at 85% 0%, rgba(139, 92, 246, .5), transparent 60%),
  linear-gradient(140deg, #171a3b, #23277a); color: #fff; }
.cta-inner { text-align: center; max-width: 640px; }
.cta-inner p { opacity: .85; margin: 10px 0 22px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Чёрный список ---------- */
.nav-blacklist { color: var(--bad) !important; }
.nav-blacklist:hover, .nav-blacklist.active { border-color: var(--bad) !important; }
.blacklist-card { border-left: 4px solid var(--bad); }
.blacklist-note { background: var(--bad-soft); border: 1px solid #fecaca; color: #991b1b; border-radius: 10px; padding: 10px 14px; font-size: .92rem; margin: 10px 0; }
.blacklist-banner { margin-top: 14px; }
.blacklist-banner a { color: inherit; text-decoration: underline; }

/* ---------- Подвал ---------- */
.site-footer { background: #0d1226; color: #9aa4c2; margin-top: auto; position: relative; }
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--primary-grad); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 30px; padding: 48px 20px 30px; }
.footer-grid h4 { color: #fff; margin-bottom: 12px; font-size: .95rem; }
.footer-grid a { display: block; color: #9aa4c2; font-size: .9rem; padding: 3px 0; }
.footer-grid a:hover { color: #fff; text-decoration: none; }
.footer-logo { color: #fff; margin-bottom: 10px; }
.footer-note { font-size: .85rem; margin-bottom: 8px; }
.footer-demo { color: #6b7699; }
.footer-bottom { border-top: 1px solid #1e2745; padding: 16px 20px; font-size: .82rem; color: #6b7699; }

/* ---------- Появление при скролле ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1000px) {
  .company-layout, .profile-layout { grid-template-columns: 1fr; }
  .company-hero-side { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .header-search { display: none; }
  .burger { display: block; }
  .header-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 14px 20px; gap: 4px;
    box-shadow: var(--shadow-lg);
  }
  .header-nav.open { display: flex; }
  .header-nav > a, .header-nav form { padding: 10px 6px; border-bottom: none; }
  .two-cols { grid-template-columns: 1fr; gap: 30px; }
  .hero-stats div { padding: 0 20px; }
  .field-row { flex-direction: column; gap: 16px; }
  .pros-cons { grid-template-columns: 1fr; }
  .profile-stats { margin-left: 0; width: 100%; justify-content: space-between; }
  .review-full { padding: 20px; }
  .text-page { padding: 22px; }
}
@media (max-width: 520px) {
  .hero { padding: 48px 0 42px; }
  .hero-search input { padding-right: 20px; }
  .hero-search { flex-direction: column; gap: 10px; }
  .hero-search .btn { position: static; transform: none; width: 100%; }
  .hero-search .btn:hover { transform: none; }
  .hero-stats { flex-wrap: wrap; gap: 14px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .company-hero { padding: 18px; }
  .company-hero-main { flex-direction: column; }
  .company-hero-main h1 { font-size: 1.25rem; }
  .rating-score .muted { display: none; }
  h1 { font-size: 1.5rem; }
  .review-photo img { width: calc((100vw - 100px) / 3); height: calc((100vw - 100px) / 3); }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .category-card { flex-direction: column; align-items: flex-start; gap: 10px; }
  .category-arrow { display: none; }
}

/* ---------- Лента отзывов на главной ---------- */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.feed .review-card { height: 100%; display: flex; flex-direction: column; }
.feed .review-card-body { flex: 1; }
.form-divider { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
@media (max-width: 520px) { .feed { grid-template-columns: 1fr; } }
.field .star-input { align-self: flex-start; }
.bulk-row { border: none; padding: 0; display: flex; flex-direction: column; gap: 14px; margin-bottom: 6px; }
.bulk-row .bulk-remove { align-self: flex-end; font-size: .85rem; color: var(--bad); }
.field-invalid input, .field-invalid textarea, .field-invalid select { border-color: var(--bad) !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.field-err { color: var(--bad); font-weight: 700; font-size: .84rem; }
.char-counter { font-size: .8rem; }
.char-counter.enough { color: var(--good); }

/* ---------- Страница отзыва: связка с компанией ---------- */
.review-page-h1 { font-size: 1.25rem; color: var(--text-soft); font-weight: 700; letter-spacing: 0; margin-bottom: 6px; }
.review-full .review-full-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.company-chip-cta { margin-left: auto; color: var(--primary); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.company-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; margin-bottom: 20px; flex-wrap: wrap; border-left: 4px solid var(--primary); }
.company-banner-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.company-banner-rating { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.company-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 520px) { .company-banner-actions { width: 100%; } .company-banner-actions .btn { flex: 1; } }

/* ---------- Hero: витрина с живыми отзывами ---------- */
.hero-grid { display: grid; grid-template-columns: 1fr 400px; gap: 48px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  color: #e3e6ff; font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 30px; padding: 6px 14px; margin-bottom: 18px; backdrop-filter: blur(4px);
}
.hero-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-chips-label { color: rgba(255,255,255,.6); font-size: .85rem; font-weight: 600; }
.hero-chip {
  color: #fff; text-decoration: none !important; font-size: .83rem; font-weight: 700;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  border-radius: 30px; padding: 5px 13px; transition: background .15s, transform .15s;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero-chip:hover { background: rgba(255,255,255,.22); transform: translateY(-1px); }

.hero-cards { position: relative; height: 380px; }
.hero-card {
  position: absolute; inset: 0 0 auto 0; display: flex; flex-direction: column; gap: 8px;
  background: rgba(255,255,255,.97); color: var(--text); text-decoration: none !important;
  border-radius: 18px; padding: 20px 22px;
  box-shadow: 0 24px 60px -18px rgba(6, 8, 40, .65);
  transform: rotate(1.6deg) translateY(24px);
  transition: transform .25s ease, box-shadow .25s ease;
}
.hero-card { z-index: 1; }
.hero-card:hover { transform: rotate(0deg) translateY(18px) scale(1.02); z-index: 3; }
.hero-card-back {
  transform: rotate(-3.2deg) translateY(196px) translateX(-16px) scale(.96);
  opacity: .92; z-index: 0;
}
.hero-card-back:hover { transform: rotate(-1deg) translateY(190px) translateX(-16px) scale(.99); }
.hero-card-head { display: flex; align-items: center; gap: 10px; }
.hero-card-company { font-weight: 800; font-size: .92rem; }
.hero-card-title { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.hero-card-body { color: var(--text-soft); font-size: .85rem; line-height: 1.45; }
.hero-card-meta { color: var(--text-soft); font-size: .78rem; }

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-cards { display: none; }
}

/* ---------- Полные отзывы и фото в карточках на странице компании ---------- */
.review-card-body-full { color: var(--text); }
.review-card-body-full p { margin-bottom: 10px; }
.review-card-body-full p:last-child { margin-bottom: 0; }
.review-card-pros { color: var(--good); font-size: .9rem; margin: 6px 0 0; }
.review-card-cons { color: var(--bad); font-size: .9rem; margin: 4px 0 0; }
.review-card-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 10px; }
.review-card-photo {
  display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  transition: transform .15s ease, box-shadow .15s ease;
}
.review-card-photo img { display: block; width: 104px; height: 104px; object-fit: cover; }
.review-card-photo:hover { transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow-lg); }
.review-card-photo-more {
  width: 104px; height: 104px; display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 1.1rem;
  text-decoration: none !important;
}

.footer-mail { display: inline-block; margin-top: 6px; font-weight: 700; }

/* Телефоны компании, собранные из отзывов */
.company-phones { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .92rem; }
.company-phone {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-weight: 700;
  text-decoration: none; border: 1px solid transparent; white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.company-phone:hover { border-color: var(--primary); }

/* Галерея компании — карусель под текстом в карточке */
.gallery-carousel { margin-top: 18px; max-width: 640px; }
.gallery-carousel-title { margin-bottom: 10px; font-size: .95rem; }
.gallery-carousel-wrap { position: relative; }
.company-gallery {
  display: flex; gap: 10px; overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding-bottom: 6px; scrollbar-width: thin;
}
.company-gallery::-webkit-scrollbar { height: 6px; }
.company-gallery::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255,255,255,.95); color: var(--primary);
  font-size: 1.4rem; line-height: 1; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); transition: background .15s, transform .15s;
}
.gallery-arrow:hover { background: var(--primary-soft); transform: translateY(-50%) scale(1.08); }
.gallery-arrow[hidden] { display: none; }
/* мало фото — обычный аккуратный ряд миниатюр, без карусельной обвязки */
.gallery-carousel-static .company-gallery { overflow: visible; flex-wrap: wrap; padding-bottom: 0; }
.gallery-arrow-prev { left: -10px; }
.gallery-arrow-next { right: -10px; }
.company-gallery-item {
  display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line);
  flex: 0 0 118px; width: 118px; height: 118px; scroll-snap-align: start;
  transition: transform .18s ease, box-shadow .18s ease;
}
.company-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.company-gallery-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.company-gallery-item:hover img { transform: scale(1.06); }

@media (max-width: 520px) {
  .review-card-photo img, .review-card-photo-more { width: calc((100vw - 40px - 40px - 16px) / 3); height: calc((100vw - 40px - 40px - 16px) / 3); }
}

@media (max-width: 700px) {
  .gallery-carousel { max-width: 100%; }
  .gallery-arrow { display: none; }  /* на тач-экранах листают свайпом */
}
