/* Entre Prazos — o notebook corporativo.
 *
 * A pergunta que rege cada decisão daqui: isso aumenta a sensação de estar
 * trabalhando num escritório de advocacia real?
 *
 * Uma tensão resolvida: a constituição manda "nada de cor saturada". Isso vale
 * para o CHROME do sistema — barras, janelas, painéis — que segue cinza-ardósia.
 * Não vale para os ÍCONES DE APLICATIVO: no notebook corporativo real o Outlook
 * é azul, o WhatsApp é verde, a pasta é âmbar. Ícone colorido aqui é mais
 * realista, não menos, e é o que faz a área de trabalho parecer um sistema em
 * vez de uma página web com janelas.
 *
 * Tipografia IBM Plex: Sans na interface, Serif no documento em papel, Mono no
 * identificador. Uma família só, três vozes.
 */

:root {
  --s0: #12161d;
  --s1: #1a1f27;
  --s2: #1e242e;
  --s3: #272f3b;
  --s4: #313b49;
  --linha: #3a4453;
  --linha2: #2a323d;

  --t1: #e4eaf2;
  --t2: #a2aebf;
  --t3: #6e7988;

  --azul: #5b8fc7;
  --azul2: #4a7ab0;
  --alerta: #c08552;
  --grave: #b35f57;
  --ok: #6d9a72;

  --papel: #f5f3ed;
  --papel2: #e8e4d9;
  --papel-t: #22252a;

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r: 5px;
  --sombra: 0 22px 60px #00000082, 0 3px 10px #00000055;
  --barra-h: 52px;

  /* Curvas de animação. A de saída é mais rápida que a de entrada: abrir é
     um convite, fechar precisa sair da frente. */
  --ease-sai: cubic-bezier(.36, 0, .66, -.05);
  --ease-entra: cubic-bezier(.16, 1, .3, 1);

  /* Céu — reescrito pelo JS conforme a hora do escritório */
  --ceu-1: #2b3a52;
  --ceu-2: #4a6182;
  --ceu-3: #8ea3bd;
  --sol-cor: #ffe4b0;
  --sol-op: .35;
  --sol-x: 68%;
  --sol-y: 30%;
  --predio-1: #171d27;
  --predio-2: #1f2733;
  --predio-3: #29323f;
  --luz-janela: #ffd89a;
  --luz-op: .12;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--s0); color: var(--t1);
  font-family: var(--sans);
  font-size: calc(14px * var(--escala, 1));
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
::selection { background: #5b8fc755; }

* { scrollbar-width: thin; scrollbar-color: var(--s4) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--s4); border-radius: 7px;
  border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #4a5568; background-clip: content-box; }

.ic {
  width: 1.15em; height: 1.15em; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -.2em;
}

/* ============================================================ wallpaper */

#desktop { position: absolute; inset: 0 0 var(--barra-h) 0; overflow: hidden; }

#wallpaper { position: absolute; inset: 0; overflow: hidden; }

#ceu {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    var(--ceu-1) 0%, var(--ceu-2) 52%, var(--ceu-3) 100%);
  transition: background 2.5s linear;
}

/* O sol/lua atravessa o céu conforme o expediente avança. */
#sol {
  position: absolute; left: var(--sol-x); top: var(--sol-y);
  width: 340px; height: 340px; margin: -170px 0 0 -170px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle,
    var(--sol-cor) 0%, transparent 62%);
  opacity: var(--sol-op);
  transition: left 2.5s linear, top 2.5s linear, opacity 2.5s linear,
              background 2.5s linear;
}

/* Vista de andar alto: a cidade é uma FAIXA no terço inferior, não um
   close-up. Com viewBox largo e 'meet', os prédios ficam pequenos e numerosos
   — que é como se vê São Paulo de um 14º andar. */
#skyline {
  position: absolute; left: -2%; right: -2%; bottom: 0; width: 104%;
  height: 34%; display: block;
}
#skyline g { transition: fill 2.5s linear; }
#cam-longe  { fill: var(--predio-1); opacity: .38; filter: blur(1.4px); }
#cam-meio   { fill: var(--predio-2); opacity: .66; filter: blur(.5px); }
#cam-perto  { fill: var(--predio-3); }
/* As luzes vivem num grupo só: a transição anima UM elemento em vez de mil
   e quatrocentos. Com opacidade por retângulo, cada mudança de paleta punha
   o compositor para animar a cidade inteira. */
#cam-luzes { fill: var(--luz-janela); opacity: var(--luz-op);
  transition: opacity 2.5s linear; }

/* Vidro: reflexo diagonal, vinheta e um véu escuro por cima de tudo.
   Papel de parede que compete com a interface é papel de parede errado — ele
   precisa dar clima e depois sumir. O véu é o que faz o texto da janela ler. */
#vidro {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(112deg, #ffffff10 0%, transparent 24%, transparent 76%, #ffffff09 100%),
    radial-gradient(130% 95% at 50% 42%, transparent 38%, #0a0e14bb 100%),
    linear-gradient(180deg, #0d121ab0 0%, #0d121a40 34%, #0a0e14a8 100%);
}
/* Caixilho: montantes de alumínio da janela do escritório. Largos, com
   gradiente de metal e brilho na quina — não linhas pretas. */
#caixilho { position: absolute; inset: 0; pointer-events: none; }
#caixilho span {
  position: absolute; top: 0; bottom: 0; width: 22px;
  background: linear-gradient(90deg,
    #0c1016e6 0%, #2c3542cc 34%, #39434fb3 52%, #1a212bd9 72%, #0a0e13e6 100%);
  box-shadow: 0 0 34px #000000a6;
}
#caixilho span:nth-child(1) { left: 27%; }
#caixilho span:nth-child(2) { left: 58%; }
#caixilho span:nth-child(3) { left: 86%; }

#marca {
  position: absolute; right: 54px; bottom: 42px; text-align: right;
  pointer-events: none; color: #ffffff1c; text-shadow: 0 2px 12px #0006;
}
#marca .m1 { font-size: 1.32rem; font-weight: 300; letter-spacing: .3em; }
#marca .m2 { font-size: .6rem; margin-top: 8px; letter-spacing: .42em;
  color: #ffffff14; }
#marca .m3 { font-size: .58rem; margin-top: 14px; letter-spacing: .2em;
  color: #ffffff10; font-family: var(--mono); }

/* ========================================================= ícones do app */

#icones {
  position: absolute; top: 22px; left: 22px;
  display: grid; grid-auto-flow: column;
  grid-template-rows: repeat(auto-fill, 104px);
  gap: 2px 4px; max-height: calc(100% - 44px);
}

.icone {
  position: relative; width: 96px; height: 104px; padding: 10px 4px 8px;
  border-radius: 7px; text-align: center; cursor: pointer;
  border: 1px solid transparent; background: none; color: inherit;
  font-family: inherit;
  transition: background .13s, border-color .13s, transform .13s var(--ease-entra);
}
.icone:hover { background: #ffffff12; border-color: #ffffff14; }
.icone:hover .pastilha { transform: translateY(-2px) scale(1.05); }
.icone:active { transform: scale(.96); }
.icone:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }

/* A pastilha: quadrado arredondado com gradiente, luz interna no topo e
   sombra projetada. É o que dá volume de ícone de sistema operacional. */
.pastilha {
  width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 12px;
  display: grid; place-items: center; position: relative;
  background: linear-gradient(158deg, var(--c1), var(--c2));
  box-shadow:
    inset 0 1px 0 #ffffff40,
    inset 0 -1px 0 #00000030,
    0 3px 8px #00000055,
    0 1px 2px #00000040;
  transition: transform .16s var(--ease-entra);
}
.pastilha::after {   /* brilho de verniz na metade superior */
  content: ""; position: absolute; inset: 1px 1px 45% 1px;
  border-radius: 11px 11px 50% 50% / 11px 11px 18px 18px;
  background: linear-gradient(180deg, #ffffff22, transparent);
  pointer-events: none;
}
.pastilha .ic { width: 24px; height: 24px; color: #fff; stroke-width: 1.7;
  filter: drop-shadow(0 1px 1px #00000055); }

.icone .nm {
  font-size: .69rem; line-height: 1.28; color: #dbe3ee;
  display: block; text-shadow: 0 1px 3px #000000b0;
}
.icone .badge {
  position: absolute; top: 6px; right: 14px; min-width: 19px; height: 19px;
  padding: 0 5px; background: linear-gradient(180deg, #cf6a61, #a94b43);
  color: #fff; border: 2px solid #1a1f27b0; border-radius: 10px;
  font-size: .62rem; font-weight: 600; line-height: 15px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 4px #00000070;
}

/* ============================================================== janelas */

.janela {
  position: absolute; min-width: 380px; min-height: 240px;
  background: var(--s2); border: 1px solid #46536a;
  border-radius: 9px; box-shadow: var(--sombra);
  display: flex; flex-direction: column; overflow: hidden;
  transform-origin: center;
}
.janela.min { display: none; }
.janela:not(.foco) { border-color: var(--linha); box-shadow: 0 12px 34px #00000060; }
.janela:not(.foco) .titulo { filter: saturate(.6) brightness(.92); }

/* --- animações estilo macOS: escala + opacidade, curva assimétrica ----- */
@keyframes jan-entra {
  from { opacity: 0; transform: scale(.9) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes jan-sai {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(.92) translateY(6px); }
}
.janela.entrando { animation: jan-entra .26s var(--ease-entra) both; }
.janela.saindo   { animation: jan-sai .16s var(--ease-sai) both; }

/* Minimizar: encolhe na direção da aba, como o "genie" simplificado.
   As variáveis --mx/--my são calculadas em JS a partir da posição da aba. */
@keyframes jan-guarda {
  from { opacity: 1; transform: translate(0,0) scale(1); }
  to   { opacity: 0; transform: translate(var(--mx), var(--my)) scale(.06); }
}
@keyframes jan-devolve {
  from { opacity: 0; transform: translate(var(--mx), var(--my)) scale(.06); }
  to   { opacity: 1; transform: translate(0,0) scale(1); }
}
.janela.guardando { animation: jan-guarda .28s var(--ease-sai) both;
  transform-origin: center; }
.janela.devolvendo { animation: jan-devolve .3s var(--ease-entra) both;
  transform-origin: center; }

.janela.maximizada {
  left: 0 !important; top: 0 !important;
  width: 100% !important; height: 100% !important;
  border-radius: 0; border-color: transparent;
}
.janela.transicao { transition: left .2s var(--ease-entra),
  top .2s var(--ease-entra), width .2s var(--ease-entra),
  height .2s var(--ease-entra), border-radius .2s; }

.titulo {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  padding: 0 8px 0 13px; height: 40px; cursor: move;
  background: linear-gradient(180deg, #2d3644, #232b36);
  border-bottom: 1px solid #161b23;
  box-shadow: inset 0 1px 0 #ffffff10;
}
.titulo .pastilha-mini {
  width: 21px; height: 21px; border-radius: 6px; display: grid;
  place-items: center; flex: 0 0 auto;
  background: linear-gradient(158deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 #ffffff35, 0 1px 3px #00000055;
}
.titulo .pastilha-mini .ic { width: 13px; height: 13px; color: #fff;
  stroke-width: 1.9; }
.titulo .tx {
  flex: 1; font-size: .79rem; font-weight: 500; color: #d3dce8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jan-botoes { display: flex; gap: 2px; }
.jan-botoes button {
  width: 30px; height: 26px; border: 0; border-radius: 4px; padding: 0;
  background: transparent; color: var(--t2); cursor: pointer;
  display: grid; place-items: center;
  transition: background .1s, color .1s;
}
.jan-botoes button .ic { width: 14px; height: 14px; }
.jan-botoes button:hover { background: #ffffff18; color: #fff; }
.jan-botoes button.fechar:hover { background: #c0453c; color: #fff; }

.corpo { flex: 1; overflow: auto; padding: 18px 20px; user-select: text; }
.resize { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px;
  cursor: nwse-resize; }
.resize::after {
  content: ""; position: absolute; right: 4px; bottom: 4px;
  width: 7px; height: 7px;
  border-right: 2px solid #ffffff26; border-bottom: 2px solid #ffffff26;
}

/* Guia de encaixe ao arrastar para a borda */
#guia-encaixe {
  position: absolute; pointer-events: none; z-index: 9500;
  background: #5b8fc71f; border: 2px solid #5b8fc7aa; border-radius: 9px;
  opacity: 0; transition: all .16s var(--ease-entra);
}
#guia-encaixe.on { opacity: 1; }

/* =============================================================== barra */

#barra {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--barra-h);
  background: linear-gradient(180deg, #1b212ae8, #10151ce8);
  backdrop-filter: blur(18px) saturate(1.3);
  border-top: 1px solid #ffffff12;
  display: flex; align-items: center; gap: 8px; padding: 0 10px;
  box-shadow: 0 -4px 20px #00000055;
  z-index: 5000;
}

#inicio {
  width: 38px; height: 38px; border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--t2);
  display: grid; place-items: center; flex: 0 0 auto;
  transition: background .12s, color .12s;
}
#inicio .ic { width: 19px; height: 19px; }
#inicio:hover { background: #ffffff14; color: #fff; }
#inicio[aria-expanded="true"] { background: #ffffff1f; color: #fff; }

#perfil { display: flex; align-items: center; gap: 9px; padding-right: 10px;
  margin-right: 2px; border-right: 1px solid #ffffff14; height: 30px; }
#perfil .logo {
  width: 28px; height: 28px; border-radius: 7px; flex: 0 0 auto;
  background: linear-gradient(150deg, #46709e, #2c4767);
  color: #d3e4f5; font-family: var(--mono); font-size: .67rem; font-weight: 600;
  display: grid; place-items: center;
  box-shadow: inset 0 1px 0 #ffffff2b, 0 1px 3px #00000055;
}
#quem { font-size: .74rem; color: var(--t2); white-space: nowrap; }

#abas { flex: 1; display: flex; gap: 5px; overflow: hidden; align-items: center; }
.aba {
  display: flex; align-items: center; gap: 8px; max-width: 210px; height: 38px;
  padding: 0 12px 0 8px; border-radius: 8px; background: #ffffff08;
  border: 1px solid transparent; color: #b6c1d0;
  font-size: .73rem; font-family: inherit; cursor: pointer;
  white-space: nowrap; overflow: hidden; position: relative;
  transition: background .12s, color .12s;
}
.aba .pastilha-mini {
  width: 22px; height: 22px; border-radius: 6px; display: grid;
  place-items: center; flex: 0 0 auto;
  background: linear-gradient(158deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 #ffffff35, 0 1px 2px #00000055;
}
.aba .pastilha-mini .ic { width: 13px; height: 13px; color: #fff; stroke-width: 1.9; }
.aba .rot { overflow: hidden; text-overflow: ellipsis; }
.aba:hover { background: #ffffff16; color: #dfe6ef; }
.aba.ativa { background: #ffffff1f; color: #fff; }
/* Ponto luminoso: convenção universal de "aplicativo em execução". */
.aba::after {
  content: ""; position: absolute; left: 50%; bottom: 2px;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: var(--azul); opacity: 0; transition: opacity .15s, width .15s;
}
.aba.ativa::after { opacity: 1; width: 16px; margin-left: -8px; border-radius: 2px; }
.aba.piscando { animation: pisca 1.1s ease-in-out 3; }
@keyframes pisca { 50% { background: #40566f; color: #fff; } }

#bandeja { display: flex; align-items: center; gap: 8px;
  padding-left: 10px; border-left: 1px solid #ffffff14; height: 30px; }
.ind { color: var(--ok); display: grid; place-items: center; }
.ind .ic { width: 16px; height: 16px; }
#chrome-toggle {
  width: 30px; height: 30px; border-radius: 7px; cursor: pointer;
  background: transparent; border: 0; color: var(--t3);
  display: grid; place-items: center;
}
#chrome-toggle .ic { width: 16px; height: 16px; }
#chrome-toggle:hover { background: #ffffff14; color: var(--t1); }
#relogio { text-align: right; line-height: 1.2; padding-left: 4px; }
#hora { font-size: .84rem; font-family: var(--mono); font-weight: 500;
  font-variant-numeric: tabular-nums; color: #dbe3ee; }
#data { font-size: .61rem; color: var(--t3); text-transform: capitalize; }

/* ============================================================ lançador */

#lancador {
  position: absolute; left: 10px; bottom: calc(var(--barra-h) + 8px);
  z-index: 6000; width: 372px; padding: 18px;
  border-radius: 14px;
  background: #1e242ef2; backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid #ffffff1a; box-shadow: var(--sombra);
  animation: lc-entra .2s var(--ease-entra) both;
}
@keyframes lc-entra { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.lc-tit { font-size: .6rem; color: var(--t3); text-transform: uppercase;
  letter-spacing: .18em; margin-bottom: 14px; }
.lc-grade { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.lc-item {
  padding: 12px 4px 10px; border-radius: 9px; text-align: center;
  cursor: pointer; background: none; border: 0; color: inherit;
  font-family: inherit; transition: background .12s;
}
.lc-item:hover { background: #ffffff14; }
.lc-item .pastilha { width: 40px; height: 40px; margin-bottom: 7px;
  border-radius: 11px; }
.lc-item .pastilha .ic { width: 21px; height: 21px; }
.lc-item .nm { display: block; font-size: .62rem; color: var(--t2);
  line-height: 1.28; }

/* ============================================================= Alt+Tab */

/* O atributo `hidden` tem especificidade de seletor de tipo; um seletor de id
   com `display` o atropela em silêncio. Sem esta linha o painel fica visível
   com o alternador fechado. Vale para todo elemento que combine id + display
   + hidden — por isso a regra é declarada junto de cada um. */
#alttab[hidden], #lancador[hidden], #chrome[hidden] { display: none; }

#alttab {
  position: fixed; inset: 0; z-index: 9800;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: #0a0d1255; backdrop-filter: blur(3px);
}
#alttab .at-cartoes {
  display: flex; gap: 10px; padding: 20px 22px; border-radius: 18px;
  background: #232a35ee; backdrop-filter: blur(26px) saturate(1.4);
  border: 1px solid #ffffff1f; box-shadow: 0 26px 70px #000000a0;
  max-width: 88vw; overflow: hidden;
  animation: at-entra .13s var(--ease-entra) both;
}
@keyframes at-entra { from { opacity: 0; transform: scale(.94); } }
.at-cartao {
  width: 84px; height: 84px; border-radius: 15px; display: grid;
  place-items: center; position: relative; flex: 0 0 auto;
  border: 2px solid transparent; transition: background .1s, border-color .1s;
}
.at-cartao .pastilha { width: 58px; height: 58px; margin: 0; border-radius: 15px; }
.at-cartao .pastilha .ic { width: 30px; height: 30px; }
.at-cartao.sel { background: #ffffff1f; border-color: #ffffff33; }
#alttab .at-nome {
  font-size: .85rem; color: #e9eff7; font-weight: 500;
  text-shadow: 0 2px 12px #000; text-align: center;
}
/* Atalho que ninguém descobre não existe. */
#alttab .at-dica {
  font-size: .64rem; color: #ffffff66; letter-spacing: .06em;
  text-shadow: 0 1px 6px #000;
}

/* ============================================================== toasts */

#toasts { position: absolute; right: 16px; bottom: 16px; z-index: 7000;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
  display: flex; gap: 12px; width: 330px; padding: 13px 15px;
  background: #262e3af5; backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid #ffffff1c; border-left: 3px solid var(--azul);
  border-radius: 9px; box-shadow: var(--sombra); cursor: pointer;
  animation: toast-entra .26s var(--ease-entra) both;
}
@keyframes toast-entra { from { opacity: 0; transform: translateX(22px) scale(.96); } }
.toast:hover { background: #2d3644f5; }
.toast.urgente { border-left-color: var(--alerta); }
.toast .ic { width: 17px; height: 17px; color: var(--azul); margin-top: 1px; }
.toast.urgente .ic { color: var(--alerta); }
.toast .de { font-size: .64rem; color: var(--t3); margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: .1em; }
.toast .tt { font-size: .77rem; line-height: 1.45; color: #dae2ec; }

body.sem-mov *, body.sem-mov *::before, body.sem-mov *::after {
  animation: none !important; transition: none !important;
}

/* ============================================================ conteúdo */

h3 { margin: 0 0 4px; font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em; }
h4 { margin: 22px 0 9px; font-size: .63rem; color: var(--t3);
  text-transform: uppercase; letter-spacing: .16em; font-weight: 600; }
h4:first-child { margin-top: 0; }
p { margin: 0 0 10px; line-height: 1.6; }
a { color: var(--azul); }
.sub { font-size: .74rem; color: var(--t2); margin-bottom: 16px; line-height: 1.55; }
.mono { font-family: var(--mono); font-size: .93em; }
.barra-topo { display: flex; gap: 8px; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; }

.lista { display: flex; flex-direction: column; gap: 3px; }
.item {
  padding: 12px 14px; background: #252d38; border-radius: 6px;
  border-left: 3px solid transparent; cursor: pointer; transition: background .11s;
}
.item:hover { background: #2d3644; }
.item.nao-lida { border-left-color: var(--azul); background: #29323f; }
.item.nao-lida .de { color: #fff; }
.item .l1 { display: flex; justify-content: space-between; gap: 12px;
  font-size: .78rem; margin-bottom: 4px; align-items: baseline; }
.item .de { font-weight: 500; color: #d1dae6; }
.item .qd { color: var(--t3); font-size: .67rem; white-space: nowrap;
  font-family: var(--mono); }
.item .l2 { font-size: .74rem; color: var(--t2); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vazio { color: var(--t3); font-size: .78rem; padding: 44px 10px;
  text-align: center; line-height: 1.6; }
.vazio .ic { width: 28px; height: 28px; display: block; margin: 0 auto 13px;
  opacity: .35; }

.papel {
  background: var(--papel); color: var(--papel-t);
  padding: 34px 40px; font-family: var(--serif);
  font-size: .85rem; line-height: 1.78; white-space: pre-wrap;
  border-radius: 3px; box-shadow: 0 6px 22px #00000066;
  overflow-wrap: break-word;
}
.papel.compacto { padding: 22px 24px; font-size: .8rem; line-height: 1.65; }

.tabela { width: 100%; border-collapse: collapse; font-size: .76rem; }
.tabela th { text-align: left; padding: 10px; color: var(--t3);
  border-bottom: 1px solid var(--linha); font-weight: 600; font-size: .61rem;
  text-transform: uppercase; letter-spacing: .11em; white-space: nowrap; }
.tabela td { padding: 12px 10px; border-bottom: 1px solid var(--linha2);
  vertical-align: top; line-height: 1.5; }
.tabela tr.clicavel { cursor: pointer; }
.tabela tr.clicavel:hover td { background: #ffffff0a; }
.tabela .num { font-family: var(--mono); font-size: .93em; color: var(--t2);
  white-space: nowrap; }

.tag { display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 4px; font-size: .65rem; font-weight: 500;
  background: #ffffff14; color: #c3cedd; white-space: nowrap; }
.tag .ic { width: 11px; height: 11px; }
.tag.alerta { background: #c085522b; color: #dcae82; }
.tag.grave  { background: #b35f572b; color: #e0a099; }
.tag.ok     { background: #6d9a722b; color: #a0c8a4; }
.tag.info   { background: #5b8fc72b; color: #a2c3e6; }

button.acao {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border: 1px solid var(--linha); border-radius: 7px;
  background: linear-gradient(180deg, #313a48, #29313d); color: var(--t1);
  font-size: .76rem; font-family: inherit; font-weight: 500; cursor: pointer;
  transition: filter .12s, transform .08s;
  box-shadow: inset 0 1px 0 #ffffff12, 0 1px 3px #00000045;
}
button.acao:hover { filter: brightness(1.18); }
button.acao:active { transform: translateY(1px); }
button.acao.primaria {
  background: linear-gradient(180deg, #4d7ead, #3a6188); border-color: #5e93c2;
  color: #fff;
}
button.acao:disabled { opacity: .4; cursor: not-allowed; }
button.acao.discreta { background: none; border-color: transparent;
  color: var(--t2); padding: 7px 9px; box-shadow: none; }
button.acao.discreta:hover { background: #ffffff12; color: var(--t1); }

input, select, textarea {
  background: #171c24; border: 1px solid var(--linha); border-radius: 6px;
  color: var(--t1); padding: 9px 11px; font-family: inherit; font-size: .78rem;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px #5b8fc72e;
}
input[type=date] { font-family: var(--mono); font-size: .74rem; }
select { cursor: pointer; }
label { display: block; font-size: .64rem; color: var(--t3); margin: 14px 0 6px;
  text-transform: uppercase; letter-spacing: .11em; font-weight: 600; }
label.inline { display: flex; align-items: center; gap: 9px; margin: 10px 0;
  text-transform: none; letter-spacing: 0; font-size: .76rem; color: var(--t1);
  font-weight: 400; cursor: pointer; }
label.inline input { width: auto; }
.linha2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.campo-busca { position: relative; }
.campo-busca .ic { position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--t3); width: 15px; height: 15px; }
.campo-busca input { padding-left: 36px; }

.trilha { font-size: .76rem; padding-left: 0; list-style: none; margin: 0;
  counter-reset: t; }
.trilha li { position: relative; padding: 0 0 18px 32px; line-height: 1.6;
  border-left: 1px solid var(--linha); margin-left: 10px; }
.trilha li:last-child { border-left-color: transparent; padding-bottom: 0; }
.trilha li::before {
  counter-increment: t; content: counter(t);
  position: absolute; left: -11px; top: 0; width: 21px; height: 21px;
  border-radius: 50%; background: var(--s3); border: 1px solid var(--linha);
  color: var(--t2); font-size: .6rem; font-weight: 600;
  display: grid; place-items: center; font-family: var(--mono);
}
.trilha b { color: #d6dfea; font-weight: 600; }
.trilha .fund { color: var(--t3); font-size: .68rem; font-style: italic;
  margin-top: 4px; }
.trilha .dt { color: var(--azul); font-family: var(--mono); font-weight: 500; }

.aviso-box {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: 7px;
  font-size: .77rem; line-height: 1.6; margin: 16px 0;
  background: #b35f5720; border-left: 3px solid var(--grave);
}
.aviso-box .ic { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px;
  color: var(--grave); }
.aviso-box.neutro { background: #5b8fc720; border-left-color: var(--azul); }
.aviso-box.neutro .ic { color: var(--azul); }
.aviso-box.bom { background: #6d9a7220; border-left-color: var(--ok); }
.aviso-box.bom .ic { color: var(--ok); }
.aviso-box b { color: #e6edf5; }

.editor {
  width: 100%; min-height: 400px; background: var(--papel);
  color: var(--papel-t); font-family: var(--serif); font-size: .85rem;
  line-height: 1.8; padding: 34px 40px; border: 1px solid #00000038;
  border-radius: 3px; resize: vertical; box-shadow: 0 6px 22px #00000066;
}
.diff-lado { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.diff-lado h4 { margin-top: 0; }

.verbete {
  padding: 15px 17px; background: #252d38; border-radius: 7px;
  border-left: 3px solid var(--azul); margin-bottom: 10px;
}
.verbete .cab { display: flex; gap: 8px; align-items: center; margin-bottom: 8px;
  flex-wrap: wrap; }
.verbete .txt { font-size: .78rem; line-height: 1.65; color: #cad4e1; }

/* =============================================================== chrome */

#chrome {
  position: absolute; right: 12px; bottom: calc(var(--barra-h) + 8px);
  z-index: 9000; width: 278px;
  background: #232a34f5; backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid #ffffff1c; border-radius: 12px;
  padding: 17px 19px; box-shadow: var(--sombra);
  animation: lc-entra .2s var(--ease-entra) both;
}
#chrome h4 { margin-top: 0; }
#chrome label.col { display: block; text-transform: none; letter-spacing: 0;
  font-size: .74rem; color: var(--t1); font-weight: 400; margin: 14px 0 7px; }
#chrome .aviso { font-size: .64rem; color: var(--t3); line-height: 1.6;
  margin: 15px 0 0; padding-top: 13px; border-top: 1px solid #ffffff14; }
#btn-reiniciar {
  width: 100%; margin-top: 13px; padding: 9px; border-radius: 7px;
  background: #171c24; border: 1px solid var(--linha); color: var(--t2);
  font-size: .73rem; cursor: pointer; font-family: inherit;
}
#btn-reiniciar:hover { color: var(--t1); border-color: var(--grave); }

/* ============================================================= estreito */

@media (max-width: 860px) {
  .janela { left: 2vw !important; top: 2vh !important;
    width: 96vw !important; height: 76vh !important; }
  #icones { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, 96px);
    grid-template-rows: none; width: calc(100% - 44px); }
  .diff-lado, .linha2 { grid-template-columns: 1fr; }
  #marca, #caixilho { display: none; }
  .lc-grade { grid-template-columns: repeat(3, 1fr); }
  #lancador { width: calc(100vw - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
