:root {
  --bg: #f5f7ff;
  --surface: #ffffff;
  --ink: #181a20;
  --muted: #667084;
  --line: #dce4f0;
  --line-strong: #c8d2df;
  --orange: #ff7a1a;
  --coral: #ff4f72;
  --cyan: #10a6ba;
  --green: #1f9d63;
  --violet: #6554c0;
  --blue: #2f6fed;
  --shadow: 0 18px 45px rgba(31, 41, 55, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(255, 122, 26, 0.08), transparent 28%),
    linear-gradient(225deg, rgba(16, 166, 186, 0.09), transparent 30%),
    repeating-linear-gradient(
      90deg,
      rgba(47, 111, 237, 0.045) 0,
      rgba(47, 111, 237, 0.045) 1px,
      transparent 1px,
      transparent 88px
    ),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 12px 32px;
  border-bottom: 1px solid rgba(210, 218, 229, 0.8);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 122, 26, 0.38);
  border-radius: var(--radius);
  background: #fff;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 20px;
  line-height: 1.05;
}

.brand small {
  margin-top: 4px;
  color: #0199ad;
  font-size: 13px;
  font-weight: 800;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.helped-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  min-width: 260px;
  padding: 0 18px;
  border: 1px solid rgba(16, 166, 186, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(16, 166, 186, 0.08), rgba(255, 122, 26, 0.08)),
    rgba(255, 255, 255, 0.86);
  color: var(--muted);
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.06);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.helped-counter strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
}

.header-link,
.header-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #2d3340;
  font-size: 14px;
  font-weight: 800;
}

.header-submit {
  border-color: rgba(255, 122, 26, 0.35);
  background: linear-gradient(135deg, #ff7a1a, #ff4f72);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(255, 100, 60, 0.18);
}

.icon-plus {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
}

.icon-plus::before,
.icon-plus::after {
  position: absolute;
  content: "";
  background: currentColor;
}

.icon-plus::before {
  top: 7px;
  left: 2px;
  width: 12px;
  height: 2px;
}

.icon-plus::after {
  top: 2px;
  left: 7px;
  width: 2px;
  height: 12px;
}

main,
.site-footer {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.section-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 42px;
  line-height: 1.08;
  font-weight: 950;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
}

.section-heading--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.mini-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.mini-metrics span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.06);
}

.mini-metrics strong {
  margin-right: 6px;
  color: var(--ink);
  font-size: 18px;
}

.model-strip {
  padding: 42px 0 10px;
}

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

.model-card {
  position: relative;
  display: flex;
  min-height: 208px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent), white 94%), #fff 54%),
    var(--surface);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
  text-align: left;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.model-card:hover,
.model-card.is-active {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 20px 38px color-mix(in srgb, var(--accent), transparent 78%);
}

.model-card.is-active::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--accent);
  content: "";
}

.model-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.model-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent), white 62%);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.model-logo {
  display: block;
  width: 28px;
  height: 28px;
}

.model-card h3 {
  margin: 16px 0 6px;
  font-size: 22px;
}

.model-card p {
  min-height: 46px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.model-price {
  color: var(--ink);
  font-size: 28px;
  font-weight: 950;
  line-height: 1.1;
}

.model-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.toolbar-band {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
  margin: 22px 0 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.07);
}

.filter-field {
  display: grid;
  gap: 7px;
}

.filter-field label,
.stock-toggle,
.sort-control span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-field input,
.filter-field select,
.sort-control select,
.submit-form input,
.submit-form select,
.submit-form textarea,
.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
}

.filter-field input,
.submit-form input,
.submit-form textarea,
.admin-field input,
.admin-field textarea {
  padding: 10px 12px;
}

.filter-field select,
.sort-control select,
.submit-form select,
.admin-field select {
  padding: 0 12px;
}

.filter-field input:focus,
.filter-field select:focus,
.sort-control select:focus,
.submit-form input:focus,
.submit-form select:focus,
.submit-form textarea:focus,
.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(16, 166, 186, 0.13);
}

.stock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.stock-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
  padding-bottom: 56px;
}

.offers-section,
.source-panel {
  min-width: 0;
}

.result-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 58px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.offer-heading-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.sort-control {
  display: grid;
  gap: 6px;
  min-width: 170px;
}

.sort-control select {
  min-height: 34px;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.offer-list {
  display: grid;
  gap: 10px;
}

.offer-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 1.35fr) 110px 142px 95px 80px minmax(232px, 0.95fr);
  gap: 16px;
  align-items: center;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(31, 41, 55, 0.06);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.offer-row:hover {
  border-color: color-mix(in srgb, var(--accent), white 48%);
  box-shadow: 0 16px 30px rgba(31, 41, 55, 0.09);
  transform: translateY(-1px);
}

.offer-title {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.offer-title strong {
  overflow: hidden;
  font-size: 17px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.offer-title span,
.offer-cell small {
  color: var(--muted);
  font-size: 12px;
}

.offer-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.offer-cell strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price {
  color: var(--orange);
  font-size: 20px;
  font-weight: 950;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 30px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
}

.status.in-stock {
  background: rgba(31, 157, 99, 0.12);
  color: var(--green);
}

.status.out-stock {
  background: rgba(98, 105, 120, 0.12);
  color: #7a8290;
}

.offer-cell--action {
  gap: 7px;
}

.offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.jump-link,
.vote-button,
.complaint-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 900;
}

.jump-link {
  min-width: 54px;
  padding: 0 12px;
  border: 1px solid rgba(16, 166, 186, 0.32);
  background: rgba(16, 166, 186, 0.08);
  color: var(--cyan);
}

.vote-button {
  gap: 5px;
  min-width: 76px;
  padding: 0 8px;
}

.vote-button strong {
  font-size: 12px;
  line-height: 1;
}

.vote-button--pull {
  border: 1px solid rgba(255, 79, 114, 0.34);
  background: rgba(255, 79, 114, 0.1);
  color: var(--coral);
}

.vote-button--pit {
  border: 1px solid rgba(102, 112, 132, 0.28);
  background: rgba(102, 112, 132, 0.09);
  color: #566074;
}

.complaint-link {
  width: 54px;
  border: 1px solid rgba(255, 79, 114, 0.32);
  background: rgba(255, 79, 114, 0.08);
  color: var(--coral);
}

.vote-message {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.source-panel {
  position: sticky;
  top: 86px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.07);
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
}

.source-item:last-child {
  border-bottom: 0;
}

.source-badge {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent), white 86%);
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.source-item strong {
  display: block;
  font-size: 14px;
}

.source-item small {
  color: var(--muted);
  font-size: 12px;
}

.source-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.submit-source,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  margin-top: 18px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--orange), var(--coral));
  color: #fff;
  font-weight: 900;
}

.site-footer {
  padding: 24px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-footer p {
  margin-bottom: 0;
}

.submit-dialog {
  width: min(520px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.submit-dialog::backdrop {
  background: rgba(17, 24, 39, 0.46);
  backdrop-filter: blur(6px);
}

.submit-form {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.submit-form h2 {
  margin-bottom: 0;
  font-size: 26px;
}

.submit-note {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.submit-contact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid rgba(16, 166, 186, 0.2);
  border-radius: var(--radius);
  background: rgba(16, 166, 186, 0.07);
  color: #087989;
  font-size: 13px;
  font-weight: 800;
}

.submit-contact strong {
  color: var(--ink);
}

.submit-message {
  min-height: 20px;
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.submit-message.is-error {
  color: var(--coral);
}

.submit-form label,
.admin-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.submit-form textarea,
.admin-field textarea {
  resize: vertical;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 20px;
}

.empty-state {
  padding: 34px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  text-align: center;
}

.admin-shell {
  width: min(1320px, calc(100% - 48px));
  margin: 32px auto 64px;
}

.install-shell {
  display: grid;
  min-height: 100vh;
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  place-items: center;
  padding: 32px 0;
}

.install-panel {
  width: 100%;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.install-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.install-heading h1 {
  font-size: 34px;
}

.install-status {
  min-height: 44px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(16, 166, 186, 0.22);
  border-radius: var(--radius);
  background: rgba(16, 166, 186, 0.08);
  color: var(--cyan);
  font-size: 14px;
  font-weight: 900;
}

.install-status.is-error {
  border-color: rgba(255, 79, 114, 0.32);
  background: rgba(255, 79, 114, 0.08);
  color: var(--coral);
}

.install-form {
  display: grid;
  gap: 14px;
}

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

.admin-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.admin-panel,
.admin-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.07);
}

.admin-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.admin-panel h2,
.admin-table-wrap h2 {
  margin: 0;
  font-size: 22px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-tab {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.admin-tab.is-active {
  border-color: var(--cyan);
  background: rgba(16, 166, 186, 0.09);
  color: var(--cyan);
}

.admin-table-wrap {
  overflow: hidden;
}

.admin-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-table td {
  color: #2d3340;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.admin-button.primary {
  border-color: rgba(16, 166, 186, 0.32);
  background: rgba(16, 166, 186, 0.09);
  color: var(--cyan);
}

.admin-button.danger {
  border-color: rgba(255, 79, 114, 0.32);
  background: rgba(255, 79, 114, 0.08);
  color: var(--coral);
}

.admin-message {
  min-height: 20px;
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.admin-message.is-error {
  color: var(--coral);
}

.crawler-result {
  border-bottom: 1px solid var(--line);
}

.crawler-summary {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 166, 186, 0.06);
}

.crawler-summary strong {
  color: var(--ink);
  font-size: 16px;
}

.crawler-summary span,
.crawler-log-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.crawler-actions {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.crawler-log-title {
  padding: 16px 18px 8px;
}

.crawler-pick {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

@media (max-width: 1260px) {
  .model-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .source-panel {
    position: static;
  }

  .offer-row {
    grid-template-columns: minmax(240px, 1fr) 110px 160px 100px 88px;
  }

  .offer-row .offer-cell--action {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 12px 18px;
  }

  .helped-counter {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }

  main,
  .site-footer,
  .admin-shell {
    width: min(100% - 28px, 760px);
  }

  h1 {
    font-size: 36px;
  }

  .toolbar-band,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .filter-field--search,
  .stock-toggle {
    grid-column: 1 / -1;
  }

  .section-heading--row {
    align-items: stretch;
    flex-direction: column;
  }

  .mini-metrics {
    justify-content: flex-start;
  }

  .offer-heading-actions {
    align-items: flex-end;
    justify-content: space-between;
  }
}

@media (max-width: 680px) {
  .header-link {
    display: none;
  }

  .site-header {
    gap: 12px;
  }

  .brand small {
    white-space: normal;
  }

  .header-submit {
    width: 42px;
    padding: 0;
    font-size: 0;
  }

  .header-submit .icon-plus {
    width: 16px;
  }

  .model-grid,
  .toolbar-band {
    grid-template-columns: 1fr;
  }

  .model-card {
    min-height: 190px;
  }

  .offer-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .offer-actions {
    width: 100%;
  }

  .vote-button,
  .complaint-link,
  .jump-link {
    flex: 1;
    width: auto;
  }

  .vote-message {
    text-align: left;
  }

  .offer-title strong,
  .offer-cell strong {
    white-space: normal;
  }

  .offer-heading-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    width: 100%;
  }

  .admin-table {
    min-width: 780px;
  }

  .admin-table-wrap {
    overflow-x: auto;
  }
}
