/* =====================================================================
   MX DRIVE — folha de estilo unica
   Tema escuro por padrao, azul como cor da marca. Tudo por variaveis:
   trocar de tema so troca o bloco :root[data-tema].
   ===================================================================== */

/* ---------- 1. TOKENS ---------- */
:root[data-tema="escuro"] {
  --fundo:        #0a0d14;
  --fundo-2:      #0d1119;
  --superficie:   #131926;
  --superficie-2: #182031;
  --superficie-3: #1e283c;
  --borda:        #232e44;
  --borda-forte:  #31405c;
  --texto:        #e7ecf7;
  --texto-2:      #aab6ca;
  --texto-3:      #78859c;
  --marca:        #3b82f6;
  --marca-2:      #60a5fa;
  --marca-3:      #1d4ed8;
  --marca-fraca:  rgba(59,130,246,.14);
  --marca-texto:  #fff;
  --ok:           #22c55e;
  --alerta:       #f59e0b;
  --erro:         #ef4444;
  --sombra:       0 18px 40px -18px rgba(0,0,0,.75);
  --sombra-2:     0 28px 70px -20px rgba(0,0,0,.85);
  --vidro:        rgba(19,25,38,.86);
}
:root[data-tema="claro"] {
  --fundo:        #f4f6fb;
  --fundo-2:      #eef1f8;
  --superficie:   #ffffff;
  --superficie-2: #f7f9fd;
  --superficie-3: #eef2fa;
  --borda:        #e0e6f1;
  --borda-forte:  #c9d3e5;
  --texto:        #101828;
  --texto-2:      #48566e;
  --texto-3:      #6c7a91;
  --marca:        #2563eb;
  --marca-2:      #1d4ed8;
  --marca-3:      #1e40af;
  --marca-fraca:  rgba(37,99,235,.1);
  --marca-texto:  #fff;
  --ok:           #16a34a;
  --alerta:       #d97706;
  --erro:         #dc2626;
  --sombra:       0 14px 32px -18px rgba(16,24,40,.28);
  --sombra-2:     0 26px 60px -22px rgba(16,24,40,.32);
  --vidro:        rgba(255,255,255,.9);
}
:root {
  --r-p: 8px; --r-m: 12px; --r-g: 16px; --r-gg: 22px;
  --lateral-l: 254px;
  --topo-a: 62px;
  --t: 160ms cubic-bezier(.4,0,.2,1);
  color-scheme: dark;
}
:root[data-tema="claro"] { color-scheme: light; }

/* Ha motor de renderizacao que, ao trocar so as variaveis do :root, revalida
   `background` mas NAO a `color` ja computada — a tela troca pela metade.
   Por isso o body leva as duas cores literais, uma regra por tema. */
:root[data-tema="escuro"] body { background: #0a0d14; color: #e7ecf7; }
:root[data-tema="claro"]  body { background: #f4f6fb; color: #101828; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 14px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
h1,h2,h3,h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--marca); color: #fff; }

/* rolagem discreta */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--borda-forte); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--texto-3); background-clip: content-box; }

/* ---------- 2. ICONES (mascara SVG, sem dependencia externa) ---------- */
[data-icone]::before {
  content: ""; display: inline-block; width: 1.15em; height: 1.15em;
  background: currentColor; vertical-align: -.22em; flex: none;
  -webkit-mask: var(--ic) center/contain no-repeat; mask: var(--ic) center/contain no-repeat;
}
[data-icone="painel"]      { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='9' rx='1'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1'/%3E%3C/svg%3E"); }
[data-icone="pasta"]       { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2z'/%3E%3C/svg%3E"); }
[data-icone="arquivo"]     { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3C/svg%3E"); }
[data-icone="relogio"]     { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
[data-icone="estrela"]     { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.9 5.9 6.5.9-4.7 4.6 1.1 6.5L12 17.8 6.2 20.9l1.1-6.5L2.6 9.8l6.5-.9z'/%3E%3C/svg%3E"); }
[data-icone="estrela-cheia"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='m12 3 2.9 5.9 6.5.9-4.7 4.6 1.1 6.5L12 17.8 6.2 20.9l1.1-6.5L2.6 9.8l6.5-.9z'/%3E%3C/svg%3E"); }
[data-icone="pessoas"]     { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E"); }
[data-icone="pessoa"]      { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); }
[data-icone="lixeira"]     { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6'/%3E%3C/svg%3E"); }
[data-icone="lista"]       { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); }
[data-icone="grade"]       { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
[data-icone="compacta"]    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18M3 9h18M3 13h18M3 17h18M3 21h18'/%3E%3C/svg%3E"); }
[data-icone="escudo"]      { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10'/%3E%3C/svg%3E"); }
[data-icone="engrenagem"]  { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.6 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.6 1.65 1.65 0 0 0 10 3.09V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9v0c.2.61.77 1 1.41 1H21a2 2 0 1 1 0 4h-.09c-.64 0-1.21.39-1.51 1'/%3E%3C/svg%3E"); }
[data-icone="busca"]       { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
[data-icone="sino"]        { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 1 0-12 0c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.7 21a2 2 0 0 1-3.4 0'/%3E%3C/svg%3E"); }
[data-icone="lua"]         { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8'/%3E%3C/svg%3E"); }
[data-icone="sol"]         { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); }
[data-icone="mais"]        { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
[data-icone="x"]           { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E"); }
[data-icone="menu"]        { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6h18M3 12h18M3 18h18'/%3E%3C/svg%3E"); }
[data-icone="upload"]      { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 9 5-5 5 5M12 4v12'/%3E%3C/svg%3E"); }
[data-icone="download"]    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 11 5 5 5-5M12 16V4'/%3E%3C/svg%3E"); }
[data-icone="baixo"]       { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
[data-icone="direita"]     { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E"); }
[data-icone="sair"]        { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='m16 17 5-5-5-5M21 12H9'/%3E%3C/svg%3E"); }
[data-icone="lapis"]       { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.8 2.8 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5z'/%3E%3C/svg%3E"); }
[data-icone="copiar"]      { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E"); }
[data-icone="tesoura"]     { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M20 4 8.1 15.9M14.5 14.5 20 20M8.1 8.1 12 12'/%3E%3C/svg%3E"); }
[data-icone="colar"]       { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3C/svg%3E"); }
[data-icone="mover"]       { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9 2 12l3 3M9 5l3-3 3 3M15 19l-3 3-3-3M19 9l3 3-3 3M2 12h20M12 2v20'/%3E%3C/svg%3E"); }
[data-icone="versoes"]     { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8'/%3E%3Cpath d='M3 3v5h5M12 8v4l3 2'/%3E%3C/svg%3E"); }
[data-icone="link"]        { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7'/%3E%3C/svg%3E"); }
[data-icone="info"]        { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E"); }
[data-icone="cadeado"]     { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }
[data-icone="etiqueta"]    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.6 13.4 12 22l-9-9V3h10z'/%3E%3Cpath d='M7 7h.01'/%3E%3C/svg%3E"); }
[data-icone="voltar"]      { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18 9 12l6-6'/%3E%3C/svg%3E"); }
[data-icone="ok"]          { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 12 5.5 5.5L20 7'/%3E%3C/svg%3E"); }
[data-icone="mais-vert"]   { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Ccircle cx='12' cy='5' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='12' cy='19' r='2'/%3E%3C/svg%3E"); }
[data-icone="zoom-mais"]   { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5M11 8v6M8 11h6'/%3E%3C/svg%3E"); }
[data-icone="zoom-menos"]  { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5M8 11h6'/%3E%3C/svg%3E"); }
[data-icone="tela-cheia"]  { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3m8 0h3a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E"); }
[data-icone="atualizar"]   { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-3-6.7'/%3E%3Cpath d='M21 3v5h-5'/%3E%3C/svg%3E"); }
[data-icone="filtro"]      { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18l-7 8v6l-4 2v-8z'/%3E%3C/svg%3E"); }

/* ---------- 3. PRIMITIVOS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 15px; border-radius: var(--r-m); border: 1px solid var(--borda);
  background: var(--superficie-2); color: var(--texto); cursor: pointer;
  font-weight: 550; white-space: nowrap;
  transition: background var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
}
.btn:hover { background: var(--superficie-3); border-color: var(--borda-forte); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primario { background: var(--marca); border-color: transparent; color: var(--marca-texto); box-shadow: 0 6px 18px -8px var(--marca); }
.btn-primario:hover { background: var(--marca-2); border-color: transparent; }
.btn-perigo { color: var(--erro); }
.btn-perigo:hover { background: color-mix(in srgb, var(--erro) 14%, transparent); border-color: var(--erro); }
.btn-bloco { width: 100%; }
.btn-p { padding: 6px 11px; font-size: 13px; border-radius: var(--r-p); }
.btn-icone {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  width: 36px; height: 36px; border-radius: var(--r-m); border: 1px solid transparent;
  background: transparent; color: var(--texto-2); cursor: pointer; transition: all var(--t);
}
.btn-icone:hover { background: var(--superficie-2); color: var(--texto); }
.btn-icone.ativo { background: var(--marca-fraca); color: var(--marca-2); }
.link { background: none; border: 0; color: var(--marca-2); cursor: pointer; padding: 0; font-size: 12px; }
.link:hover { text-decoration: underline; }
.selo { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--marca-fraca); color: var(--marca-2); font-size: 11px; font-weight: 700; }
.selo-cinza { background: var(--superficie-3); color: var(--texto-2); }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > span { font-size: 12.5px; color: var(--texto-2); font-weight: 550; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=number], select, textarea {
  padding: 10px 12px; border-radius: var(--r-m); border: 1px solid var(--borda);
  background: var(--fundo-2); color: var(--texto); outline: none; transition: border-color var(--t), box-shadow var(--t);
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--marca); box-shadow: 0 0 0 3px var(--marca-fraca); }
input::placeholder { color: var(--texto-3); }
kbd { font: 600 10.5px/1 ui-monospace, monospace; padding: 4px 6px; border-radius: 6px; background: var(--superficie-3); color: var(--texto-3); border: 1px solid var(--borda); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 99px; background: linear-gradient(140deg, var(--marca), var(--marca-3));
  color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .02em; flex: none;
}
.avatar-g { width: 42px; height: 42px; font-size: 15px; }
.avatar-p { width: 24px; height: 24px; font-size: 10px; }
.vazio { display: grid; place-items: center; gap: 10px; padding: 60px 20px; text-align: center; color: var(--texto-3); }
.vazio strong { color: var(--texto-2); font-size: 15px; }
.vazio [data-icone]::before { width: 44px; height: 44px; opacity: .35; }

/* ---------- 4. LOGIN ---------- */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; background: var(--fundo); overflow: hidden; }
.login-fundo span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: flutua 18s ease-in-out infinite; }
.login-fundo span:nth-child(1) { width: 460px; height: 460px; background: #1d4ed8; top: -140px; left: -110px; }
.login-fundo span:nth-child(2) { width: 380px; height: 380px; background: #0ea5e9; bottom: -130px; right: -90px; animation-delay: -6s; }
.login-fundo span:nth-child(3) { width: 300px; height: 300px; background: #6366f1; top: 45%; left: 55%; animation-delay: -12s; }
@keyframes flutua { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,-40px) scale(1.12); } }
.login-cartao {
  position: relative; width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px;
  padding: 30px; border-radius: var(--r-gg); border: 1px solid var(--borda);
  background: var(--vidro); backdrop-filter: blur(18px); box-shadow: var(--sombra-2);
  animation: sobe .45s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes sobe { from { opacity: 0; transform: translateY(16px); } }
.login-marca { display: flex; align-items: center; gap: 13px; margin-bottom: 4px; }
.login-marca h1 { font-size: 21px; }
.login-marca p { margin: 2px 0 0; color: var(--texto-3); font-size: 12.5px; }
.marca-icone {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  background: linear-gradient(140deg, var(--marca), var(--marca-3));
  box-shadow: 0 10px 24px -10px var(--marca);
  -webkit-mask: none;
  position: relative;
}
.marca-icone::after {
  content: ""; position: absolute; inset: 0; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2z'/%3E%3C/svg%3E") center/55% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2z'/%3E%3C/svg%3E") center/55% no-repeat;
}
.login-erro { margin: 0; padding: 9px 12px; border-radius: var(--r-m); background: color-mix(in srgb, var(--erro) 14%, transparent); color: var(--erro); font-size: 13px; }
.login-rodape { margin: 2px 0 0; text-align: center; color: var(--texto-3); font-size: 12px; }

/* ---------- 5. ESTRUTURA ---------- */
.app { display: grid; grid-template-columns: var(--lateral-l) 1fr; height: 100vh; height: 100dvh; }
.app.com-detalhes { grid-template-columns: var(--lateral-l) 1fr 320px; }

.lateral {
  display: flex; flex-direction: column; gap: 14px; padding: 14px 12px;
  background: var(--fundo-2); border-right: 1px solid var(--borda); min-height: 0;
}
.lateral-topo { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.marca { display: flex; align-items: center; gap: 10px; }
.marca .marca-icone { width: 34px; height: 34px; border-radius: 10px; }
.marca-txt { display: flex; flex-direction: column; line-height: 1.15; }
.marca-txt strong { font-size: 15px; }
.marca-txt small { color: var(--texto-3); font-size: 11px; letter-spacing: .06em; }
.btn-novo { justify-content: flex-start; padding: 11px 14px; font-size: 14px; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; min-height: 0; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-m);
  color: var(--texto-2); cursor: pointer; font-weight: 500; user-select: none;
  transition: background var(--t), color var(--t);
}
.nav-item:hover { background: var(--superficie); color: var(--texto); }
.nav-item.ativo { background: var(--marca-fraca); color: var(--marca-2); font-weight: 600; }
.nav-item .selo { margin-left: auto; }
.nav-sep { height: 1px; background: var(--borda); margin: 8px 12px; }
.lateral-rodape { display: flex; flex-direction: column; gap: 12px; }
.cota { padding: 11px 12px; border-radius: var(--r-m); background: var(--superficie); border: 1px solid var(--borda); }
.cota-linha { display: flex; justify-content: space-between; font-size: 12px; color: var(--texto-2); margin-bottom: 7px; }
.cota-linha b { color: var(--texto); }
.barra { height: 6px; border-radius: 99px; background: var(--superficie-3); overflow: hidden; }
.barra i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--marca), var(--marca-2)); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.cota small { display: block; margin-top: 6px; color: var(--texto-3); font-size: 11px; }
.online { display: flex; align-items: center; gap: -8px; padding: 0 4px; min-height: 26px; }
.online .avatar-p { margin-right: -7px; border: 2px solid var(--fundo-2); position: relative; }
.online .mais { margin-left: 12px; font-size: 11px; color: var(--texto-3); }
.lateral-fundo { display: none; }

.principal { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topo {
  display: flex; align-items: center; gap: 12px; height: var(--topo-a); padding: 0 16px;
  border-bottom: 1px solid var(--borda); background: var(--fundo); flex: none;
}
.busca { position: relative; flex: 1; max-width: 620px; display: flex; align-items: center; }
.busca > [data-icone] { position: absolute; left: 12px; color: var(--texto-3); pointer-events: none; display: flex; }
.busca input { padding-left: 38px; padding-right: 62px; background: var(--superficie); border-radius: 99px; height: 40px; }
.busca kbd { position: absolute; right: 10px; pointer-events: none; }
.busca-resultado {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: 60vh; overflow-y: auto;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-g);
  box-shadow: var(--sombra-2); padding: 6px; z-index: 60;
}
.topo-acoes { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.sinal-sync { display: flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; background: var(--superficie); border: 1px solid var(--borda); font-size: 11.5px; color: var(--texto-2); }
.sinal-sync i { width: 7px; height: 7px; border-radius: 99px; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: pulso 2.4s infinite; }
.sinal-sync.off i { background: var(--erro); animation: none; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.avatar-btn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 99px; }
.ponto { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 99px; background: var(--erro); border: 2px solid var(--fundo); }
.menu-alvo { position: relative; }
.popover {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 260px; z-index: 70;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-g);
  box-shadow: var(--sombra-2); padding: 6px; animation: cai .14s ease both;
}
@keyframes cai { from { opacity: 0; transform: translateY(-6px); } }
.popover header { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; font-weight: 600; font-size: 13px; }
.popover-corpo { max-height: 340px; overflow-y: auto; }
.popover-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--r-p); background: none; color: var(--texto); cursor: pointer; text-align: left; }
.popover-item:hover { background: var(--superficie-2); }
.perfil-resumo { display: flex; gap: 11px; align-items: center; padding: 10px; border-bottom: 1px solid var(--borda); margin-bottom: 6px; }
.perfil-resumo small { display: block; color: var(--texto-3); font-size: 12px; }

.conteudo { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; padding: 20px; }
.pagina { animation: entra .22s ease both; max-width: 1500px; margin: 0 auto; }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } }
.pagina-topo { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.pagina-topo h2 { font-size: 21px; }
.pagina-topo p { margin: 4px 0 0; color: var(--texto-3); font-size: 13px; }

/* ---------- 6. DASHBOARD ---------- */
.cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.cartao { padding: 15px 16px; border-radius: var(--r-g); background: var(--superficie); border: 1px solid var(--borda); transition: transform var(--t), border-color var(--t); }
.cartao:hover { transform: translateY(-2px); border-color: var(--borda-forte); }
.cartao small { display: flex; align-items: center; gap: 7px; color: var(--texto-3); font-size: 12px; }
.cartao b { display: block; font-size: 25px; margin-top: 7px; letter-spacing: -.02em; }
.cartao .sub { font-size: 11.5px; color: var(--texto-3); margin-top: 3px; }
.painel-grade { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; align-items: start; }
.bloco { border-radius: var(--r-g); background: var(--superficie); border: 1px solid var(--borda); overflow: hidden; }
.bloco > header { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--borda); font-weight: 600; font-size: 14px; }
.bloco-corpo { padding: 14px 16px; }
.grafico { display: flex; align-items: flex-end; gap: 4px; height: 168px; padding-top: 8px; }
.grafico .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.grafico .col i { display: block; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--marca-2), var(--marca)); min-height: 3px; transition: height .5s cubic-bezier(.2,.8,.2,1); opacity: .9; }
.grafico .col:hover i { opacity: 1; }
.grafico .col span { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 9.5px; color: var(--texto-3); white-space: nowrap; }
.grafico-legenda { display: flex; justify-content: space-between; margin-top: 26px; font-size: 11.5px; color: var(--texto-3); }
.linha-item { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--borda); font-size: 13px; }
.linha-item:last-child { border-bottom: 0; }
.linha-item .quando { margin-left: auto; color: var(--texto-3); font-size: 11.5px; white-space: nowrap; }
.tipo-barra { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 12.5px; }
.tipo-barra .barra { flex: 1; }
.tipo-barra b { width: 62px; text-align: right; color: var(--texto-2); font-weight: 500; font-size: 11.5px; }
.ext-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; padding: 3px 7px; border-radius: 6px; background: var(--superficie-3); font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--texto-2); }

/* ---------- 7. DRIVE ---------- */
.barra-ferramentas { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.trilha { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-size: 14px; min-height: 34px; }
.trilha a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: var(--r-p); color: var(--texto-2); cursor: pointer; transition: background var(--t); }
.trilha a:hover { background: var(--superficie-2); color: var(--texto); }
.trilha a.fim { color: var(--texto); font-weight: 600; }
.trilha .sep { color: var(--texto-3); opacity: .6; display: flex; }
.trilha a.alvo-solta { background: var(--marca-fraca); color: var(--marca-2); outline: 2px dashed var(--marca); }
.grupo-btn { display: inline-flex; border: 1px solid var(--borda); border-radius: var(--r-m); overflow: hidden; background: var(--superficie); }
.grupo-btn .btn-icone { border-radius: 0; width: 34px; height: 34px; }
.grupo-btn .btn-icone + .btn-icone { border-left: 1px solid var(--borda); }
.espaco { flex: 1; }
.chip-sel { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 13px; border-radius: 99px; background: var(--marca-fraca); color: var(--marca-2); font-size: 12.5px; font-weight: 600; }

.lista { border-radius: var(--r-g); border: 1px solid var(--borda); background: var(--superficie); overflow: hidden; }
.lista-cab, .item-lista {
  display: grid; grid-template-columns: 1fr 130px 108px 118px 40px; align-items: center; gap: 12px;
  padding: 0 14px;
}
.lista-cab { height: 38px; border-bottom: 1px solid var(--borda); font-size: 11.5px; color: var(--texto-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: var(--superficie-2); }
.lista-cab span { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 5px; }
.lista-cab span:hover { color: var(--texto-2); }
.item-lista {
  height: 50px; border-bottom: 1px solid var(--borda); cursor: default; user-select: none;
  transition: background var(--t);
}
.item-lista:last-child { border-bottom: 0; }
.item-lista:hover { background: var(--superficie-2); }
.item-lista.sel { background: var(--marca-fraca); box-shadow: inset 3px 0 0 var(--marca); }
.item-lista.arrastando { opacity: .45; }
.item-lista.alvo-solta { background: var(--marca-fraca); outline: 2px dashed var(--marca); outline-offset: -2px; }
.item-nome { display: flex; align-items: center; gap: 11px; min-width: 0; }
.item-nome > b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-nome input { padding: 4px 7px; height: 30px; }
.icone-arq { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; flex: none; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; color: #fff; }
.item-col { color: var(--texto-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-acoes { display: flex; justify-content: flex-end; }
.item-lista .btn-icone { width: 30px; height: 30px; opacity: 0; }
.item-lista:hover .btn-icone, .item-lista.sel .btn-icone { opacity: 1; }
.marcas { display: inline-flex; gap: 5px; align-items: center; margin-left: 2px; }
.marcas [data-icone]::before { width: 14px; height: 14px; }
.marca-fav { color: var(--alerta); }
.marca-lock { color: var(--erro); }
.marca-restrita { color: var(--texto-3); }
.tag-mini { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 10.5px; font-weight: 600; }

.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.item-grade {
  position: relative; padding: 14px; border-radius: var(--r-g); border: 1px solid var(--borda);
  background: var(--superficie); cursor: default; user-select: none; transition: all var(--t);
  display: flex; flex-direction: column; gap: 10px; min-height: 138px;
}
.item-grade:hover { border-color: var(--borda-forte); transform: translateY(-2px); box-shadow: var(--sombra); }
.item-grade.sel { border-color: var(--marca); background: var(--marca-fraca); }
.item-grade.alvo-solta { outline: 2px dashed var(--marca); }
.item-grade .icone-arq { width: 44px; height: 44px; border-radius: 12px; font-size: 11px; }
.item-grade b { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.item-grade small { margin-top: auto; color: var(--texto-3); font-size: 11.5px; }
.item-grade .capa { height: 74px; border-radius: 10px; background: var(--superficie-3) center/cover no-repeat; }

.lista.compacta .item-lista { height: 34px; grid-template-columns: 1fr 120px 96px 40px; font-size: 13px; }
.lista.compacta .icone-arq { width: 22px; height: 22px; border-radius: 6px; font-size: 8px; }
.lista.compacta .lista-cab { grid-template-columns: 1fr 120px 96px 40px; }

/* ---------- 8. DETALHES ---------- */
.detalhes { background: var(--fundo-2); border-left: 1px solid var(--borda); overflow-y: auto; padding: 16px; }
.detalhes h3 { font-size: 14px; margin-bottom: 4px; word-break: break-word; }
.det-topo { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.det-topo .icone-arq { width: 46px; height: 46px; border-radius: 13px; font-size: 11px; }
.det-linha { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--borda); font-size: 12.5px; }
.det-linha span { color: var(--texto-3); flex: none; }
.det-linha b { font-weight: 500; text-align: right; word-break: break-word; }
.det-secao { margin-top: 16px; }
.det-secao > h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-3); margin-bottom: 8px; }
.det-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 14px; }

/* ---------- 9. MENU DE CONTEXTO ---------- */
.menu-contexto {
  position: fixed; z-index: 200; min-width: 218px; padding: 5px;
  background: var(--superficie); border: 1px solid var(--borda-forte); border-radius: var(--r-m);
  box-shadow: var(--sombra-2); animation: cai .1s ease both;
}
.mc-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-p); background: none; color: var(--texto); cursor: pointer; text-align: left; font-size: 13px; }
.mc-item:hover:not(:disabled) { background: var(--marca-fraca); color: var(--marca-2); }
.mc-item:disabled { opacity: .38; cursor: not-allowed; }
.mc-item kbd { margin-left: auto; }
.mc-item.perigo { color: var(--erro); }
.mc-item.perigo:hover:not(:disabled) { background: color-mix(in srgb, var(--erro) 12%, transparent); color: var(--erro); }
.mc-sep { height: 1px; background: var(--borda); margin: 4px 6px; }

/* ---------- 10. MODAL ---------- */
.modal-fundo { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; background: rgba(5,8,14,.66); backdrop-filter: blur(4px); animation: aparece .16s ease both; }
@keyframes aparece { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: 86vh; display: flex; flex-direction: column; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-gg); box-shadow: var(--sombra-2); animation: sobe .22s cubic-bezier(.2,.8,.2,1) both; overflow: hidden; }
.modal.largo { width: min(920px, 100%); }
.modal > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--borda); }
.modal > header h3 { font-size: 16px; }
.modal-corpo { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-rodape { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--borda); background: var(--superficie-2); }

/* ---------- 11. UPLOAD ---------- */
.dock-upload { position: fixed; right: 18px; bottom: 18px; width: 372px; max-width: calc(100vw - 24px); z-index: 150; background: var(--superficie); border: 1px solid var(--borda-forte); border-radius: var(--r-g); box-shadow: var(--sombra-2); overflow: hidden; animation: sobe .25s cubic-bezier(.2,.8,.2,1) both; }
.dock-upload > header { display: flex; align-items: center; justify-content: space-between; padding: 11px 10px 11px 15px; background: var(--superficie-2); border-bottom: 1px solid var(--borda); font-size: 13px; }
.dock-corpo { max-height: 290px; overflow-y: auto; padding: 6px; }
.dock-upload.encolhido .dock-corpo { display: none; }
.up-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: var(--r-p); }
.up-item:hover { background: var(--superficie-2); }
.up-item .nome { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-item .sub { font-size: 11px; color: var(--texto-3); margin-top: 3px; }
.up-item .barra { margin-top: 5px; height: 4px; }
.up-item.erro .nome { color: var(--erro); }
.up-anel { position: relative; width: 24px; height: 24px; }
.up-anel svg { transform: rotate(-90deg); }
.up-anel circle { fill: none; stroke-width: 3; }
.up-anel .trilho { stroke: var(--superficie-3); }
.up-anel .arco { stroke: var(--marca); stroke-linecap: round; transition: stroke-dasharray .2s linear; }
.up-ok { color: var(--ok); display: flex; }
.up-erro { color: var(--erro); display: flex; }

.solta { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; background: rgba(10,13,20,.72); backdrop-filter: blur(3px); }
.solta > div { display: grid; place-items: center; gap: 12px; padding: 50px 70px; border: 2.5px dashed var(--marca); border-radius: var(--r-gg); background: var(--marca-fraca); color: var(--texto); animation: sobe .2s ease both; }
.solta [data-icone]::before { width: 44px; height: 44px; }
.solta small { color: var(--texto-2); }

/* ---------- 12. TOASTS ---------- */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 99px; background: var(--superficie); border: 1px solid var(--borda-forte); box-shadow: var(--sombra-2); font-size: 13px; animation: sobe .22s cubic-bezier(.2,.8,.2,1) both; pointer-events: auto; max-width: 90vw; }
.toast.ok [data-icone] { color: var(--ok); }
.toast.erro [data-icone] { color: var(--erro); }
.toast.info [data-icone] { color: var(--marca-2); }
.toast .avatar-p { margin-right: -2px; }
.toast.saindo { animation: some .2s ease forwards; }
@keyframes some { to { opacity: 0; transform: translateY(8px); } }

/* ---------- 13. VISUALIZADOR ---------- */
.visor { position: fixed; inset: 0; z-index: 350; display: flex; flex-direction: column; background: rgba(6,9,15,.96); animation: aparece .16s ease both; }
.visor-topo { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: #e7ecf7; border-bottom: 1px solid rgba(255,255,255,.09); }
.visor-topo .titulo { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visor-topo .sub { color: #93a0b8; font-size: 12px; }
.visor-topo .btn-icone { color: #cbd5e5; }
.visor-topo .btn-icone:hover { background: rgba(255,255,255,.1); color: #fff; }
.visor-corpo { flex: 1; display: grid; place-items: center; overflow: auto; padding: 18px; min-height: 0; }
.visor-corpo img { max-width: 100%; max-height: 100%; border-radius: var(--r-m); transition: transform .18s ease; box-shadow: var(--sombra-2); }
.visor-corpo iframe, .visor-corpo video { width: 100%; height: 100%; border: 0; border-radius: var(--r-m); background: #0b0f17; }
.visor-corpo pre { width: 100%; height: 100%; overflow: auto; margin: 0; padding: 20px; background: #0d1119; border-radius: var(--r-m); color: #cbd5e5; font: 12.5px/1.65 ui-monospace, "SF Mono", Consolas, monospace; white-space: pre-wrap; }
.visor-aviso { display: grid; place-items: center; gap: 14px; text-align: center; color: #93a0b8; padding: 40px; }
.visor-aviso .icone-arq { width: 68px; height: 68px; border-radius: 18px; font-size: 15px; }

/* ---------- 14. TABELAS ---------- */
.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela th { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--borda); color: var(--texto-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; position: sticky; top: 0; background: var(--superficie); z-index: 1; }
.tabela td { padding: 10px 12px; border-bottom: 1px solid var(--borda); vertical-align: middle; }
.tabela tr:hover td { background: var(--superficie-2); }
.tabela .num { text-align: right; font-variant-numeric: tabular-nums; }
.rolagem { max-height: calc(100vh - 250px); overflow: auto; border-radius: var(--r-g); border: 1px solid var(--borda); background: var(--superficie); }

/* grade de permissoes */
.perm-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.perm-cat { margin-top: 14px; }
.perm-cat h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-3); margin-bottom: 8px; }
.perm-chk { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r-m); border: 1px solid var(--borda); background: var(--superficie-2); cursor: pointer; transition: all var(--t); }
.perm-chk:hover { border-color: var(--borda-forte); }
.perm-chk.on { border-color: var(--marca); background: var(--marca-fraca); }
.perm-chk input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--marca); flex: none; }
.perm-chk b { display: block; font-weight: 550; font-size: 13px; }
.perm-chk small { display: block; color: var(--texto-3); font-size: 11.5px; margin-top: 2px; }
.aviso { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-m); background: var(--marca-fraca); border: 1px solid color-mix(in srgb, var(--marca) 30%, transparent); font-size: 12.5px; color: var(--texto-2); }
.aviso.atencao { background: color-mix(in srgb, var(--alerta) 12%, transparent); border-color: color-mix(in srgb, var(--alerta) 34%, transparent); }
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--borda); margin-bottom: 16px; overflow-x: auto; }
.aba { padding: 9px 14px; border: 0; background: none; color: var(--texto-3); cursor: pointer; font-weight: 550; border-bottom: 2px solid transparent; white-space: nowrap; }
.aba:hover { color: var(--texto-2); }
.aba.ativa { color: var(--marca-2); border-bottom-color: var(--marca); }
.pilha { display: flex; flex-direction: column; gap: 12px; }
.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filtros .campo { min-width: 150px; }

/* ---------- 15. RESPONSIVO ---------- */
@media (max-width: 1180px) {
  .app.com-detalhes { grid-template-columns: var(--lateral-l) 1fr; }
  .detalhes { position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); z-index: 120; box-shadow: var(--sombra-2); }
  .painel-grade { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .lateral { position: fixed; top: 0; bottom: 0; left: 0; width: 272px; z-index: 140; transform: translateX(-100%); transition: transform .24s cubic-bezier(.2,.8,.2,1); }
  .app.menu-aberto .lateral { transform: none; }
  .app.menu-aberto .lateral-fundo { display: block; position: fixed; inset: 0; z-index: 130; background: rgba(5,8,14,.6); }
  .so-mobile { display: inline-flex !important; }
  .busca kbd { display: none; }
  .lista-cab, .item-lista { grid-template-columns: 1fr 96px 40px; }
  .lista-cab span:nth-child(2), .item-lista .col-autor,
  .lista-cab span:nth-child(4), .item-lista .col-data { display: none; }
  .conteudo { padding: 14px; }
  .duas { grid-template-columns: 1fr; }
  .dock-upload { right: 8px; left: 8px; width: auto; bottom: 8px; }
}
.so-mobile { display: none; }

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