/* 码号投诉指数查询平台 - 会员/代理后台样式 */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f4f6fb;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.6;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: none; opacity: .85; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 210px; flex: 0 0 210px; background: #0f172a; color: #cbd5e1;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-logo {
    width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg,#3b82f6,#6366f1);
    color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.brand-text { color: #f1f5f9; font-weight: 600; letter-spacing: .5px; }
.nav { padding: 10px 8px; flex: 1; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
    color: #94a3b8; font-size: 13.5px; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #e2e8f0; }
.nav-item.active { background: linear-gradient(90deg,rgba(59,130,246,.25),rgba(99,102,241,.12)); color: #fff; }
.nav-item.active .ico { color: #60a5fa; }
.ico { width: 16px; height: 16px; display: inline-block; background: currentColor; opacity: .8;
    -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.sidebar-foot { padding: 10px 8px 16px; border-top: 1px solid rgba(255,255,255,.07); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 58px; background: #fff; border-bottom: 1px solid #e8ecf3; display: flex;
    align-items: center; justify-content: space-between; padding: 0 22px; position: sticky; top: 0; z-index: 10;
}
.crumb { font-size: 15px; font-weight: 600; color: #0f172a; }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #64748b; }
.role-tag { background: #eef2ff; color: #4f46e5; padding: 2px 8px; border-radius: 20px; font-size: 12px; }
.nick { color: #334155; font-weight: 600; }
.balance b { color: #ea580c; font-size: 14px; }
.content { padding: 20px 22px 40px; }

/* ---------- 卡片 ---------- */
.card { background: #fff; border: 1px solid #e8ecf3; border-radius: 12px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.card-head { padding: 14px 18px; border-bottom: 1px solid #eef2f7; display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 15px; font-weight: 600; color: #0f172a; margin: 0; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

/* ---------- 统计块 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid #e8ecf3; border-radius: 12px; padding: 16px 18px; }
.stat .label { color: #64748b; font-size: 12.5px; }
.stat .value { font-size: 24px; font-weight: 700; color: #0f172a; margin-top: 6px; letter-spacing: -.5px; }
.stat .value small { font-size: 13px; font-weight: 500; color: #94a3b8; }
.stat.accent { background: linear-gradient(135deg,#1d4ed8,#4f46e5); border: none; }
.stat.accent .label { color: rgba(255,255,255,.75); }
.stat.accent .value { color: #fff; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid #eef2f7; font-size: 13px; }
th { background: #f8fafc; color: #475569; font-weight: 600; white-space: nowrap; font-size: 12.5px; }
tbody tr:hover { background: #f9fbff; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.muted { color: #94a3b8; }
.nowrap { white-space: nowrap; }

/* ---------- 徽标 ---------- */
.badge { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 12px; line-height: 19px; }
.badge.gray { background: #f1f5f9; color: #64748b; }
.badge.blue { background: #eff6ff; color: #2563eb; }
.badge.green { background: #ecfdf5; color: #059669; }
.badge.red { background: #fef2f2; color: #dc2626; }
.badge.orange { background: #fff7ed; color: #ea580c; }

/* ---------- 进度 ---------- */
.progress { height: 6px; background: #eef2f7; border-radius: 20px; overflow: hidden; width: 100%; min-width: 60px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg,#3b82f6,#6366f1); border-radius: 20px; transition: width .4s; }

/* ---------- 表单 ---------- */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; color: #475569; margin-bottom: 6px; font-weight: 500; }
.form-control, select.form-control, textarea.form-control {
    width: 100%; padding: 9px 12px; border: 1px solid #dbe2ec; border-radius: 8px; font-size: 13.5px;
    background: #fff; color: #1f2937; outline: none; transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.form-control:focus { border-color: #93b4fd; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
textarea.form-control { min-height: 120px; resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.help { font-size: 12px; color: #94a3b8; margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } .sidebar { display: none; } }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 13.5px;
    border: 1px solid #dbe2ec; background: #fff; color: #334155; cursor: pointer; font-family: inherit;
    transition: all .15s;
}
.btn:hover { border-color: #c3cee0; background: #f8fafc; }
.btn-primary { background: linear-gradient(135deg,#2563eb,#4f46e5); border: none; color: #fff; }
.btn-primary:hover { opacity: .92; background: linear-gradient(135deg,#1d4ed8,#4338ca); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 6px; }
.btn-danger { color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 6px; align-items: center; padding: 14px 18px; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid #e2e8f0; border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: #475569; background: #fff;
}
.pager .active { background: #2563eb; border-color: #2563eb; color: #fff; }
.pager .info { border: none; color: #94a3b8; background: transparent; }

/* ---------- 提示 ---------- */
.alert { padding: 11px 14px; border-radius: 9px; font-size: 13px; margin-bottom: 16px; }
.alert-info { background: #eff6ff; color: #1d4ed8; }
.alert-warn { background: #fff7ed; color: #c2410c; }
.alert-error { background: #fef2f2; color: #b91c1c; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(1200px 600px at 20% 10%, #1e3a8a 0%, #0f172a 55%, #020617 100%); padding: 20px; }
.login-card { width: 380px; background: #fff; border-radius: 16px; padding: 34px 32px 28px; box-shadow: 0 24px 60px rgba(2,6,23,.45); }
.login-card h1 { font-size: 20px; margin: 0 0 4px; color: #0f172a; }
.login-card .sub { color: #94a3b8; font-size: 13px; margin-bottom: 22px; }
.login-card .btn-primary { width: 100%; justify-content: center; padding: 10px; font-size: 14px; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.login-err { color: #dc2626; font-size: 13px; margin-bottom: 12px; display: none; }

/* ---------- 场景价格卡 ---------- */
.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.scene-item { border: 1px solid #e8ecf3; border-radius: 10px; padding: 12px 14px; cursor: pointer; background: #fff; transition: all .15s; }
.scene-item:hover { border-color: #bfdbfe; }
.scene-item.on { border-color: #2563eb; background: #f5f9ff; box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.scene-item .code { font-size: 12px; color: #94a3b8; }
.scene-item .name { font-weight: 600; color: #0f172a; margin: 2px 0 4px; }
.scene-item .price { color: #ea580c; font-weight: 700; }

/* ---------- 结果指标 ---------- */
.s-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 6px; padding: 1px 7px; font-size: 12px; color: #475569; }
.chip b { color: #0f172a; }
