/* BigHeart Creator Hub — KOC portal v2. Mobile first, white + BigHeart red (#AB1F29) + black, like the logo. */
:root {
  --red: #ab1f29; --red-2: #d8343f; --red-soft: #fdecee; --ink: #16161a; --muted: #6e6e78; --line: #ececf0; --bg: #f6f6f8; --card: #fff;
  --green: #0f8a5f; --green-soft: #e4f6ee; --amber: #a35b00; --amber-soft: #fff3df; --shadow: 0 2px 10px rgb(20 20 30 / .06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 -apple-system, "Segoe UI", Roboto, system-ui, sans-serif; }
a { color: var(--red); text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
textarea { min-height: 80px; resize: vertical; }
label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: 76px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; padding: 10px 12px 8px; background: linear-gradient(135deg, #fff 0%, #fff4f5 60%, #ffe3e6 100%); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 10px; }
.top-row img { height: 30px; border-radius: 6px; }
.search { flex: 1; display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.search input { border: 0; padding: 2px 0; background: none; }
.bell { position: relative; background: none; padding: 4px; font-size: 20px; line-height: 1; }
.bell .dot { position: absolute; top: -2px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 17px; text-align: center; }

/* bottom nav */
.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: center; background: #fff; border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
.nav-in { display: flex; width: 100%; max-width: 560px; }
.nav button { flex: 1; background: none; color: var(--muted); font-size: 11px; display: grid; justify-items: center; gap: 2px; padding: 4px 0; }
.nav button .i { font-size: 20px; line-height: 1; filter: grayscale(1); opacity: .7; }
.nav button.on { color: var(--red); font-weight: 600; }
.nav button.on .i { filter: none; opacity: 1; }

.pad { padding: 12px; }
.sec { margin: 14px 0 8px; display: flex; align-items: baseline; justify-content: space-between; }
.sec h2 { margin: 0; font-size: 16px; }
.card { background: var(--card); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.err { color: var(--red); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--red); color: #fff; border-radius: 10px; padding: 10px 14px; font-weight: 600; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.soft { background: var(--red-soft); color: var(--red); }
.btn.dark { background: var(--ink); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.dark { background: var(--ink); color: #fff; }

/* home */
.notice { display: flex; gap: 8px; align-items: flex-start; background: var(--amber-soft); color: #6b3d00; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 12px; }
.notice button { margin-left: auto; background: none; color: inherit; font-size: 16px; line-height: 1; }
.slides { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -12px 12px; padding: 0 12px; scrollbar-width: none; }
.slides::-webkit-scrollbar, .hscroll::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.slides a, .slides img { scroll-snap-align: center; flex: 0 0 92%; border-radius: 14px; display: block; }
.slides img { width: 100%; aspect-ratio: 2.2; object-fit: cover; background: var(--line); }
.hero { border-radius: 14px; padding: 16px; color: #fff; background: linear-gradient(135deg, var(--red) 0%, var(--red-2) 70%, #f0727a 100%); margin-bottom: 12px; }
.hero b { font-size: 17px; display: block; margin-bottom: 4px; }
.quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 6px; }
.quick button { background: none; display: grid; justify-items: center; gap: 4px; font-size: 11.5px; color: var(--ink); }
.quick .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: #fff; box-shadow: var(--shadow); }
.winning { background: linear-gradient(135deg, var(--red) 0%, #e2434d 100%); border-radius: 16px; padding: 12px; margin: 10px 0 14px; }
.winning h2 { color: #fff; margin: 0 0 8px; font-size: 16px; }
.hscroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.mini { flex: 0 0 104px; background: #fff; border-radius: 10px; overflow: hidden; text-align: left; padding: 0; }
.mini img { width: 104px; height: 104px; object-fit: cover; display: block; background: var(--line); }
.mini div { padding: 6px; font-size: 12px; font-weight: 700; color: var(--red); }
.tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--line); margin: 6px 0 8px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; padding: 8px 0; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--red); border-color: var(--red); font-weight: 600; }
.chips { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; scrollbar-width: none; }
.chips button { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; white-space: nowrap; color: var(--ink); }
.chips button.on { border-color: var(--red); color: var(--red); background: var(--red-soft); }

/* product grid */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pc { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); text-align: left; padding: 0; display: flex; flex-direction: column; color: var(--ink); }
.pc .img { position: relative; }
.pc img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--line); }
.pc .badges { position: absolute; left: 6px; bottom: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.badges .tag.sample { background: #ffe14d; color: #3d3200; }
.badges .tag.rate { background: #b8f06a; color: #1f3b00; }
.pc .body { padding: 8px 9px 10px; display: grid; gap: 3px; }
.pc .earn { color: var(--red); font-weight: 800; font-size: 15px; }
.pc .name { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.pc .row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.pc .row b { color: var(--ink); }
.more { margin: 14px auto; display: block; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* sheets (product detail, auth, notifications) */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .4); display: flex; align-items: flex-end; justify-content: center; }
.sheet > .in { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.sheet.full > .in { max-height: 100vh; height: 100vh; border-radius: 0; padding: 0 0 90px; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 12px; }
.sheet h3 { margin: 0 0 10px; font-size: 17px; }
.x { position: absolute; top: 10px; left: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: rgb(255 255 255 / .92); font-size: 18px; box-shadow: var(--shadow); }
.detail-img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--line); }
.detail { padding: 12px 14px; }
.earnbox { background: linear-gradient(135deg, #fff1f2, #ffe2e5); border-radius: 12px; padding: 12px; margin: 10px 0; }
.earnbox .big { color: var(--red); font-size: 20px; font-weight: 800; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; font-size: 12px; }
.split div { background: #fff; border-radius: 10px; padding: 8px; }
.split b { font-size: 15px; display: block; }
.skus { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.skus button { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; color: var(--ink); }
.skus button.on { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.skus button:disabled { opacity: .4; }
.script { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 10px; font-size: 13px; }
.vlinks a { display: block; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.dock { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 55; background: #fff; border-top: 1px solid var(--line);
  display: flex; gap: 8px; align-items: center; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
.dock .ico { background: none; display: grid; justify-items: center; font-size: 11px; color: var(--muted); gap: 1px; min-width: 42px; }
.dock .ico .i { font-size: 19px; line-height: 1; }
.dock .ico.on { color: var(--red); }
.dock .btn { flex: 1; padding: 11px 8px; }
.linkbox { display: flex; gap: 6px; margin: 8px 0; }
.linkbox input { font-size: 12px; }

/* income */
.periods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.periods button { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; color: var(--ink); }
.periods button.on { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.kpis div { background: var(--bg); border-radius: 10px; padding: 10px; }
.kpis b { display: block; font-size: 17px; }
.chart { width: 100%; height: 120px; display: block; }
.chart rect { fill: var(--red); }
.list .it { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.list .it:last-child { border-bottom: 0; }
.list .it img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: var(--line); }
.list .it .t { flex: 1; min-width: 0; }
.list .it .t div:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .it .v { text-align: right; white-space: nowrap; font-weight: 700; }

/* samples */
.credits { display: flex; align-items: center; justify-content: space-between; }
.credits .num { font-size: 26px; font-weight: 800; color: var(--red); }
.auth-card { text-align: center; padding: 20px 16px; }
.auth-card .ic { font-size: 44px; }

/* mcn */
.mcn-hero { border-radius: 16px; padding: 18px; color: #fff; background: radial-gradient(circle at 85% 20%, #ff8a92 0, transparent 40%), linear-gradient(135deg, #16161a 0%, #3a0f14 55%, var(--red) 100%); margin-bottom: 12px; }
.mcn-hero h2 { margin: 0 0 6px; font-size: 20px; }
.mcn-hero .fee { display: inline-block; margin-top: 10px; background: #fff; color: var(--red); font-weight: 800; border-radius: 999px; padding: 4px 12px; }
.benefit { display: flex; gap: 10px; padding: 8px 0; }
.benefit .n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--red-soft); color: var(--red); display: grid; place-items: center; font-weight: 800; }
.steps { counter-reset: s; padding: 0; list-style: none; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 12px 34px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; display: grid; place-items: center; font-weight: 700; }
details { border-bottom: 1px solid var(--line); padding: 10px 0; }
details summary { font-weight: 600; cursor: pointer; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* menu */
.profile { display: flex; gap: 12px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 800; flex: none; }
.lvl { margin-top: 12px; background: var(--bg); border-radius: 12px; padding: 10px; }
.lvl svg { width: 100%; height: 8px; display: block; margin: 6px 0 4px; }
.lvl .bar-bg { fill: #e6e6eb; } .lvl .bar { fill: var(--red); }
.menu-list button { width: 100%; display: flex; align-items: center; gap: 12px; background: #fff; padding: 13px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-align: left; }
.menu-list button:last-child { border-bottom: 0; }
.menu-list .i { width: 22px; text-align: center; font-size: 18px; }
.menu-list .r { margin-left: auto; color: var(--muted); font-size: 12px; }
.seg { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.seg button { flex: 1; background: none; padding: 8px; border-radius: 9px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--red); font-weight: 600; box-shadow: var(--shadow); }
.check { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); }
.check input { width: auto; margin-top: 3px; }
.job { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; }
.job h4 { margin: 0 0 4px; }
.notif { padding: 10px 0; border-bottom: 1px solid var(--line); }
.notif.unread b::before { content: "● "; color: var(--red); }
#toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 14px; border-radius: 10px; z-index: 80; max-width: calc(100% - 32px); font-size: 13px; }
