/* Lucky branding — colours sampled from lucky.fun (2026-12-02) */
@font-face { font-family: Inter; src: url(/assets/inter-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(/assets/inter-latin-700-normal.woff2) format('woff2'); font-weight: 600 800; font-display: swap; }
@font-face { font-family: Rubik; src: url(/assets/rubik-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #002a17;          /* page */
  --bg-deep: #00200f;
  --glow: #1c642e;        /* top radial glow */
  --header: #00361f;
  --side: #014326;
  --side-line: #0a5531;
  --card: #01301b;        /* panels */
  --card-2: #0c3a24;      /* hover / dark buttons */
  --input: #011e14;       /* search bar */
  --line: #0c4a2b;
  --text: #ffffff;
  --mute: #8fb5a1;
  --green: #03b227;       /* primary button */
  --green-hi: #09d333;
  --win: #19d35a;         /* positive numbers */
  --gold: #f9c916;
  --bad: #ff6b5e;
  --side-w: 216px;
  --top-h: 70px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg-deep); }
body {
  margin: 0; color: var(--text); font-size: 14px; min-height: 100vh;
  background:
    radial-gradient(ellipse 900px 420px at 50% -60px, #2f8a3d 0%, var(--glow) 30%, transparent 75%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%) fixed;
}

/* Header + sidebar */
.top { position: fixed; inset: 0 0 auto 0; height: var(--top-h); display: flex; align-items: center; gap: 16px; padding: 0 24px; background: var(--header); border-bottom: 1px solid var(--side-line); z-index: 12; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo img { height: 44px; width: auto; display: block; }
.logo span { font: 700 15px Rubik, Inter, sans-serif; color: var(--green-hi); padding: 3px 9px; border-radius: 7px; background: #03b22722; letter-spacing: .2px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.status { max-width: 1120px; margin: -14px auto 14px; color: var(--mute); font-size: 12px; text-align: right; }
.side { position: fixed; top: var(--top-h); bottom: 0; left: 0; width: var(--side-w); background: var(--side); border-right: 1px solid var(--side-line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; z-index: 11; }
.side-btn { width: 100%; height: 46px; border-radius: 10px; border: 0; background: transparent; display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 0 14px; color: #cfe6d9; font-weight: 600; font-size: 14px; text-align: left; }
.side-btn svg { width: 21px; height: 21px; flex: none; fill: none; stroke: #7fb79a; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.side-btn:hover { background: var(--card-2); color: #fff; }
.side-btn.active { background: #0a5f35; color: #fff; }
.side-btn.active svg { stroke: var(--green-hi); }
.side-sep { height: 1px; background: var(--side-line); margin: 10px 6px; }

.page { padding: calc(var(--top-h) + 28px) 28px 60px calc(var(--side-w) + 28px); }
main { max-width: 1120px; margin: 0 auto; }

/* Type */
h1 { font: 700 26px Rubik, Inter, sans-serif; margin: 0; letter-spacing: -.2px; }
.page-head { margin-bottom: 20px; }
p.sub, .sub-line { color: var(--mute); margin: 4px 0 0; font-size: 13px; display: flex; align-items: center; gap: 8px; }

/* Partner type pills + overview cards */
.pill { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; white-space: nowrap; }
.pill-ugc { background: #03b22733; color: #5cf08a; }
.pill-thumbnail { background: #f9c91626; color: #ffd84a; }
.pill-sponsorship { background: #3fa9ff26; color: #8fcbff; }
.pill-theme { background: #c46bff26; color: #dcaaff; }
.pill-slides { background: #ff7a3d26; color: #ffb08a; }
.pill-betslip { background: #ff4f8b26; color: #ff9cbf; }
.pill-campaigns { background: #ffffff1f; color: #ffffff; }
.bonus-wrap { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bonus-wrap label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--mute); }
.fee.bonus-wrap input { width: 58px; margin-left: 0; }
.tag-prov { color: var(--gold, #f9c916); font-size: 11px; font-weight: 700; margin-left: 4px; }
.tag-self { position: absolute; left: 6px; bottom: 6px; background: #000a; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 6px; }
.post .m.bonus { color: var(--green-hi, #5cf08a); font-weight: 600; }
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.type-card { background: var(--card); border-radius: 12px; padding: 18px 20px; display: block; text-align: left; color: var(--text); font-weight: 400; border: 2px solid transparent; }
.type-card:hover { border-color: var(--green); background: var(--card); }
.tc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tc-model { color: var(--mute); font-size: 12px; font-weight: 600; }
.tc-main { font: 700 26px Rubik, Inter, sans-serif; margin: 14px 0 8px; }
.tc-row { display: flex; justify-content: space-between; font-size: 13px; color: #cfe6d9; }
.tc-row b { color: var(--win); }
.tc-foot { color: var(--mute); font-size: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
input.carried { color: var(--mute); font-style: italic; }
h2.sec, h3 { font: 700 19px Inter, sans-serif; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
h2.sec img { width: 22px; height: 22px; }
h3 { font-size: 17px; }

/* Controls */
select, input, button, .btn { font: inherit; color: var(--text); border-radius: 8px; border: 0; }
select, input { background: var(--input); padding: 10px 12px; outline: none; border: 1px solid transparent; }
select:focus, input:focus { border-color: var(--green); }
select { cursor: pointer; font-weight: 600; }
button, .btn { cursor: pointer; padding: 10px 16px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.green { background: var(--green); color: #fff; }
.green:hover { background: var(--green-hi); }
.dark { background: var(--card-2); color: #fff; }
.dark:hover { background: #134a30; }
.danger { color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.chart .nodata { fill: var(--mute); font-size: 13px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 30px; }
.tile { background: var(--card); border-radius: 12px; padding: 18px 20px; }
.tile label { display: block; color: var(--mute); font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.tile b { font: 700 28px Rubik, Inter, sans-serif; font-variant-numeric: tabular-nums; }
.tile b.small { font: 600 15px Inter, sans-serif; }
.tile small { display: block; color: var(--mute); font-size: 11px; margin-top: 4px; }
.tile.hl { background: linear-gradient(135deg, #04a82a 0%, #027a1d 100%); box-shadow: 0 6px 24px #03b22740; }
.tile.hl label, .tile.hl small { color: #d8ffe2; }

/* Cards */
.block { margin-bottom: 30px; }
.card { background: var(--card); border-radius: 12px; padding: 16px 18px; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.row-head h2.sec { margin: 0; }
.hint { color: var(--mute); font-size: 12px; margin: 10px 0 0; line-height: 1.5; }

/* Table */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--mute); font-weight: 600; font-size: 12px; padding: 6px 10px 10px; }
td { padding: 12px 10px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; font-weight: 600; }
tr.p { cursor: pointer; }
tr.p:hover td { background: var(--card-2); }
tr.p td:first-child { border-radius: 8px 0 0 8px; } tr.p td:last-child { border-radius: 0 8px 8px 0; }
tr.total td { font-weight: 800; }
.num { text-align: right; }
td .handle { font-weight: 700; }
td .sub { color: var(--mute); font-size: 12px; font-weight: 400; margin-top: 2px; }
td .err { color: var(--bad); font-size: 12px; font-weight: 400; }
td input.amt-in { width: 110px; text-align: right; padding: 7px 9px; font-weight: 600; }
td.cpm { color: var(--win); }
td .go { color: var(--mute); }

/* Add partner = Lucky search bar */
.searchbar { display: flex; align-items: center; gap: 8px; margin-top: 14px; background: var(--input); border-radius: 10px; padding: 6px 6px 6px 14px; }
.searchbar .ic { width: 18px; height: 18px; fill: none; stroke: var(--mute); stroke-width: 2; flex: none; }
.searchbar input { background: transparent; border: 0; padding: 8px 4px; }
.searchbar input[name=handle], .searchbar input[name=url] { flex: 1; min-width: 200px; }
.searchbar input.name.sm { width: 120px; }
.searchbar input.name { width: 140px; border-left: 1px solid var(--line); border-radius: 0; padding-left: 12px; }
.searchbar button { padding: 9px 16px; white-space: nowrap; flex: none; }
.searchbar select.back { width: auto; background: var(--card-2); border: 0; border-radius: 8px; padding: 8px 10px; color: inherit; font: inherit; font-size: 13px; }

/* Chart */
.chart { height: 190px; }
.chart svg { width: 100%; height: 100%; display: block; }
.chart .bar { fill: var(--green); }
.chart .bar:hover { fill: var(--green-hi); }
.chart text { fill: var(--mute); font-size: 10px; font-family: Inter, sans-serif; }
.chart .grid { stroke: var(--line); }

/* Detail */
.back { margin-bottom: 20px; }
.d-actions { display: flex; gap: 10px; align-items: center; }
.fee { color: var(--mute); font-weight: 600; }
.fee input { width: 110px; margin-left: 4px; }

/* Posts = Lucky game tiles */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.post { background: var(--card); border-radius: 12px; overflow: hidden; color: inherit; text-decoration: none; transition: transform .15s; }
.post:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--green); }
.post .th { aspect-ratio: 4/5; background: #0a3a22 center/cover; display: grid; place-items: center; color: var(--mute); font-size: 12px; position: relative; }
.post .type { position: absolute; top: 8px; left: 8px; background: var(--green); padding: 3px 8px; border-radius: 6px; font-size: 10px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: .3px; }
.post .meta { padding: 10px 12px 12px; text-align: center; }
.post .v { font: 700 16px Inter, sans-serif; font-variant-numeric: tabular-nums; }
.post .m { color: var(--mute); font-size: 12px; margin-top: 3px; }
.post .m b { color: var(--win); font-weight: 700; }
.empty { color: var(--mute); padding: 20px 0; text-align: center; font-weight: 400; }
.tip { position: fixed; pointer-events: none; background: var(--input); border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; z-index: 20; }

/* Banner + dialog */
.banner { max-width: 1120px; margin: 0 auto 22px; padding: 12px 16px; background: #f9c91614; border: 1px solid #f9c91655; color: #ffe27a; border-radius: 10px; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.banner[hidden] { display: none; }
.banner button { background: var(--gold); color: #1c1600; padding: 7px 12px; font-size: 12px; flex: none; }
dialog { background: var(--header); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 24px; width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: #000c; }
dialog ol { padding-left: 18px; }
dialog input { width: 100%; margin-top: 8px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

@media (max-width: 860px) {
  :root { --side-w: 0px; }
  .side { position: sticky; top: 0; width: auto; height: auto; flex-direction: row; overflow-x: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--side-line); }
  .side-btn { width: auto; height: 40px; padding: 0 12px; white-space: nowrap; }
  .side-sep { width: 1px; height: auto; margin: 6px 2px; }
  .types { grid-template-columns: 1fr; }
  .top { padding: 0 14px; height: auto; min-height: var(--top-h); flex-wrap: wrap; position: sticky; }
  .top-right { flex-wrap: wrap; gap: 8px; padding-bottom: 10px; }
  .status { margin: 0 0 12px; text-align: left; }
  .page { padding: 18px 16px 50px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .searchbar { flex-wrap: wrap; } .searchbar input.name { border-left: 0; width: 100%; }
  th:nth-child(2), td:nth-child(2) { display: none; }
  .row-head { flex-wrap: wrap; }
}

.post .rm { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(0,0,0,.55); color: #fff; font: 700 16px/26px Inter, sans-serif; cursor: pointer; opacity: 0; transition: opacity .15s; }
.post:hover .rm, .post .rm:focus { opacity: 1; }
.post .rm:hover { background: #c0392b; }
@media (hover: none) { .post .rm { opacity: 1; } }
#d-addvid { margin: 0 0 16px; }
.hint b { color: var(--text, #fff); font-weight: 700; }
[hidden] { display: none !important; }
a.side-btn { text-decoration: none; }

/* UGC: price per video + toast */
.post .vfee { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--mute); font-size: 12px; }
.post .vfee input { width: 72px; padding: 4px 6px; font-size: 12px; text-align: right; background: var(--input); border: 1px solid var(--line); border-radius: 6px; color: inherit; }
td .sub { font-size: 11px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--green); color: #fff; padding: 10px 18px; border-radius: 10px; font-weight: 700; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.35); }

/* Claim requests + partner access */
.claims { max-width: 1120px; margin: 0 auto 22px; display: grid; gap: 8px; }
.claims[hidden] { display: none; }
.claim { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: #03b22714; border: 1px solid #03b22755; border-radius: 10px; font-size: 13px; }
.claim-btns { display: flex; gap: 8px; flex: none; }
.claim-btns button, button.sm { padding: 6px 12px; font-size: 12px; }
.code { font-family: ui-monospace, Menlo, monospace; background: var(--input); padding: 2px 6px; border-radius: 5px; letter-spacing: .5px; }
.access { margin: -6px 0 18px; font-size: 13px; color: var(--mute); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.access b { color: var(--text); }
.tile label .per { text-transform: none; }
#range-dlg .range-row { display: flex; gap: 12px; margin: 14px 0 4px; }
#range-dlg label { display: grid; gap: 6px; font-size: 12px; color: var(--mute); font-weight: 600; flex: 1; }
#range-dlg input { color-scheme: dark; }

/* UGC view limit */
td input.cap-in { width: 100px; text-align: right; padding: 7px 9px; font-weight: 600; }
.post .m.capped { color: var(--gold, #f9c916); font-weight: 600; }
#d-cap { width: 100px; }

.kind { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #ffffff14; color: var(--mute); }
.kind.launch { background: #03b22733; color: #5cf08a; }
.views-in { width: 90px; }
.price-in { width: 80px; }
td .err { color: #ff6b6b; font-size: 11px; }

.side-btn { position: relative; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #ff4f4f; color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.review-btns { display: flex; gap: 6px; margin-top: 8px; }
.review-btns button { flex: 1; padding: 7px 0; font-size: 13px; }
.rv { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.rv.approved { background: #03b22733; color: #5cf08a; }
.rv.declined { background: #ff4f4f26; color: #ff8a8a; }
.rv.pending { background: #f9c91626; color: #ffd84a; }
.post .rvtag { position: absolute; left: 6px; top: 6px; }
/* Links are never blue: names and video links stay white (or the colour of the text around them), visited or not. */
main a:not(.btn), main a:not(.btn):visited, .claims a, .claims a:visited { color: inherit; text-decoration: none; }
main a.handle:hover, #i-reviewed a:hover { text-decoration: underline; }
