﻿:root {
  --bg: #f5f8ff;
  --surface: #ffffff;
  --surface-soft: #f1f6ff;
  --text: #1f2f4d;
  --muted: #5d6f93;
  --line: #d9e5ff;
  --primary: #2d73ff;
  --primary-2: #37c6ff;
  --accent: #ffb347;
  --ok: #41b883;
  --warn: #e09d2f;
  --danger: #e45773;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 16px 35px rgba(53, 88, 151, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #edf5ff 0%, #f8fbff 45%, #fff8ed 100%);
}

a {
  color: inherit;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.siteHeader {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.headerInner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brandLogo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(57, 108, 192, 0.22);
}

.brandText {
  display: grid;
  line-height: 1.1;
}

.brandText strong {
  font-size: 16px;
}

.brandText span {
  color: var(--muted);
  font-size: 13px;
}

.mainNav {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.mainNav a {
  text-decoration: none;
  color: #355287;
  font-weight: 800;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 10px;
}

.mainNav a:hover {
  background: var(--surface-soft);
}

.headerContacts {
  display: flex;
  align-items: center;
  gap: 8px;
}

.headerPhone,
.headerLink {
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  color: #2f4e86;
}

.headerPhone {
  background: linear-gradient(90deg, #f8fbff, #eef5ff);
}

.hero {
  padding: 26px 0 8px;
}

.heroInner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  background: linear-gradient(145deg, #ffffff, #f4f9ff);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) + 6px);
  padding: 26px;
  box-shadow: var(--shadow);
}

.heroTag {
  margin: 0;
  color: #4871b2;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(34px, 5.1vw, 52px);
  line-height: 1.05;
}

.heroLead {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.heroActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.heroMeta {
  margin-top: 14px;
}

.statusLine {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.heroVisual {
  display: flex;
  align-items: stretch;
}

.heroVisual img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid #deebff;
  background: linear-gradient(135deg, #edf8ff, #fff5df);
}

.section {
  padding: 10px 0 8px;
}

.section .container {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}

.sectionAlt .container {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.sectionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.sectionHead.column {
  align-items: flex-start;
  justify-content: flex-start;
}

.sectionHead h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.08;
}

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

.help {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.small {
  font-size: 13px;
}

.search {
  min-width: 250px;
  max-width: 440px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
}

.cards {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.card {
  grid-column: span 12;
  background: #fff;
  border: 1px solid #dce8ff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(62, 99, 164, 0.11);
}

@media (min-width: 760px) {
  .card {
    grid-column: span 6;
  }
}

@media (min-width: 1080px) {
  .card {
    grid-column: span 4;
  }
}

.cardImg {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: linear-gradient(140deg, #ecf7ff, #fff2d9);
}

.cardBody {
  padding: 12px;
}

.cardTitle strong {
  font-size: 18px;
  line-height: 1.2;
}

.cardMeta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.cardActions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #3c568d;
  border: 1px solid #d6e4ff;
  background: #f4f8ff;
  border-radius: 999px;
  padding: 7px 10px;
}

.badge.ok {
  color: #2e7e5f;
  border-color: #b6e6d0;
  background: #eafaf3;
}

.badge.warn {
  color: #946420;
  border-color: #ffd89b;
  background: #fff7ea;
}

.badge.demo {
  color: #7d52a9;
  border-color: #e4cdfc;
  background: #f8f0ff;
}

.rankingWrap {
  margin-top: 10px;
}

.rankTable {
  display: grid;
  gap: 8px;
}

.rankHead,
.rankRow {
  display: grid;
  grid-template-columns: 72px 1fr 88px;
  align-items: center;
  gap: 10px;
}

.rankHead {
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rankRow {
  background: #fff;
  border: 1px solid #dae7ff;
  border-radius: 12px;
  padding: 9px 10px;
}

.rankRow.you {
  border-color: #b8e8d2;
  background: #effbf5;
}

.rankPos {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
}

.rankName {
  font-size: 15px;
  font-weight: 800;
}

.rankVotes {
  font-size: 20px;
  text-align: right;
  font-weight: 900;
  color: var(--primary);
}

.contactsGrid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: start;
}

.contacts h2 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 40px);
}

.contacts p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 16px;
}

.contactLinks {
  display: grid;
  gap: 8px;
}

.contactLinks a {
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  color: #345286;
}

.siteFooter {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.footerInner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footerInner p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.footerNav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footerNav a {
  text-decoration: none;
  color: #345286;
  font-weight: 800;
  font-size: 14px;
  padding: 4px 2px;
}

.btn {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  color: #2f4d85;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  padding: 11px 14px;
}

.btn.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6e3ff;
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  color: #365489;
}

.modalBackdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 35, 63, 0.45);
  z-index: 80;
}

.modal {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 36px rgba(30, 55, 100, 0.28);
  overflow: hidden;
}

.modalHeader {
  padding: 14px 16px;
  border-bottom: 1px solid #e3edff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modalHeader h4 {
  margin: 0;
  font-size: 21px;
}

.modalBody {
  padding: 16px;
}

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

.field {
  grid-column: span 12;
}

@media (min-width: 720px) {
  .field.half {
    grid-column: span 6;
  }
}

label {
  display: block;
  margin: 0 0 6px;
  color: #4c6798;
  font-size: 14px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  border: 1px solid #d5e3ff;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: #78a7ff;
  box-shadow: 0 0 0 3px rgba(120, 167, 255, 0.16);
}

.modalActions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 90;
  display: none;
  min-width: 260px;
  max-width: 420px;
  background: #fff;
  border: 1px solid #d5e4ff;
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(45, 73, 128, 0.22);
  padding: 10px 12px;
}

.toast strong {
  display: block;
  margin-bottom: 2px;
}

.toast.ok {
  border-color: #b9e7d2;
}

.toast.bad {
  border-color: #f3bdc8;
}

@media (max-width: 1020px) {
  .headerInner {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
    padding: 10px 0;
  }

  .mainNav {
    justify-content: flex-start;
  }

  .headerContacts {
    flex-wrap: wrap;
  }

  .heroInner {
    grid-template-columns: 1fr;
  }

  .contactsGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 18px);
  }

  .section .container,
  .heroInner {
    padding: 14px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .heroLead {
    font-size: 16px;
  }

  .sectionHead h2,
  .contacts h2 {
    font-size: 30px;
  }

  .rankHead,
  .rankRow {
    grid-template-columns: 60px 1fr 70px;
  }
}
