:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --line: #d8dee8;
  --text: #1d2733;
  --muted: #667385;
  --primary: #2456d6;
  --primary-dark: #173b95;
  --green: #0f8a4b;
  --green-bg: #e8f6ee;
  --amber: #a86100;
  --amber-bg: #fff3df;
  --red: #b42318;
  --red-bg: #fee8e6;
  --ink-bg: #eef2f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  min-height: 56px;
  padding: 0 28px;
  width: 100%;
}

.brand {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0;
}

.nav {
  align-items: center;
  display: flex;
  gap: 18px;
}

.language-switcher {
  align-items: center;
  background: #eef2f7;
  border-radius: 999px;
  display: flex;
  gap: 2px;
  padding: 3px;
}

.language-switcher a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.language-switcher a.active {
  background: #ffffff;
  color: var(--text);
  text-decoration: none;
}

.nav form {
  margin: 0;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

body:has(.sales-hero) .shell {
  max-width: none;
  padding: 0;
}

.auth-wrap {
  display: grid;
  min-height: calc(100vh - 120px);
  place-items: center;
}

.auth-panel,
.panel,
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-panel {
  max-width: 420px;
  padding: 28px;
  width: 100%;
}

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

h1 {
  font-size: 28px;
  line-height: 1.15;
  margin-bottom: 6px;
}

h2 {
  font-size: 17px;
  margin-bottom: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 6px;
}

input,
select {
  background: #ffffff;
  border: 1px solid #c8d1df;
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  min-height: 38px;
  padding: 8px 10px;
}

button,
.primary,
.secondary,
.small-action {
  align-items: center;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 650;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
}

.ghost {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 6px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 700;
  min-height: 40px;
  padding: 9px 14px;
}

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

.primary:hover {
  background: var(--primary-dark);
}

.secondary,
.small-action {
  background: #ffffff;
  border-color: #c8d1df;
  color: var(--text);
}

.danger {
  background: var(--red-bg);
  border-color: #ffb4ad;
  color: var(--red);
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--primary);
  min-height: auto;
  padding: 0;
}

.alert {
  background: var(--red-bg);
  border: 1px solid #ffb4ad;
  border-radius: 6px;
  color: var(--red);
  padding: 10px 12px;
}

.muted,
small {
  color: var(--muted);
}

.page-head {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.inline-form {
  align-items: center;
  display: flex;
  gap: 10px;
}

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

.metric {
  display: grid;
  gap: 8px;
  min-height: 124px;
  padding: 18px;
}

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

.metric strong {
  font-size: 18px;
}

.split {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
}

.panel {
  overflow: hidden;
}

.panel.single {
  max-width: 780px;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

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

th {
  background: #f9fbfd;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

td small {
  display: block;
  margin-top: 4px;
}

tr:last-child td {
  border-bottom: 0;
}

.kv {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  margin: 0;
  padding: 18px;
}

.kv dt,
.kv dd {
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 10px 0;
}

.kv dt {
  color: var(--muted);
  font-weight: 650;
}

.status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  padding: 6px 9px;
  white-space: nowrap;
}

.status-active,
.status-credited,
.status-paid {
  background: var(--green-bg);
  color: var(--green);
}

.status-paused,
.status-expired,
.status-underpaid,
.status-overpaid,
.status-manual_review,
.status-missing {
  background: var(--red-bg);
  color: var(--red);
}

.status-waiting_payment,
.status-invoice_created,
.status-confirming,
.status-pending {
  background: var(--amber-bg);
  color: var(--amber);
}

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

.row-form {
  display: flex;
  gap: 8px;
}

.row-form input {
  width: 142px;
}

.admin-section {
  margin-top: 18px;
}

.empty {
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

code {
  background: var(--ink-bg);
  border-radius: 5px;
  padding: 2px 5px;
  word-break: break-all;
}

.sales-page {
  background: #ffffff;
}

.sales-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fb 58%, #eef5f1 100%);
  color: var(--text);
  overflow: hidden;
  position: relative;
}

.sales-hero-inner {
  margin: 0 auto;
  max-width: 1180px;
  padding: 72px 28px 36px;
  width: 100%;
}

.sales-hero .eyebrow {
  color: #0f8a4b;
}

.hero-copy {
  margin: 0 auto;
  max-width: 980px;
  text-align: center;
}

.sales-hero h1 {
  color: #0b1623;
  font-size: 54px;
  line-height: 1.02;
  margin-bottom: 18px;
  max-width: none;
}

.sales-lead {
  color: #566475;
  font-size: 18px;
  margin-left: auto;
  margin-right: auto;
  max-width: 760px;
}

.sales-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
}

.hero-button {
  min-height: 42px;
  padding-inline: 16px;
}

.phone-stage {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(220px, 0.85fr) minmax(260px, 360px) minmax(220px, 0.85fr);
  margin: 48px auto 0;
  max-width: 980px;
  position: relative;
}

.phone-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dfe8f2;
  border-radius: 8px;
  box-shadow: 0 22px 50px rgba(15, 35, 55, 0.1);
  display: grid;
  gap: 6px;
  padding: 18px;
}

.phone-card-left {
  justify-self: end;
  transform: translateY(34px);
}

.phone-card-right {
  justify-self: start;
  transform: translateY(-36px);
}

.phone-card span,
.phone-status-grid span,
.phone-appbar span,
.phone-autopilot span,
.phone-decision span,
.market-head span,
.stat-strip span,
.security-list span,
.pricing-card p,
.pricing-card li {
  color: var(--muted);
}

.phone-card span,
.phone-status-grid span,
.phone-appbar span,
.phone-autopilot span,
.phone-decision span,
.market-head span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.phone-card strong {
  color: #101828;
  font-size: 18px;
}

.phone-frame {
  background: linear-gradient(135deg, #172033, #0a0f18 46%, #26344f);
  border: 3px solid #46536b;
  border-radius: 48px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    inset 0 0 0 7px #0b111b,
    0 30px 72px rgba(15, 35, 55, 0.24);
  height: 628px;
  justify-self: center;
  max-width: 300px;
  overflow: hidden;
  padding: 12px;
  position: relative;
  width: 100%;
}

.iphone-17-pro-max::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent 38%, rgba(255, 255, 255, 0.16));
  border-radius: inherit;
  content: "";
  inset: 5px;
  position: absolute;
  pointer-events: none;
}

.side-button {
  background: #445066;
  border-radius: 999px;
  position: absolute;
  width: 4px;
  z-index: 2;
}

.side-button-left {
  left: -2px;
}

.side-button-right {
  right: -2px;
}

.side-button.action {
  height: 30px;
  top: 104px;
}

.side-button.volume-up {
  height: 58px;
  top: 160px;
}

.side-button.volume-down {
  height: 58px;
  top: 230px;
}

.side-button.power {
  height: 86px;
  top: 184px;
}

.side-button.camera-control {
  height: 54px;
  top: 382px;
}

.phone-screen {
  background:
    radial-gradient(circle at 50% 8%, rgba(36, 86, 214, 0.08), transparent 34%),
    #f7fafc;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 40px;
  display: grid;
  gap: 9px;
  height: 100%;
  overflow: hidden;
  padding: 44px 13px 14px;
  position: relative;
}

.dynamic-island {
  align-items: center;
  background: #05080d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.12);
  display: flex;
  height: 31px;
  justify-content: flex-end;
  left: 50%;
  padding-right: 11px;
  position: absolute;
  top: 11px;
  transform: translateX(-50%);
  width: 108px;
  z-index: 3;
}

.dynamic-island span {
  background: #111827;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #02050a;
  height: 9px;
  width: 9px;
}

.phone-appbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.phone-appbar strong {
  background: #e8f6ee;
  border-radius: 999px;
  color: #0f8a4b;
  font-size: 12px;
  padding: 5px 9px;
}

.phone-autopilot,
.phone-decision,
.market-panel,
.phone-status-grid div {
  background: #ffffff;
  border: 1px solid #e0e7f0;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 12px;
}

.phone-autopilot strong {
  color: #101828;
  font-size: 24px;
  line-height: 1;
}

.phone-decision {
  background: #101828;
  border-color: #101828;
  grid-template-columns: minmax(0, 1fr) 58px;
}

.phone-decision span,
.phone-decision small {
  color: rgba(255, 255, 255, 0.68);
}

.phone-decision strong {
  color: #7ee2a8;
  font-size: 21px;
  line-height: 1;
}

.phone-decision small {
  grid-column: 1 / -1;
}

.ai-score {
  align-content: center;
  background: rgba(126, 226, 168, 0.1);
  border: 1px solid rgba(126, 226, 168, 0.28);
  border-radius: 8px;
  display: grid;
  justify-items: center;
  padding: 7px;
}

.ai-score strong {
  font-size: 24px;
}

.market-panel {
  gap: 8px;
  padding: 10px;
}

.market-head {
  align-items: start;
  display: flex;
  justify-content: space-between;
}

.market-head div {
  display: grid;
  gap: 2px;
}

.market-head div:last-child {
  text-align: right;
}

.market-head strong {
  color: #101828;
  font-size: 13px;
}

.phone-chart {
  background: linear-gradient(180deg, #fbfdff, #f8fbfc);
  border: 1px solid #edf1f6;
  border-radius: 8px;
  height: 170px;
  padding: 5px;
  width: 100%;
}

.chart-grid {
  fill: none;
  stroke: #e8eef5;
  stroke-width: 1;
}

.ma-fast,
.ma-slow {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ma-fast {
  stroke: #2456d6;
  stroke-width: 3;
}

.ma-slow {
  stroke: #16a46b;
  stroke-width: 3;
}

.volume-bars rect {
  fill: rgba(36, 86, 214, 0.14);
}

.candle.up {
  fill: rgba(15, 138, 75, 0.14);
  stroke: #0f8a4b;
  stroke-width: 2;
}

.candle.down {
  fill: rgba(180, 35, 24, 0.14);
  stroke: #b42318;
  stroke-width: 2;
}

.wick {
  stroke-width: 2;
}

.wick.up {
  stroke: #0f8a4b;
}

.wick.down {
  stroke: #b42318;
}

.price-label {
  fill: #667385;
  font-size: 11px;
  font-weight: 700;
}

.muted-label {
  fill: #98a4b3;
}

.phone-status-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.phone-status-grid strong {
  color: #101828;
}

.home-indicator {
  align-self: end;
  background: #111827;
  border-radius: 999px;
  height: 5px;
  justify-self: center;
  opacity: 0.45;
  width: 112px;
}

.ghost {
  color: #ffffff;
}

.stat-strip {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-strip article {
  display: grid;
  gap: 4px;
  min-height: 108px;
  padding: 26px 28px;
}

.stat-strip strong {
  color: #101828;
  font-size: 28px;
  line-height: 1;
}

.stat-strip span {
  font-size: 13px;
}

.sales-section {
  background: #ffffff;
  padding: 68px 28px;
}

.difference-section {
  background: #f7f9fc;
}

.section-head {
  margin: 0 auto 30px;
  max-width: 920px;
}

.section-head.centered {
  text-align: center;
}

.section-head.centered p {
  margin-left: auto;
  margin-right: auto;
}

.section-head h2,
.process-copy h2,
.security-copy h2,
.pricing-section h2,
.risk-band h2 {
  font-size: 32px;
  line-height: 1.12;
}

.section-head p,
.process-copy p,
.security-copy p,
.pricing-section p,
.risk-band p {
  color: var(--muted);
  max-width: 780px;
}

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1120px;
}

.feature-card {
  background: #ffffff;
  border: 1px solid #e0e7f0;
  border-radius: 8px;
  min-height: 242px;
  padding: 22px;
}

.feature-mark,
.plan-label {
  color: var(--primary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.feature-card h3 {
  font-size: 18px;
  margin: 0 0 10px;
}

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

.security-band {
  background: #101828;
  color: #ffffff;
  display: grid;
  gap: 38px;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  padding: 66px 28px;
}

.security-copy {
  justify-self: end;
  max-width: 470px;
}

.security-copy .eyebrow {
  color: #88f0cf;
}

.security-copy h2 {
  color: #ffffff;
}

.security-copy p {
  color: rgba(255, 255, 255, 0.72);
}

.security-list {
  display: grid;
  gap: 12px;
  max-width: 650px;
}

.security-list article {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 18px;
}

.security-list strong {
  color: #ffffff;
  font-size: 17px;
}

.security-list span {
  color: rgba(255, 255, 255, 0.68);
}

.process-band {
  background: #eef6f2;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  padding: 66px 28px;
}

.process-copy {
  justify-self: end;
  max-width: 470px;
}

.process-list {
  counter-reset: process;
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  max-width: 660px;
  padding: 0;
}

.process-list li {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d1e3da;
  border-radius: 8px;
  display: flex;
  font-weight: 700;
  gap: 14px;
  min-height: 62px;
  padding: 15px;
}

.process-list li::before {
  align-items: center;
  background: #0f8a4b;
  border-radius: 999px;
  color: #ffffff;
  content: counter(process);
  counter-increment: process;
  display: inline-flex;
  flex: 0 0 32px;
  font-size: 13px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.pricing-section {
  background: #ffffff;
  padding: 66px 28px;
}

.pricing-card {
  align-items: center;
  background: #f9fbfd;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr) auto;
  margin: 0 auto;
  max-width: 1060px;
  padding: 28px;
}

.pricing-card strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  margin-bottom: 10px;
}

.pricing-card p {
  margin: 0;
}

.pricing-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
}

.risk-band {
  align-items: center;
  background: #fff8eb;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 0.7fr) minmax(320px, 1fr) auto;
  padding: 42px 28px;
}

@media (max-width: 860px) {
  .topbar-inner,
  .page-head,
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-inner {
    padding: 14px 18px;
  }

  .nav {
    flex-wrap: wrap;
  }

  .shell {
    padding: 18px;
  }

  .metric-grid,
  .split,
  .stat-strip,
  .phone-stage,
  .feature-grid,
  .security-band,
  .process-band,
  .pricing-card,
  .risk-band {
    grid-template-columns: 1fr;
  }

  .sales-hero {
    min-height: auto;
  }

  .sales-hero h1 {
    font-size: 36px;
    line-height: 1.08;
  }

  .sales-hero-inner {
    padding: 44px 18px 28px;
  }

  .phone-stage {
    gap: 14px;
    margin-top: 34px;
  }

  .phone-card-left,
  .phone-card-right {
    justify-self: stretch;
    transform: none;
  }

  .phone-frame {
    height: 604px;
    max-width: 288px;
  }

  .security-copy,
  .process-copy {
    justify-self: start;
  }

  table {
    min-width: 760px;
  }

  .panel {
    overflow-x: auto;
  }

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

  .kv dt {
    border-bottom: 0;
    padding-bottom: 2px;
  }
}
