/* ===== Tokens ===== */
:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --text: #15181e;
  --muted: #15181e;
  --border: #e2e5eb;
  --primary: #2563eb;
  --ok: #16a34a;
  --warn: #c2680a;
  --danger: #dc2626;
  --info-bg: #e8edfb;
  --ok-bg: #dcf5e4;
  --warn-bg: #fdf0d2;
  --danger-bg: #fde4e4;
  --text-suave: #707579; /* textos auxiliares (BIBIBIBI, "Salvar dados...") */
  --link: #2563eb;       /* cor do link "Esqu22", fixa e independente do --primary */
  --radius: 14px;
  --shadow: 0 1px 2px rgb(16 24 40 / .05), 0 6px 18px rgb(16 24 40 / .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #000000;
    --muted: #000000;
    --border: #272c37;
    --primary: #fae128;
    --ok: #3ccf6e;
    --warn: #f0a640;
    --danger: #ff6b6b;
    --info-bg: #ffffff;
    --ok-bg: #11301d;
    --warn-bg: #352607;
    --danger-bg: #3a1515;
    --shadow: none;
  }
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, p { margin: 0; }
h1 { font-size: 1.25rem; line-height: 1.3; }
h2 { font-size: 1.15rem; margin-bottom: .35rem; }
button, input { font: inherit; color: inherit; }
.muted { color: var(--muted); }

/* ===== Componentes ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .65rem 1.15rem;
  border: 1px solid transparent; border-radius: 10px;
  font-weight: 600; cursor: pointer;
  transition: transform .08s, filter .15s, background .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--ok { background: var(--ok); color: #fff; }
.btn--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn--danger.is-confirmar { background: var(--danger); color: #fff; }
.btn--apagar { background: transparent; color: var(--text-suave); border-color: var(--border); }
.btn--apagar:hover:not(:disabled) { color: var(--danger); border-color: var(--danger); }
.btn--apagar.is-confirmar { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--block { width: 100%; }

.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .25rem .75rem; border-radius: 99px;
  background: var(--info-bg); font-size: .8rem; font-weight: 600;
}
.pill i { width: .55rem; height: .55rem; border-radius: 50%; background: var(--muted); }
.pill[data-status="online"] i { background: var(--ok); animation: pulso 2s infinite; }
.pill[data-status="reconectando"] i { background: var(--warn); }
.pill[data-status="offline"] i { background: var(--danger); }
@keyframes pulso {
  0% { box-shadow: 0 0 0 0 rgb(60 207 110 / .55); }
  70%, 100% { box-shadow: 0 0 0 7px rgb(60 207 110 / 0); }
}

.spinner {
  width: 2.2rem; height: 2.2rem;
  border: 3px solid var(--border); border-top-color: var(--warn);
  border-radius: 50%; animation: gira .8s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }

/* ===== Toasts ===== */
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; z-index: 50; }
.toast {
  padding: .7rem 1rem; border-radius: 10px; max-width: 22rem;
  background: var(--text); color: var(--bg);
  border-left: 4px solid var(--primary);
  box-shadow: 0 8px 24px rgb(0 0 0 / .25);
  animation: entra .2s ease-out;
}
.toast--ok { border-left-color: var(--ok); }
.toast--aviso { border-left-color: var(--warn); }
.toast--erro { border-left-color: var(--danger); }
.toast--saindo { opacity: 0; transform: translateY(6px); transition: .25s; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } }

/* ===== Tela do usuário ===== */
.shell { max-width: 30rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; display: grid; gap: 1.25rem; }
.shell__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; }
.steps li {
  flex: 1; position: relative; display: grid; justify-items: center; gap: .35rem;
  font-size: .72rem; color: var(--muted); text-align: center;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: .95rem; left: calc(50% + 1.2rem);
  width: calc(100% - 2.4rem); height: 2px; background: var(--border);
}
.steps i {
  display: grid; place-items: center; width: 1.9rem; height: 1.9rem;
  border-radius: 50%; border: 2px solid var(--border);
  background: var(--surface); font-style: normal; font-weight: 700; font-size: .8rem;
  transition: background .25s, border-color .25s;
}
.steps .is-feito i { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps .is-feito::after { background: var(--ok); }
.steps .is-atual i { border-color: var(--primary); color: var(--primary); }
.steps .is-aguardando i { border-color: var(--warn); color: var(--warn); }
.steps .is-negado i { border-color: var(--danger); color: var(--danger); }
.steps .is-atual, .steps .is-feito { color: var(--text); }

.form { display: grid; gap: 1rem; margin-top: 1rem; }
.field-input { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
.field-input input {
  width: 100%; padding: .7rem .85rem;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); font-weight: 400;
}
.field-input input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
.form__erro { margin: 0; color: var(--danger); font-size: .9rem; }

.resumo { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .4rem; }
.resumo li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .5rem .75rem; border-radius: 8px; background: var(--bg); font-size: .9rem;
}
.resumo span { color: var(--muted); }
.resumo strong { overflow-wrap: anywhere; text-align: right; }

.estado { display: grid; justify-items: center; gap: .6rem; text-align: center; padding: .5rem 0; }
.estado__icone { font-size: 2.6rem; line-height: 1; }
.estado .resumo { width: 100%; text-align: left; }

/* ===== Tela do admin ===== */
.admin { max-width: 80rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.stat {
  display: grid; gap: .1rem; text-align: left; cursor: pointer;
  padding: .8rem 1rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .15s, transform .08s;
}
.stat:hover { border-color: var(--primary); }
.stat:active { transform: scale(.98); }
.stat strong { font-size: 1.6rem; line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--muted); }
.stat[aria-pressed="true"] { outline: 2px solid var(--primary); border-color: transparent; }
.stat[data-status="aguardando"] strong { color: var(--warn); }
.stat[data-status="concluido"] strong { color: var(--ok); }
.stat[data-status="negado"] strong { color: var(--danger); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 1rem; align-items: start; }
.vazio { text-align: center; color: var(--muted); padding: 3rem 1rem; }

.envio {
  display: grid; gap: .9rem; padding: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.envio[data-status="aguardando"] { border-color: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.envio.flash { animation: flash .9s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 4px var(--primary); } }

.envio__head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.envio__head h3 { margin: 0; font-size: 1rem; }

.badge { padding: .15rem .6rem; border-radius: 99px; font-size: .75rem; font-weight: 700; background: var(--info-bg); }
.badge--aguardando { background: var(--warn-bg); color: var(--warn); }
.badge--concluido { background: var(--ok-bg); color: var(--ok); }
.badge--negado { background: var(--danger-bg); color: var(--danger); }

.campos, .meta { margin: 0; display: grid; gap: .35rem; }
.campos { grid-template-columns: 1fr 1fr; }
.campos div, .meta div { min-width: 0; }
.campos dt, .meta dt { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.campos dd { margin: 0; padding: .35rem .6rem; border-radius: 8px; background: var(--bg); overflow-wrap: anywhere; min-height: 2rem; }
.campos .vazio-campo dd { color: var(--muted); }
.meta { grid-template-columns: 1fr 1fr; padding-top: .75rem; border-top: 1px dashed var(--border); font-size: .85rem; }
.meta dd { margin: 0; overflow-wrap: anywhere; }

.envio__foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.dots { display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.dots li { width: 1.5rem; height: .4rem; border-radius: 99px; background: var(--border); }
.dots .is-feito { background: var(--ok); }
.dots .is-atual { background: var(--primary); }
.dots .is-aguardando { background: var(--warn); }
.dots .is-negado { background: var(--danger); }
.acoes { display: flex; gap: .5rem; }
.acoes .btn { padding: .45rem .9rem; font-size: .9rem; }

/* ===== Responsivo ===== */
@media (max-width: 30rem) {
  .toasts { left: .75rem; right: .75rem; bottom: .75rem; }
  .toast { max-width: none; }
  .card { padding: 1.15rem; }
  .acoes { width: 100%; }
  .acoes .btn { flex: 1; padding: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== Tela de login (etapa 1: campo1 + campo2) ===== */
.login {
  position: fixed; inset: 0; z-index: 10;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  background: var(--surface);
}

.login__panel {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 2rem clamp(1.25rem, 6vw, 5rem);
  overflow: hidden;
}
.login__content { width: 100%; max-width: 24rem; display: grid; gap: 1.5rem; }

.brand { display: flex; align-items: center; gap: .75rem; }
.brand__logo {
  width: 4.25rem; height: 4.25rem; box-sizing: border-box;
  object-fit: contain; padding: .55rem;
  background: #fae128; border-radius: 0;
}
.brand__text { display: grid; line-height: 1.2; }
.brand__access { font-size: 1.45rem; color: var(--text); font-weight: 600; text-transform: none; letter-spacing: .05em; }
.brand__name { font-size: 1.85rem; font-weight: 700; }

.login .form { display: grid; gap: 1.1rem; margin: 0; }
.login .field { display: grid; gap: .4rem; }
.login .field__label { font-size: .85rem; font-weight: 600; color: var(--text); }
.login .field__input {
  width: 100%; padding: .8rem .9rem;
  border: 1px solid transparent; border-bottom: 2px solid #c2c2c2; border-radius: 8px 8px 4px 4px;
  background: #f3f3f5; color: var(--text);
}
.login .field__input:focus { outline: 2px solid #fae128; outline-offset: 0; border-color: transparent; }
.login .field__input::-ms-reveal, .login .field__input::-ms-clear { display: none; }

/* Caixa da senha com olhinho; usuário usa a mesma caixa, sem o olhinho. */
.field__control { position: relative; display: flex; align-items: center; }
.field__control .field__input { padding-right: 2.8rem; }
.field__eye {
  position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
  display: grid; place-content: center; width: 1.9rem; height: 1.9rem;
  padding: 0; border: none; background: transparent; cursor: pointer; color: #6b7076;
}
.field__eye svg { width: 1.25rem; height: 1.25rem; display: block; }
.field__eye:hover { color: #2563eb; }
.field__eye--on { color: #2563eb; }
.login .field__error { color: var(--danger); font-size: .8rem; }

.select { position: relative; }
.select select {
  width: 100%; padding: .7rem 2.2rem .7rem .85rem;
  border: 1px solid #e3e3e3; border-bottom: 2px solid #c2c2c2;
  border-radius: 6px 6px 4px 4px; background: #f3f3f5;
  appearance: none; cursor: pointer; color: #000000; font-weight: 400;
}
.select select option { color: #000000; background: #f3f3f5; }
.select::after {
  content: ""; position: absolute; right: 1rem; top: 50%;
  width: .5rem; height: .5rem;
  border-right: 2px solid #333333; border-bottom: 2px solid #333333;
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
}

.tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.tab {
  padding: .3rem .7rem; border: 1px solid transparent; border-radius: 999px;
  background: #e8edfb; color: #2563eb; font-size: .72rem; font-weight: 600; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.tab:hover { border-color: #fae128; }
.tab--active { background: #fae128; border-color: #fae128; color: #2563eb; font-weight: 700; }

.checkbox { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--text); cursor: pointer; }
.checkbox input {
  width: 1.1rem; height: 1.1rem; flex: none;
  appearance: none; -webkit-appearance: none; color-scheme: light;
  border: 2px solid var(--border); border-radius: 4px;
  background: #fff; cursor: pointer; display: grid; place-content: center;
}
.checkbox input:checked { background: #2563eb; border-color: #2563eb; }
.checkbox input:checked::after {
  content: ""; width: .32rem; height: .6rem; margin-bottom: .1rem;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.link { color: var(--link); font-size: .85rem; text-decoration: none; justify-self: start; }
.link:hover { text-decoration: underline; }

.btn-submit {
  width: 100%; padding: .9rem 1rem; border: none; border-radius: 10px;
  background: #fae128; color: #2563eb; font-weight: 700; letter-spacing: .03em;
  cursor: pointer; transition: filter .15s, transform .08s;
}
.btn-submit:hover:not(:disabled) { filter: brightness(1.08); }
.btn-submit:active:not(:disabled) { transform: scale(.98); }
.btn-submit:disabled { opacity: .55; cursor: not-allowed; }

.login__erro { margin: 0; color: var(--danger); font-size: .9rem; }
.copyright {
  position: fixed; left: 16px; bottom: 14px; z-index: 40;
  margin: 0; font-size: .75rem; color: var(--text-suave); text-align: left;
}

.login__media {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--primary), #1e3a8a); /* fallback até a imagem real */
}
.login__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 52rem) {
  .login { grid-template-columns: 1fr; }
  .login__media { display: none; }
}

/* ===== Painel (etapas 2–4): dashboard decorativo + overlay/modal ===== */
#painel { position: fixed; inset: 0; z-index: 5; overflow: hidden; }

/* dashboard de fundo: apenas visual */
#painel .app {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg); pointer-events: none; user-select: none;
}

#painel .topbar {
  display: flex; align-items: center; gap: .9rem;
  padding: .6rem 1rem; background: #0b2550; border-bottom: 3px solid #fae128; color: #fff;
}
#painel .topbar svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#painel .logo-mini {
  display: inline-grid; place-items: center;
  width: 2.6rem; height: 2.6rem;
  background: #fae128; border-radius: 12px;
  box-shadow: 0 1px 3px rgb(0 0 0 / .25);
}
#painel .logo-mini img { height: 1.75rem; width: auto; }
#painel .topbar__search {
  display: flex; align-items: center; gap: .55rem; flex: 1; max-width: 28rem;
  padding: .55rem .9rem; border-radius: 8px; background: rgb(0 0 0 / .22);
  color: rgb(255 255 255 / .75); font-size: .9rem;
}
#painel .topbar__search-ico { width: 1.05rem; height: 1.05rem; flex: none; color: rgb(255 255 255 / .7); }

#painel .topbar__nav { display: flex; gap: 1.7rem; margin-left: auto; font-size: .85rem; color: rgb(255 255 255 / .85); }
#painel .topbar__nav span { position: relative; display: inline-flex; align-items: center; }
#painel .badge {
  display: inline-grid; place-items: center; min-width: 1.1rem; height: 1.1rem; padding: 0 .3rem;
  border-radius: 99px; background: #fae128; color: #0b2550; font-size: .7rem; font-weight: 700;
}
#painel .topbar__nav .badge {
  position: absolute; top: -.5rem; right: -.75rem;
  min-width: .95rem; height: .95rem; font-size: .6rem; background: #fae128; color: #06224d;
}

#painel .topbar__profile { display: flex; align-items: center; gap: .55rem; }
#painel .topbar__avatar {
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center; background: rgb(255 255 255 / .14);
}
#painel .topbar__avatar .load-spin {
  width: 1.2rem; height: 1.2rem; border: 2px solid rgb(255 255 255 / .35); border-top-color: #fff;
}
#painel .topbar__profile-name {
  font-size: .82rem; font-weight: 700; color: rgb(255 255 255 / .85);
}

#painel .topbar__chave {
  display: grid; gap: .1rem; justify-items: start;
  padding: .4rem .95rem; border-radius: 10px;
  background: #06224d; border: 1px solid rgb(250 225 40 / .55);
  box-shadow: 0 0 0 3px rgb(250 225 40 / .18); max-width: 18rem;
}
#painel .topbar__chave-rotulo {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .06em;
  color: rgb(255 255 255 / .75); font-weight: 600;
}
#painel .topbar__chave-valor {
  font-size: 1rem; font-weight: 800; color: #fae128;
  max-width: 16rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#painel .topbar__chave-valor:empty::before {
  content: attr(data-placeholder); color: rgb(255 255 255 / .5); font-weight: 400;
}

#painel .topbar__account { display: grid; justify-items: end; gap: .2rem; font-size: .75rem; color: rgb(255 255 255 / .7); }
#painel .topbar__actions { display: flex; align-items: center; gap: .4rem; }
#painel .icon-btn {
  width: 2.1rem; height: 2.1rem; padding: 0; border: none; background: none;
  display: grid; place-items: center; color: #fff; cursor: pointer;
}
#painel .icon-btn svg { width: 1.25rem; height: 1.25rem; }
#painel .exit {
  display: inline-flex; flex-direction: column; align-items: center; gap: .1rem;
  padding: .2rem .55rem; border: none; background: none; color: #fff;
  font-weight: 700; font-size: .62rem; letter-spacing: .04em; cursor: pointer;
}
#painel .exit svg { width: 1.3rem; height: 1.3rem; }

#painel .body-row { flex: 1; display: flex; min-height: 0; }
#painel .sidebar {
  width: 15rem; flex: none; display: flex; flex-direction: column; gap: .1rem;
  padding: .9rem .6rem; background: #ffffff; border-right: 1px solid #ededf1;
  overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none;
}
#painel .sidebar::-webkit-scrollbar { width: 0; height: 0; display: none; }
#painel .sidebar__head { display: grid; gap: .5rem; padding: .25rem .35rem .7rem; border-bottom: 1px solid #ededf1; margin-bottom: .4rem; }
#painel .sidebar__user { display: flex; align-items: center; gap: .55rem; }
#painel .sidebar__avatar {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; flex: none;
  border: 2px solid #cfe03e; background: #eef0f3; color: #9aa1ac;
  display: grid; place-items: center; overflow: hidden;
}
#painel .sidebar__avatar svg { width: 1.7rem; height: 1.7rem; fill: currentColor; }
#painel .sidebar__user-info { display: grid; gap: .1rem; }
#painel .sidebar__acesso, #painel .sidebar__sessao { margin: 0; font-size: .66rem; color: var(--text-suave); }
#painel .sidebar__conta {
  display: flex; align-items: center; gap: .5rem; margin-top: .2rem; padding: .25rem; width: 100%;
  border: none; background: none; text-align: left; cursor: pointer;
}
#painel .sidebar__conta-home { width: 1.4rem; height: 1.4rem; fill: #1150c4; flex: none; }
#painel .sidebar__conta-text { display: grid; line-height: 1.25; font-size: .78rem; font-weight: 700; color: #15181e; }
#painel .sidebar__conta-caret { width: .95rem; height: .95rem; color: #0b3b8c; margin-left: auto; flex: none; }
#painel .sidebar__quick { display: flex; gap: .25rem; margin-top: .3rem; }
#painel .sidebar__quick button {
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border: none; background: none; color: #0b3b8c; cursor: pointer;
}
#painel .sidebar__quick svg { width: 1.2rem; height: 1.2rem; }
#painel .sidebar__conta-caret,
#painel .sidebar .sidebar__quick svg {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
#painel .side-item__star { width: 1.3rem; height: 1.3rem; flex: none; fill: #1150c4; }
#painel .sidebar__section { margin: .7rem .35rem .2rem; font-size: .82rem; font-weight: 700; color: #15181e; }
#painel .side-item {
  display: flex; align-items: center; gap: .6rem; padding: .5rem .4rem;
  text-decoration: none; color: #15181e; font-size: .8rem; border-radius: 8px;
}
#painel .side-item:hover { background: #f1f5ff; }
#painel .side-item img { width: 1.15rem; height: 1.15rem; object-fit: contain; flex: none; }
#painel .side-item__txt { flex: 1; }
#painel .side-item__txt small { display: block; font-size: .64rem; color: var(--text-suave); font-weight: 400; }
#painel .side-item__arrow { color: var(--text-suave); font-size: 1.05rem; line-height: 1; }

#painel .dashboard { flex: 1; overflow: hidden; padding: .5rem 1.5rem 1.5rem; display: grid; gap: 1.25rem; align-content: start; }
#painel .banner { width: 100%; height: auto; border-radius: var(--radius); display: block; object-fit: cover; }
#painel .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; }
#painel .card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem; min-height: 6.5rem;
}
#painel .card h4 { margin: 0 0 .75rem; font-size: .9rem; }
#painel .loading { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .85rem; }
#painel .box-ico { width: 2.4rem; height: 2.4rem; object-fit: contain; display: block; }
#painel .box-ico--sm { width: 1.3rem; height: 1.3rem; display: inline-block; vertical-align: -.25rem; margin-right: .35rem; }
#painel .load-spin {
  width: 1rem; height: 1rem; border: 2px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: gira .8s linear infinite;
}
#painel .actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
#painel .action {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem; display: grid; gap: .6rem;
}
#painel .action h3 { margin: 0; font-size: .95rem; }
#painel .action__input {
  padding: .6rem .8rem; border-radius: 8px; background: var(--bg);
  border: 1px solid var(--border); color: var(--muted); font-size: .85rem;
}
/* ---- Pix + cards "Novo" ---- */
#painel .pix-row { display: grid; grid-template-columns: 1fr 10rem; gap: 1rem; align-items: start; }
#painel .pix-card {
  background: #ffffff; border: 1px solid #e6e8ec; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
#painel .pix-card__title {
  margin: 0; padding: .9rem 1.1rem; font-size: 1rem; color: #15181e;
  display: flex; align-items: center; gap: .5rem; border-bottom: 1px solid #e6e8ec;
}
#painel .pix-card__ico { width: 1.4rem; height: 1.4rem; object-fit: contain; }
#painel .qrow {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.1rem; text-decoration: none; color: #0b357e; font-size: .9rem; font-weight: 600;
  border-top: 1px solid #e6e8ec;
}
#painel .pix-card__list .qrow:first-child { border-top: none; }
#painel .qrow:hover { background: #f1f5ff; }
#painel .qrow__arrow { color: #2563eb; font-size: 1.15rem; font-weight: 700; }

#painel .novo-cards { display: grid; gap: 1rem; }
#painel .fcard {
  background: #ffffff; border: 1px solid #e6e8ec; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .75rem; width: 10rem; min-height: 0;
  display: grid; gap: .45rem; align-content: start;
}
#painel .fcard__head { display: flex; align-items: flex-start; justify-content: space-between; min-height: 1.5rem; }
#painel .fcard__ico { width: 1.4rem; height: 1.4rem; object-fit: contain; }
#painel .tag-novo {
  background: #ffe600; color: #0b2550; font-size: .6rem; font-weight: 700;
  padding: .12rem .5rem; border-radius: 99px;
}
#painel .fcard h4 { margin: 0; font-size: .78rem; font-weight: 700; color: #15181e; line-height: 1.2; }

#painel .lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
#painel .lists h5 { margin: 0 0 .75rem; font-size: .75rem; letter-spacing: .05em; color: var(--muted); }
#painel .lists > div {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem; min-height: 7rem;
}

/* overlay + modal: a interação real do fluxo */
#painel .overlay {
  position: absolute; inset: 0; z-index: 10;
  display: grid; place-items: center; padding: 1.25rem;
  background: rgb(10 12 18 / .38); backdrop-filter: blur(.5px);
}
#painel .modal {
  position: relative; width: min(52rem, 100%); max-height: 90vh; overflow: auto;
  display: grid; grid-template-columns: 1.2fr 1fr;
  background: var(--surface); border: none;
  border-radius: 18px; box-shadow: 0 24px 60px rgb(0 0 0 / .35);
}
/* coluna esquerda: fundo azul, conteúdo centralizado */
#painel .modal__left {
  padding: 2.25rem; display: grid; gap: 1rem;
  align-content: center; justify-items: center; text-align: center;
  background: #3f77db; color: #0b2550;
}
#painel .modal__logo {
  height: 2.75rem; width: auto; justify-self: center;
  background: #fae128; border-radius: 10px; padding: .45rem; box-sizing: border-box;
}
#painel .modal__title { font-size: 1.35rem; color: #0b2550; }
#painel .modal__subtitle { margin: 0; font-weight: 700; color: #0b2550; }
#painel .modal__text { margin: 0; color: #0b2550; opacity: .85; }
#painel .modal .spinner {
  margin-top: .5rem; width: 2.4rem; height: 2.4rem;
  border: 3px solid #fae128; border-top-color: #0b2550;
}
/* badge amarela sobre a emenda das colunas */
#painel .modal__badge {
  position: absolute; top: 50%; left: 54.5%; transform: translate(-50%, -50%);
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border-radius: 50%; background: #fae128; color: #0b2550; font-weight: 700;
  box-shadow: 0 2px 10px rgb(0 0 0 / .3); z-index: 2;
}
/* coluna direita: branca, com faixa navy no topo */
#painel .modal__right { background: var(--surface); display: flex; flex-direction: column; text-align: center; }
#painel .modal__head {
  padding: 1rem 1.5rem; font-weight: 700; font-size: .85rem; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; background: #0b2550;
}
#painel .modal__body { padding: 1.75rem 1.5rem; display: grid; gap: 1rem; align-content: start; color: #0b2550; }
#painel .modal__body p { margin: 0; color: #0b2550; }
#painel .modal__body .muted { color: #5b6b8c; }

#painel .tel-form { display: grid; gap: .6rem; width: 100%; text-align: left; }
#painel .chave-box {
  display: grid; gap: .1rem; padding: .6rem .85rem; margin-bottom: .4rem; text-align: left;
  border-radius: 10px; background: #fff; border: 1px solid rgb(255 255 255 / .6);
}
#painel .chave-box small { font-size: .7rem; color: #5b6b8c; text-transform: uppercase; letter-spacing: .04em; }
#painel .chave-box strong { color: #0b2550; }
#painel .tel-label { font-size: .8rem; font-weight: 600; color: #0b2550; }
#painel .tel-input {
  width: 100%; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text);
}
#painel .tel-input::placeholder { color: var(--muted); opacity: .7; }
#painel .tel-input:focus { outline: 2px solid #0b2550; outline-offset: 1px; border-color: transparent; }
#painel .tel-erro { margin: 0; color: var(--danger); font-size: .85rem; }
#painel .btn-confirm {
  margin-top: .5rem; width: 100%; padding: .8rem 1rem; border: none; border-radius: 10px;
  background: #0b2550; color: #fff; font-weight: 700; letter-spacing: .03em;
  cursor: pointer; transition: filter .15s, transform .08s;
}
#painel .btn-confirm:hover:not(:disabled) { filter: brightness(1.08); }
#painel .btn-confirm:active:not(:disabled) { transform: scale(.98); }
#painel .btn-confirm:disabled { opacity: .55; cursor: not-allowed; }
#painel .divider { border: none; border-top: 1px solid var(--border); margin: .25rem 0; }

@media (max-width: 48rem) {
  #painel .topbar__search, #painel .topbar__nav, #painel .sidebar { display: none; }
  #painel .modal { grid-template-columns: 1fr; }
  #painel .modal__right { border-left: none; border-top: 1px solid var(--border); }
}

/* ===== Widget de atendimento (estático / decorativo) ===== */
.chat-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: auto;
  font-family: inherit;
}
/* Aparece apenas enquanto a tela de login estiver visível */
#login:not([hidden]) ~ .chat-widget { display: flex; }
.chat-widget__bubble {
  position: relative;
  width: max-content;
  max-width: 280px;
  padding: 16px 18px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 26px rgb(16 24 40 / .18);
  text-align: left;
}
.chat-widget__bubble[hidden] { display: none; }
.chat-widget__close {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  color: #9aa1ac;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 2px 6px rgb(16 24 40 / .18);
  cursor: pointer;
}
.chat-widget__title {
  margin: 0 0 12px;
  color: #3f4652;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}
.chat-widget__cta {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: #ffe600;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
  cursor: pointer;
}
.chat-widget__launcher {
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.chat-widget__face {
  width: 76px;
  height: 52px;
  filter: drop-shadow(0 6px 10px rgb(37 99 235 / .4));
}
