:root {
  color-scheme: dark;
  --black: #151515;
  --panel: #222120;
  --line: rgba(239, 239, 239, .14);
  --paper: #efefef;
  --muted: #9b9d98;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--black);
  color: var(--paper);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  display: grid;
  grid-template-columns: 240px 1fr;
}
a { color: inherit; text-decoration: none; }
button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #efefef;
  color: #151515;
  padding: 0 14px;
  font: inherit;
}
input, select {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #151515;
  color: var(--paper);
  padding: 0 10px;
  font: inherit;
}
.ghost {
  background: transparent;
  color: var(--paper);
}
.console-side {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  padding: 28px;
}
.brand {
  display: block;
  margin-bottom: 44px;
  letter-spacing: .12em;
  font-size: 14px;
}
.console-side nav { display: grid; gap: 14px; color: var(--muted); }
.console-main { padding: 28px; min-width: 0; }
.console-top {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}
.console-top h1 {
  margin-top: 6px;
  font-size: 34px;
  font-weight: 400;
}
.system-state {
  display: flex;
  gap: 28px;
  text-align: right;
}
.console-top p, .metric-row span { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.ops-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  background: var(--line);
}
.ops-board article {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 56px;
  padding: 0 16px;
  background: #1b1a19;
}
.ops-board span { color: var(--muted); }
.ops-board strong { font-size: 22px; font-weight: 400; }
.metric-row article, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
}
.metric-row article { padding: 18px; }
.metric-row strong { font-size: 28px; font-weight: 400; }
.panel { padding: 22px; margin-bottom: 22px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.tool-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
h1 { margin: 0; font-size: 22px; font-weight: 500; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 13px 10px;
  border-top: 1px solid var(--line);
}
th { color: var(--muted); font-weight: 400; }
.status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  background: #30382a;
  color: #dbeec0;
}
.goods-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px;
}
.goods-grid article {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 14px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.goods-grid img { width: 104px; border: 1px solid var(--line); }
.goods-grid h2 { margin: 0 0 6px; font-size: 18px; font-weight: 500; }
.goods-grid p, .inquiry span, .inquiry p, #settings p { color: var(--muted); }
.mini-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.inquiry {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px 0 0;
  margin-top: 14px;
}
.inquiry strong, .inquiry span { display: block; }
.inquiry p {
  grid-column: 1 / -1;
  margin: 0;
}
@media (max-width: 880px) {
  body { grid-template-columns: 1fr; }
  .console-side {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .metric-row, .goods-grid, .ops-board { grid-template-columns: 1fr; }
  .console-top, .system-state { display: grid; text-align: left; }
  table { display: block; overflow-x: auto; }
}

/* Final mockup pass: light CRM order management */
:root {
  color-scheme: light;
  --black: #111;
  --panel: #fff;
  --line: #e4e4df;
  --paper: #191919;
  --muted: #777a73;
  --soft: #f7f7f3;
  --olive: #5c642d;
  --danger: #b94c42;
}
body {
  background: #f2f2ee;
  color: #181818;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}
button {
  border: 1px solid #d8d8d2;
  background: #fff;
  color: #151515;
  border-radius: 2px;
}
input, select, textarea {
  min-height: 36px;
  border: 1px solid #d8d8d2;
  background: #fff;
  color: #151515;
  padding: 0 10px;
  font: inherit;
  border-radius: 2px;
}
textarea {
  min-height: 92px;
  padding: 10px;
  resize: vertical;
}
.console-side {
  background: linear-gradient(180deg, #161616, #090909);
  color: #f2f2ee;
  padding: 28px 20px;
  border-right: 0;
}
.brand {
  margin-bottom: 30px;
  font-weight: 700;
  line-height: 1.2;
}
.console-side nav {
  gap: 6px;
  color: #d3d3cc;
}
.console-side nav a {
  display: block;
  padding: 14px 16px;
  border-radius: 4px;
}
.console-side nav a.is-active,
.console-side nav a:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.console-foot {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 28px;
  display: grid;
  gap: 8px;
  color: #d8d8d2;
  font-size: 12px;
}
.console-foot strong {
  font-size: 18px;
  font-weight: 500;
}
.console-main {
  padding: 24px;
  background: #f6f6f2;
}
.console-top {
  display: grid;
  grid-template-columns: 220px minmax(360px, 1fr) auto;
  align-items: center;
  margin-bottom: 20px;
}
.console-top h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
}
.console-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 72px;
  gap: 10px;
}
.admin-pill {
  justify-self: end;
  color: #444;
  font-size: 13px;
}
.metric-row {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metric-row article {
  min-height: 100px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e4e4df;
  box-shadow: 0 8px 20px rgba(0,0,0,.03);
}
.metric-row span {
  color: #555;
}
.metric-row strong {
  color: #111;
  font-size: 34px;
  font-weight: 800;
}
.metric-row em {
  margin-left: 4px;
  color: #555;
  font-style: normal;
}
.console-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
}
.order-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
  font-size: 13px;
}
.order-tabs a {
  color: #555;
  padding: 8px 0;
}
.order-tabs a.is-active {
  color: #111;
  border-bottom: 2px solid var(--olive);
}
.order-tabs button {
  margin-left: auto;
  min-height: 34px;
}
.order-tabs button + button {
  margin-left: 0;
}
.panel {
  margin: 0 0 18px;
  padding: 0;
  background: #fff;
  border: 1px solid #e4e4df;
  box-shadow: 0 10px 24px rgba(0,0,0,.03);
}
table {
  color: #222;
  font-size: 12px;
}
th, td {
  padding: 13px 10px;
  border-top: 1px solid #ecece7;
  white-space: nowrap;
}
thead th {
  background: #fbfbf8;
  color: #5f625d;
  font-size: 12px;
}
tbody tr:first-child {
  background: #f5f3e8;
}
.status {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 2px;
  background: #eef2e9;
  color: var(--olive);
  font-size: 12px;
}
.status.pay {
  background: #eef2e9;
  color: #4b5c27;
}
.status.ship {
  background: #fff1e6;
  color: #b86625;
}
.mini-panel {
  padding: 18px;
}
.panel-head h2 {
  margin: 0;
  font-size: 18px;
}
.goods-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}
.goods-grid article {
  border-top: 1px solid #ecece7;
}
.goods-grid h3 {
  margin: 0 0 6px;
}
.goods-grid p {
  color: #666;
}
.order-detail {
  background: #fff;
  border-left: 1px solid #e4e4df;
  padding: 18px;
  min-height: 650px;
  box-shadow: -8px 0 24px rgba(0,0,0,.03);
}
.order-detail header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.order-detail h2 {
  margin: 0;
  font-size: 18px;
}
.order-detail h3 {
  margin: 20px 0 10px;
  font-size: 14px;
}
.detail-no {
  display: block;
  margin-bottom: 10px;
}
.order-detail dl {
  margin: 0;
  border-top: 1px solid #e4e4df;
}
.order-detail dl div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #ededed;
}
.order-detail dt {
  color: #666;
}
.order-detail dd {
  margin: 0;
}
.order-detail .total {
  color: #a52019;
  font-weight: 800;
}
.order-detail label {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  color: #555;
  font-size: 12px;
}
.order-detail footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}
.order-detail footer button:first-child {
  background: #111;
  color: #fff;
}
.order-detail footer button:last-child {
  background: var(--olive);
  color: #fff;
}
@media (max-width: 1100px) {
  body { grid-template-columns: 1fr; }
  .console-side {
    position: static;
    height: auto;
  }
  .console-foot { position: static; margin-top: 28px; }
  .console-top, .console-workspace {
    grid-template-columns: 1fr;
  }
  .console-search, .metric-row, .goods-grid {
    grid-template-columns: 1fr;
  }
}
