/* Cutorial auth + creator dashboard + admin */
body.app { background: radial-gradient(900px 500px at 85% -10%, rgba(139, 107, 255, 0.16), transparent 60%), radial-gradient(700px 500px at -10% 110%, rgba(198, 255, 61, 0.07), transparent 60%), var(--bg); min-height: 100vh; }

/* ---------- auth ---------- */
.auth { display: grid; grid-template-columns: 1fr 1.05fr; min-height: 100vh; }
.auth-side { position: relative; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: radial-gradient(120% 80% at 20% 0%, #3a2499, transparent 60%), radial-gradient(100% 80% at 90% 100%, #0b5e6b, transparent 60%), #0b0d14; }
.auth-side > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.auth-side::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6, 7, 11, 0.95) 5%, rgba(6, 7, 11, 0.2) 60%, rgba(6, 7, 11, 0.6)); }
.auth-side > * { position: relative; z-index: 2; }
.auth-pitch { display: grid; gap: 20px; }
.auth-pitch h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 800; }
.auth-pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.auth-pitch li { display: flex; gap: 12px; align-items: center; color: #dfe4f0; font-weight: 500; }
.auth-pitch li::before { content: '✓'; width: 26px; height: 26px; border-radius: 8px; background: var(--lime); color: var(--lime-ink); display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; flex: none; }
.auth-main { display: flex; flex-direction: column; padding: 28px clamp(20px, 5vw, 70px) 50px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth-top .logo { visibility: hidden; }
.auth-form { margin: auto; width: 100%; max-width: 480px; display: grid; gap: 16px; padding-top: 30px; animation: rise 0.6s both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.auth-form h1 { font-size: 2rem; font-weight: 700; }
.auth-form > p { color: var(--muted); margin-bottom: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.handle { position: relative; }
.handle svg { position: absolute; top: 50%; inset-inline-start: 14px; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.handle .input { padding-inline-start: 42px; }
.handles { display: grid; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--lime); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.check a { color: var(--lime); text-decoration: underline; }
.auth-form .btn { width: 100%; padding-block: 1em; margin-top: 6px; }
.auth-alt { text-align: center; color: var(--muted); font-size: 0.92rem; }
.auth-alt a { color: var(--lime); font-weight: 600; }
.form-err { color: #ffb4b4; background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.3); padding: 10px 14px; border-radius: 10px; font-size: 0.88rem; }
.hint { font-size: 0.76rem; color: var(--dim); }
.gwrap { display: grid; justify-items: center; }
.gbtn-real:empty { display: none; }
.auth-form .gbtn { margin-top: 0; background: #fff; color: #1f1f1f; border-color: #fff; }
.auth-form .gbtn:hover { background: #f1f3f6; }
.or { display: flex; align-items: center; gap: 14px; color: var(--dim); font-size: 0.82rem; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
/* application + notifications */
.apply { display: grid; gap: 14px; width: 100%; max-width: 520px; text-align: start; }
.apply .btn { width: 100%; }
.time-note { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-size: 0.86rem; color: var(--warn); background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.3); }
.time-note svg { width: 16px; height: 16px; flex: none; }
.gate-ic.ok { background: rgba(198, 255, 61, 0.12); color: var(--lime); }
.bell { position: relative; }
.bell-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; background: rgba(255, 255, 255, 0.03); position: relative; }
.bell-btn svg { width: 18px; height: 18px; }
.bell-btn i { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 0.68rem; font-weight: 700; font-style: normal; display: grid; place-items: center; }
.bell-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60; width: 340px; max-width: 86vw; padding: 8px; border-radius: var(--radius-sm); background: rgba(16, 19, 28, 0.98); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: none; }
.bell.open .bell-menu { display: grid; gap: 4px; }
.bell-menu h4 { padding: 8px 10px 6px; font-size: 0.86rem; color: var(--muted); font-weight: 600; }
.bell-item { padding: 10px; border-radius: 10px; font-size: 0.88rem; display: grid; gap: 3px; }
.bell-item.unread { background: rgba(198, 255, 61, 0.07); }
.bell-item small { color: var(--dim); font-size: 0.74rem; }
.ref-note { margin: 0; padding: 10px 14px; border-radius: 10px; font-size: 0.86rem; color: var(--lime); background: rgba(198, 255, 61, 0.07); border: 1px solid rgba(198, 255, 61, 0.3); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; border-inline-end: 1px solid var(--line); background: rgba(10, 12, 18, 0.7); backdrop-filter: blur(12px); }
.side .logo { padding-inline: 10px; }
.side nav { display: grid; gap: 4px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--muted); font-weight: 500; font-size: 0.94rem; transition: 0.2s; }
.side nav a svg { width: 19px; height: 19px; flex: none; }
.side nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.side nav a.on { color: var(--lime-ink); background: var(--lime); font-weight: 600; box-shadow: 0 8px 26px -10px rgba(198, 255, 61, 0.7); }
.side nav a .count { margin-inline-start: auto; font-size: 0.72rem; padding: 1px 8px; border-radius: 999px; background: rgba(251, 191, 36, 0.18); color: var(--warn); font-weight: 700; }
.side nav a.on .count { background: rgba(0, 0, 0, 0.18); color: inherit; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); min-width: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--cyan)); display: grid; place-items: center; font-weight: 700; flex: none; }
.me div { min-width: 0; }
.me b { display: block; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me small { color: var(--dim); font-size: 0.74rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { padding: 26px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.top h1 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; }
.top-r { display: flex; gap: 10px; align-items: center; }
.view { display: grid; gap: 22px; }
.view.enter { animation: rise 0.45s both; }

.box { background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.box-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.box h2 { font-size: 1.12rem; font-weight: 600; }
.box-sub { color: var(--muted); font-size: 0.88rem; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.refbox { display: grid; gap: 18px; border-color: rgba(198, 255, 61, 0.3); background: radial-gradient(90% 140% at 100% 0%, rgba(198, 255, 61, 0.1), transparent 60%), linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)); }
.link-box { justify-content: space-between; padding-inline-start: 18px; min-width: 0; }
.link-box code { font-size: clamp(0.82rem, 1.6vw, 1.05rem); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kpi { padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)); display: grid; gap: 6px; position: relative; overflow: hidden; }
.kpi span { color: var(--muted); font-size: 0.82rem; }
.kpi b { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; text-align: start; }
.kpi small { color: var(--dim); font-size: 0.76rem; }
.kpi.hl { border-color: rgba(198, 255, 61, 0.35); background: linear-gradient(180deg, rgba(198, 255, 61, 0.12), rgba(198, 255, 61, 0.02)); }
.kpi.hl b { color: var(--lime); }
.bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); overflow: hidden; direction: ltr; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--lime), var(--cyan)); transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
html[dir='rtl'] .bar { transform: scaleX(-1); }

/* review states */
.gate { text-align: center; padding: clamp(28px, 5vw, 56px); display: grid; gap: 18px; justify-items: center; }
.gate-ic { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: rgba(251, 191, 36, 0.12); color: var(--warn); }
.gate-ic.bad { background: rgba(255, 107, 107, 0.12); color: var(--bad); }
.gate-ic svg { width: 34px; height: 34px; }
.gate h2 { font-size: 1.6rem; }
.gate > p { color: var(--muted); max-width: 36em; }
.code-box { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 24px; border-radius: 16px; border: 1.5px dashed rgba(198, 255, 61, 0.55); background: rgba(198, 255, 61, 0.06); direction: ltr; }
.code-box code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: 0.1em; color: var(--lime); }
.gate ol { text-align: start; color: #c3c9d8; display: grid; gap: 8px; margin: 0; padding-inline-start: 1.3em; font-size: 0.95rem; }

/* submit form */
.submit { display: grid; grid-template-columns: 150px 1.2fr 160px 1fr auto; gap: 12px; align-items: end; }
.submit.direct { grid-template-columns: 1.4fr 1fr auto; }
.submit input[type='date'] { color-scheme: dark; }

/* tables */
.tbl-wrap { overflow-x: auto; margin: 0 -24px -8px; padding: 0 24px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 640px; }
.tbl th { text-align: start; font-weight: 600; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
html[dir='rtl'] .tbl th { letter-spacing: 0; font-size: 0.8rem; }
.tbl td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background 0.2s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.tbl .r { text-align: end; }
.vid { display: flex; align-items: center; gap: 12px; min-width: 0; }
.plat { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, 0.07); }
.plat svg { width: 18px; height: 18px; }
.plat.instagram { background: linear-gradient(135deg, #f9ce34, #ee2a7b 50%, #6228d7); }
.plat.tiktok { background: #000; box-shadow: inset 0 0 0 1px var(--line-2); color: #fff; }
.plat.youtube { background: #ff0033; }
.plat.direct { background: var(--lime); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.mode { text-align: start; padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); display: grid; gap: 4px; transition: 0.2s; }
.mode:hover { border-color: rgba(255, 255, 255, 0.35); }
.mode b { font-family: var(--font-display); font-size: 1rem; display: flex; align-items: center; gap: 10px; }
.mode b::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--dim); flex: none; transition: 0.2s; }
.mode small { color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.mode.on { border-color: var(--lime); background: rgba(198, 255, 61, 0.07); box-shadow: 0 0 0 4px rgba(198, 255, 61, 0.08); }
.mode.on b::before { border-color: var(--lime); background: radial-gradient(circle, var(--lime) 0 45%, transparent 50%); }
.vid-t { min-width: 0; display: grid; }
.vid-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.vid-t a, .vid-t small { color: var(--dim); font-size: 0.76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; direction: ltr; text-align: start; }
html[dir='rtl'] .vid-t a { text-align: right; }
.vid-t a:hover { color: var(--lime); }
.next { display: grid; gap: 5px; min-width: 130px; }
.next small { color: var(--dim); font-size: 0.72rem; }
.money { font-family: var(--font-display); font-weight: 700; color: var(--lime); }
.note { color: #ffb4b4; font-size: 0.78rem; margin-top: 3px; }
.empty { text-align: center; color: var(--dim); padding: 36px 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.stack { display: grid; gap: 14px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.kv:last-child { border: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; direction: ltr; }
.rules-list { display: grid; gap: 20px; }
.rules-list h3 { font-size: 1rem; margin-bottom: 10px; }
.rules-list ul { margin: 0; padding-inline-start: 1.2em; color: #c3c9d8; display: grid; gap: 7px; font-size: 0.92rem; }

/* ---------- admin ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .input { width: auto; min-width: 200px; padding: 0.55em 0.9em; font-size: 0.88rem; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.seg button { padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--lime); color: var(--lime-ink); font-weight: 600; }
.views-in { width: 120px; padding: 0.5em 0.7em; font-size: 0.9rem; text-align: end; font-variant-numeric: tabular-nums; }
.views-in.saved { border-color: var(--ok); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15); }
.acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.links { display: flex; gap: 6px; flex-wrap: wrap; }
.links a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); font-size: 0.78rem; direction: ltr; }
.links a:hover { background: rgba(198, 255, 61, 0.14); color: var(--lime); }
.links .plat { width: 22px; height: 22px; border-radius: 7px; }
.links .plat svg { width: 12px; height: 12px; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.84rem; letter-spacing: 0.04em; color: var(--lime); direction: ltr; }
.sub { color: var(--dim); font-size: 0.76rem; }
.tier-edit { display: grid; gap: 8px; }
.tier-edit .trow { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 10px; align-items: center; }
.tier-edit .trow.head { font-size: 0.76rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.x { width: 36px; height: 36px; border-radius: 10px; color: var(--bad); background: rgba(255, 107, 107, 0.1); }
.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.banner { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; padding: 18px 22px; border-radius: var(--radius); border: 1px solid rgba(198, 255, 61, 0.3); background: rgba(198, 255, 61, 0.06); }
.banner b { font-family: var(--font-display); font-size: 1.3rem; color: var(--lime); }

/* mobile */
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); place-items: center; }
.menu-btn svg { width: 20px; height: 20px; }
@media (max-width: 1100px) {
  .kpis, .kpis.three { grid-template-columns: 1fr 1fr; }
  .submit, .submit.direct { grid-template-columns: 1fr 1fr; }
  .submit .btn { grid-column: 1 / -1; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-top .logo { visibility: visible; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 80; width: 270px; inset-inline-start: 0; transform: translateX(-105%); transition: transform 0.3s; background: #0a0c12; }
  html[dir='rtl'] .side { transform: translateX(105%); }
  .side.open { transform: none !important; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.6); }
  .menu-btn { display: grid; }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .kpis, .kpis.three, .row2, .submit, .submit.direct, .settings-grid, .modes { grid-template-columns: 1fr; }
  .box { padding: 18px; }
  .tbl-wrap { margin-inline: -18px; padding-inline: 18px; }
}
