/* Júpiter Nuvem — identidade Júpiter: azul institucional na navegação e na seleção, laranja só nas
   ações principais, fundo cinza-azulado claro com cartões brancos, Plus Jakarta Sans + Inter. */
:root {
  --canvas: #ffffff;
  --side: #f4f6fa;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --hover: #f2f4f7;
  --press: #eaecf0;
  --blue: #0a3d91;
  --blue-ink: #ffffff;
  --blue-hover: #072c69;
  --accent: #f28c28;
  --accent-hover: #db7714;
  --accent-ink: #ffffff;
  --selected: #eaf0fa;
  --selected-line: #c7d6ef;
  /* Ativo e seleção (item da lateral, arquivos marcados): laranja, a mesma cor das ações */
  --ativo: #fff1e3;
  --ativo-line: #fbcf9f;
  --ativo-ink: #b45309;
  --ok: #12b76a;
  --danger: #d92d20;
  --folder-back: #0a3d91;
  --folder-front: #3d6db8;
  --paper: #ffffff;
  --paper-fold: #f2f4f7;
  --paper-line: #d0d5dd;
  --card-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --pop-shadow: 0 4px 8px -2px rgba(16, 24, 40, .1), 0 12px 24px -4px rgba(16, 24, 40, .12);
  --r: 10px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --display: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --canvas: #111a2e;
  --side: #0b1220;
  --ink: #f2f4f7;
  --ink-2: #cdd5df;
  --ink-3: #98a2b3;
  --line: #1f2a44;
  --line-strong: #2c3a5a;
  --hover: #16213a;
  --press: #1b2846;
  --blue: #7ea6ea;
  --blue-ink: #0b1220;
  --blue-hover: #a3c0f1;
  --accent: #f59e4c;
  --accent-hover: #f7b06c;
  --accent-ink: #1a1206;
  --selected: #162a55;
  --selected-line: #284684;
  --ativo: #3a2a17;
  --ativo-line: #6b4a24;
  --ativo-ink: #f7b06c;
  --danger: #f97066;
  --folder-back: #3d6db8;
  --folder-front: #7ea6ea;
  --paper: #f2f4f7;
  --paper-fold: #d0d5dd;
  --paper-line: #98a2b3;
  --card-shadow: none;
  --pop-shadow: 0 4px 8px -2px rgba(0, 0, 0, .4), 0 12px 24px -4px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--side);
  color: var(--ink);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--ink-2); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.ic { width: 24px; height: 24px; fill: currentColor; flex: none; display: block; }
.kind { display: inline-flex; flex: none; width: 32px; height: 32px; }
.kind svg { width: 100%; height: 100%; display: block; }
.kind.huge { width: 72px; height: 72px; }

/* ── Botões e campos ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line-strong);
  background: var(--canvas); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn .ic { width: 20px; height: 20px; }
.btn .caret { width: 18px; height: 18px; margin: 0 -4px 0 -2px; }
.btn:hover { background: var(--hover); }
.btn:active { background: var(--press); }
/* Laranja: a ação principal da tela */
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.primary.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.text { border-color: transparent; background: transparent; box-shadow: none; }
.btn.text:hover { background: var(--hover); }
.btn.ghost { border-color: transparent; background: transparent; padding: 0 12px; box-shadow: none; }
.btn.ghost:hover { background: var(--canvas); }
.btn.ghost.danger { color: var(--danger); }
.btn.icon-only { width: 40px; padding: 0; }
.btn.block { width: 100%; height: 48px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link-btn { border: 0; background: none; padding: 0; color: var(--blue); font-weight: 600; cursor: pointer; text-decoration: none; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r);
  border: 0; background: transparent; color: var(--ink-2); cursor: pointer; flex: none; text-decoration: none;
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn.small { width: 32px; height: 32px; border-radius: 8px; }
.icon-btn.small .ic { width: 20px; height: 20px; }
.input {
  height: 40px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-strong);
  background: var(--canvas); outline: none; min-width: 0; box-shadow: var(--card-shadow);
}
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--selected); }
.input.slim { height: 36px; border-color: transparent; background: transparent; font-weight: 600; font-size: 14px; box-shadow: none; }
.input.slim:hover { background: var(--hover); }
select.input option { background: var(--canvas); color: var(--ink); }

/* ── Marca ── */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span { font: 700 18px/1 var(--display); letter-spacing: -.01em; white-space: nowrap; color: var(--blue); }
.brand span b { font-weight: 700; color: var(--accent); }

/* ── Login ── */
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-size: 14px; font-weight: 500; color: #344054; margin-bottom: 6px; }
.field input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-strong);
  background: var(--canvas); outline: none; font-size: 15px; box-shadow: var(--card-shadow);
}
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--selected); }
.form-error { color: var(--danger); min-height: 22px; margin: 0 0 8px; font-size: 14px; }
.form-ok { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r); background: #ecfdf3; border: 1px solid #abefc6; color: #067647; font-size: 14px; line-height: 1.5; }
:where(:root[data-theme="dark"]) .form-ok { background: #053321; border-color: #085d3a; color: #75e0a7; }
:where(:root[data-theme="dark"]) .field span { color: var(--ink-2); }

/* ── Entrada (login, cadastro, senha): uma coluna centralizada, fonte do sistema (SF no Mac/iPhone),
   cinza Apple de fundo, campos agrupados com divisória fina e rótulo que sobe ao digitar ── */
#auth {
  --auth-bg: #f5f5f7; --auth-campo: #ffffff; --auth-borda: #d2d2d7; --auth-texto: #1d1d1f; --auth-apoio: #6e6e73;
  position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 20px 24px; overflow: hidden; background: var(--auth-bg); color: var(--auth-texto);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif;
}
:where(:root[data-theme="dark"]) #auth {
  --auth-bg: #000000; --auth-campo: #1c1c1e; --auth-borda: #38383a; --auth-texto: #f5f5f7; --auth-apoio: #98989d;
}
/* Luz ambiente bem suave com as cores da marca, atrás de tudo */
.auth-luz {
  position: absolute; inset: -20% -10% auto; height: 70%; pointer-events: none; filter: blur(60px); opacity: .55;
  background: radial-gradient(40% 50% at 35% 40%, rgba(10, 61, 145, .18), transparent 70%),
              radial-gradient(35% 45% at 65% 35%, rgba(242, 140, 40, .16), transparent 70%);
}
:where(:root[data-theme="dark"]) .auth-luz { opacity: .9; }
.auth-caixa {
  position: relative; width: 100%; max-width: 380px; margin: auto 0; display: flex; flex-direction: column; align-items: center;
  text-align: center; animation: auth-entra .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes auth-entra { from { opacity: 0; transform: translateY(12px); } }
.auth-icone { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 10px 30px -8px rgba(10, 61, 145, .45); margin-bottom: 28px; }
#auth h1 { font-size: 32px; font-weight: 600; line-height: 1.1; letter-spacing: -.025em; }
.auth-sub { margin: 10px 0 32px; font-size: 17px; line-height: 1.45; color: var(--auth-apoio); max-width: 340px; }
#auth-form { width: 100%; }

.auth-grupo {
  text-align: left; background: var(--auth-campo); border: 1px solid var(--auth-borda); border-radius: 14px; overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.auth-grupo:not(:has(.field:not([hidden]))) { display: none; }
.auth-grupo:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
#auth .field { position: relative; display: block; margin: 0; }
#auth .field:not([hidden]) ~ .field:not([hidden]) { border-top: 1px solid var(--auth-borda); }
#auth .field input {
  width: 100%; height: 58px; padding: 22px 16px 6px; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  font-size: 17px; color: var(--auth-texto); outline: none;
}
#auth .field input:focus { box-shadow: none; }
#auth .field span {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%); margin: 0; pointer-events: none;
  font-size: 17px; font-weight: 400; color: var(--auth-apoio); transition: top .15s ease, font-size .15s ease, transform .15s ease;
}
#auth .field:has(input:focus) span,
#auth .field:has(input:not(:placeholder-shown)) span,
#auth .field:has(input:-webkit-autofill) span { top: 10px; transform: none; font-size: 12px; }
#auth .field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--auth-campo) inset; -webkit-text-fill-color: var(--auth-texto); }

#auth .form-error { min-height: 0; margin: 14px 0 0; font-size: 14px; text-align: center; }
#auth .form-error:empty { display: none; }
#auth .form-ok { margin: 0 0 4px; text-align: left; border-radius: 14px; }
.auth-botao {
  width: 100%; height: 50px; margin-top: 20px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-size: 17px; font-weight: 600; letter-spacing: -.01em;
  transition: background .15s, transform .1s;
}
.auth-botao:hover { background: var(--accent-hover); }
.auth-botao:active { transform: scale(.985); }
.auth-botao:disabled { opacity: .5; cursor: default; transform: none; }
.auth-esqueci { margin: 18px 0 0; font-size: 15px; }
#auth .link-btn { color: var(--blue); font-weight: 400; font-size: 15px; }
:where(:root[data-theme="dark"]) #auth .link-btn { color: #4da3ff; }
.auth-switch {
  margin: 36px 0 0; padding-top: 24px; width: 100%; border-top: 1px solid var(--auth-borda);
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; font-size: 15px; color: var(--auth-apoio);
}
.auth-rodape { position: relative; margin: 32px 0 0; font-size: 12px; color: var(--auth-apoio); }

/* ── Estrutura do app: cabeçalho de largura total, lateral branca, conteúdo sobre o cinza ── */
#app {
  display: grid; height: 100vh; height: 100dvh;
  grid-template: 64px minmax(0, 1fr) / 260px minmax(0, 1fr);
  grid-template-areas: "top top" "side main";
}
.topbar {
  grid-area: top; display: flex; align-items: center; gap: 24px; height: 64px; padding: 0 24px 0 18px;
  background: var(--canvas); border-bottom: 1px solid var(--line);
}
.topbar > .brand { width: 198px; flex: none; transition: width .2s; }
#app.side-collapsed .topbar > .brand { width: auto; }
.search {
  flex: 1; min-width: 0; max-width: 640px; height: 42px; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--r); padding: 0 6px 0 14px; background: var(--side);
}
.search:hover { border-color: var(--line-strong); }
.search:focus-within { border-color: var(--blue); background: var(--canvas); box-shadow: 0 0 0 4px var(--selected); }
.search-ic { color: var(--ink-3); }
.search-ic .ic { width: 20px; height: 20px; }
.search input { flex: 1; border: 0; background: transparent; outline: none; height: 100%; min-width: 0; font-size: 14px; }
.topbar-acoes { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; border: 0; display: inline-grid; place-items: center; flex: none;
  background: var(--blue); color: var(--blue-ink); font-weight: 600; font-size: 13px; cursor: pointer;
}
.conta-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 4px; border: 0; border-radius: 999px;
  background: none; color: var(--ink); cursor: pointer;
}
.conta-btn:hover { background: var(--hover); }
.conta-nome { font-weight: 600; font-size: 14px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 10px; }
@media (max-width: 1200px) { .conta-nome { display: none; } }
.avatar.sm { width: 32px; height: 32px; cursor: default; font-size: 13px; }
.only-mobile { display: none; }
.topbar > #menu-btn { margin-right: -12px; }

/* Lateral recolhida (computador): só ícones */
#app { transition: grid-template-columns .2s; }
#app.side-collapsed { grid-template-columns: 80px minmax(0, 1fr); }
#app.side-collapsed .sidebar { padding: 16px 6px; overflow-x: hidden; }
#app.side-collapsed .nav-label,
#app.side-collapsed .storage { display: none; }
#app.side-collapsed .nav { gap: 6px; }
#app.side-collapsed .nav a {
  flex-direction: column; justify-content: center; gap: 4px; height: auto; padding: 4px 0;
  font-size: 11px; line-height: 1.2; text-align: center; white-space: normal;
}
#app.side-collapsed .nav a:hover, #app.side-collapsed .nav a.active { background: none; }
/* Pílula atrás do ícone marca o ativo (e o hover), como a navigation rail do Material */
#app.side-collapsed .nav a .ic { box-sizing: content-box; padding: 4px 16px; border-radius: 16px; }
#app.side-collapsed .nav a:hover .ic { background: var(--hover); }
#app.side-collapsed .nav a.active .ic { background: var(--ativo); }
.nav-curto { display: none; }
#app.side-collapsed .nav-curto { display: block; }
.pw-nota { font-size: 13px; margin: -4px 0 12px; }

.sidebar {
  grid-area: side; background: var(--canvas); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; padding: 20px 16px; overflow-y: auto;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 8px;
  text-decoration: none; color: #344054; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden;
}
.nav a .ic { width: 20px; height: 20px; color: var(--ink-2); }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a.active { background: var(--ativo); color: var(--ativo-ink); font-weight: 600; }
.nav a.active .ic { color: var(--ativo-ink); }
:where(:root[data-theme="dark"]) .nav a { color: var(--ink-2); }
.nav-rodape { margin-top: auto; padding-bottom: 8px; }
.storage { padding: 16px 12px 4px; border-top: 1px solid var(--line); font-size: 13px; color: #344054; }
.storage-row { display: flex; justify-content: space-between; }
.storage-row span { font-weight: 600; }
.storage .bar { height: 6px; border-radius: 3px; background: var(--line); margin: 10px 0 8px; overflow: hidden; }
.storage .bar i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.storage .bar i.warn { background: var(--danger); }
.storage p { margin: 0; font-size: 12px; color: var(--ink-3); }
:where(:root[data-theme="dark"]) .storage { color: var(--ink-2); }

.main { grid-area: main; position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.page-head { padding: 24px 32px 0; flex: none; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; color: var(--ink-3); font-size: 13px; margin-bottom: 4px; }
.crumb { text-decoration: none; padding: 2px 6px; margin: 0 -2px; border-radius: 6px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.crumb:first-child { margin-left: -6px; }
.crumb:hover { background: var(--press); color: var(--ink); }
.crumb.drop-over { background: var(--ativo); outline: 2px solid var(--accent); }
.crumbs .sep { width: 16px; height: 16px; color: var(--ink-3); }
.crumb-ell { padding: 0 4px; }
.page-title {
  font: 700 22px/1.3 var(--display); letter-spacing: -.01em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 32px; min-height: 76px; flex: none; }
.tb-left { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; overflow-x: auto; padding: 2px; }
.toolbar.selecting .tb-left { background: var(--ativo); border: 1px solid var(--ativo-line); border-radius: var(--r); padding: 0 4px 0 16px; height: 46px; }
.toolbar.selecting .btn.ghost { color: var(--ativo-ink); }
.toolbar.selecting .btn.ghost.danger { color: var(--danger); }
.sel-count { font-weight: 600; margin-right: 8px; white-space: nowrap; color: var(--ativo-ink); }
.hint { color: var(--ink-3); font-size: 13px; margin-left: 4px; white-space: nowrap; }
.tb-right { display: flex; align-items: center; gap: 8px; flex: none; }
/* Filtros rápidos e ordenar */
.filtros { display: inline-flex; gap: 8px; margin-left: 8px; padding-left: 16px; border-left: 1px solid var(--line); }
.chip {
  display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 8px 0 12px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--canvas); color: var(--ink-2); font-weight: 500; font-size: 13px;
}
.chip:hover { background: var(--hover); color: var(--ink); }
.chip.on { background: var(--ativo); border-color: var(--ativo-line); color: var(--ativo-ink); font-weight: 600; }
.chip .caret { width: 18px; height: 18px; }
.view-toggle { display: flex; gap: 2px; padding: 3px; border-radius: var(--r); background: var(--canvas); border: 1px solid var(--line); flex: none; }
.view-toggle button { width: 34px; height: 34px; border: 0; border-radius: 7px; background: none; display: grid; place-items: center; cursor: pointer; color: var(--ink-3); }
.view-toggle button .ic { width: 20px; height: 20px; }
.view-toggle button:hover { color: var(--ink); }
.view-toggle button.on { background: var(--ativo); color: var(--ativo-ink); }

.content { flex: 1; overflow-y: auto; padding: 0 32px 120px; outline: none; }

/* Acesso rápido: os arquivos recentes em cartões, na raiz */
.rapido { margin-bottom: 24px; }
.rapido h2, .secao-titulo { font: 600 13px/1 var(--font); color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 12px; }
.rapido-grade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rapido-card {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; min-width: 0; text-align: left; cursor: pointer;
  background: var(--canvas); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--card-shadow); color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
.rapido-card:hover { border-color: var(--ativo-line); box-shadow: 0 4px 12px -2px rgba(16, 24, 40, .08); }
.rapido-thumb { height: 96px; border-radius: 8px; display: grid; place-items: center; overflow: hidden; background: var(--side); }
.rapido-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rapido-thumb .kind { width: 40px; height: 40px; }
.rapido-card b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rapido-card small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -4px; }

/* ── Checkbox ── */
.check {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--canvas);
  display: inline-grid; place-items: center; cursor: pointer; color: transparent; flex: none; transition: background .1s, border-color .1s;
}
.check .ic { width: 16px; height: 16px; }
.check:hover { border-color: var(--accent); }
.check[aria-checked="true"], .check[aria-checked="mixed"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ── Lista: uma tabela num cartão ── */
.list { user-select: none; background: var(--canvas); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--card-shadow); overflow: clip; }
.list-head, .list .item {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 170px 140px 100px 84px; align-items: center; column-gap: 12px; padding-right: 8px;
}
.pub-list .list-head, .pub-list .item { grid-template-columns: minmax(0, 1fr) 140px 100px 56px; padding-left: 16px; }
.list-head {
  height: 44px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; background: var(--canvas); z-index: 2;
}
.list-head button, .list-head span:not(.check) { border: 0; background: none; padding: 4px 6px; margin-left: -6px; border-radius: 6px; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.list-head button { cursor: pointer; }
.list-head button:hover { background: var(--hover); color: var(--ink); }
.arrow { margin-left: 4px; color: var(--blue); }
.list .item { min-height: 56px; border-bottom: 1px solid var(--hover); cursor: default; position: relative; }
.list .item:last-child { border-bottom: 0; }
.list .item:hover { background: #f9fafb; }
.list .item.selected { background: var(--ativo); }
.list .item.selected .name { color: var(--ativo-ink); }
:where(:root[data-theme="dark"]) .list .item:hover { background: var(--hover); }
.item.drop-over { background: var(--ativo) !important; box-shadow: inset 0 0 0 2px var(--accent); }
.c-check { display: flex; justify-content: center; }
.list .item .check { opacity: 0; }
.list .item:hover .check, .list .item .check[aria-checked="true"], .content.has-sel .list .check, .list .check:focus-visible { opacity: 1; }
.c-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.c-name .kind { width: 28px; height: 28px; }
.name {
  border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.name:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.c-access, .c-date, .c-size { color: var(--ink-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-access { display: flex; align-items: center; gap: 6px; }
.c-access .ic { width: 18px; height: 18px; color: var(--ink-3); }
.c-act { display: flex; justify-content: flex-end; gap: 2px; }
.list .item .more, .list .item .star-btn { opacity: 0; }
.list .item:hover .more, .list .item:hover .star-btn, .list .item.selected .more, .list .item .star-btn.on,
.item .more:focus-visible, .item .star-btn:focus-visible { opacity: 1; }
.star-btn.on { color: var(--accent); }

/* ── Grade ── */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); user-select: none; }
.grid .item {
  display: flex; flex-direction: column; min-width: 0; padding: 12px; border-radius: 12px;
  background: var(--canvas); border: 1px solid var(--line); box-shadow: var(--card-shadow);
}
.grid .item:hover { border-color: var(--ativo-line); }
.grid .item.selected { background: var(--ativo); border-color: var(--accent); }
.tile-thumb {
  position: relative; aspect-ratio: 4 / 3; border-radius: 8px; background: var(--side); display: grid; place-items: center; overflow: hidden;
}
.tile-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tile-thumb .kind.huge { width: 42%; height: 42%; }
.tile-thumb .check { position: absolute; top: 8px; left: 8px; opacity: 0; }
.tile-thumb .more { position: absolute; top: 4px; right: 4px; opacity: 0; background: var(--canvas); }
.grid .item:hover .check, .grid .item:hover .more, .grid .check[aria-checked="true"], .content.has-sel .grid .check { opacity: 1; }
.grid .name { margin-top: 10px; font-size: 14px; font-weight: 600; }
.tile-meta { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); min-width: 0; }
.tile-meta span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-star .ic { width: 15px; height: 15px; color: var(--accent); }

/* ── Estados ── */
.empty {
  text-align: center; padding: 72px 16px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center;
}
.empty.drop { max-width: 640px; margin: 24px auto 0; padding: 48px 24px; background: var(--canvas); border: 1px dashed var(--line-strong); border-radius: 12px; }
/* Atalhos de começo na pasta vazia */
.comecar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; margin-top: 20px; }
.comecar button {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); color: var(--ink); font-weight: 600; font-size: 13px;
  transition: background .12s, border-color .12s;
}
.comecar button:hover { background: var(--ativo); border-color: var(--ativo-line); }
.comecar .ic { width: 28px; height: 28px; }
.comecar [data-comecar="upload"] .ic { color: var(--accent); }
.comecar [data-comecar="pasta"] .ic { color: var(--folder-back); }
.comecar [data-comecar="documento"] .ic { color: #2f6fed; }
.comecar [data-comecar="planilha"] .ic { color: #1e8e3e; }
.empty > .kind.huge { width: 88px; height: 88px; margin-bottom: 20px; }
.empty-ic { width: 80px; height: 80px; border-radius: 50%; background: var(--selected); display: grid; place-items: center; margin-bottom: 20px; color: var(--blue); }
.empty-ic .ic { width: 36px; height: 36px; }
.empty h2 { font: 700 20px/1.3 var(--display); letter-spacing: -.01em; color: var(--ink); max-width: 420px; }
.empty p { margin: 8px 0 0; }
.empty .btn { margin-top: 24px; }
.loading { display: grid; place-items: center; padding: 80px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.drop-hint {
  position: absolute; inset: 12px; border-radius: 14px; display: none; place-items: center;
  border: 2px dashed var(--accent); background: color-mix(in srgb, var(--ativo) 85%, transparent); pointer-events: none; z-index: 5;
}
.drop-hint > div { background: var(--accent); color: var(--accent-ink); padding: 14px 22px; border-radius: var(--r); display: flex; gap: 12px; align-items: center; font-weight: 600; }
.drop-hint p { margin: 0; }
.main.dropping .drop-hint { display: grid; }

/* ── Menus ── */
.menu {
  position: fixed; z-index: 50; min-width: 220px; max-width: 320px; padding: 6px; border-radius: 10px;
  background: var(--canvas); border: 1px solid var(--line); box-shadow: var(--pop-shadow);
}
.menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 6px;
  background: none; cursor: pointer; text-align: left; font-size: 14px;
}
.menu button .ic { width: 20px; height: 20px; color: var(--ink-2); }
.menu button:hover, .menu button:focus-visible { background: var(--hover); outline: none; }
.menu button.danger, .menu button.danger .ic { color: var(--danger); }
.menu button.on, .menu button.on .ic { color: var(--ativo-ink); font-weight: 600; }
.menu button .marca { margin-left: auto; width: 18px; height: 18px; }
.menu button:disabled { opacity: .4; cursor: default; background: none; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px -6px; }
.menu-html { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 10px 8px; }
.menu-html .avatar { width: 44px; height: 44px; font-size: 18px; margin: 0 0 10px; cursor: default; }
.menu-html small { color: var(--ink-2); }

/* ── Diálogos ── */
.modal-back { position: fixed; inset: 0; z-index: 40; background: rgba(30, 25, 25, .45); display: grid; place-items: center; padding: 16px; }
.modal {
  width: 100%; max-width: 420px; background: var(--canvas); border-radius: 14px; padding: 28px; box-shadow: var(--pop-shadow);
  max-height: calc(100dvh - 32px); display: flex; flex-direction: column;
}
.modal.wide { max-width: 580px; }
.modal h2 { font: 700 24px/1.2 var(--display); letter-spacing: -.02em; margin-bottom: 20px; overflow-wrap: anywhere; }
.modal-body { overflow-y: auto; min-height: 0; }
.modal-body p { color: var(--ink-2); margin: 0; }
.modal-body > form .input { width: 100%; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 28px; }

.share h3 { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 24px 0 6px; }
.share-add { display: flex; gap: 8px; }
.share-add input { flex: 1; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.who b { font-weight: 700; }
.who small, .general small { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.general { display: flex; align-items: center; gap: 12px; }
.general > div { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.general .input.slim { margin-left: -12px; }
.gen-ic { width: 36px; height: 36px; border-radius: var(--r); display: grid; place-items: center; background: var(--side); color: var(--ink-2); flex: none; }
.gen-ic .ic { width: 20px; height: 20px; }
.gen-ic.on { background: var(--ativo); color: var(--ativo-ink); }
.link-row { display: flex; gap: 8px; margin-top: 16px; }
.link-row .input { flex: 1; }

.mv-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-bottom: 10px; color: var(--ink-2); font-size: 14px; }
.mv-crumbs a { text-decoration: none; padding: 2px 6px; border-radius: 6px; }
.mv-crumbs a:hover { background: var(--hover); color: var(--ink); }
.mv-crumbs b { padding: 2px 6px; color: var(--ink); }
.mv-crumbs .sep { width: 16px; height: 16px; }
.mv-list { border: 1px solid var(--line); border-radius: var(--r); height: 300px; overflow-y: auto; padding: 4px; }
.mv-row { display: flex; align-items: center; gap: 12px; width: 100%; height: 48px; padding: 0 10px; border: 0; border-radius: 6px; background: none; cursor: pointer; text-align: left; font-weight: 700; }
.mv-row .kind { width: 28px; height: 28px; }
.mv-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-row > .ic { color: var(--ink-3); width: 20px; height: 20px; }
.mv-row:hover { background: var(--hover); }
.mv-row:disabled { opacity: .4; cursor: default; background: none; }
.mv-empty { padding: 24px; text-align: center; }

/* ── Toast e uploads ── */
#toast {
  position: fixed; left: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 8px; max-width: min(560px, calc(100vw - 32px));
  background: #101828; color: #f2f4f7; padding: 6px 6px 6px 16px; border-radius: var(--r); box-shadow: var(--pop-shadow);
  transform: translateY(150%); opacity: 0; transition: .2s; pointer-events: none; font-size: 14px;
}
#toast.show { transform: none; opacity: 1; pointer-events: auto; }
#toast > span { flex: 1; padding: 8px 0; }
.toast-btn { border: 0; background: none; color: #f8b26a; font-weight: 700; padding: 8px 12px; border-radius: 6px; cursor: pointer; }
.toast-btn:hover { background: rgba(255, 255, 255, .1); }
#toast .icon-btn { color: #f2f4f7; }
#toast .icon-btn:hover { background: rgba(255, 255, 255, .1); }
.icon-btn.light { color: inherit; }

#uploads {
  position: fixed; right: 24px; bottom: 24px; z-index: 30; width: 380px; max-width: calc(100vw - 32px);
  background: var(--canvas); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--pop-shadow); overflow: hidden;
}
.up-head { display: flex; align-items: center; gap: 2px; height: 52px; padding: 0 8px 0 18px; font-weight: 700; border-bottom: 1px solid var(--line); }
.up-head span { flex: 1; }
#uploads.collapsed .up-head { border-bottom: 0; }
#uploads.collapsed .up-head [data-up=toggle] .ic { transform: rotate(180deg); }
#uploads.collapsed .up-list { display: none; }
.up-list { max-height: 280px; overflow-y: auto; padding: 4px 0; }
.up-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 18px; font-size: 14px; }
.up-row .kind { width: 28px; height: 28px; }
.up-row .name { flex: 1; display: flex; flex-direction: column; cursor: default; }
.up-row .name:hover { text-decoration: none; }
.up-row .name small { color: var(--danger); font-size: 12px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.up-row.canceled .name { color: var(--ink-3); }
.st { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; }
.st .ic { width: 22px; height: 22px; }
.st.muted { width: auto; font-size: 12px; }
.st.ok { color: #1e8e3e; }
.st.err { color: var(--danger); }
.st .cancel { display: none; }
.up-row:hover .st .ring { display: none; }
.up-row:hover .st .cancel { display: inline-grid; }
.ring {
  width: 22px; height: 22px; border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--p) * 1%), var(--line) 0);
  -webkit-mask: radial-gradient(circle, transparent 7px, #000 7.5px); mask: radial-gradient(circle, transparent 7px, #000 7.5px);
}

/* ── Pré-visualização ── */
.preview { position: fixed; inset: 0; z-index: 45; background: rgba(12, 17, 29, .94); color: #f2f4f7; display: flex; flex-direction: column; outline: none; }
.pv-head { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 12px; flex: none; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.pv-head .kind { width: 26px; height: 26px; }
.pv-name { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-count { color: #a8a29c; font-size: 13px; }
.pv-head .icon-btn { color: #f2f4f7; }
.pv-head .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.pv-body { flex: 1; min-height: 0; display: grid; place-items: center; padding: 24px 80px 32px; }
.pv-body img, .pv-body video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.pv-body iframe { width: min(1000px, 100%); height: 100%; border: 0; background: #fff; border-radius: 6px; }
.pv-text {
  width: min(1000px, 100%); height: 100%; margin: 0; overflow: auto; padding: 28px 32px; border-radius: 6px;
  background: #fff; color: #101828; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word;
}
.pv-audio, .pv-none { display: flex; flex-direction: column; align-items: center; gap: 20px; background: #2a2624; padding: 40px 48px; border-radius: 14px; text-align: center; }
.pv-none p { margin: 0; }
.pv-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: rgba(30, 25, 25, .72); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 3; box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.pv-nav:hover { background: rgba(30, 25, 25, .9); }
.pv-nav.prev { left: 16px; }
.pv-nav.next { right: 16px; }

/* ── Página pública ── */
body.public { display: flex; flex-direction: column; min-height: 100%; }
body.public .topbar { border-bottom: 1px solid var(--line); padding: 0 24px; gap: 20px; }
.pub-title { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; padding-left: 20px; border-left: 1px solid var(--line); height: 40px; }
.pub-title > div { display: flex; flex-direction: column; min-width: 0; }
.pub-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-title small { color: var(--ink-2); font-size: 13px; }
.pub-main { flex: 1; padding: 24px 32px 64px; max-width: 1200px; width: 100%; margin: 0 auto; }
.pub-main .page-title { margin-bottom: 20px; }
.pub-main .list .item { cursor: pointer; }
.pub-file { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 0; }
.pub-thumb { width: min(520px, 100%); aspect-ratio: 16 / 10; display: grid; place-items: center; border-radius: 12px; background: var(--side); border: 1px solid var(--line); overflow: hidden; margin-bottom: 28px; }
.pub-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pub-file h2 { font: 700 28px/1.15 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.pub-file .muted { margin: 6px 0 0; }
.pub-btns { display: flex; gap: 12px; margin-top: 28px; }

/* ── Responsivo ── */
@media (max-width: 1200px) {
  .rapido-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .list-head, .list .item { grid-template-columns: 44px minmax(0, 1fr) 130px 84px; }
  .list .c-access, .list .c-size { display: none; }
  .pub-list .list-head, .pub-list .item { grid-template-columns: minmax(0, 1fr) 100px 56px; }
  .pub-list .c-date { display: none; }
  .pub-list .c-size { display: block; }
}
@media (max-width: 760px) {
  #app, #app.side-collapsed { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  #app.side-collapsed .sidebar { padding: 20px 16px; }
  #app.side-collapsed .nav-label { display: inline; }
  #app.side-collapsed .nav-curto { display: none; }
  #app.side-collapsed .storage { display: block; }
  #app.side-collapsed .nav { gap: 2px; }
  #app.side-collapsed .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; height: 40px; padding: 0 12px; font-size: 14px; white-space: nowrap; text-align: left; }
  #app.side-collapsed .nav a.active { background: var(--ativo); }
  #app.side-collapsed .nav a .ic, #app.side-collapsed .nav a:hover .ic, #app.side-collapsed .nav a.active .ic { padding: 0; background: none; }
  .topbar > #menu-btn { margin-right: 0; }
  .only-mobile { display: inline-grid; }
  .sidebar {
    position: fixed; z-index: 35; top: 0; bottom: 0; left: 0; width: 280px;
    transform: translateX(-100%); transition: transform .2s;
  }
  .sidebar.open { transform: none; box-shadow: var(--pop-shadow); }
  .scrim { position: fixed; inset: 0; z-index: 34; background: rgba(16, 24, 40, .5); display: none; }
  .scrim.show { display: block; }
  .topbar { padding: 0 12px 0 6px; gap: 8px; }
  .topbar > .brand { width: auto; }
  .topbar > .brand span { display: none; }
  .search { height: 40px; }
  .page-head { padding: 16px 16px 0; }
  .page-title { font-size: 20px; }
  .toolbar { padding: 12px 16px; min-height: 0; }
  .toolbar .btn:not(.primary):not(.icon-only) span, .toolbar .hint { display: none; }
  .toolbar .btn:not(.primary):not(.icon-only) { width: 40px; padding: 0; }
  .toolbar.selecting .tb-left { padding-left: 12px; }
  .content { padding: 0 16px 120px; }
  .comecar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filtros { margin-left: 0; padding-left: 8px; }
  .rapido-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .rapido-thumb { height: 72px; }
  .list-head, .list .item { grid-template-columns: minmax(0, 1fr) 40px; column-gap: 8px; }
  .list .c-check, .list .c-date, .list .star-btn { display: none; }
  .c-name { padding-left: 12px; }
  .list .item .more { opacity: 1; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .pv-body { padding: 12px 8px 24px; }
  .pv-nav { top: auto; bottom: 16px; transform: none; }
  #uploads { right: 16px; bottom: 16px; }
  #toast { left: 16px; bottom: 16px; }
  body.public .topbar { padding: 0 12px; gap: 12px; }
  .pub-title { padding-left: 12px; }
  .pub-main { padding: 16px 16px 48px; }
  .pub-actions .btn span { display: none; }
  .pub-actions .btn { width: 40px; padding: 0; }
  .pub-list .list-head, .pub-list .item { grid-template-columns: minmax(0, 1fr) 56px; }
  .pub-list .c-size { display: none; }
  .share-add { flex-wrap: wrap; }
  .share-add input { flex-basis: 100%; }
}
@media (min-width: 761px) { .scrim { display: none !important; } }

/* ── Pré-visualização do Office (office.js) ── */
.pv-body:has(.pv-office) { padding: 0; place-items: stretch; }
.pv-office { width: 100%; height: 100%; overflow: auto; color: #101828; }
.pv-loading { height: 100%; display: grid; place-content: center; justify-items: center; gap: 12px; color: #c9c4be; }
.pv-loading p { margin: 0; }
.pv-loading .spinner { border-color: rgba(255, 255, 255, .15); border-top-color: #fff; }

/* Documento: folhas brancas do tamanho da página do arquivo */
.of-doc { padding: 28px 16px 64px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.of-pagina {
  position: relative; width: min(var(--w), 100%); min-height: var(--h); background: #fff; color: #000;
  padding: var(--mt) var(--md) var(--mb) var(--me); box-shadow: 0 2px 10px rgba(0, 0, 0, .4); border-radius: 2px;
  font: 11pt/1.15 Calibri, Carlito, "Liberation Sans", Arial, sans-serif; overflow-wrap: anywhere;
}
.of-margem { position: absolute; left: var(--me); right: var(--md); font-size: 9pt; color: #6b6560; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.of-margem.topo { top: calc(var(--mt) / 2 - 6px); }
.of-margem.baixo { bottom: calc(var(--mb) / 2 - 6px); }
.of-corpo p { margin: 0 0 8pt; }
.of-corpo h1, .of-corpo h2, .of-corpo h3, .of-corpo h4, .of-corpo h5, .of-corpo h6 { margin: 12pt 0 6pt; font-weight: 700; line-height: 1.2; }
.of-corpo h1 { font-size: 20pt; } .of-corpo h2 { font-size: 16pt; } .of-corpo h3 { font-size: 14pt; } .of-corpo h4, .of-corpo h5, .of-corpo h6 { font-size: 12pt; }
.of-corpo ul, .of-corpo ol { margin: 0 0 8pt; padding-left: 28px; }
.of-corpo li > p { margin: 0; }
.of-corpo img { max-width: 100%; height: auto; }
.of-corpo table { border-collapse: collapse; margin: 0 0 8pt; max-width: 100%; }
.of-corpo td, .of-corpo th { border: 1px solid #a6a6a6; padding: 3px 6px; vertical-align: top; }
.of-corpo th { background: #f2f2f2; }
.of-corpo a { color: #0563c1; }
@media (max-width: 760px) {
  .of-doc { padding: 12px 8px 48px; }
  .of-pagina { min-height: 0; padding: 28px 20px; }
  .of-margem { display: none; }
}

/* Planilha: grade com cabeçalho de colunas e linhas, abas embaixo */
.of-xl { height: 100%; display: flex; flex-direction: column; background: #fff; }
.of-xl-area { flex: 1; overflow: auto; min-height: 0; }
.of-grade { border-collapse: collapse; table-layout: fixed; font: 13px/1.25 Calibri, Carlito, Arial, "Liberation Sans", sans-serif; color: #000; width: max-content; }
.of-grade th, .of-grade td { height: 21px; padding: 1px 4px; border: 1px solid #e1dfdd; white-space: nowrap; overflow: hidden; text-overflow: clip; vertical-align: bottom; }
.of-grade.sem-grade td { border-color: transparent; }
.of-grade thead th { position: sticky; top: 0; z-index: 2; background: #f3f2f1; color: #605e5c; font-weight: 400; font-size: 12px; text-align: center; border-color: #d2d0ce; }
.of-grade tbody th { position: sticky; left: 0; z-index: 1; background: #f3f2f1; color: #605e5c; font-weight: 400; font-size: 12px; text-align: center; border-color: #d2d0ce; }
.of-grade thead th.canto { left: 0; z-index: 3; }
.of-grade td.q { white-space: pre-wrap; overflow-wrap: anywhere; vertical-align: top; }
.of-grade td.erro { color: #c4281c; }
.of-abas { display: flex; gap: 2px; padding: 0 8px; background: #f3f2f1; border-top: 1px solid #d2d0ce; overflow-x: auto; flex: none; }
.of-abas button { border: 0; background: none; padding: 8px 16px; font: 700 13px var(--font); color: #605e5c; cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent; }
.of-abas button:hover { background: #e8e6e4; color: #101828; }
.of-abas button.ativa { color: #0a3d91; border-bottom-color: #f28c28; background: #fff; }
.of-aviso { margin: 0; padding: 6px 12px; font-size: 13px; color: #605e5c; background: #faf9f8; border-top: 1px solid #edebe9; flex: none; }
.of-aviso:empty { display: none; }
.of-vazio { padding: 48px; text-align: center; color: #605e5c; }

/* Apresentação: slides empilhados, cada um escalado para a largura disponível */
.of-ppt { padding: 28px 16px 64px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.of-slide-bloco { width: min(1100px, 100%); }
.of-moldura { position: relative; width: 100%; overflow: hidden; border-radius: 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, .45); background: #fff; }
.of-slide { position: absolute; top: 0; left: 0; transform-origin: 0 0; overflow: hidden; font-family: Calibri, Carlito, "Liberation Sans", Arial, sans-serif; color: #000; }
.of-rotulo { margin: 8px 0 14px; text-align: center; font-size: 13px; color: #a8a29c; }
.of-el { position: absolute; box-sizing: border-box; }
.of-el.imagem img { width: 100%; height: 100%; display: block; object-fit: fill; }
.of-el.aviso { display: grid; place-items: center; border: 1px dashed #a39c94; color: #6b6560; font-size: 18px; background: #faf9f8; }
.of-texto { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: visible; line-height: 1.2; overflow-wrap: break-word; }
.of-par { white-space: pre-wrap; }
.of-marcador { display: inline-block; text-indent: 0; }
.of-tabela { width: 100%; height: 100%; border-collapse: collapse; table-layout: fixed; }
.of-tabela td { position: relative; border: 1px solid rgba(255, 255, 255, .8); padding: 0; vertical-align: top; }
.of-tabela td .of-texto { position: relative; inset: auto; min-height: 100%; }
@media (max-width: 760px) { .of-ppt { padding: 12px 8px 48px; } }

/* ── Editores (documento e planilha): estrutura comum ── */
body.editor { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--side); }
.ed-topo { display: flex; align-items: center; gap: 12px; padding: 10px 20px 10px 12px; background: var(--canvas); border-bottom: 1px solid var(--line); flex: none; }
.ed-ic .kind { width: 32px; height: 36px; }
.ed-titulo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ed-nome {
  font: 700 17px/1.25 var(--display); letter-spacing: -.01em; border: 1px solid transparent; border-radius: 6px; padding: 1px 6px; margin-left: -7px;
  background: transparent; color: var(--ink); width: min(520px, 100%); outline: none;
}
.ed-nome:hover:not([readonly]) { border-color: var(--line-strong); }
.ed-nome:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--selected); }
.ed-menus { display: flex; align-items: center; gap: 4px; margin-left: -8px; }
.ed-menus button { border: 0; background: none; padding: 2px 8px; border-radius: 6px; font: 500 13px var(--font); cursor: pointer; color: #344054; }
.ed-menus button:hover { background: var(--hover); }
:where(:root[data-theme="dark"]) .ed-menus button { color: var(--ink-2); }
.ed-situacao { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-3); margin-left: 4px; white-space: nowrap; }
.ed-situacao .ic { width: 15px; height: 15px; color: var(--ok); }
.ed-situacao[data-estado="erro"] { color: var(--danger); }
.ed-situacao[data-estado="leitura"] { color: var(--blue); background: var(--selected); padding: 1px 10px; border-radius: 999px; font-weight: 500; }
.ed-acoes { display: flex; align-items: center; gap: 12px; }
.ed-acoes .avatar { cursor: default; }
/* barra de ferramentas do editor: um cartão branco */
.ed-barra {
  display: flex; align-items: center; gap: 2px; padding: 6px 10px; margin: 12px 20px 8px; background: var(--canvas); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--card-shadow); flex: none; overflow-x: auto; scrollbar-width: thin;
}
.ed-barra .sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; flex: none; }
.ed-barra .icon-btn { width: 34px; height: 34px; border-radius: 8px; color: var(--ink-2); }
.ed-barra .icon-btn .ic { width: 19px; height: 19px; }
.ed-barra .icon-btn.on { background: var(--ativo); color: var(--ativo-ink); }
.ed-barra select, .ed-barra .ed-campo { height: 34px; border: 1px solid transparent; border-radius: 8px; background: transparent; padding: 0 6px; font: 500 14px var(--font); color: #344054; cursor: pointer; }
:where(:root[data-theme="dark"]) .ed-barra select, :where(:root[data-theme="dark"]) .ed-barra .ed-campo { color: var(--ink-2); }
.ed-barra select:hover, .ed-barra .ed-campo:hover { background: var(--hover); }
.ed-barra .ed-cor { position: relative; }
.ed-barra .ed-cor input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.ed-barra .ed-cor .barrinha { position: absolute; left: 8px; right: 8px; bottom: 4px; height: 3px; border-radius: 2px; }
body.editor.somente-leitura .ed-barra { display: none; }
.ed-area { flex: 1; min-height: 0; overflow: auto; }
.ed-falha { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; }
.ed-falha h1 { font: 700 24px var(--display); }
.ed-falha p { color: var(--ink-2); margin: 0 0 12px; }
@media (max-width: 760px) {
  .ed-acoes .btn span { display: none; }
  .ed-acoes .btn { width: 40px; padding: 0; }
  .ed-acoes .avatar { display: none; }
  .ed-barra { margin: 4px 6px 6px; }
}
@media print {
  body.editor { height: auto; overflow: visible; background: #fff; }
  .ed-topo, .ed-barra, #toast { display: none !important; }
  .ed-area { overflow: visible; }
}
.pv-converter { height: 36px; padding: 0 14px; }
@media (max-width: 760px) { .pv-converter span { display: none; } .pv-converter { width: 36px; padding: 0; } }
