* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
       background: #f1f5f9; color: #0f172a; padding-bottom: 48px; }
.hidden { display: none !important; }
header { position: sticky; top: 0; background: #fff; padding: 10px 12px;
         border-bottom: 1px solid #e2e8f0; display: flex; align-items: center;
         justify-content: space-between; gap: 8px; z-index: 10; flex-wrap: wrap; }
header h1 { font-size: 16px; cursor: pointer; min-width: 0; overflow: hidden;
            text-overflow: ellipsis; white-space: nowrap; }
.hd-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
            justify-content: flex-end; margin-left: auto; }
.filters { display: flex; gap: 6px; }
.identity { display: flex; align-items: center; gap: 2px; font-size: 13px;
            color: #475569; max-width: 100%; }
#me-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
            max-width: 14em; }
.identity .link { background: none; border: 0; padding: 0; color: #2563eb;
                  font-size: 13px; cursor: pointer; white-space: nowrap; }
.identity .link:active { opacity: .6; }
.admin-head { display: flex; justify-content: flex-end; margin: 4px 0 8px; }
select, input[type=month] { padding: 5px 8px; border: 1px solid #cbd5e1;
         border-radius: 6px; font-size: 13px; background: #fff; }
main { padding: 12px; }
.cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
        padding: 12px; cursor: pointer; }
.card:active { background: #f8fafc; }
.card h3 { font-size: 15px; margin-bottom: 6px; }
.card .sub { color: #64748b; font-size: 12px; margin-bottom: 8px; }
.line { display: flex; align-items: center; gap: 6px; font-size: 13px;
        margin-bottom: 5px; }
.line .lbl { width: 48px; flex-shrink: 0; }
.line .bar { flex: 1; height: 8px; background: #e2e8f0; border-radius: 4px;
             overflow: hidden; }
/* fill必须是块级，否则inline span的width不生效（条形为0px，浏览器实测修复） */
.line .fill { display: block; height: 100%; border-radius: 4px; }
.line .val { width: 96px; text-align: right; color: #64748b; font-size: 12px; }
.o .fill { background: #2563eb; } .o .lbl { color: #2563eb; }
.ou .fill { background: #7c3aed; } .ou .lbl { color: #7c3aed; }
.p .lbl { color: #64748b; }
.d .fill { background: #059669; } .d .lbl { color: #059669; }
.r .fill { background: #d97706; } .r .lbl { color: #d97706; }
.notarget { color: #94a3b8; }
.section-title { font-size: 15px; font-weight: 600; margin: 16px 0 8px; }
.panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
         padding: 12px; }
.trend-svg { width: 100%; height: 180px; }
.rank-row { display: flex; justify-content: space-between; padding: 6px 0;
            border-bottom: 1px solid #f1f5f9; font-size: 13px; }
footer { position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
         border-top: 1px solid #e2e8f0; text-align: center; font-size: 12px;
         color: #94a3b8; padding: 8px; }
.login { position: fixed; inset: 0; background: rgba(15,23,42,.6);
         display: flex; align-items: center; justify-content: center; z-index: 100; }
.login-box { background: #fff; border-radius: 12px; padding: 24px; width: 280px;
             text-align: center; }
.login-box h2 { font-size: 16px; margin-bottom: 14px; }
.login-box input { width: 100%; padding: 8px; border: 1px solid #cbd5e1;
                   border-radius: 6px; margin-bottom: 10px; }
.login-box button { width: 100%; padding: 8px; background: #2563eb; color: #fff;
                    border: 0; border-radius: 6px; font-size: 14px; }
.err { color: #dc2626; font-size: 12px; margin-top: 8px; }
.tabs { display: flex; gap: 4px; margin: 10px 0; border-bottom: 2px solid #e2e8f0; }
.tabs span { padding: 6px 14px; font-size: 13px; color: #64748b; cursor: pointer; }
.tabs span.on { color: #2563eb; border-bottom: 2px solid #2563eb; margin-bottom: -2px; }
.detail-row { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
              padding: 8px; margin-bottom: 6px; font-size: 12px; }
.detail-row .top { display: flex; justify-content: space-between; font-size: 13px; }
.tag { display: inline-block; border-radius: 4px; padding: 0 5px; font-size: 11px; }
.tag.green { background: #dcfce7; color: #166534; }
.tag.yellow { background: #fef3c7; color: #92400e; }
.tag.gray { background: #f1f5f9; color: #475569; }
/* 数量维度：销量为主呈现 */
.line.qty .lbl { width: auto; min-width: 54px; font-weight: 600; color: #0f172a; }
.line.qty .fill.o { background: #2563eb; }
.line.qty .val { width: auto; white-space: nowrap; }
.line.amount .lbl { width: auto; min-width: 54px; color: #94a3b8; }
.line.amount .val { color: #64748b; font-size: 12px; width: auto; }
.sub.sec { margin-top: 8px; color: #94a3b8; font-size: 11px; }
.rank-row { display: flex; align-items: center; gap: 8px; }
.rank-row > span:first-child { flex: 0 0 auto; }
.rank-main { font-weight: 600; }
.rank-sub { color: #94a3b8; font-size: 12px; margin-left: auto; }
/* 集团版：登录提示/空态/轻提示/账号管理 */
.login-box .hint { color: #94a3b8; font-size: 12px; margin-top: 12px; }
.login-box input { font-size: 14px; }
/* 改密浮层取消按钮：登录框内按钮默认主色整宽，这里收为文字按钮 */
.login-box .btn-plain { background: none; border: 0; color: #64748b; font-size: 13px;
                        margin-top: 8px; }
.empty { color: #94a3b8; padding: 16px 4px; font-size: 13px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 56px;
         background: #0f172a; color: #fff; padding: 8px 14px; border-radius: 8px;
         font-size: 13px; z-index: 200; max-width: 90vw; }
.toast.err { background: #dc2626; }
.btn { padding: 6px 12px; border: 1px solid #cbd5e1; background: #fff;
       border-radius: 6px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn.primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.admin-form { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 720px) { .admin-form { grid-template-columns: repeat(3, 1fr); }
  .admin-form .admin-actions { grid-column: 1 / -1; } }
.admin-form label, .user-edit label { display: flex; flex-direction: column;
       gap: 4px; font-size: 12px; color: #64748b; }
.admin-form input, .admin-form select, .user-edit input, .user-edit select {
       padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px;
       font-size: 13px; width: 100%; background: #fff; }
.user-row { padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.user-row:last-child { border-bottom: 0; }
.user-line { display: flex; align-items: center; gap: 8px; font-size: 13px;
             flex-wrap: wrap; }
.user-line .phone { color: #64748b; }
.user-edit { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
             align-items: flex-end; }
.user-edit label { min-width: 96px; }
.user-edit .btn { margin-bottom: 1px; }
