:root {
  --bg: #f4f6f9;
  --surface: #fff;
  --text: #26384d;
  --muted: #667085;
  --line: #dfe7ef;
  --blue: #0866f2;
  --deep-blue: #0754b7;
  --nav-blue: #0868f6;
  --soft-blue: #f6fcff;
  --teal: #118274;
  --green: #28a745;
  --red: #ef334a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  font-family: Inter, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
input, select, button { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  box-shadow: 0 1px 0 rgba(16, 24, 40, .08);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1110px, calc(100% - 32px));
  min-height: 82px;
  margin: 0 auto;
}
.logo {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 8px;
  color: #0f8ab6;
  font-weight: 900;
}
.logo span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 18px 22px 16px 22px;
  color: #fff;
  background: #178db4;
  font-size: 21px;
  letter-spacing: .2px;
  line-height: 1;
}
.logo strong {
  color: #178db4;
  font-size: 18px;
  line-height: 1;
  letter-spacing: .1px;
}
.logo small {
  color: #6b7280;
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
  font-weight: 400;
}
.top-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}
.top-links > a:not(.header-button),
.top-links .inline {
  color: #5b6675;
  font-weight: 650;
}
.hotline {
  color: #f12132;
  font-size: 16px;
  font-weight: 850;
}
.header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 18px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--deep-blue);
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
}
.header-button.ghost {
  color: var(--deep-blue);
  background: #edf5ff;
}
.inline { display: inline; margin: 0; }
.main-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 100%;
  min-height: 60px;
  padding: 0 16px;
  background: var(--nav-blue);
  color: #fff;
  overflow-x: auto;
  scrollbar-width: thin;
}
.main-nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 0 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}
.main-nav a:hover { background: rgba(255, 255, 255, .12); }
.home-link {
  min-width: 58px;
  background: rgba(255, 255, 255, .13);
  font-size: 25px;
  text-transform: none;
}

.page {
  width: min(1110px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 68px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  margin: 0 calc((100% - min(1110px, calc(100vw - 32px))) / -2) 24px;
  padding: 0 max(16px, calc((100vw - 1110px) / 2));
  background: #eeeeef;
  color: #607083;
}
.breadcrumb a { color: var(--deep-blue); }
.breadcrumb strong { font-weight: 500; }
.catalog-intro {
  max-width: 980px;
  margin: 0 auto 26px;
  text-align: center;
}
.catalog-intro h1 {
  margin: 0;
  color: #3d4b5d;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.25;
}
.title-mark {
  position: relative;
  width: 118px;
  height: 18px;
  margin: 8px auto 8px;
}
.title-mark:before,
.title-mark:after {
  content: "";
  position: absolute;
  top: 9px;
  width: 50px;
  border-top: 1px solid #dce4ec;
}
.title-mark:before { left: 0; }
.title-mark:after { right: 0; }
.title-mark {
  background:
    radial-gradient(circle at 50% 50%, #d0d7df 0 3px, transparent 4px),
    radial-gradient(circle at 42% 50%, #dce3ea 0 2px, transparent 3px),
    radial-gradient(circle at 58% 50%, #dce3ea 0 2px, transparent 3px);
}
.catalog-intro p {
  max-width: 980px;
  margin: 0 auto;
  color: #34495f;
  font-size: 14.5px;
  line-height: 1.7;
}

h1, h2, h3 { margin-top: 0; }
h2 { color: #111827; font-size: 24px; font-weight: 800; line-height: 1.25; }
h3 { font-size: 20px; font-weight: 800; line-height: 1.2; }
.muted { color: var(--muted); }

.pricing-section { margin-bottom: 26px; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 28px;
}
.pricing-card {
  overflow: hidden;
  border: 1px solid #dfe8f0;
  border-radius: 4px;
  background: var(--soft-blue);
  box-shadow: 0 2px 10px rgba(18, 50, 90, .12);
}
.plan-ribbon {
  position: relative;
  min-height: 42px;
  padding: 12px 18px 15px;
  color: #fff;
  text-align: center;
  background: var(--deep-blue);
}
.plan-ribbon:after {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: -9px;
  height: 18px;
  border-radius: 0 0 50% 50%;
  background: var(--deep-blue);
}
.plan-ribbon h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}
.plan-price {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 110px;
  padding: 24px 18px 14px;
  background: #eeeeee;
  text-align: center;
}
.plan-price strong {
  color: var(--red);
  font-size: 27px;
  font-weight: 850;
  line-height: 1;
}
.plan-price span {
  color: #1f2937;
  font-size: 14px;
}
.plan-price small {
  min-height: 17px;
  color: #496079;
  font-size: 13px;
  font-weight: 700;
}
.plan-spec-list {
  padding: 16px 30px 12px;
  background: var(--soft-blue);
}
.plan-spec-list div {
  display: grid;
  grid-template-columns: 20px minmax(88px, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border-bottom: 1px solid #dce7ee;
  color: #2d4056;
  font-size: 14px;
}
.plan-spec-list div:last-child { border-bottom: 0; }
.plan-spec-list strong {
  color: #004bb6;
  text-align: right;
  font-weight: 800;
}
.spec-icon {
  color: #46586c;
  text-align: center;
  font-weight: 900;
}
.plan-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 30px 20px;
  background: var(--soft-blue);
}
.plan-actions .button:only-child { grid-column: 1 / -1; }
.plan-order-form {
  display: grid;
  gap: 0;
  background: var(--soft-blue);
}
.plan-order-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  padding: 4px 30px 0;
}
.plan-order-fields label {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}
.plan-order-fields input,
.plan-order-fields select {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 650;
}
.plan-order-fields .password-field {
  grid-column: 1 / -1;
}
.modal-note {
  margin: 12px 0 0;
}
.modal-note a {
  color: var(--deep-blue);
  font-weight: 800;
}
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.auth-modal:target {
  display: flex;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .5);
}
.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  margin: 0;
  border-top: 4px solid var(--deep-blue);
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  color: #64748b;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.panel, .card, .stat {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(15, 40, 75, .08);
}
.panel { padding: 18px; margin-bottom: 18px; }
.order-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
  width: min(920px, 100%);
  margin: 0 auto 30px;
}
.order-panel,
.auth-panel {
  border-top: 4px solid var(--deep-blue);
}
.info-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 22px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid var(--line);
}
.info-band h2 { margin-bottom: 6px; }
.info-band p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: #344054; font-size: 13px; font-weight: 800; }
input, select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-weight: 600;
}
.check input { width: auto; min-height: auto; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: var(--green);
  cursor: pointer;
  font-weight: 800;
  text-align: center;
}
.button:hover { filter: brightness(.96); }
.button.secondary { background: var(--blue); }
.button.danger { background: var(--red); }
.button.small { min-height: 34px; padding: 7px 10px; font-size: 13px; }
.button:disabled { opacity: .55; cursor: not-allowed; }

.alert {
  padding: 12px;
  margin: 16px 0;
  border-radius: 5px;
  border: 1px solid #bbf7d0;
  color: #14532d;
  background: #f0fdf4;
}
.alert.error, .error {
  border-color: #fecdd3;
  color: #9f1239;
  background: #fff1f2;
}
.error { margin-top: 8px; padding: 8px; border-radius: 5px; font-size: 13px; }
.badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}
.badge.green { color: #14532d; background: #dcfce7; }
.badge.orange { color: #7c2d12; background: #ffedd5; }
.badge.red { color: #9f1239; background: #ffe4e6; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}
.sticky { position: sticky; top: 152px; }
.card { padding: 18px; }
.price { color: var(--teal); font-size: 22px; font-weight: 900; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.specs span {
  display: block;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #344054;
  background: #fbfdff;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #344054; font-size: 13px; }
.admin-table { min-width: 1080px; }
.admin-table input {
  min-height: 36px;
  padding: 7px 9px;
  margin-bottom: 6px;
  font-size: 13px;
}
.admin-table td { background: #fff; }
.new-row td { background: #f8fafc; }
.row-actions {
  min-width: 120px;
}
.row-actions .button {
  width: 100%;
  margin-bottom: 6px;
}
.row-actions .button:last-child {
  margin-bottom: 0;
}
.mini-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 6px;
}
.mini-fields.prices { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
.api-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}
.api-table code,
details code {
  display: block;
  max-width: 520px;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 8px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #344054;
  font-size: 12px;
}
details { margin-top: 6px; }
summary {
  cursor: pointer;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 16px; display: grid; gap: 8px; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 800; }
.stat strong { font-size: 24px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

@media (max-width: 980px) {
  .header-top { align-items: flex-start; flex-direction: column; gap: 12px; padding: 14px 0; }
  .top-links { justify-content: flex-start; }
  .main-nav { justify-content: flex-start; }
  .pricing-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .order-section, .layout, .api-grid { grid-template-columns: 1fr; }
  .grid, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticky { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 13px; }
  .page {
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }
  .header-top {
    width: 100%;
    min-height: auto;
    padding: 12px 10px 10px;
  }
  .logo span {
    min-width: 74px;
    min-height: 32px;
    font-size: 19px;
  }
  .logo strong { font-size: 17px; }
  .logo small { font-size: 10px; }
  .top-links {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }
  .top-links > a:not(.header-button),
  .hotline { display: none; }
  .header-button {
    width: 100%;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 5px;
  }
  .main-nav {
    justify-content: flex-start;
    padding: 0;
  }
  .main-nav a { min-height: 48px; padding: 0 12px; font-size: 12px; }
  .breadcrumb {
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .catalog-intro h1 { font-size: 22px; white-space: normal; }
  .catalog-intro p { font-size: 13.5px; }
  .pricing-grid, .grid, .stats { grid-template-columns: 1fr; }
  .pricing-card,
  .panel,
  .info-band { max-width: 100%; }
  .plan-spec-list { padding-left: 18px; padding-right: 18px; }
  .plan-spec-list div {
    grid-template-columns: 20px minmax(0, 1fr) minmax(78px, max-content);
  }
  .plan-actions {
    grid-template-columns: 1fr;
    padding-left: 18px;
    padding-right: 18px;
  }
  .plan-order-fields {
    grid-template-columns: 1fr;
    padding-left: 18px;
    padding-right: 18px;
  }
  .info-band { align-items: stretch; flex-direction: column; }
}
