:root {
  --ink: #17201d;
  --muted: #68736e;
  --soft: #8b958f;
  --line: #dce3df;
  --line-strong: #c7d2cc;
  --surface: #f4f6f2;
  --panel: #ffffff;
  --panel-soft: #f9faf7;
  --brand: #145c4c;
  --brand-dark: #0c332c;
  --brand-soft: #e7f0ec;
  --accent: #b9573f;
  --gold: #aa7a2d;
  --blue: #2f5f87;
  --shadow: 0 18px 50px rgba(22, 32, 29, 0.1);
  --shadow-soft: 0 10px 28px rgba(22, 32, 29, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surface);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(20, 92, 76, 0.08), rgba(244, 246, 242, 0) 360px),
    radial-gradient(circle at top right, rgba(47, 95, 135, 0.14), transparent 360px),
    var(--surface);
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.22;
  font-weight: 850;
}

h2 {
  margin-bottom: 0;
  font-size: 19px;
  line-height: 1.35;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
  line-height: 1.35;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 32px 18px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(220, 227, 223, 0.86);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.brand-symbol {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 38%),
    linear-gradient(135deg, var(--brand-dark), var(--brand));
  box-shadow: 0 14px 28px rgba(20, 92, 76, 0.24);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.metric-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.metric-strip span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(199, 210, 204, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.metric-strip strong {
  margin-right: 5px;
  color: var(--brand-dark);
  font-size: 15px;
}

.status-pill {
  min-width: 78px;
  justify-content: center;
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.insight-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 24px;
  align-items: stretch;
  margin: 18px 18px 0;
  padding: 22px 24px;
  border: 1px solid rgba(199, 210, 204, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(12, 51, 44, 0.97), rgba(20, 92, 76, 0.92)),
    #0c332c;
  color: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.insight-strip .eyebrow {
  color: #d8b35f;
}

.insight-strip h2 {
  max-width: 720px;
  color: #f8faf6;
  font-size: 24px;
  font-weight: 830;
}

.insight-art {
  position: relative;
  min-height: 96px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent),
    linear-gradient(160deg, rgba(216, 179, 95, 0.88), rgba(185, 87, 63, 0.86));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.insight-art span {
  position: absolute;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 24px rgba(12, 51, 44, 0.24);
}

.insight-art span:nth-child(1) {
  width: 74px;
  height: 54px;
  right: 32px;
  top: 18px;
}

.insight-art span:nth-child(2) {
  width: 56px;
  height: 42px;
  right: 112px;
  bottom: 18px;
  background: rgba(231, 240, 236, 0.94);
}

.insight-art span:nth-child(3) {
  width: 38px;
  height: 38px;
  right: 16px;
  bottom: 18px;
  background: rgba(255, 247, 232, 0.94);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(286px, 360px) minmax(430px, 1fr) minmax(310px, 390px);
  gap: 18px;
  align-items: start;
  padding: 18px;
}

.request-panel,
.result-panel,
.catalog-panel {
  min-width: 0;
  border: 1px solid rgba(199, 210, 204, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.request-panel,
.result-panel,
.catalog-panel {
  padding: 20px;
}

.section-head {
  margin-bottom: 16px;
}

.section-head.inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-requests {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.preset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfcf9);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.preset:hover {
  border-color: rgba(20, 92, 76, 0.48);
  box-shadow: 0 8px 18px rgba(20, 92, 76, 0.09);
  transform: translateY(-1px);
}

.preset:focus-visible,
.primary-action:focus-visible,
input:focus-visible,
textarea:focus-visible,
.tag-check input:focus-visible + span {
  outline: 3px solid rgba(47, 95, 135, 0.22);
  outline-offset: 2px;
}

.preset span {
  overflow-wrap: anywhere;
  text-align: left;
  font-weight: 800;
}

.preset strong {
  color: var(--brand-dark);
  white-space: nowrap;
}

.match-form {
  display: grid;
  gap: 13px;
}

label,
fieldset {
  display: grid;
  gap: 7px;
  color: #33423d;
  font-size: 13px;
  font-weight: 800;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 8px;
  color: #33423d;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(23, 32, 29, 0.03);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
textarea:focus {
  border-color: rgba(20, 92, 76, 0.58);
  box-shadow: 0 0 0 4px rgba(20, 92, 76, 0.09);
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-check {
  position: relative;
  display: inline-flex;
}

.tag-check input {
  position: absolute;
  opacity: 0;
}

.tag-check span,
.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.tag-check span {
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tag-check input:checked + span {
  border-color: rgba(20, 92, 76, 0.44);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.primary-action {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent),
    linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(20, 92, 76, 0.22);
  transition: box-shadow 160ms ease, transform 160ms ease, filter 160ms ease;
}

.primary-action:hover {
  filter: saturate(1.06);
  box-shadow: 0 18px 32px rgba(20, 92, 76, 0.27);
  transform: translateY(-1px);
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.summary-band div {
  min-height: 88px;
  padding: 15px;
  border: 1px solid rgba(199, 210, 204, 0.8);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0)),
    var(--panel-soft);
}

.summary-band span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.summary-band strong {
  display: block;
  color: var(--brand-dark);
  font-size: 20px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

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

.match-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 32, 29, 0.055);
}

.product-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(12, 51, 44, 0.94), rgba(47, 95, 135, 0.78)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  color: #fff;
  font-size: 26px;
  font-weight: 950;
}

.product-visual::before,
.product-visual::after {
  content: "";
  position: absolute;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 28px rgba(12, 51, 44, 0.22);
}

.product-visual::before {
  width: 54px;
  height: 42px;
  right: 14px;
  bottom: 14px;
}

.product-visual::after {
  width: 34px;
  height: 52px;
  left: 16px;
  top: 16px;
  background: rgba(216, 179, 95, 0.88);
}

.product-visual span {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 10px rgba(12, 51, 44, 0.28);
}

.match-content {
  min-width: 0;
}

.match-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.match-title p,
.item-row p,
.supplier-row p,
.supplier-row small {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.match-title strong {
  color: var(--accent);
  font-size: 15px;
  white-space: nowrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0;
}

.tags span {
  min-height: 26px;
  padding: 4px 9px;
  background: #f7f9f6;
}

.note {
  margin-bottom: 8px;
  color: #374943;
  font-size: 13px;
  line-height: 1.55;
}

.match-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.operations {
  margin-top: 16px;
  padding: 16px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)),
    #fff7e9;
  border: 1px solid #ead7b3;
}

.operations ol {
  margin: 10px 0 0;
  padding-left: 22px;
  color: #514635;
  line-height: 1.65;
}

.supplier-list,
.catalog-list {
  display: grid;
  gap: 10px;
}

.supplier-list {
  margin-bottom: 16px;
}

.supplier-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.supplier-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0)),
    var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 950;
}

.supplier-row h3,
.item-row strong {
  overflow-wrap: anywhere;
}

.supplier-row small {
  display: block;
  margin-top: 4px;
}

.item-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.item-row span {
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 330px minmax(0, 1fr);
  }

  .catalog-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 880px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 18px;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .metric-strip {
    justify-content: flex-start;
  }

  h1 {
    font-size: 23px;
  }

  .insight-strip {
    grid-template-columns: 1fr;
    margin: 12px 12px 0;
    padding: 18px;
  }

  .insight-strip h2 {
    font-size: 20px;
  }

  .insight-art {
    min-height: 72px;
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .summary-band,
  .match-card,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .product-visual {
    min-height: 104px;
  }
}

@media (max-width: 520px) {
  .brand-symbol {
    width: 44px;
    height: 44px;
  }

  .request-panel,
  .result-panel,
  .catalog-panel {
    padding: 16px;
  }

  .section-head.inline,
  .match-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-band div {
    min-height: 74px;
  }

  .item-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
