/* SARA — o painel do Max.
   Layout: barra lateral fixa com os projetos (as "pastas") + área de trabalho
   larga; no celular a barra vira gaveta. Cada tema só redefine os tokens. */

:root {
  /* Claude · Noite (padrão) */
  --fundo: #1d1c19;
  --fundo-2: #23221e;
  --painel: #292824;
  --painel-2: #32302b;
  --linha: #3d3b35;
  --linha-forte: #4d4a42;
  --texto: #f4f1e9;
  --texto-2: #bdb7a9;
  --texto-3: #8e887a;
  --acento: #d97757;
  --acento-forte: #e88d6c;
  --acento-sobre: #1d1c19;
  --acento-suave: color-mix(in srgb, var(--acento) 16%, transparent);
  --ok: #4cbf86;
  --aviso: #e6a93f;
  --falha: #ec5f55;
  --sombra: 0 1px 0 rgb(255 255 255 / .03) inset, 0 12px 32px -18px rgb(0 0 0 / .7);
  --grade: rgb(255 255 255 / .035);
  color-scheme: dark;

  --f-titulo: "Sora", "Segoe UI", system-ui, sans-serif;
  --f-texto: "Inter", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --escala: 1;
  --raio: 14px;
  --raio-p: 9px;
  --lateral: 264px;
}

[data-tema="claude-dia"] {
  --fundo: #f5f2ea; --fundo-2: #efebe1; --painel: #fffdf8; --painel-2: #f3efe5;
  --linha: #e3ddcf; --linha-forte: #d3ccbb; --texto: #22211e; --texto-2: #5b574d; --texto-3: #8b8576;
  --acento: #c5623e; --acento-forte: #ad5133; --acento-sobre: #fffdf8;
  --ok: #23905c; --aviso: #b47712; --falha: #c8402f;
  --sombra: 0 1px 2px rgb(60 45 20 / .06), 0 10px 28px -16px rgb(60 45 20 / .28);
  --grade: rgb(60 45 20 / .045);
  color-scheme: light;
}
[data-tema="oceano"] {
  --fundo: #0b131c; --fundo-2: #0f1924; --painel: #13202d; --painel-2: #1a2a3a;
  --linha: #22374a; --linha-forte: #2e475e; --texto: #e8f1f8; --texto-2: #a3b6c7; --texto-3: #6f879b;
  --acento: #3bb8f0; --acento-forte: #6ccbf5; --acento-sobre: #08121b;
  --grade: rgb(120 200 255 / .04);
}
[data-tema="floresta"] {
  --fundo: #0e1511; --fundo-2: #121b16; --painel: #17231c; --painel-2: #1e2d24;
  --linha: #283b30; --linha-forte: #35503f; --texto: #ebf4ee; --texto-2: #a9bfb0; --texto-3: #72897a;
  --acento: #43c98a; --acento-forte: #6cd9a5; --acento-sobre: #0b130e;
  --grade: rgb(120 255 180 / .035);
}
[data-tema="ametista"] {
  --fundo: #14111d; --fundo-2: #191524; --painel: #1f1a2d; --painel-2: #282238;
  --linha: #332b47; --linha-forte: #43395c; --texto: #f1edf9; --texto-2: #b9b0cc; --texto-3: #857b9b;
  --acento: #a98bfa; --acento-forte: #c0a9fc; --acento-sobre: #14111d;
  --grade: rgb(190 160 255 / .04);
}
[data-tema="grafite"] {
  --fundo: #f2f3f5; --fundo-2: #eaecef; --painel: #ffffff; --painel-2: #f4f5f7;
  --linha: #e0e3e8; --linha-forte: #cfd4db; --texto: #16191f; --texto-2: #4f5866; --texto-3: #848c99;
  --acento: #2f6fe4; --acento-forte: #1f5ccc; --acento-sobre: #ffffff;
  --ok: #1d8f5a; --aviso: #b07510; --falha: #cf3b30;
  --sombra: 0 1px 2px rgb(20 30 50 / .06), 0 10px 28px -16px rgb(20 30 50 / .25);
  --grade: rgb(20 30 50 / .04);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { font-size: calc(15px * var(--escala)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--fundo); color: var(--texto);
  font-family: var(--f-texto); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--acento-forte); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; border-radius: 6px; }
code, pre, .mono { font-family: var(--f-mono); font-size: .86em; }
code { background: var(--painel-2); border: 1px solid var(--linha); padding: .08em .38em; border-radius: 6px; overflow-wrap: anywhere; }
pre { background: var(--fundo-2); border: 1px solid var(--linha); border-radius: var(--raio-p); padding: 14px 16px; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; font-size: .92em; overflow-wrap: normal; }
h1, h2, h3, h4 { font-family: var(--f-titulo); letter-spacing: -.015em; text-wrap: balance; margin: 0; line-height: 1.2; }
svg.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab-num, .num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ estrutura */
.app { display: grid; grid-template-columns: var(--lateral) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--fundo-2) calc(var(--lateral) - 1px), var(--linha) 0 var(--lateral), transparent 0); }
.lateral {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--fundo-2); border-right: 1px solid var(--linha);
  display: flex; flex-direction: column; gap: 18px;
  padding: 18px 14px 14px;
}
.marca { display: flex; align-items: center; gap: 11px; padding: 4px 6px 2px; color: var(--texto); }
.marca:hover { text-decoration: none; }
.marca img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 6px 18px -8px var(--acento); }
.marca b { font-family: var(--f-titulo); font-size: 1.28rem; letter-spacing: .2em; font-weight: 700; display: block; line-height: 1; }
.marca small { color: var(--texto-3); font-size: .72rem; letter-spacing: .02em; }

.busca { position: relative; }
.busca input {
  width: 100%; font: inherit; font-size: .9rem; color: var(--texto);
  background: var(--painel); border: 1px solid var(--linha); border-radius: 10px;
  padding: 9px 12px 9px 34px;
}
.busca input::placeholder { color: var(--texto-3); }
.busca > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--texto-3); width: 16px; height: 16px; }
.busca-res {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--painel); border: 1px solid var(--linha-forte); border-radius: 12px;
  box-shadow: var(--sombra); padding: 6px; max-height: 60vh; overflow: auto;
}
.busca-res a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--texto); font-size: .86rem; }
.busca-res a:hover, .busca-res a.ativo { background: var(--painel-2); text-decoration: none; }
.busca-res small { display: block; color: var(--texto-3); font-size: .76rem; }
.busca-res mark { background: var(--acento-suave); color: var(--acento-forte); border-radius: 3px; }
.busca-res .vazio { padding: 10px; color: var(--texto-3); font-size: .85rem; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav h6 {
  margin: 10px 8px 6px; font: 600 .68rem/1 var(--f-texto); letter-spacing: .12em; text-transform: uppercase; color: var(--texto-3);
}
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  color: var(--texto-2); font-size: .92rem; font-weight: 500;
}
.nav a:hover { background: var(--painel); color: var(--texto); text-decoration: none; }
.nav a.ativo { background: var(--painel-2); color: var(--texto); box-shadow: inset 0 0 0 1px var(--linha); }
.nav a .bolinha { width: 9px; height: 9px; border-radius: 3px; background: var(--c, var(--acento)); flex: none; margin-inline: 4px 3px; }
.nav a .cont { margin-left: auto; font-size: .72rem; color: var(--texto-3); font-variant-numeric: tabular-nums; }
.nav a .estado { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--texto-3); opacity: .5; }
.nav a .estado.ok { background: var(--ok); opacity: 1; }
.nav a .estado.falha { background: var(--falha); opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--falha) 25%, transparent); }
.nav a .estado.lento { background: var(--aviso); opacity: 1; }
.lateral-pe { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 6px 0; border-top: 1px solid var(--linha); color: var(--texto-3); font-size: .76rem; }
.lateral-pe a { color: var(--texto-3); display: inline-flex; align-items: center; gap: 6px; }

.principal { min-width: 0; padding-block: 28px 64px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.miolo { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }

.topo-celular { display: none; }

/* ------------------------------------------------------------ peças */
.titulo-pagina { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.titulo-pagina h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); font-weight: 650; }
.titulo-pagina p { margin: 6px 0 0; color: var(--texto-2); max-width: 62ch; }
.sobretitulo { font: 600 .72rem/1 var(--f-texto); letter-spacing: .14em; text-transform: uppercase; color: var(--acento-forte); margin-bottom: 10px; display: block; }

.botao {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 500 .88rem/1 var(--f-texto); color: var(--texto); white-space: nowrap;
  background: var(--painel); border: 1px solid var(--linha-forte); border-radius: 10px; padding: 9px 13px;
  transition: background .15s, border-color .15s, transform .1s;
}
.botao:hover { background: var(--painel-2); border-color: var(--texto-3); text-decoration: none; }
.botao:active { transform: translateY(1px); }
.botao.primario { background: var(--acento); border-color: var(--acento); color: var(--acento-sobre); font-weight: 600; }
.botao.primario:hover { background: var(--acento-forte); border-color: var(--acento-forte); }
.botao.pequeno { padding: 6px 10px; font-size: .8rem; border-radius: 8px; }
.botao svg.ic { width: 16px; height: 16px; }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; }

.cartao { background: var(--painel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 20px; box-shadow: var(--sombra); min-width: 0; }
.cartao > h2, .secao-titulo { font-size: 1.02rem; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.secao-titulo { margin-bottom: 12px; }
.secao-titulo small { font: 400 .82rem var(--f-texto); color: var(--texto-3); margin-left: auto; }

.pilula {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 500 .74rem/1 var(--f-texto); padding: 5px 9px; border-radius: 999px;
  background: var(--painel-2); color: var(--texto-2); border: 1px solid var(--linha);
}
.pilula::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pilula.sem-ponto::before { display: none; }
.pilula.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.pilula.aviso, .pilula.lento { color: var(--aviso); background: color-mix(in srgb, var(--aviso) 12%, transparent); border-color: color-mix(in srgb, var(--aviso) 30%, transparent); }
.pilula.falha { color: var(--falha); background: color-mix(in srgb, var(--falha) 12%, transparent); border-color: color-mix(in srgb, var(--falha) 30%, transparent); }
.pilula.acento { color: var(--acento-forte); background: var(--acento-suave); border-color: color-mix(in srgb, var(--acento) 35%, transparent); }
.etiquetas { display: flex; flex-wrap: wrap; gap: 6px; }
.etiqueta { font: 500 .74rem/1 var(--f-texto); padding: 5px 8px; border-radius: 7px; background: var(--painel-2); color: var(--texto-2); border: 1px solid var(--linha); display: inline-flex; gap: 5px; align-items: center; }
.etiqueta svg.ic { width: 13px; height: 13px; }

/* números do topo */
.numeros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.numero { background: var(--painel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.numero span { color: var(--texto-3); font-size: .78rem; font-weight: 500; letter-spacing: .02em; display: flex; gap: 7px; align-items: center; }
.numero b { font: 650 1.7rem/1.05 var(--f-titulo); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.numero b small { font-size: .55em; color: var(--texto-3); font-weight: 500; margin-left: 3px; }
.numero em { font-style: normal; color: var(--texto-3); font-size: .78rem; }

/* as pastas dos projetos */
.pastas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px 16px; }
.pasta {
  --c: var(--acento);
  position: relative; display: flex; flex-direction: column; gap: 12px; color: var(--texto);
  background: var(--painel); border: 1px solid var(--linha); border-radius: 4px var(--raio) var(--raio) var(--raio);
  padding: 18px 18px 16px; margin-top: 12px; box-shadow: var(--sombra);
  transition: transform .18s ease, border-color .18s ease;
}
.pasta::before { /* a aba da pasta */
  content: ""; position: absolute; left: -1px; top: -12px; height: 13px; width: 42%;
  background: var(--painel); border: 1px solid var(--linha); border-bottom: 0;
  border-radius: 10px 14px 0 0; clip-path: inset(-2px -2px 1px -2px);
}
.pasta::after { content: ""; position: absolute; left: 14px; top: -6px; width: 34px; height: 3px; border-radius: 3px; background: var(--c); }
.pasta:hover { text-decoration: none; transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 55%, var(--linha)); }
.pasta:hover::before { border-color: color-mix(in srgb, var(--c) 55%, var(--linha)); }
.pasta-cab { display: flex; gap: 12px; align-items: center; }
.icone-projeto {
  width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 18%, var(--painel-2)); color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.icone-projeto svg.ic { width: 22px; height: 22px; }
.pasta h3 { font-size: 1.04rem; font-weight: 600; }
.pasta-cab small { color: var(--texto-3); font-size: .78rem; display: block; margin-top: 2px; }
.pasta p { margin: 0; color: var(--texto-2); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pasta-pe { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--linha); font-size: .8rem; color: var(--texto-3); }

.grade-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grade-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* lista de atenção */
.alertas { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.alertas li { display: flex; gap: 11px; align-items: flex-start; padding: 10px 4px; border-bottom: 1px solid var(--linha); font-size: .9rem; }
.alertas li:last-child { border-bottom: 0; }
.alertas .faixa { width: 4px; align-self: stretch; border-radius: 4px; background: var(--texto-3); flex: none; }
.alertas .faixa.falha { background: var(--falha); } .alertas .faixa.aviso { background: var(--aviso); } .alertas .faixa.ok { background: var(--ok); }
.alertas small { display: block; color: var(--texto-3); font-size: .78rem; }

/* ------------------------------------------------------------ projeto aberto */
.projeto-cab { --c: var(--acento); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.projeto-cab .icone-projeto { width: 64px; height: 64px; border-radius: 18px; }
.projeto-cab .icone-projeto svg.ic { width: 32px; height: 32px; }
.projeto-cab h1 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 650; }
.projeto-cab p { margin: 8px 0 12px; color: var(--texto-2); max-width: 70ch; }
.ficha-topo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--painel); overflow: hidden; }
.ficha-topo div { padding: 12px 16px; border-right: 1px solid var(--linha); min-width: 0; }
.ficha-topo div:last-child { border-right: 0; }
.ficha-topo span { display: block; color: var(--texto-3); font-size: .74rem; letter-spacing: .03em; }
.ficha-topo b { font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }

.subpastas { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: var(--fundo-2); border: 1px solid var(--linha); border-radius: 12px; scrollbar-width: thin; }
.subpastas a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 9px; color: var(--texto-2); font-size: .86rem; font-weight: 500; white-space: nowrap; }
.subpastas a:hover { color: var(--texto); background: var(--painel); text-decoration: none; }
.subpastas a.ativo { background: var(--painel); color: var(--texto); box-shadow: inset 0 0 0 1px var(--linha-forte), var(--sombra); }
.subpastas a.ativo svg { color: var(--c, var(--acento)); }
.subpastas .cont { font-size: .7rem; background: var(--painel-2); border-radius: 99px; padding: 2px 6px; color: var(--texto-3); }

.mosaico { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.bloco { display: flex; flex-direction: column; gap: 10px; color: var(--texto); background: var(--painel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 16px 18px; min-width: 0; }
a.bloco:hover { text-decoration: none; border-color: var(--linha-forte); background: color-mix(in srgb, var(--painel) 70%, var(--painel-2)); }
.bloco-cab { display: flex; gap: 9px; align-items: center; font: 600 .95rem var(--f-titulo); }
.bloco-cab svg.ic { color: var(--c, var(--acento)); }
.bloco-cab .seta { margin-left: auto; color: var(--texto-3); }
.bloco .linhas { display: flex; flex-direction: column; gap: 4px; font-size: .86rem; color: var(--texto-2); }
.bloco .linhas div { display: flex; gap: 8px; justify-content: space-between; min-width: 0; }
.bloco .linhas span:first-child { color: var(--texto-3); flex: none; }
.bloco .linhas span:last-child { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* texto das fichas */
.ficha { min-width: 0; color: var(--texto); font-size: .95rem; display: flex; flex-direction: column; gap: 14px; }
.ficha > * { margin-block: 0; }
.ficha p { margin: 0; max-width: 75ch; color: var(--texto-2); }
.ficha p strong, .ficha li strong { color: var(--texto); }
.ficha h3, .ficha h4 { font-size: 1rem; margin-top: 10px !important; }
.ficha ul, .ficha ol { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; color: var(--texto-2); }
.ficha li { padding-left: 2px; }
.ficha li.tarefa { list-style: none; display: flex; gap: 10px; margin-left: -1.2em; }
.ficha li.tarefa .caixa { width: 17px; height: 17px; border: 1.6px solid var(--linha-forte); border-radius: 5px; flex: none; margin-top: 3px; }
.ficha li.tarefa.feita { opacity: .55; text-decoration: line-through; }
.ficha li.tarefa.feita .caixa { background: var(--ok); border-color: var(--ok); }
.ficha blockquote { margin: 0; padding: 12px 16px; border-left: 3px solid var(--acento); background: var(--acento-suave); border-radius: 0 10px 10px 0; }
.ficha blockquote p { color: var(--texto); }
.kv { margin: 0; display: grid; grid-template-columns: minmax(130px, max-content) minmax(0, 1fr); border: 1px solid var(--linha); border-radius: 12px; overflow: hidden; background: var(--painel); }
.kv > div { display: contents; }
.kv dt, .kv dd { padding: 11px 14px; border-bottom: 1px solid var(--linha); margin: 0; }
.kv > div:last-child dt, .kv > div:last-child dd { border-bottom: 0; }
.kv dt { color: var(--texto-3); font-size: .84rem; font-weight: 500; background: var(--fundo-2); }
.kv dd { color: var(--texto); font-size: .9rem; overflow-wrap: anywhere; }
.tabela { overflow-x: auto; border: 1px solid var(--linha); border-radius: 12px; background: var(--painel); }
.tabela table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.tabela th { text-align: left; font-weight: 600; color: var(--texto-3); font-size: .78rem; letter-spacing: .03em; background: var(--fundo-2); }
.tabela th, .tabela td { padding: 10px 14px; border-bottom: 1px solid var(--linha); vertical-align: top; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela td { color: var(--texto-2); }
.tabela td:first-child { color: var(--texto); }

.aviso-cofre { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--aviso) 50%, transparent); background: color-mix(in srgb, var(--aviso) 8%, transparent); font-size: .88rem; color: var(--texto-2); }
.aviso-cofre svg.ic { color: var(--aviso); margin-top: 2px; }
.aviso-cofre b { color: var(--texto); }

/* comandos prontos */
.comando { border: 1px solid var(--linha); border-radius: 12px; background: var(--fundo-2); overflow: hidden; }
.comando-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--linha); font-size: .82rem; color: var(--texto-2); background: var(--painel); }
.comando-cab b { color: var(--texto); font-weight: 600; }
.comando pre { margin: 0; border: 0; border-radius: 0; background: transparent; white-space: pre-wrap; word-break: break-word; font-size: .84rem; }
.comandos { display: grid; gap: 12px; }

/* conferências ao vivo */
.conferencias { display: flex; flex-direction: column; gap: 8px; }
.conferencia { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--linha); border-radius: 10px; background: var(--painel); font-size: .88rem; min-width: 0; }
.conferencia .url { color: var(--texto-3); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.conferencia b { font-weight: 600; white-space: nowrap; }
.conferencia .ms { color: var(--texto-3); font-variant-numeric: tabular-nums; font-size: .78rem; white-space: nowrap; }

/* ------------------------------------------------------------ servidor */
.medidores { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.medidor { display: flex; gap: 14px; align-items: center; background: var(--painel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 14px 16px; min-width: 0; }
.anel { --p: 0; --cor: var(--ok); width: 58px; height: 58px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--cor) calc(var(--p) * 1%), var(--painel-2) 0); }
.anel::before { content: ""; grid-area: 1 / 1; width: 44px; height: 44px; border-radius: 50%; background: var(--painel); }
.anel b { grid-area: 1 / 1; z-index: 1; font: 650 .82rem var(--f-titulo); font-variant-numeric: tabular-nums; }
.medidor span { color: var(--texto-3); font-size: .78rem; display: block; }
.medidor strong { font: 600 1.05rem var(--f-titulo); display: block; font-variant-numeric: tabular-nums; }
.medidor em { font-style: normal; color: var(--texto-3); font-size: .76rem; }
.containers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.grupo { background: var(--painel); border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; }
.grupo-cab { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--linha); font: 600 .92rem var(--f-titulo); }
.grupo-cab small { margin-left: auto; font: 500 .76rem var(--f-texto); color: var(--texto-3); }
.container { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--linha); font-size: .85rem; }
.container:last-child { border-bottom: 0; }
.container .ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--falha); }
.container .ponto.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.container .nome { font-family: var(--f-mono); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.container .uso { color: var(--texto-3); font-size: .76rem; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.container .detalhe { grid-column: 2 / 4; color: var(--texto-3); font-size: .76rem; }
.barra { height: 4px; background: var(--painel-2); border-radius: 4px; overflow: hidden; grid-column: 2 / 4; }
.barra i { display: block; height: 100%; background: var(--acento); border-radius: 4px; }

.faixa-exemplo { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--aviso) 14%, transparent) 0 10px, transparent 10px 20px); border: 1px solid color-mix(in srgb, var(--aviso) 45%, transparent); font-size: .86rem; font-weight: 500; }

.passos { margin: 0; padding: 0; list-style: none; counter-reset: passo; display: flex; flex-direction: column; gap: 14px; }
.passos li { counter-increment: passo; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; color: var(--texto-2); font-size: .92rem; }
.passos li::before { content: counter(passo); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--acento-suave); color: var(--acento-forte); font: 650 .82rem var(--f-titulo); }
.passos b { color: var(--texto); }

/* ------------------------------------------------------------ Maximus */
.maximus {
  --mx-lima: #cae841; --mx-verde: #013317; --mx-verde-2: #034a22; --mx-verde-3: #0b5c2e; --mx-creme: #f2f7e3;
  display: flex; flex-direction: column; gap: 22px;
}
.mx-capa {
  position: relative; overflow: hidden; border-radius: 20px; padding: 28px;
  background:
    radial-gradient(700px 260px at 100% 0%, rgb(202 232 65 / .22), transparent 60%),
    radial-gradient(500px 240px at 0% 100%, rgb(202 232 65 / .10), transparent 60%),
    linear-gradient(135deg, var(--mx-verde) 0%, #012612 100%);
  color: var(--mx-creme); border: 1px solid rgb(202 232 65 / .25);
}
.mx-capa::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgb(202 232 65 / .06) 1px, transparent 1px), linear-gradient(90deg, rgb(202 232 65 / .06) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent, #000 60%); }
.mx-capa-topo { position: relative; z-index: 1; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.mx-capa img { width: 78px; height: auto; border-radius: 12px; box-shadow: 0 10px 30px -10px rgb(202 232 65 / .6); }
.mx-capa h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); color: #fff; }
.mx-capa p { margin: 6px 0 0; color: rgb(242 247 227 / .78); max-width: 64ch; }
.mx-numeros { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.mx-numeros div { background: rgb(1 51 23 / .55); border: 1px solid rgb(202 232 65 / .2); border-radius: 12px; padding: 12px 14px; backdrop-filter: blur(4px); min-width: 0; }
.mx-numeros span { display: block; font-size: .74rem; color: rgb(242 247 227 / .65); letter-spacing: .03em; }
.mx-numeros b { font: 650 1.3rem var(--f-titulo); color: var(--mx-lima); font-variant-numeric: tabular-nums; }
.mx-numeros b small { font-size: .6em; color: rgb(242 247 227 / .7); font-weight: 500; }
.maximus .cartao { border-color: color-mix(in srgb, #cae841 22%, var(--linha)); }
.maximus .cartao > h2 svg.ic, .maximus .secao-titulo svg.ic { color: #9fbe1d; }
[data-tema="claude-dia"] .maximus .cartao > h2 svg.ic, [data-tema="grafite"] .maximus .secao-titulo svg.ic { color: #4f6a00; }
.mx-pill { display: inline-flex; align-items: center; gap: 6px; font: 600 .74rem/1 var(--f-texto); padding: 5px 9px; border-radius: 99px; background: #cae841; color: #013317; white-space: nowrap; }
.mx-pill.apagada { background: var(--painel-2); color: var(--texto-3); border: 1px solid var(--linha); font-weight: 500; }
.mx-pill.proxima { background: transparent; color: var(--texto); border: 1px dashed #9fbe1d; font-weight: 500; }
.mx-instalacoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.mx-instalacoes a > span:last-child { align-self: flex-start; }
.mx-instalacoes a { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--linha); border-radius: 12px; background: var(--painel); color: var(--texto); }
.mx-instalacoes a:hover { text-decoration: none; border-color: #9fbe1d; }
.mx-instalacoes .linha { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: .92rem; }
.mx-instalacoes .icone-projeto { width: 32px; height: 32px; border-radius: 9px; }
.mx-instalacoes .icone-projeto svg.ic { width: 17px; height: 17px; }
.camadas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.camada { position: relative; padding: 14px; border-radius: 12px; background: var(--fundo-2); border: 1px solid var(--linha); min-width: 0; }
.camada i { font: 700 .72rem var(--f-mono); color: #9fbe1d; font-style: normal; }
.camada b { display: block; font: 600 .92rem var(--f-titulo); margin: 4px 0; }
.camada span { font-size: .8rem; color: var(--texto-3); }
.camada .larg { position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: #cae841; opacity: calc(1 - var(--n) * .2); }
.nichos { display: flex; flex-wrap: wrap; gap: 6px; }
.nichos span { padding: 6px 10px; border-radius: 8px; font-size: .82rem; background: var(--painel-2); border: 1px solid var(--linha); color: var(--texto-2); }
.replicar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.campo { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; color: var(--texto-3); font-weight: 500; min-width: 0; }
.campo select, .campo input, .campo textarea {
  font: inherit; font-size: .92rem; color: var(--texto); background: var(--painel-2); border: 1px solid var(--linha-forte);
  border-radius: 10px; padding: 10px 12px; width: 100%;
}
.campo textarea { min-height: 84px; resize: vertical; }

/* ------------------------------------------------------------ aparência */
.temas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.tema-op { cursor: pointer; text-align: left; font: inherit; color: var(--texto); padding: 0; border-radius: 14px; overflow: hidden; border: 2px solid var(--linha); background: var(--painel); transition: border-color .15s, transform .15s; }
.tema-op:hover { transform: translateY(-2px); }
.tema-op[aria-pressed="true"] { border-color: var(--acento); }
.tema-op .amostra { height: 84px; display: grid; grid-template-columns: 30% 1fr; }
.tema-op .amostra i { display: block; }
.tema-op .amostra div { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.tema-op .amostra div span { height: 7px; border-radius: 4px; display: block; }
.tema-op p { margin: 0; padding: 10px 12px; font-size: .86rem; font-weight: 600; display: flex; justify-content: space-between; }
.tema-op p small { color: var(--texto-3); font-weight: 400; }
.cores-acento { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cores-acento button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--painel); outline: 1px solid var(--linha-forte); cursor: pointer; background: var(--c); }
.cores-acento button[aria-pressed="true"] { outline: 2px solid var(--texto); }
.cores-acento label { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--texto-2); }
.cores-acento input[type="color"] { width: 40px; height: 34px; border: 1px solid var(--linha-forte); border-radius: 8px; background: var(--painel); padding: 2px; }

/* janela (novo projeto) */
.janela-fundo { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .55); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.janela { width: min(620px, 100%); max-height: 90vh; overflow: auto; background: var(--painel); border: 1px solid var(--linha-forte); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px -30px rgb(0 0 0 / .8); }
.janela h2 { font-size: 1.2rem; }
.janela p { margin: 0; color: var(--texto-2); font-size: .9rem; }

.aviso-copiado { position: fixed; z-index: 60; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--texto); color: var(--fundo); padding: 10px 16px; border-radius: 10px; font-size: .88rem; font-weight: 600; box-shadow: var(--sombra); }

.carregando { color: var(--texto-3); font-size: .88rem; display: flex; align-items: center; gap: 10px; }
.carregando::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--linha-forte); border-top-color: var(--acento); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.vazio-msg { color: var(--texto-3); font-size: .9rem; padding: 6px 0; }
.rodape-ficha { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--texto-3); font-size: .8rem; border-top: 1px solid var(--linha); padding-top: 14px; }

.entrar-pagina main { animation: sobe .5s ease both; }
.miolo > * { animation: sobe .35s ease both; }
.miolo > *:nth-child(2) { animation-delay: .04s; } .miolo > *:nth-child(3) { animation-delay: .08s; } .miolo > *:nth-child(4) { animation-delay: .12s; }
@keyframes sobe { from { transform: translateY(6px); opacity: .001; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------ celular */
@media (max-width: 1080px) {
  .grade-2 { grid-template-columns: minmax(0, 1fr); }
  .camadas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); background: none; }
  .lateral { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: auto; transform: translateX(-102%); transition: transform .22s ease; padding-top: max(18px, env(safe-area-inset-top, 0px)); padding-left: max(14px, env(safe-area-inset-left, 0px)); box-shadow: 20px 0 60px -20px rgb(0 0 0 / .6); }
  .app.menu-aberto .lateral { transform: none; }
  .app.menu-aberto::after { content: ""; position: fixed; inset: 0; z-index: 35; background: rgb(0 0 0 / .45); }
  .topo-celular {
    display: flex; align-items: center; gap: 12px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
    background: color-mix(in srgb, var(--fundo) 88%, transparent); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--linha);
    padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--fundo); }
  .topo-celular button { background: none; border: 1px solid var(--linha); color: var(--texto); border-radius: 9px; padding: 7px; display: grid; }
  .topo-celular .marca img { width: 30px; height: 30px; border-radius: 9px; }
  .topo-celular .marca b { font-size: 1.05rem; }
  .principal { padding-block: 18px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .numeros, .mx-numeros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ficha-topo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ficha-topo div:nth-child(2) { border-right: 0; }
  .ficha-topo div:nth-child(-n+2) { border-bottom: 1px solid var(--linha); }
  .grade-3 { grid-template-columns: minmax(0, 1fr); }
  .replicar { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .projeto-cab { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { border-bottom: 0; padding-bottom: 2px; background: none; font-size: .76rem; }
  .camadas { grid-template-columns: minmax(0, 1fr); }
  .mx-capa { padding: 20px; }
  .numero b { font-size: 1.4rem; }
}
