/* ========== 象上飞资源平台 · 全局样式 ========== */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --success: #059669;
  --success-bg: #ecfdf5;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f3f4f6;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { line-height: 1.3; }
.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12.5px; }
.text-danger { color: var(--danger); }

/* ========== 通用组件 ========== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: 8px;
  padding: 9px 18px; font-size: 14px; cursor: pointer; font-family: inherit;
  transition: all .15s; background: #fff; color: var(--text); border-color: var(--border);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-warn { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.btn-warn:hover { background: #d97706; border-color: #d97706; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; display: block; }
.btn-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }

.input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff;
  min-height: 42px; box-sizing: border-box;
}
/* 下拉框与输入框统一高度、统一视觉（去原生外观 + 自定义箭头） */
select.input, select.input-sm {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}
select.input::-ms-expand { display: none; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }
/* 注册验证码表单：宽屏横排（按钮与输入框底部对齐），窄屏纵排全宽 */
.reg-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.reg-row .form-group { flex: 1 1 220px; margin-bottom: 0; }
@media (max-width: 860px) {
  .reg-row { flex-direction: column; align-items: stretch; gap: 0; }
  .reg-row .form-group { flex: 0 0 auto; margin-bottom: 14px; }
  .reg-row .btn { width: 100%; }
}
.form-tip { font-size: 12.5px; color: var(--muted); margin-top: 10px; text-align: center; }

.flash {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px;
}
.flash-success { background: var(--success-bg); color: var(--success); border: 1px solid #a7f3d0; }
.flash-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecaca; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.badge-renting { background: #eff6ff; color: #2563eb; }
.badge-overdue { background: var(--danger-bg); color: var(--danger); }
.badge-returned { background: var(--success-bg); color: var(--success); }
.badge-cancelled { background: #f3f4f6; color: var(--muted); }
.badge-pay_pending { background: var(--warning-bg); color: var(--warning); }
/* 挂账（未付款）系列：醒目底色 + 加粗，便于三端一眼识别、后续追款 */
.badge-credit_pending,
.badge-unpaid_assigned,
.badge-unpaid_assigned_overdue {
  background: #fee2e2; color: #b91c1c; font-weight: 700;
  box-shadow: 0 0 0 1px #fca5a5 inset;
}
.badge-unpaid_assigned,
.badge-unpaid_assigned_overdue { background: #dc2626; color: #fff; box-shadow: none; }
.badge-returned_unpaid { background: #dc2626; color: #fff; box-shadow: none; }
.badge-unpaid_assigned_overdue { background: #7f1d1d; }
.unpaid-flag {
  display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px;
  background: #fee2e2; color: #b91c1c; font-size: 12px; font-weight: 700;
}
/* 逾期催收行（账号租期已过） */
.row-overdue > td { background: #fef2f2; }
.row-overdue > td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.row-unpaid > td { background: #fff5f5; }
.badge-on { background: var(--success-bg); color: var(--success); }
.badge-off { background: #f3f4f6; color: var(--muted); }
.badge-as-pending { background: var(--warning-bg); color: var(--warning); }
.badge-as-processing { background: #eff6ff; color: #2563eb; }
.badge-as-completed { background: var(--success-bg); color: var(--success); }
.badge-role-admin { background: #fef2f2; color: #dc2626; }
.badge-role-after_sale { background: var(--warning-bg); color: var(--warning); }
.badge-role-user { background: #eff6ff; color: #2563eb; }

.stock { font-size: 13px; font-weight: 600; }
.stock-ok { color: var(--success); }
.stock-warn { color: var(--warning); }
.stock-out { color: var(--danger); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 10px 12px; font-size: 12.5px; color: var(--muted);
  border-bottom: 2px solid var(--border); font-weight: 600;
}
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafafa; }
.inline-form { display: inline; }
.op-cell { white-space: nowrap; }
.op-cell .btn { margin-right: 4px; }

.summary-rows { margin-top: 10px; }
.summary-row {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.summary-row b { min-width: 0; overflow-wrap: anywhere; text-align: right; }
/* 订单详情/网格子项允许收缩，防移动端被长文本撑破横向溢出 */
.order-detail-grid > div, .order-layout > div, .dashboard-grid > div { min-width: 0; }
.summary-row:last-child { border-bottom: none; }
.summary-row span { color: var(--muted); }
.summary-row.total { font-size: 16px; }
.summary-row.total b { color: var(--primary); font-size: 19px; }

.tip-box {
  background: var(--primary-light); border-radius: 8px; padding: 12px 14px;
  font-size: 13.5px; margin-top: 14px; color: #3730a3;
}
.tip-box.warn { background: var(--warning-bg); color: #92400e; }

.empty-state { text-align: center; padding: 50px 20px; position: relative; overflow: hidden; }
.empty-icon { font-size: 44px; margin-bottom: 12px; }
.empty-state p { color: var(--muted); margin-bottom: 16px; }
.empty-state::after {
  content: ""; position: absolute; right: 30px; bottom: 4px;
  width: 92px; height: 128px; pointer-events: none;
  background: url("/static/img/mascot_sit.png") no-repeat center bottom / contain;
  filter: drop-shadow(0 3px 6px rgba(17,24,39,.10));
}
@media (max-width: 640px) {
  .empty-state::after { width: 60px; height: 84px; right: 10px; }
}

/* 视图切换 tab（我的订单 / 账号明细） */
.view-tabs {
  display: flex; gap: 8px; margin-bottom: 16px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 5px;
}
.view-tab {
  flex: 1; text-align: center; padding: 9px 10px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none;
}
.view-tab:hover { background: var(--bg); color: var(--text); }
.view-tab.active { background: var(--primary); color: #fff; }

/* 小型统计卡组 */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-box {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 2px;
}
.stat-box span { color: var(--muted); font-size: 12.5px; }
.stat-box b { font-size: 20px; }

/* ========== 顾客端 ========== */
.shop-nav {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { font-size: 20px; font-weight: 800; color: var(--text); }
.nav-links { display: flex; gap: 22px; font-size: 14px; }
.nav-links a { color: var(--text); font-weight: 500; }
.nav-links a:hover { color: var(--primary); }
.nav-admin { color: var(--muted) !important; }

.shop-main { padding: 26px 20px 60px; min-height: calc(100vh - 160px); }
.hero { text-align: center; padding: 30px 0 26px; }
.hero h1 { font-size: 32px; letter-spacing: 1px; }
.hero p { color: var(--muted); margin-top: 8px; font-size: 15px; }
.hero p.hero-sub { font-size: 13.5px; }

.filter-bar { padding: 14px 16px; }
.filter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-form input[type=text] { flex: 1; }
.filter-form select { width: 150px; }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px;
}
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; margin-bottom: 0; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.09); }
.product-card { transition: all .18s; }
.product-emoji {
  font-size: 52px; text-align: center; padding: 30px 0;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
}
.product-emoji.big { font-size: 64px; border-radius: 10px; margin-bottom: 14px; }
.product-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: 12px; color: var(--primary); font-weight: 600; }
.product-name { font-size: 15.5px; margin: 4px 0 6px; }
.product-desc { font-size: 12.5px; color: var(--muted); flex: 1; }
.product-desc-full { color: var(--muted); font-size: 14px; margin: 8px 0 14px; }
.product-meta { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 10px; }
.price { font-size: 20px; font-weight: 800; color: var(--danger); }
.price span { font-size: 12px; font-weight: 400; color: var(--muted); }
.deposit { font-size: 12px; color: var(--muted); }
.product-foot { display: flex; align-items: center; justify-content: space-between; }

.order-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; align-items: stretch; }
.product-summary { position: sticky; top: 78px; display: flex; flex-direction: column; height: 100%; }
.product-summary .product-img.big { flex: 1 1 auto; min-height: 200px; aspect-ratio: auto; }
.order-card h3 { margin-bottom: 18px; }
.price-preview {
  background: #fafafa; border-radius: 10px; padding: 6px 16px; margin-bottom: 16px;
}

.success-card { max-width: 560px; margin: 20px auto; text-align: center; }
.success-mascot { width: 120px; height: auto; margin: 4px auto -6px; display: block;
  filter: drop-shadow(0 8px 16px rgba(90, 80, 180, .18));
  animation: gzBob 3.2s ease-in-out infinite; }
@keyframes gzBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.success-icon { font-size: 54px; }
.success-order-no { color: var(--muted); margin: 8px 0 18px; }
.success-detail { text-align: left; background: #fafafa; border-radius: 10px; padding: 6px 18px; margin-bottom: 6px; }
.success-card .btn-row { margin-top: 20px; }

.query-card { max-width: 620px; margin: 0 auto 20px; }
.query-card h2 { margin-bottom: 6px; }
.query-form { display: flex; gap: 10px; margin-top: 14px; }

.order-item { padding: 18px 22px; }
.order-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.order-no { font-family: ui-monospace, monospace; font-weight: 700; font-size: 14px; }
.order-item-body { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.order-item-product { display: flex; align-items: center; gap: 14px; }
.order-emoji { font-size: 34px; }
.order-product-name { font-weight: 600; font-size: 15px; }
.order-item-right { text-align: right; display: flex; align-items: center; gap: 14px; }
.order-amount { font-size: 18px; font-weight: 800; color: var(--primary); }

.order-detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.ticket-item { border-top: 1px solid var(--border); padding: 14px 0; }
.ticket-item:first-of-type { border-top: none; }
.ticket-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; flex-wrap: wrap; gap: 6px; }

.shop-footer {
  background: #fff; border-top: 1px solid var(--border);
  padding: 18px 0; text-align: center; font-size: 13px; color: var(--muted);
}
/* ICP 备案号（底部悬挂，链接工信部备案管理系统） */
.icp-line { margin-top: 6px; font-size: 12.5px; }
.icp-line a, .login-icp a { color: #6b7280; text-decoration: none; }
.icp-line a:hover, .login-icp a:hover { color: var(--primary); text-decoration: underline; }
.login-icp {
  position: fixed; left: 0; right: 0; bottom: 10px;
  text-align: center; font-size: 12px; color: #9aa1ad; z-index: 5;
}

/* ========== 管理端 ========== */
.admin-body { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: #111827; color: #d1d5db; flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-logo {
  padding: 20px; font-size: 17px; font-weight: 800; color: #fff;
  border-bottom: 1px solid #1f2937; flex-shrink: 0;
}
.sidebar-user { padding: 14px 20px; border-bottom: 1px solid #1f2937; flex-shrink: 0; }
.sidebar-user-name { color: #fff; font-weight: 700; font-size: 14px; }
.sidebar-user-level { color: #9ca3af; font-size: 12px; margin-top: 2px; }
.section-title { font-size: 15px; font-weight: 700; margin: 20px 0 12px; }

.role-checks { display: flex; gap: 12px; flex-wrap: wrap; }
.role-check {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
  font-size: 14px; font-weight: 500;
}
.role-check small { color: var(--muted); font-weight: 400; }
.role-check:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }

.login-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 13px; }
.nav-user { color: var(--text); font-size: 14px; font-weight: 600; }

.member-new-form { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto; gap: 10px; }
.member-item { border-top: 1px solid var(--border); padding: 14px 0; }
.member-item:first-of-type { border-top: none; }
.member-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.member-edit-form { display: grid; grid-template-columns: 1.2fr 1.2fr .8fr 1.4fr auto auto; gap: 8px; }
@media (max-width: 900px) {
  .member-new-form, .member-edit-form { grid-template-columns: 1fr 1fr; }
}

/* ========== 公告强制弹窗（小黑板样式） ========== */
.ann-overlay {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .72);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: annFade .2s ease;
}
@keyframes annFade { from { opacity: 0; } to { opacity: 1; } }
.ann-modal {
  position: relative;
  max-width: 720px; width: 100%;
  max-height: 92vh; overflow: visible;
  /* 木框 */
  background: linear-gradient(150deg, #f3c88d 0%, #dda468 35%, #c08447 70%, #a76c36 100%);
  border-radius: 16px;
  padding: 17px;
  box-shadow: 0 24px 64px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.35);
  text-align: center;
}
.ann-board {
  /* 黑板面 */
  background:
    radial-gradient(120% 90% at 30% 15%, rgba(255,255,255,.06), transparent 55%),
    radial-gradient(100% 100% at 80% 90%, rgba(255,255,255,.04), transparent 60%),
    linear-gradient(165deg, #2c463f 0%, #233b35 55%, #1e332e 100%);
  border-radius: 5px;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.25), inset 0 0 26px rgba(0,0,0,.3);
  padding: 36px 44px 30px;
  min-height: 340px;
  max-height: calc(92vh - 34px); overflow-y: auto;
}
.ann-tag {
  display: inline-block;
  color: #ffd98a; font-size: 14px; font-weight: 700;
  letter-spacing: 1px; padding: 5px 18px; margin-bottom: 16px;
  border: 1.5px dashed rgba(255,217,138,.75); border-radius: 22px;
  text-shadow: 0 0 6px rgba(255,217,138,.25);
}
.ann-title {
  font-size: 25px; margin-bottom: 18px; color: #f7f4e8;
  text-shadow: 0 0 1px rgba(255,255,255,.6), 0 2px 3px rgba(0,0,0,.3);
  letter-spacing: .5px;
}
.ann-title::after {
  content: ""; display: block; width: 72px; height: 3px; margin: 13px auto 0;
  background: linear-gradient(90deg, transparent, rgba(247,244,232,.85), transparent);
  border-radius: 3px;
}
.ann-image {
  max-width: 100%; max-height: 50vh; object-fit: contain;
  border: 4px solid rgba(247,244,232,.92); border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.35); margin-bottom: 18px;
  background: #fff;
}
.ann-content {
  text-align: left; font-size: 16.5px; line-height: 2;
  color: #eef0e6; text-shadow: 0 0 1px rgba(255,255,255,.35);
  border: 1.5px dashed rgba(238,240,230,.4); border-radius: 8px;
  padding: 18px 24px; margin-bottom: 8px;
  word-break: break-word;
}
.ann-count { margin-top: 18px; color: rgba(238,240,230,.78); font-size: 14.5px; }
.ann-count-num {
  display: inline-block; min-width: 38px; padding: 3px 9px;
  color: #ffd98a; border: 2px solid rgba(255,217,138,.85); border-radius: 50%;
  font-weight: 800; font-size: 18px; text-shadow: 0 0 4px rgba(255,217,138,.3);
}
.ann-mascot {
  position: absolute; right: -66px; bottom: -52px; width: 200px;
  pointer-events: none; z-index: 2;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
}
@media (max-width: 720px) {
  .ann-mascot { width: 118px; right: -16px; bottom: -40px; }
  .ann-modal { padding: 12px; }
  .ann-board { padding: 22px 20px 18px; min-height: 0; }
  .ann-title { font-size: 20px; }
  .ann-content { font-size: 15px; line-height: 1.9; padding: 14px 16px; }
}
.sidebar-nav { padding: 14px 10px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sidebar-nav a { flex-shrink: 0; }
/* 侧栏细滚动条 */
.sidebar-nav::-webkit-scrollbar, .side-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(17,24,39,.14); border-radius: 3px; }
.sidebar-nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.side-nav { scrollbar-width: thin; scrollbar-color: rgba(17,24,39,.14) transparent; }
.sidebar-nav a {
  display: block; padding: 10px 14px; border-radius: 8px; color: #d1d5db;
  font-size: 14px; margin-bottom: 4px;
}
.sidebar-nav a:hover { background: #1f2937; color: #fff; }
.sidebar-nav a.active { background: var(--primary); color: #fff; }
.sidebar-foot { padding: 16px; border-top: 1px solid #1f2937; font-size: 13px; flex-shrink: 0; }
.sidebar-foot a { display: block; color: #9ca3af; padding: 4px 0; }
.sidebar-foot a:hover { color: #fff; }

.admin-main { flex: 1; padding: 26px 30px 60px; min-width: 0; }
.page-title { font-size: 22px; margin-bottom: 20px; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-head .page-title { margin-bottom: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-card { margin-bottom: 0; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 27px; font-weight: 800; margin: 6px 0 2px; }
.stat-sub { font-size: 12.5px; color: var(--muted); }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dashboard-grid .card h3, .card h3 { margin-bottom: 12px; font-size: 16px; }

.low-stock-list { display: flex; flex-direction: column; gap: 8px; }
.low-stock-item {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px;
  background: var(--warning-bg); border-radius: 8px; font-size: 14px;
}
.low-stock-item span:first-child { flex: 1; }

.rate-bar {
  position: relative; width: 110px; height: 18px; background: #f3f4f6;
  border-radius: 10px; overflow: hidden;
}
.rate-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #818cf8); border-radius: 10px; }
.rate-bar span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text);
}

.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 7px 16px; border-radius: 20px; font-size: 13.5px; color: var(--text);
  background: #fff; border: 1px solid var(--border);
}
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.form-card { max-width: 720px; }
.form-card h2 { margin-bottom: 18px; }

.ticket-card { padding: 18px 22px; }
.ticket-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 6px 0 8px; }
.ticket-desc { font-size: 14px; background: #fafafa; padding: 10px 14px; border-radius: 8px; }
.ticket-form { display: flex; gap: 10px; margin-top: 12px; align-items: center; }
.ticket-form .input[type=text] { flex: 1; }

/* ========== 登录页 ========== */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: linear-gradient(135deg, #4f46e5, #7c3aed);
}
.login-card { width: 380px; text-align: center; }
.login-logo { font-size: 46px; }
.login-card h2 { margin: 10px 0 20px; }
.login-back { display: block; margin-top: 16px; font-size: 13px; color: var(--muted); }
.login-mascot {
  position: fixed; right: 6vw; bottom: 0; width: min(330px, 26vw);
  pointer-events: none; z-index: 1;
  filter: drop-shadow(0 12px 26px rgba(0,0,0,.32));
  animation: mascotIn .5s ease;
}
@keyframes mascotIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 900px) { .login-mascot { display: none; } }

/* ========== 个人中心密码卡小象 ========== */
.pw-card { position: relative; overflow: hidden; }
.pw-card .pw-mascot {
  position: absolute; right: 34px; bottom: 0; height: 92%; max-height: 350px;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(17,24,39,.12));
}
@media (max-width: 860px) { .pw-card .pw-mascot { display: none; } }

/* ========== 响应式 ========== */
@media (max-width: 860px) {
  .order-layout, .order-detail-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-summary { position: static; }
  .form-row { flex-direction: column; gap: 0; }
  .filter-form { flex-wrap: wrap; }
  .hero h1 { font-size: 25px; }
}

/* 商品图片 */
.product-img { width: 100%; aspect-ratio: 4/3; border-radius: 10px 10px 0 0;
  background-size: cover; background-position: center; background-color: #f3f4f6; }
.product-img.big { aspect-ratio: 16/10; border-radius: 10px; margin-bottom: 12px; }
/* 营业执照缩略图：完整显示（不裁剪），超出部分等比缩小居中 */
.product-img.big.lic-thumb { background-size: contain; background-repeat: no-repeat;
  background-color: #f8f9fb; border: 1px solid var(--border); }
.img-preview { width: 96px; height: 72px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border); }
.img-preview-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }

/* 优惠券 */
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-blue { background: #eff6ff; color: #2563eb; }
.coupon-badge-fixed { background: #fef2f2; color: #dc2626; }
.coupon-badge-percent { background: #eff6ff; color: #2563eb; }
.coupon-badge-deposit { background: var(--warning-bg); color: var(--warning); }
.coupon-leader-list { display: flex; flex-direction: column; gap: 8px;
  max-height: 220px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: 8px; padding: 12px; }
.summary-row.discount b { color: var(--danger); }
.empty-hint { color: var(--muted); padding: 18px 4px; font-size: 14px; }
.text-muted { color: var(--muted); font-size: 12px; }

/* 售后疑难延期 + 我的订单表格 */
.badge-as-delayed { background: #fdf2f8; color: #db2777; }
.my-orders-table th { white-space: nowrap; }
.my-orders-table td { vertical-align: middle; }
.order-product-link { color: var(--text); text-decoration: none; font-weight: 600; }
.order-product-link:hover { color: var(--primary); }

/* 工单结果右下角弹窗 */
.notice-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; max-width: 320px; }
.notice-toast { background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.15); padding: 14px; animation: notice-in .3s ease; }
@keyframes notice-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.notice-toast-head { font-weight: 700; font-size: 14px; margin-bottom: 8px; color: var(--primary); }
.notice-toast-body { font-size: 13px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.notice-toast-note { background: var(--bg, #f6f7f9); border-radius: 8px; padding: 8px 10px; }

/* 紧凑表格 */
.compact-card { padding: 10px 12px; }
.table-compact th, .table-compact td { padding: 7px 10px; font-size: 13px; white-space: nowrap; }
.input-sm { padding: 6px 10px; font-size: 13px; width: auto; min-width: 110px; }

/* 分类管理 */
.cat-manage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.cat-chip { font-size: 13px; padding: 4px 12px; }
.cat-new-form { display: inline-flex; gap: 6px; align-items: center; }

/* 商城分区展示 */
.cat-section { margin-bottom: 26px; }
.cat-section-title { font-size: 18px; margin: 18px 0 12px; padding-left: 10px;
  border-left: 4px solid var(--primary); }

/* =========================================================
   UI 2.0 · 视觉升级 + 电脑/手机双端适配
   ========================================================= */
:root {
  --radius-lg: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, .07);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .12);
  --grad-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --grad-soft: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* 移动端底部安全区 */
body::after { content: ""; display: block; height: env(safe-area-inset-bottom); }

/* ---------- 卡片 ---------- */
.card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(229, 231, 235, .7);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card h2 { font-size: 18px; letter-spacing: -.2px; }
.card h3 { font-size: 15.5px; }
.page-title { font-size: 21px; font-weight: 800; letter-spacing: -.3px; }

/* ---------- 按钮 ---------- */
.btn { border-radius: var(--radius-sm); font-weight: 600; letter-spacing: .1px; }
.btn-primary {
  background: var(--grad-primary);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(79, 70, 229, .28);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(79, 70, 229, .32); }
.btn-lg { border-radius: 12px; font-weight: 700; }
.btn-sm { border-radius: 8px; }

/* ---------- 表格 ---------- */
.table th {
  background: #fafbfc;
  letter-spacing: .2px;
  white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
.table tr:hover td { background: #fafbff; }
.table td { padding: 11px 12px; }
.table-compact th { border-bottom: 1px solid var(--border); }

/* ---------- 徽章 ---------- */
.badge { border-radius: 999px; padding: 3px 11px; letter-spacing: .2px; }

/* ---------- 商城顶栏 ---------- */
.shop-nav {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(16, 24, 40, .05);
}
.logo {
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 19px; letter-spacing: -.3px;
}
.nav-links a {
  padding: 8px 14px; border-radius: 999px; transition: all .16s;
}
.nav-links a:hover { background: var(--primary-light); color: var(--primary); }
.nav-links .nav-user {
  background: #f3f4f6; border-radius: 999px; padding: 6px 14px; font-size: 13px;
}

/* ---------- Hero ---------- */
.hero { padding: 40px 0 30px; }
.hero h1 {
  font-size: 34px; font-weight: 800; letter-spacing: -.5px;
  background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { font-size: 15px; }

/* ---------- 商品卡 ---------- */
.product-grid { gap: 20px; }
.product-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-name { font-weight: 700; font-size: 15.5px; }
.product-cat { letter-spacing: .3px; }
.price { font-size: 21px; letter-spacing: -.3px; }

/* ---------- 管理端侧边栏 ---------- */
.sidebar {
  background: linear-gradient(180deg, #111827 0%, #1a2337 100%);
  border-right: 1px solid #1f2937;
}
.sidebar-logo {
  background: var(--grad-primary); -webkit-background-clip: text; background-clip: text;
  color: transparent; font-size: 16px; letter-spacing: -.2px;
}
.sidebar-nav a { transition: background .15s, color .15s; }
.sidebar-nav a.active { background: var(--grad-primary); box-shadow: 0 2px 10px rgba(79, 70, 229, .35); }
.admin-main { background: #f5f6f8; }
.stat-card { border-radius: var(--radius-lg); }
.stat-value { letter-spacing: -.5px; }

/* ---------- 商城左侧常驻功能栏 ---------- */
/* 等高对齐：侧栏拉伸到与右侧内容等高；页面很长时由 max-height 收成一屏并继续吸顶 */
.shop-shell { display: flex; gap: 22px; align-items: stretch; padding-top: 22px; }
.nav-user-box { display: flex; align-items: center; gap: 10px; }
.side-nav {
  width: 196px; flex: 0 0 196px; position: sticky; top: 78px;
  max-height: calc(100vh - 96px);
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 12px; box-shadow: var(--shadow-sm);
}
/* 底部填充区：公告 + 客服，吃掉剩余高度，避免左侧留白 */
.side-fill {
  flex: 1 0 auto; display: flex; flex-direction: column; gap: 10px;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border);
}
.mini-card {
  background: #fafbff; border: 1px solid #e0e7ff; border-radius: 11px;
  padding: 10px 11px; font-size: 12.2px; line-height: 1.6;
}
.mini-card .mc-t {
  font-size: 11.5px; font-weight: 700; color: var(--primary);
  letter-spacing: .4px; margin-bottom: 6px;
}
.mini-card .mc-line { color: var(--text); }
.mini-card .mc-line b { font-weight: 700; }
.mini-card .mc-dim { color: var(--muted); font-size: 11.8px; }
.mini-card .sn-item {
  color: var(--muted); padding: 4px 0; border-top: 1px dashed #e5e7eb;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mini-card .sn-item:first-of-type { border-top: none; }
.mini-card .sn-date { color: #a5b4fc; font-size: 11px; margin-right: 5px; }
.mini-card.contact { background: #f8fafc; border-color: var(--border); flex: 1; }
.mini-card.contact .mc-t { color: var(--text); }
.kf-btn {
  display: block; width: 100%; margin-top: 8px; padding: 6px 0;
  border: none; border-radius: 8px; background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.kf-btn:hover { background: var(--primary-dark); }

/* 账号明细：批量续费工具条 */
.renew-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
  padding: 14px 16px; margin-top: 14px;
  border-left: 4px solid var(--primary);
}
.renew-bar .rb-left { display: flex; flex-direction: column; gap: 2px; }
.renew-bar .rb-title { font-weight: 700; font-size: 15px; }
.renew-bar .rb-item { display: flex; flex-direction: column; gap: 4px; }
.renew-bar .rb-item label { font-size: 12px; color: var(--muted); }
.renew-bar .btn { min-width: 130px; }
.renew-bar .btn:disabled { opacity: .45; cursor: not-allowed; }
.side-nav-title {
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  letter-spacing: 1px; padding: 2px 12px 8px;
}
.side-nav a {
  display: block; padding: 10px 12px; margin-bottom: 2px; border-radius: 10px;
  color: var(--text); font-size: 14px; font-weight: 500; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.side-nav a:hover { background: var(--primary-light); color: var(--primary); }
.side-nav a.active {
  background: var(--grad-primary); color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, .28);
}
.side-nav a.side-logout {
  color: var(--muted); margin-top: 8px; padding-top: 12px;
  border-top: 1px solid var(--border); border-radius: 0 0 10px 10px;
}
.shop-main { flex: 1; min-width: 0; }

/* ---------- 移动端顶栏 & 抽屉（管理/售后共用） ---------- */
.app-topbar {
  display: none;
  position: sticky; top: 0; z-index: 60;
  align-items: center; gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #111827 0%, #1a2337 100%);
  color: #fff;
}
.app-topbar .tb-title { font-weight: 700; font-size: 15px; flex: 1; }
.menu-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid #2b3548;
  background: rgba(255, 255, 255, .07); color: #fff; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.drawer-overlay {
  display: none; position: fixed; inset: 0; background: rgba(15, 17, 21, .55);
  z-index: 55; backdrop-filter: blur(2px);
}
.drawer-overlay.show { display: block; }

/* 商城端汉堡按钮 */
.nav-toggle { display: none; }

/* 注册验证码：结果卡 */
.code-result {
  text-align: center;
  background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
  border: 1px solid #e0e7ff;
}
.code-caption { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.code-value {
  font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 42px; font-weight: 800; letter-spacing: 6px; line-height: 1.2;
  background: var(--grad-primary); -webkit-background-clip: text; background-clip: text;
  color: transparent; padding: 10px 0; user-select: all;
}

/* 筛选表单：标签 + 控件成组，移动端不被挤压 */
.filter-group { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
.filter-group .fg-label, .filter-group .fg-sep {
  flex: 0 0 auto; white-space: nowrap; font-size: 12px; color: var(--muted);
}
.filter-group .input, .filter-group select { flex: 1 1 110px; min-width: 100px; }

/* 付款弹窗底部操作栏：移动端吸底 */
.pay-actions {
  position: sticky; bottom: -24px; background: #fff;
  padding: 10px 0 0; margin-top: 14px;
  border-top: 1px solid var(--border);
}

/* =========================================================
   响应式：平板 & 手机
   ========================================================= */
@media (max-width: 1080px) {
  .container { padding: 0 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  /* 通用：卡片留白收窄、标题缩小 */
  .card { padding: 16px 14px; border-radius: 14px; margin-bottom: 14px; }
  .page-head { flex-wrap: wrap; gap: 10px; align-items: flex-start; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; padding: 6px 12px; }
  .btn-lg { min-height: 48px; width: 100%; }
  .btn-block { width: 100%; }
  .btn-row .btn, .btn-row form { flex: 1 1 auto; }
  .btn-row .btn { text-align: center; }
  .input, .input-sm { font-size: 16px; }         /* 防止 iOS 自动缩放 */
  .input-sm { font-size: 14px; }
  .filter-form { flex-wrap: wrap; gap: 8px; }
  .filter-form .input, .filter-form select { width: 100%; flex: 1 1 100%; }
  .filter-form .btn { flex: 0 0 auto; }
  .compact-card { padding: 8px; }
  .table-compact th, .table-compact td { white-space: nowrap; font-size: 12.5px; padding: 7px 9px; }
  .form-card { max-width: 100%; }
  .hero { padding: 24px 0 18px; }
  .hero h1 { font-size: 25px; }
  .shop-main { padding: 16px 0 40px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .product-body { padding: 12px; }
  .order-layout, .order-detail-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .product-summary { position: static; }
  .success-card, .query-card { max-width: 100%; }
  .ticket-meta { gap: 10px; }
  .summary-row { font-size: 13.5px; }
  .login-card { width: 100%; max-width: 380px; }

  /* 商城顶栏：汉堡按钮 */
  .nav-inner { height: 54px; }
  .nav-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
    background: #fff; font-size: 18px; cursor: pointer; color: var(--text);
  }
  .nav-user-box { font-size: 13px; }

  /* 商城左侧功能栏 → 移动端抽屉 */
  .shop-shell { flex-direction: column; gap: 0; padding-top: 14px; }
  .side-nav {
    position: fixed; top: 54px; left: 0; bottom: 0; width: 74%; max-width: 300px;
    background: #fff; z-index: 60; transform: translateX(-102%);
    transition: transform .22s ease; overflow-y: auto;
    border-radius: 0 16px 16px 0; box-shadow: 8px 0 30px rgba(16, 24, 40, .18);
    display: block; max-height: none;   /* 抽屉内不做等高拉伸 */
  }
  .side-nav.open { transform: none; }
  .side-nav a { padding: 12px 14px; font-size: 15px; }
  .side-fill { flex: none; }
  .mini-card.contact { flex: none; }
  .mini-card { font-size: 13px; padding: 11px 12px; }
  .kf-btn { min-height: 34px; font-size: 13px; }

  /* 管理端：侧边栏变抽屉 + 顶部栏 */
  .app-topbar { display: flex; }
  .admin-body { flex-direction: column; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 78%; max-width: 300px;
    height: 100vh; z-index: 58; transform: translateX(-102%);
    transition: transform .22s ease; box-shadow: 8px 0 30px rgba(16, 24, 40, .2);
  }
  .sidebar.open { transform: none; }
  .admin-main { padding: 14px 12px 40px; }
  .sidebar-nav a { padding: 12px 14px; font-size: 14.5px; }
  .sidebar-foot { display: block; }

  /* 筛选分组：移动端保持「标签 + 输入」一行，不被 100% 拉长 */
  .filter-group { flex: 1 1 100%; }
  .filter-group .input, .filter-group select { flex: 1 1 100px; width: auto; }

  /* 表格横向滚动，不撑破布局 */
  .card { overflow-x: auto; }
  .table { min-width: 620px; }
  .table-compact { min-width: 560px; }
  .op-cell { white-space: normal; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-value { font-size: 22px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 22px; }
  .page-title { font-size: 19px; }
  .card { padding: 14px 12px; }
  .btn { padding: 10px 14px; }
  .notice-wrap { right: 10px; left: 10px; bottom: 10px; max-width: none; }
  .flash { padding: 10px 12px; font-size: 13.5px; }
}

/* ===== 表单错误：居中弹窗 + 字段标记 ===== */
.fg-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fgFade .18s ease;
}
.fg-mask[hidden] { display: none; }
.fg-lock { overflow: hidden; }
.fg-modal {
  background: var(--card, #fff); color: var(--text, #1f2937);
  border-radius: 16px; padding: 28px 26px 22px;
  width: 100%; max-width: 380px; text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  animation: fgPop .22s cubic-bezier(.2, .9, .3, 1.2);
}
.fg-icon {
  width: 52px; height: 52px; margin: 0 auto 12px;
  border-radius: 50%; background: #fee2e2; color: #dc2626;
  font-size: 30px; font-weight: 800; line-height: 52px;
}
.fg-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.fg-msg { font-size: 14.5px; line-height: 1.7; color: var(--muted, #6b7280); margin-bottom: 20px; word-break: break-word; }
.fg-ok { width: 100%; }
.field-error {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12) !important;
}
@keyframes fgFade { from { opacity: 0; } }
@keyframes fgPop { from { opacity: 0; transform: scale(.85) translateY(12px); } }

/* ===== 用户管理：层级堆叠展示 ===== */
.tree-indent { display: inline-flex; align-items: center; gap: 4px; }
.tree-depth-1 { padding-left: 22px; }
.tree-depth-2 { padding-left: 44px; }
.tree-depth-3 { padding-left: 66px; }
.tree-branch { color: var(--muted, #9ca3af); font-weight: 400; }
tr.tree-child td { background: #fafbff; }
tr.tree-child:hover td { background: #f0f4ff; }

/* ===== 团队管理：左侧组织树 + 右侧列表 ===== */
.org-layout { display:flex; gap:16px; align-items:flex-start; }
.org-tree { width:280px; flex:none; padding:12px 10px; }
.org-tree .tree-head { padding:0 6px 10px; border-bottom:1px solid var(--border, #e5e7eb); margin-bottom:8px; }
.org-node { padding:2px; }
.org-node .node-main { display:flex; align-items:center; gap:5px; padding:5px 8px; border-radius:6px;
  color:inherit; text-decoration:none; font-size:13.5px; }
.org-node .node-main:hover { background:#f1f5f9; }
.org-node.active .node-main { background:#e0e7ff; color:#1d4ed8; font-weight:600; }
.org-node .caret { width:12px; color:#94a3b8; cursor:pointer; }
.org-node .dept { font-weight:600; }
.org-node .leader { color:var(--muted, #64748b); font-size:12px; }
.org-node .cnt { margin-left:auto; color:#94a3b8; font-size:11.5px; }
.org-tree .kids { margin-left:14px; border-left:1px dashed var(--border, #e5e7eb); padding-left:4px; }
.tree-foot { margin-top:12px; padding-top:10px; border-top:1px solid var(--border, #e5e7eb); }
.org-main { flex:1; min-width:0; }
.dept-head { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; align-items:flex-start; }
.dept-title { font-size:17px; font-weight:700; }
.dept-sub { color:var(--muted, #64748b); margin-top:5px; font-size:12.5px; }
.dept-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.badge-lv1 { background:#fee2e2; color:#b91c1c; }
.badge-lv2 { background:#eef2ff; color:#4338ca; }
.badge-lv3 { background:#ecfdf5; color:#047857; }
.org-main .path { color:var(--muted, #64748b); font-size:12px; }
.self-row { background:#f5f3ff; }
.tag-self { background:#ede9fe; color:#6d28d9; font-size:11px; padding:1px 6px; border-radius:6px; margin-left:4px; }
.op-cell .op { cursor:pointer; margin-right:6px; color:var(--primary, #4f46e5); }
.op-cell .op.danger { color:#dc2626; }
@media (max-width: 860px) {
  .org-layout { flex-direction: column; }
  .org-tree { width: 100%; }
  /* 竖排后 org-main 的宽度在交叉轴上，min-width:0 不起作用，需显式约束，
     否则被内部宽内容（统计卡/表格）横向撑破整个页面 */
  .org-main { width: 100%; max-width: 100%; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
.stat-box { min-width: 0; }

/* ---------- 日期范围筛选条（收款账号 / 收款明细） ---------- */
.range-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 12px 16px; margin: 0 0 18px;
  background: #f9fafb; border: 1px solid var(--border); border-radius: 10px;
}
.range-bar__label {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap;
}
.range-bar__sep { font-size: 13px; color: var(--muted); }
.range-bar input[type="date"] {
  width: 156px; height: 38px; min-height: 38px; box-sizing: border-box;
  padding: 0 10px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--text); font-size: 13px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.range-bar input[type="date"]:hover { border-color: #cbd5e1; }
.range-bar input[type="date"]:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.range-bar .btn {
  height: 38px; padding: 0 18px; display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 13px; line-height: 1;
}
.range-bar__note {
  flex: 1 1 260px; min-width: 180px;
  font-size: 12px; line-height: 1.55; color: var(--muted);
}
@media (max-width: 720px) {
  .range-bar { padding: 10px 12px; }
  .range-bar input[type="date"] { flex: 1 1 118px; width: auto; }
  .range-bar .btn { padding: 0 14px; }
  .range-bar__note { flex-basis: 100%; }
}

/* 收款账号表格：滚动兜底 + 长文本列可换行，避免操作列被裁切 */
.table-wrap { width: 100%; overflow-x: auto; }
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: #d5d9e0; border-radius: 4px; }
.pay-accounts-table td:nth-child(1),
.pay-accounts-table td:nth-child(2) { white-space: normal; min-width: 120px; }
.pay-accounts-table td:nth-child(4) { white-space: normal; min-width: 80px; }

/* =========================================================
   商城首页 · 精修版（方案 A）
   ========================================================= */

/* ---- 左侧栏：分组标题 / 图标块 / 当前项浅紫底 + 左竖条 ---- */
.side-nav { padding: 12px 10px; }
.side-nav .side-nav-title {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.3px; color: #9aa1ad;
  padding: 2px 9px 9px; text-transform: uppercase;
}
.side-nav a.snav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 9px; margin-bottom: 2px; border-radius: 10px;
  color: var(--text); font-size: 13.5px; font-weight: 500;
  position: relative; transition: background .15s, color .15s; box-shadow: none;
}
.side-nav a.snav-item:hover { background: #f6f7fb; color: var(--text); }
.side-nav a.snav-item.active {
  background: #eef2ff; color: #4338ca; font-weight: 700; box-shadow: none;
}
.side-nav a.snav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--primary);
}
.snav-ico {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px;
  background: #f3f4f8; display: grid; place-items: center;
  font-size: 13px; font-style: normal; line-height: 1;
}
.side-nav a.snav-item.active .snav-ico { background: #e0e7ff; }
.side-nav a.side-logout {
  margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--border);
  border-radius: 0 0 10px 10px; color: var(--muted);
}
.side-nav a.side-logout:hover { background: #fdf2f2; color: var(--danger); }

/* ---- 公告：日期小字在上、标题在下 ---- */
.mini-card .sn-item {
  padding: 7px 0; white-space: normal; overflow: visible; text-overflow: clip;
}
.mini-card .sn-date {
  display: block; font-size: 10.5px; color: #a5b4fc; margin: 0 0 2px; letter-spacing: .2px;
}
.mini-card .sn-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 12px; color: #4b5563; line-height: 1.45;
}
.mini-card.contact {
  background: linear-gradient(160deg, #f5f3ff 0%, #eef2ff 100%);
  border-color: #e4e7fb; border-radius: 12px;
}
.mini-card.contact .mc-t { color: #4338ca; }
.mini-card.contact .kf-btn { border-radius: 9px; }

/* ---- 主区 ---- */
.shop-main { padding: 22px 20px 56px; }
.shop-hero {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 26px 28px 22px; box-shadow: var(--shadow-sm);
}
.shop-hero::after {
  content: ""; position: absolute; right: -70px; top: -110px; width: 340px; height: 340px;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(99,102,241,.16), rgba(139,92,246,.05) 55%, transparent 70%);
}
.shop-hero-mascot {
  position: absolute; right: 34px; bottom: -6px; height: 112%;
  pointer-events: none; z-index: 1;
  filter: drop-shadow(0 4px 10px rgba(17,24,39,.14));
}
.shop-hero h1 {
  position: relative; z-index: 1;
  font-size: 29px; line-height: 1.3; letter-spacing: -.7px; font-weight: 800;
  color: #111827; max-width: 620px;
}
.shop-hero h1 em { font-style: normal; color: var(--primary); }
.shop-hero > p {
  position: relative; z-index: 1;
  font-size: 13px; color: var(--muted); margin-top: 9px; line-height: 1.6;
}
.shop-search {
  position: relative; z-index: 1;
  margin-top: 18px; max-width: 720px;
  display: flex; align-items: center; gap: 8px;
  background: #f6f7fb; border: 1px solid #e9ebf1; border-radius: 12px;
  padding: 5px 5px 5px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.shop-search:focus-within {
  border-color: #d6dcf5; box-shadow: 0 0 0 3px rgba(79,70,229,.08);
}
.shop-search .ss-ico { flex: 0 0 auto; font-size: 14px; opacity: .65; }
.shop-search input {
  flex: 1 1 auto; min-width: 0; padding: 8px 0;
  border: none; background: transparent; outline: none;
  font-size: 14px; font-family: inherit; color: var(--text);
}
.shop-search select {
  flex: 0 0 auto; max-width: 140px; padding: 0 10px;
  border: none; border-left: 1px solid #e3e6ee; background: transparent;
  font-size: 13px; font-family: inherit; color: #4b5563; outline: none; cursor: pointer;
}
.shop-search button {
  flex: 0 0 auto; border: none; cursor: pointer;
  background: var(--grad-primary); color: #fff;
  font-size: 13px; font-weight: 600; font-family: inherit;
  padding: 9px 20px; border-radius: 9px;
  box-shadow: 0 3px 10px rgba(79,70,229,.28);
}
.shop-search button:hover { filter: brightness(1.06); }
.shop-search .ss-clear {
  flex: 0 0 auto; font-size: 12.5px; color: var(--muted);
  text-decoration: none; padding: 0 8px 0 2px;
}
.shop-search .ss-clear:hover { color: var(--primary); }

/* ---- 分类标题 ---- */
.cat-section { margin-bottom: 28px; }
.cat-head { display: flex; align-items: center; gap: 10px; margin: 22px 0 13px; }
.cat-bar { width: 4px; height: 17px; border-radius: 3px; background: var(--grad-primary); }
.cat-head h2 { font-size: 17px; letter-spacing: -.2px; }
.cat-count { font-size: 12px; color: #9aa1ad; }

/* ---- 商品卡 ---- */
.shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.p-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.p-card:hover {
  transform: translateY(-3px); border-color: #dfe3ec;
  box-shadow: 0 12px 28px -8px rgba(15,23,42,.16);
}
.p-cover {
  position: relative; height: 92px; display: grid; place-items: center;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
}
.p-card:nth-child(2n) .p-cover { background: linear-gradient(135deg, #f0f9ff 0%, #eef2ff 100%); }
.p-card:nth-child(3n) .p-cover { background: linear-gradient(135deg, #fdf4ff 0%, #f5f3ff 100%); }
.p-emoji { font-size: 38px; line-height: 1; }
.p-out-badge {
  position: absolute; top: 9px; right: 9px;
  font-size: 10.5px; font-weight: 600; color: #8b95a5;
  background: rgba(255,255,255,.92); border: 1px solid #e8ebf1;
  padding: 3px 8px; border-radius: 999px;
}
.p-body { padding: 13px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.p-type {
  align-self: flex-start; font-size: 10.5px; font-weight: 700; letter-spacing: .3px;
  color: #6366f1; background: #eef2ff; padding: 3px 8px; border-radius: 6px;
}
.p-name { font-size: 14px; font-weight: 700; line-height: 1.42; margin-top: 8px; color: #1f2937; min-height: 40px; }
.p-desc { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 5px; }
.p-price-row { display: flex; align-items: flex-end; gap: 6px; margin-top: 10px; }
.p-price { font-size: 23px; font-weight: 800; letter-spacing: -.8px; color: #e11d48; line-height: 1; }
.p-price i { font-style: normal; font-size: 13px; font-weight: 600; margin-right: 1px; }
.p-price span { font-size: 11.5px; font-weight: 500; color: #9aa1ad; margin-left: 2px; letter-spacing: 0; }
.p-dep { margin-left: auto; padding-bottom: 2px; font-size: 11.5px; color: #9aa1ad; white-space: nowrap; }
.p-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 12px; padding-top: 11px; border-top: 1px dashed #eef0f4;
}
.p-stock {
  font-size: 11.5px; font-weight: 600; color: #059669; background: #ecfdf5;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}
.p-stock.out { color: #94a3b8; background: #f1f5f9; }
.p-btn {
  border: none; cursor: pointer; white-space: nowrap;
  background: var(--grad-primary); color: #fff; text-decoration: none;
  font-size: 12px; font-weight: 600; font-family: inherit;
  padding: 7px 14px; border-radius: 8px;
  box-shadow: 0 3px 9px rgba(79,70,229,.26);
}
.p-btn:hover { filter: brightness(1.06); }
.p-btn.dis { background: #f1f3f7; color: #a8b0bd; box-shadow: none; cursor: not-allowed; }
.p-card.is-out .p-cover { filter: grayscale(.55); opacity: .78; }
.p-card.is-out .p-name { color: #6b7280; }

/* ---- 响应式：桌面 → 平板 → 手机 ---- */
@media (max-width: 1080px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-hero h1 { font-size: 26px; }
}
@media (max-width: 860px) {
  .shop-main { padding: 14px 0 40px; }
  .shop-hero { padding: 20px 18px 16px; border-radius: 16px; }
  .shop-hero-mascot { height: 88%; right: 8px; opacity: .92; }
  .shop-hero h1 { font-size: 22px; line-height: 1.36; letter-spacing: -.3px; }
  .shop-hero > p { font-size: 12.5px; margin-top: 8px; }
  .shop-search { flex-wrap: wrap; padding: 7px 7px 7px 10px; gap: 6px; margin-top: 14px; }
  .shop-search input { flex: 1 1 100%; padding: 7px 0; font-size: 16px; }
  .shop-search .ss-ico { display: none; }
  .shop-search select {
    flex: 1 1 auto; max-width: none; height: 32px; padding: 0 4px; border-left: none;
  }
  .shop-search button { flex: 0 0 auto; padding: 9px 18px; }
  .cat-head { margin: 18px 0 11px; }
  .cat-head h2 { font-size: 16px; }
  .p-cover { height: 78px; }
  .p-emoji { font-size: 32px; }
  .p-body { padding: 11px 12px 12px; }
  .p-name { font-size: 13.5px; min-height: 38px; }
  .p-price { font-size: 21px; }
  .p-btn { padding: 7px 12px; font-size: 11.5px; }
  /* 抽屉里的菜单项保持大点击区 */
  .side-nav a.snav-item { padding: 11px 12px; font-size: 15px; }
  .snav-ico { flex: 0 0 28px; width: 28px; height: 28px; font-size: 14px; }
}
@media (max-width: 480px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shop-hero { padding: 16px 14px 12px; border-radius: 14px; }
  .shop-hero-mascot { display: none; }
  .shop-hero h1 { font-size: 19.5px; line-height: 1.4; }
  .shop-hero > p { font-size: 12px; }
  .shop-search { padding: 6px 6px 6px 9px; gap: 5px; }
  .shop-search select { font-size: 12.5px; height: 30px; }
  .shop-search button { padding: 8px 14px; font-size: 12.5px; }
  .p-cover { height: 70px; }
  .p-emoji { font-size: 28px; }
  .p-body { padding: 10px 10px 11px; }
  .p-type { font-size: 9.5px; padding: 2px 6px; }
  .p-name { font-size: 12.5px; line-height: 1.35; min-height: 34px; margin-top: 6px; }
  .p-price { font-size: 18px; letter-spacing: -.5px; }
  .p-price i { font-size: 11px; }
  .p-price span { font-size: 10px; }
  .p-dep { font-size: 10px; }
  .p-foot { gap: 5px; margin-top: 9px; padding-top: 9px; }
  .p-stock { font-size: 10px; padding: 3px 7px; }
  .p-btn { padding: 6px 9px; font-size: 10.5px; border-radius: 7px; }
}

/* 首页卡片：价格区与底部操作行贴底对齐（不同名称行数也能齐） */
.p-price-row { margin-bottom: 12px; }
.p-foot { margin-top: auto; }
.p-body { flex: 1 1 auto; }

/* 首页补充：平板封面略高、手机搜索栏排布 */
@media (min-width: 861px) and (max-width: 1080px) {
  .p-cover { height: 104px; }
  .p-emoji { font-size: 42px; }
}
@media (max-width: 860px) {
  .shop-search select { flex: 0 1 auto; max-width: 48%; }
  .shop-search button { margin-left: auto; }
}

/* 售罄：底部只保留一个占满宽度的禁用按钮 */
.p-foot .p-btn.dis { flex: 1 1 auto; text-align: center; }

/* =========================================================
   账号资源编辑页：分区卡片（与首页方案 A 同一套视觉语言）
   ========================================================= */
.pf-page { max-width: 880px; }
.pf-top {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.pf-top__title { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.pf-top__sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.pf-card { padding: 0; overflow: hidden; margin-bottom: 14px; }
.pf-sec {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 20px; background: #fafafa;
  border-bottom: 1px solid var(--border);
}
.pf-sec__idx {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px;
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.pf-sec h3 { font-size: 15px; font-weight: 700; }
.pf-sec p { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.pf-body { padding: 18px 20px; }

.pf-grid { display: grid; gap: 14px; }
.pf-grid.g2 { grid-template-columns: 2fr 1fr; }
.pf-grid.g3 { grid-template-columns: repeat(3, 1fr); }

/* 租金概览小卡（权益型） */
.pf-stat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.pf-stat__i {
  background: #f8fafc; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px;
}
.pf-stat__l { font-size: 12px; color: var(--muted); }
.pf-stat__v { font-size: 16px; font-weight: 800; margin-top: 2px; letter-spacing: -.2px; }
.pf-stat__v em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); }

/* 内嵌分组框 */
.pf-box { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: #fff; }
.pf-box + .pf-box { margin-top: 14px; }
.pf-box__t { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.pf-lab { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }

/* 统一租金：金额 + 范围同一行，基线对齐 */
.pf-price { display: flex; gap: 12px; align-items: flex-start; }
.pf-price__in { flex: 0 0 200px; }
.pf-price__scope { flex: 1 1 240px; min-width: 0; }
.pf-price .form-group, .pf-price > div { margin-bottom: 0; }
.pf-price small, .pf-box > small { display: block; margin-top: 10px; line-height: 1.65; }

.pf-lic-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }

/* 底部操作条：吸底，长表单也不用滚回顶部 */
.pf-foot {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 20px; background: #fff;
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 -2px 14px rgba(0, 0, 0, .05);
}
.pf-foot__tip { font-size: 12px; }

@media (max-width: 860px) {
  .pf-grid.g2, .pf-grid.g3 { grid-template-columns: 1fr; }
  .pf-stat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-price { flex-wrap: wrap; }
  .pf-price__in, .pf-price__scope { flex: 1 1 100%; }
}
@media (max-width: 480px) {
  .pf-body { padding: 14px; }
  .pf-sec { padding: 12px 14px; }
  .pf-top__title { font-size: 18px; }
  .pf-stat__v { font-size: 15px; }
  .pf-foot { padding: 10px 14px; }
  .pf-foot .btn { flex: 1 1 auto; text-align: center; }
  .pf-foot__tip { flex: 1 1 100%; text-align: center; }
}

/* =========================================================
   商城首页：左侧功能栏与右侧 Hero 顶部对齐
   （顶部留白统一由 .shop-shell 控制，.shop-main 不再叠加）
   ========================================================= */
.shop-shell { padding-top: 22px; }
.shop-main { padding-top: 0; }
@media (max-width: 860px) {
  .shop-shell { padding-top: 14px; }
  .shop-main { padding-top: 0; }
}

/* =========================================================
   订单 / 账号明细：时间范围筛选 + 导出按钮（用户端、平台端共用）
   ========================================================= */
.fr-sep { flex: 0 0 1px; align-self: stretch; background: var(--border); margin: 0 1px; }
.fr-tilde { align-self: center; font-size: 13px; color: var(--muted); flex: 0 0 auto; }
input[type=date].input-sm { flex: 0 0 auto; width: 150px; }
.btn-export {
  background: var(--success); color: #fff; border-color: var(--success);
  margin-left: auto; white-space: nowrap;
}
.btn-export:hover { background: #047857; border-color: #047857; color: #fff; }
@media (max-width: 860px) {
  .fr-sep { display: none; }
  input[type=date].input-sm, select.input-sm { width: auto; flex: 1 1 46%; min-width: 0; }
  .btn-export { margin-left: 0; flex: 1 1 auto; text-align: center; }
  /* 手机端：筛选 / 重置 / 导出 三个按钮并排一行，不占额外高度 */
  .filter-form .btn { flex: 0 0 auto; }
  .filter-form .btn-export { flex: 1 1 auto; min-width: 0; }
}

/* =========================================================
   商城商品封面：平台名品牌色块（方案 A）
   所有平台名称字号统一，不随内容长短变化
   ========================================================= */
.p-cover.cov-brand {
  display: flex; align-items: center; justify-content: center;
  padding: 0 10px; text-align: center;
}
.cov-brand__t {
  color: #fff; font-weight: 800; font-size: 26px; line-height: 1.18;
  letter-spacing: 2px; text-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  word-break: break-word;
}

/* 占位卡：更多产品类型，敬请期待（每个分区末尾补一格） */
.p-card.p-more {
  border: 1.5px dashed #d4d7de;
  background: repeating-linear-gradient(-45deg, #fafafa 0 12px, #f4f4f6 12px 24px);
  box-shadow: none;
}
.p-card.p-more:hover { transform: none; box-shadow: none; border-color: #c9cdd6; }
.p-more .p-cover {
  flex: 1 1 auto; height: auto; min-height: 92px; background: transparent !important;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.p-more__plus {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px dashed #c7cbd4;
  color: #9ca3af; font-size: 22px; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
}
.p-more__t { font-size: 13.5px; font-weight: 700; color: #6b7280; letter-spacing: 1px; }
.p-more__s { font-size: 11px; color: #a1a5ae; letter-spacing: 3px; }

/* 字号统一：随断点整体缩放，各卡片之间保持一致 */
@media (max-width: 1080px) { .cov-brand__t { font-size: 22px; } }
@media (max-width: 860px)  { .cov-brand__t { font-size: 20px; letter-spacing: 1.5px; } }
@media (max-width: 480px)  { .cov-brand__t { font-size: 18px; letter-spacing: 1px; } }

/* =========================================================
   商品封面压扁：品牌文字块更扁，手机端一屏能看更多商品
   ========================================================= */
.p-cover { height: 64px; }
.cov-brand__t { font-size: 23px; letter-spacing: 1.5px; }
.p-more .p-cover { min-height: 64px; }
@media (max-width: 1080px) {
  .p-cover { height: 64px; }
  .cov-brand__t { font-size: 21px; }
}
@media (max-width: 860px) {
  .p-cover { height: 56px; }
  .cov-brand__t { font-size: 18px; letter-spacing: 1px; }
  .p-more .p-cover { min-height: 56px; }
}
@media (max-width: 480px) {
  .p-cover { height: 52px; }
  .cov-brand__t { font-size: 16.5px; letter-spacing: .8px; }
  .p-more .p-cover { min-height: 52px; }
}

/* =========================================================
   商品封面再扁平：单行品牌条 +「已租完」徽章与主文字齐平
   ========================================================= */
.p-cover { height: 48px; }
.cov-brand__t { font-size: 20px; letter-spacing: 1.2px; }
.p-more .p-cover { min-height: 48px; }

/* 徽章与主文字同一水平线（垂直居中于封面） */
.p-cover .p-out-badge {
  top: 50%; right: 12px; transform: translateY(-50%);
  padding: 3px 9px; font-size: 10.5px;
}
/* 有徽章时文字让位：文字区左右留出徽章宽度，避免重叠 */
.p-card.is-out .cov-brand__t { padding-right: 58px; }

@media (max-width: 1080px) {
  .p-cover { height: 48px; }
  .cov-brand__t { font-size: 19px; }
}
@media (max-width: 860px) {
  .p-cover { height: 44px; }
  .cov-brand__t { font-size: 17px; letter-spacing: 1px; }
  .p-more .p-cover { min-height: 44px; }
  .p-cover .p-out-badge { right: 8px; padding: 2px 8px; font-size: 10px; }
  .p-card.is-out .cov-brand__t { padding-right: 50px; }
}
@media (max-width: 480px) {
  .p-cover { height: 40px; }
  .cov-brand__t { font-size: 15.5px; letter-spacing: .6px; }
  .p-more .p-cover { min-height: 40px; }
}

/* =========================================================
   扁平线性图标库（侧栏统一 · SVG mask，颜色跟随文字）
   ========================================================= */
.snav-ico { display: grid; place-items: center; }
.snav-ico::before {
  content: ""; width: 16px; height: 16px; display: block;
  background-color: #6b7280;
  -webkit-mask: var(--ico) center / 16px 16px no-repeat;
  mask: var(--ico) center / 16px 16px no-repeat;
  transition: background-color .15s;
}
.side-nav a.snav-item.active .snav-ico::before { background-color: var(--primary); }
.side-nav a.snav-item:hover .snav-ico::before { background-color: #4b5563; }

.sb-ico {
  flex: 0 0 17px; width: 17px; height: 17px; display: inline-block;
  background-color: currentColor; opacity: .9;
  -webkit-mask: var(--ico) center / 17px 17px no-repeat;
  mask: var(--ico) center / 17px 17px no-repeat;
}
.sidebar-nav a { display: flex; align-items: center; gap: 10px; }
.sidebar-foot a { display: flex; align-items: center; gap: 7px; }
.sb-ico.sm { flex: 0 0 14px; width: 14px; height: 14px;
  -webkit-mask-size: 14px 14px; mask-size: 14px 14px; }

/* --- 图标几何：24×24、1.8 描边、圆角端点 --- */
.ico-store { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10v9.5A1.5 1.5 0 0 0 5.5 21h13a1.5 1.5 0 0 0 1.5-1.5V10'/%3E%3Cpath d='M3 10l1.8-5.5h14.4L21 10z'/%3E%3Cpath d='M9.5 21v-6h5v6'/%3E%3C/svg%3E"); }
.ico-key { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='3.6'/%3E%3Cpath d='M10.2 12.8L20 3'/%3E%3Cpath d='M16 3h4v4'/%3E%3C/svg%3E"); }
.ico-chart { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16'/%3E%3Cpath d='M7 20v-6'/%3E%3Cpath d='M12 20V7'/%3E%3Cpath d='M17 20v-9'/%3E%3C/svg%3E"); }
.ico-list { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4.5' width='14' height='16.5' rx='2'/%3E%3Cpath d='M9.5 3.2h5v2.6h-5z'/%3E%3Cpath d='M9 11h6M9 15h4'/%3E%3C/svg%3E"); }
.ico-user { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.8'/%3E%3Cpath d='M4.5 20.5c0-4 3.4-6 7.5-6s7.5 2 7.5 6'/%3E%3C/svg%3E"); }
.ico-users { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8.2' r='3.4'/%3E%3Cpath d='M2.8 20c0-3.5 2.8-5.4 6.2-5.4s6.2 1.9 6.2 5.4'/%3E%3Cpath d='M16.4 5.4a3.4 3.4 0 0 1 0 5.7'/%3E%3Cpath d='M18 14.8c2.1.6 3.3 2.3 3.3 5.2'/%3E%3C/svg%3E"); }
.ico-gear { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3Ccircle cx='9.5' cy='7' r='2.1'/%3E%3Ccircle cx='15' cy='12' r='2.1'/%3E%3Ccircle cx='8' cy='17' r='2.1'/%3E%3C/svg%3E"); }
.ico-logout { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 16.5l4.5-4.5L15 7.5'/%3E%3Cpath d='M19.5 12H9'/%3E%3Cpath d='M12 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h6'/%3E%3C/svg%3E"); }
.ico-search { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.4'/%3E%3Cpath d='M20 20l-4.3-4.3'/%3E%3C/svg%3E"); }
.ico-lock { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.8' y='10.2' width='14.4' height='9.6' rx='2.2'/%3E%3Cpath d='M8 10.2V7.6a4 4 0 0 1 8 0v2.6'/%3E%3C/svg%3E"); }
.ico-megaphone { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10.2v3.6a1.8 1.8 0 0 0 1.8 1.8H8l6.5 3.9V4.5L8 8.4H5.8A1.8 1.8 0 0 0 4 10.2z'/%3E%3Cpath d='M18 9.4a3.8 3.8 0 0 1 0 5.2'/%3E%3C/svg%3E"); }
.ico-ticket { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5A2 2 0 0 1 5 6.5h14a2 2 0 0 1 2 2v1.6a2 2 0 0 0 0 3.8v1.6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-1.6a2 2 0 0 0 0-3.8z'/%3E%3Cpath d='M12 8.5v7' stroke-dasharray='1.6 2.2'/%3E%3C/svg%3E"); }
.ico-wallet { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='13' rx='2.4'/%3E%3Cpath d='M3 10.2h18'/%3E%3Ccircle cx='16.6' cy='14.8' r='1.1'/%3E%3C/svg%3E"); }
.ico-mail { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5.2' width='18' height='13.6' rx='2.4'/%3E%3Cpath d='M3.8 7.6l8.2 5.8 8.2-5.8'/%3E%3C/svg%3E"); }
.ico-box { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8l9-4.4L21 8v8l-9 4.4L3 16z'/%3E%3Cpath d='M3 8l9 4.4 9-4.4'/%3E%3Cpath d='M12 12.4v8'/%3E%3C/svg%3E"); }
.ico-headset { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.2 13v-1a7.8 7.8 0 0 1 15.6 0v1'/%3E%3Crect x='2.6' y='12.8' width='4' height='6' rx='1.6'/%3E%3Crect x='17.4' y='12.8' width='4' height='6' rx='1.6'/%3E%3Cpath d='M19.4 18.8v.6a2.4 2.4 0 0 1-2.4 2.4h-2.8'/%3E%3C/svg%3E"); }
.ico-history { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.6 12a8.4 8.4 0 1 0 2.6-6.1'/%3E%3Cpath d='M3.4 4.4v4.4h4.4'/%3E%3Cpath d='M12 8.2v4.4l3 1.8'/%3E%3C/svg%3E"); }
.ico-inbox { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13.2l2.6-7.4h12.8l2.6 7.4v4.6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M3 13.2h4.8l1.4 2.4h5.6l1.4-2.4H21'/%3E%3C/svg%3E"); }
.ico-cart { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9.6' cy='19.4' r='1.3'/%3E%3Ccircle cx='17.4' cy='19.4' r='1.3'/%3E%3Cpath d='M2.8 4.2h2.3l2.4 10.9h11l2.2-8H6'/%3E%3C/svg%3E"); }
.ico-external { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4.2h5.8V10'/%3E%3Cpath d='M19.8 4.2L11 13'/%3E%3Cpath d='M18 14v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5'/%3E%3C/svg%3E"); }
.ico-review { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.2' y='4.2' width='15.6' height='15.6' rx='3'/%3E%3Cpath d='M8.4 12.4l2.6 2.6 4.8-5'/%3E%3C/svg%3E"); }

/* 品牌标记与小号内联图标（顶栏 / Logo / 公告标题） */
.brand-mark {
  width: 20px; height: 20px; display: inline-block; vertical-align: -4px;
  margin-right: 8px; background-color: var(--primary);
  -webkit-mask: var(--ico) center / 20px 20px no-repeat;
  mask: var(--ico) center / 20px 20px no-repeat;
}
.sidebar-logo .brand-mark { background-color: #818cf8; }
.nm-ico {
  width: 15px; height: 15px; display: inline-block; vertical-align: -3px;
  margin-right: 5px; background-color: currentColor; opacity: .8;
  -webkit-mask: var(--ico) center / 15px 15px no-repeat;
  mask: var(--ico) center / 15px 15px no-repeat;
}
.mc-t .nm-ico { margin-right: 4px; opacity: .9; color: #4338ca; }
/* 按钮内联图标：与文字同色同基线 */
.btn .nm-ico { margin-right: 4px; opacity: .95; }

/* =========================================================
   订单列表细节统一（2026-10）
   1) 按钮文字严格居中  2) 表格行高一致  3) 紧凑上传凭证按钮
   ========================================================= */
/* --- 按钮：flex 居中，图标与文字同轴 --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 5px; line-height: 1.2; text-align: center;
}
.btn-block { display: flex; width: 100%; }
.btn .nm-ico { margin-right: 0; flex: 0 0 auto; }
/* 筛选条：所有控件垂直居中、统一高度 */
.filter-form { align-items: center; }
.filter-form .btn { flex: 0 0 auto; }
.filter-form .input,
.filter-form select,
.filter-form .btn {
  height: 38px; min-height: 38px; box-sizing: border-box;
  padding-top: 0; padding-bottom: 0;
}
.filter-form .btn { padding-left: 16px; padding-right: 16px; }

/* --- 视图切换 tab：图标 + 文字整体居中 --- */
.view-tabs { padding: 4px; }
.view-tab {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 10px; line-height: 1;
}
.view-tab .nm-ico { width: 14px; height: 14px; vertical-align: 0; margin-right: 0; }

/* --- 表格：行高统一 --- */
.table { table-layout: auto; }
.table-compact tbody tr { height: 64px; }
.table-compact tbody td { vertical-align: middle; padding-top: 8px; padding-bottom: 8px; }
.my-orders-table tbody tr { height: 67px; }
.my-orders-table.my-stock-table tbody tr { height: 74px; }
.my-orders-table tbody td { vertical-align: middle; padding-top: 8px; padding-bottom: 8px; }
.my-orders-table td, .table-compact td { line-height: 1.4; }
/* 日期、编号等不折行，避免「2026-10-10」被拆成两行 */
.my-orders-table th, .my-orders-table td { white-space: nowrap; }
/* 双行单元格：主文本 + 小字，行间距收紧 */
.table-compact td small, .my-orders-table td small { line-height: 1.45; }

/* --- 单元格内横向操作区（避免换行撑高行） --- */
.act-cell { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.act-cell form { display: flex; align-items: center; gap: 6px; margin: 0; }
.act-cell .unpaid-flag { margin: 0; }
.act-cell .btn { padding: 0 9px; font-size: 12.5px; height: 32px; }
.act-cell .btn .nm-ico { width: 13px; height: 13px; }
/* 订单表：账号资源列限宽折行（table-cell 上 max-width 无效，需内层容器） */
.prod-wrap { width: 152px; white-space: normal; }
.qty { white-space: nowrap; }

/* --- 紧凑上传凭证按钮：隐藏原生控件文字 --- */
.file-pick {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  height: 32px; padding: 0 10px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  font-size: 12.5px; font-weight: 600; color: #4b5563;
  white-space: nowrap; cursor: pointer; transition: all .15s;
}
.file-pick:hover { border-color: var(--primary); color: var(--primary); background: #f8f8ff; }
.file-pick input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; font-size: 0;
}
.file-pick.has-file {
  border-color: #10b981; color: #047857; background: var(--success-bg);
}
.file-pick .nm-ico { width: 14px; height: 14px; vertical-align: 0; margin-right: 0; }

@media (max-width: 860px) {
  .table-compact tbody tr { height: 60px; }
  .my-orders-table tbody tr { height: 62px; }
  .my-orders-table.my-stock-table tbody tr { height: 68px; }
  .file-pick { height: 30px; padding: 0 9px; font-size: 12.5px; }
  .view-tab { height: 30px; font-size: 13.5px; }
  .filter-form .input,
  .filter-form select,
  .filter-form .btn { height: 42px; min-height: 42px; }
  /* 手机端：隐藏「至」，两个日期自然相邻 */
  .fr-tilde { display: none; }
  /* 手机端：下拉筛选两列并排，减少纵向长度（select 同时带 .input，需提高特异性） */
  .filter-form select.input,
  .filter-form select.input-sm { flex: 1 1 46%; width: auto; min-width: 0; }
  .filter-form input[type=text] { flex: 1 1 100%; }
}

/* --- 补充图标：上传 / 下载 / 核销 --- */
.ico-upload { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16.5V4.2'/%3E%3Cpath d='M7.4 8.8L12 4.2l4.6 4.6'/%3E%3Cpath d='M4 15v3.6a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V15'/%3E%3C/svg%3E"); }
.ico-download { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v12.4'/%3E%3Cpath d='M7.4 11.8L12 16.4l4.6-4.6'/%3E%3Cpath d='M4 15.6v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E"); }
.ico-check { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.4'/%3E%3Cpath d='M8.3 12.2l2.6 2.6 4.8-5'/%3E%3C/svg%3E"); }

/* 行内小按钮（状态列内的「去付款」等），保证不把行高顶开 */
.btn-mini {
  display: flex; width: 100%;
  height: 24px; min-height: 24px; padding: 0 8px;
  font-size: 11.5px; border-radius: 6px; margin-top: 3px;
}

/* =========================================================
   细节微调（2026-10-23）
   1) 用户端「去付款」与状态徽章同形状（胶囊），颜色区分饱和度
   2) 平台端操作列三个控件等高、等间距
   3) 综合搜索输入框加宽
   ========================================================= */
/* --- 1. 胶囊小按钮：形状对齐 .badge --- */
.btn-mini {
  display: flex; width: fit-content; margin: 4px auto 0;
  height: auto; min-height: 22px; padding: 3px 12px;
  font-size: 12px; line-height: 1.4; border: none;
  border-radius: 999px; letter-spacing: .2px;
}
.btn-mini.btn-danger { background: #ef4444; box-shadow: 0 1px 3px rgba(239, 68, 68, .35); }
.btn-mini.btn-danger:hover { background: #dc2626; box-shadow: 0 2px 8px rgba(220, 38, 38, .35); }

/* --- 2. 平台端操作列：三个控件同高同宽基准 --- */
.act-cell { gap: 6px; }
.act-cell > .btn,
.act-cell form .btn,
.act-cell form .file-pick {
  height: 32px; min-height: 32px; box-sizing: border-box;
  padding: 0 10px; font-size: 12.5px;
  display: inline-flex; align-items: center; justify-content: center;
}
.act-cell > .btn { flex: 0 0 auto; }

/* --- 3. 综合搜索输入框 --- */
.kw-input { flex: 1 1 240px; min-width: 200px; }

@media (max-width: 860px) {
  .kw-input { flex: 1 1 100%; min-width: 0; }
  .btn-mini { margin-top: 3px; }
}

/* ========== 邀约推荐管理页美化 ========== */
/* 分页条：胶囊分段控件 */
.rf-tabs {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 5px; gap: 3px; box-shadow: var(--shadow-sm);
}
.rf-tabs .view-tab { border-radius: 9px; padding: 8px 16px; }
.rf-tabs .view-tab.active { box-shadow: 0 2px 8px rgba(79, 70, 229, .28); }
.rf-badge {
  display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px;
  background: #dc2626; color: #fff; border-radius: 10px;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  vertical-align: 1px;
}
/* 总览统计卡：图标泡泡 + 大数字 */
.rf-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 18px; }
.rf-stat {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 16px 14px; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 12px;
  transition: transform .15s, box-shadow .15s;
}
.rf-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md, 0 8px 24px rgba(17,24,39,.08)); }
.rf-stat .rs-ico {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.rf-stat .rs-ico.c-indigo { background: #eef2ff; }
.rf-stat .rs-ico.c-amber  { background: #fffbeb; }
.rf-stat .rs-ico.c-cyan   { background: #ecfeff; }
.rf-stat .rs-ico.c-violet { background: #f5f3ff; }
.rf-stat .rs-ico.c-green  { background: #ecfdf5; }
.rf-stat .rs-ico.c-rose   { background: #fff1f2; }
.rf-stat .rs-num { font-size: 22px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
.rf-stat .rs-num em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; }
.rf-stat .rs-label { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
@media (max-width: 1200px) { .rf-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .rf-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rf-stat { padding: 12px; } .rf-stat .rs-num { font-size: 18px; } }
/* 设置页分组小节 */
.rf-sec {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px 8px; margin-bottom: 16px; background: #fcfcfe;
}
.rf-sec-t {
  font-weight: 700; font-size: 14px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.rf-sec-t::before {
  content: ""; width: 4px; height: 15px; border-radius: 2px;
  background: var(--grad-primary, linear-gradient(135deg, #4f46e5, #7c3aed));
  flex-shrink: 0;
}
/* 提现类型徽章 */
.rf-kind { display: inline-block; padding: 2px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.rf-kind.cash   { background: #eef2ff; color: #4f46e5; }
.rf-kind.offset { background: #ecfdf5; color: #059669; }
/* 邀请码小片 */
.rf-code {
  display: inline-block; background: #f6f7fb; border: 1px dashed #c7d2fe;
  color: #4338ca; padding: 2px 10px; border-radius: 7px;
  font-weight: 700; letter-spacing: 1px;
}
/* 卡片标题统一样式 */
.rf-card-t { margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.rf-card-t::before {
  content: ""; width: 4px; height: 15px; border-radius: 2px;
  background: var(--grad-primary, linear-gradient(135deg, #4f46e5, #7c3aed));
}

/* ========== 账号资源库存：分类页签 + 拖拽排序 ========== */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.cat-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: #fff; border: 1px solid var(--border); color: var(--text);
  text-decoration: none; transition: all .15s;
}
.cat-tab:hover { border-color: var(--primary); color: var(--primary); }
.cat-tab.active {
  background: var(--grad-primary, linear-gradient(135deg, #4f46e5, #7c3aed));
  border-color: transparent; color: #fff;
  box-shadow: var(--shadow-sm);
}
.cat-tab-n {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: #eef2ff; color: var(--primary); font-size: 11.5px;
  display: inline-flex; align-items: center; justify-content: center;
}
.cat-tab.active .cat-tab-n { background: rgba(255,255,255,.22); color: #fff; }
.drag-cell { cursor: grab; text-align: center; }
.drag-handle {
  display: inline-block; padding: 4px 8px; border-radius: 6px;
  color: #9ca3af; font-size: 14px; letter-spacing: 1px; line-height: 1;
  user-select: none; transition: all .15s;
}
tr:hover .drag-handle { color: var(--primary); background: #eef2ff; }
.drag-handle.demo { cursor: default; }
tr.dragging { opacity: .45; background: #f5f3ff; }
tr.drag-over td { border-top: 2px solid var(--primary); }
.sort-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #111827; color: #fff; font-size: 13.5px; padding: 10px 22px;
  border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 300;
}
.sort-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 库存总览合计行 */
.inv-total-row td { border-top: 2px solid var(--border); background: #f8f7ff; font-size: 14px; }

/* 公告倒计时结束后的手动关闭按钮（黑板粉笔风） */
.ann-close-btn {
  display: block; margin: 14px auto 4px; padding: 10px 34px;
  font-size: 15.5px; font-weight: 600; letter-spacing: 2px;
  color: #f7f4e8; background: transparent;
  border: 2px dashed rgba(247,244,232,.75); border-radius: 999px;
  cursor: pointer; transition: all .2s; animation: annBtnIn .35s ease;
}
.ann-close-btn:hover, .ann-close-btn:active {
  background: rgba(247,244,232,.14); border-style: solid; transform: scale(1.04);
}
@keyframes annBtnIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

/* 表头列排序切换 */
.th-sort { color: inherit; text-decoration: none; white-space: nowrap; cursor: pointer; }
.th-sort:hover { color: var(--primary); }
.th-sort .th-arrow { display: inline-block; margin-left: 4px; font-size: 11px; color: #c3c8d4; }
.th-sort.on { color: var(--primary); }
.th-sort.on .th-arrow { color: var(--primary); font-size: 12.5px; }

/* ========== 下单引导横幅（商城首页） ========== */
.guide-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; margin-bottom: 18px;
  background: linear-gradient(100deg, #4f46e5 0%, #6d5ef0 52%, #8b7cf6 100%);
  border-radius: 12px; color: #fff; position: relative;
  box-shadow: 0 4px 16px rgba(79, 70, 229, .22);
  transition: transform .2s, box-shadow .2s;
  animation: gbIn .45s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes gbIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.guide-banner:hover {
  transform: translateY(-2px); color: #fff;
  box-shadow: 0 8px 24px rgba(79, 70, 229, .32);
}
.gb-ico { font-size: 26px; line-height: 1; flex: none; }
.gb-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gb-txt b { font-size: 15px; font-weight: 700; }
.gb-txt em { font-size: 12.5px; font-style: normal; color: rgba(255, 255, 255, .86); }
.gb-go {
  font-size: 13.5px; font-weight: 600; padding: 7px 16px; flex: none;
  background: rgba(255, 255, 255, .2); border-radius: 20px; white-space: nowrap;
}
.guide-banner:hover .gb-go { background: rgba(255, 255, 255, .32); }
.gb-x {
  position: absolute; top: 5px; right: 6px; width: 22px; height: 22px;
  line-height: 22px; text-align: center; font-size: 12px; border-radius: 50%;
  color: rgba(255, 255, 255, .7); cursor: pointer; transition: all .15s;
}
.gb-x:hover { background: rgba(255, 255, 255, .24); color: #fff; }

@media (max-width: 860px) {
  .guide-banner { padding: 12px 40px 12px 14px; gap: 10px; margin-bottom: 14px; }
  .gb-ico { font-size: 21px; }
  .gb-txt b { font-size: 13.5px; }
  .gb-txt em { display: none; }
  .gb-go { font-size: 12.5px; padding: 6px 12px; }
}

/* ---- 验证码趋势图（mailbox 页） ---- */
.mc-chart {
  margin-top: 14px; padding: 12px 14px 8px;
  background: #fafbff; border: 1px solid #eef0f6; border-radius: 12px;
}
.mc-chart-hd { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.mc-chart-t { font-size: 13px; font-weight: 700; color: #374151; }
.mc-chart-s { font-size: 11.5px; color: #9aa1ad; }
.mc-chart-s b { color: #4f46e5; }
.mc-chart-box { margin-top: 6px; }
.mc-chart-box svg circle { cursor: pointer; transition: r .15s; }
.mc-chart-box svg circle:hover { r: 4.5; }

/* ---- 系统日志选项卡 ---- */
.sl-tabs { display: flex; gap: 8px; margin: 0 0 14px; }
.sl-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 10px; text-decoration: none;
  font-size: 13.5px; font-weight: 600; color: #6b7280;
  background: #fff; border: 1px solid var(--border);
  transition: all .15s ease;
}
.sl-tab:hover { border-color: #c7c2f8; color: var(--primary); }
.sl-tab.on {
  color: #fff; background: var(--grad-primary); border-color: transparent;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .28);
}
.sl-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px;
}
.sl-self { color: #059669; background: #ecfdf5; }
.sl-parent { color: #d97706; background: #fffbeb; }
.sl-admin { color: #6366f1; background: #eef2ff; }

/* 日志表格横向滚动容器（手机端） */
.sl-scroll { padding: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sl-scroll table { width: 100%; }
.sl-swipe-tip { display: none; }
@media (max-width: 768px) {
  .sl-swipe-tip {
    display: inline-block; margin-left: 6px;
    font-size: 11.5px; color: #949cab; background: #f4f5f8;
    padding: 2px 8px; border-radius: 999px;
  }
}

/* 趋势图点击数字气泡 */
.mc-tip {
  position: absolute; z-index: 5; display: none;
  background: #1f2937; color: #fff; border-radius: 8px;
  padding: 5px 10px; font-size: 12px; line-height: 1.35; text-align: center;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .25); pointer-events: none;
  white-space: nowrap;
}
.mc-tip b { font-size: 13px; display: block; }
.mc-tip span { font-size: 10.5px; color: #c7cbd4; }
.mc-tip::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px;
  border: 5px solid transparent; border-top-color: #1f2937; border-bottom: 0;
}
