@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  color-scheme: dark;
  --bg-primary: #0a0e1a;
  --bg-panel: rgba(255, 255, 255, 0.03);
  --bg-panel-soft: rgba(255, 255, 255, 0.024);
  --bg-input: rgba(255, 255, 255, 0.04);
  --border-panel: rgba(255, 255, 255, 0.06);
  --border-input: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(59, 130, 246, 0.4);
  --text-primary: #e2e8f0;
  --text-secondary: rgba(255, 255, 255, 0.56);
  --text-muted: rgba(255, 255, 255, 0.24);
  --text-accent: #60a5fa;
  --accent-blue: #3b82f6;
  --accent-blue-light: #60a5fa;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-green-light: #34d399;
  --accent-yellow: #eab308;
  --accent-red: #f87171;
  --gradient-btn: linear-gradient(135deg, #3b82f6, #2563eb);
  --shadow-panel: 0 24px 64px rgba(3, 7, 18, 0.32);
  --shadow-button: 0 4px 16px rgba(59, 130, 246, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

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

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 86% 8%, rgba(59, 130, 246, 0.12) 0%, transparent 30%),
    radial-gradient(circle at 12% 86%, rgba(6, 182, 212, 0.08) 0%, transparent 32%),
    linear-gradient(180deg, #0a0e1a 0%, #080d17 100%);
  color: var(--text-primary);
  font-family: "Outfit", sans-serif;
  line-height: 1.5;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 42rem;
  height: 42rem;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(32px);
  z-index: 0;
}

body::before {
  top: -20rem;
  right: -14rem;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.14) 0%, transparent 68%);
}

body::after {
  bottom: -24rem;
  left: -16rem;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 68%);
}

img {
  display: block;
  max-width: 100%;
}

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

a {
  color: inherit;
}

.mono {
  font-family: "JetBrains Mono", monospace;
}

.hidden {
  display: none !important;
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  height: 34px;
  width: auto;
  flex: 0 0 auto;
}

.brand-name {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.language-button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  min-width: 40px;
  min-height: 32px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.language-button.is-active {
  background: rgba(59, 130, 246, 0.18);
  color: var(--text-primary);
}

.reseller-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.reseller-link:hover {
  color: var(--text-primary);
}

.site-main {
  flex: 1;
  padding: 22px 0 18px;
}

.site-footer {
  padding: 14px 0 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.6;
}

.app-error {
  margin-bottom: 16px;
}

.centered-card {
  max-width: 420px;
  margin: 72px auto 0;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-panel);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    var(--shadow-panel);
}

.panel-soft {
  background: var(--bg-panel-soft);
}

.view-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tabs-wrap {
  padding: 10px;
}

.tabs {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.product-tab {
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border-panel);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.product-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.2);
  color: var(--text-primary);
}

.product-tab.is-active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--text-accent);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.12);
}

.tab-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  opacity: 0.96;
}

.tab-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 22px;
}

.tab-title {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.tab-subtitle {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  line-height: 1.35;
}

.product-tab.is-active .tab-subtitle {
  color: rgba(96, 165, 250, 0.82);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.activation-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.instructions-panel {
  padding: 22px;
}

.check-form,
.step-section,
.dynamic-field-area,
.feedback-slot,
.instructions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-label {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-label {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.field-help {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.field-help a {
  color: var(--text-accent);
  font-weight: 500;
  text-decoration: none;
}

.field-help a:hover {
  text-decoration: underline;
}

.field-input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--border-input);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-primary);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}

.field-input::placeholder {
  color: var(--text-muted);
}

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

.cdk-input {
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease,
    filter 0.2s ease;
}

.btn-primary {
  background: var(--gradient-btn);
  color: white;
  box-shadow: var(--shadow-button);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.35);
  filter: brightness(1.03);
}

.btn-primary:disabled {
  opacity: 0.52;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

.placeholder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.placeholder-icon {
  margin-bottom: 12px;
  color: rgba(96, 165, 250, 0.62);
  font-size: 28px;
  line-height: 1;
}

.placeholder-title {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 22px;
  font-weight: 300;
}

.placeholder-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 13px;
  line-height: 1.6;
}

.status-strip,
.note-strip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.status-mark {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  margin-top: 6px;
  border-radius: 999px;
}

.status-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.status-title,
.status-line,
.note-text {
  margin: 0;
}

.status-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.status-line {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.status-success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.15);
}

.status-success .status-mark {
  background: var(--accent-green);
}

.status-success .status-title {
  color: var(--accent-green-light);
}

.status-error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.15);
}

.status-error .status-mark {
  background: var(--accent-red);
}

.status-error .status-title {
  color: #fca5a5;
}

.status-warning {
  background: rgba(234, 179, 8, 0.08);
  border-color: rgba(234, 179, 8, 0.15);
}

.status-warning .status-mark {
  background: var(--accent-yellow);
}

.status-warning .status-title {
  color: #fcd34d;
}

.status-info {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.15);
}

.status-info .status-mark {
  background: var(--accent-blue-light);
}

.status-info .status-title {
  color: #93c5fd;
}

.instructions-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.instructions-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.instructions-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.instruction-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.step-num {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--text-accent);
  font-size: 11px;
  font-weight: 600;
}

.instruction-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.instruction-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.instruction-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.instruction-link {
  width: fit-content;
  color: var(--text-accent);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.note-strip {
  border-color: rgba(234, 179, 8, 0.15);
  background: rgba(234, 179, 8, 0.06);
}

.note-mark {
  color: var(--accent-yellow);
  font-size: 12px;
}

.note-text {
  color: #fcd34d;
  font-size: 12px;
  line-height: 1.5;
}

.loading-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-header,
  .site-main,
  .site-footer {
    width: min(100%, calc(100% - 32px));
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .site-main {
    padding: 18px 0 16px;
  }

  .tabs {
    flex-wrap: wrap;
    overflow: visible;
  }

  .product-tab {
    min-width: 100%;
  }

  .activation-panel,
  .instructions-panel {
    padding: 18px;
  }

  .check-row {
    grid-template-columns: 1fr;
  }

  .field-label-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}
