:root {
  --orange: #ff7900;
  --orange-dark: #dd6300;
  --blue: #0007ff;
  --ink: #111111;
  --muted: #666666;
  --line: #e8e8e8;
  --soft: #f6f6f6;
  --panel: #ffffff;
  --shadow: 0 18px 45px rgba(17, 17, 17, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  font-family: Unbounded, Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--orange);
  border-radius: 50%;
  color: var(--orange);
  font-size: 14px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333333;
  font-size: 13px;
}

.top-nav a {
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
}

.top-nav a:hover {
  border-color: var(--orange);
  color: var(--orange);
}

main {
  overflow: hidden;
}

.workbench {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  gap: 24px;
  align-items: stretch;
}

.intro-panel,
.calculator-card,
.how-section,
.trust-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.intro-panel {
  position: relative;
  min-height: 650px;
  padding: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.eyebrow,
.kicker {
  margin: 0 0 10px;
  color: var(--orange);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
}

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

h1 {
  max-width: 640px;
  margin-bottom: 16px;
  font-size: 56px;
  line-height: 1.02;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.15;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.intro-panel p {
  max-width: 560px;
  color: #3f3f3f;
  line-height: 1.65;
  font-family: Arial, sans-serif;
  font-size: 17px;
}

.hero-device {
  margin: 24px -34px 24px 0;
  height: 300px;
  border-radius: 8px 0 0 8px;
  overflow: hidden;
  background: #efefef;
}

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

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

.quick-points span,
.live-status {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #202020;
  background: #fff;
  font-size: 12px;
}

.calculator-card {
  padding: 28px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-head.tight {
  margin-top: 26px;
  margin-bottom: 16px;
}

.category-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.category-row.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-button {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.category-button strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.category-button span {
  display: block;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.35;
}

.category-button.active {
  border-color: var(--orange);
  box-shadow: inset 0 0 0 1px var(--orange);
}

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

.config-panel {
  margin-top: 4px;
}

label {
  display: grid;
  gap: 8px;
  color: #242424;
  font-size: 13px;
}

label > span,
.choice-title {
  color: #333333;
  font-size: 13px;
}

select,
input,
textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 14px;
  color: var(--ink);
  outline: none;
}

textarea {
  padding-top: 14px;
  resize: vertical;
  line-height: 1.45;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 121, 0, 0.14);
}

.choice-group {
  margin: 18px 0;
}

.choice-title {
  margin-bottom: 10px;
}

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

.radio-card {
  min-height: 108px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.radio-card span {
  color: var(--muted);
  font-family: Arial, sans-serif;
  line-height: 1.4;
}

.radio-card.active {
  border-color: var(--orange);
  background: #fff8f1;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 50px;
  border-radius: 999px;
  padding: 0 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border 0.16s ease;
}

.primary-button {
  background: var(--orange);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.secondary-button {
  background: #ffffff;
  color: var(--orange);
  border-color: var(--orange);
}

.ghost-button {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}

.danger-button {
  background: #fff2f2;
  color: #bd1b1b;
  border-color: #ffd0d0;
}

.full {
  width: 100%;
  margin-top: 18px;
}

.estimate-result {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--orange);
  border-radius: 8px;
  background: #fff8f1;
}

.price {
  margin-bottom: 8px;
  font-size: 38px;
  font-weight: 700;
}

.estimate-result p,
.form-note {
  margin-bottom: 0;
  color: #444444;
  font-family: Arial, sans-serif;
  line-height: 1.5;
}

.lead-form {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.how-section {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 0;
  padding: 32px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

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

.steps article {
  min-height: 196px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.steps span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--orange);
  color: #ffffff;
  font-weight: 700;
}

.steps p,
.trust-band span {
  color: var(--muted);
  font-family: Arial, sans-serif;
  line-height: 1.55;
}

.trust-band {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 0;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.trust-band div {
  display: grid;
  gap: 8px;
}

.trust-band strong {
  font-size: 15px;
}

.site-footer {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #333333;
  font-size: 13px;
}

.site-footer div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.error-text {
  color: #bd1b1b;
  font-family: Arial, sans-serif;
}

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

.admin-main {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 40px;
}

.login-card,
.admin-shell,
.editor-panel,
.setup-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-card {
  width: min(520px, 100%);
  margin: 60px auto;
  padding: 30px;
}

.login-card h1,
.admin-top h1 {
  font-size: 34px;
}

.admin-shell {
  padding: 28px;
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.warning-line {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #ffe0bf;
  border-radius: 8px;
  background: #fff8f1;
  color: #5e350d;
  font-family: Arial, sans-serif;
  line-height: 1.45;
}

.warning-line code,
.setup-note code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #f0f0f0;
}

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

.tab-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
}

.tab-button.active {
  color: #ffffff;
  border-color: var(--orange);
  background: var(--orange);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.admin-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

.admin-category-picker {
  width: min(340px, 100%);
}

.admin-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

#adminItemSelect {
  min-height: 280px;
  padding: 10px;
}

.editor-panel {
  padding: 22px;
}

.switch-row {
  display: inline-flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  min-width: 190px;
}

.switch-row input {
  width: 18px;
  min-height: 18px;
}

.matrix-wrap {
  margin-top: 20px;
}

.admin-block {
  margin-bottom: 22px;
}

.matrix-title {
  margin-bottom: 10px;
  color: #333333;
  font-size: 13px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.matrix-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.matrix-table.compact {
  min-width: 520px;
}

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

.matrix-table thead th,
.data-table thead th {
  background: #f7f7f7;
  font-size: 12px;
}

.matrix-table tbody th {
  width: 230px;
}

.matrix-table th span,
.data-table td span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 1.35;
}

.matrix-input {
  min-width: 120px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  font-size: 12px;
}

.status-select {
  min-height: 40px;
}

.telegram-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.setup-note {
  padding: 22px;
}

.setup-note ol {
  margin: 14px 0;
  padding-left: 22px;
  font-family: Arial, sans-serif;
  line-height: 1.7;
}

.setup-note p {
  color: var(--muted);
  font-family: Arial, sans-serif;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .workbench,
  .steps,
  .trust-band,
  .admin-layout,
  .telegram-grid {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    min-height: auto;
  }

  .hero-device {
    height: 240px;
  }
}

@media (max-width: 680px) {
  .site-header,
  .site-footer {
    width: min(100% - 20px, 1180px);
  }

  .site-header,
  .site-footer,
  .section-head,
  .estimate-result {
    align-items: stretch;
    flex-direction: column;
  }

  .top-nav {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .workbench,
  .how-section,
  .trust-band,
  .admin-main {
    width: min(100% - 20px, 1180px);
  }

  .intro-panel,
  .calculator-card,
  .how-section,
  .admin-shell,
  .login-card,
  .editor-panel,
  .setup-note {
    padding: 20px;
  }

  .hero-device {
    margin-right: -20px;
  }

  .category-row,
  .form-grid,
  .radio-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 36px;
  }

  .price {
    font-size: 31px;
  }
}
