/* Estilos compartilhados entre as telas (sidebar, layout base e peças
   usadas por mais de uma página). Regras exclusivas de uma tela ficam
   no <style> local da própria página. */

:root { color-scheme: light dark; }
body { font-family: system-ui, sans-serif; margin: 0; }
.app { display: flex; align-items: flex-start; }

/* ---- Sidebar recolhida por padrão; expande no toggle ---- */
#sidebar {
  position: sticky; top: 0; height: 100vh; flex: 0 0 auto;
  width: 56px; transition: width .15s ease;
  display: flex; flex-direction: column;
  background: #8881; border-right: 1px solid #8884; overflow: hidden;
}
#sidebar.expandida { width: 210px; }
#sidebar .toggle {
  border: 0; background: transparent; cursor: pointer;
  font-size: 1.2rem; padding: .8rem; text-align: left; color: inherit;
}
#sidebar nav { flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.side-rodape { border-top: 1px solid #8884; padding: .4rem 0; display: flex; flex-direction: column; gap: .2rem; }
.nav-item {
  display: flex; align-items: center; gap: .7rem; white-space: nowrap;
  border: 0; background: transparent; color: inherit; cursor: pointer;
  font: inherit; padding: .6rem .9rem; text-align: left; width: 100%;
  text-decoration: none; box-sizing: border-box;
}
.nav-item:hover { background: #8882; }
.nav-item.ativo { background: #1a4f9c22; box-shadow: inset 3px 0 0 #1a4f9c; }
.nav-item .ico { font-size: 1.15rem; flex: 0 0 1.4rem; text-align: center; }
.nav-item .rotulo { overflow: hidden; }
#sidebar:not(.expandida) .nav-item .rotulo,
#sidebar:not(.expandida) #usuario,
#sidebar:not(.expandida) #status { display: none; }
#usuario, #status { padding: .2rem .9rem; font-size: .8rem; opacity: .75; white-space: nowrap; overflow: hidden; }
#usuario { font-size: .85rem; opacity: .8; }
#status { margin-left: auto; font-size: .85rem; opacity: .8; }

main { flex: 1; min-width: 0; padding: 1rem; max-width: 1100px; margin-inline: auto; }
header { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
header h1 { font-size: 1.1rem; margin: 0 1rem 0 0; }
input, button, select { font: inherit; padding: .4rem .6rem; }
#vazio { opacity: .6; padding: 2rem 0; text-align: center; }

/* Etiqueta de prioridade (minha-obra e acompanhamento) */
.prio { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #8883; }
.prio.alta { background: #b4231833; color: #b42318; }
.prio.media { background: #9a670033; color: #9a6700; }
.prio.baixa { background: #1a7f3733; color: #1a7f37; }

/* Lista de obras processadas (processadas e acompanhamento) */
.proc-lista { display: flex; flex-direction: column; gap: .4rem; }
.proc-item { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .8rem; border: 1px solid #8884; border-radius: 8px; cursor: pointer; align-items: baseline; }
.proc-item:hover { background: #8881; }
.proc-item .quando { opacity: .7; font-size: .82rem; white-space: nowrap; }
.proc-item .local { opacity: .7; font-size: .82rem; }

/* Mensagens de formulário/erro (nova-tarefa e acompanhamento) */
.form-msg { font-size: .9rem; }
.form-msg.ok { color: #1a7f37; }
.form-msg.erro { color: #b42318; }
