/* 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); }
.header__badge {
  font-size: 10px; font-weight: 600; color: var(--brand);
  background: var(--purple-chip); padding: 4px 8px; border-radius: 999px;
}

/* ---- 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; }

.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: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';
}

/* ---- pill toggle (role switch) ---- */
.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); } }
