/* 贴近 Element Plus 后台布局（参考 Container / 后台模板） */
:root {
  --brand-blue: #005890;
  --brand-orange: #e07810;
  /* 主色沿用品牌蓝，其余交给 Element Plus 默认变量 */
  --el-color-primary: #005890;
  --el-color-primary-light-3: #3d7eab;
  --el-color-primary-light-5: #7eafcd;
  --el-color-primary-light-7: #b8d4e6;
  --el-color-primary-light-8: #cfe2ee;
  --el-color-primary-light-9: #e8f3fa;
  --el-color-primary-dark-2: #00406a;
  --ep-aside-width: 210px;
  --ep-header-height: 60px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
.ep-body {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background: #f0f2f5;
  color: #303133;
  -webkit-font-smoothing: antialiased;
}
[v-cloak] { display: none !important; }

/* ===== 经典左右布局 ===== */
.ep-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: #f0f2f5;
}
.ep-aside {
  width: var(--ep-aside-width);
  flex-shrink: 0;
  background: #304156;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ep-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--ep-header-height);
  padding: 0 16px;
  background: #2b3a4b;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-decoration: none;
  cursor: pointer;
}
.ep-brand:hover { color: #fff; background: #243343; }
.ep-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}
.ep-brand .name { font-size: 15px; font-weight: 600; line-height: 1.2; }
.ep-brand .sub { font-size: 12px; color: #909399; margin-top: 2px; }

.ep-menu {
  border-right: none !important;
  flex: 1;
  overflow-y: auto;
  background: #304156 !important;
}
.ep-menu .el-menu-item {
  height: 50px;
  line-height: 50px;
}
.ep-menu .el-menu-item:hover {
  background: #263445 !important;
}
.ep-menu .el-menu-item.is-active {
  background: #263445 !important;
  color: #409eff !important;
}

.ep-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.ep-header {
  height: var(--ep-header-height);
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 1px 4px rgba(0,21,41,.08);
  z-index: 2;
}
.ep-header-title {
  font-size: 18px;
  font-weight: 500;
  color: #303133;
}
.ep-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ep-user {
  color: #606266;
  font-size: 14px;
}
.ep-main {
  flex: 1;
  padding: 20px;
  background: #f0f2f5;
}

/* ===== 页面常用 ===== */
.ep-hero {
  background: #fff;
  border-radius: 4px;
  padding: 20px 24px;
  margin-bottom: 16px;
  border-left: 4px solid var(--el-color-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.ep-hero h1 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  color: #303133;
}
.ep-hero p {
  margin: 0;
  color: #909399;
  font-size: 14px;
}

.ep-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--el-color-primary);
  line-height: 1.2;
}
.ep-stat-label {
  color: #909399;
  font-size: 13px;
  margin-bottom: 6px;
}

.pkg-card, .tpl-card {
  border: 1px solid #ebeef5;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  display: block;
  color: inherit;
  transition: border-color .2s, box-shadow .2s;
  text-decoration: none;
}
.pkg-card:hover, .tpl-card:hover {
  border-color: var(--el-color-primary);
}
.pkg-card.selected, .tpl-card.selected {
  border-color: var(--el-color-primary);
  box-shadow: 0 0 0 1px var(--el-color-primary);
}
.pkg-cover, .tpl-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #eef5fa;
  overflow: hidden;
}
.pkg-cover img, .tpl-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.pkg-body, .tpl-body { padding: 14px 16px 16px; }
.pkg-cover-editor {
  width: 100%;
  max-width: 480px;
}
.pkg-cover-preview {
  margin-bottom: 12px;
}
.pkg-cover-preview .el-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  background: #f5f7fa;
  overflow: hidden;
}
.pkg-cover-preview .el-image img {
  object-fit: cover !important;
}
.pkg-cover-upload {
  display: block;
}
.pkg-cover-editor .el-upload__tip {
  margin-top: 8px;
  line-height: 1.5;
  white-space: normal;
  color: #909399;
  font-size: 12px;
}

/* 栏目组装器：左目录树 + 右详情 */
.page-assembler {
  display: flex;
  gap: 0;
  border: 1px solid #ebeef5;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  min-height: 420px;
  margin-bottom: 8px;
}
.page-tree-pane {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid #ebeef5;
  background: #fafbfc;
  display: flex;
  flex-direction: column;
}
.page-tree-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #ebeef5;
  font-size: 14px;
}
.page-tree {
  flex: 1;
  padding: 8px 6px;
  overflow: auto;
  background: transparent;
}
.page-tree .el-tree-node__content {
  height: 36px;
  border-radius: 4px;
  margin-bottom: 2px;
}
.page-tree-node {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-right: 4px;
  min-width: 0;
}
.page-tree-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  cursor: text;
}
.page-tree-edit {
  flex: 1;
  min-width: 0;
  height: 26px;
  line-height: 26px;
  padding: 0 6px;
  border: 1px solid var(--el-color-primary);
  border-radius: 4px;
  outline: none;
  font-size: 13px;
  background: #fff;
}
.page-tree-actions {
  display: none;
  flex-shrink: 0;
}
.page-tree .el-tree-node__content:hover .page-tree-actions,
.page-tree .el-tree-node.is-current > .el-tree-node__content .page-tree-actions {
  display: inline-flex;
}
.page-tree-tip {
  padding: 8px 14px 12px;
  font-size: 12px;
  color: #909399;
  border-top: 1px solid #ebeef5;
}
.page-detail-pane {
  flex: 1;
  min-width: 0;
  padding: 16px 20px 20px;
  background: #fff;
}
.page-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f2f5;
}
.page-detail-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.page-detail-title strong {
  font-size: 18px;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-detail-block {
  margin-bottom: 18px;
}
.page-detail-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}
.page-type-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-type-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid #dcdfe6;
  border-radius: 50%;
  background: #fff;
  color: #303133;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.page-type-arrow:hover:not(:disabled) {
  border-color: var(--el-color-primary);
  color: var(--el-color-primary);
}
.page-type-arrow:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.page-type-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
}
.page-type-tabs::-webkit-scrollbar {
  display: none;
}
.page-type-chip {
  flex: 0 0 auto;
  border: 1px solid #dcdfe6;
  background: #fff;
  color: #606266;
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.page-type-chip:hover {
  border-color: var(--el-color-primary);
  color: var(--el-color-primary);
}
.page-type-chip.active {
  border-color: var(--el-color-primary);
  background: var(--el-color-primary);
  color: #fff;
}
.layout-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  padding: 2px;
}
.layout-pick {
  border: 1px solid #ebeef5;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.layout-pick:hover {
  border-color: var(--el-color-primary-light-5);
}
.layout-pick.selected {
  border-color: var(--el-color-primary);
  box-shadow: 0 0 0 1px var(--el-color-primary);
}
.layout-pick-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #f5f7fa;
  overflow: hidden;
}
.layout-pick-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.layout-pick-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c0c4cc;
  font-size: 12px;
  background: linear-gradient(180deg, #eef5fa 0%, #f8fafc 100%);
}
.layout-pick-badge {
  position: absolute;
  top: 8px;
  left: 8px;
}
.layout-pick-body {
  padding: 10px 10px 8px;
}
.layout-pick-name {
  font-size: 13px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.layout-pick-meta {
  font-size: 12px;
  color: #909399;
  line-height: 1.4;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.develop-price-box {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0f7fc 0%, #fff8f0 100%);
  border: 1px solid #e8eef5;
}
.develop-price-value {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 700;
  color: #005890;
}
.develop-price-sub {
  text-align: right;
}
.develop-price-subtotal {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  color: #e07810;
}
.develop-service-note {
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #ebeef5;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.7;
}
.pkg-services {
  margin: 8px 0 0;
  padding: 0 0 0 16px;
  color: #606266;
  font-size: 12px;
  line-height: 1.7;
}
.pkg-services li { list-style: disc; }
.design-mode-switch {
  display: inline-flex;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.design-mode-btn {
  border: 0;
  background: transparent;
  padding: 8px 18px;
  font-size: 13px;
  color: #606266;
  cursor: pointer;
  line-height: 1.4;
}
.design-mode-btn + .design-mode-btn {
  border-left: 1px solid #dcdfe6;
}
.design-mode-btn.active {
  background: #005890;
  color: #fff;
  font-weight: 600;
}
.personalized-type-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}
.personalized-type-item {
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.personalized-type-item:hover {
  border-color: #79a7c7;
}
.personalized-type-item.active {
  border-color: #005890;
  box-shadow: 0 0 0 1px #005890 inset;
  background: #f3f8fc;
}
.personalized-type-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.personalized-type-price {
  color: #e07810;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.personalized-type-note {
  font-size: 12px;
  color: #909399;
  line-height: 1.6;
}
.home-included-tip {
  padding: 16px 18px;
  background: #f5f9fc;
  border: 1px solid #d6e6f2;
  border-radius: 8px;
  color: #4b5563;
  line-height: 1.7;
  font-size: 13px;
}
.home-included-title {
  font-size: 14px;
  font-weight: 600;
  color: #005890;
  margin-bottom: 8px;
}
.home-included-tip p { margin: 0 0 6px; }
.home-included-tip p:last-child { margin-bottom: 0; }
.fee-summary-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 14px;
  background: #fffaf5;
  border: 1px solid #f3e2d0;
  border-radius: 6px;
}
.fee-summary-label {
  font-size: 12px;
  color: #606266;
}
.fee-summary-amount {
  font-size: 16px;
  font-weight: 700;
  color: #e07810;
}
.fee-summary-link {
  border: 0;
  background: transparent;
  color: #005890;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.fee-summary-link:hover { color: #e07810; }
.fee-sidebar-compact {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e4e7ed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fee-sidebar-compact-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: #606266;
}
.fee-sidebar-compact-row strong {
  color: #e07810;
  font-size: 14px;
}
.fee-detail-box {
  border: 1px solid #ebeef5;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
.fee-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.fee-detail-table th {
  background: #f5f7fa;
  color: #909399;
  font-weight: 500;
  text-align: left;
  padding: 5px 10px;
  border-bottom: 1px solid #ebeef5;
  font-size: 11px;
}
.fee-detail-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: middle;
  color: #303133;
  line-height: 1.4;
}
.fee-detail-table tbody tr {
  cursor: pointer;
}
.fee-detail-table tbody tr:hover,
.fee-detail-table tbody tr.current {
  background: #f3f8fc;
}
.fee-detail-table tfoot td {
  background: #fff8f0;
  font-weight: 600;
  border-bottom: none;
  color: #303133;
  padding: 6px 10px;
  font-size: 12px;
}
.fee-detail-name { font-weight: 600; color: #303133; }
.fee-detail-meta { font-size: 11px; color: #909399; }
.fee-detail-price {
  text-align: right !important;
  color: #e07810;
  font-weight: 700;
  white-space: nowrap;
  font-size: 12px;
}

@media (max-width: 900px) {
  .page-assembler {
    flex-direction: column;
    min-height: auto;
  }
  .page-tree-pane {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ebeef5;
    max-height: 240px;
  }
}

.preview-frame {
  min-height: 100vh;
  background: #111;
  color: #fff;
  display: flex;
  flex-direction: column;
}
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
}
.preview-body {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}
.preview-body img { max-width: 100%; border-radius: 4px; }
.preview-body.mobile img { max-width: 390px; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
  padding: 24px;
}
.login-card { width: 100%; max-width: 420px; }
.login-logo { text-align: center; margin-bottom: 8px; }
.login-logo img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
}
.login-logo h1 {
  margin: 12px 0 4px;
  font-size: 22px;
  color: #303133;
}
.login-logo p {
  margin: 0 0 8px;
  color: #909399;
  font-size: 13px;
}

.muted { color: #909399; }
.mb-16 { margin-bottom: 16px; }
.mt-16 { margin-top: 16px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Laravel 分页：改成接近 Element 风格 */
.pagination {
  display: inline-flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 4px;
}
.pagination > li > a,
.pagination > li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  color: #606266;
  background: #fff;
  text-decoration: none;
  font-size: 13px;
}
.pagination > li.active > span,
.pagination > li.active > a {
  background: var(--el-color-primary);
  border-color: var(--el-color-primary);
  color: #fff;
}
.pagination > li.disabled > span {
  color: #c0c4cc;
  background: #f5f7fa;
}

@media (max-width: 768px) {
  .ep-aside { display: none; }
  .ep-main { padding: 12px; }
}
