:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --sidebar: #0f172a;
  --sidebar-soft: #172033;
  --sidebar-text: #cbd5e1;
  --sidebar-muted: #7c8aa3;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #eff6ff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #059669;
  --success-soft: #ecfdf5;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 10px 36px rgba(15, 23, 42, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

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

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

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-muted {
  color: var(--muted);
}

/* Admin shell */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 248px;
  flex: 0 0 248px;
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 22px;
  color: #fff;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.5px;
}

.brand-text {
  font-weight: 650;
  font-size: 17px;
  letter-spacing: 0.1px;
}

.brand-sub {
  display: block;
  font-size: 11px;
  color: var(--sidebar-muted);
  font-weight: 400;
  margin-top: 1px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section {
  padding: 18px 10px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item .icon {
  width: 18px;
  height: 18px;
  color: var(--sidebar-muted);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.is-active {
  background: rgba(37, 99, 235, 0.18);
  color: #fff;
}

.nav-item.is-active .icon {
  color: #93c5fd;
}

.nav-item .nav-badge {
  margin-left: auto;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--sidebar-muted);
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px 10px 2px;
  font-size: 11px;
  color: var(--sidebar-muted);
  line-height: 1.7;
}

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-title {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

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

.lang-form {
  display: inline-flex;
  align-items: center;
}

.lang-select {
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 26px 0 9px;
  font-size: 12px;
  cursor: pointer;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 6px;
  border-left: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
}

.logout-form {
  margin: 0;
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 4px;
}

.logout-btn:hover {
  color: var(--danger);
}

.content {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Cards and grids */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 0;
}

.card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.card-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.card-body {
  padding: 20px 22px 22px;
}

.card + .card {
  margin-top: 20px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

.stat-card {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.stat-icon .icon {
  width: 21px;
  height: 21px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: #cbd5e1;
  background: var(--surface-muted);
  color: var(--text);
}

.btn-danger {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger);
}

.btn-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.btn-sm {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--text);
  border-color: #cbd5e1;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.form-group {
  min-width: 0;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text);
}

.form-label .req {
  color: var(--danger);
  margin-left: 3px;
}

.form-help {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.form-control,
.form-select {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea.form-control {
  min-height: 104px;
  resize: vertical;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-control::placeholder {
  color: #94a3b8;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.checkbox input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 20px;
  margin-top: 22px;
  border-top: 1px solid var(--border);
}

.form-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.form-section:first-child {
  padding-top: 0;
}

.form-section:last-of-type {
  border-bottom: 0;
}

.form-section-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.form-section-desc {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
}

/* Flash */
.flash {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 9px;
  margin-bottom: 18px;
  font-size: 13px;
  border: 1px solid transparent;
}

.flash-success {
  background: var(--success-soft);
  border-color: #a7f3d0;
  color: #065f46;
}

.flash-error {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: #991b1b;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge-muted {
  background: var(--surface-muted);
  color: var(--muted);
}

.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Dashboard */
.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0f172a 0%, #172554 100%);
  color: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.dashboard-hero h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.dashboard-hero p {
  margin: 7px 0 0;
  color: #cbd5e1;
  font-size: 13px;
}

.dashboard-hero .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 11px;
}

.quick-actions {
  display: grid;
  gap: 6px;
}

.action-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--text);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.action-link:hover {
  background: var(--surface-muted);
  border-color: var(--border);
  color: var(--text);
}

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

.action-link-body {
  min-width: 0;
}

.action-link-title {
  font-size: 13px;
  font-weight: 600;
}

.action-link-desc {
  color: var(--muted);
  font-size: 11px;
  margin-top: 1px;
}

.system-list {
  display: grid;
  gap: 0;
}

.system-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.system-row:last-child {
  border-bottom: 0;
}

.system-row .label {
  color: var(--muted);
}

.system-row .value {
  font-weight: 550;
  text-align: right;
  word-break: break-word;
}

.start-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.start-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 13px;
}

.start-item.is-muted {
  color: var(--muted);
  background: var(--surface-muted);
}

.start-index {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
}

.start-item .badge {
  margin-left: auto;
}

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

.recent-media-item {
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface-muted);
}

.recent-media-item img {
  width: 100%;
  height: 92px;
  object-fit: cover;
}

.recent-media-file {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.recent-media-name {
  padding: 7px 8px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-state {
  text-align: center;
  padding: 34px 20px;
}

.empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-muted);
  color: #94a3b8;
}

.empty-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.empty-text {
  color: var(--muted);
  font-size: 12px;
}

/* Media */
.media-upload {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: start;
}

.media-upload-column {
  min-width: 0;
}

.file-drop {
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: var(--surface-muted);
  padding: 22px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.file-drop:hover,
.file-drop.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-drop-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
}

.file-drop-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.file-drop-help {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.file-name {
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  word-break: break-all;
}

.upload-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-track {
  flex: 1 1 auto;
  height: 6px;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.upload-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, #7c3aed 100%);
  transition: width 0.15s ease;
}

.upload-progress-text {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.media-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.media-count {
  color: var(--muted);
  font-size: 12px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.media-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.media-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.media-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.media-thumb img,
.media-thumb video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-file-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.media-body {
  padding: 10px 11px;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.media-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-meta {
  color: var(--muted);
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.media-alt {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
  padding: 8px 11px 10px;
  border-top: 1px solid var(--border);
}

.media-actions form {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

.media-actions .btn {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  padding: 0 6px;
  justify-content: center;
  white-space: nowrap;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 22px;
}

.pagination a,
.pagination span {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination .page-current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Page module */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-group {
  min-width: 150px;
}

.filter-search {
  flex: 1 1 260px;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  padding: 10px 12px;
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.data-table tbody tr:hover {
  background: var(--surface-muted);
}

.actions-col {
  text-align: right;
}

.page-title-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 200px;
}

.page-title-link {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.page-title-link:hover {
  color: var(--accent);
}

.page-slug {
  color: var(--muted);
  font-size: 11px;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.action-row form {
  margin: 0;
}

/* 页面列表：行卡片 */
.page-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 132px auto;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-row:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.page-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.page-row-mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
}

.page-row-copy {
  min-width: 0;
}

.page-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.page-row-title a {
  color: var(--text);
  text-decoration: none;
}

.page-row-title a:hover {
  color: var(--accent);
}

.page-row-path {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-row-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge-dashed {
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--muted);
}

.page-row-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

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

.coverage-bar {
  width: 62px;
  height: 5px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}

.coverage-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.coverage-text {
  color: var(--muted);
  font-size: 11px;
}

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

.row-menu {
  position: relative;
}

.row-menu summary {
  list-style: none;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.row-menu summary::-webkit-details-marker {
  display: none;
}

.row-menu[open] summary {
  border-color: var(--accent);
  color: var(--accent);
}

.row-menu-panel {
  position: absolute;
  right: 0;
  top: 36px;
  z-index: 20;
  min-width: 158px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.row-menu-panel a,
.row-menu-panel button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--text);
  font-size: 12px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.row-menu-panel a:hover,
.row-menu-panel button:hover {
  background: var(--surface-muted);
}

.row-menu-panel form {
  margin: 0;
}

.row-menu-panel .is-danger {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.row-menu-panel .is-danger button {
  color: #b91c1c;
}

@media (max-width: 980px) {
  .page-row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 10px;
  }

  .page-row-langs,
  .page-row-status {
    grid-column: 1 / -1;
  }

  .page-row-status {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .page-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .page-row-actions {
    justify-content: space-between;
  }
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.form-layout.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.form-side {
  display: grid;
  gap: 20px;
}

.side-card .card-body {
  padding-top: 16px;
}

.url-box {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
}

.side-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.translation-list {
  display: grid;
  gap: 8px;
}

.translation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.translation-row.is-current {
  background: var(--surface-muted);
}

.translation-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.translation-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 1px;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-form .form-select {
  flex: 1;
  min-width: 0;
}

.read-only-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-size: 12px;
}

.revision-note {
  font-weight: 550;
}

.form-control[type="color"] {
  min-height: 40px;
  padding: 4px;
  cursor: pointer;
}

/* Alerts */
.alert {
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.6;
  border: 1px solid transparent;
}

.alert-info {
  background: var(--accent-soft);
  border-color: #bfdbfe;
  color: #1e40af;
}

.alert-warning {
  background: var(--warning-soft);
  border-color: #fde68a;
  color: #92400e;
}

/* Auth */
.auth-body {
  background: var(--bg);
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
}

.auth-brand {
  background: linear-gradient(150deg, #0f172a 0%, #172554 65%, #1e3a8a 100%);
  color: #fff;
  padding: 54px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-brand::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  right: -160px;
  bottom: -160px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.035), 0 0 0 160px rgba(255, 255, 255, 0.025);
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  margin-bottom: 54px;
}

.auth-logo .brand-mark {
  background: #fff;
  color: #0f172a;
}

.auth-brand h1 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.auth-brand p {
  margin: 0;
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.8;
}

.auth-feature-list {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.auth-feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e2e8f0;
  font-size: 13px;
}

.auth-feature-list .icon {
  color: #93c5fd;
}

.auth-brand-footer {
  position: relative;
  z-index: 1;
  color: #94a3b8;
  font-size: 12px;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  position: relative;
}

.auth-lang {
  position: absolute;
  top: 26px;
  right: 30px;
  display: flex;
  gap: 4px;
}

.auth-lang a {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.auth-lang a.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.auth-card {
  width: 100%;
  max-width: 390px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 34px 32px;
}

.auth-head {
  margin-bottom: 24px;
}

.auth-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.auth-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form .form-control {
  min-height: 44px;
}

.auth-submit {
  min-height: 44px;
  margin-top: 4px;
}

.auth-footer {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.auth-footer a {
  color: var(--muted);
}

.auth-footer a:hover {
  color: var(--accent);
}

/* Installer */
.install-body {
  background: #f4f6fb;
  min-height: 100vh;
}

.install-header {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.install-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 650;
  font-size: 17px;
}

.install-brand .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 15px;
}

.install-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.install-lang {
  display: flex;
  gap: 4px;
}

.install-lang a {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.install-lang a.is-active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.install-steps {
  width: 100%;
  max-width: 1100px;
  margin: 26px auto 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.install-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
}

.install-step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 11px;
  font-weight: 700;
}

.install-step.is-active {
  color: var(--text);
  font-weight: 600;
}

.install-step.is-active .install-step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.install-step.is-done .install-step-dot {
  background: var(--success-soft);
  border-color: #a7f3d0;
  color: var(--success);
}

.install-step-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  min-width: 16px;
}

.install-main {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
}

.install-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.install-card-body {
  padding: 32px;
}

.install-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 32px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
}

.install-hero h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.03em;
}

.install-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 620px;
  line-height: 1.75;
}

.install-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 13px;
}

.install-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.install-feature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.install-title {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.install-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.requirements {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.requirement {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.requirement:last-child {
  border-bottom: 0;
}

.requirement-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.requirement-icon .icon {
  width: 15px;
  height: 15px;
}

.req-ok {
  background: var(--success-soft);
  color: var(--success);
}

.req-fail {
  background: var(--danger-soft);
  color: var(--danger);
}

.requirement-content {
  min-width: 0;
  flex: 1;
}

.requirement-label {
  font-size: 13px;
  font-weight: 550;
}

.requirement-detail {
  color: var(--muted);
  font-size: 11px;
  margin-top: 1px;
  word-break: break-word;
}

.requirement-status {
  font-size: 11px;
  font-weight: 600;
  flex: 0 0 auto;
}

.install-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.install-actions .btn {
  min-height: 42px;
  padding: 0 20px;
}

.install-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.install-footer {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 26px 24px 34px;
  color: #94a3b8;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.install-form {
  margin-top: 22px;
}

.install-form .form-grid {
  gap: 18px 20px;
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.industry-card {
  position: relative;
  display: flex;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.industry-card:hover {
  border-color: #cbd5e1;
  background: var(--surface-muted);
}

.industry-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.industry-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.industry-swatch {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.industry-body {
  min-width: 0;
}

.industry-name {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.industry-desc {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  margin-top: 2px;
}

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

.lang-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.lang-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lang-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lang-chip:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.lang-chip.is-default {
  cursor: default;
}

.lang-chip.is-default::after {
  content: "默认";
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}

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

.industry-colors {
  display: flex;
  gap: 3px;
  margin-top: 5px;
}

.color-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.success-panel {
  text-align: center;
  padding: 54px 32px;
}

.success-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.success-icon .icon {
  width: 32px;
  height: 32px;
}

.success-title {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.success-text {
  margin: 9px auto 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.success-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.already-panel {
  padding: 46px 32px;
  text-align: center;
}

.already-panel .success-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Responsive */
@media (max-width: 1180px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 16px 0 40px rgba(15, 23, 42, 0.18);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 40;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .topbar {
    padding: 0 18px;
  }

  .content {
    padding: 20px 18px 32px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
  }

  .media-upload {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

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

  .filter-actions {
    margin-left: 0;
  }

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

@media (max-width: 720px) {
  .topbar-title {
    display: none;
  }

  .topbar-actions {
    gap: 9px;
  }

  .topbar-link span {
    display: none;
  }

  .user-chip .user-name {
    display: none;
  }

  .user-chip {
    border-left: 0;
    padding-left: 0;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }

  .media-upload {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 16px;
  }

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

  .install-header,
  .install-steps,
  .install-main,
  .install-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .install-card-body,
  .install-hero {
    padding: 22px;
  }

  .install-step span:not(.install-step-dot) {
    display: none;
  }

  .install-step.is-active span:not(.install-step-dot) {
    display: inline;
  }

  .recent-media {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .auth-panel {
    padding: 64px 16px 28px;
  }

  .auth-card {
    padding: 26px 20px;
  }

  .auth-lang {
    top: 18px;
    right: 18px;
  }

  .success-panel,
  .already-panel {
    padding: 36px 20px;
  }
}

/* Products & content tools */
.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.product-cell-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.thumb-sm {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  object-fit: cover;
}

.cover-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cover-field .form-control {
  flex: 1 1 260px;
}

.image-preview {
  margin-top: 10px;
}

.image-preview:empty {
  display: none;
}

.image-preview img {
  width: 200px;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.repeater {
  display: grid;
  gap: 8px;
}

.repeater-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.repeater-row .form-control {
  min-width: 0;
}

.repeater-row .btn {
  padding-left: 8px;
  padding-right: 8px;
}

.richtext {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.richtext-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.richtext-toolbar button {
  min-width: 30px;
  height: 28px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.richtext-toolbar button:hover {
  background: #e2e8f0;
}

.richtext-area {
  min-height: 220px;
  max-height: 520px;
  overflow: auto;
  padding: 14px 16px;
  outline: none;
  font-size: 14px;
  line-height: 1.8;
}

.richtext-area:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}

.richtext-area p {
  margin: 0 0 10px;
}

.richtext-area h3 {
  margin: 16px 0 8px;
  font-size: 17px;
}

.richtext-area ul,
.richtext-area ol {
  margin: 0 0 10px;
  padding-left: 22px;
}

.richtext-source {
  display: none;
}

.media-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.56);
}

.media-picker-panel {
  display: flex;
  flex-direction: column;
  width: min(900px, 100%);
  max-height: 82vh;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.32);
}

.media-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.media-picker-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.media-picker-close:hover {
  color: var(--text);
}

.media-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
  padding: 18px;
  overflow: auto;
}

.media-picker-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.media-picker-item:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.12);
}

.media-picker-item img {
  width: 100%;
  height: 96px;
  border-radius: 7px;
  object-fit: cover;
  background: var(--surface-muted);
}

.media-picker-name {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-picker-empty {
  grid-column: 1 / -1;
  padding: 40px 12px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .repeater-row {
    grid-template-columns: 1fr;
  }

  .media-picker-backdrop {
    padding: 10px;
  }
}

/* Forms & inquiries */
.field-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.field-name {
  font-size: 13px;
  font-weight: 600;
}

.field-meta {
  color: var(--muted);
  font-size: 11px;
}

.data-list {
  display: grid;
}

.data-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.data-row:last-child {
  border-bottom: 0;
}

.data-label {
  color: var(--muted);
  font-size: 12px;
}

.data-value {
  font-size: 14px;
  word-break: break-word;
}

@media (max-width: 720px) {
  .data-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* SEO & AI traffic */
.mono-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

.range-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.range-tab {
  padding: 5px 11px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}

.range-tab:hover {
  color: var(--text);
}

.range-tab.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.legend-dot.is-visits {
  background: var(--accent);
}

.legend-dot.is-bots {
  background: #94a3b8;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 180px;
  padding: 8px 2px 0;
  border-bottom: 1px solid var(--border);
}

.bar-group {
  flex: 1 1 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 100%;
  min-width: 0;
}

.bar {
  width: 100%;
  max-width: 10px;
  border-radius: 3px 3px 0 0;
  transition: opacity 0.15s ease;
}

.bar-visits {
  background: var(--accent);
}

.bar-bots {
  background: #94a3b8;
}

.bar-group:hover .bar {
  opacity: 0.72;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 720px) {
  .bar-chart {
    height: 140px;
  }

  .chart-legend {
    gap: 10px;
  }
}

/* Industry templates */
.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.template-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.template-card.is-active {
  box-shadow: 0 0 0 2px var(--accent), var(--shadow);
}

.template-cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 108px;
  padding: 16px 18px;
  color: #fff;
  overflow: hidden;
}

.template-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 8%, rgba(255, 255, 255, 0.18), transparent 58%);
  pointer-events: none;
}

.template-cover-dot {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1);
}

.template-cover-name {
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.template-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
}

.template-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.template-name {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.template-desc {
  margin: 0;
  min-height: 42px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.template-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 11px;
}

.template-swatches {
  display: inline-flex;
  gap: 4px;
}

.template-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 50%;
}

.template-meta-item {
  white-space: nowrap;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.template-actions form {
  display: inline-flex;
  margin: 0;
}

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

/* Email notifications & backups */
.inline-code {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  word-break: break-all;
}

.mail-template-group {
  margin-bottom: 20px;
}

.mail-template-group:last-child {
  margin-bottom: 0;
}

.mail-template {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
}

.mail-template-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mail-template .form-group {
  margin: 0;
}

.mail-log {
  max-height: 300px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-radius: 10px;
  background: #0f172a;
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
}

@media (max-width: 980px) {
  .mail-template {
    padding: 12px;
  }
}

/* Users, roles & logs */
.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.user-avatar-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.user-cell-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 600;
}

.user-meta {
  color: var(--muted);
  font-size: 11px;
  word-break: break-all;
}

.perm-grid {
  display: grid;
  gap: 12px;
}

.perm-group {
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
}

.perm-group-title {
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 700;
}

.perm-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px 14px;
}

.perm-options .checkbox {
  margin: 0;
}

.log-action {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.log-action-raw {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.log-fields {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  word-break: break-all;
}

.import-errors {
  margin: 6px 0 0;
  padding-left: 18px;
}

.media-thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.inline-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

/* Article language workbench */
.lang-workbench {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lang-tab-form {
  display: inline-flex;
  margin: 0;
}

.lang-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.lang-tab:hover {
  border-color: #cbd5e1;
}

.lang-tab.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.lang-tab.is-missing {
  border-style: dashed;
  color: var(--muted);
}

.lang-tab-state {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.lang-tab-state.is-published {
  color: #047857;
}

.lang-tab-state.is-draft {
  color: #b45309;
}

.lang-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.lang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 380px;
}

/* New page wizard */
.create-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-bottom: 16px;
}

.create-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.create-step i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

.create-step.is-active {
  color: var(--ink);
}

.create-step.is-active i {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.create-step.is-done i {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.create-steps-compact {
  margin-top: -4px;
}

.template-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.template-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.template-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.template-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 132px;
  padding: 16px;
  background: linear-gradient(145deg, #f8fafc, #eef2f7);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.tt-eyebrow {
  width: 42%;
  height: 5px;
  border-radius: 999px;
  background: #cbd5e1;
}

.tt-title {
  width: 76%;
  height: 11px;
  border-radius: 4px;
  background: #94a3b8;
}

.tt-text {
  width: 88%;
  height: 5px;
  border-radius: 999px;
  background: #d7dce5;
}

.tt-actions {
  display: flex;
  gap: 5px;
  margin-top: 3px;
}

.tt-actions i {
  width: 34px;
  height: 12px;
  border-radius: 999px;
  background: #bfdbfe;
}

.tt-actions i + i {
  width: 26px;
  background: #e2e8f0;
}

.tt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: auto;
}

.tt-grid i {
  height: 30px;
  border-radius: 6px;
  background: #e2e8f0;
}

.tt-empty {
  position: absolute;
  inset: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 26px;
  font-weight: 300;
}

.template-thumb-blank .tt-eyebrow,
.template-thumb-blank .tt-title,
.template-thumb-blank .tt-text,
.template-thumb-blank .tt-actions,
.template-thumb-blank .tt-grid {
  display: none;
}

.template-thumb-contact .tt-grid i {
  height: 24px;
}

.template-thumb-contact .tt-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.template-thumb-faq .tt-grid {
  grid-template-columns: 1fr;
}

.template-thumb-faq .tt-grid i {
  height: 12px;
}

.template-thumb-privacy .tt-grid {
  grid-template-columns: 1fr;
}

.template-thumb-privacy .tt-grid i {
  height: 8px;
}

.template-thumb-landing .tt-grid i:first-child {
  grid-column: span 2;
  background: #bfdbfe;
}

.template-card-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px 10px;
}

.template-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.template-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
}

.template-card-icon svg {
  width: 15px;
  height: 15px;
}

.template-card-text {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.template-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 4px 16px 16px;
}

.template-gallery-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.template-gallery-footer strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 13px;
}

.template-gallery-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

/* Create page: selected template + advanced settings */
.selected-template {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #f8fbff;
}

.selected-template-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #dbeafe;
  color: #1d4ed8;
  flex: 0 0 auto;
}

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

.selected-template-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.selected-template-label {
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 600;
}

.selected-template-body strong {
  color: var(--ink);
  font-size: 14px;
}

.selected-template-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.selected-template > .btn {
  margin-left: auto;
  flex: 0 0 auto;
}

.selected-template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.form-advanced {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.form-advanced > summary {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.form-advanced > summary::-webkit-details-marker {
  display: none;
}

.form-advanced > summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}

.form-advanced[open] > summary::after {
  content: "−";
}

.form-advanced > .form-grid {
  padding: 0 14px 16px;
}

/* Collapsible language workbench */
.lang-workbench-details {
  flex: 1 1 100%;
  min-width: 0;
}

.lang-workbench-details > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  cursor: pointer;
  list-style: none;
}

.lang-workbench-details > summary::-webkit-details-marker {
  display: none;
}

.lang-workbench-summary-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.lang-workbench-summary-meta {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.lang-workbench-summary-caret {
  display: inline-flex;
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.lang-workbench-summary-caret svg {
  width: 14px;
  height: 14px;
}

.lang-workbench-details[open] .lang-workbench-summary-caret {
  transform: rotate(180deg);
}

.lang-workbench-details[open] > summary {
  margin-bottom: 10px;
}

.lang-workbench-details[open] .lang-group-actions {
  margin-top: 10px;
}

/* Product create wizard and publish experience */
.product-form-page.has-action-bar {
  padding-bottom: 92px;
}

.product-wizard-steps {
  margin-bottom: 10px;
}

button.create-step {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.product-wizard-hint {
  margin-bottom: 18px;
}

.product-form-page.is-wizard.is-wizard-ready .product-step {
  display: none;
}

.product-form-page.is-wizard.is-wizard-ready .product-step.is-active {
  display: block;
}

.form-subsection-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.product-step-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 20px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

.cover-uploader {
  min-width: 0;
}

.cover-drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  background: var(--surface-muted);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cover-drop:hover,
.cover-drop.is-dragover {
  border-color: #2563eb;
  background: #eff6ff;
}

.cover-drop.has-image {
  border-style: solid;
  border-color: var(--border);
  background: #fff;
}

.cover-drop img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: cover;
}

.cover-drop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.cover-drop-empty strong {
  color: var(--text);
  font-size: 14px;
}

.cover-drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.cover-drop-loading {
  color: var(--muted);
  font-size: 13px;
}

.cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cover-manual {
  margin-top: 12px;
}

.gallery-editor {
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: var(--surface-muted);
}

.gallery-editor.is-dragover {
  border-color: #2563eb;
  background: #eff6ff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  cursor: grab;
}

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

.gallery-item.is-dragging {
  opacity: 0.45;
}

.gallery-item.is-drag-over {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

.gallery-item-index {
  position: absolute;
  top: 6px;
  left: 6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}

.gallery-item-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.68);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.gallery-item-remove:hover {
  background: var(--danger);
}

.gallery-empty {
  padding: 8px 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.gallery-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.product-check-list {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.product-check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  font-size: 13px;
}

.product-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
}

.product-check-list li.is-ok .product-check-icon {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.product-check-list li.is-ok .product-check-icon::before {
  content: "✓";
  font-size: 12px;
  font-weight: 700;
}

.product-check-list li.is-warning .product-check-icon {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.product-check-list li.is-warning .product-check-icon::before {
  content: "!";
  font-size: 12px;
  font-weight: 700;
}

.product-check-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.product-check-note.is-ready {
  color: #047857;
}

.product-publish-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 16px;
}

.product-action-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 248px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.product-action-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.product-action-url {
  max-width: 44vw;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-modal[hidden] {
  display: none;
}

.product-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}

.product-modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  padding: 26px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  overflow: auto;
}

.product-modal-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.product-modal-text {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.product-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.product-modal-actions-wrap {
  justify-content: flex-start;
}

.publish-success-link input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
}

body.product-modal-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .product-action-bar {
    left: 0;
    padding: 10px 18px;
  }

  .product-action-url {
    display: none;
  }
}

@media (max-width: 720px) {
  .product-action-bar {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .product-action-status {
    display: none;
  }

  .product-action-buttons {
    width: 100%;
  }

  .product-action-buttons .btn {
    flex: 1;
  }

  .product-step-nav .btn {
    flex: 1;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  }
}

/* Visitor monitoring */
.visitor-funnel {
  display: grid;
  gap: 14px;
}

.visitor-funnel-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.visitor-funnel-label strong {
  color: var(--text);
  font-size: 13px;
}

.visitor-funnel-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}

.visitor-funnel-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.visitor-funnel-row:nth-child(2) .visitor-funnel-bar span {
  background: linear-gradient(90deg, #0f766e, #2dd4bf);
}

.visitor-funnel-row:nth-child(3) .visitor-funnel-bar span {
  background: linear-gradient(90deg, #b45309, #f59e0b);
}

.visitor-funnel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

/* Inquiry follow-up timeline */
.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.activity-item {
    position: relative;
    padding: 0 0 18px 22px;
    border-left: 1px solid var(--border, #e2e8f0);
    margin-left: 6px;
}

.activity-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.activity-item::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary, #2563eb);
}

.activity-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.activity-content {
    margin-top: 6px;
    color: var(--text, #0f172a);
    line-height: 1.7;
    white-space: pre-wrap;
}

.activity-meta {
    margin-top: 4px;
    color: var(--muted, #64748b);
    font-size: 12px;
}

/* ---------------------------------------------------------------------------
   Beginner-friendly admin shell, dashboard, templates, settings, search
   --------------------------------------------------------------------------- */
[hidden] {
  display: none !important;
}

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.nav-group {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--sidebar-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  list-style: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "+";
  font-size: 14px;
  line-height: 1;
}

.nav-group[open] summary::after {
  content: "–";
}

.nav-group summary:hover {
  background: var(--sidebar-soft);
  color: #fff;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 260px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
}

.topbar-search-icon {
  display: inline-flex;
  color: var(--muted);
}

.topbar-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.topbar-search kbd {
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  font-family: var(--font);
  font-size: 10px;
}

.mode-switch {
  display: inline-flex;
}

.mode-switch-btn {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 28px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
}

.demo-banner-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-banner-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.16);
  color: #facc15;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.demo-banner strong {
  color: #fff;
}

.demo-banner-link {
  color: #93c5fd;
  font-weight: 600;
  white-space: nowrap;
}

.demo-banner-link:hover {
  color: #dbeafe;
}

.beginner-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.65;
}

.beginner-tip .icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.demo-locked .btn.is-disabled,
.demo-locked .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Dashboard */
.dashboard-hero--completion {
  align-items: flex-start;
}

.dashboard-hero-copy {
  min-width: 0;
  flex: 1;
}

.dashboard-eyebrow {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
}

.completion-track {
  width: min(440px, 100%);
  height: 8px;
  margin-top: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.completion-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  transition: width 0.4s ease;
}

.completion-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: #cbd5e1;
  font-size: 12px;
}

.completion-meta strong {
  color: #fff;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.dashboard-hero .btn-primary {
  border-color: #fff;
  background: #fff;
  color: #0f172a;
}

.dashboard-hero .btn-primary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.dashboard-hero .btn-secondary {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dashboard-hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.dashboard-hero .btn-ghost {
  border-color: transparent;
  background: transparent;
  color: #cbd5e1;
}

.dashboard-hero .btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.dashboard-hero-side {
  display: grid;
  gap: 12px;
  min-width: 210px;
  flex-shrink: 0;
}

.hero-side-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.hero-side-item span {
  color: #94a3b8;
  font-size: 11px;
}

.hero-side-item strong {
  color: #fff;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.hero-side-item strong.is-alert {
  color: #fbbf24;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.checklist-body {
  display: grid;
  gap: 8px;
  padding-top: 0;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.checklist-item:hover {
  border-color: #bfdbfe;
  background: var(--accent-soft);
  color: var(--text);
}

.checklist-item.is-done {
  background: var(--surface-muted);
}

.checklist-mark {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  color: #fff;
}

.checklist-mark .icon {
  width: 13px;
  height: 13px;
}

.checklist-item.is-done .checklist-mark {
  border-color: var(--success);
  background: var(--success);
}

.checklist-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.checklist-label {
  font-size: 13px;
  font-weight: 600;
}

.checklist-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.checklist-item.is-done .checklist-label {
  color: var(--muted);
  text-decoration: line-through;
}

.checklist-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.checklist-action .icon {
  width: 13px;
  height: 13px;
}

.recent-list {
  display: grid;
  gap: 0;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.recent-item:last-child {
  border-bottom: 0;
}

.recent-item:hover {
  color: var(--accent);
}

.recent-avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.recent-avatar--page .icon {
  width: 16px;
  height: 16px;
}

.recent-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.recent-title {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-meta {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.health-card {
  overflow: hidden;
}

.health-card > summary {
  list-style: none;
  cursor: pointer;
}

.health-card > summary::-webkit-details-marker {
  display: none;
}

.health-card > summary::after {
  content: "展开";
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.health-card[open] > summary::after {
  content: "收起";
}

/* Templates */
.template-sections {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.template-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.template-actions form {
  margin: 0;
}

.advanced-import {
  margin-top: 20px;
  overflow: hidden;
}

.advanced-import > summary {
  list-style: none;
  cursor: pointer;
}

.advanced-import > summary::-webkit-details-marker {
  display: none;
}

.template-dialog {
  width: min(720px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
}

.template-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(2px);
}

.template-dialog form {
  padding: 24px;
}

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

.template-dialog-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.template-dialog-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.template-dialog-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.template-dialog-close {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.template-dialog-close:hover {
  background: var(--border);
  color: var(--text);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.mode-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.mode-option:hover {
  border-color: #bfdbfe;
}

.mode-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.mode-option input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.mode-option-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.mode-option-body strong {
  font-size: 13px;
}

.mode-option-body span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.mode-impacts {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.mode-impact {
  margin: 0;
}

.template-dialog-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.template-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Settings */
.settings-tabs {
  position: sticky;
  top: 76px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--surface-muted);
}

.settings-tab {
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.settings-tab:hover {
  color: var(--text);
}

.settings-tab.is-active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.settings-locked-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.settings-savebar {
  position: sticky;
  bottom: 16px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(8px);
}

.settings-savebar-note {
  color: var(--muted);
  font-size: 12px;
}

.settings-savebar.is-dirty .settings-savebar-note {
  color: var(--warning);
  font-weight: 600;
}

.settings-savebar-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* Global search */
.find-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.find-form-icon {
  display: inline-flex;
  color: var(--muted);
}

.find-form input {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.find-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.find-suggestion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
}

.find-suggestion:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.find-suggestion .icon {
  width: 13px;
  height: 13px;
}

.find-groups {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.find-list {
  display: grid;
  gap: 0;
}

.find-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.find-item:last-child {
  border-bottom: 0;
}

.find-item:hover {
  color: var(--accent);
}

.find-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.find-item-title {
  font-size: 13px;
  font-weight: 600;
}

.find-item-meta {
  color: var(--muted);
  font-size: 11px;
}

.find-item .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* Toast */
.admin-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.3);
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1180px) {
  .topbar-search {
    width: 190px;
  }

  .topbar-search kbd {
    display: none;
  }
}

@media (max-width: 960px) {
  .topbar-search {
    display: none;
  }

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

  .dashboard-hero-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 720px) {
  .mode-switch-btn span,
  .topbar-link span {
    display: none;
  }

  .dashboard-hero {
    flex-direction: column;
  }

  .dashboard-hero-side {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .settings-tabs {
    position: static;
  }

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

  .settings-savebar {
    position: static;
  }

  .checklist-action {
    display: none;
  }
}

.demo-tour {
  margin-top: 20px;
}

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

.demo-tour-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--text);
}

.demo-tour-item:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.demo-tour-item strong {
  font-size: 13px;
}

.demo-tour-item > span:last-child {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.demo-tour-index {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .demo-tour-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 外观预设库 */

.appearance-gallery-title {
  margin: 20px 0 6px;
  font-size: 14px;
}

.appearance-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 12px 0 22px;
}

.appearance-preset {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.appearance-preset:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.appearance-preset.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.appearance-preset-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: 66px;
  padding: 9px;
  border-radius: calc(var(--preset-radius, 16px) / 2);
  background: var(--surface-muted);
  overflow: hidden;
}

.appearance-preset-head {
  width: 58%;
  height: 7px;
  border-radius: 999px;
  background: var(--preset-primary, #2563eb);
}

.appearance-preset-line {
  width: 78%;
  height: 5px;
  border-radius: 999px;
  background: #cbd5e1;
}

.appearance-preset-line.is-wide {
  width: 92%;
  background: #94a3b8;
}

.appearance-preset-chip {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 36px;
  height: 15px;
  border-radius: calc(var(--preset-radius, 16px) / 3);
  background: var(--preset-secondary, #0f766e);
}

.appearance-preset-name {
  font-size: 13px;
  font-weight: 650;
}

.appearance-preset-desc {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

/* 建站向导 */

.wizard-steps {
  display: flex;
  gap: 28px;
  padding: 4px 0 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.wizard-dot {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.wizard-dot span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
}

.wizard-dot.is-active {
  color: var(--text);
}

.wizard-dot.is-active span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.wizard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.wizard-grid--looks {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.wizard-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.wizard-option input,
.wizard-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wizard-option-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wizard-option:hover .wizard-option-body {
  border-color: var(--accent);
}

.wizard-option input:checked + .wizard-option-body {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.wizard-option-name {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}

.wizard-option-desc {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.wizard-look-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 76px;
  padding: 10px;
  border-radius: calc(var(--look-radius, 16px) / 2);
  background: var(--surface-muted);
  overflow: hidden;
}

.wizard-look-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--look-primary, #2563eb);
  line-height: 1;
}

.wizard-look-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wizard-look-lines i {
  display: block;
  width: 74%;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
}

.wizard-look-lines i:first-child {
  width: 92%;
  background: #94a3b8;
}

.wizard-look-chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 14px;
  border-radius: calc(var(--look-radius, 16px) / 3);
  background: var(--look-secondary, #0f766e);
}

.wizard-blueprint h3 {
  margin: 20px 0 8px;
  font-size: 13px;
}

.wizard-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wizard-pill span {
  display: inline-flex;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  background: var(--surface);
}

.wizard-pill input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}

.wizard-preview {
  margin-top: 24px;
}

.wizard-preview iframe {
  width: 100%;
  height: 460px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.wizard-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.wizard-footer [hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .wizard-preview iframe {
    height: 320px;
  }
}

/* 安装向导实时预览 */
.install-preview {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.install-preview-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}

.install-preview-head strong {
  font-weight: 600;
}

.install-preview-head .text-muted {
  margin-left: auto;
}

.install-preview iframe {
  display: block;
  width: 100%;
  height: 480px;
  border: 0;
  background: #f8fafc;
}

@media (max-width: 720px) {
  .install-preview iframe {
    height: 340px;
  }
}
