﻿:root {
  --bg: #0f172a;
  --bg-alt: #111827;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-border: rgba(148, 163, 184, 0.22);
  --text: #e5eefc;
  --muted: #9fb0c9;
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.15);
  --accent-2: #22c55e;
  --danger: #ef4444;
  --radius: 22px;
  --shadow: 0 18px 60px rgba(2, 6, 23, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.14), transparent 24%),
    linear-gradient(160deg, #020617 0%, #0f172a 42%, #111827 100%);
  font-family: "Pretendard Variable", "Segoe UI", sans-serif;
}

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

.page-shell {
  min-height: 100vh;
  padding: 32px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #fdba74;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy {
  margin: 16px 0 0;
  max-width: 880px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-stat,
.panel {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(18px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-stat {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  background:
    linear-gradient(145deg, rgba(249, 115, 22, 0.22), rgba(15, 23, 42, 0.86));
}

.hero-stat span {
  color: #fed7aa;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-stat strong {
  font-size: 30px;
  line-height: 1.1;
}

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

.panel {
  padding: 22px;
}

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

.panel-head h2 {
  margin: 0;
  font-size: 20px;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.controls-panel {
  position: sticky;
  top: 24px;
  align-self: start;
}

.field-group,
.field-grid,
.action-row {
  display: grid;
  gap: 12px;
}

.inline-group {
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: end;
}

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

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  color: #dce7f8;
  font-size: 14px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.65);
  color: var(--text);
  border-radius: 16px;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(249, 115, 22, 0.7);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

textarea {
  resize: vertical;
  min-height: 320px;
  line-height: 1.55;
}

button {
  border: 0;
  border-radius: 16px;
  padding: 13px 16px;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #1c1917;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.24);
}

.secondary {
  background: rgba(34, 197, 94, 0.16);
  color: #dcfce7;
  border: 1px solid rgba(34, 197, 94, 0.22);
  font-weight: 700;
}

.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.results-column {
  display: grid;
  gap: 24px;
}

.summary-cards,
.result-grid {
  display: grid;
  gap: 14px;
}

.summary-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-card,
.result-card {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.55);
}

.summary-card {
  padding: 16px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.summary-card strong {
  font-size: 21px;
  line-height: 1.2;
}

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

.result-card {
  padding: 18px;
}

.result-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.definition-item {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.45);
}

.definition-item span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.definition-item strong,
.definition-item code {
  word-break: break-word;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-ok {
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
}

.status-fail {
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
}

.status-warn {
  background: rgba(249, 115, 22, 0.16);
  color: #fed7aa;
}

.raw-output {
  overflow: auto;
  border-radius: 18px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.7);
  color: #d1e0ff;
  min-height: 260px;
  line-height: 1.55;
}

.notice {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1180px) {
  .layout,
  .hero {
    grid-template-columns: 1fr;
  }

  .controls-panel {
    position: static;
  }

  .summary-cards,
  .result-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 16px;
  }

  .summary-cards,
  .result-grid,
  .field-grid,
  .action-row,
  .inline-group {
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 240px;
  }
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 6px;
}

.capture-status {
  margin: 4px 0 16px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
  line-height: 1.5;
}

.capture-ok {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.24);
  color: #dcfce7;
}

.capture-warn {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.22);
  color: #fed7aa;
}

.capture-fail {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.24);
  color: #fecaca;
}

.register-stage-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.register-flow-stat {
  min-height: 156px;
}

.app-register-layout {
  display: grid;
  grid-template-columns: minmax(380px, 520px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.phone-stage {
  position: sticky;
  top: 24px;
}

.phone-frame {
  position: relative;
  padding: 14px;
  border-radius: 40px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.16), rgba(15, 23, 42, 0.92)),
    linear-gradient(180deg, #0f172a, #020617);
  box-shadow:
    0 26px 90px rgba(2, 6, 23, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.phone-screen {
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.98));
}

.app-topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 22px 16px;
}

.app-topbar h2 {
  margin: 2px 0 0;
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.app-kicker,
.sheet-label {
  margin: 0;
  color: #fdba74;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.24);
  color: #fed7aa;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.top-link-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.share-intake-card {
  margin: 0 18px 16px;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.55);
}

.compact-panel-head {
  margin-bottom: 14px;
}

.compact-panel-head h3,
.sheet-header h3 {
  margin: 0;
  font-size: 20px;
}

.share-intake-card textarea#sharedInput {
  min-height: 96px;
}

.single-action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.app-product-stage {
  padding: 0 18px 18px;
}

.product-preview {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(145deg, rgba(249, 115, 22, 0.08), rgba(15, 23, 42, 0.72));
}

.product-preview-empty {
  grid-template-columns: 1fr;
}

.product-preview-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.65);
}

.product-preview-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.preview-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.product-preview-copy strong {
  font-size: 22px;
  line-height: 1.24;
}

.product-preview-price {
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.product-preview-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
}

.registration-sheet {
  position: relative;
  padding: 16px 18px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.98));
}

.sheet-grabber {
  width: 54px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.4);
}

.sheet-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.inline-link {
  min-height: 42px;
  padding-inline: 14px;
}

.quick-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.quick-target-button {
  padding-inline: 14px;
}

.sheet-footer {
  display: grid;
  gap: 12px;
}

.sheet-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.sheet-save-button {
  width: 100%;
}

.tracked-items-list {
  display: grid;
  gap: 12px;
}

.tracked-item-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.55);
}

.tracked-item-card strong {
  font-size: 16px;
  line-height: 1.4;
}

.tracked-item-meta {
  color: var(--muted);
  font-size: 14px;
}

.tracked-item-link {
  color: #fdba74;
  text-decoration: none;
  word-break: break-all;
  font-size: 13px;
}

.tracked-page-layout {
  display: grid;
  gap: 24px;
}

.tracked-page-list {
  display: grid;
  gap: 14px;
}

.tracked-page-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.55);
}

.tracked-page-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.tracked-page-title-block {
  display: grid;
  gap: 8px;
}

.tracked-page-title-block strong {
  font-size: 22px;
  line-height: 1.25;
}

.tracked-page-price-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tracked-price-box {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.tracked-price-box span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tracked-price-box strong {
  font-size: 20px;
  line-height: 1.2;
}

.tracked-page-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.tracked-page-meta a {
  color: #fdba74;
  text-decoration: none;
  word-break: break-all;
}

.tracked-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tracked-empty-state {
  display: grid;
  gap: 10px;
  padding: 24px;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.45);
}

.tracked-empty-state strong {
  font-size: 18px;
}

.tracked-empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.bridge-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.bridge-card {
  width: min(100%, 640px);
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.98));
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.45);
}

.bridge-card h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.bridge-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.bridge-payload {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.48);
}

.bridge-payload pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

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

@media (max-width: 1260px) {
  .register-stage-header,
  .app-register-layout {
    grid-template-columns: 1fr;
  }

  .phone-stage {
    position: static;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 18px;
  }

  .app-topbar,
  .share-intake-card,
  .app-product-stage,
  .registration-sheet {
    padding-left: 16px;
    padding-right: 16px;
  }

  .product-preview {
    grid-template-columns: 1fr;
  }

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

  .sheet-header {
    flex-direction: column;
  }

  .top-link-group,
  .tracked-page-actions,
  .tracked-page-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .tracked-page-price-row {
    grid-template-columns: 1fr;
  }

  .bridge-card {
    padding: 22px;
  }

  .bridge-card h1 {
    font-size: 28px;
  }

  .bridge-actions {
    flex-direction: column;
  }
}
