/* Presly — estilo do painel do creator */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0a10;
  --bg-2:      #12121b;
  --bg-3:      #191926;
  --linha:     #262636;
  --txt:       #f2f2f7;
  --txt-2:     #9d9db3;
  --txt-3:     #66667e;
  --roxo:      #7c5cff;
  --roxo-2:    #9b82ff;
  --verde:     #2fd48f;
  --amarelo:   #f5c451;
  --vermelho:  #ff5f6d;
  --raio:      14px;
  --sombra:    0 12px 40px -12px rgba(0,0,0,.7);
  --fonte:     'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body {
  background: var(--bg); color: var(--txt); font-family: var(--fonte);
  font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1,h2,h3,h4 { line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
svg { width: 1em; height: 1em; fill: currentColor; }

/* ---------------------------------------------------------- utilitários */
.linha { display: flex; align-items: center; gap: 10px; }
.entre { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.crescer { flex: 1; min-width: 0; }
.mini   { font-size: 12.5px; color: var(--txt-2); }
.micro  { font-size: 11.5px; color: var(--txt-3); }
.esconde { display: none !important; }
.cortar { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------- botões */
.b {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 11px; border: 1px solid var(--linha);
  background: var(--bg-3); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s, opacity .15s;
  white-space: nowrap;
}
.b:hover { background: #22222f; border-color: #35354a; }
.b:active { transform: scale(.97); }
.b:disabled { opacity: .45; cursor: not-allowed; }
.b.p { background: var(--roxo); border-color: transparent; color: #fff; }
.b.p:hover { background: var(--roxo-2); }
.b.ok { background: var(--verde); border-color: transparent; color: #04160e; }
.b.perigo { color: var(--vermelho); }
.b.perigo:hover { background: rgba(255,95,109,.12); border-color: rgba(255,95,109,.4); }
.b.fantasma { background: transparent; }
.b.g { padding: 13px 22px; font-size: 15px; border-radius: 13px; }
.b.pq { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.b.icone { padding: 8px; width: 34px; }

/* ------------------------------------------------------------ campos */
label.campo { display: block; margin-bottom: 14px; }
label.campo > span {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--txt-2);
  margin-bottom: 6px; letter-spacing: .01em;
}
.inp, input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=date], input[type=time], input[type=url], select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--linha);
  background: var(--bg-2); color: var(--txt); outline: 0;
  transition: border-color .15s, background .15s;
}
.inp:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--roxo); background: var(--bg-3);
}
input::placeholder, textarea::placeholder { color: var(--txt-3); }
textarea { resize: vertical; min-height: 82px; line-height: 1.5; }
select { appearance: none; background-image:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239d9db3'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
  padding-right: 34px; }
input[type=color] { width: 100%; height: 42px; padding: 3px; border-radius: 10px;
  border: 1px solid var(--linha); background: var(--bg-2); cursor: pointer; }
.erro-campo { color: var(--vermelho); font-size: 12.5px; margin-top: 5px; }

.troca { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.troca input { display: none; }
.troca i {
  width: 40px; height: 23px; border-radius: 12px; background: var(--linha);
  position: relative; transition: background .2s; flex: 0 0 40px;
}
.troca i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px;
  border-radius: 50%; background: #fff; transition: transform .2s;
}
.troca input:checked + i { background: var(--roxo); }
.troca input:checked + i::after { transform: translateX(17px); }

/* ------------------------------------------------------------ cartões */
.cartao {
  background: var(--bg-2); border: 1px solid var(--linha);
  border-radius: var(--raio); padding: 18px;
}
.cartao + .cartao { margin-top: 14px; }
.cartao h3 { font-size: 15px; margin-bottom: 4px; }

.selo {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 20px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
}
.selo.verde    { background: rgba(47,212,143,.14);  color: var(--verde); }
.selo.amarelo  { background: rgba(245,196,81,.15);  color: var(--amarelo); }
.selo.cinza    { background: rgba(157,157,179,.13); color: var(--txt-2); }
.selo.roxo     { background: rgba(124,92,255,.18);  color: var(--roxo-2); }
.selo.vermelho { background: rgba(255,95,109,.14);  color: var(--vermelho); }

/* ------------------------------------------------------------ avisos */
#avisos { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: grid; gap: 8px; width: max-content; max-width: 92vw; }
.aviso {
  background: var(--bg-3); border: 1px solid var(--linha); border-radius: 12px;
  padding: 12px 18px; box-shadow: var(--sombra); font-size: 14px;
  animation: sobe .22s ease; display: flex; align-items: center; gap: 9px;
}
.aviso.bom  { border-color: rgba(47,212,143,.45); }
.aviso.ruim { border-color: rgba(255,95,109,.5); }
@keyframes sobe { from { opacity: 0; transform: translateY(14px); } }

/* ------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; background: rgba(4,4,8,.72); z-index: 150;
  display: none; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(5px); }
.modal.aberto { display: flex; }
.modal-caixa {
  background: var(--bg-2); border: 1px solid var(--linha); border-radius: 18px;
  padding: 26px; width: 100%; max-width: 460px; box-shadow: var(--sombra);
  max-height: 90vh; overflow-y: auto; animation: sobe .2s ease;
}
.modal-caixa.larga { max-width: 720px; }
.modal-caixa h2 { font-size: 19px; margin-bottom: 6px; }
.modal-rodape { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ------------------------------------------------------------- vazio */
.vazio { text-align: center; padding: 48px 20px; color: var(--txt-2); }
.vazio svg { width: 42px; height: 42px; opacity: .3; margin-bottom: 12px; }
.vazio h3 { color: var(--txt); font-size: 16px; margin-bottom: 6px; }

.carregando { display: grid; place-items: center; padding: 60px; }
.giro { width: 26px; height: 26px; border: 2.5px solid var(--linha);
  border-top-color: var(--roxo); border-radius: 50%; animation: gira .7s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ tabela */
table.tab { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tab th {
  text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--txt-3); padding: 0 12px 9px; white-space: nowrap;
}
table.tab td { padding: 12px; border-top: 1px solid var(--linha); vertical-align: middle; }
table.tab tr:hover td { background: rgba(255,255,255,.02); }
.rolagem { overflow-x: auto; }
