/* ============ 55Haitao-style publisher panel ============ */
*{box-sizing:border-box;margin:0;padding:0}
html,body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;color:#1f2937;background:#f4f6fa;font-size:14px;line-height:1.5}
a{text-decoration:none;color:#2563eb}

/* ======= Top bar ======= */
.topbar{background:#fff;border-bottom:1px solid #e5e7eb;height:56px;position:sticky;top:0;z-index:100;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.topbar-inner{max-width:1920px;margin:0 auto;padding:0 24px;height:100%;display:flex;align-items:center;gap:40px}
.logo{display:flex;align-items:center;gap:10px;color:#111827}
.logo-badge{background:linear-gradient(135deg,#ff6b35,#ff3b30);color:#fff;padding:2px 8px;border-radius:6px;font-weight:800;font-size:16px;letter-spacing:1px}
.logo-text{font-weight:700;font-size:17px}
.logo-sub{color:#9ca3af;font-size:11px;border-left:1px solid #e5e7eb;padding-left:10px}
.top-nav{display:flex;gap:8px;flex:1}
.top-nav a{padding:8px 14px;border-radius:8px;color:#4b5563;font-weight:500;font-size:14px}
.top-nav a:hover{background:#f3f4f6;color:#111}
.top-nav a.active{background:#fff4ef;color:#ff3b30}
.top-user{display:flex;align-items:center;gap:12px}
.wallet{background:#f0fdf4;color:#15803d;padding:4px 10px;border-radius:6px;font-weight:600;font-size:13px;border:1px solid #bbf7d0}
.avatar{width:34px;height:34px;background:linear-gradient(135deg,#ff6b35,#ff3b30);color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px}
.user-info{min-width:140px}
.uname{font-weight:600;font-size:13px;color:#111}
.uemail{font-size:11px;color:#6b7280}
.badge-vip{background:linear-gradient(135deg,#fcd34d,#f59e0b);color:#78350f;font-size:11px;font-weight:700;padding:3px 8px;border-radius:4px}

/* ======= Layout ======= */
.wrapper{max-width:1920px;margin:0 auto;display:grid;grid-template-columns:230px 1fr;gap:20px;padding:20px 24px;min-height:calc(100vh - 56px - 60px)}

/* ======= Sidebar ======= */
.sidebar{position:sticky;top:76px;align-self:start}
.sidemenu{background:#fff;border-radius:10px;padding:12px 8px;box-shadow:0 1px 2px rgba(0,0,0,.04);border:1px solid #eef0f4}
.side-title{font-size:11px;color:#9ca3af;padding:12px 12px 6px;letter-spacing:1.5px;text-transform:uppercase;font-weight:700}
.side-item{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:8px;color:#4b5563;font-size:13.5px;margin:2px 0;cursor:pointer}
.side-item:hover{background:#f3f4f6;color:#111}
.side-item.active{background:#fff4ef;color:#ff3b30;font-weight:600}
.side-item .ic{font-size:15px;width:22px;text-align:center}
.side-news{margin-top:14px;background:#fff;border-radius:10px;padding:14px;border:1px solid #eef0f4;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.news-title{font-weight:700;font-size:13px;color:#111;margin-bottom:10px}
.news-item{font-size:12px;color:#4b5563;padding:7px 8px;border-left:2px solid #ff3b30;padding-left:10px;margin-bottom:6px;background:#fff8f6}

/* ======= Main ======= */
.main{min-width:0}
.breadcrumb{background:#fff;padding:10px 16px;border-radius:8px;font-size:12px;color:#6b7280;margin-bottom:14px;border:1px solid #eef0f4;display:flex;align-items:center}
.breadcrumb b{color:#111}
.env-tag{color:#6b7280}
.dot-green{display:inline-block;width:8px;height:8px;background:#10b981;border-radius:50%;margin-right:6px;animation:pulse 2s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}
.pull-right{margin-left:auto}

.page-title{font-size:22px;color:#111;font-weight:700;margin-bottom:4px}
.subtitle{color:#6b7280;font-size:13.5px;margin-bottom:18px}
.u-link{color:#ff3b30;font-weight:500}
.u-link.small{font-size:12px}

/* ======= Cards / grids ======= */
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}
.grid-5{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:22px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.card{background:#fff;border-radius:10px;padding:16px;border:1px solid #eef0f4}
.card-label{font-size:12px;color:#6b7280;margin-bottom:6px}
.card-value{font-size:20px;font-weight:700;color:#111}
.card-sub{font-size:12px;color:#6b7280;margin-top:8px;line-height:1.6}
.c-green{color:#10b981}
.c-red{color:#ff3b30}
.lv{background:linear-gradient(135deg,#f59e0b,#d97706);color:#fff;padding:1px 7px;border-radius:4px;font-size:12px;margin-right:6px}
.stat{background:#fff;border-radius:10px;padding:14px 16px;border:1px solid #eef0f4;position:relative}
.s-label{font-size:12px;color:#6b7280}
.s-value{font-size:20px;font-weight:700;color:#111;margin:4px 0}
.s-delta{font-size:12px;font-weight:600}
.s-delta.up{color:#10b981}

.section-title{font-size:15px;font-weight:700;color:#111;margin:18px 0 10px;padding-left:8px;border-left:3px solid #ff3b30}

/* ======= Panels / Tables ======= */
.panel{background:#fff;border-radius:10px;padding:18px;border:1px solid #eef0f4}
.panel-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;font-weight:700;color:#111;font-size:14.5px}
.tbl{width:100%;border-collapse:collapse;font-size:13px}
.tbl th{text-align:left;padding:10px 12px;background:#f9fafb;color:#4b5563;font-weight:600;border-bottom:1px solid #e5e7eb;font-size:12px}
.tbl td{padding:12px;border-bottom:1px solid #f3f4f6;color:#1f2937;vertical-align:middle}
.tbl tr:last-child td{border-bottom:0}
.tbl.kv th{width:30%;font-weight:600;background:transparent;border-bottom:1px dashed #e5e7eb;text-align:right;padding-right:16px;color:#6b7280}
.tbl.kv td{border-bottom:1px dashed #e5e7eb}
.tbl .muted{font-size:12px;color:#6b7280;margin-top:2px}
.muted{font-size:12px;color:#6b7280}
.mini{color:#2563eb;font-size:12px;margin-right:8px}

/* Tags */
.tag-web,.tag-sub,.tag-search{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}
.tag-web{background:#dbeafe;color:#1e40af}
.tag-sub{background:#ede9fe;color:#5b21b6}
.tag-search{background:#fef3c7;color:#92400e}

.st-ok{background:#dcfce7;color:#166534;padding:3px 8px;border-radius:4px;font-weight:600;font-size:12px}
.st-wait{background:#fef3c7;color:#92400e;padding:3px 8px;border-radius:4px;font-weight:600;font-size:12px}
.st-joined{background:#fff4ef;color:#ff3b30;padding:2px 8px;border-radius:4px;font-weight:700;font-size:11px;margin-left:8px;border:1px solid #fed7aa}
.st-promote{background:#dcfce7;color:#166534;padding:2px 8px;border-radius:4px;font-weight:700;font-size:11px;margin-left:4px}

/* merchant rows */
.merchant-row{display:grid;grid-template-columns:54px 1fr auto;gap:14px;padding:14px;border:1px solid #f1f5f9;border-radius:10px;margin-bottom:10px;align-items:center}
.merchant-row:hover{border-color:#ffd4c3;background:#fffaf7}
.m-logo{width:48px;height:48px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;font-size:15px;letter-spacing:.5px}
.m-log-amz{background:linear-gradient(135deg,#232f3e,#ff9900);color:#fff}
.m-log-dby{background:linear-gradient(135deg,#7b1e25,#b18b4a);color:#fff}
.m-log-fox{background:linear-gradient(135deg,#0069a3,#003c6b);color:#fff}
.m-name{font-weight:700;color:#111;font-size:14.5px;margin-bottom:5px}
.m-meta{font-size:12px;color:#6b7280}
.btn-outline{background:#fff;border:1px solid #ff3b30;color:#ff3b30;padding:7px 14px;border-radius:7px;font-weight:600;font-size:12px}
.btn-outline:hover{background:#ff3b30;color:#fff}
.foot-note{margin-top:12px;font-size:12px;color:#6b7280;background:#f9fafb;padding:8px 10px;border-radius:6px}

/* buttons primary */
.btn-primary{background:linear-gradient(135deg,#ff6b35,#ff3b30);color:#fff;border:0;padding:10px 18px;border-radius:8px;font-weight:700;cursor:pointer;box-shadow:0 3px 8px rgba(255,59,48,.25);font-size:13px}
.btn-primary:hover{filter:brightness(1.05)}
.btn-ghost{background:#f3f4f6;color:#4b5563;border:0;padding:10px 16px;border-radius:8px;font-weight:600;cursor:pointer;font-size:13px}

/* detail blocks */
.detail-head{display:grid;grid-template-columns:110px 1fr auto;gap:18px;padding:18px;background:linear-gradient(135deg,#fff7ed,#fef2f2);border-radius:12px;border:1px solid #ffedd5;margin-bottom:18px;align-items:center}
.detail-logo{width:92px;height:92px;border-radius:14px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:28px;letter-spacing:1px;box-shadow:0 6px 16px rgba(0,0,0,.1)}
.detail-title{font-size:22px;font-weight:700;color:#111;margin-bottom:8px}
.detail-tags{margin-bottom:8px}
.detail-meta{font-size:13px;color:#4b5563;display:grid;grid-template-columns:1fr 1fr;gap:6px 16px}
.detail-meta span b{color:#111}
.detail-actions{display:flex;flex-direction:column;gap:8px;min-width:180px}

.tabs{display:flex;border-bottom:2px solid #e5e7eb;margin-bottom:16px}
.tab{padding:10px 18px;font-weight:600;font-size:13.5px;color:#6b7280;cursor:pointer;margin-bottom:-2px;border-bottom:2px solid transparent}
.tab.active{color:#ff3b30;border-bottom:2px solid #ff3b30}
.kv-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1px;background:#e5e7eb;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;margin-bottom:18px}
.kv-item{background:#fff;padding:13px 16px}
.kv-item .k{font-size:12px;color:#6b7280;margin-bottom:4px}
.kv-item .v{font-size:14px;font-weight:600;color:#111}
.commission-box{background:#fef9c3;border:1px dashed #fbbf24;border-radius:10px;padding:14px;margin-bottom:16px}
.commission-box h4{color:#854d0e;font-size:14px;margin-bottom:8px}

/* filter bar */
.filter-bar{background:#fff;padding:14px 16px;border-radius:10px;margin-bottom:14px;border:1px solid #eef0f4;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.filter-bar .inp{border:1px solid #d1d5db;padding:7px 12px;border-radius:7px;font-size:13px;min-width:220px;outline:none}
.filter-bar .inp:focus{border-color:#ff3b30}
.filter-bar label{font-size:12px;color:#6b7280;margin-right:-4px}

/* footer */
.footer{text-align:center;padding:18px 0;color:#9ca3af;font-size:12px;border-top:1px solid #e5e7eb;background:#fff}
.footer a{color:#6b7280}

/* scrollbar niceness */
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:4px}
::-webkit-scrollbar-thumb:hover{background:#9ca3af}
