:root {
  --bg: #0d0d12; --panel: #16161e; --panel2: #1e1e28; --line: #2a2a36; --text: #f2f2f5; --muted: #9a9aab;
  --accent: #c6f432; --accent-ink: #0d0d12; --good: #3ddc84; --bad: #ff5c6c; --warn: #ffb547; --info: #7aa7ff;
  --radius: 14px; --shadow: 0 8px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f6f3; --panel: #ffffff; --panel2: #f0f0ec; --line: #e2e2dc; --text: #15151b; --muted: #6a6a78;
    --accent: #b7e61a; --shadow: 0 6px 24px rgba(0, 0, 0, .07);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
h1 { font-size: 28px; line-height: 1.15; margin: 0 0 8px; letter-spacing: -.02em; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { margin: 4px 0 6px; font-size: 17px; line-height: 1.25; }
.muted { color: var(--muted); }
.pre { white-space: pre-wrap; }
.center { text-align: center; }
.r { text-align: right; }
.grow { flex: 1; min-width: 0; }
.pad { padding: 24px 16px; }
.bad-text { color: var(--bad); font-size: 13px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: -.02em; }
#nav { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
#nav .links { flex: 1; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
#nav a { text-decoration: none; white-space: nowrap; }
#nav .links a { padding: 6px 10px; border-radius: 8px; color: var(--muted); }
#nav .links a.on, #nav .links a:hover { color: var(--text); background: var(--panel2); }
#nav .me { color: var(--muted); }
.banner { background: var(--warn); color: #1b1300; text-align: center; font-size: 13px; padding: 6px 16px; font-weight: 600; }
@media (max-width: 720px) {
  .top { flex-wrap: wrap; gap: 8px; }
  #nav { order: 3; width: 100%; flex-basis: 100%; }
  .logo span { display: none; }
  #nav .me { display: none; }
}

/* buttons, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 10px 16px;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.sm { padding: 6px 12px; font-size: 14px; }
.btn.ghost { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.btn.danger { color: var(--bad); }
input, textarea, select { width: 100%; font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form { display: grid; gap: 14px; }
.form label { display: block; font-weight: 600; font-size: 14px; }
.form label > input, .form label > textarea, .form label > select { display: block; margin-top: 6px; }
.form label .muted { font-weight: 400; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; display: grid; gap: 12px; }
legend { font-weight: 700; padding: 0 6px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.form .check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: auto; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.form-error { color: var(--bad); margin: 0; min-height: 0; }
.form-error:empty { display: none; }

/* layout */
main { max-width: 1160px; margin: 0 auto; padding: 0 16px 60px; }
.page { padding-top: 24px; }
.page.narrow { max-width: 720px; margin: 0 auto; }
.page.auth { max-width: 420px; margin: 0 auto; padding-top: 48px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 48px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
details { margin-top: 12px; }
summary { cursor: pointer; color: var(--muted); }
ul.plain { padding-left: 18px; margin: 8px 0 0; }

/* discover */
.hero { padding: 40px 0 24px; }
.hero h1 { font-size: clamp(30px, 6vw, 52px); max-width: 760px; }
.hero .hl { color: var(--accent); }
.hero p { color: var(--muted); max-width: 620px; font-size: 17px; margin: 10px 0 20px; }
.hero-stats { display: flex; gap: 28px; }
.hero-stats b { display: block; font-size: 24px; }
.hero-stats span { color: var(--muted); font-size: 13px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0 18px; }
.filters input { flex: 1 1 220px; width: auto; }
.filters select { width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-art { height: 92px; display: flex; align-items: flex-end; padding: 10px 14px; }
.card-art span, .c-art span { font-weight: 900; font-size: 34px; color: rgba(255, 255, 255, .92); text-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.card-body { padding: 14px; display: grid; gap: 8px; flex: 1; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.brand { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.rate { font-size: 20px; color: var(--accent); }
@media (prefers-color-scheme: light) { .rate { color: #4b6b00; } }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-top: auto; }
.bar { height: 8px; background: var(--panel2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.plats { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.plat { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); }
.p-tiktok { color: #ff4f8b; } .p-instagram { color: #e1306c; } .p-youtube { color: #ff3b30; } .p-x { color: var(--text); }
.badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; background: var(--panel2); color: var(--muted); white-space: nowrap; }
.b-active, .b-approved, .b-paid { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.b-pending, .b-requested, .b-sending, .b-paused { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.b-rejected, .b-cancelled { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.b-completed { background: color-mix(in srgb, var(--info) 18%, transparent); color: var(--info); }

/* campaign page */
.c-head { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.c-art { width: 88px; height: 88px; flex: none; border-radius: 20px; background: var(--art); display: grid; place-items: center; }
.c-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } .col-side { order: -1; } }
.stats dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 16px 0 0; font-size: 14px; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; text-align: right; }
.mini { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.mini:first-of-type { border-top: 0; }
.owner { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; }
.review { display: grid; grid-template-columns: minmax(0, 1fr) 120px 80px auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.review:first-of-type { border-top: 0; }
.review-main { font-size: 14px; }
.views-in { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.views-in input { padding: 6px 8px; }
.earn { font-size: 13px; }
@media (max-width: 620px) { .review { grid-template-columns: 1fr 1fr; } .review-main, .review .actions { grid-column: 1 / -1; } }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl th.r { text-align: right; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.box:has(> .tbl) { overflow-x: auto; }

/* lists, tiles */
.list { display: grid; gap: 10px; }
.row-card { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; flex-wrap: wrap; }
a.row-card:hover { border-color: var(--muted); }
.row-card .dot { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.row-card .muted { font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 2px; }
.tile span { color: var(--muted); font-size: 13px; }
.tile b { font-size: 22px; }
.tile.big b { font-size: 30px; color: var(--accent); }
.tile a { font-size: 13px; color: var(--accent); text-decoration: none; }
.board { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.board li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.board .pos { width: 28px; font-weight: 800; color: var(--muted); }
.board .podium .pos { color: var(--accent); }
.board .muted { font-size: 13px; }

/* toast */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); color: #fff; }
#toast.good { background: var(--good); color: #062b14; }
