:root {
  --bg: #eef9fb;
  --bg-soft: #f7fcfe;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-solid: #ffffff;
  --panel-soft: #f6fbfc;
  --line: rgba(15, 118, 110, 0.12);
  --line-strong: rgba(15, 118, 110, 0.24);
  --text: #0f172a;
  --muted: #64748b;
  --muted-strong: #475569;
  --primary: #11b7b2;
  --primary-dark: #08918d;
  --primary-soft: rgba(17, 183, 178, 0.12);
  --success-bg: rgba(34, 197, 94, 0.12);
  --success-text: #15803d;
  --warning-bg: rgba(245, 158, 11, 0.16);
  --warning-text: #b45309;
  --danger-bg: rgba(239, 68, 68, 0.14);
  --danger-text: #b91c1c;
  --info-bg: rgba(14, 165, 233, 0.13);
  --info-text: #0369a1;
  --shadow-soft: 0 18px 44px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 26px 64px rgba(15, 23, 42, 0.1);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --sidebar-width: 276px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(17, 183, 178, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 26%),
    linear-gradient(180deg, #f4fdfe 0%, #eef7fb 42%, #f8fbff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.32) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 72%);
}

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

button {
  border: 0;
}

img {
  display: block;
  max-width: 100%;
}

code {
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(17, 183, 178, 0.1);
  font-size: 0.92em;
}

.hidden,
.hidden-panel {
  display: none !important;
}

.screen {
  position: relative;
  min-height: 100vh;
}

.screen-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.screen-dashboard {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 24px;
}

.login-layout {
  width: min(1320px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 420px);
  gap: 28px;
  align-items: stretch;
}

.brand-panel,
.login-panel,
.sidebar,
.topbar,
.panel,
.stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 254, 0.92));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.brand-panel::before,
.login-panel::before,
.sidebar::before,
.topbar::before,
.panel::before,
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(17, 183, 178, 0.38), rgba(14, 165, 233, 0.38), transparent);
}

.brand-panel {
  padding: 42px;
  border-radius: 38px;
  background:
    radial-gradient(circle at top left, rgba(17, 183, 178, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 251, 253, 0.96));
}

.brand-tag,
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(17, 183, 178, 0.18);
  background: rgba(17, 183, 178, 0.12);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-panel h1,
.sidebar-brand h2,
.panel-head h3,
.topbar h1,
.login-panel h2 {
  margin: 0;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.brand-panel h1 {
  margin-top: 18px;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.08;
}

.brand-panel > p,
.sidebar-brand p,
.topbar p,
.panel-head span,
.login-panel p,
.brand-metric span,
.stat-card em,
.preview-main span,
.field > span,
.helper-note,
.dm-empty {
  color: var(--muted);
}

.brand-panel > p {
  max-width: 700px;
  margin: 18px 0 0;
  font-size: 16px;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.brand-metric {
  min-height: 168px;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(17, 183, 178, 0.12);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.brand-metric strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
}

.brand-metric span {
  display: block;
  font-size: 14px;
}

.login-panel {
  padding: 34px;
  border-radius: 32px;
  align-self: center;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-head span {
  font-size: 13px;
}

.login-form,
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-form {
  margin-top: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field > span {
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  color: var(--text);
  background: var(--panel-solid);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.field textarea {
  min-height: 124px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(17, 183, 178, 0.5);
  box-shadow:
    0 0 0 4px rgba(17, 183, 178, 0.12),
    inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

input[type="file"] {
  padding: 10px 12px;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  cursor: pointer;
}

.helper-row,
.remember-row,
.topbar-actions,
.panel-head-actions,
.action-row,
.display-card-actions,
.config-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.helper-row {
  justify-content: space-between;
  flex-wrap: wrap;
}

.remember-row {
  color: var(--muted-strong);
  font-size: 14px;
}

.remember-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.helper-note {
  font-size: 13px;
}

.primary-btn,
.outline-btn,
.menu-item {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.primary-btn {
  color: #ffffff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 28px rgba(17, 183, 178, 0.26);
}

.primary-btn:hover,
.outline-btn:hover,
.menu-item:hover {
  transform: translateY(-1px);
}

.inline-submit {
  width: fit-content;
  min-width: 142px;
}

.outline-btn {
  border: 1px solid var(--line);
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.88);
}

.compact-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 14px;
}

.panel-head-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.primary-btn-soft {
  color: var(--primary-dark);
  background: linear-gradient(180deg, rgba(17, 183, 178, 0.16), rgba(17, 183, 178, 0.08));
  box-shadow: none;
}

.danger-btn {
  border-color: rgba(239, 68, 68, 0.18);
  color: #c2410c;
  background: rgba(255, 255, 255, 0.92);
}

.demo-card,
.preview-card,
.config-card,
.slot-config-card,
.empty-state {
  border: 1px solid rgba(17, 183, 178, 0.12);
  background: var(--panel-soft);
}

.demo-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 22px;
  padding: 20px 22px;
  border-radius: 22px;
}

.demo-card strong {
  font-size: 15px;
}

.sidebar {
  position: sticky;
  top: 24px;
  min-height: calc(100vh - 48px);
  padding: 24px 18px;
  border-radius: 30px;
}

.sidebar-brand {
  padding: 10px 10px 20px;
}

.sidebar-brand h2 {
  margin-top: 14px;
  font-size: 28px;
}

.sidebar-brand p {
  margin: 10px 0 0;
  font-size: 14px;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.menu-item,
.menu-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  border: 1px solid transparent;
  color: var(--muted-strong);
  background: transparent;
  text-decoration: none;
  font-weight: 600;
}

.menu-item.active,
.menu-link.active,
.menu-item.menu-subitem.active {
  color: var(--primary-dark);
  border-color: rgba(17, 183, 178, 0.14);
  background: linear-gradient(135deg, rgba(17, 183, 178, 0.15), rgba(17, 183, 178, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.menu-subitem {
  min-height: 42px;
  font-size: 14px;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 30px;
  border-radius: 30px;
}

.topbar h1 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.14;
}

.topbar p {
  margin: 10px 0 0;
  max-width: 720px;
  font-size: 15px;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(17, 183, 178, 0.14);
  color: var(--primary-dark);
  background: rgba(17, 183, 178, 0.1);
  font-weight: 700;
}

.stats-grid,
.content-grid,
.booking-content-grid,
.table-grid,
.display-grid {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-grid,
.booking-content-grid,
.display-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.table-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.user-grid-single,
[data-panel="forum"].forum-grid-single,
[data-panel="user"].user-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.stat-card,
.panel {
  padding: 24px;
  border-radius: 28px;
}

.stat-card {
  min-height: 182px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin: 14px 0 10px;
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-card em {
  font-style: normal;
  font-size: 13px;
}

.todo-list,
.config-list,
.slot-config-list,
.display-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.todo-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.todo-list li {
  position: relative;
  padding: 16px 18px 16px 46px;
  border-radius: 18px;
  border: 1px solid rgba(17, 183, 178, 0.1);
  background: rgba(248, 252, 253, 0.9);
  color: var(--muted-strong);
}

.todo-list li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #67e8f9);
  box-shadow: 0 0 0 5px rgba(17, 183, 178, 0.1);
}

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

.data-table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(248, 252, 253, 0.92);
}

.data-table thead th {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(17, 183, 178, 0.1);
  color: var(--muted-strong);
  background: rgba(17, 183, 178, 0.06);
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.data-table tbody tr {
  transition: background 0.18s ease;
}

.data-table tbody tr:hover {
  background: rgba(17, 183, 178, 0.05);
}

.data-table td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted-strong);
  vertical-align: top;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.category-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(17, 183, 178, 0.14);
  color: var(--primary-dark);
  background: rgba(17, 183, 178, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.category-chip-soft {
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.06);
}

.category-chip-list-compact .category-chip {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

.preview-card,
.config-card,
.slot-config-card {
  padding: 18px;
  border-radius: 22px;
}

.preview-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.store-category-preview {
  grid-template-columns: minmax(0, 1fr);
}

.room-preview-card {
  grid-template-columns: 120px minmax(0, 1fr);
}

.room-cover-preview,
#roomCoverPreview {
  width: 120px;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
}

.preview-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.preview-main strong {
  font-size: 18px;
}

.preview-image,
.store-preview-image,
.display-card-cover {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(17, 183, 178, 0.08), rgba(14, 165, 233, 0.08));
}

.config-card,
.slot-config-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.config-card strong,
.slot-config-card strong,
.display-card strong {
  display: block;
  font-size: 18px;
}

.config-card span,
.slot-config-card span,
.display-card-subtitle,
.display-card-desc,
.display-card-note,
.store-meta-block span {
  color: var(--muted);
}

.config-card > div:first-child,
.slot-config-card > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.config-card-actions {
  flex-direction: column;
  align-items: flex-end;
  min-width: fit-content;
}

.display-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(17, 183, 178, 0.12);
  background: var(--panel-soft);
}

.display-card-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.display-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.display-card-subtitle {
  font-size: 14px;
  font-weight: 700;
}

.display-card-desc,
.display-card-note {
  margin: 0;
  font-size: 14px;
}

.store-display-card {
  grid-template-columns: 164px minmax(0, 1fr);
}

.store-card-cover {
  aspect-ratio: 4 / 4;
}

.receipt-compact-card {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.receipt-compact-card .store-card-cover {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
}

.receipt-compact-card .display-card-subtitle,
.receipt-compact-card .display-card-desc,
.receipt-compact-card .display-card-note {
  font-size: 13px;
}

.receipt-compact-card .store-meta-block {
  padding: 10px 12px;
  border-radius: 12px;
}

.receipt-compact-card .store-meta-block strong {
  font-size: 12px;
}

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

.store-meta-block {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.store-meta-block strong {
  font-size: 13px;
}

#userManageList {
  gap: 8px;
}

.user-manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 8px 12px 8px 16px;
  border: 1px solid rgba(17, 183, 178, 0.12);
  border-radius: 18px;
  background: rgba(248, 252, 253, 0.92);
}

.user-manage-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.user-manage-name {
  min-width: 96px;
  max-width: 220px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-manage-id {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-manage-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.editor-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.editor-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.editor-modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(86vh, 920px);
  overflow: auto;
}

.editor-modal-panel > .panel {
  box-shadow: var(--shadow-strong);
}

.display-modal-panel,
.catalog-modal-panel,
.forum-modal-panel,
.claw-prize-modal-panel,
.user-modal-panel {
  width: min(760px, 100%);
}

.editor-close-btn {
  flex: 0 0 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.status-success {
  color: var(--success-text);
  background: var(--success-bg);
}

.status-warning {
  color: var(--warning-text);
  background: var(--warning-bg);
}

.status-danger {
  color: var(--danger-text);
  background: var(--danger-bg);
}

.status-info {
  color: var(--info-text);
  background: var(--info-bg);
}

.empty-state {
  padding: 22px;
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.panel > .field,
.panel > .stack-form,
.panel > .config-list,
.panel > .slot-config-list,
.panel > .display-list,
.panel > .filter-grid,
.panel > .data-table,
.panel > .preview-card {
  margin-top: 18px;
}

.member-single-panel {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 1380px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .booking-content-grid,
  .table-grid,
  .display-grid {
    grid-template-columns: 1fr;
  }

  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1160px) {
  .screen-dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

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

  .brand-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .screen-login,
  .screen-dashboard {
    padding: 14px;
  }

  .brand-panel,
  .login-panel,
  .sidebar,
  .topbar,
  .panel,
  .stat-card {
    border-radius: 24px;
  }

  .brand-panel,
  .login-panel,
  .topbar,
  .panel,
  .stat-card {
    padding: 20px;
  }

  .stats-grid,
  .content-grid,
  .booking-content-grid,
  .table-grid,
  .display-grid,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .preview-card,
  .display-card,
  .store-display-card,
  .config-card,
  .slot-config-card {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .config-card-actions {
    width: 100%;
    align-items: flex-start;
  }

  .display-card-actions,
  .action-row {
    flex-wrap: wrap;
  }

  .user-manage-row,
  .user-manage-main,
  .user-manage-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-manage-actions {
    width: 100%;
  }

  .inline-submit,
  .primary-btn,
  .outline-btn {
    width: 100%;
    justify-content: center;
  }

  .menu-item,
  .menu-link {
    min-height: 44px;
  }
}
