:root {
  --brand: #0f6b57;
  --brand-2: #18a179;
  --brand-dark: #0b3b32;
  --gold: #c9a25e;
  --bg: #f3f6f5;
  --text: #1f2d2a;
  --muted: #8a9793;
  --line: #e8eeec;
  --el-color-primary: #18a179;
  --el-color-primary-light-3: #56b99a;
  --el-color-primary-light-5: #8acdb7;
  --el-color-primary-light-7: #bce3d6;
  --el-color-primary-light-9: #e9f7f2;
  --el-color-primary-dark-2: #138467;
  --el-border-radius-base: 10px;
  --el-font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body {
  font-family: var(--el-font-family);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
[v-cloak] { display: none; }

/* ---------------- 登录 ---------------- */
.login-page {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1000px 600px at 10% 10%, #144f43 0%, #0a2c26 55%, #071f1b 100%);
  position: relative;
  overflow: hidden;
  padding: 24px;
}
.login-orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .45; }
.orb-a { width: 420px; height: 420px; background: radial-gradient(circle at 30% 30%, #2fc99a, transparent 65%); top: -120px; right: -80px; }
.orb-b { width: 360px; height: 360px; background: radial-gradient(circle at 60% 40%, #c9a25e, transparent 62%); bottom: -140px; left: -80px; opacity: .3; }
.login-card {
  position: relative;
  width: 420px;
  max-width: 100%;
  background: rgba(255,255,255,.98);
  border-radius: 22px;
  padding: 38px 38px 32px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff; font-size: 26px; font-weight: 700; letter-spacing: 1px;
  box-shadow: 0 8px 20px rgba(24,161,121,.35);
  flex: none;
}
.brand-mark.small { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
.login-brand h1 { font-size: 21px; margin: 0 0 2px; letter-spacing: 1px; }
.login-brand p { margin: 0; font-size: 10px; letter-spacing: 2.2px; color: var(--muted); }
.login-card h2 { font-size: 24px; margin: 0 0 6px; }
.login-tip { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.login-btn { width: 100%; height: 46px; font-size: 16px; letter-spacing: 4px; border-radius: 12px; margin-top: 6px; }
.login-foot { text-align: center; color: #a9b4b1; font-size: 12px; margin-top: 22px; }

/* ---------------- 框架 ---------------- */
.shell { height: 100%; }
.sidebar {
  background: linear-gradient(180deg, #0c352d 0%, #0a2a24 100%);
  color: #cfe4dd;
  display: flex;
  flex-direction: column;
  box-shadow: 6px 0 24px rgba(9,40,34,.12);
  z-index: 2;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 22px 20px 18px; }
.side-title { font-size: 16px; font-weight: 600; color: #fff; letter-spacing: .5px; }
.side-sub { font-size: 9px; letter-spacing: 2.4px; color: #6f9c8f; margin-top: 2px; }
.side-menu { border: 0; background: transparent; padding: 6px 10px; flex: 1; }
.side-menu .el-menu-item {
  color: #a9c8be;
  height: 46px;
  margin: 4px 0;
  border-radius: 11px;
  font-size: 14px;
}
.side-menu .el-menu-item .mi {
  width: 26px; display: inline-block; text-align: center; font-size: 15px; opacity: .9;
}
.side-menu .el-menu-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-menu .el-menu-item.is-active {
  background: linear-gradient(90deg, rgba(24,161,121,.95), rgba(24,161,121,.55));
  color: #fff;
  box-shadow: 0 6px 16px rgba(24,161,121,.28);
}
.side-foot { padding: 18px 22px; font-size: 11px; color: #5d837a; line-height: 1.8; }

.topbar {
  height: 74px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.page-title { font-size: 20px; font-weight: 650; letter-spacing: .3px; }
.page-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.top-right { display: flex; align-items: center; gap: 22px; }
.site-link { font-size: 13px; color: var(--brand); text-decoration: none; }
.site-link:hover { text-decoration: underline; }
.admin-chip { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; outline: none; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.caret { color: var(--muted); font-size: 12px; }
.main { padding: 24px 28px 40px; overflow-y: auto; background: var(--bg); }

/* ---------------- 通用面板 ---------------- */
.panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 22px rgba(16,60,50,.045);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head h3 { font-size: 15px; margin: 0; font-weight: 650; }
.muted { color: var(--muted); font-size: 12px; }
.strong { font-weight: 600; }
.money { color: #0f6b57; font-weight: 650; }
.money.big { font-size: 20px; }
.line-through { text-decoration: line-through; }
.grow { flex: 1; }
.thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: #eef3f1; display: block; }
.thumb.sm { width: 38px; height: 38px; border-radius: 8px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar-title { font-size: 15px; font-weight: 650; }
.add-btn { box-shadow: 0 6px 14px rgba(24,161,121,.25); }
.pager { display: flex; justify-content: flex-end; margin-top: 18px; }
.empty-mini { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0; }

/* ---------------- 仪表盘 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 20px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 22px; position: relative; overflow: hidden;
  box-shadow: 0 6px 22px rgba(16,60,50,.045);
}
.stat-card::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px;
  border-radius: 50%; background: #f0f7f4;
}
.stat-card.accent { background: linear-gradient(135deg, #0f6b57, #16876b 55%, #1aa47d); border: 0; color: #fff; }
.stat-card.accent::after { background: rgba(255,255,255,.09); }
.stat-card.accent .stat-label, .stat-card.accent .stat-foot { color: rgba(255,255,255,.72); }
.stat-label { font-size: 13px; color: var(--muted); margin-bottom: 10px; position: relative; z-index: 1; }
.stat-value { font-size: 27px; font-weight: 700; letter-spacing: .3px; position: relative; z-index: 1; }
.stat-foot { font-size: 12px; color: var(--muted); margin-top: 8px; position: relative; z-index: 1; }
.two-col { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; }
.stock-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.stock-row:last-child { border-bottom: 0; }
.stock-info { flex: 1; min-width: 0; }
.stock-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stock-num { font-weight: 700; color: var(--brand); width: 44px; text-align: right; }
.stock-num.danger { color: #e45656; }
.status-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.status-box { display: flex; align-items: center; gap: 11px; background: #f8faf9; border-radius: 12px; padding: 14px 16px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.status-name { font-size: 12px; color: var(--muted); }
.status-count { font-size: 20px; font-weight: 700; margin-top: 2px; }

/* ---------------- 表格/表单 ---------------- */
.el-table { --el-table-border-color: #edf1ef; --el-table-header-bg-color: #f8faf9; --el-table-row-hover-bg-color: #f6fbf9; }
.el-table th.el-table__cell { font-weight: 600; color: #67756f; font-size: 12.5px; }
.el-table td.el-table__cell { font-size: 13px; }
.prod-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.order-item-line { font-size: 12.5px; color: #4c5b56; line-height: 1.65; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .span2 { grid-column: span 2; }
.upload-row { display: flex; gap: 14px; align-items: flex-start; width: 100%; }
.upload-actions { display: flex; flex-direction: column; gap: 9px; }
.cover-preview { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); background: #f2f6f4; }
.banner-thumb { width: 160px; height: 60px; border-radius: 8px; object-fit: cover; display: block; }
.banner-preview { width: 180px; height: 68px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; padding: 0 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--el-color-primary-light-5); color: var(--brand);
  font-size: 13px; background: #f2fbf7; transition: .15s; width: fit-content;
}
.btn-ghost:hover { background: #e5f7f0; }
.gallery-btn { margin-top: 8px; }
.gallery-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.gallery-img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.settings-form { max-width: 760px; margin-top: 8px; }
.setting-remark { line-height: 1.4; margin-top: 3px; }
.settings-actions { padding-left: 150px; margin-top: 10px; }

/* ---------------- 订单详情 ---------------- */
.order-head { display: flex; align-items: center; justify-content: space-between; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; font-size: 13.5px; }
.detail-grid .span2 { grid-column: span 2; }
.detail-grid .muted { display: inline-block; width: 74px; }
.amount-box { margin-top: 16px; margin-left: auto; width: 320px; font-size: 13px; }
.amount-box > div { display: flex; justify-content: space-between; padding: 6px 0; color: #5b6a65; }
.amount-box .pay-line { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; color: var(--text); font-size: 15px; }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .two-col { grid-template-columns: 1fr; }
  .status-strip { grid-template-columns: repeat(3,1fr); }
}
