/* A dedicated generated wallpaper keeps the customer presentation unchanged. */
body.cs-admin {
  --bg: #0d192b;
  --surface: #142637;
  --surface-2: #1a3144;
  --line: #3b5366;
  --text: #edf5f9;
  --muted: #b1c5d1;
  --accent: #a4d8d1;
  --accent-text: #102e36;
  --shadow: 0 12px 36px #030c1840;
  color-scheme: dark;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  letter-spacing: -.02em;
  line-height: 1.55;
  background: #0d192b;
  isolation: isolate;
}

/* A fixed layer avoids stretching the texture on long order and price lists. */
body.cs-admin::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(#0b1726b3, #0b1726b3),
    url("./admin-bg-obsidian-v1.jpg") center / cover no-repeat;
}

body.cs-admin .app-header {
  border-bottom: 1px solid #98bfd32b;
  margin-bottom: 22px;
}

body.cs-admin .cs-tabs {
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #101f30eb;
  box-shadow: var(--shadow);
}

body.cs-admin :is(.cs-toolbar, .cs-order, .cs-inquiry, .cs-fee-card, .cs-price-row) {
  border-color: var(--line);
  background: #152737;
  border-radius: 20px;
  box-shadow: 0 8px 24px #020a151f;
}

body.cs-admin #adminMain .cs-metric {
  border-color: var(--line);
  border-radius: 20px;
  background: #1a3041;
  box-shadow: var(--shadow);
}

body.cs-admin #adminMain .cs-metric.payout {
  border-color: #668e9e;
  background: linear-gradient(140deg, #294957f5, #1c3347fa);
}

body.cs-admin .cs-metric.payout strong { color: #c5eee8; }
body.cs-admin .cs-empty { background: #102131ed; border-color: #526b7c; }
body.cs-admin .cs-notice { background: #19384c; border-color: #668aa0; color: #e4f1f9; }
body.cs-admin .cs-notice.error { background: #422b37; border-color: #ac7388; color: #ffe0e7; }
body.cs-admin #csNotice { position: sticky; top: max(12px, env(safe-area-inset-top)); z-index: 35; max-height: 30vh; overflow: auto; box-shadow: var(--shadow); }

body.cs-admin #adminMain button { background: #223c50; border-color: #496477; }
body.cs-admin #adminMain button:hover:not(:disabled) { background: #304d62; border-color: #8eb7c7; }
body.cs-admin #adminMain button.selected,
body.cs-admin #adminMain #csPriceSave,
body.cs-admin #adminMain .cs-fee-input button {
  background: #a4d8d1;
  border-color: #a4d8d1;
  color: #102e36;
}
body.cs-admin #adminMain :is(button.selected, #csPriceSave, .cs-fee-input button):hover:not(:disabled) {
  background: #c1ebe5;
  border-color: #c1ebe5;
}
body.cs-admin #adminMain input {
  background: #0c1c2a;
  border-color: #547184;
  color: var(--text);
}
body.cs-admin #adminMain input::placeholder { color: #a1b6c4; opacity: 1; }
body.cs-admin #adminMain :is(button, input):focus-visible,
body.cs-admin .cs-order summary:focus-visible {
  outline: 3px solid #c1ebe5;
  outline-offset: 3px;
}
body.cs-admin .toast { background: #193044; border-color: #668aa0; color: var(--text); }
body.cs-admin .toast.error { background: #422b37; border-color: #ac7388; color: #ffe0e7; }

/* Keep native selection and keyboard support with a consistent control surface. */
body.cs-admin :is(button, input, select, textarea) {
  font-family: inherit;
  letter-spacing: inherit;
}
body.cs-admin :is(.brand-copy h1, .cs-section-heading h2, .cs-section-heading h3) {
  font-weight: 700;
  letter-spacing: -.035em;
}
body.cs-admin .cs-price-product {
  display: block;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
body.cs-admin #adminMain select {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  height: 54px;
  margin-top: 9px;
  padding: 0 48px 0 18px;
  border: 1px solid #4b687b;
  border-radius: 16px;
  background-color: #172d3e;
  background-image: linear-gradient(45deg, transparent 50%, #a4d8d1 50%), linear-gradient(135deg, #a4d8d1 50%, transparent 50%);
  background-position: calc(100% - 23px) 50%, calc(100% - 18px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  color: #e0edf3;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: 0 5px 18px #030c181a;
  cursor: pointer;
  transition: background-color .18s, border-color .18s;
}
body.cs-admin #adminMain select:hover:not(:disabled) { background-color: #203b4d; border-color: #7fa9b7; }
body.cs-admin #adminMain select:focus-visible { outline: 3px solid #a4d8d1; outline-offset: 3px; }
body.cs-admin #adminMain select:disabled { opacity: .55; cursor: default; }
body.cs-admin #adminMain select option { background: #172d3e; color: #edf5f9; }
body.cs-admin #csPriceEditor { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
body.cs-admin .cs-price-actions {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 25;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 9px;
  border: 1px solid #496477;
  border-radius: 21px;
  background: #142637;
  box-shadow: 0 10px 34px #030c1866;
}
body.cs-admin #adminMain .cs-price-actions button { min-height: 48px; white-space: nowrap; }
body.cs-admin .cs-price-secondary { margin-top: 16px; }
@media (prefers-reduced-motion: reduce) {
  body.cs-admin #adminMain select { transition: none; }
}

@media (max-width: 700px) {
  body.cs-admin .cs-tabs { padding: 5px; gap: 5px; }
  body.cs-admin .app-header { margin-bottom: 18px; }
}
@media (max-width: 480px) {
  body.cs-admin .cs-metrics { grid-template-columns: minmax(0, 1fr); }
  body.cs-admin .cs-metric.amount strong { font-size: clamp(18px, 5.4vw, 25px); }
}
