:root {
  --ink: #182026;
  --muted: #67727a;
  --line: #d9dee2;
  --paper: #ffffff;
  --canvas: #f4f6f7;
  --brand: #d62b7c;
  --brand-dark: #a91d5e;
  --green: #2f9d68;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #eef2f4;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

.rp-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 18px 72px;
}

.rp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.rp-logo img { height: 58px; width: auto; display: block; }
.rp-order-id { color: var(--muted); font-size: 14px; }
.rp-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #dde5e9; padding: 3px 6px; border-radius: 5px; }

.rp-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.rp-flow-step {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 700;
}

.rp-flow-step strong {
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dce6eb;
  color: var(--ink);
  margin-right: 8px;
}

.rp-flow-step.is-active { border-color: var(--brand); color: var(--ink); background: #fff; }
.rp-flow-step.is-active strong { background: var(--brand); color: #fff; }

.rp-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
  margin-bottom: 18px;
  box-shadow: 0 18px 42px rgba(25, 32, 38, .08);
}

.rp-panel.tight { padding: 18px; }
h1 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 46px); line-height: 1.05; letter-spacing: 0; }
h2 { margin: 0 0 12px; font-size: 20px; }
p { margin: 0 0 14px; }
.rp-muted { color: var(--muted); }

.rp-hero {
  min-height: 500px;
  display: grid;
  align-content: center;
  color: #fff;
  background-image: linear-gradient(90deg, rgba(18,22,26,.72), rgba(18,22,26,.18)), url("../../images/bg.png");
  background-size: cover;
  background-position: center;
}

.rp-hero .rp-muted { color: rgba(255,255,255,.88); max-width: 560px; }
.rp-start-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; max-width: 640px; }
.rp-start-form .rp-field { flex: 1 1 320px; margin: 0; }

.rp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.rp-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }

.rp-field { display: grid; gap: 7px; margin-bottom: 15px; }
.rp-field label { font-weight: 800; font-size: 14px; }
.rp-field input, .rp-field select {
  width: 100%;
  font-size: 16px;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #b9c2c8;
  border-radius: 7px;
  background: #fff;
}

.rp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
}

.rp-btn.primary { background: var(--brand); }
.rp-btn.primary:hover { background: var(--brand-dark); }
.rp-btn.secondary { background: #6b747b; }
.rp-btn.ghost { background: #fff; color: var(--ink); border: 1px solid #aeb8be; }
.rp-btn:disabled { opacity: .45; cursor: not-allowed; }
.rp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.rp-alert { padding: 12px 14px; border-radius: 7px; margin-bottom: 18px; }
.rp-alert.error { background: #fff0f0; border: 1px solid #d99; }
.rp-alert.ok { background: #eef9ee; border: 1px solid #9d9; }

.rp-template {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.rp-template:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 14px 28px rgba(24,32,38,.12);
}

.rp-template img { width: 100%; display: block; border-radius: 6px; background: #f7f9fa; }
.rp-template span { font-weight: 800; }

.rp-studio {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.rp-upload-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}

.rp-upload-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.rp-dropzone {
  display: grid;
  place-items: center;
  min-height: 144px;
  border: 2px dashed #b7c3ca;
  border-radius: 10px;
  background: #f7fafb;
  color: var(--muted);
  text-align: center;
  padding: 18px;
  cursor: pointer;
}

.rp-dropzone.is-dragging {
  border-color: var(--brand);
  background: #fff3f8;
}

.rp-dropzone input { display: none; }
.rp-preview-frame {
  background: #1c2227;
  border-radius: 10px;
  padding: 14px;
}

.rp-preview {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  background: #fff;
}

.rp-live-mock {
  min-height: 360px;
  border-radius: 8px;
  background: linear-gradient(#d62b7c 0 10%, #fffefa 10% 90%, #d62b7c 90%);
  display: grid;
  grid-template-columns: 27% 46% 27%;
  gap: 10px;
  align-items: center;
  padding: 28px;
  overflow: hidden;
}

.rp-live-photo {
  background: #fff;
  border: 12px solid #fff;
  box-shadow: 0 8px 14px rgba(0,0,0,.16);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.rp-live-photo:first-child { transform: rotate(-4deg); }
.rp-live-photo:last-child { transform: rotate(4deg); }
.rp-live-photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.95); }

.rp-live-text {
  min-height: 260px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 46px;
  border: 1px solid #e3ded5;
  box-shadow: 12px 12px 0 #d1ccc3;
  background: #fffefa;
  color: #4f5960;
}
.rp-live-text strong { font-size: clamp(20px, 2.3vw, 31px); }
.rp-live-text span { font-size: clamp(18px, 2vw, 28px); }

.rp-crop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.rp-crop-canvas { width: 100%; max-width: 920px; border-radius: 10px; cursor: move; background: #111; display: block; }
.rp-crop-source { display: none; }
.rp-range { display: grid; gap: 8px; margin-bottom: 18px; }
.rp-range input { width: 100%; }

.rp-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.rp-admin-table th,
.rp-admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.rp-admin-table th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.rp-admin-thumbs {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rp-admin-thumbs img,
.rp-admin-detail-img {
  width: 68px;
  height: 82px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
}

.rp-admin-detail-img {
  width: 180px;
  height: 225px;
}

.rp-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #e8eef1;
  color: #42515a;
  font-size: 13px;
  font-weight: 800;
}

.rp-badge.ok { background: #e4f5ed; color: #1f7b51; }
.rp-badge.warn { background: #fff4d8; color: #87620c; }

.rp-kv {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 16px;
  margin: 18px 0;
}

.rp-kv dt { color: var(--muted); font-weight: 800; }
.rp-kv dd { margin: 0; }

@media (max-width: 880px) {
  .rp-workflow, .rp-studio, .rp-crop-layout { grid-template-columns: 1fr; }
  .rp-live-mock { grid-template-columns: 1fr; padding: 18px; }
  .rp-live-photo { max-width: 300px; margin: 0 auto; }
}
