:root {
  --bg: #0d0f10;
  --panel: #17191b;
  --panel-2: #202326;
  --line: #2b3033;
  --text: #f4f2ec;
  --muted: #a9aaa7;
  --accent: #d8ff3e;
  --accent-dark: #1b2408;
  --soft: #edf3ff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 0 36px;
  background: rgba(13, 15, 16, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  padding: 0 36px;
  background: #090a0b;
  border-bottom: 1px solid var(--line);
}

.admin-topbar nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.admin-body {
  background: #0a0b0c;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #101310;
}

.topbar nav {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.account-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.account-pill span,
.account-pill .strong {
  color: #101310;
  background: var(--accent);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
}

.account-pill .invite-pill { color: var(--accent); font-weight: 700; }

.flash-wrap {
  position: fixed;
  right: 24px;
  top: 78px;
  z-index: 20;
  display: grid;
  gap: 8px;
}

.flash {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}

body.announcement-open { overflow: hidden; }

.announcement-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 5, 6, .78);
}

.announcement-backdrop[hidden] { display: none; }

.announcement-dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow-y: auto;
  border: 1px solid #454c50;
  border-radius: 8px;
  padding: 30px;
  background: #171a1c;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}

.announcement-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid #454c50;
  border-radius: 6px;
  background: #22272a;
  color: #f7f9fc;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.announcement-close:hover { border-color: var(--accent); color: var(--accent); }
.announcement-label { color: var(--accent); font-size: 12px; font-weight: 800; }
.announcement-dialog h2 { margin: 8px 44px 14px 0; font-size: 24px; }
.announcement-content { color: #d7dcdf; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
.announcement-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.announcement-dismiss,
.announcement-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
}
.announcement-dismiss { border: 1px solid #515a60; background: #22272a; color: #f7f9fc; }
.announcement-link { border: 1px solid var(--accent); background: var(--accent); color: #101310; }

.studio {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
}

.studio-panel {
  padding: 20px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #151819, #0d0f10);
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  font-size: 26px;
  line-height: 1.14;
  margin: 10px 0 12px;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.generate-form,
.auth-card,
.contact-form {
  display: grid;
  gap: 14px;
}

.template-stack {
  display: grid;
  gap: 10px;
}

.template-btn {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid rgba(216, 255, 62, .5);
  border-radius: 8px;
  padding: 12px 13px;
  background: var(--accent-dark);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.template-btn span {
  font-weight: 900;
  color: var(--accent);
}

.template-btn small {
  color: var(--muted);
}

.template-btn.secondary {
  border-color: var(--line);
  background: var(--panel-2);
}

.template-btn.active {
  border-color: rgba(216, 255, 62, .85);
  background: #24300a;
}

.material-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.material-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 12px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.material-btn.active {
  border-color: rgba(216, 255, 62, .85);
  background: var(--accent);
  color: #101310;
}

.workflow-panel {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 19, 21, .72);
  padding: 10px;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.workflow-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.workflow-btn.active {
  border-color: rgba(216, 255, 62, .85);
  background: var(--accent);
  color: #101310;
}

.template-btn, .template-btn.secondary { border-color: var(--line); background: var(--panel-2); box-shadow: none; }
.template-btn span, .template-btn.secondary span { color: var(--text); }
.template-btn.active { border-color: rgba(216, 255, 62, .85); background: #24300a; box-shadow: inset 3px 0 0 var(--accent); }
.template-btn.active span { color: var(--accent); }
.template-btn.secondary.active { border-color: #ffb84d; background: #30220d; box-shadow: inset 3px 0 0 #ffb84d; }
.template-btn.secondary.active span { color: #ffd089; }
.workflow-btn[data-workflow="main"].active { border-color: #63d8a4; background: #123226; color: #a7f3d0; }
.workflow-btn[data-workflow="basic"].active { border-color: #57b9ff; background: #102b40; color: #a8dcff; }
.workflow-btn[data-workflow="detail"].active { border-color: #ffb84d; background: #35240c; color: #ffd28c; }
.workflow-btn[data-workflow="commerce"].active { border-color: #ef82c7; background: #35152b; color: #ffc0e8; }

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111315;
  color: var(--text);
  padding: 12px 13px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.tool-grid button,
.price-card button,
.admin-row button,
.product-create button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

.tool-grid button.active,
.canvas-toolbar button.active {
  border-color: rgba(216, 255, 62, .7);
  color: var(--accent);
  background: var(--accent-dark);
}

.reference-panel {
  display: grid;
  gap: 10px;
}

.reference-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.reference-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111315;
}

.reference-thumb {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.reference-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reference-item .reference-remove {
  position: absolute;
  right: 4px;
  bottom: 4px;
  border: 0;
  border-radius: 6px;
  padding: 4px 6px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.upload-box {
  min-height: 74px;
  display: grid;
  place-items: center;
  border: 1px dashed #3b4144;
  border-radius: 8px;
  background: #111315;
  color: var(--muted);
  cursor: pointer;
}

.upload-box input {
  display: none;
}

.primary-btn,
.primary-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 8px;
  padding: 15px 16px;
  background: var(--accent);
  color: #101310;
  font-weight: 900;
  cursor: pointer;
}

.canvas-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  justify-items: center;
  padding: 18px;
}

.result-card {
  width: min(100%, 980px);
  min-height: auto;
  display: grid;
  grid-template-rows: auto auto auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #141719;
}

.result-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: var(--stage-aspect, 1 / 1);
  min-height: 380px;
  max-height: none;
  background:
    radial-gradient(circle at 25% 20%, rgba(216, 255, 62, .16), transparent 28%),
    linear-gradient(135deg, #17191b, #090a0b 65%);
  color: var(--muted);
}

.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.preview-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}

.preview-title strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: #111315;
  color: var(--muted);
  font-size: 12px;
}

.preview-title strong.active {
  border-color: rgba(216, 255, 62, .55);
  color: var(--accent);
  background: var(--accent-dark);
}

.canvas-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.canvas-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.canvas-actions button.active {
  border-color: rgba(216, 255, 62, .7);
  color: var(--accent);
  background: var(--accent-dark);
}

.edit-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.compact-tools {
  padding: 0 6px 0 0;
  margin-right: 2px;
  border-right: 1px solid var(--line);
}

.edit-tools label {
  width: 108px;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
}

.edit-tools input {
  padding: 0;
  accent-color: var(--accent);
}

.edit-tools button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.edit-tools button.active {
  border-color: rgba(216, 255, 62, .7);
  color: #101310;
  background: var(--accent);
}

.canvas-stage {
  position: relative;
  overflow: hidden;
  touch-action: none;
}

.canvas-drop-overlay {
  position: absolute;
  z-index: 6;
  inset: 12px;
  display: grid;
  place-content: center;
  gap: 7px;
  border: 2px dashed rgba(216, 255, 62, .8);
  border-radius: 8px;
  background: rgba(13, 15, 16, .9);
  color: var(--text);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .14s ease;
}

.canvas-drop-overlay strong { color: var(--accent); font-size: 18px; }
.canvas-drop-overlay span { color: #c6cacc; font-size: 13px; }
.canvas-stage.drag-active .canvas-drop-overlay { opacity: 1; visibility: visible; }
.canvas-stage.drag-active { box-shadow: inset 0 0 0 2px rgba(216, 255, 62, .42); }

.generation-overlay {
  position: absolute;
  z-index: 4;
  inset: auto 24px 24px auto;
  width: min(300px, calc(100% - 48px));
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 6px 12px;
  align-items: center;
  border: 1px solid rgba(216, 255, 62, .38);
  border-radius: 8px;
  padding: 13px 14px;
  background: rgba(13, 15, 16, .86);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px);
}

.generation-overlay.hidden {
  display: none;
}

.generation-overlay strong {
  color: var(--text);
  font-size: 14px;
}

.generation-overlay span {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.loading-ring {
  grid-row: span 2;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(216, 255, 62, .24);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin .9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.empty-state.hidden {
  display: none;
}

#previewImage {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  transform: translate(var(--canvas-pan-x, 0px), var(--canvas-pan-y, 0px)) scale(var(--canvas-zoom, 1));
  transform-origin: center center;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
}

#previewImage.visible {
  display: block;
}

#annotationCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: translate(var(--canvas-pan-x, 0px), var(--canvas-pan-y, 0px)) scale(var(--canvas-zoom, 1));
  transform-origin: center center;
}

#maskPreviewCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  pointer-events: none;
  mix-blend-mode: screen;
  transform: translate(var(--canvas-pan-x, 0px), var(--canvas-pan-y, 0px)) scale(var(--canvas-zoom, 1));
  transform-origin: center center;
}

#maskPreviewCanvas.visible {
  display: block;
}

#annotationCanvas.active {
  pointer-events: auto;
  cursor: crosshair;
}

.canvas-stage.panning #previewImage {
  cursor: grabbing;
}

.mock-image {
  width: min(520px, 80%);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  gap: 8px;
  align-content: center;
  border: 1px solid rgba(216, 255, 62, .36);
  border-radius: 8px;
  background: linear-gradient(135deg, #d8ff3e, #f4f2ec 48%, #636dff);
  color: #111;
}

.mock-image b { font-size: 28px; }
.result-status {
  padding: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.section-head,
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quick-products {
  width: min(100%, 1040px);
  margin-top: 0;
}

.candidate-panel,
.history-panel,
.case-wall {
  width: min(100%, 1040px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

.candidate-panel {
  padding: 12px;
}

.candidate-panel .generation-failure-grid {
  display: block;
  min-height: 132px;
  padding: 0;
  border: 1px solid rgba(255, 92, 92, .32);
  background: rgba(120, 28, 28, .12);
  color: #f6f7f8;
}

.generation-failure {
  display: grid;
  gap: 8px;
  padding: 16px;
  text-align: left;
}

.generation-failure strong {
  color: #ff8c8c;
  font-size: 15px;
}

.generation-failure p {
  margin: 0;
  color: #f6f7f8;
  line-height: 1.6;
}

.generation-failure small {
  color: #b7bdc3;
}

.failure-code {
  width: fit-content;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 4px;
  color: #8e969d;
  font-size: 11px;
}

.history-panel {
  padding: 16px;
}

.case-wall {
  padding: 16px;
}

.candidate-panel h2,
.history-panel h2,
.case-wall h2 {
  margin: 0;
  font-size: 16px;
}

.candidate-panel .section-head,
.history-panel .section-head,
.case-wall .section-head {
  margin-bottom: 12px;
}

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

.case-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #111315;
}

.case-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.case-before,
.case-after {
  min-height: 92px;
  display: grid;
  align-content: end;
  gap: 4px;
  border-radius: 8px;
  padding: 10px;
  color: #101310;
  background: linear-gradient(135deg, #30363a, #f4f2ec);
}

.case-after {
  background: linear-gradient(135deg, #d8ff3e, #6570ff);
}

.case-before span,
.case-after span {
  font-size: 11px;
  font-weight: 900;
  opacity: .72;
}

.case-before strong,
.case-after strong {
  font-size: 13px;
}

.case-card h3 {
  margin-bottom: 6px;
  font-size: 15px;
}

.case-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
  font-size: 12px;
}

.case-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.case-meta strong {
  color: var(--accent);
  white-space: nowrap;
}

.history-panel .section-head button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 9px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

.side-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
  max-height: none;
  overflow: auto;
}

.candidate-panel .side-image-grid {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

.history-panel .side-image-grid {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}

.side-image-grid.empty-side {
  display: grid;
  place-items: center;
  min-height: 120px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.side-image {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  aspect-ratio: 1 / 1;
  background: #111315;
  cursor: pointer;
}

.side-image[draggable="true"] { cursor: grab; }
.side-image.dragging,
.reference-thumb.dragging { opacity: .45; }

.side-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.side-image span {
  position: absolute;
  left: 6px;
  top: 6px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.history-image-card {
  display: grid;
  gap: 8px;
}

.history-image-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.history-image-actions a,
.history-image-actions button {
  display: grid;
  place-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.history-image-actions button {
  width: 100%;
}

.history-image-actions button:hover {
  border-color: #ff6b6b;
  color: #ff9d9d;
}

.product-row,
.product-grid,
.pricing-grid,
.feature-band,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.quick-products .product-row {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.quick-products .mini-card {
  padding: 12px;
}

.quick-products .cover-block {
  height: 72px;
  margin-bottom: 8px;
  font-size: 12px;
}

.quick-products .mini-card h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.quick-products .mini-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.quick-products .mini-card strong {
  font-size: 12px;
}

.mini-card,
.product-card,
.price-card,
.feature-band article,
.stats-grid div,
.admin-section,
.lead-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.cover-block,
.product-cover {
  height: 150px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2d3235, #d8ff3e);
  color: #101310;
  font-weight: 900;
}

.protected-preview {
  position: relative;
  overflow: hidden;
  user-select: none;
}

.protected-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(.4px) saturate(.82);
  transform: scale(1.04);
}

.product-cover.protected-preview img,
.quick-products .protected-preview img {
  object-fit: contain;
  transform: none;
  filter: saturate(.82) contrast(.94);
}

.product-thumb-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: -6px 0 14px;
}

.product-thumb {
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0;
  background: #101314;
  cursor: pointer;
}

.product-thumb.active { border-color: var(--accent); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.protected-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(-32deg, rgba(255,255,255,.08) 0 1px, transparent 1px 56px),
    linear-gradient(180deg, transparent, rgba(0,0,0,.28));
  pointer-events: none;
}

.protected-preview b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.72);
  font-size: 16px;
  text-align: center;
  transform: rotate(-18deg);
  z-index: 1;
}

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

.product-card {
  position: relative;
}

.product-card.sold {
  opacity: .58;
}

.product-state {
  display: inline-flex;
  margin-bottom: 10px;
  border: 1px solid rgba(216, 255, 62, .4);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.price-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 12px 0;
  color: var(--muted);
}

.price-line strong {
  color: var(--text);
  font-size: 20px;
}

.bid-form {
  display: grid;
  gap: 10px;
}

.disabled-btn {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  background: #2a2d30;
  color: var(--muted);
}

.page-shell,
.admin-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0;
}

.page-title {
  max-width: 720px;
  margin-bottom: 26px;
}

.auth-page {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.text-link { color: var(--accent); }

.invite-bonus-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.invite-bonus-strip span {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #101314;
}

.invite-bonus-strip small,
.invite-bonus-strip strong {
  display: block;
}

.invite-bonus-strip small,
.field-note { color: var(--muted); }
.invite-bonus-strip strong { margin-top: 5px; color: var(--accent); font-size: 16px; }
.field-note { line-height: 1.55; }

.price-card strong {
  display: block;
  margin: 12px 0;
  font-size: 32px;
}

.price-card.featured {
  border-color: rgba(216, 255, 62, .6);
  background: var(--accent-dark);
}

.enterprise-hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 64px max(36px, calc((100vw - 1180px) / 2));
  background:
    linear-gradient(90deg, rgba(13, 15, 16, .98), rgba(13, 15, 16, .58)),
    radial-gradient(circle at 82% 20%, rgba(216, 255, 62, .2), transparent 32%),
    linear-gradient(135deg, #111, #2d3235);
}

.enterprise-hero div { max-width: 620px; }

.feature-band,
.contact-section {
  width: min(1180px, calc(100% - 48px));
  margin: 36px auto;
}

.contact-section {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  padding: 34px 0 64px;
}

.contact-form {
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
}

.wide { grid-column: 1 / -1; }

.stats-grid {
  margin: 24px 0;
}

.stats-grid span {
  color: var(--muted);
  display: block;
}

.stats-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
}

.admin-section {
  margin-top: 18px;
}

.api-settings-form {
  display: grid;
  grid-template-columns: 220px 1fr 1fr 1fr 130px;
  gap: 12px;
  align-items: end;
}

.registration-settings-form {
  grid-template-columns: 160px 160px minmax(220px, 1fr) repeat(3, 140px) 120px;
}

.announcement-settings-form {
  display: grid;
  grid-template-columns: 190px minmax(220px, .8fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: end;
}

.announcement-settings-form label { margin: 0; }
.announcement-settings-form input,
.announcement-settings-form textarea { border-color: #46515d; background: #0f1316; color: #f7f9fc; }
.announcement-settings-form textarea { min-height: 122px; resize: vertical; line-height: 1.55; }
.announcement-switch { align-self: start; }
.announcement-content-field { grid-column: 1 / -1; }
.announcement-form-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #b9c2cc; font-size: 13px; }
.announcement-form-actions button { border: 0; border-radius: 6px; padding: 11px 18px; background: var(--accent); color: #101310; font-weight: 900; cursor: pointer; }

.api-settings-form label {
  margin: 0;
}

.api-settings-form button {
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background: var(--accent);
  color: #101310;
  font-weight: 900;
  cursor: pointer;
}

.switch-row {
  min-height: 48px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.switch-row input {
  width: auto;
}

.api-state {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
}

.api-state.on {
  border-color: rgba(216, 255, 62, .5);
  color: var(--accent);
}

.admin-note {
  margin: 12px 0 0;
  font-size: 13px;
}

.admin-table {
  display: grid;
  gap: 8px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr 1.7fr 110px 90px 86px 86px 80px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111315;
}

.admin-row.user-row {
  grid-template-columns: 1.5fr 1fr 100px 120px 1fr 80px;
}

.admin-row input {
  padding: 9px;
}

.product-create {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.product-upload-field {
  grid-column: span 2;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px dashed #46515d;
  border-radius: 6px;
  background: #0f1316;
}

.product-upload-field span { color: #d7dde3; font-size: 13px; }
.product-upload-field input { margin-top: 7px; padding: 0; border: 0; }

.product-create button {
  grid-column: span 1;
}

.product-list,
.lead-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.product-admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(280px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #303841;
  border-radius: 6px;
  background: #0f1316;
}

.product-admin-item strong,
.product-admin-item span,
.product-admin-item small { display: block; }
.product-admin-item span, .product-admin-item small { margin-top: 4px; color: #b9c2cc; }
.product-toggle-form { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 8px; }
.product-toggle-form input { min-width: 0; }
.product-toggle-form .danger-btn { background: #ff6b6b; color: #1b0b0b; }

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

.order-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111315;
  padding: 12px;
}

.order-list.compact .order-item {
  grid-template-columns: 1fr;
}

.order-item strong,
.order-item span {
  display: block;
}

.order-item span,
.order-item p,
.order-item small {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 13px;
}

.order-item form {
  display: grid;
  gap: 8px;
  min-width: 130px;
}

.order-item button {
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--accent);
  color: #101310;
  font-weight: 900;
  cursor: pointer;
}

.order-item .danger-btn {
  background: #ff6b6b;
  color: #1b0b0b;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.policy-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    height: auto;
    padding: 16px;
  }
  .topbar nav,
  .account-pill {
    flex-wrap: wrap;
  }
  .studio,
  .contact-section {
    grid-template-columns: 1fr;
  }
  .canvas-area {
    grid-template-columns: 1fr;
  }
  .result-card,
  .quick-products {
    grid-column: auto;
    grid-row: auto;
  }
  .product-row,
  .product-grid,
  .pricing-grid,
  .feature-band,
  .stats-grid,
  .case-grid {
    grid-template-columns: 1fr;
  }
  .canvas-area,
  .studio-panel {
    padding: 24px;
  }
  .admin-row,
  .admin-row.user-row,
  .product-create,
  .api-settings-form,
  .contact-form {
    grid-template-columns: 1fr;
  }
  .product-upload-field { grid-column: auto; }
  .product-admin-item, .product-toggle-form { grid-template-columns: 1fr; }
}
.orders-page { max-width: 1180px; }
.invite-center {
  margin: 0 0 28px;
  padding: 20px;
  border: 1px solid rgba(216, 255, 62, .35);
  border-radius: 8px;
  background: #121617;
}
.invite-center-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.invite-center h2 { margin: 7px 0 0; font-size: 20px; }
.invite-summary { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 8px; }
.invite-summary span { padding: 10px 12px; border-left: 2px solid var(--accent); background: #0c0f10; }
.invite-summary small, .invite-summary strong { display: block; }
.invite-summary small { color: #c4c9cd; }
.invite-summary strong { margin-top: 5px; font-size: 16px; }
.invite-center > p { margin: 14px 0 10px; color: #c6cacc; }
.invite-share-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.invite-share-row input { min-width: 0; }
.invite-share-row button { cursor: pointer; }
.referral-list { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-bottom: 2px; }
.referral-list span { flex: 0 0 auto; min-width: 190px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; }
.referral-list strong, .referral-list small { display: block; }
.referral-list small { margin-top: 4px; color: #c4c9cd; }
.orders-page .page-title p { color: #c6cacc; }
.order-section { margin: 28px 0; }
.order-section h2 { font-size: 18px; margin: 0 0 12px; }
.order-table-wrap { overflow-x: auto; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.order-table { width: 100%; border-collapse: collapse; min-width: 720px; color: #273142; }
.order-table th, .order-table td { padding: 12px 14px; border-bottom: 1px solid #e4e7ec; text-align: left; font-size: 14px; }
.order-table th { color: #344054; background: #eef2f6; font-weight: 700; }
.order-table td { color: #273142; background: #fff; }
.order-table td small { color: #5f6b7a; }
.order-table td a { color: #155eef; font-weight: 700; }
.order-table tbody tr:hover td { background: #f6f8fa; }
.status-tag { display: inline-block; padding: 3px 7px; border-radius: 4px; background: #eef0f2; }
.status-success { color: #16794b; background: #e8f7ef; }
.status-partial_success { color: #946200; background: #fff5d6; }
.status-failed { color: #b42318; background: #feeceb; }
.points-plus { color: #067647; font-weight: 700; }
.points-minus { color: #b42318; font-weight: 700; }
.user-detail-page .admin-head p { margin: 6px 0 0; color: #667085; }
.admin-action-band { background: #f8f9fa; }
.admin-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-action-grid form { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; }
.task-actions { min-width: 290px; }
.task-actions form { display: grid; grid-template-columns: 70px 1fr auto; gap: 6px; margin: 0 0 6px; }
.prompt-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 780px) { .admin-action-grid { grid-template-columns: 1fr; } .admin-action-grid form { grid-template-columns: 1fr; } }
.order-admin-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(120px, .7fr) auto; gap: 6px; align-items: center; }

/* Admin operations UI: explicit colors prevent dark-theme inheritance on light tables. */
.admin-body { color: #f7f9fc; }
.admin-body .admin-shell { width: min(1480px, calc(100% - 40px)); padding: 32px 0 56px; }
.admin-body .admin-section { border-color: #303841; background: #15191d; }
.admin-body .admin-section h2 { color: #f7f9fc; }
.admin-body .admin-note, .admin-body .section-head small { color: #b9c2cc; }
.admin-head-actions { display: flex; align-items: center; gap: 10px; }
.admin-head-actions form { margin: 0; }
.admin-head-actions .admin-export-btn {
  min-height: 38px; border: 0; border-radius: 6px; padding: 8px 12px;
  background: var(--accent); color: #111; font-weight: 800;
}
.admin-head-actions a, .admin-head > a, .section-link, .secondary-action, .pagination-bar a {
  border: 1px solid #46515d; border-radius: 6px; padding: 8px 11px; color: #f7f9fc; background: #20262c;
}
.admin-head-actions .card-admin-link { border-color: #859729; color: var(--accent); background: #1d260d; font-weight: 800; }
.admin-global-search, .admin-filter-bar, .settlement-form {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px; border: 1px solid #303841; border-radius: 8px; background: #15191d;
}
.admin-global-search { margin: 18px 0 8px; }
.admin-global-search input { flex: 1; min-width: 260px; }
.admin-filter-bar input, .admin-filter-bar select, .admin-global-search input, .settlement-form input {
  width: auto; min-height: 40px; border-color: #46515d; background: #0f1316; color: #f7f9fc;
}
.admin-filter-bar button, .admin-global-search button, .settlement-form button {
  min-height: 40px; border: 0; border-radius: 6px; padding: 0 14px; background: var(--accent); color: #111; font-weight: 800;
}
.member-filter { margin-bottom: 12px; }
.member-filter input { flex: 1; min-width: 280px; }
.admin-body .order-table-wrap { border-color: #d5dae0; background: #fff; }
.admin-body .order-table { color: #273142; }
.admin-body .order-table th { color: #344054; background: #eef2f6; border-bottom-color: #d5dae0; }
.admin-body .order-table td { color: #273142; background: #fff; border-bottom-color: #e3e7eb; }
.admin-body .order-table tbody tr:hover td { background: #f6f8fa; }
.admin-body .order-table td a { color: #155eef; font-weight: 700; }
.admin-body .order-table td small { color: #667085; }
.admin-body .order-table .points-plus { color: #067647; font-weight: 800; }
.admin-body .order-table .points-minus { color: #b42318; font-weight: 800; }
.compact-table { min-width: 900px; }
.finance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.finance-grid > div { min-height: 116px; border: 1px solid #36414b; border-radius: 7px; padding: 15px; background: #0f1316; }
.finance-grid span, .settlement-strip span, .ledger-summary span { display: block; color: #b9c2cc; font-size: 13px; }
.finance-grid strong, .settlement-strip strong, .ledger-summary strong { display: block; margin-top: 8px; color: #f7f9fc; font-size: 25px; }
.finance-grid small { display: block; margin-top: 8px; color: #8f9aa6; }
.finance-grid .finance-highlight { border-color: #7b8f1f; background: #1d260d; }
.finance-grid .finance-highlight strong { color: var(--accent); }
.settlement-strip { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 1px; margin-top: 12px; overflow: hidden; border: 1px solid #36414b; border-radius: 7px; background: #36414b; }
.settlement-strip > div { padding: 13px; background: #101418; }
.settlement-strip .withdrawable { background: #1d260d; }
.settlement-strip .withdrawable strong { color: var(--accent); }
.settlement-form { margin-top: 12px; padding: 0; border: 0; background: transparent; }
.settlement-form input:first-child { width: 180px; }
.settlement-form input:nth-child(2) { flex: 1; min-width: 260px; }
.finance-note { padding: 10px 12px; border-left: 3px solid #859729; background: #101418; }
.ledger-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 14px 0; }
.ledger-summary > div { border: 1px solid #303841; border-radius: 7px; padding: 14px; background: #15191d; }
.table-section { padding: 0; overflow: hidden; }
.pagination-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; color: #b9c2cc; }
.pagination-bar div { display: flex; gap: 8px; }
.admin-action-band { color: #273142; }
.admin-action-band h2 { color: #273142 !important; }
.user-detail-page .stats-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.card-redeem-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid #48525b;
  border-radius: 8px;
  background: #171b1e;
}
.card-redeem-panel h2 { margin: 3px 0 8px; }
.card-redeem-panel p { margin: 0; color: var(--muted); line-height: 1.65; }
.card-redeem-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.card-redeem-form label { min-width: 0; }
.card-redeem-form input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; }
.card-redeem-form button, .card-buy-action, .card-login-action {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 0; border-radius: 7px;
  padding: 0 16px; background: var(--accent); color: #111; font-weight: 900;
}
.card-package-price { margin: 14px 0; color: #f7f9fc; font-size: 20px; font-weight: 800; }
.card-buy-action { width: 100%; }
.card-payment-notes { margin-top: 26px; padding: 22px 0; border-top: 1px solid var(--line); }
.card-payment-notes h2 { font-size: 18px; }
.card-payment-notes ol { margin: 10px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.9; }
.card-stats-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.card-stats-grid strong { font-size: 25px; }
.model-pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.model-pricing-card { display: grid; gap: 12px; padding: 16px; border: 1px solid #36414b; border-radius: 7px; background: #0f1316; }
.model-pricing-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.model-pricing-title strong { color: #f7f9fc; font-size: 17px; }
.model-pricing-card label span { display: block; margin-bottom: 6px; color: #b9c2cc; font-size: 12px; }
.model-pricing-card select, .model-pricing-card input[type="number"] { width: 100%; min-height: 40px; border-color: #46515d; background: #15191d; color: #f7f9fc; }
.points-input-wrap { display: flex; align-items: center; gap: 8px; }
.points-input-wrap input { min-width: 0; }
.points-input-wrap b { color: var(--accent); font-size: 12px; white-space: nowrap; }
.model-cost-note { min-height: 32px; color: #8f9aa6; line-height: 1.45; }
.model-card-options { display: flex; flex-wrap: wrap; gap: 14px; color: #c4cbd2; font-size: 13px; }
.model-card-options label { display: flex; align-items: center; gap: 5px; }
.model-pricing-card button { min-height: 40px; border: 0; border-radius: 6px; background: var(--accent); color: #111; font-weight: 800; }
.recharge-package-form { display: grid; gap: 16px; }
.recharge-package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.recharge-package-card { display: grid; gap: 10px; padding: 16px; border: 1px solid #36414b; border-radius: 7px; background: #0f1316; }
.recharge-package-card label { margin: 0; }
.recharge-package-card label > span { display: block; margin-bottom: 6px; color: #b9c2cc; font-size: 12px; }
.recharge-package-card input, .recharge-package-card textarea { width: 100%; border-color: #46515d; background: #15191d; color: #f7f9fc; }
.recharge-package-card textarea { min-height: 76px; resize: vertical; line-height: 1.5; }
.recharge-package-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #f7f9fc; }
.recharge-package-card-head code { color: #8f9aa6; font-size: 11px; }
.recharge-package-number-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.recharge-package-save { justify-self: start; min-height: 42px; border: 0; border-radius: 6px; padding: 0 18px; background: var(--accent); color: #111; font-weight: 800; cursor: pointer; }
.card-shop-form, .card-batch-form, .card-import-form { display: grid; gap: 10px; align-items: end; }
.card-shop-form { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.card-batch-form { grid-template-columns: minmax(210px, .8fr) 120px minmax(220px, 1fr) minmax(220px, 1fr) auto; }
.card-import-form { grid-template-columns: minmax(210px, .8fr) minmax(220px, 1fr) minmax(220px, 1fr) minmax(210px, .8fr); }
.card-code-field { grid-column: 1 / -1; }
.card-code-field textarea { min-height: 160px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.card-import-form > button { justify-self: start; }
.card-shop-form label, .card-batch-form label, .card-import-form label { min-width: 0; }
.card-shop-form button, .card-batch-form button, .card-import-form button, .inline-admin-form button, .card-admin-page td form button {
  min-height: 40px; border: 0; border-radius: 6px; padding: 0 13px; background: var(--accent); color: #111; font-weight: 800;
}
.card-section-head { padding: 16px 18px 10px; }
.inline-admin-form { display: flex; gap: 6px; margin-top: 6px; }
.inline-admin-form input { min-width: 140px; }
.card-admin-page td form { margin: 0; }
.card-admin-page td form + form { margin-top: 6px; }
.card-status-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; }
.card-status-filters a { border: 1px solid #46515d; border-radius: 6px; padding: 7px 11px; color: #c4cbd2; background: #20262c; }
.card-status-filters a.active { border-color: #859729; color: #111; background: var(--accent); font-weight: 800; }
.card-status-filters b { margin-left: 4px; font-size: 12px; }
.card-inventory-row.is-used td { color: #7d8791; background: #f2f4f6; }
.card-inventory-row.is-used .card-code-display { color: #7d8791; text-decoration: line-through; text-decoration-thickness: 2px; }
.card-inventory-row.is-used td small { color: #8b96a1; }
.used-mark { color: #067647; font-weight: 800; white-space: nowrap; }
.status-unused, .status-imported { color: #067647; background: #e8f7ef; }
.status-generated { color: #946200; background: #fff5d6; }
.status-redeemed { color: #175cd3; background: #eff8ff; }
.status-disabled, .status-closed { color: #b42318; background: #feeceb; }
@media (max-width: 1000px) {
  .finance-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settlement-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .ledger-summary { grid-template-columns: repeat(2,1fr); }
  .card-stats-grid { grid-template-columns: repeat(3,1fr); }
  .model-pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recharge-package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-shop-form, .card-batch-form, .card-import-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card-code-field { grid-column: 1 / -1; }
  .card-redeem-panel { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .admin-body .admin-shell { width: min(100% - 20px, 1480px); }
  .finance-grid, .settlement-strip, .ledger-summary, .user-detail-page .stats-grid { grid-template-columns: 1fr; }
  .admin-head-actions { flex-wrap: wrap; }
  .invite-bonus-strip { grid-template-columns: 1fr; }
  .invite-center-main { display: block; }
  .invite-summary { grid-template-columns: 1fr; margin-top: 14px; }
  .invite-share-row { grid-template-columns: 1fr; }
  .announcement-dialog { padding: 24px 20px 20px; }
  .announcement-dialog h2 { font-size: 21px; }
  .announcement-actions { flex-direction: column-reverse; }
  .announcement-dismiss, .announcement-link { width: 100%; }
  .announcement-settings-form { grid-template-columns: 1fr; }
  .announcement-content-field, .announcement-form-actions { grid-column: auto; }
  .announcement-form-actions { align-items: stretch; flex-direction: column; }
  .card-stats-grid, .card-shop-form, .card-batch-form, .card-import-form, .card-redeem-form { grid-template-columns: 1fr; }
  .model-pricing-grid { grid-template-columns: 1fr; }
  .recharge-package-grid { grid-template-columns: 1fr; }
  .card-code-field { grid-column: auto; }
}
