/* 抖音来客结算系统 V2.0 - 浅色主题 */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; background:#f5f5f5; color:#222; font-size:14px; }
a { text-decoration:none; color:inherit; }
button { cursor:pointer; font-family:inherit; }
input,select { font-family:inherit; }

/* 登录页 */
.login-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#f7f8fa,#e9ecf2); }
.login-card { background:#fff; border:1px solid #e8e8e8; border-radius:12px; padding:40px 36px; width:360px; box-shadow:0 6px 24px rgba(0,0,0,.06); }
.login-card h1 { font-size:22px; text-align:center; color:#1a1a1a; }
.login-sub { text-align:center; color:#999; font-size:13px; margin:6px 0 28px; }
.login-card input { width:100%; height:44px; border:1px solid #dcdfe6; border-radius:8px; padding:0 14px; margin-bottom:14px; font-size:15px; }
.login-card input:focus { border-color:#ff5a3c; outline:none; }
.login-card button { width:100%; height:46px; background:#ff5a3c; color:#fff; border:none; border-radius:8px; font-size:16px; font-weight:600; margin-top:6px; }
.login-card button:hover { background:#f0492b; }
.login-err { color:#e64340; text-align:center; min-height:20px; margin-top:12px; font-size:13px; }
.login-tip { color:#bbb; font-size:12px; text-align:center; margin-top:14px; }

/* 布局 */
.layout { display:flex; min-height:100vh; }
.sidebar { width:200px; background:#fff; border-right:1px solid #e8e8e8; display:flex; flex-direction:column; flex-shrink:0; position:sticky; top:0; height:100vh; }
.logo { padding:20px; font-size:17px; font-weight:700; color:#ff5a3c; border-bottom:1px solid #f0f0f0; }
.sidebar nav { flex:1; padding:10px 0; }
.sidebar nav .nav-item { display:block; padding:13px 20px; color:#555; font-size:14px; border-left:3px solid transparent; }
.sidebar nav .nav-item:hover { background:#fafafa; color:#ff5a3c; }
.sidebar nav .nav-item.active { background:#fff4f2; color:#ff5a3c; border-left-color:#ff5a3c; font-weight:600; }
.sidebar-foot { padding:14px 20px; border-top:1px solid #f0f0f0; font-size:13px; color:#888; display:flex; justify-content:space-between; align-items:center; }
.sidebar-foot a { color:#ff5a3c; }

.content { flex:1; padding:0; min-width:0; }
.page-bar { background:#fff; border-bottom:1px solid #e8e8e8; padding:16px 24px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; position:sticky; top:0; z-index:10; }
.page-title { font-size:18px; font-weight:700; }
.page-tools { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.page-body { padding:20px 24px; }

/* 控件 */
.btn { display:inline-flex; align-items:center; gap:5px; height:36px; padding:0 16px; border:1px solid #dcdfe6; background:#fff; border-radius:6px; font-size:14px; color:#333; }
.btn:hover { border-color:#ff5a3c; color:#ff5a3c; }
.btn.primary { background:#ff5a3c; color:#fff; border-color:#ff5a3c; }
.btn.primary:hover { background:#f0492b; color:#fff; }
.btn.sm { height:30px; padding:0 10px; font-size:13px; }
.btn.danger { color:#e64340; }
.btn:disabled { opacity:.5; cursor:not-allowed; }
select,input[type=text],input[type=number],input[type=password],input[type=date],input[type=file] { height:36px; border:1px solid #dcdfe6; border-radius:6px; padding:0 10px; font-size:14px; background:#fff; }
select:focus,input:focus { border-color:#ff5a3c; outline:none; }
label.chk { display:inline-flex; align-items:center; gap:5px; font-size:14px; color:#555; }

/* 卡片/统计 */
.stat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:14px; margin-bottom:20px; }
.stat-card { background:#fff; border:1px solid #eee; border-radius:8px; padding:16px 18px; }
.stat-card .label { color:#888; font-size:13px; }
.stat-card .val { font-size:24px; font-weight:700; margin-top:6px; color:#1a1a1a; }
.stat-card .val.red { color:#e64340; }
.stat-card .val.green { color:#2ea043; }

/* 表格 */
.table-card { background:#fff; border:1px solid #eee; border-radius:8px; overflow:hidden; margin-bottom:20px; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th,td { padding:10px 12px; text-align:left; border-bottom:1px solid #f0f0f0; white-space:nowrap; }
th { background:#fafafa; color:#666; font-weight:600; position:sticky; top:57px; cursor:pointer; user-select:none; }
th:hover { color:#ff5a3c; }
tbody tr:hover { background:#fafafa; }
td.num,th.num { text-align:right; font-variant-numeric:tabular-nums; }
td.center,th.center { text-align:center; }
tfoot td { background:#fafafa; font-weight:700; color:#1a1a1a; }
.table-wrap { max-height:calc(100vh - 220px); overflow:auto; }
.tag { display:inline-block; padding:2px 8px; border-radius:4px; font-size:12px; }
.tag.conflict { background:#fff1f0; color:#e64340; }
.tag.guahu { background:#fff8e6; color:#d48806; }
.tag.ok { background:#f0f9eb; color:#529b2e; }
.tag.self { background:#f0f5ff; color:#2f54eb; }
.tag.external { background:#f9f0ff; color:#722ed1; }
.followers { color:#999; font-size:12px; }

/* 弹窗 */
.modal-mask { position:fixed; inset:0; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; z-index:100; }
.modal { background:#fff; border-radius:10px; padding:24px; min-width:420px; max-width:90vw; max-height:88vh; overflow:auto; }
.modal h3 { font-size:17px; margin-bottom:16px; }
.modal .form-row { margin-bottom:14px; }
.modal .form-row label { display:block; color:#666; font-size:13px; margin-bottom:6px; }
.modal .form-row input,.modal .form-row select { width:100%; }
.modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:20px; }

/* 明细下钻 */
.detail-list { max-height:400px; overflow:auto; border:1px solid #f0f0f0; border-radius:6px; }
.detail-list table { font-size:12px; }

/* toast */
.toast { position:fixed; top:24px; left:50%; transform:translateX(-50%); background:#333; color:#fff; padding:10px 20px; border-radius:6px; font-size:14px; z-index:200; opacity:0; transition:.3s; pointer-events:none; }
.toast.show { opacity:1; }
.empty { text-align:center; color:#999; padding:60px 0; }
.muted { color:#999; }
.pos { color:#e64340; }
.neg { color:#2ea043; }
