:root {
  color-scheme: dark;
  --page-bg: #0a0a0b;
  --shell-bg: #141415;
  --shell-top: #212123;
  --surface: #1a1a1c;
  --surface-strong: #202023;
  --surface-soft: #171719;
  --surface-muted: #242427;
  --text: #f1f1f3;
  --text-soft: #c2c2c8;
  --text-dim: #8b8b92;
  --line: #303035;
  --line-strong: #47474f;
  --accent: #f33a4f;
  --accent-strong: #ff4b60;
  --accent-soft: rgba(243, 58, 79, 0.12);
  --success: #48c879;
  --warning: #f0b95d;
  --danger: #ff7b88;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text);
  font-family: "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

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

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

:focus-visible {
  outline: 2px solid rgba(243, 58, 79, 0.55);
  outline-offset: 2px;
}

.shell {
  width: min(100%, 840px);
  margin: 0 auto;
  padding: 48px 16px 72px;
}

.shell--admin {
  width: min(1180px, calc(100vw - 32px));
}

.hero {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.hero--compact {
  gap: 14px;
}

.hero-copy,
.hero-aside,
.panel,
.checkout-shell,
.summary-block,
.completion-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-aside {
  padding: 22px;
}

.hero-aside {
  display: grid;
  align-content: start;
}

.eyebrow,
.brand-mark {
  margin: 0;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(1.6rem, 2vw, 2.15rem);
  line-height: 1.06;
}

h2 {
  font-size: 1.1rem;
  line-height: 1.2;
}

h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.lead,
.muted,
.summary-block__meta {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.65;
}

.lead {
  margin: 10px 0 0;
  max-width: 64ch;
}

.price-block,
.summary-block {
  width: 100%;
  display: grid;
  gap: 10px;
}

.price-label,
.meta-label,
.summary-block__label {
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.price-value,
.summary-block__price {
  color: var(--accent);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.price-note {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.band {
  margin-top: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.section-head > span {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.section-head--inline {
  margin-bottom: 8px;
}

.grid {
  display: grid;
  gap: 18px;
}

.two-col {
  grid-template-columns: minmax(0, 1fr);
}

.panel,
.summary-block,
.completion-state {
  padding: 28px;
}

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

.product-list {
  display: grid;
  gap: 14px;
  align-content: start;
}

.product-grid {
  display: grid;
  gap: 14px;
}

.product-card {
  width: 100%;
  padding: 18px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #1a1a1c;
  display: grid;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.product-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.product-card--active {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(243, 58, 79, 0.05), rgba(243, 58, 79, 0.02));
  box-shadow: inset 0 0 0 1px rgba(243, 58, 79, 0.28);
}

.product-card--loading {
  color: var(--text-soft);
  cursor: default;
}

.product-card__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.product-card__title {
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.product-card__flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
}

.product-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.product-card__currency {
  color: var(--accent);
  font-size: 0.92rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.product-card__price-value {
  color: var(--accent);
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.product-card__description {
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 600;
}

.badge--accent {
  border-color: rgba(243, 58, 79, 0.42);
  background: var(--accent);
  color: #fff;
}

.badge--muted {
  color: var(--text-dim);
}

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

.field span {
  color: var(--text-soft);
  font-size: 0.83rem;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #111113;
  color: var(--text);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.field textarea {
  resize: vertical;
  min-height: 96px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #707078;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(243, 58, 79, 0.58);
  box-shadow: 0 0 0 4px rgba(243, 58, 79, 0.12);
}

.button {
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, opacity 120ms ease;
}

.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.button--primary {
  background: var(--accent);
  color: #fff;
}

.button--primary:hover {
  background: var(--accent-strong);
}

.button--secondary {
  background: var(--surface-muted);
  border-color: var(--line);
  color: var(--text);
}

.button--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text-soft);
}

.button--ghost:hover,
.button--secondary:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.55;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.notice--hidden {
  display: none;
}

.notice--success {
  color: #c7ffd9;
  background: rgba(72, 200, 121, 0.08);
  border-color: rgba(72, 200, 121, 0.22);
}

.notice--error {
  color: #ffd2d8;
  background: rgba(255, 123, 136, 0.1);
  border-color: rgba(255, 123, 136, 0.24);
}

.notice--warning {
  color: #ffe4af;
  background: rgba(240, 185, 93, 0.08);
  border-color: rgba(240, 185, 93, 0.2);
}

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

.info-pair {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #151517;
}

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

.result-card,
.product-table,
.summary-block,
.completion-state {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-soft);
}

.result-card {
  padding: 18px;
}

.result-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px 14px;
}

.result-card dt {
  color: var(--text-dim);
}

.result-card dd {
  margin: 0;
  word-break: break-word;
}

.license-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(243, 58, 79, 0.22);
  border-radius: 12px;
  background: #0f0f10;
  color: #fff0f2;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.product-table {
  overflow: hidden;
}

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

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

.product-table th {
  color: var(--text-dim);
  font-weight: 700;
}

.checkout-shell {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: var(--shell-bg);
  border-radius: 26px;
}

.store-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--shell-top);
}

.store-chrome__dots {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
}

.store-chrome__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.store-chrome__dot--red {
  background: #ff5f57;
}

.store-chrome__dot--yellow {
  background: #febc2e;
}

.store-chrome__dot--green {
  background: #28c840;
}

.store-chrome__title {
  flex: 1 1 auto;
  text-align: center;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.store-chrome__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.store-stepbar {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--shell-bg);
  color: var(--text-dim);
  font-size: 0.74rem;
  font-weight: 700;
}

.store-stepbar__item {
  color: var(--text-dim);
}

.store-stepbar__item.is-active {
  color: var(--accent);
}

.store-stepbar__sep {
  color: #56565d;
}

.store-body {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.store-body--catalog {
  display: block;
}

.store-shell-title {
  display: grid;
  gap: 8px;
}

.store-shell-title h1 {
  font-size: 1.2rem;
}

.store-shell-title p {
  margin: 0;
}

.checkout-header {
  display: none;
}

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

.checkout-brand__name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.checkout-brand__meta {
  color: var(--text-dim);
  font-size: 0.86rem;
}

.checkout-steps {
  display: none;
}

.summary-block {
  gap: 12px;
  align-content: start;
}

.summary-block__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.summary-block__divider {
  height: 1px;
  background: var(--line);
}

.summary-block__card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #151517;
}

.summary-block__card--detail {
  min-height: 100%;
  align-content: start;
}

.summary-block__kicker {
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-block__title {
  font-size: 1rem;
  font-weight: 700;
}

.summary-block__rules {
  display: grid;
  gap: 8px;
}

.completion-state {
  display: grid;
  gap: 12px;
  align-content: start;
}

.completion-state--purchase {
  gap: 16px;
}

.purchase-summary {
  display: grid;
  gap: 14px;
}

.purchase-summary--result,
.purchase-summary--actions {
  padding: 20px;
}

.purchase-summary__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.75fr);
  gap: 14px;
}

.purchase-summary__hero-main,
.purchase-summary__hero-aside,
.purchase-summary__pair {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.purchase-summary__hero-main strong,
.purchase-summary__hero-aside strong,
.purchase-summary__pair strong {
  word-break: break-word;
  line-height: 1.45;
}

.purchase-summary__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr);
  gap: 14px;
}

.purchase-summary__pair--wide,
.purchase-summary__pair--full {
  grid-column: 1 / -1;
}

.purchase-summary__pair span {
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.purchase-summary__license-wrap {
  padding: 0;
  border: 0;
  background: transparent;
}

.purchase-summary__license {
  margin-top: 0;
  min-height: 120px;
  font-size: 0.92rem;
  line-height: 1.65;
}

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

.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #151517;
  color: var(--text);
  text-align: left;
}

.order-row__main,
.order-row__meta {
  display: grid;
  gap: 4px;
}

.order-row__main span,
.order-row__meta span {
  color: var(--text-dim);
  font-size: 0.78rem;
}

.order-row__meta {
  justify-items: end;
}

.order-detail-panel {
  min-height: 100%;
}

.completion-state__status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(240, 185, 93, 0.12);
  color: var(--warning);
  border: 1px solid rgba(240, 185, 93, 0.2);
}

.completion-state--success .completion-state__status {
  background: rgba(72, 200, 121, 0.08);
  color: var(--success);
  border-color: rgba(72, 200, 121, 0.22);
}

.completion-state--pending .completion-state__status {
  background: rgba(240, 185, 93, 0.08);
  color: var(--warning);
  border-color: rgba(240, 185, 93, 0.18);
}

.completion-state--error .completion-state__status {
  background: rgba(255, 123, 136, 0.08);
  color: var(--danger);
  border-color: rgba(255, 123, 136, 0.22);
}

.step-link-row {
  display: flex;
  justify-content: flex-end;
}

.admin-card-grid {
  display: grid;
  gap: 18px;
}

.admin-layout {
  gap: 16px;
}

.admin-preview-card {
  cursor: default;
  width: 100%;
}

.admin-preview-card:hover {
  border-color: var(--line);
  background: #1a1a1c;
}

.admin-preview-card .product-card__flag {
  background: var(--accent);
}

.admin-preview-card .product-card__description {
  color: var(--text-soft);
}

@media (max-width: 760px) {
  .shell {
    padding: 20px 12px 36px;
  }

  .store-chrome {
    padding: 14px 14px;
  }

  .store-chrome__title {
    font-size: 0.86rem;
    letter-spacing: 0.1em;
  }

  .store-chrome__meta {
    display: none;
  }

  .store-body {
    padding: 14px;
  }

  .store-stepbar {
    flex-wrap: wrap;
    row-gap: 6px;
    font-size: 0.82rem;
  }

  .info-grid,
  .mini-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .actions,
  .toolbar {
    flex-direction: column;
  }

  .actions > *,
  .toolbar > * {
    width: 100%;
  }

  .summary-block__row,
  .product-card__top {
    flex-direction: column;
  }

  .result-card dl {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-body--catalog .product-grid {
    width: min(100%, 760px);
    margin: 0 auto;
    align-items: start;
  }

  .store-body--catalog .product-card {
    min-height: 168px;
  }
}

@media (min-width: 920px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .two-col {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  }

  .two-col--info {
    grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  }

  .panel,
  .summary-block,
  .completion-state {
    padding: 28px;
  }
}

@media (max-width: 760px) {
  .purchase-summary__hero,
  .purchase-summary__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .purchase-summary--result,
  .purchase-summary--actions {
    padding: 18px;
  }
}

.product-table {
  overflow: auto;
}

.product-table table {
  min-width: 640px;
}

.product-table td:last-child,
.product-table th:last-child {
  text-align: right;
}

.admin-body {
  min-height: 100vh;
  background: #f3f5f8;
  color: #1f2937;
  font-family: Inter, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

.admin-body .button,
.admin-body .field input,
.admin-body .field textarea,
.admin-body .field select,
.admin-body .notice,
.admin-body .badge,
.admin-body .product-table,
.admin-body .panel {
  box-shadow: none;
}

.admin-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 60px 248px minmax(0, 1fr);
}

.admin-shellbar {
  background: #202734;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 18px;
  padding: 14px 10px;
}

.admin-shellbar__brand,
.admin-shellbar__item {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-shellbar__brand {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.admin-shellbar__nav {
  display: grid;
  gap: 8px;
}

.admin-shellbar__item {
  color: rgba(255, 255, 255, 0.7);
}

.admin-shellbar__item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-shellbar__item.is-active {
  background: #fff;
  color: #111827;
}

.admin-shellbar__glyph {
  font-size: 0.94rem;
  line-height: 1;
}

.admin-sidebar {
  background: #fbfcfd;
  border-right: 1px solid #dbe3ec;
  padding: 16px 14px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.admin-sidebar__head {
  display: grid;
  gap: 10px;
}

.admin-sidebar__section {
  display: grid;
  gap: 10px;
}

.admin-sidebar__section-head {
  padding: 0 2px;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #111827;
}

.admin-sidebar__logo,
.admin-login-card__logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1f2937, #111827);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-sidebar__brand-copy {
  display: grid;
  gap: 2px;
}

.admin-sidebar__brand-copy strong,
.admin-login-card__brand strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.admin-sidebar__brand-copy span,
.admin-login-card__brand p,
.admin-sidebar__footer p,
.admin-topbar__title p,
.admin-login-card__head p {
  margin: 0;
  color: #556274;
  font-size: 0.82rem;
  line-height: 1.5;
}

.admin-nav {
  display: grid;
  gap: 6px;
}

.admin-nav__item {
  min-height: 42px;
  padding: 0 10px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-nav__item:hover {
  background: #eef2f7;
  color: #111827;
}

.admin-nav__item.is-active {
  background: #e7eef9;
  color: #1d4ed8;
}

.admin-nav__icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  line-height: 1;
  flex: 0 0 auto;
}

.admin-nav__label {
  display: grid;
  gap: 2px;
}

.admin-nav__label strong,
.admin-nav__label small {
  font-size: 0.84rem;
  line-height: 1.2;
}

.admin-nav__label strong {
  color: inherit;
  font-weight: 700;
}

.admin-nav__label small {
  color: #6b7a90;
  font-size: 0.72rem;
  font-weight: 600;
}

.admin-sidebar__footer {
  margin-top: auto;
  padding: 14px 12px;
  border: 1px solid #e4e9f1;
  border-radius: 12px;
  background: #f8fafc;
  display: grid;
  gap: 4px;
}

.admin-sidebar__footer strong {
  font-size: 0.92rem;
  color: #111827;
}

.admin-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.admin-topbar {
  min-height: 64px;
  padding: 14px 20px;
  border-bottom: 1px solid #dbe3ec;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-topbar__title h1,
.admin-panel__head h2,
.admin-login-card__head h1 {
  margin: 0;
  color: #111827;
  letter-spacing: -0.02em;
}

.admin-topbar__title h1 {
  font-size: 1.18rem;
}

.admin-topbar__title p {
  margin: 4px 0 0;
}

.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-breadcrumb a {
  color: #64748b;
}

.admin-breadcrumb strong {
  color: #111827;
}

.admin-content {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 420px);
  gap: 16px;
  align-items: start;
}

body[data-admin-module="products"] .admin-content {
  grid-template-columns: minmax(0, 1fr);
}

.admin-module-panel {
  display: none;
}

.admin-module-panel.is-active {
  display: grid;
}

.admin-panel {
  border: 1px solid #dde5ef;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.admin-panel--editor {
  position: sticky;
  top: 18px;
}

.admin-panel__body {
  display: grid;
  gap: 0;
}

.admin-panel__head {
  padding: 14px 16px;
  border-bottom: 1px solid #e8edf4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-kicker {
  margin: 0 0 4px;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-subtoolbar {
  min-height: 38px;
  padding: 0 16px;
  border-bottom: 1px solid #eef2f7;
  background: #fbfcfe;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-subtoolbar__meta {
  color: #6c7c93;
  font-size: 0.74rem;
  font-weight: 600;
}

.admin-subtoolbar__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-subtoolbar__hint {
  color: #6c7c93;
  font-size: 0.74rem;
  font-weight: 600;
}

.admin-toolbar,
.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-toolbar {
  align-items: center;
}

.admin-search {
  min-width: 320px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #d6dee8;
  border-radius: 9px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.admin-search__icon {
  color: #94a3b8;
  font-size: 0.92rem;
}

.admin-search input {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: #111827;
  outline: none;
  font-size: 0.84rem;
}

.admin-search input::placeholder {
  color: #94a3b8;
}

.admin-select {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #d6dee8;
  border-radius: 9px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-select select {
  border: 0;
  background: transparent;
  color: #111827;
  outline: none;
  font-size: 0.84rem;
  font-weight: 600;
  padding-right: 8px;
}

.admin-table-wrap {
  min-width: 0;
}

.admin-pagination {
  min-height: 44px;
  padding: 0 16px;
  border-top: 1px solid #eef2f7;
  background: #fbfcfe;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-pagination[hidden] {
  display: none;
}

.admin-pagination__summary {
  color: #6c7c93;
  font-size: 0.74rem;
  font-weight: 600;
}

.admin-pagination__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.admin-pagination__actions .admin-button {
  min-width: 72px;
}

.admin-product-table {
  min-height: 540px;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.admin-product-table table {
  width: 100%;
}

.admin-product-table th,
.admin-product-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #eef2f7;
  color: #1f2937;
  font-size: 0.83rem;
  vertical-align: middle;
}

.admin-product-table th {
  background: #f8fafc;
  color: #556274;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-product-table td:last-child,
.admin-product-table th:last-child {
  text-align: left;
}

.admin-product-table__drag-column,
.admin-product-table__drag-cell {
  width: 72px;
  text-align: center;
}

.admin-product-table [data-product-edit] {
  min-width: 72px;
}

.admin-field__hint {
  display: block;
  margin-top: 6px;
  color: #6b7280;
  font-size: 0.76rem;
  line-height: 1.45;
}

.admin-product-table tbody tr {
  cursor: pointer;
  transition: background 160ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 180ms ease, opacity 160ms ease;
  transform: translateY(0);
  position: relative;
}

.admin-product-table tbody tr:hover {
  background: #f8fbff;
}

.admin-product-table tbody tr.is-selected {
  background: #eef5ff;
}

.admin-product-table.is-pointer-sorting tbody tr {
  will-change: transform;
}

.admin-product-table tbody tr.is-sort-dragging {
  z-index: 3;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.admin-product-table tbody tr.is-sort-shifted {
  z-index: 1;
}

.admin-product-table tbody tr.is-sort-target-before::before,
.admin-product-table tbody tr.is-sort-target-after::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.admin-product-table tbody tr.is-sort-target-before::before {
  top: -2px;
}

.admin-product-table tbody tr.is-sort-target-after::after {
  bottom: -2px;
}

.admin-drag-handle {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #d6dee8;
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: border-color 140ms ease, background 140ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.admin-drag-handle:hover:not(:disabled) {
  border-color: #a9b8cb;
  background: #f8fafc;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.admin-drag-handle:active:not(:disabled) {
  cursor: grabbing;
  transform: scale(0.97);
}

.admin-drag-handle.is-active {
  cursor: grabbing;
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.16);
}

.admin-drag-handle:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.admin-drag-handle span {
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: #64748b;
}

.admin-sort-active,
.admin-sort-active * {
  user-select: none;
}

.admin-row-id {
  display: inline-flex;
  max-width: 88px;
  color: #617187;
  font-size: 0.76rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.admin-status-pill.is-active {
  background: #e8f7ee;
  color: #15803d;
}

.admin-form {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.admin-detail-card {
  padding: 16px;
  border-bottom: 1px solid #e8edf4;
  background: #fbfcfe;
  display: grid;
  gap: 14px;
}

.admin-detail-card__empty {
  margin: 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.6;
}

.admin-detail-card__section {
  display: grid;
  gap: 14px;
}

.admin-detail-card__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.admin-detail-card__head h3 {
  margin: 0;
  font-size: 0.98rem;
  color: #111827;
}

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

.admin-detail-pair {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #e5ebf3;
  border-radius: 10px;
  background: #fff;
}

.admin-detail-pair span {
  color: #6b7a90;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-detail-pair strong {
  color: #111827;
  font-size: 0.84rem;
  line-height: 1.5;
  word-break: break-word;
}

.admin-detail-pair--wide {
  grid-column: 1 / -1;
}

.admin-form__group {
  display: grid;
  gap: 12px;
}

.admin-form__group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-form__group-head h3 {
  margin: 0;
  color: #111827;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-field span {
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-body .field input,
.admin-body .field textarea,
.admin-body .field select {
  min-height: 38px;
  border: 1px solid #d6dee8;
  border-radius: 9px;
  padding: 8px 11px;
  background: #fff;
  color: #111827;
}

.admin-body .field textarea {
  min-height: 90px;
}

.admin-body .field input::placeholder,
.admin-body .field textarea::placeholder {
  color: #74839a;
}

.admin-body .field input:focus,
.admin-body .field textarea:focus,
.admin-body .field select:focus {
  border-color: #90b4f8;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.admin-mini-grid {
  gap: 12px;
}

.admin-form__preview {
  margin-top: 4px;
  padding: 12px;
  border: 1px solid #e5ebf3;
  border-radius: 10px;
  background: #f8fafc;
  display: grid;
  gap: 10px;
}

.admin-preview-card {
  padding: 14px;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #fff;
  display: grid;
  gap: 10px;
  cursor: default;
  width: 100%;
}

.admin-preview-card:hover {
  border-color: #dbe3ec;
  background: #fff;
}

.admin-preview-card .product-card__title {
  color: #111827;
}

.admin-preview-card .product-card__description {
  color: #64748b;
}

.admin-preview-card .product-card__currency,
.admin-preview-card .product-card__price-value {
  color: #111827;
}

.admin-preview-card .product-card__flag {
  background: #2563eb;
}

.admin-body .badge {
  min-height: 22px;
  border-radius: 999px;
  border-color: #dbe3ec;
  background: #f8fafc;
  color: #475569;
}

.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
}

.admin-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #111827;
  flex: 0 0 auto;
}

.admin-toggle span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.admin-body .button {
  min-height: 36px;
  border-radius: 9px;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-body .button--primary {
  background: #111827;
  color: #fff;
}

.admin-body .button--primary:hover {
  background: #0f172a;
}

.admin-actions--sticky {
  position: sticky;
  bottom: 0;
  margin: 4px -16px -16px;
  padding: 12px 16px 16px;
  border-top: 1px solid #e8edf4;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), #ffffff 36%);
}

.admin-button--ghost {
  border-color: #d6dee8;
  color: #475569;
  background: #fff;
}

.admin-button--ghost:hover {
  border-color: #c5d0dd;
  color: #111827;
  background: #f8fafc;
}

.admin-body .notice {
  margin: 0 16px 16px;
  border-radius: 9px;
  border-color: #dbe3ec;
  background: #f8fafc;
  color: #334155;
}

.admin-body .notice--success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.admin-body .notice--error {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.admin-body .notice--warning {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.admin-dialog {
  width: min(100%, 720px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
}

.admin-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.admin-dialog__panel {
  margin: 0;
  border: 1px solid #dde5ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.admin-dialog__head {
  padding: 16px 18px;
  border-bottom: 1px solid #e8edf4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.admin-dialog__body > .notice {
  margin: 0;
}

.admin-login-body {
  display: grid;
  place-items: center;
  padding: 28px;
}

.admin-login-shell {
  width: min(100%, 388px);
}

.admin-login-card {
  border: 1px solid #dde5ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
  padding: 24px;
  display: grid;
  gap: 16px;
}

.admin-login-card__head {
  display: grid;
  gap: 8px;
}

.admin-login-card__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-login-card__brand p {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-login-card__head h1 {
  font-size: 1.45rem;
}

.admin-form--login {
  padding: 0;
}

.admin-login-card__foot {
  padding-top: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #94a3b8;
  font-size: 0.78rem;
}

.admin-login-card__foot a {
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-login-card__foot a:hover {
  color: #111827;
}

@media (max-width: 1100px) {
  .admin-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-panel--editor {
    position: static;
  }
}

@media (max-width: 860px) {
  .admin-app {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-shellbar {
    display: none;
  }

  .admin-sidebar {
    border-right: 0;
    border-bottom: 1px solid #dbe3ec;
    gap: 16px;
  }

  .admin-sidebar__footer {
    margin-top: 0;
  }

  .admin-topbar {
    padding: 16px 18px;
    align-items: start;
    flex-direction: column;
  }

  .admin-content {
    padding: 18px;
  }

  .admin-search {
    min-width: 0;
    width: 100%;
  }

  .admin-pagination {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 16px;
  }

  .admin-pagination__actions {
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .admin-login-body {
    padding: 16px;
  }

  .admin-login-card {
    padding: 20px;
  }

  .admin-panel__head,
  .admin-form {
    padding: 16px;
  }

  .admin-detail-card,
  .admin-dialog__body,
  .admin-dialog__head {
    padding: 16px;
  }

  .admin-body .notice {
    margin: 0 16px 16px;
  }

  .admin-product-table th,
  .admin-product-table td {
    padding: 12px;
  }

  .admin-detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-detail-card__head {
    flex-direction: column;
  }

  .admin-login-card__foot {
    align-items: start;
    flex-direction: column;
  }
}
