/* ============================================================
   护航 · PC Admin (Element Admin layout, dark first)
   ============================================================ */

body.pc-page {
  height: 100vh; overflow: hidden;
  background: var(--bg);
}
.pc-shell { display: flex; height: 100vh; }

/* ---------------- sidebar ---------------- */
.pc-side {
  width: 222px; flex: none; background: #070d1e; color: #fff;
  display: flex; flex-direction: column; position: relative; z-index: 20;
  border-right: 1px solid rgba(255,255,255,.06);
}
html[data-theme="light"] .pc-side {
  background: #0a1224;
}
.pc-brand {
  height: 58px; display: flex; align-items: center; gap: 9px; padding: 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.pc-brand .logo {
  width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--primary-2), var(--primary-3));
  font-weight: 800; font-size: 14px; box-shadow: 0 6px 16px rgba(47,107,255,.4);
}
.pc-brand b { font-size: 15px; letter-spacing: .5px; }
.pc-brand span { font-size: 9px; color: rgba(255,255,255,.4); display: block; margin-top: -1px; }

.pc-menu { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.pc-menu::-webkit-scrollbar { width: 0; }
.pc-group { font-size: 10px; color: rgba(255,255,255,.34); padding: 14px 10px 6px; letter-spacing: .5px; }
.pc-menu a {
  display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 11px;
  border-radius: 9px; color: rgba(255,255,255,.66); font-size: 12.5px; margin-bottom: 2px;
  transition: var(--fast); position: relative;
}
.pc-menu a .ico { width: 16px; height: 16px; opacity: .8; }
.pc-menu a:hover { background: rgba(255,255,255,.06); color: #fff; }
.pc-menu a.on { background: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(47,107,255,.3); }
.pc-menu a.on .ico { opacity: 1; }
.pc-menu a .cnt {
  margin-left: auto; font-size: 9px; background: rgba(255,255,255,.14);
  padding: 1px 6px; border-radius: 99px;
}
.pc-menu a.on .cnt { background: rgba(255,255,255,.22); }
.pc-side-foot { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.07); }
.pc-user { display: flex; align-items: center; gap: 8px; }
.pc-user .avatar { width: 30px; height: 30px; }
.pc-user b { font-size: 11.5px; display: block; }
.pc-user span { font-size: 9px; color: rgba(255,255,255,.4); }

/* ---------------- main ---------------- */
.pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-top {
  height: 56px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.pc-crumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.pc-crumb b { color: var(--text); font-weight: 600; }
.pc-search {
  margin-left: 10px; width: 250px; height: 32px; border-radius: 8px; background: var(--input);
  border: 1px solid var(--line); display: flex; align-items: center; gap: 7px; padding: 0 10px;
  color: var(--text-3); font-size: 11.5px;
}
.pc-search .ico { width: 14px; height: 14px; }
.pc-top .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pc-role { font-size: 10.5px; color: var(--text-2); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; }
.pc-content { flex: 1; overflow-y: auto; padding: 18px 20px 26px; }

/* ---------------- page head ---------------- */
.pc-page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.pc-page-head h1 { font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.pc-page-head .sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.pc-page-head .right { margin-left: auto; display: flex; gap: 8px; }
.pc-back {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--text-2);
}
.pc-back:hover { color: var(--text); border-color: var(--line-strong); }

/* ---------------- cards / kpi ---------------- */
.pc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; box-shadow: var(--shadow-sm);
}
.pc-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pc-card-head b { font-size: 13px; font-weight: 600; }
.pc-card-head span { font-size: 10.5px; color: var(--text-3); }
.pc-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.pc-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; position: relative; overflow: hidden; }
.pc-kpi::after {
  content: ""; position: absolute; right: -26px; top: -32px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, var(--primary-soft), transparent 70%);
}
.pc-kpi .lbl { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.pc-kpi .val { font-size: 26px; font-weight: 600; font-family: var(--mono); margin-top: 6px; letter-spacing: -.8px; }
.pc-kpi .foot { font-size: 10px; color: var(--text-3); margin-top: 5px; }
.pc-kpi .foot em { font-style: normal; color: var(--green); }
.pc-kpi .foot em.down { color: var(--red); }

.pc-grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; }
.pc-grid-2b { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; margin-top: 14px; }

/* ---------------- chart ---------------- */
.pc-chart { height: 190px; display: flex; align-items: flex-end; gap: 14px; padding: 10px 6px 0; }
.pc-chart .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; }
.pc-chart .bar {
  width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; position: relative;
  background: linear-gradient(180deg, var(--primary-2), rgba(47,107,255,.25));
  transition: height .4s var(--ease);
}
.pc-chart .bar::after {
  content: attr(data-v); position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  font-size: 9px; color: var(--text-3); font-family: var(--mono); white-space: nowrap;
}
.pc-chart .col span { font-size: 9.5px; color: var(--text-3); }
.pc-chart .bar.alt { background: linear-gradient(180deg, var(--gold), rgba(247,185,85,.2)); }

/* ---------------- table ---------------- */
.pc-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.pc-toolbar .right { margin-left: auto; display: flex; gap: 8px; }
.pc-input, .pc-select {
  height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--input);
  color: var(--text); padding: 0 10px; font-size: 12px; outline: none; min-width: 150px;
}
.pc-input:focus, .pc-select:focus { border-color: var(--primary); }
.pc-btn {
  height: 32px; padding: 0 14px; border-radius: 8px; font-size: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; gap: 6px; transition: var(--fast);
}
.pc-btn:hover { border-color: var(--line-strong); }
.pc-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.pc-btn.primary:hover { background: var(--primary-3); }
.pc-btn.danger { color: var(--red); border-color: rgba(255,92,99,.35); background: rgba(255,92,99,.06); }
.pc-btn.sm { height: 26px; padding: 0 9px; font-size: 11px; border-radius: 6px; }
.pc-btn.link { border: 0; background: none; color: var(--primary); padding: 0 4px; height: 24px; }

.pc-table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pc-table th {
  text-align: left; font-weight: 500; font-size: 11px; color: var(--text-3);
  background: var(--surface-2); height: 40px; padding: 0 12px; white-space: nowrap;
}
.pc-table td { height: 52px; padding: 0 12px; border-top: 1px solid var(--line); color: var(--text); }
.pc-table tbody tr:hover td { background: var(--primary-soft); }
.pc-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pc-table .no { font-family: var(--mono); font-size: 11px; color: var(--text-2); }
.pc-table .op { white-space: nowrap; }
.pc-table .op .pc-btn.link { padding: 0 5px; }
.pc-table .goods { display: flex; align-items: center; gap: 8px; }
.pc-table .goods img { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; }
.pc-table .who { display: flex; align-items: center; gap: 7px; }
.pc-table .who .avatar { width: 26px; height: 26px; }
.pc-empty { padding: 44px 0; text-align: center; color: var(--text-3); font-size: 12px; }

.pc-pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 12px 2px 0; font-size: 11px; color: var(--text-3); }
.pc-pager button {
  min-width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); font-size: 11px;
}
.pc-pager button.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------------- tabs ---------------- */
.pc-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.pc-tabs button {
  height: 38px; font-size: 12.5px; color: var(--text-2); position: relative;
}
.pc-tabs button.on { color: var(--primary); font-weight: 600; }
.pc-tabs button.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--primary); border-radius: 2px;
}
.pc-tabs .cnt { font-size: 9.5px; background: var(--input); border-radius: 99px; padding: 1px 5px; margin-left: 4px; }

/* ---------------- progress / lists ---------------- */
.pc-share-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 11.5px; }
.pc-share-row .nm { width: 92px; color: var(--text-2); }
.pc-share-row .bar { flex: 1; height: 6px; background: var(--input); border-radius: 99px; overflow: hidden; }
.pc-share-row .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary-2), var(--primary)); }
.pc-share-row .pct { width: 40px; text-align: right; font-family: var(--mono); color: var(--text-2); }

.pc-todo { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.pc-todo:last-child { border-bottom: 0; }
.pc-todo .n { width: 30px; height: 30px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.pc-todo .n.hot { background: rgba(255,92,99,.12); color: var(--red); }
.pc-todo b { font-size: 12px; font-weight: 500; }
.pc-todo p { font-size: 10px; color: var(--text-3); margin-top: 2px; }
.pc-todo .v { margin-left: auto; font-family: var(--mono); font-size: 15px; }
.pc-todo .go { color: var(--text-3); }

/* ---------------- detail ---------------- */
.pc-desc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pc-desc .cell { padding: 11px 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pc-desc .cell:nth-child(4n) { border-right: 0; }
.pc-desc .cell .k { font-size: 10px; color: var(--text-3); }
.pc-desc .cell .v { font-size: 12.5px; margin-top: 4px; }
.pc-desc .cell .v.num { font-family: var(--mono); }
.pc-detail-actions { display: flex; gap: 8px; margin-left: auto; }

/* ---------------- timeline ---------------- */
.pc-timeline { padding-left: 16px; position: relative; }
.pc-timeline::before { content:""; position:absolute; left:4px; top:6px; bottom:6px; width:1px; background: var(--line); }
.pc-tl { position: relative; padding-bottom: 14px; }
.pc-tl::before { content:""; position:absolute; left:-16px; top:4px; width:8px; height:8px; border-radius:50%; background:var(--surface); border:2px solid var(--line-strong); }
.pc-tl.on::before { background: var(--primary); border-color: var(--primary); }
.pc-tl b { font-size: 11.5px; }
.pc-tl p { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.pc-tl time { float: right; font-size: 10px; color: var(--text-3); font-family: var(--mono); }

/* ---------------- dialog / drawer ---------------- */
.pc-dialog-mask {
  position: fixed; inset: 0; background: rgba(3,8,20,.6); backdrop-filter: blur(2px);
  z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade .16s ease;
}
.pc-dialog {
  width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
  animation: pop .2s var(--ease);
}
.pc-dialog-hd { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.pc-dialog-hd b { font-size: 14px; }
.pc-dialog-hd .x { margin-left: auto; color: var(--text-3); }
.pc-dialog-bd { padding: 18px 20px; max-height: 66vh; overflow-y: auto; }
.pc-dialog-ft { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.pc-field { margin-bottom: 13px; }
.pc-field label { display: block; font-size: 11px; color: var(--text-2); margin-bottom: 6px; }
.pc-field .pc-input, .pc-field .pc-select { width: 100%; height: 34px; }
.pc-field textarea.pc-input { height: 74px; padding: 9px 10px; resize: none; }
.pc-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------------- merchant ---------------- */
.pc-form-card { max-width: 760px; }
.pc-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.pc-summary-grid .s { background: var(--surface-2); border-radius: 9px; padding: 10px 12px; }
.pc-summary-grid .s span { font-size: 9.5px; color: var(--text-3); }
.pc-summary-grid .s b { display: block; font-size: 16px; font-family: var(--mono); margin-top: 3px; }

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  .pc-side { width: 64px; }
  .pc-brand b, .pc-brand span, .pc-menu a span, .pc-menu .pc-group, .pc-menu a .cnt, .pc-user b, .pc-user span { display: none; }
  .pc-menu a { justify-content: center; padding: 0; }
  .pc-brand { justify-content: center; padding: 0; }
  .pc-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .pc-grid-2, .pc-grid-2b { grid-template-columns: 1fr; }
  .pc-desc { grid-template-columns: repeat(2, 1fr); }
  .pc-desc .cell:nth-child(4n) { border-right: 1px solid var(--line); }
  .pc-desc .cell:nth-child(2n) { border-right: 0; }
}
@media (max-width: 760px) {
  body.pc-page { overflow: auto; height: auto; }
  .pc-side { display: none; }
  .pc-search { display: none; }
  .pc-kpi-grid { grid-template-columns: 1fr 1fr; }
  .pc-content { padding: 14px; }
  .pc-table-wrap { overflow-x: auto; }
  .pc-table { min-width: 860px; }
}

/* embed mode */
html.embed .pc-top .right a[href="index.html"],
html.embed .pc-top .right a[href="mobile.html"] { display: none; }

/* ---------------- customer service ---------------- */
.pc-cs { display: grid; grid-template-columns: 260px minmax(420px, 1fr) 300px; gap: 12px; height: calc(100vh - 170px); min-height: 520px; }
.pc-cs-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.pc-cs-head { height: 48px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.pc-cs-head b { font-size: 12.5px; }
.pc-cs-list { flex: 1; overflow-y: auto; padding: 6px; }
.pc-cs-row { display: flex; align-items: center; gap: 8px; padding: 9px 8px; border-radius: 8px; cursor: pointer; }
.pc-cs-row:hover { background: var(--surface-2); }
.pc-cs-row.on { background: var(--primary-soft); }
.pc-cs-row .avatar { width: 32px; height: 32px; }
.pc-cs-row .nm { font-size: 11.5px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.pc-cs-row .last { font-size: 10px; color: var(--text-3); margin-top: 3px; }
.pc-cs-row .time { font-size: 9px; color: var(--text-3); }
.pc-chat { flex: 1; overflow-y: auto; padding: 14px; background: var(--bg); }
.pc-bubble-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.pc-bubble-row.me { flex-direction: row-reverse; }
.pc-bubble-row .avatar { width: 28px; height: 28px; }
.pc-bubble { max-width: 72%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 11.5px; line-height: 1.6; }
.pc-bubble-row.me .pc-bubble { background: var(--primary); border-color: transparent; color: #fff; }
.pc-bubble time { display: block; font-size: 9px; opacity: .55; margin-top: 4px; }
.pc-chat-input { flex: none; display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.pc-chat-input .pc-input { flex: 1; }
