:root {
  --blue: #9fd6dc;
  --blue-dark: #78bdc6;
  --pink: #f0aaa1;
  --pink-dark: #dc8f88;
  --purple: #c56b98;
  --purple-dark: #a94d7c;
  --cream: #fff9f4;
  --text: #40363d;
  --muted: #8d7f87;
  --border: rgba(255, 255, 255, 0.7);
  --shadow: 0 24px 70px rgba(105, 69, 90, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  background:
    radial-gradient(
      circle at 5% 0%,
      rgba(159, 214, 220, 0.9),
      transparent 34%
    ),
    radial-gradient(
      circle at 100% 12%,
      rgba(240, 170, 161, 0.8),
      transparent 32%
    ),
    radial-gradient(
      circle at 75% 100%,
      rgba(197, 107, 152, 0.55),
      transparent 36%
    ),
    linear-gradient(145deg, #e8f5f3, #fff9f4 54%, #efd5e2);
  background-attachment: fixed;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0;
}

.hidden {
  display: none !important;
}

/* 登录 */

.login-card {
  width: min(470px, 100%);
  margin: 8vh auto 0;
  padding: 44px;
  border: 1px solid var(--border);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.login-brand {
  margin-bottom: 34px;
}

.brand-dots {
  display: flex;
  gap: 9px;
  margin-bottom: 28px;
}

.brand-dots span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.brand-dots span:nth-child(1) {
  background: var(--blue);
}

.brand-dots span:nth-child(2) {
  background: var(--pink);
}

.brand-dots span:nth-child(3) {
  background: var(--purple);
}

.eyebrow {
  color: var(--purple-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 4px;
}

.login-card h1 {
  margin: 16px 0 10px;
  font-size: 34px;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* 后台布局 */

.dashboard-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 52px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 28px 22px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.8),
      rgba(255, 248, 244, 0.7)
    );
  border-right: 1px solid rgba(188, 156, 174, 0.16);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 30px;
}

.sidebar-logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, var(--pink), var(--purple));
  box-shadow: 0 14px 30px rgba(168, 77, 124, 0.22);
}

.sidebar-brand strong {
  display: block;
  font-size: 17px;
}

.sidebar-brand span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 15px 16px;
  color: #74666e;
  text-align: left;
  background: transparent;
  transition:
    transform 0.16s ease,
    color 0.16s ease,
    background 0.16s ease;
}

.nav-button:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.75);
}

.nav-button.active {
  color: #ffffff;
  background:
    linear-gradient(135deg, var(--purple), var(--purple-dark));
  box-shadow: 0 16px 32px rgba(166, 73, 119, 0.2);
}

.nav-number {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  opacity: 0.72;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 28px;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  padding: 12px 14px;
  color: #74666e;
  font-size: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #52b788;
  box-shadow: 0 0 0 5px rgba(82, 183, 136, 0.12);
}

.logout-button {
  width: 100%;
  border: 1px solid rgba(184, 147, 167, 0.26);
  border-radius: 16px;
  padding: 13px;
  color: #7d6974;
  background: rgba(255, 255, 255, 0.72);
}

.workspace {
  min-width: 0;
  padding: 34px;
}

.workspace-header,
.section-heading,
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.workspace-header {
  margin-bottom: 38px;
}

.workspace-header h1 {
  margin: 10px 0 0;
  font-size: 32px;
}

.header-badges {
  display: flex;
  gap: 10px;
}

.header-badges span,
.count-badge {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 10px 15px;
  color: #75676e;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
  animation: sectionIn 0.25s ease;
}

@keyframes sectionIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 12px 0 7px;
  font-size: 28px;
}

.section-heading p,
.panel-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-tag,
.package-label {
  display: inline-block;
  border-radius: 999px;
  padding: 8px 13px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.tag-blue {
  background: var(--blue-dark);
}

.tag-pink {
  background: var(--pink-dark);
}

.tag-purple {
  background: var(--purple);
}

.panel {
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 46px rgba(105, 69, 90, 0.08);
}

.panel h3 {
  margin: 0;
}

/* 表单 */

label {
  display: block;
  color: #62545d;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 9px;
  border: 1px solid rgba(191, 166, 180, 0.28);
  border-radius: 15px;
  padding: 13px 14px;
  color: var(--text);
  outline: none;
  background: rgba(255, 255, 255, 0.86);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(197, 107, 152, 0.1);
}

textarea {
  line-height: 1.7;
  resize: vertical;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 17px;
  padding: 14px 22px;
  font-weight: 700;
}

.primary-button {
  color: #ffffff;
  background:
    linear-gradient(135deg, var(--purple), var(--purple-dark));
  box-shadow: 0 15px 30px rgba(166, 73, 119, 0.18);
}

.secondary-button {
  color: #745f6b;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(186, 151, 170, 0.24);
}

.message {
  min-height: 22px;
  margin-top: 12px;
  color: #b44d5a;
  font-size: 13px;
}

/* 页面文字 */

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.full-row {
  grid-column: 1 / -1;
}

/* 手机预览 */

.preview-panel {
  position: sticky;
  top: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 46px rgba(105, 69, 90, 0.08);
}

.preview-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.preview-title span {
  font-weight: 800;
}

.preview-title small {
  color: var(--muted);
}

.phone-frame {
  padding: 9px;
  border-radius: 34px;
  background: #292429;
  box-shadow: 0 25px 55px rgba(54, 40, 48, 0.18);
}

.phone-screen {
  min-height: 660px;
  overflow: hidden;
  border-radius: 27px;
  padding: 26px 20px;
  background:
    radial-gradient(
      circle at 0% 0%,
      rgba(159, 214, 220, 0.95),
      transparent 42%
    ),
    radial-gradient(
      circle at 100% 44%,
      rgba(240, 170, 161, 0.8),
      transparent 42%
    ),
    radial-gradient(
      circle at 50% 100%,
      rgba(197, 107, 152, 0.75),
      transparent 46%
    ),
    #fff9f4;
}

.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.95);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 2px;
}

.phone-dots {
  display: flex;
  gap: 6px;
}

.phone-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.phone-dots i:nth-child(1) {
  background: var(--blue);
}

.phone-dots i:nth-child(2) {
  background: var(--pink);
}

.phone-dots i:nth-child(3) {
  background: var(--purple);
}

.phone-brand {
  margin: 55px 0 48px;
  color: #ffffff;
}

.phone-brand strong {
  display: block;
  font-size: 31px;
  line-height: 1.15;
}

.phone-brand span {
  display: block;
  margin-top: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
}

.phone-brand p {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.7;
}

.preview-service {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  margin-bottom: 15px;
  border-radius: 999px;
  padding: 18px 22px;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(105, 69, 90, 0.13);
}

.preview-blue {
  background: linear-gradient(135deg, #a9dce1, #83c6cd);
}

.preview-pink {
  background: linear-gradient(135deg, #f4b3aa, #e7958e);
}

.preview-purple {
  background: linear-gradient(135deg, #cd78a2, #b95789);
}

.preview-service small,
.preview-service strong,
.preview-service span {
  display: block;
}

.preview-service small {
  margin-bottom: 5px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 2px;
  opacity: 0.82;
}

.preview-service strong {
  font-size: 16px;
}

.preview-service span {
  margin-top: 5px;
  font-size: 9px;
  opacity: 0.85;
}

.preview-service b {
  font-size: 21px;
  font-weight: 400;
}

/* 上传 */

.upload-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px;
  gap: 18px;
  align-items: end;
}

.upload-form .file-label,
.upload-form button,
.upload-form .message {
  grid-column: 1 / -1;
}

.checkbox-label {
  display: flex;
  align-items: center;
  min-height: 48px;
  gap: 10px;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  margin: 0;
}

/* 照片与 GIF */

.category-block {
  margin-top: 30px;
}

.category-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.category-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-pink {
  background: var(--pink);
}

.dot-purple {
  background: var(--purple);
}

.photo-grid,
.retouch-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(210px, 1fr)
  );
  gap: 18px;
  min-height: 120px;
}

.photo-card,
.retouch-card {
  overflow: hidden;
  border: 1px solid rgba(195, 169, 184, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  cursor: grab;
  user-select: none;
  transition:
    transform 0.16s ease,
    opacity 0.16s ease,
    box-shadow 0.16s ease;
}

.photo-card:hover,
.retouch-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(111, 72, 92, 0.14);
}

.photo-card.dragging,
.retouch-card.dragging {
  opacity: 0.42;
  transform: scale(0.97);
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #f5eef2;
}

.retouch-card img {
  display: block;
  width: 100%;
  height: auto;
  background: #f5eef2;
}

.drag-handle {
  padding: 10px;
  color: #816f79;
  font-size: 11px;
  text-align: center;
  letter-spacing: 1px;
  background: #f8eef3;
}

.photo-info,
.retouch-card-info {
  padding: 15px;
}

.photo-meta {
  margin-bottom: 12px;
  color: #806f78;
  font-size: 12px;
  line-height: 1.7;
}

.photo-actions {
  display: flex;
  gap: 8px;
}

.photo-actions button {
  flex: 1;
  border: 0;
  border-radius: 12px;
  padding: 10px;
  color: #ffffff;
  background: var(--purple);
}

.photo-actions .danger {
  background: #b95460;
}

.empty {
  grid-column: 1 / -1;
  padding: 50px 20px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(178, 145, 164, 0.28);
  border-radius: 20px;
}

/* 套餐 */

.package-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.package-editor {
  padding: 28px;
  border-radius: 26px;
}

.package-editor h3 {
  margin: 13px 0 22px;
  font-size: 23px;
}

.package-editor label {
  margin-top: 16px;
}

.package-editor-pink {
  background:
    linear-gradient(
      145deg,
      rgba(246, 177, 168, 0.28),
      rgba(198, 103, 149, 0.12)
    );
}

.package-editor-blue {
  background:
    linear-gradient(
      145deg,
      rgba(161, 215, 221, 0.38),
      rgba(127, 194, 202, 0.14)
    );
}

.package-editor-pink .package-label {
  background: var(--pink-dark);
}

.package-editor-blue .package-label {
  background: var(--blue-dark);
}

.package-save-button {
  width: 100%;
  margin-top: 24px;
}

@media (max-width: 1100px) {
  .dashboard-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
  }

  .phone-frame {
    max-width: 360px;
    margin: 0 auto;
  }
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 18px, 1500px);
    padding: 9px 0;
  }

  .dashboard-shell {
    display: block;
    border-radius: 24px;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(188, 156, 174, 0.16);
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar-bottom {
    display: none;
  }

  .workspace {
    padding: 22px 16px;
  }

  .workspace-header,
  .section-heading,
  .panel-header {
    align-items: flex-start;
  }

  .header-badges {
    display: none;
  }

  .settings-grid,
  .package-editor-grid,
  .upload-form {
    grid-template-columns: 1fr;
  }

  .full-row,
  .upload-form .file-label,
  .upload-form button,
  .upload-form .message {
    grid-column: auto;
  }

  .panel {
    padding: 20px;
    border-radius: 22px;
  }

  .login-card {
    margin-top: 20px;
    padding: 28px;
  }
}


/* 韩式登记照分类标记 */
.category-dot.dot-blue {
  background: var(--blue-dark);
}
