:root {
  --blue: #2563eb;
  --cyan: #0891b2;
  --violet: #635bff;
  --ink: #101828;
  --muted: #667085;
  --line: #d9e3f0;
  --soft: #f6f8fb;
  --panel: #ffffff;
  --danger: #e33131;
  --ok: #0f9b76;
  --shadow: 0 18px 48px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #eef6ff 0, #f8fbff 330px, #fff 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

svg.icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  pointer-events: none;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

label {
  display: grid;
  gap: 8px;
  color: #41516b;
  font-size: 13px;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 28px;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 21px;
  height: 15px;
  border: 4px solid var(--blue);
  border-radius: 999px;
  transform: rotate(-18deg);
  background: #fff;
}

.brand-mark::after {
  right: 0;
  border-color: var(--violet);
  transform: rotate(18deg);
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 24% 12%, rgba(112, 70, 216, .16), transparent 30%),
    radial-gradient(circle at 80% 86%, rgba(79, 141, 255, .18), transparent 28%),
    #f8fbff;
}

.auth-card {
  width: 460px;
  padding: 34px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 22px 0 8px;
  font-size: 28px;
}

.auth-card p,
.page-sub,
.muted {
  color: var(--muted);
}

.tabs,
.segmented {
  display: flex;
  gap: 8px;
}

.tabs button,
.segmented button {
  flex: 1;
  height: 42px;
  color: #58687f;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.tabs button.active,
.segmented button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), #9365e6);
  border-color: transparent;
}

.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-code-row {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 10px;
  align-items: end;
}

.auth-code-row button {
  height: 42px;
  padding: 0 12px;
  white-space: nowrap;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  height: 42px;
  padding: 0 20px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), #4d8cff);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .22);
  font-weight: 900;
}

.primary:disabled {
  cursor: not-allowed;
  opacity: .68;
  box-shadow: none;
}

.primary.block {
  width: 100%;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--violet), #9365e6);
}

.ghost,
.mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  color: #40516b;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.mini {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.app-shell,
.admin-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 210px 1fr;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 210px;
  padding: 22px 16px;
  background: #fff;
  border-right: 1px solid #e6eef8;
  z-index: 20;
}

.sidebar .brand {
  margin-bottom: 20px;
}

.sidebar .brand-mark {
  width: 30px;
  height: 24px;
}

.sidebar .brand-mark::before,
.sidebar .brand-mark::after {
  width: 17px;
  height: 12px;
  border-width: 3px;
}

.recharge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 42px;
  color: #fff;
  background:
    linear-gradient(135deg, #5b6df5 0%, #7b4de0 100%);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(112,70,216,.2);
  font-size: 15px;
  font-weight: 900;
}

.recharge .icon {
  width: 16px;
  height: 16px;
}

.price-box {
  display: grid;
  gap: 4px;
  margin: 12px 0 26px;
  padding: 10px 9px;
  color: #0a3e9a;
  background: linear-gradient(180deg, #f6f9ff, #eef5ff);
  border: 1px solid #cddcff;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 900;
}

.price-box span {
  display: block;
  overflow: visible;
  white-space: nowrap;
}

.support-box {
  gap: 6px;
}

.support-box span {
  white-space: normal;
}

.support-button {
  width: 100%;
  height: 32px;
  margin-top: 4px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0f8bc0);
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  color: #31445f;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  user-select: none;
  transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.nav-item:hover {
  color: #1f5fe5;
  background: #eef5ff;
  box-shadow: 0 8px 18px rgba(37,99,235,.08);
  transform: translateX(1px);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), #7448d8);
}

.nav-item.active:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), #7448d8);
  box-shadow: 0 12px 24px rgba(37,99,235,.16);
}

.main {
  grid-column: 2;
  min-height: 100vh;
  padding: 44px 56px 52px;
}

.topbar {
  position: fixed;
  top: 18px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 30;
  height: 44px;
  padding: 6px 10px;
  border: 1px solid #e1ebf7;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 30px rgba(31,89,180,.1);
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  background: linear-gradient(135deg, #0c91c9, var(--blue));
  border-radius: 50%;
}

.user-email {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--ink);
}

.hero {
  text-align: center;
  margin: 8px 0 22px;
}

.hero h1 {
  margin: 0;
  font-size: 34px;
}

.hero span {
  color: #428fff;
}

.workflow {
  display: grid;
  grid-template-columns: minmax(780px, 1fr) 420px;
  gap: 28px;
  max-width: 1500px;
  margin: 0 auto;
}

.progress-workflow {
  margin-top: -18px;
}

.panel,
.wizard-card,
.case-card {
  background: rgba(255,255,255,.95);
  border: 1px solid #dce9f8;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.wizard-card {
  min-height: 660px;
  padding: 28px 34px 24px;
}

.progress-card {
  min-height: 0;
  padding-bottom: 14px;
}

.progress-card .stepper {
  margin-bottom: 14px;
}

.stepper {
  display: grid;
  grid-template-columns: 40px 1fr 40px 1fr 40px 1fr 40px 1fr 40px;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.dot {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #738198;
  background: #dfeafd;
  border-radius: 50%;
  font-weight: 900;
}

.dot.active {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 22px rgba(37,99,235,.28);
}

.dot.done {
  color: var(--blue);
}

.line {
  height: 2px;
  background: #dfe8f5;
}

.line.on {
  background: var(--blue);
}

.section-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.section-head b {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
}

.section-head h2,
.page-title {
  margin: 0;
  font-size: 30px;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.warn {
  display: inline-flex;
  margin: 18px 0 20px 45px;
  padding: 8px 16px;
  color: #b84b12;
  background: #fff0e5;
  border-radius: 999px;
  font-weight: 900;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.type-card {
  position: relative;
  min-height: 260px;
  padding: 22px 20px 20px 64px;
  background: #f7fbff;
  border: 2px solid #d7e5f8;
  border-radius: 14px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.type-card:not(.selected) {
  background: #fff;
}

.type-card.selected {
  background: #f0f5ff;
  border-color: var(--blue);
  box-shadow: 0 14px 34px rgba(37,99,235,.08);
}

.card-check {
  position: absolute;
  top: 22px;
  left: 22px;
  display: grid;
  width: 22px;
  height: 22px;
  color: transparent;
  place-items: center;
  background: #fff;
  border: 1px solid #b8c8df;
  border-radius: 6px;
}

.type-card.selected .card-check {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.card-check svg {
  width: 14px;
  height: 14px;
}

.type-thumb {
  width: 58px;
  height: 58px;
  margin-bottom: 12px;
  background-color: #edf4ff;
  background-position: center;
  background-size: cover;
  border: 1px solid #d8e5f7;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(31,89,180,.10);
}

.type-thumb.thumb-main {
  background-image: url("/assets/cases/jeans-stack.jpg");
  background-position: center 70%;
}

.type-thumb.thumb-detail {
  background-image: url("/assets/cases/jeans-detail.jpg");
  background-position: center 64%;
}

.type-card h3 {
  margin: 0;
  font-size: 18px;
}

.type-card p {
  margin: 8px 0 16px;
  color: var(--muted);
}

.type-options {
  min-height: 118px;
  opacity: 1;
  transition: opacity .16s ease;
}

.type-options small {
  display: block;
  margin-bottom: 14px;
  color: #5a6f8c;
  font-weight: 900;
}

.type-options.hidden-options {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.mini-divider {
  height: 1px;
  margin: 0 0 14px;
  background: #dae5f3;
}

.radio-row,
.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.radio-row label,
.radio-row button {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #49607f;
  font-weight: 500;
}

.radio-row button {
  padding: 0;
  font: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.radio-row button.active {
  color: var(--blue);
  font-weight: 700;
}

.radio {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid #9fb0c7;
  border-radius: 50%;
}

.radio.on {
  background: #fff;
  border: 3px solid var(--blue);
}

.feature-tags {
  gap: 8px;
  margin-top: 14px;
}

.feature-tags span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  color: #245cc4;
  background: #eaf2ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.resolution-box {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  background: linear-gradient(180deg, #fbfdff, #f6faff);
  border: 1px solid #d8e7fb;
  border-radius: 12px;
}

.resolution-box b {
  margin: 0;
}

.resolution-box label,
.resolution-box button {
  display: flex;
  align-items: center;
  gap: 7px;
}

.resolution-box button {
  padding: 0;
  color: #49607f;
  font: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.resolution-box button.active {
  color: var(--blue);
  font-weight: 800;
}

.resolution-box small {
  color: var(--muted);
}

.custom-resolution {
  display: grid;
  grid-template-columns: minmax(190px, .55fr) minmax(420px, 1.45fr);
  gap: 16px;
  align-items: stretch;
}

.resolution-title {
  display: grid;
  align-content: center;
  gap: 8px;
  padding-right: 14px;
  border-right: 1px solid #dbe8f8;
}

.resolution-title > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.resolution-title small {
  color: var(--blue);
  font-weight: 900;
  line-height: 1.45;
}

.resolution-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.resolution-control-row {
  display: flex;
  min-width: 0;
  align-items: center;
}

.resolution-inputs {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) 16px minmax(86px, 1fr);
  gap: 8px;
  align-items: center;
}

.resolution-inputs label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #415a7a;
  font-size: 12px;
  font-weight: 850;
}

.resolution-inputs label span {
  flex: 0 0 auto;
}

.resolution-inputs input {
  height: 40px;
  min-width: 0;
  border-color: #cfe0f7;
  background: #fff;
  font-weight: 800;
}

.resolution-inputs i {
  color: #6b7d95;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.resolution-presets {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.resolution-presets button {
  min-height: 52px;
  min-width: 0;
  justify-content: center;
  padding: 8px 10px;
  color: #36526f;
  background: #fff;
  border: 1px solid #d1dff0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
  flex-direction: column;
  align-items: flex-start;
}

.resolution-presets button.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.resolution-presets button strong {
  font-size: 13px;
  line-height: 1.2;
}

.resolution-presets button small {
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  opacity: .78;
}

.field-box {
  margin-top: 18px;
  padding: 18px;
  background: #f8fbff;
  border: 1px dashed #b9d5ff;
  border-radius: 12px;
}

.copy-panel {
  background: #fff;
  border-style: solid;
}

.copy-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.copy-head h3 {
  margin: 0 0 6px;
}

.copy-head p {
  margin: 0;
}

.copy-status {
  flex: 0 0 auto;
  padding: 7px 12px;
  color: #9a4a10;
  background: #fff0e5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.copy-status.ready {
  color: #047857;
  background: #e8fbf3;
}

.copy-option-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.copy-source-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.copy-source-options button {
  display: grid;
  gap: 6px;
}

.copy-source-options button b,
.copy-source-options button span {
  display: block;
}

.copy-source-options button span {
  color: #52657f;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
}

.copy-source-options button.active span {
  color: #245cc4;
}

.copy-generate-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e1ebf7;
}

.copy-option {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  text-align: left;
  background: #f8fbff;
  border: 1px solid #d8e6f7;
  border-radius: 10px;
}

.copy-option.active {
  background: #eef5ff;
  border: 2px solid var(--blue);
}

.copy-option b {
  color: var(--blue);
}

.copy-option span {
  color: #52657f;
  line-height: 1.55;
}

.copy-empty {
  margin: 0;
  padding: 14px;
  background: #f8fbff;
  border: 1px dashed #c8dcf8;
  border-radius: 10px;
}

.custom-copy-intro {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.custom-copy-intro b,
.custom-copy-intro span {
  display: block;
}

.custom-copy-intro b {
  color: var(--blue);
}

.copy-textarea {
  margin-top: 14px;
}

.copy-textarea textarea {
  min-height: 180px;
  line-height: 1.62;
}

.copy-review-panel {
  margin-top: 16px;
  background: #fbfdff;
}

.copy-review-layout {
  display: grid;
  grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.copy-review-aside,
.copy-review-editor {
  min-width: 0;
}

.copy-review-aside {
  display: grid;
  align-content: start;
  gap: 12px;
}

.copy-review-aside .copy-option-list {
  margin-top: 0;
}

.copy-review-note {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 14px;
  background: #f8fbff;
  border: 1px dashed #c8dcf8;
  border-radius: 10px;
}

.copy-review-note b {
  color: var(--blue);
}

.copy-review-note span {
  color: #52657f;
  font-weight: 700;
  line-height: 1.55;
}

.copy-review-editor .copy-textarea {
  height: 100%;
  margin-top: 0;
  grid-template-rows: auto 1fr;
}

.copy-review-panel .copy-textarea textarea {
  min-height: 430px;
  height: 100%;
}

.copy-review-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.copy-review-summary div {
  padding: 14px 16px;
  background: #f8fbff;
  border: 1px solid #d9e6f5;
  border-radius: 10px;
}

.copy-review-summary b,
.copy-review-summary span {
  display: block;
}

.copy-review-summary b {
  color: var(--blue);
  font-size: 20px;
  line-height: 1.2;
}

.copy-review-summary span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.lang-grid button {
  height: 54px;
  background: #fff;
  border: 1px solid #d3e1f3;
  border-radius: 12px;
  font-weight: 900;
}

.lang-grid button.active {
  background: #f0f5ff;
  border: 2px solid var(--blue);
}

.big-input {
  margin-top: 26px;
}

.big-input input {
  height: 56px;
  border: 2px solid var(--blue);
  font-size: 16px;
}

.big-input textarea {
  min-height: 180px;
  border: 2px solid var(--blue);
  font-size: 16px;
}

.field-help {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.recommendation-grid {
  margin-top: 18px;
}

.recommendation-card {
  display: grid;
  gap: 12px;
}

.recommendation-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.recommendation-card b {
  color: #17233d;
}

.recommendation-card span {
  flex: 0 0 auto;
  padding: 4px 8px;
  color: #075985;
  background: #e8f6fb;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.recommendation-card p {
  margin: 0;
}

.upload-zone,
.result-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 280px;
  text-align: center;
  background: #f8fbff;
  border: 2px dashed #cfe0f7;
  border-radius: 14px;
}

.upload-zone input {
  width: auto;
  height: auto;
  margin-top: 12px;
  border: 0;
}

.preview-list {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.preview-list img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upload-status {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 12px 14px;
  color: #245cc4;
  background: #f1f7ff;
  border: 1px solid #cfe0f7;
  border-radius: 10px;
  font-weight: 800;
}

.upload-status span {
  color: #52657f;
  font-weight: 700;
}

.upload-status.ready-status {
  color: #047857;
  background: #f0fdf7;
  border-color: #bcebd8;
}

.upload-status.error-status {
  color: var(--danger);
  background: #fff5f5;
  border-color: #ffc9c9;
}

.source-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.source-options button {
  min-height: 66px;
  text-align: left;
  padding: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d3e1f3;
  border-radius: 10px;
  font-weight: 900;
}

.source-options button.active {
  background: #eef5ff;
  border: 2px solid var(--blue);
}

.actions {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #dfe8f5;
}

.case-card {
  padding: 22px;
  border-radius: 0;
}

.case-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.case-card-head h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.case-card-head span {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 7px 12px;
  color: var(--blue);
  text-align: center;
  background: #eaf2ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.case-media {
  overflow: hidden;
  padding: 10px;
  background: #fff;
  border: 1px solid #bdd6ff;
  border-radius: 14px;
}

.case-board-real {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  background: #f7fbff;
  border: 1px solid #d9e7f9;
  border-radius: 12px;
}

.case-title-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  padding: 0 2px;
}

.case-title-row b {
  color: #071a35;
  font-size: 13px;
}

.case-title-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.case-photo {
  position: relative;
  overflow: hidden;
  min-height: 122px;
  background: #fff;
  border: 1px solid #e0e9f5;
  border-radius: 10px;
}

.case-product,
.case-scene {
  min-height: 156px;
}

.case-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-product img {
  object-fit: cover;
  object-position: center 74%;
}

.case-scene img {
  object-position: center 36%;
}

.case-detail img {
  object-position: center 64%;
}

.case-flatlay img {
  object-position: center 42%;
}

.case-photo span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 8px;
  color: #fff;
  background: rgba(8, 20, 38, .74);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.case-tags {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.case-tags span {
  padding: 5px 8px;
  color: #245cc4;
  background: #eaf2ff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.copy-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
}

.copy-editor {
  min-height: 470px;
}

.notice {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.progress-view {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  overflow: hidden;
  padding: 8px 0 0;
}

.progress-view::before {
  position: absolute;
  inset: 56px 8% auto;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.36), transparent);
  animation: progress-scan 2.8s ease-in-out infinite;
}

.progress-pill {
  gap: 6px;
  animation: progress-rise .5s ease both;
}

.progress-pill span {
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 11px 0 0 rgba(37,99,235,.55), 22px 0 0 rgba(37,99,235,.28);
  animation: dot-drift 1.2s steps(3) infinite;
}

.progress-view h2 {
  margin: 10px 0 6px;
  animation: progress-rise .55s ease .05s both;
}

.progress-lead {
  max-width: min(620px, 100%);
  margin: 0;
  overflow: hidden;
  color: #536783;
  font-weight: 700;
  white-space: nowrap;
  animation: text-reveal 1.6s steps(24) .18s both;
}

.progress-board {
  display: grid;
  grid-template-columns: 188px minmax(360px, 1fr);
  align-items: center;
  gap: 20px;
  width: min(740px, 100%);
  margin: 12px 0 10px;
}

.ring-wrap {
  display: grid;
  place-items: center;
  min-height: 138px;
}

.ring {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(from -90deg, #2563eb var(--progress-angle), #dceaff 0);
  box-shadow: 0 18px 44px rgba(37,99,235,.16), inset 0 0 0 1px rgba(37,99,235,.08);
  animation: ring-breathe 1.9s ease-in-out infinite;
}

.ring::after {
  position: absolute;
  inset: 10px;
  content: "";
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 50%;
  animation: ring-sweep 2.4s linear infinite;
}

.ring b {
  position: relative;
  z-index: 1;
  font-size: 29px;
  line-height: 1;
}

.ring small {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  color: #223452;
  font-weight: 900;
}

.stage-feed {
  display: grid;
  gap: 6px;
  text-align: left;
}

.stage-line {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 38px;
  padding: 6px 10px;
  opacity: 0;
  background: rgba(248,251,255,.86);
  border: 1px solid #e0ebf8;
  border-radius: 12px;
  transform: translateY(8px);
  animation: progress-rise .46s ease var(--delay) both;
}

.stage-line i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  background: #cad8ed;
  border-radius: 50%;
  font-style: normal;
}

.stage-line i .icon {
  width: 14px;
  height: 14px;
}

.stage-line b,
.stage-line span {
  display: block;
}

.stage-line b {
  font-size: 12px;
}

.stage-line span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.stage-line.active {
  border-color: rgba(37,99,235,.36);
  background: linear-gradient(90deg, #f6faff, #eef5ff);
  box-shadow: 0 12px 26px rgba(37,99,235,.08);
}

.stage-line.active i {
  background: var(--blue);
  animation: active-pulse 1.3s ease-in-out infinite;
}

.stage-line.active i::after {
  width: 8px;
  height: 8px;
  content: "";
  background: #fff;
  border-radius: 50%;
}

.stage-line.done {
  background: #fff;
}

.stage-line.done i {
  background: var(--blue);
}

.render-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(78px, 1fr));
  gap: 9px;
  width: min(600px, 100%);
  margin: 2px 0 10px;
}

.render-tile {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  padding: 7px;
  opacity: 0;
  background: linear-gradient(145deg, #f8fbff, #edf4ff);
  border: 1px solid #dce9f8;
  border-radius: 12px;
  animation: progress-rise .5s ease var(--delay) both;
}

.render-tile::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(105deg, transparent 0 32%, rgba(255,255,255,.86) 45%, transparent 58% 100%);
  transform: translateX(-100%);
  animation: tile-shimmer 1.9s ease-in-out calc(var(--delay) + .35s) infinite;
}

.render-tile span,
.render-tile b,
.render-tile em {
  position: relative;
  z-index: 1;
  display: block;
  background: #dbe7f6;
  border-radius: 999px;
}

.render-tile span {
  width: 26px;
  height: 26px;
  margin: 0 auto 6px;
  border-radius: 10px;
  background: linear-gradient(145deg, #d8efe4, #9eb8e4);
}

.render-tile b {
  width: 74%;
  height: 6px;
  margin: 0 auto 5px;
}

.render-tile em {
  width: 48%;
  height: 5px;
  margin: 0 auto;
}

.progress-stats {
  animation: progress-rise .5s ease .42s both;
}

.progress-stats div {
  padding: 12px;
}

.progress-stats h3 {
  margin: 9px 0 0;
}

.progress-view > .muted {
  margin: 10px 0 8px;
}

.stat-row,
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.stat-row div,
.card,
.admin-card {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

@keyframes progress-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes text-reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes ring-breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 18px 44px rgba(37,99,235,.16), inset 0 0 0 1px rgba(37,99,235,.08);
  }
  50% {
    transform: scale(1.025);
    box-shadow: 0 20px 50px rgba(37,99,235,.23), inset 0 0 0 1px rgba(37,99,235,.12);
  }
}

@keyframes ring-sweep {
  from {
    transform: rotate(0deg);
    border-top-color: rgba(37,99,235,.5);
  }
  to {
    transform: rotate(360deg);
    border-top-color: rgba(37,99,235,.5);
  }
}

@keyframes active-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37,99,235,.22);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(37,99,235,0);
  }
}

@keyframes tile-shimmer {
  0% {
    transform: translateX(-100%);
  }
  58%, 100% {
    transform: translateX(100%);
  }
}

@keyframes dot-drift {
  0% {
    opacity: .32;
  }
  100% {
    opacity: 1;
  }
}

@keyframes progress-scan {
  0%, 100% {
    opacity: .2;
    transform: scaleX(.72);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.result-card {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.96));
  border: 1px solid #d9e7f7;
  border-radius: 16px;
  box-shadow: 0 16px 38px rgba(31,89,180,.09);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.result-card:hover {
  border-color: #9cc3ff;
  box-shadow: 0 22px 52px rgba(31,89,180,.15);
  transform: translateY(-2px);
}

.result-preview {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--result-aspect, 1 / 1);
  overflow: hidden;
  padding: 0;
  background: #f3f7ff;
}

.result-preview img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  background:
    linear-gradient(135deg, rgba(245,248,255,.96), rgba(233,241,253,.94)),
    repeating-linear-gradient(45deg, rgba(37,99,235,.05) 0 10px, transparent 10px 20px);
}

.result-gallery .placeholder-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: linear-gradient(145deg, #d7efc7, #1d4b41);
}

.result-preview::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(8,20,38,.42));
  transition: opacity .18s ease;
}

.result-card:hover .result-preview::after,
.result-card:hover .zoom-badge {
  opacity: 1;
}

.zoom-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  opacity: 0;
  background: rgba(10, 24, 44, .72);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  transition: opacity .18s ease, transform .18s ease;
}

.result-card:hover .zoom-badge {
  transform: translateY(-1px);
}

.result-preview:disabled {
  cursor: wait;
}

.result-card.is-regenerating .result-preview img {
  filter: saturate(.75) brightness(.72);
}

.regenerate-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  align-content: center;
  color: #fff;
  background: rgba(10, 24, 48, .58);
  text-align: center;
  pointer-events: none;
}

.regenerate-overlay b {
  font-size: 16px;
}

.regenerate-overlay small {
  padding: 6px 10px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  font-weight: 900;
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 14px;
}

.result-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.result-actions .mini {
  white-space: nowrap;
}

.result-meta small,
.result-size,
.result-meta b {
  display: block;
}

.result-meta small {
  color: #5e718d;
  font-size: 12px;
  font-weight: 900;
}

.result-size {
  margin-top: 3px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.result-meta b {
  margin-top: 2px;
  color: #0b1d38;
  font-size: 20px;
  letter-spacing: 0;
}

.result-meta .mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: auto;
  padding: 0 10px;
}

.result-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #42526b;
  text-align: center;
}

.result-empty b {
  font-size: 15px;
}

.result-empty span {
  max-width: 320px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.running-empty {
  background:
    linear-gradient(135deg, rgba(255,255,255,.86), rgba(238,245,255,.9)),
    repeating-linear-gradient(-45deg, rgba(37,99,235,.055) 0 8px, transparent 8px 16px);
}

.simple-page {
  max-width: 1700px;
  margin: 0 auto;
}

.studio-page {
  max-width: 1700px;
  margin: 0 auto;
}

.page-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 0 0 26px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.page-actions,
.result-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pack-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.banner-line,
.stats-row,
.simple-page .panel {
  margin-bottom: 14px;
}

.banner-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  color: var(--violet);
  background: #fff;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  font-weight: 900;
}

.banner-line button {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 16px;
  color: #fff;
  background: var(--blue);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(37,99,235,.18);
  font-weight: 900;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e0e6ef;
  border-radius: 10px;
}

.stats-row div {
  padding: 12px;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
}

.stats-row small {
  display: block;
  color: var(--muted);
}

.stats-row b {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.simple-page .panel {
  padding: 18px;
  border-radius: 10px;
  box-shadow: none;
}

.simple-page .panel h3 {
  margin: 0 0 14px;
}

.copy-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}

.copy-row.full input {
  flex: 1;
}

.copy-row button,
.wallet-cta button {
  min-width: 84px;
  height: 42px;
  padding: 0 14px;
  color: #fff;
  background: var(--violet);
  border-radius: 8px;
  font-weight: 900;
}

.wallet-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wallet-cta button {
  width: 100px;
  background: #078b7b;
  border-radius: 999px;
}

.wallet-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1.1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.wallet-balance-card,
.wallet-pay-card,
.wallet-rules-card,
.wallet-ledger-panel {
  background: rgba(255,255,255,.96);
  border: 1px solid #dce9f8;
  border-radius: 16px;
  box-shadow: 0 18px 46px rgba(31,89,180,.08);
}

.wallet-balance-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, #2465f0 0%, #7046d8 58%, #0aa6c2 100%);
}

.wallet-balance-card::after {
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 220px;
  height: 220px;
  content: "";
  border: 32px solid rgba(255,255,255,.16);
  border-radius: 50%;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.wallet-balance-card strong {
  display: block;
  font-size: 56px;
  line-height: 1;
}

.wallet-balance-card p {
  max-width: 420px;
  color: rgba(255,255,255,.86);
}

.wallet-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.wallet-actions button {
  height: 38px;
  padding: 0 16px;
  color: #173464;
  background: #fff;
  border-radius: 999px;
  font-weight: 900;
}

.wallet-actions button + button {
  color: #fff;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.36);
}

.wallet-pay-card,
.wallet-rules-card {
  padding: 24px;
}

.wallet-rules-card {
  grid-column: 1 / -1;
}

.wallet-pay-card h3,
.wallet-rules-card h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

.wallet-pay-card .history-title {
  padding-bottom: 12px;
  border-bottom: 1px solid #e6edf6;
}

.wallet-pay-card .history-title h3 {
  margin: 0;
}

.wallet-pay-card .history-title span {
  color: var(--muted);
  font-size: 13px;
}

.wallet-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.wallet-package-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  color: var(--ink);
  text-align: left;
  background: #f8fbff;
  border: 1px solid #dce8f7;
  border-radius: 8px;
}

.wallet-package-card:hover {
  border-color: var(--blue);
  box-shadow: 0 12px 26px rgba(37,99,235,.12);
}

.wallet-package-card span,
.wallet-package-card em {
  color: var(--muted);
  font-style: normal;
}

.wallet-package-card b {
  color: var(--blue);
  font-size: 24px;
}

.wallet-package-card small {
  color: #101828;
  font-size: 28px;
  font-weight: 900;
}

.wallet-rule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.wallet-rule-grid div {
  padding: 16px;
  background: #f6f9ff;
  border: 1px solid #e0e9f6;
  border-radius: 12px;
}

.wallet-rule-grid b {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 28px;
}

.wallet-rule-grid span,
.wallet-rules-card p {
  color: var(--muted);
}

.wallet-ledger-panel {
  padding: 20px;
}

.wallet-ledger-panel .history-title {
  padding-bottom: 14px;
  border-bottom: 1px solid #e6edf6;
}

.wallet-ledger-panel .history-title h3 {
  margin: 0;
  font-size: 22px;
}

.wallet-ledger-panel .history-title span {
  color: var(--muted);
  font-size: 13px;
}

.ledger-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.order-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px 90px auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid #e5edf7;
  border-radius: 8px;
}

.order-copy b,
.order-copy span,
.order-copy small,
.order-money b,
.order-money span {
  display: block;
}

.order-copy span,
.order-copy small,
.order-money span {
  color: var(--muted);
  font-size: 13px;
}

.order-money {
  text-align: right;
}

.order-money b {
  font-size: 20px;
}

.ledger-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid #e4ecf6;
  border-radius: 12px;
}

.ledger-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
}

.ledger-icon.income {
  color: #047857;
  background: #e8fbf3;
}

.ledger-icon.expense {
  color: #d52d2d;
  background: #fff0f0;
}

.ledger-copy b,
.ledger-copy span,
.ledger-copy small {
  display: block;
}

.ledger-copy b {
  margin-bottom: 4px;
}

.ledger-copy span,
.ledger-copy small {
  color: var(--muted);
  font-size: 13px;
}

.ledger-copy small {
  margin-top: 3px;
}

.ledger-item em {
  min-width: 86px;
  text-align: right;
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
}

.empty-ledger {
  padding: 34px;
  color: var(--muted);
  text-align: center;
  background: #f8fbff;
  border: 1px dashed #cfe0f7;
  border-radius: 12px;
}

.studio-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.studio-settings,
.studio-result {
  padding: 20px;
  background: rgba(255,255,255,.95);
  border: 1px solid #dce9f8;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.history-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-title h2 {
  margin: 0;
}

.history-title span {
  color: var(--ink);
}

.studio-settings .segmented {
  display: inline-flex;
  gap: 4px;
  margin: 10px 0;
  padding: 5px;
  background: #eaf2ff;
  border-radius: 999px;
}

.studio-settings .segmented button {
  flex: none;
  height: 38px;
  padding: 0 20px;
  color: #36526f;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.studio-settings .segmented button.active {
  color: #fff;
  background: var(--blue);
}

.mode-note {
  display: grid;
  min-height: 100px;
  align-content: center;
  margin: 8px 0 0;
  padding: 18px;
  background: #f8fbff;
  border: 1px dashed #b9d5ff;
  border-radius: 13px;
}

.upload-zone.compact {
  position: relative;
  min-height: 160px;
  overflow: hidden;
}

.upload-zone.compact input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.studio-reference-editor {
  display: grid;
  grid-template-columns: minmax(220px, .95fr) minmax(190px, .8fr);
  gap: 14px;
  margin-top: 8px;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #d7e7fb;
  border-radius: 14px;
}

.studio-ref-canvas {
  position: relative;
  overflow: hidden;
  background: #edf4ff;
  border: 1px solid #cfe0f7;
  border-radius: 12px;
  cursor: crosshair;
  user-select: none;
}

.studio-ref-canvas img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  pointer-events: none;
}

.studio-mask-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.studio-ref-canvas.brush-cursor-active .studio-mask-canvas {
  cursor: none;
}

.studio-brush-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 28px;
  height: 28px;
  border: 2px solid #2563eb;
  border-radius: 50%;
  background: rgba(37,99,235,.12);
  box-shadow: 0 0 0 1px rgba(255,255,255,.8), 0 8px 18px rgba(37,99,235,.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-999px, -999px);
}

.studio-brush-cursor.is-visible {
  opacity: 1;
}

.studio-select-box {
  position: absolute;
  z-index: 2;
  border: 2px solid #2563eb;
  border-radius: 10px;
  background: rgba(37,99,235,.12);
  box-shadow: 0 0 0 999px rgba(8,20,38,.28);
  pointer-events: none;
}

.studio-ref-tools {
  display: grid;
  align-content: start;
  gap: 10px;
  color: #40516b;
  font-size: 13px;
}

.studio-ref-tools b {
  color: var(--ink);
}

.studio-ref-tools p {
  margin: 0;
  line-height: 1.55;
}

.studio-brush-panel {
  display: grid;
  grid-template-columns: auto minmax(110px, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #eef6ff;
  border: 1px solid #d5e6fb;
  border-radius: 999px;
}

.studio-brush-panel span,
.studio-brush-panel b {
  color: #244668;
  font-size: 12px;
  white-space: nowrap;
}

.studio-brush-panel input {
  width: 100%;
  accent-color: var(--blue);
}

.studio-ref-tools > div:not(.studio-brush-panel),
.studio-tool-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.studio-tool-actions {
  align-items: center;
}

.studio-ref-tools .tool-button {
  display: inline-flex;
  width: auto;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.file-mini {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  color: #2457d6;
  background: #f7fbff;
  border-color: #c9dcfb;
}

.file-mini input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}

.studio-settings .primary {
  margin-top: 16px;
}

.studio-result {
  min-height: 520px;
}

.result-placeholder {
  display: grid;
  min-height: 430px;
  margin-top: 18px;
  place-items: center;
  color: var(--muted);
  text-align: center;
  background: #f8fbff;
  border: 2px dashed #cfe0f7;
  border-radius: 14px;
}

.studio-progress {
  display: grid;
  min-height: 430px;
  margin-top: 18px;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #506482;
  text-align: center;
  background: linear-gradient(180deg, #f8fbff, #f3f8ff);
  border: 1px solid #d7e7fb;
  border-radius: 14px;
}

.studio-progress h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 18px;
}

.studio-progress p {
  max-width: 360px;
  margin: 0;
  line-height: 1.6;
}

.small-ring {
  width: 96px;
  height: 96px;
  box-shadow: 0 14px 34px rgba(37,99,235,.14), inset 0 0 0 1px rgba(37,99,235,.08);
}

.small-ring b {
  font-size: 22px;
}

.small-ring small {
  font-size: 12px;
}

.error-placeholder {
  color: #b42318;
  background: linear-gradient(135deg, #fff7f7, #fff);
  border-color: #ffd0d0;
}

.error-placeholder b {
  font-size: 18px;
}

.error-placeholder p {
  max-width: 420px;
  margin: 8px 0 0;
  color: #8a2c2c;
  line-height: 1.6;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(4, 250px);
  gap: 18px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
  color: var(--muted);
}

.pager-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager .mini {
  min-width: 36px;
  justify-content: center;
}

.pager .mini.active {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
}

.pager .mini:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.task-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #cad9ee;
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(31,89,180,.08);
}

.task-card .body {
  padding: 14px;
}

.history-actions,
.modal-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.history-actions {
  margin-top: 12px;
}

.task-card .cover {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.image-cover {
  overflow: hidden;
  background: #f6f9ff;
}

.image-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-cover {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px;
  color: #536783;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,.8), rgba(238,245,255,.82)),
    radial-gradient(circle at 28% 22%, rgba(37,99,235,.13), transparent 34%),
    #f6f9ff;
}

.placeholder-cover span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #2563eb;
  background: #eaf2ff;
  border: 1px solid #cfe0f7;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 900;
}

.placeholder-cover b {
  color: var(--ink);
  font-size: 16px;
}

.placeholder-cover small {
  max-width: 160px;
  color: var(--muted);
  line-height: 1.45;
}

.placeholder-cover.failed {
  background:
    linear-gradient(135deg, rgba(255,255,255,.84), rgba(255,241,241,.9)),
    repeating-linear-gradient(-45deg, rgba(227,49,49,.08) 0 8px, transparent 8px 16px);
}

.placeholder-cover.failed span {
  color: #d92d2d;
  background: #fff0f0;
  border-color: #ffd0d0;
}

.placeholder-cover.cancelled span {
  color: #7b4de0;
  background: #f2ecff;
  border-color: #ded2ff;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid #edf2f8;
  text-align: left;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(7, 14, 27, .68);
  backdrop-filter: blur(8px);
  z-index: 80;
}

.modal-frame {
  position: relative;
  width: min(1180px, calc(100vw - 68px));
  max-height: min(86vh, 920px);
}

.modal-box {
  position: relative;
  width: min(1180px, calc(100vw - 68px));
  max-height: min(86vh, 920px);
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.98));
  border: 1px solid rgba(213,229,248,.95);
  border-radius: 20px;
  box-shadow: 0 34px 90px rgba(3, 14, 31, .32);
  padding: 24px;
}

.modal-frame .modal-box {
  width: 100%;
  max-height: inherit;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e1eaf6;
}

.modal-head h2 {
  margin: 10px 0 6px;
  font-size: 24px;
  line-height: 1.25;
}

.regenerate-box {
  width: min(760px, calc(100vw - 48px));
}

.regenerate-editor {
  display: grid;
  gap: 10px;
  color: #334766;
  font-size: 14px;
  font-weight: 900;
}

.regenerate-editor textarea {
  width: 100%;
  min-height: 360px;
  resize: vertical;
  padding: 14px;
  color: #17243a;
  background: #f8fbff;
  border: 1px solid #cbd9ec;
  border-radius: 10px;
  line-height: 1.65;
}

.regenerate-actions {
  margin-top: 18px;
}

.modal-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.icon-only {
  display: inline-grid;
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  line-height: 0;
  border-radius: 999px;
}

.modal-close {
  position: static;
  z-index: 5;
  flex: 0 0 36px;
  min-width: 36px;
  width: 36px;
  height: 36px;
  color: #667792;
  background: #edf4ff;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
}

.icon-only svg.icon {
  width: 18px;
  height: 18px;
}

.modal-close:hover {
  color: #15335f;
  background: #e3efff;
  transform: none;
}

.pay-modal {
  width: min(720px, calc(100vw - 32px));
  padding: 24px;
}

.pay-modal .modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.pay-modal .modal-head h2 {
  margin: 0 0 6px;
}

.pay-modal .modal-head p {
  margin: 0;
  color: var(--muted);
}

.pay-modal-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 22px;
  align-items: center;
}

.pay-qr-box {
  display: grid;
  place-items: center;
  min-height: 300px;
  background: #f8fbff;
  border: 1px solid #dce8f7;
  border-radius: 8px;
}

.pay-qr-box img {
  width: 260px;
  height: 260px;
  object-fit: contain;
  background: #fff;
}

.pay-window-guide {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 24px;
  text-align: center;
  background: #f8fbff;
  border: 1px solid #dce8f7;
  border-radius: 8px;
}

.pay-window-guide b {
  font-size: 24px;
}

.pay-window-guide p {
  max-width: 240px;
  color: var(--muted);
}

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

.pay-order-copy span,
.pay-order-copy p {
  color: var(--muted);
}

.pay-order-copy strong {
  font-size: 42px;
  line-height: 1;
}

.pay-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  color: #075985;
  background: #e0f2fe;
  border-radius: 8px;
  font-weight: 800;
}

.support-modal {
  width: min(620px, calc(100vw - 32px));
}

.support-modal-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  align-items: center;
}

.support-qr-box {
  display: grid;
  place-items: center;
  min-height: 260px;
  background: #f8fbff;
  border: 1px solid #dce8f7;
  border-radius: 8px;
}

.support-qr-box img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
}

.support-qr-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.support-copy {
  display: grid;
  gap: 8px;
}

.support-copy b {
  color: var(--blue);
  font-size: 24px;
}

.support-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.task-modal .modal-head {
  align-items: flex-start;
}

.task-modal-layout {
  display: grid;
  grid-template-columns: minmax(420px, .95fr) minmax(420px, 1.05fr);
  gap: 18px;
}

.modal-copy-panel,
.modal-result-panel {
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid #dbe8f7;
  border-radius: 16px;
}

.modal-copy-panel .history-title,
.modal-result-panel .history-title {
  padding-bottom: 12px;
  border-bottom: 1px solid #e7eef8;
}

.modal-copy-panel .history-title h3,
.modal-result-panel .history-title h3 {
  margin: 0;
}

.modal-copy-panel .history-title span,
.modal-result-panel .history-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.modal-result-panel .result-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.modal-result-panel .result-gallery:not(.single-result-gallery) {
  height: min(62vh, 620px);
  max-height: min(62vh, 620px);
  overflow: auto;
  align-content: start;
  grid-auto-rows: max-content;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.modal-result-panel .single-result-gallery {
  grid-template-columns: minmax(260px, 420px);
  justify-content: center;
}

.modal-result-panel .single-result-gallery .result-preview img {
  max-height: clamp(360px, 56vh, 560px);
}

.modal-result-panel .result-empty {
  min-height: 250px;
  margin-top: 14px;
  border: 1px solid #dce8f7;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff, #f5f9ff);
}

.modal-result-panel .running-empty {
  border-style: solid;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(239,246,255,.96)),
    repeating-linear-gradient(-45deg, rgba(37,99,235,.045) 0 9px, transparent 9px 18px);
}

.modal-result-panel .running-empty::before {
  content: "";
  width: 34px;
  height: 34px;
  border: 3px solid #d8e8ff;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin .9s linear infinite;
}

.copy-display {
  display: grid;
  gap: 12px;
  max-height: 62vh;
  overflow: auto;
  margin-top: 14px;
  padding-right: 4px;
}

.copy-display section {
  padding: 14px 16px;
  background:
    linear-gradient(180deg, #fbfdff, #f4f8ff);
  border: 1px solid #e0eaf7;
  border-radius: 14px;
}

.copy-display h4 {
  margin: 0 0 10px;
  color: #16345e;
  font-size: 15px;
}

.copy-display p {
  display: grid;
  grid-template-columns: minmax(86px, 132px) 1fr;
  gap: 10px;
  margin: 8px 0 0;
  color: #4c607c;
  line-height: 1.72;
  font-size: 13px;
}

.copy-display p:first-of-type {
  margin-top: 0;
}

.copy-display strong {
  color: #1d4f9a;
  font-weight: 900;
  word-break: keep-all;
}

.copy-display span {
  min-width: 0;
  word-break: break-word;
}

.copy-display p > span:only-child {
  grid-column: 1 / -1;
}

.empty-copy {
  display: block;
  color: var(--muted);
}

.image-lightbox {
  z-index: 120;
}

.lightbox-box {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(1120px, calc(100vw - 72px));
  max-height: calc(100vh - 72px);
  padding: 18px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(221,232,246,.92);
  border-radius: 20px;
  box-shadow: 0 34px 90px rgba(3,14,31,.38);
}

.lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lightbox-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox-head .lightbox-title {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.lightbox-size {
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}

.lightbox-head .mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lightbox-box img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 174px);
  margin: 0 auto;
  object-fit: contain;
  border-radius: 14px;
  background: #f3f7ff;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #173464;
  background: rgba(255,255,255,.92);
  border: 1px solid #d7e4f4;
  border-radius: 50%;
  box-shadow: 0 16px 38px rgba(3,14,31,.18);
}

.lightbox-nav.prev {
  left: 18px;
}

.lightbox-nav.next {
  right: 18px;
}

.lightbox-count {
  justify-self: center;
  color: #5e718d;
  font-size: 12px;
  font-weight: 800;
}

/* Frontend refinement layer: smaller type, quieter cards, more product-tool polish. */
button {
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

button:hover {
  transform: translateY(-1px);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(37, 99, 235, .72);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.app-shell,
.admin-shell {
  grid-template-columns: 202px 1fr;
}

.sidebar {
  width: 202px;
  padding: 20px 14px;
}

.main {
  padding: 38px 48px 46px;
}

.topbar {
  top: 16px;
  right: 20px;
  height: 40px;
  gap: 8px;
  padding: 5px 8px;
  font-size: 13px;
  box-shadow: 0 10px 26px rgba(16, 24, 40, .08);
}

.avatar {
  width: 30px;
  height: 30px;
}

.brand strong {
  font-size: 17px;
}

.recharge {
  height: 40px;
  background: linear-gradient(135deg, #3669f4, #7058e8);
  box-shadow: 0 12px 24px rgba(37,99,235,.18);
  font-size: 14px;
}

.price-box {
  gap: 3px;
  padding: 9px 8px;
  font-size: 11.5px;
  line-height: 1.3;
  background: #f6f9ff;
  border-color: #d4e2f6;
  border-radius: 8px;
}

.nav-item {
  height: 39px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.nav-item.active {
  background: linear-gradient(135deg, #2f67f2, #654ee8);
  box-shadow: 0 10px 22px rgba(37,99,235,.16);
}

.hero {
  max-width: 1500px;
  margin: 0 auto 18px;
  padding: 0 4px;
  text-align: left;
}

.hero h1 {
  font-size: 28px;
  line-height: 1.18;
  font-weight: 850;
}

.hero .page-sub,
.page-sub {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
}

.workflow {
  grid-template-columns: minmax(760px, 1fr) 390px;
  gap: 22px;
}

.panel,
.wizard-card,
.case-card,
.studio-settings,
.studio-result,
.wallet-balance-card,
.wallet-pay-card,
.wallet-rules-card,
.wallet-ledger-panel {
  border-color: #dde7f3;
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(16, 24, 40, .075);
}

.wizard-card {
  min-height: 620px;
  padding: 26px 30px 22px;
}

.stepper {
  gap: 10px;
  margin-bottom: 24px;
}

.dot {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.section-head {
  gap: 12px;
}

.section-head b {
  width: 29px;
  height: 29px;
  font-size: 13px;
}

.section-head h2,
.page-title {
  font-size: 26px;
  line-height: 1.22;
  font-weight: 850;
}

.section-head p,
.muted {
  font-size: 13.5px;
  line-height: 1.58;
}

.warn {
  margin: 16px 0 18px 41px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 800;
}

.type-grid {
  gap: 16px;
}

.type-card {
  min-height: 238px;
  padding: 20px 18px 18px 58px;
  border-width: 1px;
  border-radius: 10px;
}

.type-card.selected {
  border-width: 1px;
  box-shadow: 0 16px 34px rgba(37,99,235,.08), inset 0 0 0 1px rgba(37,99,235,.72);
}

.card-check {
  top: 20px;
  left: 20px;
}

.type-thumb {
  width: 50px;
  height: 50px;
  border-radius: 8px;
}

.type-card h3 {
  font-size: 17px;
}

.type-card p {
  margin: 7px 0 14px;
  font-size: 13.5px;
}

.type-options {
  min-height: 112px;
}

.radio-row,
.feature-tags {
  gap: 14px;
}

.feature-tags span,
.status-pill {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11.5px;
}

.resolution-box,
.field-box {
  border-radius: 10px;
  background: #f7faff;
}

.big-input input {
  height: 52px;
  font-size: 15px;
}

.big-input textarea {
  min-height: 164px;
  font-size: 15px;
}

.upload-zone,
.result-empty {
  min-height: 252px;
  border-radius: 10px;
}

.copy-panel,
.copy-option,
.source-options button,
.lang-grid button,
.stats-row,
.stats-row div,
.simple-page .panel,
.task-card,
.ledger-item,
.result-card,
.copy-display section {
  border-radius: 8px;
}

.source-options button {
  min-height: 58px;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 800;
}

.primary {
  height: 40px;
  min-width: 112px;
  padding: 0 18px;
  font-size: 14px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .18);
}

.ghost {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.mini {
  height: 28px;
  font-size: 12px;
}

.actions {
  margin-top: 26px;
  padding-top: 18px;
}

.case-card {
  padding: 20px;
}

.case-card-head h3 {
  font-size: 19px;
  line-height: 1.25;
}

.case-card-head p {
  margin: 0;
}

.case-media {
  padding: 8px;
  border-radius: 10px;
}

.case-board-real {
  border-radius: 8px;
}

.page-top,
.page-head {
  margin-bottom: 20px;
}

.banner-line {
  padding: 16px 18px;
  font-size: 13.5px;
}

.stats-row {
  gap: 10px;
  padding: 10px;
}

.stats-row b {
  font-size: 22px;
}

.wallet-balance-card {
  min-height: 190px;
  padding: 24px;
}

.wallet-balance-card strong {
  font-size: 48px;
}

.wallet-pay-card,
.wallet-rules-card,
.wallet-ledger-panel,
.studio-settings,
.studio-result {
  padding: 20px;
}

.wallet-pay-card h3,
.wallet-rules-card h3,
.wallet-ledger-panel .history-title h3,
.history-title h2 {
  font-size: 20px;
}

.studio-grid {
  gap: 16px;
}

.history-grid {
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 16px;
}

.task-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.38;
}

.task-card .body {
  padding: 13px;
}

.recharge,
.primary,
.ghost,
.mini,
.warn,
.feature-tags span,
.status-pill,
.source-options button,
.lang-grid button,
.tabs button,
.segmented button,
.copy-status,
.case-card-head span,
.copy-row button,
.wallet-cta button,
.wallet-actions button,
.banner-line,
.banner-line button,
.admin-tabs button,
.radio-row button.active,
.resolution-box button.active {
  font-weight: 800;
}

.type-card h3,
.simple-page .panel h3,
.wallet-pay-card h3,
.wallet-rules-card h3,
.wallet-ledger-panel .history-title h3,
.history-title h2,
.history-title h3,
.task-card h3,
.modal-head h2 {
  font-weight: 850;
}

.wallet-rule-grid b,
.ledger-item em,
.stats-row b {
  font-weight: 850;
}

.table th {
  font-weight: 800;
}

.table th,
.table td {
  font-size: 13px;
}

.api-key-cell {
  max-width: 360px;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.45;
  word-break: break-all;
}

.modal-box {
  border-radius: 14px;
}

.lightbox-box {
  border-radius: 14px;
}

.admin-main {
  grid-column: 2;
  padding: 28px 34px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.admin-tabs button {
  height: 38px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.admin-tabs button.active {
  color: #fff;
  background: var(--blue);
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.admin-form textarea {
  grid-column: 1 / -1;
}

.admin-form .full {
  grid-column: 1 / -1;
}

.admin-action-bar,
.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-action-bar {
  margin: -4px 0 14px;
}

.billing-package-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 12px;
}

.billing-package-head h4 {
  margin: 0;
  font-size: 16px;
}

.billing-package-list {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.billing-package-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 130px 130px minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #dce8f7;
  border-radius: 8px;
}

.billing-package-row .full {
  grid-column: auto;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric-card {
  min-height: 104px;
  padding: 18px;
}

.metric-card small {
  color: #5c6b82;
  font-size: 13px;
}

.metric-card h2 {
  margin: 14px 0 0;
  font-size: 28px;
}

.admin-section {
  padding: 0;
  overflow: hidden;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
}

.admin-section-head h2 {
  margin: 0;
}

.admin-section-head p {
  margin: 4px 0 0;
}

.table-scroll {
  overflow: auto;
  border: 1px solid #edf2f8;
  border-radius: 10px;
  background: #fff;
}

.table-scroll .table {
  min-width: 920px;
  border: 0;
  border-radius: 0;
}

.admin-table {
  table-layout: fixed;
}

.admin-table th {
  color: #41516b;
  background: #f8fbff;
  font-size: 12px;
  white-space: nowrap;
}

.admin-table td {
  vertical-align: middle;
}

.admin-table .num {
  width: 78px;
  white-space: nowrap;
}

.admin-table .wide {
  width: 32%;
}

.admin-url-cell,
.api-key-cell,
.log-summary {
  word-break: break-word;
}

.redeem-code-cell {
  font-family: Consolas, "Courier New", monospace;
  white-space: nowrap;
}

.table-scroll .log-table {
  min-width: 1180px;
}

.table-scroll .compact-log-table {
  min-width: 980px;
}

.admin-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.log-summary {
  display: block;
  max-height: 3.4em;
  overflow: hidden;
  color: #25344d;
  line-height: 1.7;
}

.admin-log-modal pre {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  color: #29435f;
  background: #edf4fb;
  border: 1px solid #d8e7f5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.status-unused {
  color: #086b51;
  background: #e9f8f2;
  border-color: #bfe8d8;
}

.status-used {
  color: #4b5565;
  background: #f2f4f7;
  border-color: #d7dde8;
}

.status-success {
  color: #086b51;
  background: #e9f8f2;
  border-color: #bfe8d8;
}

.status-pending,
.status-running {
  color: #175cd3;
  background: #eff6ff;
  border-color: #bfd7ff;
}

.status-failed {
  color: #b42318;
  background: #fff1f0;
  border-color: #ffc9c4;
}

.status-expired,
.status-disabled,
.status-cancelled {
  color: #a33b11;
  background: #fff2ea;
  border-color: #ffd1bc;
}

.danger {
  color: #fff;
  background: var(--danger);
}

.ok {
  color: var(--ok);
  font-weight: 900;
}

.error {
  color: var(--danger);
  font-weight: 900;
}

@media (max-width: 1300px) {
  .workflow {
    grid-template-columns: 1fr;
  }
  .case-card {
    display: none;
  }
}

@media (max-width: 900px) {
  .custom-resolution {
    grid-template-columns: 1fr;
  }
  .resolution-title {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid #dbe8f8;
  }
  .resolution-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .progress-board {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .render-preview {
    grid-template-columns: repeat(2, 1fr);
  }
  .cards-grid,
  .copy-source-options,
  .copy-review-layout,
  .copy-review-summary {
    grid-template-columns: 1fr;
  }
  .copy-review-panel .copy-textarea textarea {
    min-height: 320px;
  }
  .progress-lead {
    white-space: normal;
    animation: progress-rise .45s ease .18s both;
  }
  .modal {
    padding: 14px;
  }
  .modal-frame {
    width: calc(100vw - 28px);
  }
  .modal-box,
  .lightbox-box {
    width: calc(100vw - 28px);
  }
  .modal-frame .modal-box {
    width: 100%;
  }
  .modal-close {
    width: 36px;
    height: 36px;
  }
  .task-modal .modal-head {
    align-items: flex-start;
  }
  .task-modal-layout {
    grid-template-columns: 1fr;
  }
  .pay-modal-body {
    grid-template-columns: 1fr;
  }
  .support-modal-body {
    grid-template-columns: 1fr;
  }
  .pay-qr-box {
    min-height: 260px;
  }
  .order-item {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .order-money {
    text-align: left;
  }
  .billing-package-row {
    grid-template-columns: 1fr;
  }
  .billing-package-row .full {
    grid-column: 1;
  }
  .studio-reference-editor {
    grid-template-columns: 1fr;
  }
  .modal-result-panel .result-gallery,
  .result-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .copy-display {
    max-height: 46vh;
  }
  .modal-result-panel .result-gallery:not(.single-result-gallery) {
    height: 46vh;
    max-height: 46vh;
  }
  .copy-display p {
    grid-template-columns: 1fr;
  }
}
