/* ============================================================
   arch — camada de PRODUTO (spec design/jolf-tools.html · secao arch).

   O site jolf e editorial (mono, sem cantos, sem sombra). A ferramenta
   e outra coisa: cara de app, cantos arredondados 8-28px, sombras suaves,
   alvos 40px+, icone + rotulo em tudo. O acento de cobalto (reservado na
   marca) e ativado aqui como cor de navegacao/acao. Tema CLARO, sempre —
   o spec das ferramentas nao tem variante escura.
   O wordmark nunca muda: e sempre .jolf-wordmark (definido em tokens.css).
   ============================================================ */
:root {
  --ink-03: rgba(10,10,10,0.03);
  --ink-04: rgba(10,10,10,0.045);
  --ink-06: rgba(10,10,10,0.065);
  --ink-40: rgba(10,10,10,0.4);

  --ra-sm: 8px; --ra: 11px; --ra-md: 13px; --ra-lg: 16px; --ra-xl: 22px; --ra-2xl: 28px;
  --sh-sm: 0 1px 2px rgba(10,10,10,.06), 0 1px 1px rgba(10,10,10,.04);
  --sh: 0 6px 22px rgba(10,10,10,.08), 0 1px 3px rgba(10,10,10,.05);
  --sh-lg: 0 20px 55px rgba(10,10,10,.13), 0 3px 10px rgba(10,10,10,.06);

  /* acento do arch (spec: secao ARCH) */
  --acc: #2f4bff;
  --acc-soft: #ebeeff;
  --acc-ink: #223bd6;

  --crit: #b42318;
  --crit-soft: #fdecec;
  --ok: #0a7a54;
  --ok-soft: #e6f6ef;
}

body {
  background: var(--off);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
}
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

/* ============================================================
   HEADER  (.jt)  — o header do spec, com a nav real do arch
   ============================================================ */
.jt {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  height: 70px; padding: 0 22px;
  background: var(--white); border-bottom: .5px solid var(--ink-06);
  position: sticky; top: 0; z-index: 40;
}
.jt-l { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.jt-r { display: flex; align-items: center; gap: 9px; flex: none; }

/* lockup — wordmark preservado + pill do produto no cobalto */
.jt-lock { display: flex; align-items: center; gap: 9px; flex: none; text-decoration: none; }
.jt-lock .jolf-wordmark { font-size: 26px; color: var(--ink); }
.jt-prod {
  font-family: var(--body); font-weight: 500; font-size: 14px; letter-spacing: -.01em;
  color: var(--acc-ink); background: var(--acc-soft); padding: 4px 10px;
  border-radius: var(--ra-sm); line-height: 1;
}
.jt-div { width: .5px; height: 26px; background: var(--ink-10); flex: none; }

/* nav — icone + rotulo, alvo generoso, ativo em tinta do app */
.jt-nav { display: flex; align-items: center; gap: 4px; overflow: hidden; }
.jt-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px;
  border-radius: var(--ra); font-size: 14px; font-weight: 400; color: var(--ink-60);
  cursor: pointer; white-space: nowrap; flex: none;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.jt-tab svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.75; }
.jt-tab:hover { background: var(--ink-04); color: var(--ink); }
.jt-tab.on { background: var(--acc-soft); color: var(--acc-ink); font-weight: 500; }

/* busca — redonda, sempre aberta */
.jt-search {
  display: flex; align-items: center; gap: 8px; background: var(--ink-04);
  border-radius: var(--ra); height: 40px; padding: 0 13px; width: 200px; flex: none;
}
.jt-search svg { width: 17px; height: 17px; stroke: var(--ink-40); stroke-width: 1.75; flex: none; }
.jt-search input {
  border: 0; background: transparent; outline: none; font-family: var(--body);
  font-weight: 300; font-size: 13.5px; color: var(--ink); width: 100%;
}
.jt-search input::placeholder { color: var(--ink-40); }

/* botoes de icone */
.jt-ico {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: var(--ra); color: var(--ink-60); cursor: pointer; border: 0; background: transparent;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.jt-ico:hover { background: var(--ink-04); color: var(--ink); }
.jt-ico svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.75; }
.jt-ico .badge-dot {
  position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 999px;
  background: var(--acc); border: 2px solid var(--white);
}

/* acao primaria — preenchida no acento */
.jt-cta {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--ra); background: var(--acc); color: #fff; font-family: var(--body);
  font-weight: 500; font-size: 13.5px; letter-spacing: -.005em; cursor: pointer; border: 0;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--acc) 30%, transparent);
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease);
}
.jt-cta svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 2; }
.jt-cta:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 10px 22px color-mix(in srgb, var(--acc) 38%, transparent); }

/* conta — avatar redondo com iniciais + menu (details/summary, sem JS) */
.jt-menu { position: relative; flex: none; }
.jt-menu > summary { list-style: none; cursor: pointer; }
.jt-menu > summary::-webkit-details-marker { display: none; }
.jt-av {
  width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center;
  background: var(--acc-soft); color: var(--acc-ink); font-family: var(--body);
  font-weight: 500; font-size: 13px; letter-spacing: .01em; margin-left: 4px;
}
.jt-pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  background: var(--white); border: .5px solid var(--ink-06); border-radius: var(--ra-md);
  box-shadow: var(--sh-lg); padding: 8px; z-index: 60;
}
.jt-pop .who { padding: 8px 10px 10px; border-bottom: .5px solid var(--ink-06); margin-bottom: 6px; }
.jt-pop .who b { display: block; font-weight: 500; font-size: 13px; color: var(--ink); }
.jt-pop .who span { font-size: 11.5px; color: var(--ink-40); }
.jt-pop button.sair {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px;
  border: 0; background: transparent; border-radius: var(--ra-sm); color: var(--ink);
  font-family: var(--body); font-size: 13.5px; cursor: pointer; text-align: left;
}
.jt-pop button.sair svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.75; }
.jt-pop button.sair:hover { background: var(--ink-04); }

/* ============================================================
   LAYOUT
   ============================================================ */
main { max-width: 1160px; margin: 34px auto 96px; padding: 0 24px; }

.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.pagehead .ph-l { min-width: 0; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-40); margin-bottom: 8px; }
.crumb svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.75; }
.crumb:hover { color: var(--acc-ink); }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.02em; line-height: 1.05; margin: 0; }
h1 em { font-style: italic; }
h2 { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: -.01em; margin: 40px 0 16px; }
.sub { color: var(--ink-60); margin-top: 6px; }

.seclabel {
  font: 400 9px/1 var(--body); letter-spacing: .32em; text-transform: uppercase;
  color: var(--ink-30); display: flex; align-items: center; gap: 16px; margin: 40px 0 20px;
}
.seclabel::after { content: ""; flex: 1; height: .5px; background: var(--ink-10); }

/* ---- chips (filtros) ---- */
.chip-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px;
  border-radius: 999px; font-size: 12.5px; color: var(--ink-60); background: var(--white);
  border: .5px solid var(--ink-06); cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--acc-soft); color: var(--acc-ink); border-color: transparent; font-weight: 500; }
.chip svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.75; }
.spacer { flex: 1; }

/* ---- cards ---- */
.card {
  background: var(--white); border-radius: var(--ra-lg); padding: 22px;
  box-shadow: var(--sh-sm); border: .5px solid var(--ink-06); margin-bottom: 18px;
}
.card.tight { padding: 16px 18px; }
.muted { color: var(--ink-40); }
.empty {
  background: var(--white); border: .5px dashed var(--ink-10); border-radius: var(--ra-lg);
  padding: 40px 24px; text-align: center; color: var(--ink-60);
}

/* ---- avisos / erros ---- */
.aviso, .erro {
  display: flex; align-items: center; gap: 9px; border-radius: var(--ra); padding: 12px 14px;
  margin-bottom: 16px; font-size: 13.5px;
}
.aviso { background: var(--acc-soft); color: var(--acc-ink); }
.aviso.ok { background: var(--ok-soft); color: var(--ok); }
.erro { background: var(--crit-soft); color: var(--crit); }
.aviso svg, .erro svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.9; flex: none; }

/* ---- badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: var(--ink-04); color: var(--ink-60); white-space: nowrap;
}
.badge.accent { background: var(--acc-soft); color: var(--acc-ink); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.crit { background: var(--crit-soft); color: var(--crit); }
.badge svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; }

/* ---- grade / tiles (galeria estilo .gal do spec) ---- */
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tile {
  border-radius: var(--ra-md); overflow: hidden; background: var(--white);
  border: .5px solid var(--ink-06); box-shadow: var(--sh-sm); text-decoration: none; color: inherit;
  display: block; transition: transform .18s var(--ease), box-shadow .2s var(--ease);
}
a.tile:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: linear-gradient(135deg,#eef1f6,#e2e7f0); }
.tile .thumb {
  aspect-ratio: 4/3; background: linear-gradient(135deg,#eef1f6,#e2e7f0); display: grid; place-items: center;
}
.tile .thumb svg { width: 26px; height: 26px; stroke: var(--ink-30); stroke-width: 1.25; }
.tile .cap { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.tile .cap b { font-weight: 400; font-size: 12.5px; }

/* cards de projeto (grid da tela /projetos) */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.proj-card {
  background: var(--white); border-radius: var(--ra-lg); border: .5px solid var(--ink-06);
  box-shadow: var(--sh-sm); padding: 18px 20px 20px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 8px; min-height: 128px;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease);
}
.proj-card:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.proj-card .pc-ic {
  width: 40px; height: 40px; border-radius: var(--ra-md); background: var(--acc-soft);
  display: grid; place-items: center; margin-bottom: 4px;
}
.proj-card .pc-ic svg { width: 20px; height: 20px; stroke: var(--acc-ink); stroke-width: 1.75; }
.proj-card b { font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: -.01em; }
.proj-card .pc-desc { font-size: 12.5px; color: var(--ink-60); line-height: 1.5; flex: 1; }
.proj-card .pc-meta { font-size: 11px; color: var(--ink-40); }

/* ---- formularios ---- */
label {
  display: block; font-size: 11px; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-40); margin: 16px 0 6px;
}
label.opt { text-transform: none; letter-spacing: normal; font-weight: 400; font-size: 12.5px; color: var(--ink-60); }
input, textarea, select {
  width: 100%; padding: 10px 12px; border: .5px solid var(--ink-10); border-radius: var(--ra);
  font-size: 13.5px; font-family: var(--body); font-weight: 300; background: var(--white); color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--ink-40); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
textarea { min-height: 84px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; }
.row2 { display: flex; gap: 14px; flex-wrap: wrap; }
.row2 > div { flex: 1; min-width: 180px; }
.radio-line { display: inline-flex; align-items: center; gap: 7px; margin: 4px 18px 4px 0; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.radio-line input { width: auto; }

/* ---- botoes ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: var(--ra); background: var(--acc); color: #fff; font-family: var(--body);
  font-weight: 500; font-size: 13.5px; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--acc) 26%, transparent);
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease);
}
.btn svg { width: 17px; height: 17px; stroke: #fff; stroke-width: 2; }
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.block { width: 100%; justify-content: center; }
.btn.sec {
  background: var(--white); color: var(--ink); border: .5px solid var(--ink-10); box-shadow: var(--sh-sm);
}
.btn.sec svg { stroke: currentColor; }
.btn.sec:hover { border-color: var(--acc); color: var(--acc-ink); filter: none; }
button:not(.jt-ico):not(.sair) { font-family: var(--body); }
.cta-row { margin-top: 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta-row .custo { font-size: 12.5px; color: var(--ink-60); }
.cta-row .custo strong { color: var(--ink); font-weight: 500; }
form.inline { display: inline; }

/* ---- tabelas (extrato / admin) ---- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; padding: 10px 12px; border-bottom: .5px solid var(--ink-10);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-40); font-weight: 500;
}
td { padding: 12px; border-bottom: .5px solid var(--ink-06); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }

/* ---- carteira: saldo grande ---- */
.saldo-card { max-width: 340px; }
.saldo { font-family: var(--display); font-weight: 400; font-size: 46px; letter-spacing: -.02em; line-height: 1.05; }
.saldo span { font-family: var(--body); font-size: 16px; color: var(--ink-40); font-weight: 300; }
.delta-up { color: var(--ok); font-weight: 500; }
.delta-down { color: var(--crit); font-weight: 500; }

/* ---- tela de auth (login / mfa) — card central, tema claro ---- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.auth-inner { width: 100%; max-width: 400px; }
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand .jolf-wordmark { font-size: 52px; color: var(--ink); }
.auth-brand .jt-prod { font-size: 16px; vertical-align: middle; margin-left: 6px; }
.auth-card {
  background: var(--white); border-radius: var(--ra-xl); border: .5px solid var(--ink-06);
  box-shadow: var(--sh); padding: 28px;
}
.auth-title { text-align: center; font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: -.01em; margin: 0 0 4px; }
.auth-sub { text-align: center; color: var(--ink-60); font-size: 13px; margin-bottom: 18px; }
.auth-foot { text-align: center; margin-top: 16px; font-size: 12.5px; color: var(--ink-40); }
.auth-foot a { color: var(--acc-ink); }
.code-in { text-align: center; letter-spacing: .3em; font-size: 20px; font-family: var(--mono); }
.chave-box {
  display: block; word-break: break-all; background: var(--off); border: .5px solid var(--ink-06);
  padding: 10px 12px; border-radius: var(--ra-sm); font-size: 13px; font-family: var(--mono); color: var(--ink);
}
.backup-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none;
  font-family: var(--mono); font-size: 14px; text-align: center;
}
.backup-grid li { background: var(--off); border-radius: var(--ra-sm); padding: 8px 4px; }
ol.passos { margin: 0 0 16px; padding-left: 18px; color: var(--ink-60); font-size: 13px; }
ol.passos li { margin-bottom: 6px; }

/* imagem-view */
.view-grid { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.view-main { flex: 2; min-width: 320px; }
.view-side { flex: 1; min-width: 260px; }
.view-img { width: 100%; border: .5px solid var(--ink-06); border-radius: var(--ra-lg); background: var(--off); display: block; }

/* ============================================================
   MOBILE — header enxuto + tab bar inferior fixa (alvos 44px+)
   ============================================================ */
.jt-tabbar { display: none; }
@media (max-width: 720px) {
  .jt-nav, .jt-search, .jt-div, .jt-help { display: none; }
  .jt { height: 60px; padding: 0 16px; }
  .jt-lock .jolf-wordmark { font-size: 22px; }
  main { margin-top: 22px; margin-bottom: 96px; padding: 0 16px; }
  .row2 > div { min-width: 140px; }

  .jt-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--white); border-top: .5px solid var(--ink-06);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .jt-tabbar a, .jt-tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-width: 60px; min-height: 44px; font-size: 10.5px; color: var(--ink-40);
    background: transparent; border: 0; cursor: pointer; text-decoration: none; font-family: var(--body);
  }
  .jt-tabbar svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.75; }
  .jt-tabbar .on { color: var(--acc-ink); font-weight: 500; }
}

/* ============================================================
   POLIMENTO — dropzone, comparador, lightbox, vazios, skeleton
   ============================================================ */

/* ---- dropzone de upload (o input file continua existindo, so escondido) ---- */
.dz-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.dropzone {
  display: block; position: relative; border: 1.5px dashed var(--ink-10);
  border-radius: var(--ra-lg); padding: 30px 24px; text-align: center; cursor: pointer;
  background: var(--off); transition: border-color .2s var(--ease), background .2s var(--ease);
}
.dropzone:hover { border-color: var(--acc); }
.dropzone.dragover { border-color: var(--acc); background: var(--acc-soft); }
.dz-idle { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dz-icon {
  width: 56px; height: 56px; border-radius: var(--ra-xl); background: var(--acc-soft);
  display: grid; place-items: center; margin-bottom: 8px;
  transition: transform .2s var(--ease);
}
.dropzone.dragover .dz-icon { transform: translateY(-2px); }
.dz-icon svg { width: 26px; height: 26px; stroke: var(--acc-ink); stroke-width: 1.5; }
.dz-title { font-size: 14.5px; font-weight: 500; color: var(--ink); }
.dz-hint { font-size: 12px; color: var(--ink-40); }
/* preview do arquivo escolhido */
.dz-preview { display: flex; align-items: center; gap: 14px; text-align: left; }
.dz-thumb {
  width: 88px; height: 66px; border-radius: var(--ra-md); object-fit: cover; flex: none;
  border: .5px solid var(--ink-06); background: var(--white);
}
.dz-file { min-width: 0; flex: 1; }
.dz-name {
  display: block; font-weight: 500; font-size: 13.5px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dz-size { font-size: 12px; color: var(--ink-40); }
.dz-clear {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; flex: none;
  border-radius: var(--ra-sm); border: .5px solid var(--ink-10); background: var(--white);
  color: var(--ink-60); font-family: var(--body); font-size: 12.5px; cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.dz-clear:hover { border-color: var(--acc); color: var(--acc-ink); }
.dz-clear svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.9; }

/* ---- estados vazios desenhados ---- */
.empty .emp-ic {
  width: 64px; height: 64px; border-radius: var(--ra-xl); background: var(--acc-soft);
  display: grid; place-items: center; margin: 0 auto 16px;
}
.empty .emp-ic svg { width: 30px; height: 30px; stroke: var(--acc-ink); stroke-width: 1.5; }
.empty b {
  display: block; font-family: var(--display); font-weight: 400; font-size: 19px;
  letter-spacing: -.01em; color: var(--ink); margin-bottom: 6px;
}
.empty p { max-width: 44ch; margin: 0 auto; font-size: 13.5px; color: var(--ink-60); }
.empty .btn { margin-top: 18px; }

/* ---- skeleton / espera (cards "gerando") ---- */
.thumb.skel { position: relative; overflow: hidden; }
.thumb.skel::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(100deg,
    transparent 20%, rgba(255,255,255,.6) 50%, transparent 80%);
  animation: arch-shimmer 1.5s var(--ease) infinite;
}
.thumb.skel svg { opacity: .55; }
@keyframes arch-shimmer { to { transform: translateX(100%); } }

/* ---- comparador antes / depois (slider de cortina) ---- */
.compare {
  position: relative; width: 100%; border-radius: var(--ra-lg); overflow: hidden;
  border: .5px solid var(--ink-06); box-shadow: var(--sh-sm); background: var(--off);
  user-select: none; -webkit-user-select: none; touch-action: none; line-height: 0;
}
.cmp-base { display: block; width: 100%; height: auto; }
.cmp-top { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.cmp-top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp-label {
  position: absolute; top: 12px; padding: 4px 10px; border-radius: 999px; line-height: 1;
  font-size: 10.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(10,10,10,.55); color: #fff; backdrop-filter: blur(3px); pointer-events: none;
}
.cmp-label-l { left: 12px; }
.cmp-label-r { right: 12px; }
.cmp-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  background: #fff; box-shadow: 0 0 0 1px rgba(10,10,10,.12); transform: translateX(-50%);
  pointer-events: none;
}
.cmp-handle i {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 999px; background: #fff; box-shadow: var(--sh);
  display: grid; place-items: center;
}
.cmp-handle svg { width: 20px; height: 20px; stroke: var(--acc-ink); stroke-width: 2; }
.cmp-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  background: transparent; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none;
}
.cmp-range:focus-visible { opacity: 1; }
.cmp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 999px; cursor: ew-resize; }
.cmp-range::-moz-range-thumb { width: 44px; height: 999px; border: 0; background: transparent; cursor: ew-resize; }

/* ---- lightbox (dialog nativo reutilizavel) — "sala escura" ---- */
.view-img { cursor: zoom-in; }
dialog.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh;
  overflow: visible; color: #fff;
}
dialog.lightbox::backdrop { background: rgba(10,10,10,.92); backdrop-filter: blur(8px); }
dialog.lightbox[open] { animation: arch-lb-in .18s var(--ease); }
@keyframes arch-lb-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.lb-img {
  display: block; margin: 0 auto; max-width: 96vw; max-height: 84vh; object-fit: contain;
  border-radius: var(--ra-lg); box-shadow: var(--sh-lg); background: var(--off);
}
.lb-bar { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.lb-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--ra); border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--body); font-weight: 500; font-size: 13.5px; color: #fff;
  background: rgba(255,255,255,.15); transition: background .2s var(--ease);
}
.lb-btn:hover { background: rgba(255,255,255,.26); }
.lb-btn svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 2; }

/* ============================================================
   CINE — a camada cinematografica.
   O cinema aqui e o assunto do produto: luz sobre arquitetura.
   Duas superficies de filme — o login inteiro ("tela de abertura")
   e a marquise da area logada — sempre em tinta (--ink), com grao
   de filme e scrim; o cobalto segue reservado pra ACAO, nunca vira
   atmosfera. Fallback sem asset: "estudo de luz" em CSS puro
   (um feixe quente varrendo a fachada de tinta). Assets em
   /static/cine/ (ver _cine.html).
   ============================================================ */
:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ---- palco: video > poster (Ken Burns) > estudo de luz ---- */
.cine-stage { position: absolute; inset: 0; overflow: hidden; background: var(--ink); }
.cine-stage video, .cine-stage .cine-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.cine-poster {
  animation: cine-kenburns 38s var(--ease) infinite alternate;
  transform-origin: 50% 38%;
}
@keyframes cine-kenburns {
  from { transform: scale(1.02); }
  to   { transform: scale(1.11) translateY(-1.6%); }
}
/* estudo de luz — sol varrendo uma fachada de tinta (sem cobalto de proposito) */
.cine-luz {
  position: absolute; inset: -22%;
  background:
    radial-gradient(56% 44% at 20% 28%, rgba(255,211,166,.22), transparent 62%),
    radial-gradient(42% 52% at 78% 74%, rgba(150,170,220,.12), transparent 65%),
    linear-gradient(158deg, #16161c, #0a0a0a 52%, #0e0e13);
  animation: cine-luz 26s var(--ease) infinite alternate;
}
@keyframes cine-luz { to { transform: translate3d(4%, -3%, 0) scale(1.07); } }
/* grao de filme + scrim de legibilidade */
.cine-grain {
  position: absolute; inset: 0; background-image: var(--grain);
  opacity: .07; mix-blend-mode: overlay; pointer-events: none;
}
.cine-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(10,10,10,.80), rgba(10,10,10,.28) 46%, rgba(10,10,10,.44));
}
/* reduced-motion: o filme vira FOTO — frame parado (o JS em base.html pausa
   o video), nunca tela preta. As animacoes de fundo param. */
@media (prefers-reduced-motion: reduce) {
  .cine-poster, .cine-luz { animation: none; }
}

/* ---- entrada de cena (so em superficies SEM auto-refresh) ---- */
@keyframes cine-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- login / mfa: a tela de abertura ---- */
.auth { position: relative; color: #fff; }
.auth > .cine-stage { position: fixed; inset: 0; }
.auth-inner { position: relative; z-index: 1; }
/* sombra de "credito de cinema": segura o branco sobre trechos claros do filme */
.auth-inner, .ch-inner {
  text-shadow: 0 1px 2px rgba(10,10,10,.4), 0 2px 24px rgba(10,10,10,.45);
}
.auth-card, .auth-card * , .ch-inner .btn { text-shadow: none; }
.auth-brand .jolf-wordmark { color: #fff; }
.auth-eyebrow {
  font: 400 10px/1 var(--body); letter-spacing: .32em; text-transform: uppercase;
  color: var(--white-40); text-align: center; margin: 0 0 10px;
}
.auth-line {
  font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: -.01em; line-height: 1.15; color: #fff; text-align: center;
  margin: 0 0 26px;
}
.auth-line em { font-style: italic; }
.auth .auth-title { color: #fff; }
.auth .auth-sub { color: var(--white-60); }
.auth .auth-foot { color: var(--white-40); }
.auth .auth-foot a { color: #fff; border-bottom: 1px solid var(--white-25); }
/* cartao EDITORIAL (pedido 19/07): vidro escuro transparente — o filme passa
   por tras. Cantos retos + fio de luz + labels mono espacadas = a voz
   editorial do site da jolf; o cobalto segue exclusivo do botao de acao. */
.auth-card {
  background: rgba(10,10,10,.34);
  -webkit-backdrop-filter: blur(16px) saturate(1.1); backdrop-filter: blur(16px) saturate(1.1);
  border: .5px solid rgba(255,255,255,.16);
  border-radius: 0;
  box-shadow: 0 30px 90px rgba(0,0,0,.45);
  color: #fff;
  padding: 30px 28px 28px;
}
.auth-card label {
  font-family: var(--mono); font-weight: 400; font-size: 10px;
  letter-spacing: .3em; text-transform: uppercase; color: var(--white-40);
}
.auth-card input, .auth-card select, .auth-card textarea {
  background: transparent; border: 0; border-bottom: .5px solid var(--white-25);
  border-radius: 0; color: #fff; padding: 8px 2px 10px; font-size: 15px;
}
.auth-card input::placeholder { color: var(--white-25); }
.auth-card input:focus { box-shadow: none; border-color: #fff; }
/* autofill do Chrome pinta fundo claro — forca o vidro escuro */
.auth-card input:-webkit-autofill,
.auth-card input:-webkit-autofill:hover,
.auth-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px rgba(24,24,28,.9) inset;
  caret-color: #fff;
}
.auth-card .btn { border-radius: 0; }
.auth-card .muted { color: var(--white-40); }
.auth-card .chave-box, .auth-card.backup-grid li {
  background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff;
}
.auth-card ol.passos { color: var(--white-60); }
.auth-inner > * { animation: cine-up .9s var(--ease) backwards; }
.auth-inner > :nth-child(2) { animation-delay: .1s; }
.auth-inner > :nth-child(3) { animation-delay: .18s; }
.auth-inner > :nth-child(4) { animation-delay: .26s; }
.auth-inner > :nth-child(5) { animation-delay: .34s; }

/* ---- marquise da area logada (bloco hero em base.html) ---- */
.cine-hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.ch-inner {
  position: relative; z-index: 1; max-width: 1160px; margin: 0 auto;
  padding: clamp(44px, 7vh, 80px) 24px clamp(28px, 5vh, 50px);
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.cine-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 46px); }
.cine-hero .sub { color: var(--white-60); }
.cine-hero .crumb { color: var(--white-60); margin-bottom: 10px; }
.cine-hero .crumb:hover { color: #fff; }
.ch-eyebrow {
  font: 400 10px/1 var(--body); letter-spacing: .32em; text-transform: uppercase;
  color: var(--white-40); display: flex; align-items: center; gap: 16px; margin: 0 0 12px;
}
.ch-eyebrow::after { content: ""; width: 32px; height: .5px; background: var(--white-25); }
.badge.glass {
  background: rgba(255,255,255,.13); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.cine-hero + main { margin-top: 30px; }
/* entrada so quando a pagina pede (.anim — fora de telas com auto-refresh) */
.cine-hero.anim .ch-inner > * { animation: cine-up .9s var(--ease) backwards; }
.cine-hero.anim .ch-inner > :nth-child(2) { animation-delay: .12s; }
.anim-grid > * { animation: cine-up .7s var(--ease) backwards; }
.anim-grid > :nth-child(1) { animation-delay: .08s; }
.anim-grid > :nth-child(2) { animation-delay: .14s; }
.anim-grid > :nth-child(3) { animation-delay: .20s; }
.anim-grid > :nth-child(4) { animation-delay: .26s; }
.anim-grid > :nth-child(5) { animation-delay: .32s; }
.anim-grid > :nth-child(n+6) { animation-delay: .38s; }

/* ---- toques de sala escura no resto do app ---- */
.tile { line-height: normal; }
.tile img { transition: transform 1.4s var(--ease); }
a.tile:hover img { transform: scale(1.045); }
dialog.lightbox[open] { animation: arch-lb-in .3s var(--ease); }

@media (max-width: 720px) {
  .ch-inner { padding: 34px 16px 26px; }
}

/* ============================================================
   EDICAO POR ELEMENTO (F3) — chips flutuando sobre a imagem
   ============================================================ */
.el-wrap { position: relative; display: block; line-height: 0; }
.el-chip {
  position: absolute; transform: translate(-50%, -50%); z-index: 2;
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border-radius: 999px; border: .5px solid rgba(255,255,255,.35);
  background: rgba(10,10,10,.55); color: #fff; cursor: pointer;
  font-family: var(--body); font-size: 12px; font-weight: 400; line-height: 1;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis;
  transition: background .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.el-chip:hover { background: rgba(10,10,10,.78); transform: translate(-50%, -50%) scale(1.06); }
.el-chip.on {
  background: var(--acc); border-color: transparent; font-weight: 500;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--acc) 45%, transparent);
}
button.chip.ed-alvo { font-family: var(--body); }
@media (max-width: 720px) {
  .el-chip { height: 26px; padding: 0 9px; font-size: 11px; }
}
