/* =========================================================
   邻里团 · 团购商城  样式表
   ========================================================= */
:root {
  --primary: #ff2741;
  --primary-dark: #e0182f;
  --primary-soft: #fff1f2;
  --orange: #ff6b35;
  --gold: #f7a325;
  --text: #1a1d23;
  --sub: #8a8f99;
  --line: #f1f2f4;
  --bg: #f5f6f8;
  --card: #ffffff;
  --green: #12b76a;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(20, 25, 40, .06);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #e8eaee;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; font-size: 14px; }
input, select, textarea { font-family: inherit; font-size: 14px; outline: none; }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- 手机容器 ---------- */
.app {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, .08);
  padding-bottom: 66px;
}
.app.no-tabbar { padding-bottom: 0; }
.page { padding: 0 12px 16px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .back { width: 30px; height: 30px; display: grid; place-items: center; font-size: 20px; color: var(--text); margin-left: -6px; }
.topbar h1 { font-size: 16px; margin: 0; font-weight: 600; flex: 1; }
.topbar .shop-name { font-size: 16px; font-weight: 700; letter-spacing: .3px; }
.topbar .shop-name small { display: block; font-size: 10px; color: var(--sub); font-weight: 400; letter-spacing: 1px; }

/* 团长绑定条 */
.bind-bar {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 12px 0;
  padding: 9px 12px;
  background: linear-gradient(90deg, #fff4f4, #fff9f0);
  border: 1px solid #ffe0e2;
  border-radius: 10px;
  font-size: 12px; color: #a3392f;
}
.bind-bar .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex: none; }
.bind-bar b { color: var(--primary); }
.bind-bar .muted { color: #b08a86; }

/* ---------- 通用 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.sec-title { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 10px; }
.sec-title h2 { font-size: 16px; margin: 0; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.sec-title h2 .bar { width: 4px; height: 15px; border-radius: 2px; background: var(--primary); display: inline-block; }
.sec-title .more { font-size: 12px; color: var(--sub); }
.muted { color: var(--sub); }
.center { text-align: center; }
.flex { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.gap8 { gap: 8px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.price { color: var(--primary); font-weight: 700; font-family: "DIN Alternate", -apple-system, "Helvetica Neue", sans-serif; }
.price .sym { font-size: .7em; margin-right: 1px; }
.price-old { color: #b9bec7; text-decoration: line-through; font-size: 11px; margin-left: 5px; font-weight: 400; }
.tag {
  display: inline-block; font-size: 10px; padding: 1px 5px; border-radius: 4px;
  background: var(--primary-soft); color: var(--primary); border: .5px solid #ffd0d4; margin-right: 4px;
}
.tag.gray { background: #f4f5f7; color: #8a8f99; border-color: #eceef1; }
.tag.green { background: #e9f9f1; color: var(--green); border-color: #c8f0dc; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 40px; padding: 0 18px; border-radius: 20px; font-size: 14px; font-weight: 600;
  background: #f2f3f5; color: var(--text); transition: .15s;
}
.btn:active { transform: scale(.98); opacity: .9; }
.btn-primary { background: linear-gradient(135deg, #ff4d5f, #ff2741); color: #fff; box-shadow: 0 4px 12px rgba(255, 39, 65, .28); }
.btn-gold { background: linear-gradient(135deg, #ffb347, #ff8c1a); color: #fff; box-shadow: 0 4px 12px rgba(255, 140, 26, .28); }
.btn-outline { background: #fff; border: 1px solid #e6e8ec; color: var(--text); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; box-shadow: none; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 40;
  display: flex; background: rgba(255, 255, 255, .98);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  backdrop-filter: blur(10px);
}
.tabbar a {
  flex: 1; padding: 7px 0 8px; text-align: center; font-size: 10px; color: #9aa0aa;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabbar a .ico { font-size: 20px; line-height: 1; filter: grayscale(1) opacity(.65); }
.tabbar a.active { color: var(--primary); font-weight: 600; }
.tabbar a.active .ico { filter: none; }

/* ---------- 首页 Banner ---------- */
.hero {
  position: relative; margin: 12px; border-radius: 16px; overflow: hidden;
  padding: 20px 18px; color: #fff;
  background: linear-gradient(135deg, #ff5c6c 0%, #ff2741 45%, #d61b34 100%);
  box-shadow: 0 8px 22px rgba(214, 27, 52, .25);
}
.hero::after {
  content: ""; position: absolute; right: -30px; top: -40px; width: 160px; height: 160px;
  border-radius: 50%; background: rgba(255, 255, 255, .12);
}
.hero::before {
  content: ""; position: absolute; right: 26px; bottom: -50px; width: 110px; height: 110px;
  border-radius: 50%; background: rgba(255, 255, 255, .1);
}
.hero h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: .5px; }
.hero p { margin: 0; font-size: 12px; opacity: .9; }
.hero .pills { display: flex; gap: 6px; margin-top: 14px; position: relative; z-index: 1; }
.hero .pill { font-size: 11px; padding: 3px 9px; border-radius: 20px; background: rgba(255, 255, 255, .2); border: .5px solid rgba(255, 255, 255, .35); }

/* ---------- 秒杀 ---------- */
.seckill-wrap {
  margin: 0 12px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #fff3e8 0%, #fff 42%);
  box-shadow: var(--shadow); border: 1px solid #ffe6d1;
}
.seckill-head { display: flex; align-items: center; gap: 8px; padding: 13px 14px 8px; }
.seckill-head .ttl { font-size: 16px; font-weight: 800; color: #6b2b00; letter-spacing: .3px; }
.seckill-head .ttl em { font-style: normal; color: var(--orange); }
.countdown { display: flex; align-items: center; gap: 3px; margin-left: auto; font-size: 11px; color: #a06a45; }
.countdown .num {
  background: #2b2b2b; color: #fff; border-radius: 4px; padding: 2px 5px; min-width: 20px; text-align: center;
  font-family: "DIN Alternate", monospace; font-size: 12px; font-variant-numeric: tabular-nums;
}
.seckill-list { display: flex; gap: 10px; overflow-x: auto; padding: 6px 14px 14px; scrollbar-width: none; }
.seckill-list::-webkit-scrollbar { display: none; }
.sk-card { width: 108px; flex: none; }
.sk-card .cover {
  width: 108px; height: 108px; border-radius: 12px; display: grid; place-items: center;
  font-size: 46px; position: relative; overflow: hidden;
}
.sk-card .cover .badge {
  position: absolute; left: 0; top: 0; font-size: 10px; color: #fff; padding: 2px 7px 3px;
  background: linear-gradient(135deg, #ff6b35, #ff2741); border-bottom-right-radius: 10px;
}
.sk-card .cover .sold-out {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45);
  color: #fff; font-size: 12px; font-weight: 600;
}
.sk-card .t { font-size: 12px; margin-top: 6px; line-height: 1.35; height: 32px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sk-card .p { margin-top: 3px; font-size: 15px; }
.sk-card .p small { font-size: 10px; }

/* ---------- 商品网格 ---------- */
.goods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.goods {
  background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); position: relative;
  transition: transform .15s;
}
.goods:active { transform: scale(.985); }
.goods .cover { height: 150px; display: grid; place-items: center; font-size: 62px; position: relative; }
.goods .cover .sk-flag {
  position: absolute; top: 8px; left: 8px; background: rgba(255, 39, 65, .95); color: #fff;
  font-size: 10px; padding: 2px 7px; border-radius: 20px; font-weight: 600;
}
.goods .info { padding: 9px 10px 12px; }
.goods .t { font-size: 13px; line-height: 1.4; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods .sub { font-size: 11px; color: var(--sub); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goods .row { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 7px; }
.goods .price { font-size: 17px; }
.goods .sales { font-size: 10px; color: #a8adb6; }

/* ---------- 商品详情 ---------- */
.detail-cover { height: 300px; display: grid; place-items: center; font-size: 120px; position: relative; }
.detail-body { background: #fff; border-radius: 16px 16px 0 0; margin-top: -18px; position: relative; padding: 16px 14px; }
.detail-body h1 { font-size: 18px; margin: 0 0 6px; line-height: 1.35; }
.detail-price { display: flex; align-items: baseline; gap: 8px; margin: 10px 0; }
.detail-price .price { font-size: 30px; }
.sk-box {
  margin-top: 12px; border-radius: 12px; padding: 12px;
  background: linear-gradient(120deg, #fff2e6, #ffe7d9); border: 1px solid #ffd7bd;
}
.sk-box .top { display: flex; align-items: center; justify-content: space-between; }
.sk-box .label { font-size: 12px; color: #b4441a; font-weight: 700; }
.progress { height: 6px; border-radius: 3px; background: #ffd9c4; overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, #ff9a3c, #ff4d2e); border-radius: 3px; }
.detail-desc { padding: 14px; font-size: 13px; color: #4a4f57; line-height: 1.75; }
.detail-desc h3 { font-size: 14px; margin: 0 0 8px; color: var(--text); }
.buybar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; display: flex; align-items: center; gap: 10px;
  padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .98); border-top: 1px solid var(--line); z-index: 40;
}
.buybar .ico-btn { text-align: center; font-size: 10px; color: var(--sub); width: 42px; }
.buybar .ico-btn .ico { display: block; font-size: 20px; }
.buybar .btn { flex: 1; }

/* ---------- 购物车 ---------- */
.cart-item { display: flex; gap: 10px; padding: 12px; background: #fff; border-radius: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.cart-item .cover { width: 78px; height: 78px; border-radius: 10px; display: grid; place-items: center; font-size: 38px; flex: none; }
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .t { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stepper { display: inline-flex; align-items: center; border: 1px solid #e6e8ec; border-radius: 6px; overflow: hidden; height: 26px; }
.stepper button { width: 26px; height: 26px; font-size: 15px; color: #555; display: grid; place-items: center; }
.stepper span { min-width: 30px; text-align: center; font-size: 13px; }
.cart-empty, .empty { text-align: center; padding: 60px 20px; color: var(--sub); }
.cart-empty .ico, .empty .ico { font-size: 48px; display: block; margin-bottom: 12px; opacity: .5; }
.checkbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  background: #fff; border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; z-index: 40;
}

/* ---------- 订单 ---------- */
.filter-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 10px 12px; background: #fff; position: sticky; top: 53px; z-index: 20; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tabs button { flex: none; padding: 6px 12px; border-radius: 16px; font-size: 12.5px; color: var(--sub); }
.filter-tabs button.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.order-card { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--sub); padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.order-head .st { font-weight: 600; }
.order-head .st.wait { color: var(--primary); }
.order-head .st.done { color: var(--green); }
.order-head .st.cancel { color: #a8adb6; }
.order-item { display: flex; gap: 10px; padding: 10px 0; }
.order-item .cover { width: 62px; height: 62px; border-radius: 9px; display: grid; place-items: center; font-size: 30px; flex: none; }
.order-item .t { font-size: 13px; line-height: 1.4; }
.order-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px dashed var(--line); }
.order-foot .total { font-size: 12px; color: var(--sub); }
.order-foot .total b { color: var(--text); font-size: 15px; margin-left: 3px; }
.order-actions { display: flex; gap: 8px; }

/* ---------- 我的 ---------- */
.me-head {
  margin: 0 -12px 0; padding: 22px 18px 46px; background: linear-gradient(135deg, #ff5c6c, #ff2741);
  color: #fff; position: relative;
}
.me-head .name { font-size: 19px; font-weight: 700; }
.me-head .sub { font-size: 12px; opacity: .85; margin-top: 4px; }
.me-stats {
  position: relative; z-index: 2;   /* 抬起层级，避免被 .me-head 的 position:relative 盖住 */
  margin: -32px 0 0; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow); display: flex; padding: 14px 0;
}
.me-stats a { flex: 1; text-align: center; }
.me-stats .n { font-size: 19px; font-weight: 700; }
.me-stats .l { font-size: 11px; color: var(--sub); margin-top: 2px; }
.me-list { background: #fff; border-radius: 14px; margin: 12px 0; overflow: hidden; box-shadow: var(--shadow); }
.me-list a { display: flex; align-items: center; gap: 10px; padding: 14px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.me-list a:last-child { border-bottom: none; }
.me-list .arrow { margin-left: auto; color: #c8ccd3; font-size: 16px; }

/* ---------- 团长中心 ---------- */
.leader-hero {
  margin: 0 -12px; padding: 20px 18px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #2b2f3a 0%, #1b1e26 100%);
}
.leader-hero::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 163, 37, .35), transparent 70%);
}
.leader-hero .avatar {
  width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .12);
  display: grid; place-items: center; font-size: 28px; border: 2px solid rgba(247, 163, 37, .6);
}
.leader-hero .ln { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.leader-hero .badge { font-size: 10px; padding: 2px 7px; border-radius: 20px; background: linear-gradient(135deg, #ffc65c, #f7a325); color: #4a2c00; font-weight: 700; }
.leader-hero .meta { font-size: 11.5px; opacity: .65; margin-top: 3px; }
.leader-hero .money { margin-top: 18px; display: flex; gap: 22px; position: relative; z-index: 1; }
.leader-hero .money .n { font-size: 23px; font-weight: 700; font-family: "DIN Alternate", sans-serif; color: #ffc65c; }
.leader-hero .money .l { font-size: 11px; opacity: .6; margin-top: 2px; }
.grid-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; margin: 12px; box-shadow: var(--shadow); }
.grid-stats > div { background: #fff; padding: 14px 6px; text-align: center; }
.grid-stats .n { font-size: 17px; font-weight: 700; }
.grid-stats .l { font-size: 11px; color: var(--sub); margin-top: 3px; }

.qr-card { margin: 12px; background: #fff; border-radius: 16px; padding: 18px 14px; text-align: center; box-shadow: var(--shadow); }
.qr-card h3 { margin: 0 0 3px; font-size: 15px; }
.qr-card .tip { font-size: 11.5px; color: var(--sub); margin-bottom: 14px; }
.qr-box { display: inline-block; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.qr-box img, .qr-box canvas { width: 168px; height: 168px; display: block; }
.link-box {
  margin-top: 14px; display: flex; align-items: center; gap: 8px; background: #f7f8fa;
  border-radius: 10px; padding: 8px 10px; font-size: 11px; color: var(--sub); text-align: left; word-break: break-all;
}
.link-box span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-box { font-size: 11.5px; color: #96700f; background: #fffbea; border: 1px solid #ffefc2; border-radius: 10px; padding: 10px 12px; margin: 12px; line-height: 1.7; }

/* 佣金明细 */
.comm-item { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.comm-item:last-child { border-bottom: none; }
.comm-item .top { display: flex; justify-content: space-between; gap: 10px; }
.comm-item .t { font-size: 13px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-item .amt { font-size: 15px; font-weight: 700; color: var(--primary); font-family: "DIN Alternate", sans-serif; }
.comm-item .meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--sub); margin-top: 4px; }
.state-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }
.s-pending { background: var(--gold); }
.s-available { background: var(--green); }
.s-settled { background: #9aa0aa; }
.s-none { background: #ccd0d6; }

/* ---------- 弹层 ---------- */
.mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 100; display: none; }
.mask.show { display: block; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 480px; background: #fff; border-radius: 18px 18px 0 0; z-index: 101;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); transition: transform .25s ease;
  max-height: 82vh; overflow-y: auto;
}
.sheet.show { transform: translateX(-50%) translateY(0); }
.sheet h3 { margin: 0 0 14px; font-size: 16px; text-align: center; }
.sheet .close { position: absolute; right: 14px; top: 14px; color: #b9bec7; font-size: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; height: 42px; border: 1px solid #e6e8ec; border-radius: 10px; padding: 0 12px; background: #fafbfc;
}
.field textarea { height: 78px; padding: 10px 12px; resize: none; }
.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.92);
  background: rgba(20, 22, 28, .88); color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 13px; z-index: 200; opacity: 0; pointer-events: none; transition: .2s; max-width: 78vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------- 支付成功 ---------- */
.pay-done { text-align: center; padding: 50px 24px; }
.pay-done .tick {
  width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, #34d399, #12b76a);
  color: #fff; font-size: 36px; display: grid; place-items: center; margin: 0 auto 18px;
  box-shadow: 0 8px 24px rgba(18, 183, 106, .3);
}
.pay-done h2 { font-size: 20px; margin: 0 0 8px; }
.pay-done p { color: var(--sub); font-size: 13px; margin: 0 0 24px; }

/* ---------- 后台 ---------- */
.admin-body { background: #f0f2f5; min-height: 100vh; }
.admin-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 210px; flex: none; background: #1f2430; color: #b9c0cd; padding: 18px 12px;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
}
.sidebar .brand { color: #fff; font-size: 16px; font-weight: 700; padding: 6px 10px 18px; display: flex; align-items: center; gap: 8px; }
.sidebar .brand small { display: block; font-size: 10px; color: #7e8798; font-weight: 400; }
.sidebar nav a {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px; font-size: 13.5px; margin-bottom: 3px; color: #b9c0cd;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar nav a.active { background: linear-gradient(90deg, rgba(255, 39, 65, .9), rgba(255, 39, 65, .55)); color: #fff; font-weight: 600; }
.sidebar .foot { margin-top: auto; font-size: 11px; color: #6b7484; padding: 10px; line-height: 1.7; }
.admin-main { flex: 1; padding: 22px 26px 40px; min-width: 0; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.admin-head h1 { font-size: 20px; margin: 0; }
.admin-head .desc { font-size: 12.5px; color: var(--sub); margin-top: 3px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border-radius: 12px; padding: 15px 16px; box-shadow: 0 1px 3px rgba(20, 25, 40, .06); }
.kpi .l { font-size: 12px; color: var(--sub); display: flex; align-items: center; gap: 5px; }
.kpi .n { font-size: 24px; font-weight: 700; margin-top: 7px; font-family: "DIN Alternate", sans-serif; }
.kpi .n small { font-size: 13px; font-weight: 500; color: var(--sub); margin-left: 2px; }
.kpi.hl { background: linear-gradient(135deg, #fff, #fff5f5); border: 1px solid #ffe4e6; }
.kpi .sub { font-size: 11.5px; color: var(--sub); margin-top: 4px; }
.panel { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(20, 25, 40, .06); margin-bottom: 16px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15px; margin: 0; }
.panel-body { padding: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--sub); font-size: 12px; padding: 10px 12px; background: #fafbfc; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfc; }
.tbl-wrap { overflow-x: auto; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.pill.gray { background: #f2f3f5; color: #6b7280; }
.pill.red { background: #fff1f2; color: var(--primary); }
.pill.green { background: #e9f9f1; color: #0e9f6e; }
.pill.blue { background: #eff6ff; color: #2563eb; }
.pill.gold { background: #fff8e6; color: #b47800; }
.avatar-mini { width: 26px; height: 26px; border-radius: 50%; background: #f2f3f5; display: inline-grid; place-items: center; font-size: 15px; margin-right: 6px; vertical-align: middle; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.admin-body .field input, .admin-body .field select, .admin-body .field textarea { background: #fff; height: 38px; }
.admin-body .btn { height: 34px; border-radius: 8px; font-size: 13px; font-weight: 500; }
.admin-body .btn-primary { box-shadow: none; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #1f2430, #2f3542); }
.login-card { width: 360px; background: #fff; border-radius: 16px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card p { font-size: 12.5px; color: var(--sub); margin: 0 0 22px; }
.hint { font-size: 11.5px; color: var(--sub); margin-top: 10px; }
.empty-row { text-align: center; color: var(--sub); padding: 30px; font-size: 13px; }
.chip-rate { font-family: "DIN Alternate", sans-serif; font-weight: 700; color: var(--primary); }
.mini-input { width: 76px; height: 30px; border: 1px solid #e6e8ec; border-radius: 6px; padding: 0 8px; text-align: center; }
.flex-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 900px) {
  .sidebar { width: 62px; padding: 14px 8px; }
  .sidebar .brand span, .sidebar nav a span, .sidebar .foot { display: none; }
  .sidebar nav a { justify-content: center; }
  .admin-main { padding: 16px 14px 30px; }
  .form-grid { grid-template-columns: 1fr; }
}
