:root {
    --cor-primaria: #0079bf;
    --cor-fundo-site: #eaedf0;
    --cor-fundo-coluna: #f4f5f7;
    --cor-texto-principal: #172b4d;
    --cor-texto-secundario: #5e6c84;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body { background-color: var(--cor-fundo-site); color: var(--cor-texto-principal); height: 100vh; display: flex; flex-direction: column; }
.tela-oculta { display: none !important; }
.tela-ativa { display: flex; }

/* TELAS DE ENTRADA / LOGIN */
.tela-login-fundo { height: 100vh; display: flex; justify-content: center; align-items: center; background: linear-gradient(135deg, var(--cor-primaria) 0%, #172b4d 100%); }
.login-container { background-color: white; padding: 35px; border-radius: 12px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); width: 100%; max-width: 400px; text-align: center; }
.login-container img { max-width: 160px; max-height: 60px; margin-bottom: 20px; object-fit: contain; }
.login-container h2 { margin-bottom: 15px; font-size: 20px; color: #172b4d; }
.form-padrao { display: flex; flex-direction: column; gap: 12px; }
.form-padrao input, .form-padrao select, .form-padrao textarea { padding: 11px; border: 1px solid #dfe1e6; border-radius: 6px; font-size: 14px; width: 100%; }

.alerta-erro { background: #ffebe6; color: #de350b; border: 1px solid #ffbdad; padding: 10px; border-radius: 6px; font-size: 13px; text-align: left; margin-bottom: 12px; display: none; }
.alerta-erro.visivel { display: block; }

.btn-primario { background-color: var(--cor-primaria); color: white; border: none; padding: 11px 16px; border-radius: 6px; font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.2s; }
.btn-primario:hover { filter: brightness(0.9); }

/* CABEÇALHO */
#tela-app.tela-ativa { flex-direction: column; width: 100%; height: 100vh; }
.app-header { background-color: var(--cor-primaria); color: white; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 3px 6px rgba(0,0,0,0.1); z-index: 10; }
.header-esq { display: flex; align-items: center; gap: 12px; }
.header-esq img { max-height: 36px; background: white; padding: 4px; border-radius: 6px; }
.nome-empresa-header { font-weight: 700; font-size: 17px; }
#busca-tarefas { padding: 8px 16px; border-radius: 20px; border: none; width: 300px; background-color: rgba(255,255,255,0.2); color: white; font-size: 13px; }
#busca-tarefas::placeholder { color: rgba(255,255,255,0.85); }
#busca-tarefas:focus { background-color: white; color: #333; outline: none; }
.header-dir { display: flex; gap: 10px; }
.btn-secundario { background-color: rgba(255,255,255,0.2); color: white; border: none; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600; }
.btn-secundario:hover { background-color: rgba(255,255,255,0.3); }

/* QUADRO & COLUNAS */
.quadro-container { display: flex; flex: 1; overflow-x: auto; padding: 20px; gap: 20px; align-items: flex-start; }
.coluna { background-color: var(--cor-fundo-coluna); border-radius: 10px; width: 315px; min-width: 315px; display: flex; flex-direction: column; padding: 14px; max-height: calc(100vh - 90px); box-shadow: 0 4px 10px rgba(0,0,0,0.04); border-top: 4px solid var(--cor-primaria); }
.coluna-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.coluna-titulo { font-size: 14px; font-weight: 700; color: #172b4d; text-transform: uppercase; }
.contador-tarefas { background-color: #dfe1e6; color: #172b4d; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.lista-cartoes { min-height: 50px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }

.btn-nova-coluna-quadro {
    background-color: rgba(255, 255, 255, 0.6);
    border: 2px dashed #b3bac5;
    border-radius: 10px;
    width: 260px;
    min-width: 260px;
    padding: 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #42526e;
    text-align: center;
    transition: 0.2s;
}
.btn-nova-coluna-quadro:hover {
    background-color: white;
    border-color: var(--cor-primaria);
    color: var(--cor-primaria);
}

/* CARTÕES E ÍCONE DO LÁPIS */
.cartao { background-color: #ffffff; border-radius: 8px; padding: 14px; border: 1px solid #e2e4e6; box-shadow: 0 2px 4px rgba(0,0,0,0.03); cursor: grab; display: flex; flex-direction: column; gap: 8px; transition: all 0.2s ease; position: relative; }
.cartao:hover { box-shadow: 0 6px 14px rgba(0,0,0,0.08); border-color: var(--cor-primaria); transform: translateY(-2px); }
.cartao.fantasma { opacity: 0.4; border: 2px dashed var(--cor-primaria); }
.cartao.oculto-filtro { display: none !important; }
.cartao-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.cartao-titulo { font-size: 14px; font-weight: 600; line-height: 1.4; color: #172b4d; flex: 1; }
.cartao-etiquetas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.etiqueta { padding: 3px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; color: white; text-transform: uppercase; }
.etiqueta-alta { background-color: #eb5a46; }
.etiqueta-media { background-color: #f2d600; color: #172b4d; }
.etiqueta-baixa { background-color: #61bd4f; }
.etiqueta-restrito { background-color: #403294; }

.btn-lapis-editar {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    border-radius: 4px;
    color: #6b778c;
    transition: 0.2s;
}
.btn-lapis-editar:hover { background: #ebecf0; color: var(--cor-primaria); }

.cartao-rodape { display: flex; justify-content: space-between; font-size: 11px; color: var(--cor-texto-secundario); align-items: center; margin-top: 4px; border-top: 1px solid #f4f5f7; padding-top: 6px; }
.btn-card-detalhes { background: #f4f5f7; border: 1px solid #dfe1e6; border-radius: 4px; font-size: 11px; font-weight: 600; padding: 3px 8px; cursor: pointer; color: #172b4d; }
.btn-card-detalhes:hover { background: #ebecf0; }

.btn-add-tarefa { background: transparent; border: 2px dashed #dfe1e6; padding: 10px; color: #5e6c84; cursor: pointer; border-radius: 6px; margin-top: 10px; font-size: 13px; font-weight: 600; text-align: center; }
.btn-add-tarefa:hover { background-color: rgba(9,30,66,0.05); color: var(--cor-primaria); border-color: var(--cor-primaria); }

/* MODAIS */
.modal-oculto { display: none !important; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(9,30,66,0.65); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-conteudo { background-color: white; padding: 24px; border-radius: 10px; width: 100%; max-width: 440px; box-shadow: 0 15px 35px rgba(0,0,0,0.25); max-height: 90vh; overflow-y: auto; }
.modal-largo { max-width: 650px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; border-bottom: 1px solid #ebecf0; padding-bottom: 10px; }
.modal-header h2 { font-size: 17px; color: #172b4d; }
.btn-fechar { background: none; border: none; font-size: 24px; cursor: pointer; color: #5e6c84; }

/* CHECKLIST, COMENTÁRIOS E AUDITORIA */
.progresso-wrapper { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--cor-texto-secundario); font-weight: 600; margin: 8px 0; }
.barra-fundo { height: 7px; background-color: #dfe1e6; border-radius: 4px; overflow: hidden; }
.barra-progresso { height: 100%; background-color: #61bd4f; }
.secao-bloco { margin-top: 16px; border-top: 1px solid #ebecf0; padding-top: 12px; }
.secao-bloco h4 { font-size: 13px; margin-bottom: 8px; color: #172b4d; }
.checklist-itens { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 140px; overflow-y: auto; }
.checklist-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.checklist-item.marcado span { text-decoration: line-through; color: #8993a4; }
.btn-secundario-acao { background: #ebecf0; border: none; padding: 8px 12px; border-radius: 4px; font-weight: 600; font-size: 12px; cursor: pointer; }

.lista-comentarios { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 180px; overflow-y: auto; margin-bottom: 10px; }
.comentario-box { background: #f4f5f7; border-radius: 6px; padding: 10px; font-size: 12px; border-left: 3px solid var(--cor-primaria); }
.comentario-header { display: flex; justify-content: space-between; font-weight: 700; color: #172b4d; margin-bottom: 4px; }
.comentario-texto { color: #333; line-height: 1.4; }

.lista-historico { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 150px; overflow-y: auto; font-size: 12px; }
.lista-historico li { padding: 6px 8px; background: #fafbfc; border-radius: 4px; border: 1px solid #ebecf0; display: flex; justify-content: space-between; }

.btn-perigo { background: #ffebe6; color: #de350b; border: 1px solid #ffbdad; padding: 8px 14px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 12px; }
.btn-perigo:hover { background: #de350b; color: white; }

/* GERENCIAMENTO DE EQUIPE */
.equipe-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 10px; }
.tabela-membros { width: 100%; border-collapse: collapse; font-size: 12px; }
.tabela-membros th, .tabela-membros td { padding: 8px; border-bottom: 1px solid #ebecf0; text-align: left; }
.tabela-membros th { color: #5e6c84; font-size: 10px; text-transform: uppercase; }
.btn-excluir-membro { background: none; border: none; color: #de350b; cursor: pointer; font-weight: 600; font-size: 11px; }