/* C&D ClotheWear 梦衣服饰 - 现代企业级中控台样式规范 (基于 Slate / Blue 视觉体系) */
:root {
  --el-color-primary: #2563eb;
  --el-color-primary-light: #eff6ff;
  --el-color-success: #10b981;
  --el-color-warning: #f59e0b;
  --el-color-danger: #ef4444;
  --el-color-info: #64748b;
  --cd-brand-dark: #2c2623;
  --cd-brand-gold: #8c6d46;
  --el-bg-page: #f8fafc;
  --el-bg-card: #ffffff;
  --el-text-main: #0f172a;
  --el-text-regular: #334155;
  --el-text-secondary: #64748b;
  --el-border-color: #cbd5e1;
  --el-border-lighter: #e2e8f0;
  --el-border-subtle: #f1f5f9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--el-bg-page);
  color: #1e293b;
  font-size: 14px;
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
}

/* 整体全屏应用壳体布局 */
.admin-layout { display: flex; width: 100%; height: 100vh; overflow: hidden; }
.admin-sidebar {
  width: 256px;
  background-color: #111827;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
  z-index: 10;
}
.sidebar-brand {
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
}
.sidebar-brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  margin-right: 12px;
  background: #0b0f19;
  border: 1px solid rgba(217, 179, 124, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.sidebar-brand-title { color: #ffffff; font-size: 18px; font-weight: 700; line-height: 1.25; }
.sidebar-brand-sub { color: #94a3b8; font-size: 12px; margin-top: 2px; }

.sidebar-menu {
  padding: 24px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-item {
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.18s ease;
}
.sidebar-item .nav-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}
.sidebar-item:hover { background-color: #1e293b; color: #ffffff; }
.sidebar-item.active {
  background-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgba(30, 58, 138, 0.28);
}
.sidebar-footer { padding: 16px 24px; border-top: 1px solid #1e293b; font-size: 12px; color: #64748b; }

/* 右侧主内容区 */
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; height: 100vh; overflow-y: auto; background: var(--el-bg-page); }
.admin-header {
  height: 80px;
  background: #ffffff;
  border-bottom: 1px solid var(--el-border-lighter);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-title { font-size: 20px; font-weight: 700; color: #1e293b; }
.status-pill {
  padding: 4px 12px;
  background-color: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background-color: #10b981; margin-right: 8px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.admin-content { padding: 32px; flex: 1; }

/* 卡片容器 (rounded-2xl + subtle slate border & shadow) */
.el-card {
  background: var(--el-bg-card);
  border: 1px solid var(--el-border-subtle);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.el-card.section-card-active { border-color: var(--el-color-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--el-border-subtle);
}
.card-title { font-size: 16px; font-weight: 700; color: var(--el-text-main); }
.card-sub { font-size: 13px; color: var(--el-text-secondary); margin-top: 4px; }

/* 数据看板 KPI 卡片 Grid (对标 code_artifact.html) */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 24px; }
.kpi-card {
  background: #ffffff;
  border: 1px solid var(--el-border-subtle);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
}
.kpi-top-bar { position: absolute; top: 0; left: 0; width: 100%; height: 4px; background-color: #3b82f6; }
.kpi-top-bar.is-emerald { background-color: #10b981; }
.kpi-top-bar.is-amber { background-color: #f59e0b; }
.kpi-top-bar.is-slate { background-color: #1e293b; }
.kpi-label { font-size: 14px; color: #64748b; margin-bottom: 16px; font-weight: 500; }
.kpi-value-row { display: flex; align-items: baseline; margin-bottom: 8px; }
.kpi-value { font-size: 36px; font-weight: 700; color: #0f172a; line-height: 1.1; }
.kpi-unit { font-size: 18px; color: #94a3b8; margin-left: 8px; font-weight: 400; }
.kpi-badge {
  font-size: 13px;
  color: #d97706;
  margin-left: 8px;
  background-color: #fffbeb;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #fef3c7;
  font-weight: 500;
}
.kpi-sub { font-size: 13.5px; color: #64748b; margin-top: 4px; }

/* 按钮、表单与 Element Plus 滑动开关 (el-switch) */
.el-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--el-border-lighter);
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  transition: all 0.15s ease;
}
.el-btn:hover { background-color: #f8fafc; border-color: #cbd5e1; color: #0f172a; }
.el-btn-soft { background-color: #f8fafc; border-color: #e2e8f0; color: #334155; }
.el-btn-soft:hover { background-color: #f1f5f9; }
.el-btn-primary {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}
.el-btn-primary:hover { background-color: #1d4ed8; border-color: #1d4ed8; color: #ffffff; }
.el-btn-success { background-color: var(--el-color-success); border-color: var(--el-color-success); color: #ffffff; }
.el-btn-success:hover { background-color: #059669; border-color: #059669; color: #ffffff; }
.el-btn-warning { background-color: var(--el-color-warning); border-color: var(--el-color-warning); color: #ffffff; }
.el-btn-danger { background-color: var(--el-color-danger); border-color: var(--el-color-danger); color: #ffffff; }
.el-btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 6px; }

.el-input, .el-select, .el-textarea {
  width: 100%;
  padding: 7px 11px;
  font-size: 13.5px;
  color: var(--el-text-main);
  background-color: #ffffff;
  border: 1px solid var(--el-border-lighter);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.el-input:focus, .el-select:focus, .el-textarea:focus {
  border-color: var(--el-color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.el-switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; font-size: 12.5px; color: var(--el-text-regular); }
.el-switch input { display: none; }
.el-switch-core { width: 38px; height: 20px; background: #cbd5e1; border-radius: 999px; position: relative; transition: background 0.2s; flex-shrink: 0; }
.el-switch-core::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #ffffff; transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.el-switch input:checked + .el-switch-core { background: var(--el-color-success); }
.el-switch input:checked + .el-switch-core::after { transform: translateX(18px); }

/* 表格与标签 */
.el-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.el-table th, .el-table td { padding: 12px 12px; text-align: left; border-bottom: 1px solid var(--el-border-subtle); vertical-align: middle; }
.el-table th { background-color: #f8fafc; color: #475569; font-weight: 600; font-size: 12.5px; }
.el-table tr:hover td { background-color: #f8fafc; }

.el-tag { display: inline-block; padding: 2px 9px; font-size: 12px; font-weight: 500; border-radius: 6px; border: 1px solid #bfdbfe; background-color: #eff6ff; color: #2563eb; margin-right: 4px; margin-bottom: 2px; }
.el-tag-success { background: #ecfdf5; border-color: #a7f3d0; color: #059669; }
.el-tag-warning { background: #fffbeb; border-color: #fde68a; color: #d97706; }
.el-tag-danger { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.el-tag-info { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }

/* 弹窗与手机实时预览器 */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-box { background: #ffffff; border-radius: 16px; width: 1260px; max-width: 97vw; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25); }
.modal-header { padding: 16px 24px; border-bottom: 1px solid var(--el-border-lighter); display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 700; }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--el-border-lighter); display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.preview-sticky-wrap { width: 376px; flex-shrink: 0; position: sticky; top: 96px; }
.phone-shell { width: 100%; border: 10px solid #1e293b; border-radius: 34px; background: #faf8f5; overflow: hidden; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14); }
.phone-status-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px 6px; background: #2c2623; color: #f5efe6; font-size: 11px; font-weight: 600; }
.wx-capsule { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.28); border-radius: 999px; padding: 1px 9px; font-size: 10px; }
.phone-scroll-body { max-height: 620px; overflow-y: auto; scroll-behavior: smooth; }
.preview-focus-block { position: relative; transition: box-shadow 0.2s, transform 0.2s; }
.preview-focus-block.is-focused { box-shadow: 0 0 0 2px #2563eb; border-radius: 8px; }
.preview-focus-badge { position: absolute; top: 6px; right: 6px; background: #2563eb; color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 999px; z-index: 5; font-weight: 600; }
.preview-disabled-mask { opacity: 0.45; filter: grayscale(0.4); }
.toast-container { position: fixed; top: 20px; right: 24px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.toast-msg { padding: 12px 20px; border-radius: 10px; background: #ffffff; border-left: 4px solid var(--el-color-success); box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12); font-size: 13.5px; font-weight: 500; }

/* 页面装修分页面顶部选项导航 (Segmented Card Tabs) */
.page-tabs-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.page-tab-card { background: #ffffff; border: 1px solid var(--el-border-lighter); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: all 0.18s ease; display: flex; flex-direction: column; gap: 3px; position: relative; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03); }
.page-tab-card:hover { border-color: #93c5fd; background: #f8fafc; transform: translateY(-1px); }
.page-tab-card.is-active { border-color: #2563eb; background: #eff6ff; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12); }
.page-tab-card.is-active::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: #2563eb; }
.tab-title-line { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: #1e293b; }
.page-tab-card.is-active .tab-title-line { color: #1d4ed8; }
.tab-sub-text { font-size: 11px; color: #64748b; margin-left: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 楼层与区域左上角标记 (A区、B区、C区...) 位于左上角，彻底避免遮挡右侧按钮 */
.zone-badge { position: absolute; top: 4px; left: 6px; background: rgba(220, 38, 38, 0.92); color: #ffffff; font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 4px; letter-spacing: 0.5px; z-index: 10; box-shadow: 0 2px 5px rgba(220, 38, 38, 0.3); border: 1px solid rgba(255, 255, 255, 0.85); pointer-events: none; line-height: 1.2; }
.zone-badge-left { display: inline-flex; align-items: center; gap: 4px; background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; padding: 1px 7px; border-radius: 4px; font-size: 12px; font-weight: 700; margin-right: 6px; }
.bn-row-active { background: #f0f7ff !important; }
.scroll-fade-edge { -webkit-mask-image: linear-gradient(to right, #000 86%, transparent 100%); mask-image: linear-gradient(to right, #000 86%, transparent 100%); }
.elastic-press { transition: transform 0.14s cubic-bezier(0.2,0.9,0.4,1); }
.elastic-press:active { transform: scale(0.965); }
