/* ============================================================
   AURÉLIE 管理后台样式
   主色：深墨绿 #0C1F1A · 金 #C6A15B · 底色 #F6F4EF
   ============================================================ */

:root {
  --ink: #0C1F1A;
  --ink-2: #2C3A34;
  --muted: #7E7A6E;
  --line: #E7E2D6;
  --bg: #F6F4EF;
  --card: #FFFFFF;
  --gold: #C6A15B;
  --gold-soft: #F1E7D2;
  --green: #2E6B4F;
  --danger: #A44A3F;
  --warn: #B8862F;
  --radius: 6px;
}

* { box-sizing: border-box; }

body.adm {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans SC", -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
code {
  background: #F1EEE6;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- 侧边栏 ---------- */
.adm-side {
  background: var(--ink);
  color: #E8E3D6;
  display: flex;
  flex-direction: column;
  padding: 26px 0 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.adm-brand {
  padding: 0 22px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 14px;
}
.adm-logo {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 23px;
  letter-spacing: .22em;
  color: #F3E9D2;
}
.adm-logo-sub {
  display: block;
  margin-top: 6px;
  font-size: 9px;
  letter-spacing: .28em;
  color: var(--gold);
  opacity: .85;
}

.adm-nav { display: flex; flex-direction: column; padding: 0 10px; gap: 2px; }
.adm-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 4px;
  color: #CFC9BA;
  font-size: 13.5px;
  transition: background .15s, color .15s;
}
.adm-nav a svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.adm-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.adm-nav a.on { background: rgba(198, 161, 91, .16); color: #F2E3C4; }
.adm-nav a.on svg { opacity: 1; color: var(--gold); }
.adm-badge {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.adm-side-foot {
  margin-top: auto;
  padding: 16px 22px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #9B9789;
}
.adm-side-foot a:hover { color: #F2E3C4; }
.adm-logout { color: #C9A6A0; }

/* ---------- 主区域 ---------- */
.adm-main {
  padding: 26px 32px 40px;
  min-width: 0;
}

.adm-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.adm-title {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .01em;
}
.adm-sub { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.adm-top-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.adm-foot {
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: #A9A497;
  letter-spacing: .04em;
}

/* ---------- 提示条 ---------- */
.adm-flash {
  border-radius: var(--radius);
  padding: 11px 16px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid;
}
.adm-flash.is-ok { background: #EFF6F1; border-color: #CDE2D5; color: #2C6B4C; }
.adm-flash.is-error { background: #FBEDEA; border-color: #E7C9C3; color: var(--danger); }
.adm-flash.is-info { background: #F4F1E8; border-color: #E3DAC4; color: #7A6432; }

.adm-hint-card {
  background: #FFFDF6;
  border: 1px solid #EBE1C9;
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 12.5px;
  line-height: 1.8;
  color: #6E6449;
  margin-bottom: 18px;
}
.adm-hint { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 10px 0 0; }

/* ---------- 统计卡 ---------- */
.adm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.adm-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adm-stat-label { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.adm-stat-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: .01em;
}
.adm-stat-foot { font-size: 11.5px; color: #A9A497; }
.adm-stat-foot a { color: var(--gold); }
.adm-stat-foot a:hover { text-decoration: underline; }

/* ---------- 卡片 / 栅格 ---------- */
.adm-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 18px;
  align-items: start;
}
.adm-grid-form { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.adm-grid-order { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.adm-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.adm-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 0;
}
.adm-card-flush { padding: 0; overflow: hidden; }
.adm-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.adm-card-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .02em;
}
.adm-empty { color: var(--muted); font-size: 13px; padding: 22px 0; text-align: center; }
.adm-muted { color: var(--muted); font-size: 12px; }
.adm-link { color: #9A7B35; font-size: 12.5px; }
.adm-link:hover { text-decoration: underline; }

/* ---------- 图表 ---------- */
.adm-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 160px;
  padding-top: 8px;
}
.adm-bar-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}
.adm-bar {
  width: 100%;
  max-width: 38px;
  background: linear-gradient(180deg, #C6A15B, #A9853F);
  border-radius: 2px 2px 0 0;
  transition: height .3s ease;
}
.adm-bar-wrap:hover .adm-bar { background: linear-gradient(180deg, #0C1F1A, #2C4A3C); }
.adm-bar-count { font-size: 11px; color: var(--muted); }
.adm-bar-label { font-size: 10.5px; color: #A9A497; }

/* ---------- 列表 ---------- */
.adm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.adm-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.adm-list li:last-child { border-bottom: none; }
.adm-list img {
  width: 38px; height: 38px;
  object-fit: cover;
  border-radius: 3px;
  background: #F1EEE6;
}
.adm-list div { display: flex; flex-direction: column; min-width: 0; }
.adm-list strong { font-size: 13px; font-weight: 600; }
.adm-list .adm-tag, .adm-list > li > .adm-muted:last-child { margin-left: auto; }
.adm-list > li > .adm-muted:last-child { font-size: 11.5px; }

.adm-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #CFC9BA;
  flex: none;
}
.adm-dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(46, 107, 79, .12); }

.adm-timeline { list-style: none; margin: 0; padding: 0 0 0 2px; }
.adm-timeline li {
  display: flex;
  gap: 12px;
  padding: 0 0 16px;
  position: relative;
}
.adm-timeline li::before {
  content: "";
  position: absolute;
  left: 3.5px; top: 14px; bottom: 0;
  width: 1px;
  background: var(--line);
}
.adm-timeline li:last-child::before { display: none; }
.adm-timeline .adm-dot { margin-top: 6px; }
.adm-timeline div { display: flex; flex-direction: column; gap: 2px; }
.adm-timeline strong { font-size: 13px; }
.adm-timeline p { margin: 0; font-size: 12px; }

/* ---------- 标签 ---------- */
.adm-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
  background: #F1EEE6;
  color: #7A7568;
  white-space: nowrap;
}
.adm-tag.is-ok { background: #E9F3EC; color: #2C6B4C; }
.adm-tag.is-warn { background: #FBF1DC; color: var(--warn); }
.adm-tag.is-danger { background: #FBEDEA; color: var(--danger); }
.adm-tag.is-gold { background: var(--gold-soft); color: #8A6E2E; }

.adm-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 20px;
  color: var(--c, #7A7568);
  background: color-mix(in srgb, var(--c, #7A7568) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--c, #7A7568) 28%, #fff);
  white-space: nowrap;
}

/* ---------- 表格 ---------- */
.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--muted);
  background: #FAF8F3;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.adm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F2EEE5;
  vertical-align: middle;
}
.adm-table tbody tr:hover { background: #FCFBF7; }
.adm-table tbody tr:last-child td { border-bottom: none; }
.adm-table-tight td, .adm-table-tight th { padding: 9px 12px; }
.adm-card-flush .adm-table th:first-child, .adm-card-flush .adm-table td:first-child { padding-left: 20px; }
.adm-card-flush .adm-table th:last-child, .adm-card-flush .adm-table td:last-child { padding-right: 20px; }
.ta-right { text-align: right; }
.adm-total-row td { font-weight: 700; background: #FAF8F3; }

.adm-prod-cell { display: flex; align-items: center; gap: 10px; }
.adm-prod-cell img {
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: 3px;
  background: #F1EEE6;
  flex: none;
}
.adm-prod-cell div { display: flex; flex-direction: column; }
.adm-prod-cell strong { font-size: 13px; }

/* ---------- 筛选栏 ---------- */
.adm-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.adm-filter input, .adm-filter select {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  min-width: 140px;
}
.adm-filter input:focus, .adm-filter select:focus { outline: 2px solid rgba(198, 161, 91, .35); border-color: var(--gold); }
.adm-summary-line { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }

.adm-pager { display: flex; gap: 6px; padding: 14px 20px; border-top: 1px solid var(--line); }
.adm-pager a {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.adm-pager a:hover { border-color: var(--gold); }
.adm-pager a.on { background: var(--ink); color: #F3E9D2; border-color: var(--ink); }

/* ---------- 按钮 ---------- */
.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.adm-btn:hover { border-color: #C9BFA8; background: #FCFAF5; }
.adm-btn-primary { background: var(--ink); color: #F3E9D2; border-color: var(--ink); }
.adm-btn-primary:hover { background: #143027; border-color: #143027; color: #fff; }
.adm-btn-danger { color: var(--danger); border-color: #E7C9C3; background: #FDF7F5; }
.adm-btn-danger:hover { background: #FBEDEA; border-color: #D9AFA6; }
.adm-btn-sm { height: 28px; padding: 0 9px; font-size: 12px; }
.adm-btn-block { width: 100%; }
.adm-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.adm-inline-form { display: inline-block; }

/* ---------- 表单 ---------- */
.adm-form { display: flex; flex-direction: column; gap: 12px; }
.adm-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.adm-field > span { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.adm-field > small { font-size: 11.5px; color: #A9A497; }
.adm-field input[type="text"],
.adm-field input[type="email"],
.adm-field input[type="password"],
.adm-field input[type="number"],
.adm-field input:not([type]),
.adm-field select,
.adm-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  line-height: 1.5;
}
.adm-field textarea { resize: vertical; }
.adm-field input:focus, .adm-field select:focus, .adm-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 161, 91, .14);
}
.adm-field input[type="file"] { font-size: 12px; }
.adm-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.adm-err { color: var(--danger); font-size: 11.5px; font-style: normal; }

.adm-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.adm-check input { width: 15px; height: 15px; accent-color: #2E6B4C; }

.adm-mini-input {
  width: 56px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: #F7F5EF;
  text-align: center;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
}
.adm-mini-input:hover { border-color: var(--line); }
.adm-mini-input:focus { outline: none; border-color: var(--gold); background: #fff; }

.adm-dl { margin: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 12px; font-size: 12.5px; }
.adm-dl dt { color: var(--muted); }
.adm-dl dd { margin: 0; word-break: break-word; }

.adm-thumb {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
  background: #FAF8F3;
  width: 96px;
}
.adm-thumb img { width: 100%; display: block; border-radius: 2px; }

/* ---------- 登录页 ---------- */
body.adm-login-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 120% at 50% 0%, #14312A 0%, #0C1F1A 55%, #081512 100%);
  font-family: "Noto Sans SC", -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  padding: 24px;
}
.adm-login {
  width: 100%;
  max-width: 380px;
  background: #FCFBF7;
  border-radius: 8px;
  padding: 34px 32px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
}
.adm-login-brand { text-align: center; margin-bottom: 22px; }
.adm-login .adm-logo { color: var(--ink); font-size: 25px; }
.adm-login .adm-logo-sub { color: #A08A5F; }
.adm-login h1 { font-size: 17px; margin: 0 0 4px; text-align: center; font-weight: 700; }
.adm-login-hint { text-align: center; font-size: 12px; color: var(--muted); margin: 0 0 20px; }
.adm-login form { display: flex; flex-direction: column; gap: 14px; }
.adm-login .adm-field > span { font-size: 12px; }
.adm-login .adm-field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.adm-login .adm-field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198, 161, 91, .16); }
.adm-login .adm-btn { height: 42px; margin-top: 4px; }
.adm-login-foot {
  margin: 20px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: #A9A497;
  line-height: 1.9;
}
.adm-login-foot a { color: #9A7B35; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-grid-2, .adm-grid-form, .adm-grid-order { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  body.adm { grid-template-columns: minmax(0, 1fr); }
  .adm-side {
    position: static;
    height: auto;
    flex-direction: column;
    padding: 16px 0 10px;
  }
  .adm-brand { padding: 0 18px 12px; border-bottom: none; margin-bottom: 6px; }
  .adm-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
    padding: 0 12px 8px;
  }
  .adm-nav a { white-space: nowrap; padding: 8px 10px; }
  .adm-side-foot { flex-direction: row; gap: 16px; padding: 8px 18px 0; border-top: none; }
  .adm-main { padding: 18px 16px 32px; }
  .adm-title { font-size: 18px; }
  .adm-field-row { grid-template-columns: minmax(0, 1fr); }
  .adm-grid-2 { gap: 12px; }
  .adm-chart { height: 130px; }
}
