body {
  margin: 0;
  font-family: Arial, "Noto Sans TC", sans-serif;
  background: #f5f7fb;
  color: #1d2433;
}
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}
.card {
  background: white;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  padding: 20px;
  margin-bottom: 20px;
}
.hero h1 { margin: 0 0 10px; }
.step-card { padding: 16px 20px; }
.stepper { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.step-item { display:flex; align-items:center; gap:12px; color:#6b7280; }
.step-item.active { color:#111827; }
.step-no { width:34px; min-width:34px; height:34px; min-height:34px; flex:0 0 34px; border-radius:50%; background:#dbe5ff; display:flex; align-items:center; justify-content:center; font-weight:700; }
.step-item.active .step-no { background:#2f6df6; color:white; }
.step-item small { display:block; color:#8a93a5; line-height:1.45; }
.step-highlight {
  color:#1f2937;
  font-weight:800;
  background: linear-gradient(transparent 42%, #fff29a 42%, #fff29a 88%, transparent 88%);
  padding: 0 2px;
  border-radius: 3px;
}
.step-line { flex:1; min-width:40px; height:2px; background:#dfe5f0; }
.editor-card { padding: 16px; }
.editor-form { display: flex; flex-direction: column; gap: 16px; }
.top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.section-header h2 { margin: 0 0 6px; }
.section-header p { margin: 0; color:#6b7280; }
.privacy-note {
  margin-top: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #f4f8ff 100%);
  border: 1px solid #d8e6ff;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.privacy-title-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2f6df6;
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.privacy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.privacy-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  color: #334155;
  line-height: 1.55;
  font-weight: 500;
}
.privacy-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 6px;
  box-shadow: 0 0 0 3px rgba(255,255,255,.9);
}
.privacy-dot.local { background: #22c55e; }
.privacy-dot.cloud { background: #f59e0b; }
.privacy-dot.support { background: #a855f7; }
.step2-header-row {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.step-section { display:flex; flex-direction:column; gap:16px; }
.step-hidden { display:none !important; }
.primary-step { padding-bottom: 8px; }
.secondary-step { border-top:1px solid #e5eaf3; padding-top:20px; }
.dimension-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap:16px; }
.crop-editor-card {
  background:#f9fafc;
  border:1px solid #e5eaf3;
  border-radius:16px;
  padding:14px;
}
.crop-header h3 { margin:0 0 6px; }
.crop-header p { margin:0 0 12px; color:#6b7280; }
.crop-stage {
  position:relative;
  min-height:320px;
  background:#111;
  border-radius:14px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.crop-frame {
  position:relative;
  width:min(100%, 560px);
  aspect-ratio: var(--target-aspect, 1 / 1);
  overflow:hidden;
  border-radius:10px;
  background:#0f0f10;
  touch-action:none;
}
.crop-image-layer {
  position:absolute;
  inset:0;
  overflow:hidden;
  cursor:grab;
}
.crop-image-layer.dragging { cursor:grabbing; }
.crop-source-img {
  position:absolute;
  left:50%;
  top:50%;
  max-width:none;
  max-height:none;
  transform-origin:center center;
  user-select:none;
  -webkit-user-drag:none;
}
.crop-overlay {
  position:absolute;
  inset:0;
  box-shadow:0 0 0 9999px rgba(0,0,0,.42);
  border:2px solid #20b034;
  pointer-events:none;
}
.crop-corner {
  position:absolute;
  width:24px;
  height:24px;
  border-color:#20b034;
  border-style:solid;
  border-width:0;
}
.crop-corner.tl { top:-2px; left:-2px; border-top-width:4px; border-left-width:4px; }
.crop-corner.tr { top:-2px; right:-2px; border-top-width:4px; border-right-width:4px; }
.crop-corner.bl { bottom:-2px; left:-2px; border-bottom-width:4px; border-left-width:4px; }
.crop-corner.br { bottom:-2px; right:-2px; border-bottom-width:4px; border-right-width:4px; }
.crop-empty-hint {
  position:absolute;
  inset:0;
  color:#d1d5db;
  text-align:center;
  padding:24px;
  font-size:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.35);
}
.crop-actions-row { margin-top:12px; }
.primary-submit-row { display:flex; justify-content:flex-end; }
.submit-note-row { align-items:flex-end; }
.submit-note-wrap {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
}
.submit-note {
  font-size:12px;
  color:#6b7280;
  font-weight:500;
}
.big-btn { min-width: 220px; }
.big-pill { width: fit-content; }
.upload-pill, .preset-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #eef3ff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
}
.preset-box select { min-width: 180px; }
.filter-button-wall {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:16px;
}
.filter-pill {
  background:#eef3ff;
  color:#2a3f75;
  border:1px solid #cbd9ff;
  border-radius:999px;
  padding:10px 14px;
  font-size:14px;
  font-weight:700;
}
.filter-pill.active {
  background:#2f6df6;
  color:#fff;
  border-color:#2f6df6;
}
.upload-pill input[type="file"] { max-width: 230px; }
.primary-btn, button {
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: #2f6df6;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.preview-panel {
  border-radius: 18px;
  background: #f9fafc;
  border: 1px solid #e4e8f1;
  overflow: hidden;
}
.preview-tabs, .control-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e7ebf3;
}
.tab-btn-reset {
  background: #f8fafc;
  color: #1f2937;
}
.tab-btn-reset:hover {
  background: #eef2f7;
}
.tab-btn, .control-tab {
  flex: 1;
  padding: 14px 10px;
  background: #fff;
  color: #444;
  border: none;
  border-right: 1px solid #edf0f6;
  font-size: 18px;
  cursor: pointer;
}
.tab-btn.active, .control-tab.active {
  background: #20b034;
  color: #fff;
  font-weight: 700;
}
.preview-stage {
  position: relative;
  background: #111;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.preview-panel-ratio .preview-stage {
  min-height: unset;
}
.preview-frame {
  width: min(100%, 560px);
  aspect-ratio: var(--target-aspect, 1 / 1);
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 0 auto;
}
.live-status {
  position:absolute;
  left:50%;
  bottom:14px;
  transform:translateX(-50%);
  background: rgba(10,14,24,.78);
  color:#eaf2ff;
  font-size:12px;
  padding:7px 14px;
  border-radius:999px;
  border:1px solid rgba(120,170,255,.28);
  backdrop-filter: blur(4px);
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
  z-index: 5;
  white-space: nowrap;
}
.live-status.busy { color:#7dd3fc; }
.live-status.ok { color:#86efac; }
.live-status.error { color:#fda4af; }
.stage-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  border-radius: 0;
}
.stage-image.active { display: block; }
.ab-compare {
  position: relative;
  width: min(100%, 760px);
  margin: 0 auto;
  aspect-ratio: var(--target-aspect, 1 / 1);
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  border: 1px solid #d9e0ec;
}
.ab-compare img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #111;
}
.ab-base { position:absolute; inset:0; }
.ab-overlay {
  position:absolute;
  inset:0;
  overflow:hidden;
  clip-path: inset(0 calc(100% - var(--ab-pos, 50%)) 0 0);
}
.ab-overlay img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ab-label {
  position:absolute;
  top:14px;
  z-index:3;
  background:rgba(0,0,0,.58);
  color:#fff;
  padding:6px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
  border:1px solid rgba(255,255,255,.18);
}
.ab-label-left { left:14px; }
.ab-label-right { right:14px; }
.ab-divider {
  position:absolute;
  top:0;
  bottom:0;
  left: var(--ab-pos, 50%);
  width: 3px;
  background: #20b034;
  box-shadow: 0 0 0 1px rgba(255,255,255,.35);
  z-index:2;
}
.ab-handle {
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:52px;
  height:52px;
  border-radius:50%;
  background:#20b034;
  border:3px solid white;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  box-shadow:0 8px 18px rgba(0,0,0,.22);
}
.ab-arrow {
  color:white;
  font-size:14px;
  line-height:1;
  font-weight:900;
}
.ab-range {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:ew-resize;
  z-index:4;
}
.ab-hint {
  margin: 12px 0 0;
  text-align:center;
  color:#6b7280;
}
.poster-frame.same-preview-frame {
  width: min(100%, 560px);
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e5eaf3;
  padding: 10px;
}
.poster-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}
.empty-hint {
  color: #ddd;
  text-align: center;
  padding: 40px 20px;
}
.control-panel {
  display: none;
  background: #fff;
  border: 1px solid #e7ebf3;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  padding: 18px;
}
.control-panel.active { display: block; }
.slider-grid, .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: end;
}
.compact-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.micro-adjust-card {
  display:flex;
  flex-direction:column;
  gap:16px;
}
.micro-option-wall {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.micro-option {
  background:#eef3ff;
  color:#2a3f75;
  border:1px solid #cbd9ff;
  border-radius:999px;
  padding:10px 14px;
  font-size:14px;
  font-weight:700;
}
.micro-option.active {
  background:#2f6df6;
  color:#fff;
  border-color:#2f6df6;
}
.shared-slider-box {
  background:#f9fafc;
  border:1px solid #e5eaf3;
  border-radius:16px;
  padding:16px;
}
.shared-slider-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
  gap:12px;
}
.shared-slider-head strong {
  font-size:18px;
}
.shared-slider-head span {
  color:#20b034;
  font-weight:700;
}
label { display: flex; flex-direction: column; gap: 8px; font-weight: 700; }
.helper-text { font-size: 13px; color: #6b7280; font-weight: 500; line-height: 1.4; }
input[type="number"], input[type="file"], select, input[type="range"] {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #cfd6e4;
  background: white;
}
input[type="range"] { padding: 0; }
label span[id$="_out"] { color: #20b034; font-weight: 700; }
.stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.stats div {
  background: #eef3ff;
  border-radius: 16px;
  padding: 16px;
  min-width: 120px;
  display: flex;
  flex-direction: column;
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.image-grid img, .plate-item img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d8deea;
  background: white;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  border-bottom: 1px solid #e5e9f2;
  padding: 10px;
  text-align: left;
}
.plate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.plate-item {
  background: #fafbff;
  border-radius: 14px;
  padding: 10px;
  border: 1px solid #e5eaf3;
}
.remap-section {
  margin-top: 18px;
  background: #f9fafc;
  border: 1px solid #e7ebf3;
  border-radius: 14px;
  padding: 14px;
}
.remap-frame {
  background:#fff;
  border:1px solid #e5eaf3;
  border-radius:16px;
  padding:14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.remap-grid {
  display: grid;
  gap: 12px;
}
.quick-action-row { display:flex; gap:12px; flex-wrap:wrap; }
.secondary-action {
  background:#f3f4f6;
  color:#1f2937;
  border:1px solid #d1d5db;
}
.disabled-color-grid {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap:10px;
}
.disabled-color-item {
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:8px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:8px 10px;
  font-weight:600;
}
.disabled-color-item .dot {
  width:18px; height:18px; border-radius:50%; border:1px solid #777; display:inline-block;
}
.smart-suggestion-list { display: grid; gap: 10px; }
.smart-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #eef8ee;
  border: 1px solid #cfe8cf;
  border-radius: 12px;
  padding: 10px 12px;
}
.smart-item strong { color: #1d6d2c; }
.commerce-cta-box {
  margin-top: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  border: 1px solid #d5e3ff;
  border-radius: 16px;
  padding: 16px;
}
.commerce-cta-box h3 {
  margin: 0 0 8px;
}
.commerce-cta-box p {
  margin: 0 0 12px;
  color: #4b5563;
  line-height: 1.55;
}
.commerce-panel {
  margin-top: 12px;
  border-top: 1px dashed #c9d7f5;
  padding-top: 12px;
}
.commerce-info {
  color: #475569;
  font-size: 14px;
  margin-bottom: 10px;
}
.commerce-unlock-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.commerce-unlock-row input {
  min-width: 220px;
  flex: 1;
}
.commerce-status {
  margin-top: 10px;
  font-size: 13px;
  color: #475569;
}
.commerce-order-grid {
  margin-top: 10px;
}
.commerce-label-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.commerce-help-link {
  font-size: 13px;
  font-weight: 700;
  color: #2f6df6;
  text-decoration: none;
}
.commerce-help-link:hover {
  text-decoration: underline;
}
.commerce-order-actions {
  margin-top: 12px;
}
.commerce-order-actions-centered {
  justify-content: center;
}
.commerce-submit-order-btn {
  min-width: 320px;
  padding: 18px 32px;
  font-size: 20px;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 28px rgba(47,109,246,.28);
}
.commerce-span-2 {
  grid-column: 1 / -1;
}
.commerce-divider {
  margin: 14px 0;
  border-top: 1px dashed #c9d7f5;
}
.commerce-assets-card[hidden] { display:none !important; }
.locked-assets-list {
  display: grid;
  gap: 18px;
}
.locked-asset-item {
  display: grid;
  gap: 8px;
}
.remap-row {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 10px;
  align-items: center;
}
.remap-row span {
  text-align: center;
  font-size: 22px;
  color: #666;
}
code {
  background: #f0f2f7;
  padding: 2px 6px;
  border-radius: 6px;
}
@media (max-width: 720px) {
  .container { padding: 12px; }
  .tab-btn, .control-tab { font-size: 16px; }
  .top-actions { flex-direction: column; align-items: stretch; }
  .crop-stage { min-height: 240px; padding:10px; }
  .crop-frame { width:100%; }
  .crop-corner { width:28px; height:28px; }
  .ab-handle { width:62px; height:62px; }
  .ab-label { font-size:12px; padding:5px 9px; }
}

.notice-modal[hidden] { display:none !important; }
.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.notice-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
}
.notice-card {
  position: relative;
  width: min(92vw, 560px);
  background: #ffffff;
  border-radius: 24px;
  padding: 28px 24px 24px;
  box-shadow: 0 30px 90px rgba(15,23,42,.28);
  text-align: center;
}
.notice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #2f6df6;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}
.notice-card h3 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.2;
  color: #0f172a;
}
.notice-card p {
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
  color: #334155;
}
.notice-order-id {
  margin-top: 16px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #dbe3f2;
  border-radius: 16px;
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  word-break: break-word;
}
.notice-actions {
  margin-top: 22px;
  display: flex;
  justify-content: center;
}
.notice-confirm-btn {
  min-width: 240px;
  padding: 16px 28px;
  font-size: 19px;
}
.notice-modal.is-busy .notice-confirm-btn {
  display: none;
}
.notice-modal.is-error .notice-badge {
  background: #fff1f2;
  color: #e11d48;
}
.notice-modal.is-success .notice-badge {
  background: #ecfdf5;
  color: #047857;
}
@media (max-width: 640px) {
  .commerce-submit-order-btn {
    width: 100%;
    min-width: 0;
    font-size: 18px;
  }
  .notice-card {
    padding: 24px 18px 20px;
  }
  .notice-card h3 {
    font-size: 24px;
  }
  .notice-card p {
    font-size: 16px;
  }
  .notice-order-id {
    font-size: 18px;
  }
  .notice-confirm-btn {
    width: 100%;
    min-width: 0;
  }
}

.admin-body {
  background: linear-gradient(180deg, #eef3fb 0%, #f8fafc 100%);
}
.admin-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 24px 40px;
}
.admin-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-login-shell {
  width: min(100%, 460px);
  padding: 24px;
}
.admin-login-card {
  padding: 28px;
}
.admin-kicker {
  margin: 0 0 8px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.admin-subtitle {
  color: #64748b;
  line-height: 1.65;
}
.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
}
.admin-login-form label,
.admin-order-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 700;
  color: #1f2937;
}
.admin-login-foot {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}
.admin-login-btn {
  width: 100%;
  min-height: 54px;
}
.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.admin-topbar h1 {
  margin: 0 0 8px;
}
.admin-topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-notice {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-weight: 700;
}
.admin-notice-success {
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
}
.admin-notice-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.admin-stat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-stat-card strong {
  font-size: 32px;
}
.admin-stat-label {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}
.admin-stat-card small {
  color: #64748b;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(360px, .95fr);
  gap: 18px;
  align-items: start;
}
.admin-side-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.admin-panel {
  padding: 20px;
}
.admin-panel-wide {
  min-width: 0;
}
.admin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.admin-panel-head h2 {
  margin: 0 0 4px;
}
.admin-panel-head p,
.admin-panel-meta {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}
.admin-order-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.admin-order-card {
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}
.admin-order-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.admin-order-head strong {
  font-size: 18px;
}
.admin-order-time {
  color: #64748b;
  font-size: 13px;
  margin-top: 4px;
}
.admin-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.admin-status-badge.status-new { background: #dbeafe; color: #1d4ed8; }
.admin-status-badge.status-paid { background: #ede9fe; color: #6d28d9; }
.admin-status-badge.status-producing { background: #fef3c7; color: #b45309; }
.admin-status-badge.status-shipped { background: #cffafe; color: #155e75; }
.admin-status-badge.status-completed { background: #dcfce7; color: #166534; }
.admin-status-badge.status-cancelled { background: #fee2e2; color: #991b1b; }
.admin-order-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.admin-order-meta-grid div {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.admin-order-meta-grid span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.admin-order-meta-grid strong {
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.admin-span-2 {
  grid-column: span 2;
}
.admin-order-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.admin-order-links a {
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}
.admin-order-links code {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
}
.admin-order-form {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}
.admin-order-note textarea,
.admin-login-form input,
.admin-order-form select,
.admin-order-form textarea,
.admin-inventory-table input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: white;
}
.admin-order-parts {
  border-top: 1px dashed #dbe4f0;
  padding-top: 10px;
}
.admin-order-parts summary {
  cursor: pointer;
  font-weight: 800;
  color: #1f2937;
}
.admin-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.admin-part-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
}
.admin-part-chip strong {
  margin-left: auto;
}
.admin-part-swatch {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(17,24,39,.12);
  flex: 0 0 16px;
}
.admin-empty {
  padding: 18px;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  border: 1px dashed #cbd5e1;
}
.admin-inventory-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin-inventory-table-wrap {
  overflow: auto;
}
.admin-inventory-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-inventory-table th,
.admin-inventory-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
}
.admin-inventory-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
}
.admin-inventory-table tr.is-negative {
  background: #fff1f2;
}
.admin-inventory-table tr.is-low {
  background: #fffbeb;
}
.admin-color-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-color-cell small {
  display: block;
  color: #64748b;
}
.admin-save-stock-btn,
.admin-cleanup-btn {
  width: 100%;
}
.admin-cleanup-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.admin-cleanup-meta div {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.admin-cleanup-meta span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.admin-cleanup-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.admin-cleanup-list code {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}
@media (max-width: 1080px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .admin-shell,
  .admin-login-shell {
    padding: 16px;
  }
  .admin-topbar,
  .admin-panel-head,
  .admin-order-head,
  .admin-order-links {
    flex-direction: column;
  }
  .admin-order-meta-grid,
  .admin-cleanup-meta,
  .admin-order-form {
    grid-template-columns: 1fr;
  }
  .admin-span-2 {
    grid-column: auto;
  }
}

