/* Visual da Channel Store (painel da equipe e admin) */
:root {
  --bg: #f6f4fc; --card: #fff; --fg: #1b1530; --muted: #6b6580; --line: #e8e4f3; --soft: #faf9fe;
  --brand: #6d3fe0; --brand-2: #9b6bff; --brand-soft: #efe9ff; --brand-ink: #4a23b8;
  --ok: #128a5a; --ok-soft: #e3f6ec; --zap: #1fa855;
  --ig-1: #f58529; --ig-2: #dd2a7b; --ig-3: #8134af; --ig-soft: #fdeef5;
  --warn-soft: #fff6e5; --warn-ink: #7a4a00; --bad: #c0362c; --bad-soft: #fdecea;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(35, 20, 80, .05), 0 6px 20px rgba(35, 20, 80, .06);
  --ring: 0 0 0 3px rgba(109, 63, 224, .25);
}
* { box-sizing: border-box }
[hidden] { display: none !important }
html { -webkit-text-size-adjust: 100% }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; padding: 0 16px 40px;
}
a { color: var(--brand) }
h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 }
h2 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 }
b { font-weight: 700 }

/* barra do topo com a logo */
.topo {
  position: sticky; top: 0; z-index: 5; margin: 0 -16px 18px; padding: 10px 16px;
  background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topo .in { max-width: var(--largura, 780px); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap }
.topo img { height: 34px; width: auto; display: block }
.topo .acoes { margin-left: auto }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: grid; gap: 12px; box-shadow: var(--shadow); min-width: 0;
}
.muted { color: var(--muted); font-size: 13px }
.big { font-size: 32px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15 }
.top, .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap }
.row { justify-content: flex-start }

.bar { height: 10px; background: var(--brand-soft); border-radius: 99px; overflow: hidden }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .4s }

/* campos */
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--fg); background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; min-height: 42px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { width: 100%; resize: vertical; line-height: 1.5 }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring) }
input::placeholder, textarea::placeholder { color: #a39cb6 }

/* botões */
button, .btn {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fff; color: var(--fg);
  transition: transform .08s, box-shadow .15s, background .15s, filter .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
button:hover, .btn:hover { background: var(--soft); box-shadow: 0 2px 8px rgba(35, 20, 80, .08) }
button:active, .btn:active { transform: translateY(1px) }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--ring) }
button:disabled { opacity: .55; cursor: default; transform: none }
.sm { min-height: 36px; padding: 6px 12px; font-size: 13px }
.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(109, 63, 224, .28) }
.primary:hover { background: linear-gradient(135deg, var(--brand), var(--brand-2)); filter: brightness(1.06); box-shadow: 0 6px 16px rgba(109, 63, 224, .34) }
.ig { background: linear-gradient(45deg, var(--ig-1), var(--ig-2) 55%, var(--ig-3)); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(221, 42, 123, .25) }
.ig:hover { background: linear-gradient(45deg, var(--ig-1), var(--ig-2) 55%, var(--ig-3)); filter: brightness(1.06) }
.zap { background: var(--zap); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(31, 168, 85, .25) }
.zap:hover { background: var(--zap); filter: brightness(1.06) }
.fantasma { background: transparent; border-color: transparent; color: var(--muted) }

/* itens das listas */
.item { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; background: #fff; transition: border-color .15s, box-shadow .15s }
.item:hover { border-color: #d9d1f2; box-shadow: 0 2px 10px rgba(35, 20, 80, .05) }
.item .nome { font-weight: 700; font-size: 15px }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }

.passo { font-size: 13.5px; background: var(--warn-soft); color: var(--warn-ink); border: 1px solid #f6e3bd; border-radius: 12px; padding: 12px 14px; line-height: 1.6 }
.vazio { color: var(--muted); padding: 8px 0; text-align: center }

/* números */
.tiles, .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px }
.tile, .stat { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px }
.stat { background: var(--card); box-shadow: var(--shadow) }
.tile b, .stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums }

.chip { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #f1eff7; color: var(--muted); vertical-align: 1px }
.chip.int { background: var(--ok-soft); color: var(--ok) }
.chip.nao { background: var(--bad-soft); color: var(--bad) }
.chip.roxo { background: var(--brand-soft); color: var(--brand-ink) }

/* tabelas (admin) */
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px }
table { width: 100%; border-collapse: collapse; font-size: 14px }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap }
th { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; background: var(--soft) }
tbody tr:last-child td { border-bottom: 0 }
tbody tr:hover td { background: #fcfbff }
td.n { font-variant-numeric: tabular-nums }

/* tela de entrar */
.entrar { max-width: 400px; margin: 12vh auto 0; padding: 28px 24px; gap: 14px; text-align: center }
.entrar img { width: 260px; max-width: 100%; height: auto; margin: 0 auto 4px; display: block }
.entrar input, .entrar button { width: 100% }
html { background: var(--bg) }
body { min-height: 100vh }
body.fundo-login { background: radial-gradient(1200px 600px at 50% -10%, #e6dcff, var(--bg) 60%) no-repeat, var(--bg) }

#toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 20;
  background: #1b1530; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(20, 10, 50, .3); display: none; max-width: calc(100vw - 32px); text-align: center;
}

@media (max-width: 560px) {
  .card { padding: 14px; border-radius: 14px }
  .big { font-size: 28px }
  .topo img { height: 28px }
  .item .acoes .btn, .item .acoes button { flex: 1 1 auto }
}
