/* Yoloco Influencer — design tokens lifted from the Claude Design mock
   (brand #4D2FFF, Inter Tight / Inter / Doto, soft cards, status badges). */
:root {
  --brand: #4D2FFF;
  --brand-2: #7058FF;
  --brand-3: #B9ADFF;
  --brand-grad: linear-gradient(165deg, #4D2FFF, #7058FF 55%, #B9ADFF);
  --orange: #FE7126;
  --orange-bg: #FFF1EA;
  --green: #44CF8E;
  --green-bg: #CDFFE2;
  --green-fg: #16794a;
  --blue: #0051FF;
  --blue-bg: #E8F0FF;
  --purple-chip: #EEEBFF;
  --ink: #16191C;
  --muted: #717C8D;
  --muted-2: #A9B0BA;
  --surface: #F2F4F5;
  --surface-2: #E4E8EA;
  --line: #E4E8EA;
  --white: #ffffff;
  --radius: 22px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .tt {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
}

button { font-family: inherit; cursor: pointer; border: none; }
input { font-family: inherit; }

#app { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* ---- Telegram-style header ---- */
.header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  height: 58px; padding: 0 16px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header__back {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--surface); color: var(--ink);
  display: grid; place-items: center; font-size: 18px;
}
.header__titles { display: flex; flex-direction: column; line-height: 1.15; flex: 1; }
.header__title { font-family: 'Inter Tight'; font-weight: 600; font-size: 16px; }
.header__sub { font-size: 11.5px; color: var(--muted); }

/* ---- layout ---- */
.screen { flex: 1; padding: 16px 16px 96px; animation: ycUp .28s ease both; }
.section-title { font-size: 13px; font-weight: 600; color: var(--muted); margin: 20px 4px 10px; text-transform: uppercase; letter-spacing: .04em; }

/* ---- cards ---- */
.card {
  background: var(--white); border-radius: var(--radius);
  padding: 18px; margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(22,25,28,.04), 0 8px 24px rgba(22,25,28,.04);
}
.card--hero {
  background: var(--brand-grad); color: var(--white);
  border-radius: var(--radius-lg); padding: 22px;
  box-shadow: 0 14px 36px rgba(77,47,255,.32);
}
.card--hero .hero__hi { font-size: 13px; opacity: .85; }
.card--hero .hero__name { font-family: 'Inter Tight'; font-weight: 700; font-size: 24px; margin-top: 4px; }
.card--hero .hero__role { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,.18); padding: 6px 12px; border-radius: 999px; }

/* ---- welcome / onboarding ---- */
.hero--welcome { position: relative; overflow: hidden; }
.hero--welcome::after {
  content: ''; position: absolute; right: -40px; top: -60px; width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%); pointer-events: none;
}
.hero--welcome .hero__spark { position: absolute; top: 16px; right: 18px; font-size: 24px; }
.hero--welcome .hero__name { font-size: 22px; line-height: 1.2; }

.perks { display: grid; gap: 8px; margin-bottom: 12px; }
.perk {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(22,25,28,.04), 0 8px 24px rgba(22,25,28,.04);
}
.perk__ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: 11px; background: var(--purple-chip); font-size: 19px; }
.perk__t { display: flex; flex-direction: column; line-height: 1.25; }
.perk__t b { font-size: 14px; font-weight: 600; }
.perk__t span { font-size: 12px; color: var(--muted); }

.card--connect { border: 1.5px solid var(--brand-3); }
.connect__badge {
  display: inline-block; margin-bottom: 8px; font-size: 10px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--brand);
  background: var(--purple-chip); padding: 4px 9px; border-radius: 999px;
}
.connect__title { font-size: 18px; font-weight: 700; }
.connect__lead { margin: 8px 0 14px; font-size: 14px; color: var(--ink); line-height: 1.5; }
.connect__btn { box-shadow: 0 10px 24px rgba(77,47,255,.32); }
.connect__note { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }

.or-divider { display: flex; align-items: center; gap: 12px; margin: 18px 2px;
  color: var(--muted-2); font-size: 12px; font-weight: 500; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.card--muted { background: var(--surface); box-shadow: none; }
.card--muted .input { background: var(--white); }

/* ---- workspaces (manager) ---- */
.pills--sub { margin-top: 0; }

.ws-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--white); padding: 14px;
}
.ws-row__logo {
  width: 46px; height: 46px; flex: none; border-radius: 14px;
  display: grid; place-items: center; font-size: 22px; font-weight: 700;
  font-family: 'Inter Tight'; color: #fff; background: var(--brand-grad);
}
.ws-row__main { flex: 1; min-width: 0; }
.ws-row__name { font-weight: 600; font-size: 15px; }
.ws-row__meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ws-row__chev { color: var(--muted-2); font-size: 22px; font-weight: 400; }

/* empty state + create-workspace screen */
.ws-empty { text-align: center; padding: 28px 20px; }
.ws-empty__art { font-size: 46px; }
.ws-empty__title { font-size: 19px; font-weight: 700; margin: 8px 0 6px; }

.wc { text-align: center; }
.wc__avatar {
  width: 88px; height: 88px; margin: 4px auto 16px; border-radius: 26px;
  display: grid; place-items: center; font-size: 40px; font-weight: 800;
  font-family: 'Inter Tight'; color: #fff; background: var(--brand-grad);
  box-shadow: 0 12px 30px rgba(77,47,255,.32); overflow: hidden; line-height: 1;
}
.seg { display: flex; gap: 4px; background: var(--surface); padding: 4px; border-radius: 14px; }
.seg__opt {
  flex: 1; height: 38px; border-radius: 11px; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 14px; transition: all .15s;
}
.seg__opt.is-active { background: var(--white); color: var(--brand); box-shadow: 0 2px 6px rgba(22,25,28,.08); }
.wc__field { margin-top: 14px; }
.wc__mark-input { text-align: center; font-size: 20px; font-weight: 600; letter-spacing: .04em; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.emoji-chip {
  width: 44px; height: 44px; border-radius: 13px; background: var(--surface);
  font-size: 22px; display: grid; place-items: center; transition: transform .08s, background .15s;
}
.emoji-chip:active { transform: scale(.92); }
.emoji-chip:hover { background: var(--purple-chip); }

/* workspace switcher (hub) */
.ws-switch { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 4px; -webkit-overflow-scrolling: touch; }
.ws-switch::-webkit-scrollbar { display: none; }
.ws-chip {
  display: flex; align-items: center; gap: 8px; flex: none; padding: 6px 12px 6px 6px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 999px;
  color: var(--ink); font-weight: 600; font-size: 13px; transition: border-color .15s, background .15s;
}
.ws-chip.is-active { border-color: var(--brand); background: var(--purple-chip); color: var(--brand); }
.ws-chip__logo {
  width: 28px; height: 28px; flex: none; border-radius: 9px; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff; background: var(--brand-grad);
}
.ws-chip__name { white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.ws-chip--add { padding: 0; width: 40px; height: 40px; justify-content: center; font-size: 22px; color: var(--brand); }

/* nav tiles (hub) */
.tile {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--white); border-radius: var(--radius); padding: 16px;
  margin-bottom: 10px; box-shadow: 0 1px 2px rgba(22,25,28,.04), 0 8px 24px rgba(22,25,28,.04);
  transition: transform .08s;
}
.tile:active { transform: scale(.99); }
.tile__ic {
  width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center;
  font-size: 22px; background: var(--purple-chip);
}
.tile__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tile__label { font-weight: 600; font-size: 15px; }
.tile__hint { font-size: 12px; color: var(--muted); }
.tile__count { font-family: 'Inter Tight'; font-weight: 700; font-size: 18px; color: var(--brand); }
.tile__chev { color: var(--muted-2); font-size: 22px; }

.link-row {
  width: 100%; text-align: center; background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 500; padding: 14px; margin-top: 6px;
}

/* blogger invitation card */
.invite-card { border: 1.5px solid var(--brand-3); }
.invite-card__top { display: flex; align-items: center; gap: 12px; }
.invite-card__logo {
  width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center;
  font-size: 22px; font-weight: 700; color: #fff; background: var(--brand-grad);
}
.invite-card__main { min-width: 0; }
.invite-card__brand { font-family: 'Inter Tight'; font-weight: 700; font-size: 17px; }
.invite-card__desc { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* tappable member row (→ analytics) */
.urow--tappable { cursor: pointer; }
.urow__chev { color: var(--muted-2); font-size: 20px; margin-left: 4px; }

/* channel analytics (YoloParser) */
.an-card { padding: 18px; }
.an-stat { margin-top: 16px; }
.an-stat__label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.an-stat__num { font-family: 'Inter Tight'; font-weight: 700; font-size: 38px; line-height: 1.1; margin: 2px 0 0; }
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.an-m { background: var(--surface); border-radius: 16px; padding: 12px 14px; }
.an-m__top { display: flex; align-items: center; }
.an-m__ic { font-size: 18px; }
.an-m__val { font-family: 'Inter Tight'; font-weight: 700; font-size: 22px; margin-top: 4px; }
.an-m__label { font-size: 12px; color: var(--muted); }
.an-foot { margin-top: 14px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.an-native__src { font-size: 10px; font-weight: 600; color: var(--brand); background: var(--purple-chip); padding: 3px 8px; border-radius: 999px; }
.an-desc { margin-top: 12px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

.ws-hero { text-align: center; }
.ws-hero__logo {
  width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 20px;
  display: grid; place-items: center; font-size: 32px; font-weight: 800;
  font-family: 'Inter Tight'; background: rgba(255,255,255,.18);
}
.ws-hero__name { font-family: 'Inter Tight'; font-weight: 700; font-size: 22px; }
.ws-hero__desc { margin-top: 6px; font-size: 13px; opacity: .9; }

.item-card { padding: 14px 16px; }
.item-card__link {
  display: inline-block; margin-top: 6px; font-size: 12px; color: var(--brand);
  text-decoration: none; word-break: break-all;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  font-size: 12px; font-weight: 500; color: var(--brand);
  background: var(--purple-chip); padding: 4px 10px; border-radius: 999px;
}

.checks { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

/* ---- blogger task feed ---- */
.task-card { padding: 16px; }
.task-card__brand { display: flex; align-items: center; gap: 8px; }
.task-card__logo {
  width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center;
  font-size: 15px; font-weight: 700; color: #fff; background: var(--brand-grad);
}
.task-card__brandname { font-size: 12px; font-weight: 600; color: var(--muted); }
.task-card__title { font-size: 17px; font-weight: 700; margin-top: 10px; }
.task-card__note { margin-top: 12px; font-size: 13px; color: var(--muted); }
.task-card__note--ok { color: var(--green-fg); font-weight: 600; }
.task-card__note a { color: var(--brand); text-decoration: none; }

/* ---- assignments (manager view of a campaign) ---- */
.asg { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.asg__title { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 8px; }
.asg__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.asg__who { font-size: 14px; font-weight: 500; }
.asg__wait { font-size: 11px; color: var(--orange); font-weight: 600; }
.asg__st { font-size: 12px; font-weight: 600; color: var(--muted); }
.asg__st--accepted  { color: var(--blue); }
.asg__st--published { color: var(--brand); }
.asg__st--paid      { color: var(--green-fg); }
.asg-form { display: flex; gap: 8px; margin-top: 12px; }
.asg-form .input { height: 40px; }
.asg-form .btn { width: auto; white-space: nowrap; padding: 0 14px; }

.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.stack > * + * { margin-top: 6px; }

.avatar {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 700;
  font-family: 'Inter Tight'; background: var(--brand-grad);
}
.avatar--sm { width: 36px; height: 36px; border-radius: 11px; font-size: 13px; }

.label { font-size: 12px; color: var(--muted); }
.value { font-weight: 600; }
.mono { font-family: 'Doto', monospace; font-weight: 800; letter-spacing: .04em; }

/* ---- badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--verified { background: var(--green-bg); color: var(--green-fg); }
.badge--pending  { background: var(--orange-bg); color: var(--orange); }
.badge--admin    { background: var(--purple-chip); color: var(--brand); }
.badge--creator  { background: var(--surface); color: var(--muted); }
.badge--auto     { background: var(--blue-bg); color: var(--blue); }

/* ---- inputs & buttons ---- */
.field { margin-top: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--white);
  font-size: 15px; outline: none; transition: border-color .15s;
}
.input.input--emoji { width: 56px; flex: none; text-align: center; padding: 0; font-size: 20px; }
.input:focus { border-color: var(--brand); }

.btn {
  width: 100%; height: 50px; border-radius: 16px; font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .08s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(77,47,255,.28); }
.btn--ghost { background: var(--surface); color: var(--ink); }
.btn--sm { height: 38px; width: auto; padding: 0 16px; border-radius: 12px; font-size: 13px; }

.hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.muted { color: var(--muted); }
.steps { counter-reset: s; margin: 0; padding: 0; list-style: none; }
.steps li { position: relative; padding: 8px 0 8px 34px; font-size: 14px; color: var(--ink); }
.steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: 6px; width: 24px; height: 24px; border-radius: 8px;
  background: var(--purple-chip); color: var(--brand); font-weight: 700; font-size: 12px;
  display: grid; place-items: center; font-family: 'Inter Tight';
}

/* ---- role toggle ---- */
.role-toggle {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  height: 48px; padding: 4px; margin: 4px 0 18px;
  border: 1px solid rgba(77,47,255,.16); border-radius: 18px;
  background: linear-gradient(180deg, #fff, #F7F8FA);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 28px rgba(22,25,28,.06);
  overflow: hidden;
}
.role-toggle__thumb {
  position: absolute; display: block; top: 4px; left: 4px; width: calc(50% - 4px); height: calc(100% - 8px);
  border-radius: 14px; background: var(--brand-grad);
  box-shadow: 0 8px 18px rgba(77,47,255,.28);
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
}
.role-toggle.is-admin .role-toggle__thumb { transform: translateX(100%); }
.role-toggle__option {
  position: relative; z-index: 1; border-radius: 14px; background: transparent;
  color: var(--muted); font-size: 14px; font-weight: 700;
  transition: color .18s, transform .12s;
}
.role-toggle__option.is-active { color: #fff; }
.role-toggle__option:active { transform: scale(.98); }

/* ---- pill tabs ---- */
.pills { display: flex; gap: 4px; background: var(--surface); padding: 4px; border-radius: 14px; margin: 4px 0 16px; }
.pill {
  flex: 1; height: 38px; border-radius: 11px; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 14px; transition: all .15s;
}
.pill.is-active { background: var(--white); color: var(--brand); box-shadow: 0 2px 6px rgba(22,25,28,.08); }

/* ---- admin user row ---- */
.urow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.urow:last-child { border-bottom: none; }
.urow__main { flex: 1; min-width: 0; }
.urow__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urow__meta { font-size: 12px; color: var(--muted); }

/* ---- switch ---- */
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2); transition: background .2s;
}
.switch .track::before {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s;
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::before { transform: translateX(18px); }

/* ---- misc ---- */
.boot { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.boot__label { font-size: 14px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--surface-2); border-top-color: var(--brand); border-radius: 50%; animation: ycSpin .8s linear infinite; }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; }
.empty .big { font-size: 40px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px;
  font-size: 14px; font-weight: 500; z-index: 50; max-width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: ycToast .3s ease both;
}
.toast.error { background: #C0392B; }

@keyframes ycSpin { to { transform: rotate(360deg); } }
@keyframes ycUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ycToast { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---- slot picker (campaign invites) ---- */
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-chip {
  border: 1.5px solid var(--surface-2); background: var(--surface);
  border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 600;
  color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s;
}
.slot-chip.is-active { border-color: var(--brand); background: rgba(108,92,231,.08); }
.slot-chip.is-taken { opacity: .55; cursor: not-allowed; }
.slot-chip__x { font-weight: 500; color: var(--muted); font-size: 11px; }
