* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft Yahei", sans-serif; background: #f5f7fb; color: #1f2933; display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
aside { background: #0f2540; color: #cbd5e1; padding: 18px 12px; min-height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; gap: 6px; }
aside .brand { display: flex; align-items: center; gap: 10px; padding: 8px 6px 18px; }
aside .brand span { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #34d399, #2563eb); display: grid; place-items: center; font-weight: 700; color: #fff; }
aside .brand b { display: block; font-size: 16px; color: #fff; }
aside .brand small { color: #94a3b8; }
aside .nav-group { margin: 10px 8px 2px; font-size: 12px; color: #7dd3fc; opacity: .9; letter-spacing: .08em; }
aside .nav { background: transparent; border: 0; color: #cbd5e1; text-align: left; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
aside .nav:hover { background: rgba(255,255,255,.05); color: #fff; }
aside .nav.active { background: linear-gradient(90deg, #2563eb, #38bdf8); color: #fff; }
aside .nav.danger-nav { margin-top: auto; color: #fca5a5; }
aside .nav.danger-nav:hover { background: rgba(248, 113, 113, .15); color: #fff; }

main { padding: 24px 28px 60px; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
header h1 { margin: 0 0 4px; font-size: 22px; }
header p { margin: 0; color: #64748b; font-size: 13px; }
.header-actions button { margin-left: 8px; }

button, .ghost, .primary, .danger { font-size: 13px; padding: 7px 13px; border-radius: 7px; cursor: pointer; border: 1px solid transparent; }
button { background: #fff; border-color: #cbd5e1; color: #1f2933; }
button:hover { background: #f1f5f9; }
.primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.primary:hover { background: #1d4ed8; }
.danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.danger:hover { background: #dc2626; }
.ghost { background: #fff; border-color: #2563eb; color: #2563eb; }
.ghost:hover { background: #eff6ff; }

.panel { display: none; background: #fff; border-radius: 14px; padding: 20px 22px; box-shadow: 0 4px 20px rgba(15, 37, 64, .04); margin-bottom: 18px; }
.panel.active { display: block; }
.panel h2 { margin: 0 0 14px; font-size: 17px; }
.panel h3.sub { margin: 18px 0 8px; font-size: 14px; color: #475569; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.muted-text { color: #64748b; font-size: 12px; margin: -6px 0 14px; line-height: 1.7; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.stat { background: linear-gradient(135deg, #eff6ff, #f0fdf4); padding: 14px 16px; border-radius: 12px; }
.stat small { color: #64748b; font-size: 12px; }
.stat b { display: block; font-size: 22px; margin-top: 4px; color: #0f172a; }

.status-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.status-tabs button { background: #f1f5f9; border-color: transparent; color: #475569; }
.status-tabs button.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.sub-tabs { display: flex; gap: 6px; margin: 4px 0 16px; flex-wrap: wrap; padding: 4px; background: #eef2f6; border-radius: 10px; width: fit-content; }
.sub-tabs button { background: transparent; border: 0; padding: 7px 16px; border-radius: 8px; color: #475569; font-size: 13px; cursor: pointer; }
.sub-tabs button.active { background: #fff; color: #0f172a; box-shadow: 0 2px 6px rgba(15,37,64,.08); font-weight: 600; }

.list { display: flex; flex-direction: column; gap: 10px; }
.item { background: #f8fafc; border-radius: 10px; padding: 14px 16px; display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; align-items: center; }
.item.simple { grid-template-columns: 1fr auto; }
.item .title { font-weight: 600; font-size: 14px; }
.item .meta { color: #64748b; font-size: 12px; margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.item p { margin: 8px 0 0; color: #334155; font-size: 13px; line-height: 1.6; }
.thumb { width: 80px; height: 60px; border-radius: 8px; object-fit: cover; background: #e2e8f0; }
.ops { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.category-fee-box { margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; width: fit-content; max-width: 100%; }
.category-fee-box label { color: #0f172a; font-size: 12px; font-weight: 600; }
.category-fee-box input { width: 130px; }
.category-desc { margin-top: 6px; color: #64748b; font-size: 12px; line-height: 1.6; }
.category-fee-note { margin-top: 8px; color: #64748b; font-size: 12px; line-height: 1.6; }
.category-switch-label { color: #475569; font-size: 12px; padding-right: 4px; }
.category-switch-row { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: #475569; font-size: 12px; }
.switch-on { color: #166534; }
.switch-off { color: #991b1b; }

.empty { padding: 24px; text-align: center; color: #94a3b8; font-size: 13px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; margin-left: 6px; background: #e2e8f0; color: #475569; }
.badge.pending { background: #fef3c7; color: #92400e; }
.badge.approved { background: #dcfce7; color: #166534; }
.badge.rejected { background: #fee2e2; color: #991b1b; }
.badge.blocked { background: #fee2e2; color: #991b1b; }
.badge.unread { background: #fef3c7; color: #92400e; }
.badge.read { background: #e2e8f0; color: #475569; }
.badge.paid { background: #dbeafe; color: #1d4ed8; }
.badge.refunded { background: #fee2e2; color: #991b1b; }
.badge.handled { background: #dcfce7; color: #166534; }
.badge.published { background: #dcfce7; color: #166534; }
.badge.draft { background: #f1f5f9; color: #475569; }
.badge.free { background: #dcfce7; color: #166534; }
.badge.platform { background: #e0e7ff; color: #4338ca; }
.badge.super_admin { background: #fef3c7; color: #92400e; }
.badge.reviewer { background: #dbeafe; color: #1d4ed8; }
.badge.finance { background: #dcfce7; color: #166534; }
.badge.operator { background: #ede9fe; color: #5b21b6; }
.badge.buyer { background: #ffe4e6; color: #be123c; }
.badge.seller { background: #cffafe; color: #155e75; }

.config-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.config-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #475569; }
.config-form input, .config-form select, .config-form textarea, textarea, input[type="text"], input:not([type]), input[type="password"], input[type="number"] { padding: 9px 11px; border-radius: 8px; border: 1px solid #cbd5e1; font-size: 13px; background: #fff; color: #1f2933; outline: none; font-family: inherit; }
.config-form input:focus, .config-form select:focus, .config-form textarea:focus, textarea:focus, input:focus { border-color: #2563eb; }
.config-form textarea { min-height: 70px; resize: vertical; }
.config-form .full { grid-column: 1 / -1; }
.config-form button { grid-column: 1 / -1; justify-self: flex-start; }

.filter-form { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)) auto; gap: 12px; align-items: end; margin: 0 0 16px; padding: 14px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; }
.filter-form label { display: flex; flex-direction: column; gap: 6px; color: #475569; font-size: 12px; }
.filter-form input, .filter-form select { padding: 9px 11px; border-radius: 8px; border: 1px solid #cbd5e1; font-size: 13px; background: #fff; color: #1f2933; outline: none; font-family: inherit; }
.filter-form input:focus, .filter-form select:focus { border-color: #2563eb; }
.filter-actions { display: flex; gap: 8px; flex-wrap: nowrap; }

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.inline-form input { flex: 1 1 160px; }
textarea#sensitiveWords { width: 100%; margin-bottom: 10px; }

#toast { position: fixed; left: 50%; bottom: 50px; transform: translateX(-50%) translateY(20px); background: #0f172a; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 999; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.login-mask { position: fixed; inset: 0; background: linear-gradient(135deg, #0f2540, #2563eb); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.login-card { background: #fff; padding: 30px 32px; border-radius: 16px; width: 360px; box-shadow: 0 20px 60px rgba(15, 37, 64, .35); }
.login-card .brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-card .brand-row span { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #34d399, #2563eb); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px; }
.login-card .brand-row b { display: block; font-size: 17px; }
.login-card .brand-row small { color: #64748b; font-size: 12px; }
.login-card input { width: 100%; margin-bottom: 12px; }
.login-card button.primary { width: 100%; padding: 10px; }
.login-tip { color: #94a3b8; font-size: 11px; margin-top: 14px; line-height: 1.7; }
